| 1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Writing a Bibliography</title><link rel="stylesheet" type="text/css" href="manual.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="index.html" title="DocBook to LaTeX Publishing" /><link rel="up" href="ch03.html" title="Chapter 3. Using dblatex" /><link rel="prev" href="sec-index.html" title="Creating an Index" /><link rel="next" href="ch03s15.html" title="Document Revisions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing a Bibliography</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-index.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using dblatex</th><td width="20%" align="right"> <a accesskey="n" href="ch03s15.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idp1777"></a>Writing a Bibliography</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="ch03s14.html#idp1782">Using Bibliography Entries</a></span></dt><dt><span class="section"><a href="ch03s14.html#sec-bibtex">Using BibTeX Databases</a></span></dt><dt><span class="section"><a href="ch03s14.html#sec-natbib">Natbib Citations</a></span></dt></dl></div><p> |
| 3 |
A bibliography (<code class="sgmltag-element">bibliography</code>) can be written and put anywhere in the document. It appears as a chapter or a section and is composed by several divisions (<code class="sgmltag-element">bibliodiv</code>) displayed as sections or subsections. |
| 4 |
</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idp1782"></a>Using Bibliography Entries</h3></div></div></div><p> |
| 5 |
The writer selects information that describes each bibliography entry (<code class="sgmltag-element">biblioentry</code>), and chooses the presentation order. The titles and authors are displayed first. |
| 6 |
</p><div class="example"><a id="idp1786"></a><p class="title"><strong>Example 3.15. A Bibliography</strong></p><div class="example-contents"><pre class="programlisting"> |
| 7 |
<bibliography><title>Bibliography Example</title> |
| 8 |
<bibliodiv><title>References</title> |
| 9 |
<biblioentry> |
| 10 |
<title>Document title</title> |
| 11 |
<author><firstname>J.</firstname><surname>Doe</surname></author> |
| 12 |
<pubsnumber>DEX000567325</pubsnumber> |
| 13 |
</biblioentry> |
| 14 |
</bibliodiv> |
| 15 |
<bibliodiv><title>White papers</title> |
| 16 |
<biblioentry> |
| 17 |
<title>Technical notes</title> |
| 18 |
<authorgroup> |
| 19 |
<author><firstname>J.</firstname><surname>Doe</surname></author> |
| 20 |
<author><firstname>R.</firstname><surname>Marion</surname></author> |
| 21 |
</authorgroup> |
| 22 |
<pubsnumber>DEX000704520</pubsnumber> |
| 23 |
</biblioentry> |
| 24 |
</bibliodiv> |
| 25 |
</bibliography> |
| 26 |
</pre></div></div><br class="example-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sec-bibtex"></a>Using BibTeX Databases</h3></div></div></div><p>Instead of writing the bibliographic materials in DocBook you can reuse |
| 27 |
some already available BibTeX databases. Of course, this feature is specific to |
| 28 |
<span class="command"><strong>dblatex</strong></span>, that will automatically call <span class="command"><strong>bibtex</strong></span> |
| 29 |
if some bibtex databases are used.</p><p>To do so, write a <code class="sgmltag-element">bibliodiv</code> containing an empty |
| 30 |
<code class="sgmltag-element">bibliomixed</code> element having a |
| 31 |
<code class="literal">bibtex</code> processing instruction specifying the databases to use |
| 32 |
and the style to apply.</p><p>More precisely here are the attributes supported by the |
| 33 |
<code class="literal">bibtex</code> PI: |
| 34 |
|
| 35 |
</p><div class="variablelist"><a id="bibtex-attributes"></a><dl class="variablelist"><dt><span class="term">bibfiles</span></dt><dd><p>This attribute is mandatory and specifies the databases to use. |
| 36 |
The databases are separated by |
| 37 |
commas, and must not contain the file suffix (<code class="literal">.bib</code>). The bibfiles |
| 38 |
paths must be absolute or relative to the base directory of the document. You |
| 39 |
can also add some bibfile paths by using the <code class="option">-L</code> option.</p></dd><dt><span class="term">bibstyle</span></dt><dd><p>Optional attribute specifying the bibliographic style to apply for rendering |
| 40 |
the databases. You can also change globally the style to apply with the |
| 41 |
<em class="parameter"><code>latex.biblio.style</code></em>.</p><p>The actual style file used by |
| 42 |
<span class="command"><strong>bibtex</strong></span> is searched in the default paths, but some extra paths |
| 43 |
can be added by using the <code class="option">-l</code> option.</p></dd><dt><span class="term">mode</span></dt><dd><p>Optional print mode. The available values are: |
| 44 |
</p><div class="variablelist"><a id="biblio-output-modes"></a><dl class="variablelist"><dt><span class="term">all</span></dt><dd><p>Print all the entries contained in the databases.</p></dd><dt><span class="term">cited</span></dt><dd><p>Print only the entries cited in the document.</p></dd><dt><span class="term">notcited</span></dt><dd><p>Print only the entries <span class="emphasis"><em>not</em></span> cited in the |
| 45 |
document.</p></dd></dl></div><p> |
| 46 |
</p><p>When the attribute is not used, the |
| 47 |
<em class="parameter"><code>latex.biblio.output</code></em> parameter is used as print mode. By |
| 48 |
default the print mode is set to 'all'.</p></dd></dl></div><p> |
| 49 |
</p><p>Some <code class="sgmltag-element">bibliodiv</code>s embedding bibliographic entries can be mixed with some <code class="sgmltag-element">bibliodiv</code>s using BibTeX databases, as shown by <a class="xref" href="ch03s14.html#eg-bibmixed" title="Example 3.16. Bibliography using BibTeX databases">Example 3.16, “Bibliography using BibTeX databases”</a>.</p><div class="example"><a id="eg-bibmixed"></a><p class="title"><strong>Example 3.16. Bibliography using BibTeX databases</strong></p><div class="example-contents"><pre class="programlisting"> |
| 50 |
<bibliography><title>Bibliography Example</title> |
| 51 |
<bibliodiv><title>References</title> |
| 52 |
<biblioentry> |
| 53 |
<title>Document Title</title> |
| 54 |
<author><firstname>J.</firstname><surname>Doe</surname></author> |
| 55 |
<pubsnumber>DEX000567325</pubsnumber> |
| 56 |
</biblioentry> |
| 57 |
</bibliodiv> |
| 58 |
<bibliodiv><title>Bibtex References</title> |
| 59 |
<bibliomixed><?bibtex bibfiles="bib/latex-bib" bibstyle="alpha"?></bibliomixed> |
| 60 |
</bibliodiv> |
| 61 |
<bibliodiv><title>Cited Bibtex References</title> |
| 62 |
<bibliomixed><?bibtex bibfiles="bib/database1,bib/database2" |
| 63 |
bibstyle="plain" |
| 64 |
mode="cited"?></bibliomixed> |
| 65 |
</bibliodiv> |
| 66 |
</bibliography> |
| 67 |
</pre></div></div><br class="example-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sec-natbib"></a>Natbib Citations</h3></div></div></div><p>You can apply natbib citation styles by playing with the citation role |
| 68 |
attribute, or with a <code class="literal">dblatex</code> processing instruction. The |
| 69 |
natbib use is enabled only when the <em class="parameter"><code>citation.natbib.use</code></em> |
| 70 |
paramater is set to 1; if not (default) the role attribute or PI are not taken |
| 71 |
into account even if present. The natbib package can be loaded with user specific |
| 72 |
options by setting the <em class="parameter"><code>citation.natbib.options</code></em> |
| 73 |
parameter.</p><p>When using the role attribute, simply type the natbib citation command to |
| 74 |
apply. When using the <code class="literal">dblatex</code> PI, put the natbib command in |
| 75 |
the <code class="sgmltag-element">citestyle</code> attribute.</p><p>If you need to put some square brackets "[ ]" in the citation texts, enclose |
| 76 |
the whole text with "{ }" to protect them (as you would do in latex).</p><p>Here are some examples:</p><pre class="programlisting"><para> |
| 77 |
<citation role="\citep[see][chap. #2]">texbook</citation> |
| 78 |
<citation role="\citep[see][{[chap. #2]}]">texbook</citation> |
| 79 |
<citation><?dblatex citestyle="\citep[see][chap. #2]"?>texbook</citation> |
| 80 |
<citation>texbook</citation> |
| 81 |
</para></pre><p>You can use a global natib citation style with the |
| 82 |
<em class="parameter"><code>citation.default.style</code></em> parameter. By default the |
| 83 |
parameter is empty, and therefor is not used.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s15.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Creating an Index </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Document Revisions</td></tr></table></div></body></html> |