summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-multbib.html
blob: df0dcc6d6bd27d223fd4dc1140de816e8a7f9e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<head>
<title>UK TeX FAQ -- question label multbib</title>
</head><body>
<h3>Multiple bibliographies?</h3>
<p>If you're thinking of multiple bibliographies tied to some part of
your document (such as the chapters within the document), please see
<a href="FAQ-chapbib.html">bibliographies per chapter</a>.
<p>For more than one bibliography, there are three options.
<p>The <i>multibbl</i> package offers a very simple interface: you use
a command <code>\</code><code>newbibliography</code> to define a bibliography "tag".  The package
redefines the other bibliography commands so that each time you use any one
of them, you give it the tag for the bibliography where you want the
citations to appear.  The <code>\</code><code>bibliography</code> command itself also takes
a further extra argument that says what title to use for the resulting
section or chapter (i.e., it patches

<a href="FAQ-fixnam.html"><code>\</code><code>refname</code> and <code>\</code><code>bibname</code></a> in a
<i>babel</i>-safe way).  So one might write:

<blockquote>
<pre>
\usepackage{multibbl}
\newbibliography{bk}
\bibliographystyle{bk}{alpha}
\newbibliography{art}
\bibliographystyle{art}{plain}
...
\cite[pp.~23--25]{bk}{milne:pooh-corner}
...
\cite{art}{einstein:1905}
...
\bibliography{bk}{book-bib}{References to books}
\bibliography{art}{art-bib}{References to articles}
</pre>
</blockquote>
(Note that the optional argument of <code>\</code><code>cite</code> appears <em>before</em> the
new tag argument, and that the <code>\</code><code>bibliography</code> commands may list
more than one <code>.bib</code> file - indeed all <code>\</code><code>bibliography</code> commands
may list the same set of files.)
<p>The <code>\</code><code>bibliography</code> data goes into files whose names are
&lt;<i>tag-name</i>&gt;<em>.aux</em>, so you will need to run
<blockquote>
<pre>
bibtex bk
bibtex art
</pre>
</blockquote>
after the first run of LaTeX, to get the citations in the correct
place.
<p>The <i>multibib</i> package allows you to define a series of
"additional topics", each of which comes with its own series of
bibliography commands.  So one might write:
<blockquote>
<pre>
\usepackage{multibib}
\newcites{bk,art}%
         {References from books,%
          References from articles}
\bibliographystylebk{alpha}
\bibliographystyleart{plain}
...
\citebk[pp.~23--25]{milne:pooh-corner}
...
\citeart{einstein:1905}
...
\bibliographybk{book-bib}
\bibliographyart{art-bib}
</pre>
</blockquote>
Again, as for <i>multibbl</i>, any <code>\</code><code>bibliography...</code> command may
scan any list of <code>.bib</code> files.
<p>BibTeX processing with <i>multibib</i> is much like that with
<i>multibbl</i>; with the above example, one needs:
<blockquote>
<pre>
bibtex bk
bibtex art
</pre>
</blockquote>
Note that, unlike <i>multibbl</i>, <i>multibib</i> allows a
simple, unmodified bibliography (as well as the "topic" ones).  
<p>The <i>bibtopic</i> package allows you separately to cite several
different bibliographies.  At the appropriate place in your document,
you put a sequence of <code>btSect</code> environments (each of which
specifies a bibliography database to scan) to typeset the separate
bibliographies.  Thus, one might have a file <i>diss.tex</i> containing:
<blockquote>
<pre>
\usepackage{bibtopic}
\bibliographystyle{alpha}
...
\cite[pp.~23--25]{milne:pooh-corner}
...
\cite{einstein:1905}
...
\begin{btSect}{book-bib}
\section{References from books}
\btPrintCited
\end{btSect}
\begin{btSect}[plain]{art-bib}
\section{References from articles}
\btPrintCited
\end{btSect}
</pre>
</blockquote>
Note the different way of specifying a bibliographystyle: if you want
a different style for a particular bibliography, you may give it as an
optional argument to the <code>btSect</code> environment.
<p>Processing with BibTeX, in this case, uses <code>.aux</code> files whose names
are derived from the name of the base document.  So in this example
you need to say:
<blockquote>
<pre>
bibtex diss1
bibtex diss2
</pre>
</blockquote>
<p>There is also a command <code>\</code><code>btPrintNotCited</code>, which gives the rest of
the content of the database (if nothing has been cited from the
database, this is equivalent to LaTeX standard <code>\</code><code>nocite{*}</code>).
<p>However, the <em>real</em> difference from <i>miltibbl</i> and
<i>mltibib</i> is that selection of what appears in each
bibliography section is determined in <i>bibtopic</i> by what's in
the <code>.bib</code> files.
<p>An entirely different approach is taken by the <i>splitbib</i>
package.  You provide a <code>category</code> environment, in the
preamble of your document, for each category you want a separate
citation list for.  In each environment, you list the <code>\</code><code>cite</code> keys
that you want listed in each category.  The <code>\</code><code>bibliography</code> command
(or, more precisely, the <code>thebibliograph</code> environment it
uses) will sort the keys as requested.  (Keys not mentioned in a
<code>category</code> appear in a "misc" category created in the
sorting process.)  A code example appears in the package documentation
(a PDF file in the CTAN directory,
  which you can browse to, from the link, below).

<dl>
<dt><tt><i>bibtopic.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/bibtopic.zip">macros/latex/contrib/bibtopic</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/bibtopic.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/bibtopic/">browse</a>)
<dt><tt><i>multibbl.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/multibbl.zip">macros/latex/contrib/multibbl</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/multibbl.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/multibbl/">browse</a>)
<dt><tt><i>multibib.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/multibib.zip">macros/latex/contrib/multibib</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/multibib.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/multibib/">browse</a>)
<dt><tt><i>splitbib.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/splitbib.zip">macros/latex/contrib/splitbib</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/splitbib.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/splitbib/">browse</a>)
</dl>
<p><p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multbib">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multbib</a>
</body>