Debian Codegraph @

docs/xhtml/manual/ch03s14.html

raw
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 &lt;bibliography&gt;&lt;title&gt;Bibliography Example&lt;/title&gt;
8 &lt;bibliodiv&gt;&lt;title&gt;References&lt;/title&gt;
9 &lt;biblioentry&gt;
10 &lt;title&gt;Document title&lt;/title&gt;
11 &lt;author&gt;&lt;firstname&gt;J.&lt;/firstname&gt;&lt;surname&gt;Doe&lt;/surname&gt;&lt;/author&gt;
12 &lt;pubsnumber&gt;DEX000567325&lt;/pubsnumber&gt;
13 &lt;/biblioentry&gt;
14 &lt;/bibliodiv&gt;
15 &lt;bibliodiv&gt;&lt;title&gt;White papers&lt;/title&gt;
16 &lt;biblioentry&gt;
17 &lt;title&gt;Technical notes&lt;/title&gt;
18 &lt;authorgroup&gt;
19 &lt;author&gt;&lt;firstname&gt;J.&lt;/firstname&gt;&lt;surname&gt;Doe&lt;/surname&gt;&lt;/author&gt;
20 &lt;author&gt;&lt;firstname&gt;R.&lt;/firstname&gt;&lt;surname&gt;Marion&lt;/surname&gt;&lt;/author&gt;
21 &lt;/authorgroup&gt;
22 &lt;pubsnumber&gt;DEX000704520&lt;/pubsnumber&gt;
23 &lt;/biblioentry&gt;
24 &lt;/bibliodiv&gt;
25 &lt;/bibliography&gt;
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 &lt;bibliography&gt;&lt;title&gt;Bibliography Example&lt;/title&gt;
51 &lt;bibliodiv&gt;&lt;title&gt;References&lt;/title&gt;
52 &lt;biblioentry&gt;
53 &lt;title&gt;Document Title&lt;/title&gt;
54 &lt;author&gt;&lt;firstname&gt;J.&lt;/firstname&gt;&lt;surname&gt;Doe&lt;/surname&gt;&lt;/author&gt;
55 &lt;pubsnumber&gt;DEX000567325&lt;/pubsnumber&gt;
56 &lt;/biblioentry&gt;
57 &lt;/bibliodiv&gt;
58 &lt;bibliodiv&gt;&lt;title&gt;Bibtex References&lt;/title&gt;
59 &lt;bibliomixed&gt;&lt;?bibtex bibfiles="bib/latex-bib" bibstyle="alpha"?&gt;&lt;/bibliomixed&gt;
60 &lt;/bibliodiv&gt;
61 &lt;bibliodiv&gt;&lt;title&gt;Cited Bibtex References&lt;/title&gt;
62 &lt;bibliomixed&gt;&lt;?bibtex bibfiles="bib/database1,bib/database2"
63 bibstyle="plain"
64 mode="cited"?&gt;&lt;/bibliomixed&gt;
65 &lt;/bibliodiv&gt;
66 &lt;/bibliography&gt;
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">&lt;para&gt;
77 &lt;citation role="\citep[see][chap. #2]"&gt;texbook&lt;/citation&gt;
78 &lt;citation role="\citep[see][{[chap. #2]}]"&gt;texbook&lt;/citation&gt;
79 &lt;citation&gt;&lt;?dblatex citestyle="\citep[see][chap. #2]"?&gt;texbook&lt;/citation&gt;
80 &lt;citation&gt;texbook&lt;/citation&gt;
81 &lt;/para&gt;</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>