Blame docs/biblio.xml

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