Debian Codegraph @

docs/biblio.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4 <section xmlns:xi="http://www.w3.org/2001/XInclude">
5 <title>Writing a Bibliography</title>
6 <para>
7 A bibliography (<sgmltag>bibliography</sgmltag>) can be written and put anywhere in the document. It appears as a chapter or a section and is composed by several divisions (<sgmltag>bibliodiv</sgmltag>) displayed as sections or subsections.
8 </para>
9 <section><title>Using Bibliography Entries</title>
10 <para>
11 The writer selects information that describes each bibliography entry (<sgmltag>biblioentry</sgmltag>), and chooses the presentation order. The titles and authors are displayed first.
12 </para>
13 <example><title>A Bibliography</title>
14 <programlisting>
15 <![CDATA[<bibliography><title>Bibliography Example</title>
16 <bibliodiv><title>References</title>
17 <biblioentry>
18 <title>Document title</title>
19 <author><firstname>J.</firstname><surname>Doe</surname></author>
20 <pubsnumber>DEX000567325</pubsnumber>
21 </biblioentry>
22 </bibliodiv>
23 <bibliodiv><title>White papers</title>
24 <biblioentry>
25 <title>Technical notes</title>
26 <authorgroup>
27 <author><firstname>J.</firstname><surname>Doe</surname></author>
28 <author><firstname>R.</firstname><surname>Marion</surname></author>
29 </authorgroup>
30 <pubsnumber>DEX000704520</pubsnumber>
31 </biblioentry>
32 </bibliodiv>
33 </bibliography>
34 ]]> </programlisting>
35 </example>
36 </section>
37 <section id="sec-bibtex"><title>Using BibTeX Databases</title>
38
39 <para>Instead of writing the bibliographic materials in DocBook you can reuse
40 some already available BibTeX databases. Of course, this feature is specific to
41 <command>dblatex</command>, that will automatically call <command>bibtex</command>
42 if some bibtex databases are used.</para>
43
44 <para>To do so, write a <sgmltag>bibliodiv</sgmltag> containing an empty
45 <sgmltag>bibliomixed</sgmltag> element having a
46 <literal>bibtex</literal> processing instruction specifying the databases to use
47 and the style to apply.</para>
48
49 <para>More precisely here are the attributes supported by the
50 <literal>bibtex</literal> PI:
51
52 <variablelist id="bibtex-attributes">
53 <varlistentry><term>bibfiles</term>
54 <listitem><para>This attribute is mandatory and specifies the databases to use.
55 The databases are separated by
56 commas, and must not contain the file suffix (<literal>.bib</literal>). The bibfiles
57 paths must be absolute or relative to the base directory of the document. You
58 can also add some bibfile paths by using the <option>-L</option> option.</para>
59 </listitem>
60 </varlistentry>
61 <varlistentry><term>bibstyle</term>
62 <listitem>
63 <para>Optional attribute specifying the bibliographic style to apply for rendering
64 the databases. You can also change globally the style to apply with the
65 <parameter>latex.biblio.style</parameter>.</para>
66 <para>The actual style file used by
67 <command>bibtex</command> is searched in the default paths, but some extra paths
68 can be added by using the <option>-l</option> option.</para>
69 </listitem>
70 </varlistentry>
71 <varlistentry><term>mode</term>
72 <listitem>
73 <para>Optional print mode. The available values are:
74 <variablelist id="biblio-output-modes">
75 <varlistentry><term>all</term>
76 <listitem><para>Print all the entries contained in the databases.</para></listitem>
77 </varlistentry>
78 <varlistentry><term>cited</term>
79 <listitem><para>Print only the entries cited in the document.</para></listitem>
80 </varlistentry>
81 <varlistentry><term>notcited</term>
82 <listitem><para>Print only the entries <emphasis>not</emphasis> cited in the
83 document.</para></listitem>
84 </varlistentry>
85 </variablelist>
86 </para>
87 <para>When the attribute is not used, the
88 <parameter>latex.biblio.output</parameter> parameter is used as print mode. By
89 default the print mode is set to 'all'.</para>
90 </listitem>
91 </varlistentry>
92 </variablelist>
93 </para>
94
95 <para>Some <sgmltag>bibliodiv</sgmltag>s embedding bibliographic entries can be mixed with some <sgmltag>bibliodiv</sgmltag>s using BibTeX databases, as shown by <xref
96 linkend="eg-bibmixed"/>.</para>
97
98 <example id="eg-bibmixed"><title>Bibliography using BibTeX databases</title>
99 <programlisting>
100 <![CDATA[<bibliography><title>Bibliography Example</title>
101 <bibliodiv><title>References</title>
102 <biblioentry>
103 <title>Document Title</title>
104 <author><firstname>J.</firstname><surname>Doe</surname></author>
105 <pubsnumber>DEX000567325</pubsnumber>
106 </biblioentry>
107 </bibliodiv>
108 <bibliodiv><title>Bibtex References</title>
109 <bibliomixed><?bibtex bibfiles="bib/latex-bib" bibstyle="alpha"?></bibliomixed>
110 </bibliodiv>
111 <bibliodiv><title>Cited Bibtex References</title>
112 <bibliomixed><?bibtex bibfiles="bib/database1,bib/database2"
113 bibstyle="plain"
114 mode="cited"?></bibliomixed>
115 </bibliodiv>
116 </bibliography>
117 ]]> </programlisting>
118 </example>
119
120 </section>
121 <section id="sec-natbib"><title>Natbib Citations</title>
122
123 <para>You can apply natbib citation styles by playing with the citation role
124 attribute, or with a <literal>dblatex</literal> processing instruction. The
125 natbib use is enabled only when the <parameter>citation.natbib.use</parameter>
126 paramater is set to 1; if not (default) the role attribute or PI are not taken
127 into account even if present. The natbib package can be loaded with user specific
128 options by setting the <parameter>citation.natbib.options</parameter>
129 parameter.</para>
130
131 <para>When using the role attribute, simply type the natbib citation command to
132 apply. When using the <literal>dblatex</literal> PI, put the natbib command in
133 the <sgmltag>citestyle</sgmltag> attribute.</para>
134
135 <para>If you need to put some square brackets "[ ]" in the citation texts, enclose
136 the whole text with "{ }" to protect them (as you would do in latex).</para>
137
138 <para>Here are some examples:</para>
139 <programlisting><![CDATA[<para>
140 <citation role="\citep[see][chap. #2]">texbook</citation>
141 <citation role="\citep[see][{[chap. #2]}]">texbook</citation>
142 <citation><?dblatex citestyle="\citep[see][chap. #2]"?>texbook</citation>
143 <citation>texbook</citation>
144 </para>]]></programlisting>
145
146 <para>You can use a global natib citation style with the
147 <parameter>citation.default.style</parameter> parameter. By default the
148 parameter is empty, and therefor is not used.</para>
149
150 </section>
151 </section>