/usr/share/doc/refdb/refdb-manual/ch10s04.html is in refdb-doc 1.0.2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>Create LaTeX/BibTeX bibliographies</title><link rel="stylesheet" type="text/css" href="manual.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="RefDB handbook" /><link rel="up" href="ch10.html" title="Chapter 10. Bibliographies" /><link rel="prev" href="ch10s03.html" title="Create SGML and XML bibliographies" /><link rel="next" href="ch10s05.html" title="Create RTF bibliographies" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Create LaTeX/BibTeX bibliographies</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch10s03.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Bibliographies</th><td width="20%" align="right"> <a accesskey="n" href="ch10s05.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sect-create-latex-bib"></a>Create LaTeX/BibTeX bibliographies</h2></div></div></div><p>RefDB integrates quite nicely with the LaTeX/BibTeX system. If you previously used a flat text file to store your BibTeX references, you will notice that there is only one additional command to run when you process your source document. Instead of keeping all of your references in a text file, refdbib will retrieve only the required references from the SQL database and store them in an intermediate text file.</p><div class="procedure"><ol class="procedure" type="1"><li class="step"><p class="title"><strong>Prepare the document</strong></p><p>Use the LaTeX commands <span class="command"><strong>cite</strong></span> and <span class="command"><strong>nocite</strong></span> to include the references as usual. The extended commands from the natbib package should work as well. All these commands take an identifier for the reference as an argument. These reference definitions can come in two flavours just like in DocBook documents: Either you use the same database for all references in the text. Then you just specify the citation key of the reference and tell the processing application which database to use. Or you specify the database name with each citation. In this case, you can pull the references from different databases in the same document. The two versions look like this:</p><pre class="programlisting">\cite{Miller1999}
\cite{litibp:Myers2001}
</pre><p>The first version cites the reference with the citation key <span class="quote">“<span class="quote">Miller1999</span>”</span> in the database passed to the processing application as an argument. The second form cites the reference with the citation key <span class="quote">“<span class="quote">Myers2001</span>”</span> in the database <span class="quote">“<span class="quote">litibp</span>”</span>. Please note that, in contrast to SGML/XML citations, the database part is separated by a colon from the citation key.</p><p>The LaTeX <span class="command"><strong>\bibliography</strong></span> command takes as an argument the name of the intermediate bibliography file without the extension. A simple choice would be the basename of your LaTeX document.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Keep in mind that even if you pull references from different RefDB databases, you still need to specify only one reference database in your LaTeX document as RefDB consolidates all cited references into one bibliography file.</p></div></li><li class="step"><p class="title"><strong>Create the auxiliary file</strong></p><p>Run the latex interpreter with the basename of your document (<code class="filename">foo.tex</code>) as an argument:</p><pre class="screen" width="60">
<code class="prompt">#~ </code>
<strong class="userinput"><code>latex foo</code></strong>
</pre><p>latex will create, among other files, <code class="filename">foo.aux</code>. latex stores all sorts of information in these auxiliary files for later use in subsequent runs. The interesting part for us is the list of citations.</p></li><li class="step"><p class="title"><strong>Create the intermediate bibliography file</strong></p><p>Now RefDB enters the stage. We process the auxiliary file to create a BibTeX bibliography tailored to our document. Either we do it manually:</p><pre class="screen" width="60">
<code class="prompt">#~ </code>
<strong class="userinput"><code>sort foo.aux | uniq | refdbib -d mybib -S name -t bibtex > foo.bib</code></strong>
</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The <code class="filename">.aux</code> file should be preprocessed through sort and uniq as shown here to avoid duplicate entries in your bibliography.</p></div><p>Or we use the <span class="command"><strong>runbib</strong></span> shell script:</p><pre class="screen" width="60">
<code class="prompt">#~ </code>
<strong class="userinput"><code>runbib -d mybib -S name -t bibtex foo</code></strong>
</pre><p>Remember that the basename of the file that receives the bibliographic information (<code class="filename">foo.bib</code> in our example) must match the name given in the <span class="command"><strong>bibliography</strong></span> command in the LaTeX document.</p><p>The resulting bibliography file will contain all references that were requested from the LaTeX document. If you add more citations to this document, you have to run refdbib again to update the intermediate bibliography file (it won't hurt if you <span class="emphasis"><em>remove</em></span> citations from your LaTeX document, though).</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>For the sake of consistency with <span class="command"><strong>bibtex</strong></span>, it is possible (though not necessary) to specify the auxiliary file without the <code class="filename">.aux</code> extension (<code class="filename">foo</code> in the above example).</p></div></li><li class="step"><p class="title"><strong>Run bibtex</strong></p><p>From here, everything runs as you are used to from LaTeX/BibTeX:</p><pre class="screen" width="60">
<code class="prompt">#~ </code>
<strong class="userinput"><code>bibtex foo</code></strong>
</pre></li><li class="step"><p class="title"><strong>Run latex</strong></p><p>Run latex on your LaTeX document at least twice to get all references right:</p><pre class="screen" width="60">
<code class="prompt">#~ </code>
<strong class="userinput"><code>latex foo && latex foo</code></strong>
</pre></li></ol></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch10s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch10.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch10s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Create SGML and XML bibliographies </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Create RTF bibliographies</td></tr></table></div></body></html>
|