Blame docs/biblio.xml

Packit 0f19cf
Packit 0f19cf
Packit 0f19cf
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
Packit 0f19cf
<section xmlns:xi="http://www.w3.org/2001/XInclude">
Packit 0f19cf
  <title>Writing a Bibliography</title>
Packit 0f19cf
  <para>
Packit 0f19cf
   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.
Packit 0f19cf
  </para>
Packit 0f19cf
  <section><title>Using Bibliography Entries</title>
Packit 0f19cf
  <para>
Packit 0f19cf
   The writer selects information that describes each bibliography entry (<sgmltag>biblioentry</sgmltag>), and chooses the presentation order. The titles and authors are displayed first.
Packit 0f19cf
  </para>
Packit 0f19cf
<example><title>A Bibliography</title>
Packit 0f19cf
  <programlisting>
Packit 0f19cf
<title>Bibliography Example</title> 
Packit 0f19cf
  <bibliodiv><title>References</title>
Packit 0f19cf
    <biblioentry>
Packit 0f19cf
      <title>Document title</title>
Packit 0f19cf
      <author><firstname>J.</firstname><surname>Doe</surname></author>
Packit 0f19cf
      <pubsnumber>DEX000567325</pubsnumber>
Packit 0f19cf
    </biblioentry>
Packit 0f19cf
  </bibliodiv>
Packit 0f19cf
  <bibliodiv><title>White papers</title>
Packit 0f19cf
    <biblioentry>
Packit 0f19cf
      <title>Technical notes</title>
Packit 0f19cf
      <authorgroup>
Packit 0f19cf
        <author><firstname>J.</firstname><surname>Doe</surname></author>
Packit 0f19cf
        <author><firstname>R.</firstname><surname>Marion</surname></author>
Packit 0f19cf
      </authorgroup>
Packit 0f19cf
      <pubsnumber>DEX000704520</pubsnumber>
Packit 0f19cf
    </biblioentry>
Packit 0f19cf
  </bibliodiv>
Packit 0f19cf
</bibliography>
Packit 0f19cf
]]>  </programlisting>
Packit 0f19cf
</example>
Packit 0f19cf
</section>
Packit 0f19cf
<section id="sec-bibtex"><title>Using BibTeX Databases</title>
Packit 0f19cf
Packit 0f19cf
<para>Instead of writing the bibliographic materials in DocBook you can reuse
Packit 0f19cf
some already available BibTeX databases. Of course, this feature is specific to
Packit 0f19cf
<command>dblatex</command>, that will automatically call <command>bibtex</command>
Packit 0f19cf
if some bibtex databases are used.</para>
Packit 0f19cf
Packit 0f19cf
<para>To do so, write a <sgmltag>bibliodiv</sgmltag> containing an empty
Packit 0f19cf
<sgmltag>bibliomixed</sgmltag> element having a
Packit 0f19cf
<literal>bibtex</literal> processing instruction specifying the databases to use
Packit 0f19cf
and the style to apply.</para>
Packit 0f19cf
Packit 0f19cf
<para>More precisely here are the attributes supported by the
Packit 0f19cf
<literal>bibtex</literal> PI:
Packit 0f19cf
Packit 0f19cf
<variablelist id="bibtex-attributes">
Packit 0f19cf
<varlistentry><term>bibfiles</term>
Packit 0f19cf
<listitem><para>This attribute is mandatory and specifies the databases to use.
Packit 0f19cf
The databases are separated by
Packit 0f19cf
commas, and must not contain the file suffix (<literal>.bib</literal>). The bibfiles
Packit 0f19cf
paths must be absolute or relative to the base directory of the document. You
Packit 0f19cf
can also add some bibfile paths by using the <option>-L</option> option.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</varlistentry>
Packit 0f19cf
<varlistentry><term>bibstyle</term>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Optional attribute specifying the bibliographic style to apply for rendering
Packit 0f19cf
the databases. You can also change globally the style to apply with the
Packit 0f19cf
<parameter>latex.biblio.style</parameter>.</para>
Packit 0f19cf
<para>The actual style file used by
Packit 0f19cf
<command>bibtex</command> is searched in the default paths, but some extra paths
Packit 0f19cf
can be added by using the <option>-l</option> option.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</varlistentry>
Packit 0f19cf
<varlistentry><term>mode</term>
Packit 0f19cf
<listitem>
Packit 0f19cf
<para>Optional print mode. The available values are:
Packit 0f19cf
  <variablelist id="biblio-output-modes">
Packit 0f19cf
  <varlistentry><term>all</term>
Packit 0f19cf
  <listitem><para>Print all the entries contained in the databases.</para></listitem>
Packit 0f19cf
  </varlistentry>
Packit 0f19cf
  <varlistentry><term>cited</term>
Packit 0f19cf
  <listitem><para>Print only the entries cited in the document.</para></listitem>
Packit 0f19cf
  </varlistentry>
Packit 0f19cf
  <varlistentry><term>notcited</term>
Packit 0f19cf
  <listitem><para>Print only the entries <emphasis>not</emphasis> cited in the
Packit 0f19cf
  document.</para></listitem>
Packit 0f19cf
  </varlistentry>
Packit 0f19cf
  </variablelist>
Packit 0f19cf
</para>
Packit 0f19cf
<para>When the attribute is not used, the
Packit 0f19cf
  <parameter>latex.biblio.output</parameter> parameter is used as print mode. By
Packit 0f19cf
  default the print mode is set to 'all'.</para>
Packit 0f19cf
</listitem>
Packit 0f19cf
</varlistentry>
Packit 0f19cf
</variablelist>
Packit 0f19cf
</para>
Packit 0f19cf
Packit 0f19cf
<para>Some <sgmltag>bibliodiv</sgmltag>s embedding bibliographic entries can be mixed with some <sgmltag>bibliodiv</sgmltag>s using BibTeX databases, as shown by 
Packit 0f19cf
linkend="eg-bibmixed"/>.</para>
Packit 0f19cf
Packit 0f19cf
<example id="eg-bibmixed"><title>Bibliography using BibTeX databases</title>
Packit 0f19cf
  <programlisting>
Packit 0f19cf
<title>Bibliography Example</title> 
Packit 0f19cf
  <bibliodiv><title>References</title>
Packit 0f19cf
    <biblioentry>
Packit 0f19cf
      <title>Document Title</title>
Packit 0f19cf
      <author><firstname>J.</firstname><surname>Doe</surname></author>
Packit 0f19cf
      <pubsnumber>DEX000567325</pubsnumber>
Packit 0f19cf
    </biblioentry>
Packit 0f19cf
  </bibliodiv>
Packit 0f19cf
  <bibliodiv><title>Bibtex References</title>
Packit 0f19cf
    <bibliomixed></bibliomixed>
Packit 0f19cf
  </bibliodiv>
Packit 0f19cf
  <bibliodiv><title>Cited Bibtex References</title>
Packit 0f19cf
    <bibliomixed>
Packit 0f19cf
                          bibstyle="plain"
Packit 0f19cf
                          mode="cited"?></bibliomixed>
Packit 0f19cf
  </bibliodiv>
Packit 0f19cf
</bibliography>
Packit 0f19cf
]]>  </programlisting>
Packit 0f19cf
</example>
Packit 0f19cf
Packit 0f19cf
</section>
Packit 0f19cf
<section id="sec-natbib"><title>Natbib Citations</title>
Packit 0f19cf
Packit 0f19cf
<para>You can apply natbib citation styles by playing with the citation role
Packit 0f19cf
attribute, or with a <literal>dblatex</literal> processing instruction. The
Packit 0f19cf
natbib use is enabled only when the <parameter>citation.natbib.use</parameter>
Packit 0f19cf
paramater is set to 1; if not (default) the role attribute or PI are not taken
Packit 0f19cf
into account even if present. The natbib package can be loaded with user specific
Packit 0f19cf
options by setting the <parameter>citation.natbib.options</parameter>
Packit 0f19cf
parameter.</para>
Packit 0f19cf
Packit 0f19cf
<para>When using the role attribute, simply type the natbib citation command to
Packit 0f19cf
apply. When using the <literal>dblatex</literal> PI, put the natbib command in
Packit 0f19cf
the <sgmltag>citestyle</sgmltag> attribute.</para>
Packit 0f19cf
Packit 0f19cf
<para>If you need to put some square brackets "[ ]" in the citation texts, enclose
Packit 0f19cf
the whole text with "{ }" to protect them (as you would do in latex).</para>
Packit 0f19cf
Packit 0f19cf
<para>Here are some examples:</para>
Packit 0f19cf
<programlisting>
Packit 0f19cf
<citation role="\citep[see][chap. #2]">texbook</citation>
Packit 0f19cf
<citation role="\citep[see][{[chap. #2]}]">texbook</citation>
Packit 0f19cf
<citation>texbook</citation>
Packit 0f19cf
<citation>texbook</citation>
Packit 0f19cf
</para>]]></programlisting>
Packit 0f19cf
Packit 0f19cf
<para>You can use a global natib citation style with the
Packit 0f19cf
<parameter>citation.default.style</parameter> parameter. By default the
Packit 0f19cf
parameter is empty, and therefor is not used.</para>
Packit 0f19cf
Packit 0f19cf
</section>
Packit 0f19cf
</section>