This repository has been archived by the owner on Sep 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faq-biblio.tex
1468 lines (1326 loc) · 55 KB
/
faq-biblio.tex
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% $Id: faq-biblio.tex,v 1.15 2014/01/28 18:17:36 rf10 Exp rf10 $
\section{Bibliographies and citations}
\subsection{Creating bibliographies}
\Question[Q-buildbib]{Creating a \BibTeX{} bibliography file}
A \BibTeX{} bibliography file may reasonably be compared to a small
database, the entries in which are references to literature that may
be called up by citations in a document.
Each entry in the bibliography has a \emph{type} and a unique
\emph{key}. The bibliography is read, by \BibTeX{}, using the details
specified in a \emph{bibliography style}. From the style, \BibTeX{}
finds what entry types are permissible, what \emph{fields} each entry
type has, and how to format the whole entry.
The type specifies the type of document you're making reference to; it
may run all the way from things like ``\environment{Book}'' and
``\environment{Proceedings}'' (which may even contain other citations
of type ``\environment{InBook}'' or ``\environment{InProceedings}'')
through dissertation styles like ``\environment{PhdThesis}'' to
otherwise-uncategorisable things such as ``\environment{Misc}''. The
unique key is something you choose yourself: it's what you use when
you want to \Qref*{cite an entry in the file}{Q-usebibtex}. People
commonly create a key that combines the (primary) author's name and
the year of publication, possibly with a marker to distinguish
publications in the same year. So, for example, the Dyson, Eddington,
Davidson paper about deflection of starlight appears in my
experimental \extension{bib} file as \texttt{Dyson20.1}.
So, noting the rules of the style, you have `simply' to write a
bibliography database. Fortunately, there are several tools to help
in this endeavour:
\begin{itemize}
\item Most of the better \Qref*{\AllTeX{}-oriented editors}{Q-editors}
have ``\BibTeX{} modes''.
\item If you have an existing \environment{thebibliography}
environment, the \ProgName{Perl} script \ProgName{tex2bib} will
probably help.
\item There are a number of \BibTeX{} bibliography management systems
available, some of which permit a graphical user interface to the
task. Sadly, none seems to be available with the ordinary \TeX{}
distributions.
Tools such as \ProgName{Xbibfile} (a graphical user interface),
\ProgName{ebib} (a database application written to run `inside'
\ProgName{emacs}) and
\ProgName{btOOL} (a set of \ProgName{perl} tools for building
\BibTeX{} database handlers) are available from \acro{CTAN}.
Other systems, such as
\href{http://refdb.sourceforge.net/}{\ProgName{RefDB}},
\href{http://www.nongnu.org/biborb}{BibORB},
\href{http://bibdesk.sourceforge.net/}{\ProgName{BibDesk}},
\href{http://pybliographer.org}{\ProgName{pybliographer}} and the
\ProgName{Java}-based
\href{http://freshmeat.net/projects/bibkeeper/}{\ProgName{Bibkeeper}}
and \href{http://jabref.sourceforge.net}{\ProgName{JabRef}} (which
claims to supersede \ProgName{Bibkeeper})
are only available from their development sites.
% review of web database offerings in textex_368
\item Some commercial citation-management systems will export in
\BibTeX{} format; an example is
\href{http://www.endnote.com/}{EndNote}.
\item Data from on-line citation databases may often be translated to
\BibTeX{} format by utilities to be found on \acro{CTAN}. For
example, the \ProgName{Perl} script \ProgName{isi2bibtex} will
translate citations from \acro{ISI} ``Web of knowledge'' (a
subscription service, available to \acro{UK} academics via
\acro{BIDS}). UK academics may translate \acro{BIDS} downloads
using \ProgName{bids.to.bibtex}
\item \href{http://scholar.google.com}{Google Scholar} provides an
``Import into \BibTeX{}'' tab for each reference it finds for you:
that tab gives you a page containing a \BibTeX{} entry for the
reference.
\end{itemize}
\begin{ctanrefs}
\item[bids.to.bibtex]\CTANref{bidstobibtex}
\item[btOOL]\CTANref{btOOL}
\item[ebib]\CTANref{ebib}
\item[isi2bibtex]\CTANref{isi2bibtex}
\item[tex2bib]\CTANref{tex2bib}
\item[tex2bib.readme]\CTANref{tex2bib-doc}
\item[xbibfile]\CTANref{xbibfile}
\end{ctanrefs}
\Question[Q-custbib]{Creating a bibliography style}
It \emph{is} possible to write your own: the standard bibliography
styles are distributed in a form with many comments, and there is a description
of the language in the \BibTeX{} distribution (see % ! line wrap
\Qref[question]{BibTeX documentation}{Q-BibTeXing}).
However, it must be admitted that the language in which \BibTeX{}
styles are written is pretty obscure, and one would not recommend
anyone who's not a confident programmer to write their own, though
minor changes to an existing style may be within the grasp of many.
If your style isn't too `far out', you can probably avoid programming
it by using the facilities of the \Package{custom-bib} bundle. The bundle
contains a file \File{makebst.tex}, which runs you through a text menu
to produce a file of instructions, which you can then use to generate your
own \extension{bst} file. This technique doesn't offer entirely new styles
of document, but the \Package{custom-bib}'s ``master \BibTeX{}
styles'' already offer significantly more than the \BibTeX{} standard set.
An alternative, which is increasingly often recommended, to use
\Qref*{\Package{biblatex}}{Q-biblatex}. \Package{Biblatex} offers
many hooks for adjusting the format of the output of your `basic'
\BibTeX{} style, and a collection of `contributed' styles have also
started to appear. Note.bowever There are not as many of
\Package{biblatex}'s contributed styles as there are for \BibTeX{},
and there is no \Package{custom-biblatex}, both of which suggest that
beginners' r\"ole models are hard to come by. As a result, beginners
should probably resist the temptation to write their own contributed
\package{biblatex} style.
\begin{ctanrefs}
\item[biblatex.sty]\CTANref{biblatex}
\item[biblatex \nothtml{\normalfont}contributed styles]\CTANref{biblatex-contrib}
\item[\nothtml{\normalfont}\BibTeX{} documentation]\CTANref{bibtex}
\item[makebst.tex]Distributed with \CTANref{custom-bib}
\end{ctanrefs}
\Question[Q-capbibtex]{Capitalisation in \BibTeX{}}
The standard \BibTeX{} bibliography styles impose fixed ideas about
the capitalisation of titles of things in the bibliography. While
this is not unreasonable by \BibTeX{}'s lights (the rules come from
the \emph{Chicago Manual of Style}) it can be troublesome, since
\BibTeX{} fails to recognise special uses (such as acronyms, chemical
formulae, etc.).
The solution is to enclose the letter or letters, whose capitalisation
\BibTeX{} should not touch, in braces, as:
\begin{quote}
\begin{verbatim}
title = {The {THE} operating system},
\end{verbatim}
\end{quote}
Sometimes you find \BibTeX{} changing the case of a single letter
inappropriately. No matter: the technique can be applied to single
letters, as in:
\begin{quote}
\begin{verbatim}
title = {Te{X}niques and tips},
\end{verbatim}
\end{quote}
If your document design specification requires a different style of
capitalisation, you should acquire a bibliography style that doesn't
enforce \BibTeX{}'s default rules. It is definitely \emph{not} a good
idea to enclose an entire title in braces, as in
\begin{quote}
\begin{verbatim}
title = {{TeXniques and tips}},
\end{verbatim}
\end{quote}
though that does ensure that the capitalisation is not changed. Your
\BibTeX{} database should be a general-purpose thing, not something
tuned to the requirements of a particular document or bibliography
style, or to the way you are thinking today~--- for example, on a
future occasion, you might find yourself using a different \BibTeX{}
style with different capitalisation rules.
There's more on the subject in the
% beware line wrap
\Qref*{\BibTeX{} documentation}{Q-BibTeXing}.
\Question[Q-bibaccent]{Accents in bibliographies}
\BibTeX{} not only has a tendency (by default) to mess about with the
% line wrap
\Qref*{case of letters in your bibliography}{Q-capbibtex},
also makes a hash of accent commands:
``\texttt{ma}\csx{\textasciitilde}\texttt{nana}'' comes out as ``ma
nana'' (!). The solution is similar that of the letter case problem:
enclose the troublesome sequence in braces, as
``\texttt{\{}\csx{\textasciitilde}\texttt{n\}}'', in this example.
\Question[Q-bibstrtl]{`String too long' in \BibTeX{}}
The \BibTeX{} diagnostic ``Warning--you've exceeded 1000, the
\texttt{global-string-size}, for entry \texttt{foo}'' usually arises
from a very large abstract or annotation included in the database.
The diagnostic usually arises because of an infelicity in the coding of
\File{abstract.bst}, or styles derived from it. (One doesn't
ordinarily output annotations in other styles.)
The solution is to make a copy of the style file (or get a clean copy
from \acro{CTAN}~--- \CTANref{abstract-bst}), and rename it (e.g., on a
long file-name system, to \File{abstract-long.bst}). Now edit it: find
function \texttt{output.nonnull} and
\begin{itemize}
\item change its first line (line 60 in the version on \acro{CTAN})
from
\begin{quote}
\begin{verbatim}
{ 's :=
\end{verbatim}
\end{quote}
to
\begin{quote}
\begin{verbatim}
{ swap$
\end{verbatim}
\end{quote}
Finally,
\item delete the function's last line, which just says ``\texttt{s}
(line 84 in the version on \acro{CTAN}).
\end{itemize}
Finally, change your \csx{bibliographystyle} command to refer to the
name of the new file.
This technique applies equally to any bibliography style: the same
change can be made to any similar \texttt{output.nonnull} function.
If you're reluctant to make this sort of change, the only way forward
is to take the entry out of the database, so that you don't encounter
\BibTeX{}'s limit, but you may need to retain the entry because it
will be included in the typeset document. In such cases, put the body
of the entry in a separate file:
\begin{quote}
\begin{verbatim}
@article{long.boring,
author = "Fred Verbose",
...
abstract = "{\input{abstracts/long.tex}}"
}
\end{verbatim}
\end{quote}
In this way, you arrange that all \BibTeX{} has to deal with is the
file name, though it will tell \TeX{} (when appropriate) to include
all the long text.
\Question[Q-manyauthor]{\BibTeX{} doesn't understand lists of names}
\BibTeX{} has a strict syntax for lists of authors' (or editors')
names in the \BibTeX{} data file; if you write the list of names in a
``natural''-seeming way, the chances are you will confuse \BibTeX{},
and the output produced will be quite different from what you had
hoped.
Names should be expressed in one of the forms
\begin{quote}
\begin{verbatim}
First Last
Last, First
Last, Suffix, First
\end{verbatim}
\end{quote}
and lists of names should be separated with ``\texttt{and}''.
For example:
\begin{quote}
\begin{verbatim}
AUTHOR = {Fred Q. Bloggs, John P. Doe \&
Another Idiot}
\end{verbatim}
\end{quote}
falls foul of two of the above rules: a syntactically significant
comma appears in an incorrect place, and `\csx{\&}' is being used as a
name separator. The output of the above might be something like:
\begin{quote}
\begin{wideversion}
\begin{verbatim}
John P. Doe \& Another Idiot Fred Q. Bloggs
\end{verbatim}
\end{wideversion}
\begin{narrowversion}
\begin{verbatim}
John P. Doe \& Another Idiot
Fred Q. Bloggs
\end{verbatim}
\end{narrowversion}
\end{quote}
because ``John P. Doe \& Another Idiot has become the `first name',
while ``Fred Q. Bloggs'' has become the `last name' of a single
person. The example should have been written:
\begin{quote}
\begin{narrowversion}
\begin{verbatim}
AUTHOR = {Fred Q. Bloggs and
John P. Doe and
Another Idiot}
\end{verbatim}
\end{narrowversion}
\begin{wideversion}
\begin{verbatim}
AUTHOR = {Fred Q. Bloggs and John P. Doe and
Another Idiot}
\end{verbatim}
\end{wideversion}
\end{quote}
Some bibliography styles implement clever acrobatics with very long
author lists. You can force truncation by using the pseudo-name
``\texttt{others}'', which will usually translate to something like
``\emph{et al}'' in the typeset output. So, if Mr.~Bloggs wanted to
distract attention from his co-authors, he would write:
\begin{quote}
\begin{verbatim}
AUTHOR = {Fred Q. Bloggs and others}
\end{verbatim}
\end{quote}
\Question[Q-citeURL]{\acro{URL}s in \BibTeX{} bibliographies}
There is no citation type for \acro{URL}s, \emph{per se}, in the
standard \BibTeX{} styles, though Oren Patashnik (the author of
\BibTeX{}) is believed to be considering developing one such for use
with the long-awaited \BibTeX{} version~1.0.
The actual information that need be available in a citation of an
\acro{URL} is discussed at some length in the publicly available
on-line
\begin{narrowversion}
extracts of \acro{ISO}~690--2, available via
\URL{http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm};
% checked 2004-01-15
\end{narrowversion}
\begin{wideversion}
\href{http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm}{extracts of \acro{ISO}\nobreakspace690--2};
\end{wideversion}
the techniques below do \emph{not} satisfy all the requirements of
\acro{ISO}~690--2, but they offer a solution that is at least
available to users of today's tools.
Until the new version of \BibTeX{} arrives, the simplest technique is
to use the \texttt{howpublished} field of the standard styles' \texttt{@misc}
function. Of course, the strictures
about \Qref*{typesetting \acro{URL}s}{Q-setURL} still apply, so the
entry will look like:
\begin{quote}
\begin{verbatim}
@misc{...,
...,
howpublished = "\url{http://...}"
}
\end{verbatim}
\end{quote}
A possible alternative approach is to use \BibTeX{} styles other than
the standard ones, that already have \acro{URL} entry types.
Candidates are:
\begin{itemize}
\item The \Package{natbib} styles (\Package{plainnat},
\Package{unsrtnat} and \Package{abbrevnat}), which are extensions of
the standard styles, principally for use with \Package{natbib}
itself. However, they've acquired \acro{URL}s and other ``modern''
entries along the way. The same author's \Package{custom-bib} is
also capable of generating styles that honour \acro{URL} entries.
\item The \Package{babelbib} bundle, which offers % ! line break
\Qref*{multilingual bibliographies}{Q-i18nbib}, similarly provides a
set of standard-style equivalents that have \acro{URL} entries.
\item More modern styles such as the \Package{harvard} package (if the
citation styles are otherwise satisfactory for you).
\Package{Harvard} bibliography styles all include a ``\texttt{url}''
field in their specification; however, the typesetting offered is
somewhat feeble (though it does recognise and use
\ProgName{LaTeX2HTML} macros if they are available, to create
hyperlinks).
\end{itemize}
You can also acquire new \BibTeX{} styles by use of Norman Gray's
\Package{urlbst} system, which is based on a \ProgName{Perl} script
that edits an existing \BibTeX{} style file to produce a new
style. The new style thus generated has a \texttt{webpage} entry type, and
also offers support for \texttt{url} and \texttt{lastchecked} fields
in the other entry types. The \ProgName{Perl} script comes with a set
of converted versions of the standard bibliography styles.
Another possibility is that some conventionally-published paper,
technical report (or even book) is also available on the Web. In such
cases, a useful technique is something like:
\begin{quote}
\begin{wideversion}
\begin{verbatim}
@techreport{...,
...,
note = "Also available as \url{http://...}"
}
\end{verbatim}
\end{wideversion}
\begin{narrowversion}
\begin{verbatim}
@techreport{...,
...,
note = "Also available as
\url{http://...}"
}
\end{verbatim}
\end{narrowversion}
\end{quote}
There is good reason to use the \Package{url} or \Package{hyperref}
packages in this context: \BibTeX{} has a habit of splitting
lines it considers excessively long, and if there are no space
characters for it to use as `natural' breakpoints, \BibTeX{} will
insert a comment (`\texttt{\textpercent{}}') character~\dots{}\@ which
is an acceptable character in an \acro{URL}. Any current version of
either of the \Package{url} or \Package{hyperref} packages detects this
``\texttt{\textpercent{}}--end-of-line'' structure in its argument, and
removes it.
\begin{ctanrefs}
\item[babelbib \nothtml{\rmfamily}bundle]\CTANref{babelbib}
\item[custom-bib \nothtml{\rmfamily}bundle]\CTANref{custom-bib}
\item[harvard.sty]\CTANref{harvard}
\item[hyperref.sty]\CTANref{hyperref}
\item[natbib \nothtml{\rmfamily}styles]\CTANref{natbib}
\item[url.sty]\CTANref{url}
\item[urlbst]\CTANref{urlbst}
\end{ctanrefs}
\Question[Q-bibplain]{Using \BibTeX{} with \plaintex{}}
The file \File{btxmac.tex} (which is part of the \Eplain{} system)
contains macros and documentation for using \BibTeX{} with
\plaintex{}, either directly or with \Qref*{\Eplain{}}{Q-eplain}. See
\Qref[question]{the use of \BibTeX{}}{Q-BibTeXing} for more
information about \BibTeX{} itself.
\begin{ctanrefs}
\item[btxmac.tex]\CTANref{btxmactex}
\item[eplain \nothtml{\rmfamily}system]\CTANref{eplain}
\end{ctanrefs}
\Question[Q-makebib]{Reconstructing \extension{bib} files}
Perhaps you've lost the \extension{bib} file you generated your document from,
or have been sent a document without one. Or even, you've realised
the error of building a substantial document without the benefit of
\BibTeX{}\dots{}
The \ProgName{Perl} script, \Package{tex2bib} makes a reasonable job
of regenerating \extension{bib} files from \environment{thebibliography}
environments, provided that the original (whether automatically or
manually generated) doesn't deviate too far from the ``standard''
styles.
You are well-advised to check the output of the script. While it will
not usually destroy information, it can quite reasonably mislabel it.
Documentation of the script is to be found in the file \File{tex2bib.readme}
\begin{ctanrefs}
\item[tex2bib]\CTANref{tex2bib}
\item[tex2bib.readme]\CTANref{tex2bib-doc}
\end{ctanrefs}
\Question[Q-bibprefixsort]{\BibTeX{} sorting and name prefixes}
\BibTeX{} recognises a bewildering array of name prefixes (mostly
those deriving from European language names); it ignores the prefixes
when sorting the bibliography~--- you want ``Ludwig van Beethoven''
sorted under ``Beethoven'', not under ``van''. (Lamport made a witty
deliberate mistake with Beethoven's name, in the first edition of his
\LaTeX{} manual.)
However, a recurring issue is the desire to quote Lord Rayleigh's
publications (``Lord'' isn't an acceptable prefix), or names from
languages that weren't considered when \BibTeX{} was designed such as
``al-Wakil'' (transcribed from the Arabic). What's needed is a
separate ``sort key'', but \BibTeX{} only allows such a thing in
citations of items that have no author or editor.
The solution is to embed the sort key in the author's name, but to
prevent it from being typeset. Patashnik recommends a command
\csx{noopsort} (no-output-sortkey), which is defined and used as
follows:
\begin{quote}
\begin{wideversion}
\begin{verbatim}
@PREAMBLE{ {\providecommand{\noopsort}[1]{}} }
...
@ARTICLE{Rayleigh1,
AUTHOR = "{\noopsort{Rayleigh}}{Lord Rayleigh}",
...
}
\end{verbatim}
\end{wideversion}
\begin{narrowversion}
\begin{verbatim}
@PREAMBLE{
{\providecommand{\noopsort}[1]{}}
}
...
@ARTICLE{Rayleigh1,
AUTHOR =
"\noopsort{Rayleigh}{Lord Rayleigh}",
...
}
\end{verbatim}
\end{narrowversion}
\end{quote}
Note that this \csx{noopsort} applies to the last name in this kind of
construct, so an author with an Arabic name might be rendered:
\begin{wideversion}
\begin{quote}
\begin{verbatim}
...
AUTHOR = "Ali {\noopsort{Hadiidii}}{al-Hadiidii}",
...
\end{verbatim}
\end{quote}
\end{wideversion}
\begin{narrowversion}
\begin{quote}
\begin{verbatim}
...
AUTHOR =
"Ali {\noopsort{Hadiidii}}{al-Hadiidii}",
...
\end{verbatim}
\end{quote}
\end{narrowversion}
A further use might deal with word order games, as in the famous
Vietnamese name:
\begin{wideversion}
\begin{quote}
\begin{verbatim}
...
AUTHOR = "\noopsort{Thanh Han The}{Han The Thanh}",
...
\end{verbatim}
\end{quote}
\end{wideversion}
\begin{narrowversion}
\begin{quote}
\begin{verbatim}
...
AUTHOR =
"\noopsort{Thanh Han The}{Han The Thanh}",
...
\end{verbatim}
\end{quote}
\end{narrowversion}
though that author seems well-acquainted with Western confusion about
the significance of the parts of his name (even to the extent of
missing out the accentuation, as above\dots{}).
\Question[Q-bibtranscinit]{`Multi-letter' initials in \BibTeX{}}
\keywords{compound initials, transcribed initials}
If your bibliographic style uses initials~+ surname, you may encounter
a problem with some transcribed names (for example, Russian ones).
Consider the following example from the real world:
\begin{quote}
\begin{narrowversion}
\begin{verbatim}
@article{epifanov1997,
author = {Epifanov, S. Yu. and
Vigasin, A. A.},
title = ...
}
\end{verbatim}
\end{narrowversion}
\begin{wideversion}
\begin{verbatim}
@article{epifanov1997,
author = {Epifanov, S. Yu. and Vigasin, A. A.},
title = ...
}
\end{verbatim}
\end{wideversion}
\end{quote}
Note that the ``Yu'' is the initial, not a complete name. However,
\BibTeX{}'s algorithms will leave you with a citation~---
slightly depending on the bibliographic style~--- that reads:
``S. Y. Epifanov and A. A. Vigasin, \dots{}''. instead of the intended
``S. Yu. Epifanov and A. A. Vigasin, \dots{}''.
One solution is to replace each affected initial by a command that
prints the correct combination. To keep your bibliography portable,
you need to add that command to your bibliography with the
\texttt{@preamble} directive:
\begin{quote}
\begin{narrowversion}
\begin{verbatim}
@preamble{ {\providecommand{\BIBYu}{Yu} } }
@article{epifanov1997,
author = {Epifanov, S. {\BIBYu}. and
Vigasin, A. A.},
title = ...
}
\end{verbatim}
\end{narrowversion}
\begin{wideversion}
\begin{verbatim}
@preamble{ {\providecommand{\BIBYu}{Yu} } }
@article{epifanov1997,
author = {Epifanov, S. {\BIBYu}. and Vigasin, A. A.},
title = ...
}
\end{verbatim}
\end{wideversion}
\end{quote}
If you have many such commands, you may want to put them in a separate
file and \csx{input} that \LaTeX{} file in a \texttt{@preamble}
directive.
An alternative is to make the transcription look like an accent, from
\BibTeX{}'s point of view. For this we need a control sequence that
does nothing:
\begin{wideversion}
\begin{quote}
\begin{verbatim}
@article{epifanov1997,
author = {Epifanov, S. {\relax Yu}. and Vigasin, A. A.},
title = ...
}
\end{verbatim}
\end{quote}
\end{wideversion}
\begin{narrowversion}
\begin{quote}
\begin{verbatim}
@article{epifanov1997,
author = {Epifanov, S. {\relax Yu}. and
Vigasin, A. A.},
title = ...
}
\end{verbatim}
\end{quote}
\end{narrowversion}
Like the solution by generating extra commands, this involves tedious
extra typing; which of the two techniques is preferable for a given
bibliography will be determined by the names in it. It should be
noted that a preamble that introduces lots of odd commands is usually
undesirable if the bibliography is a shared one.
``Compound'' initials (for single names made up of two or more words)
may be treated in the same way, so one can enter Forster's rather
complicated name as:
\begin{wideversion}
\begin{quote}
\begin{verbatim}
@article{forster2006,
author = {Forster, P.M. {\relax de F.} and Collins, M.},
title = ...
\end{verbatim}
\end{quote}
\end{wideversion}
\begin{narrowversion}
\begin{quote}
\begin{verbatim}
@article{forster2006,
author = {Forster, P.M. {\relax de F.} and
Collins, M.},
title = ...
\end{verbatim}
\end{quote}
\end{narrowversion}
The same trick can be played if you're entering whole names:
\begin{quote}
\begin{verbatim}
...
author = {Epifanov, Sasha {\relax Yu}ri and
...
\end{verbatim}
\end{quote}
(though no guarantee, that either of those names is right, is
offered!)
However, if you're typing the names in the ``natural'' (Western) way,
with given names first, the trick:
\begin{quote}
\begin{verbatim}
...
author = {P.M. {\relax de F.} Forster and
...
\end{verbatim}
\end{quote}
doesn't work~--- ``de F. Forster'' is treated as a compound family
names.
\subsection{Creating citations}
\Question[Q-usebibtex]{``Normal'' use of \BibTeX{} from \LaTeX{}}
To create a bibliography for your document, you need to perform a
sequence of steps, some of which seem a bit odd. If you choose to use
\BibTeX{}, the sequence is:
First: you need a \BibTeX{} bibliography file (a \extension{bib}
file)~--- see \Qref*[question]{``creating a \BibTeX{} file''}{Q-buildbib}.
Second: you must write your \LaTeX{} document to include a declaration
of the `style' of bibliography, citations, and a reference to the
bibliography file mentioned above. So we may have a \LaTeX{}
file containing:
\begin{quote}
\begin{verbatim}
\bibliographystyle{plain}
...
Pooh is heroic~\cite{Milne:1926}.
...
Alice struggles~\cite{Carroll:1865}.
...
\bibliography{mybooks}
\end{verbatim}
\end{quote}
Note: we have bibliography style \Package{plain}, above, which is
nearly the simplest of the lot: a sample text, showing the sorts of
style choices available, can be found on Ken Turner's web site:
\URL{http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html}
Third: you must process the file.
\begin{quote}
\begin{verbatim}
latex myfile
\end{verbatim}
\end{quote}
As \LaTeX{} processes the file, the \csx{bibliographystyle} command
writes a note of the style to the \extension{aux} file; each
\csx{cite} command writes a note of the citation to the
\extension{aux} file, and the \csx{bibliography} command writes a note
of which \extension{bib} file is to be used, to the \extension{aux} file.
Note that, at this stage, \LaTeX{} isn't ``resolving'' any of the
citations: at every \csx{cite} command, \LaTeX{} will warn you of the
undefined citation, and when the document finishes, there will be a
further warning of undefined references.
%Some bibliography styles are designed to work with particular
%packages...
Fourth: you must run \BibTeX{}:
\begin{quote}
\begin{verbatim}
bibtex myfile
\end{verbatim}
\end{quote}
Don't try to tell \BibTeX{} anything but the file name: say
\texttt{bibtex myfile.aux} (because you know it's going to read the
\extension{aux} file) and \BibTeX{} will blindly attempt to process
\texttt{myfile.aux.aux}.
\BibTeX{} will scan the \extension{aux} file; it will find which bibliography
style it needs to use, and will ``compile'' that style; it will note
the citations; it will find which bibliography files it needs, and
will run through them matching citations to entries in the
bibliography; and finally it will sort the entries that have been
cited (if the bibliography style specifies that they should be
sorted), and outputs the resulting details to a \extension{bbl} file.
Fifth: you run \LaTeX{} again. It warns, again, that each citation is
(still) undefined, but when it gets to the \csx{bibliography} command,
it finds a \extension{bbl} file, and reads it. As it encounters each
\csx{bibitem} command in the file, it notes a definition of the
citation.
Sixth: you run \LaTeX{} yet again. This time, it finds values for all
the citations, in its \extension{aux} file. Other things being equal, you're
done\dots{} until you change the file.
If, while editing, you change any of the citations, or add new ones,
you need to go through the process above from steps 3 (first run of
\LaTeX{}) to 6, again, before the document is once again stable.
These four mandatory runs of \LaTeX{} make processing a document with
a bibliography even more tiresome than the normal two runs required to
resolve labels.
To summarise: processing to resolve citations requires: \LaTeX{};
\BibTeX{}; \LaTeX{}; \LaTeX{}.
\Question[Q-whatbst]{Choosing a bibliography style}
A large proportion of people are satisfied with one of Patashnik's
original ``standard'' styles, \Package{plain}, \Package{unsrt},
\Package{abbrv} and \Package{alpha}. However, no style in that set
supports the ``author-date'' citation style that is popular in many
fields; but there are a very large number of contributed styles
available, that \emph{do} support the format.
(Note that author-date styles arose because the simple and clear
citation style that \Package{plain} produces is so awkward in a
traditional manuscript preparation scenario. However, \TeX{}-based
document production does away with all those difficulties, leaving us
free once again to use the simple option.)
Fortunately, help is at hand, on the Web, with this problem:
\begin{itemize}
\item a sample text, showing the sorts of style choices available, can
be found on
\begin{narrowversion}
Ken Turner's web site:
\URL{http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html};
\end{narrowversion}
\begin{wideversion}
% ! line break
\href{http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html}{Ken Turner's web site};
\end{wideversion}
\item an excellent survey, that lists a huge variety of styles,
sorted into their nominal topics as well as providing a good range
of examples, is the Reed College % ! line break
\begin{narrowversion}
``Choosing a \BibTeX{} style''
(\URL{http://web.reed.edu/cis/help/LaTeX/bibtexstyles.html}).
\end{narrowversion}
\begin{wideversion}
% ! line break
``\href{http://web.reed.edu/cis/help/LaTeX/bibtexstyles.html}{Choosing a \BibTeX{} style}''.
\end{wideversion}
\end{itemize}
Of course, these pages don't cover everything; the problem the
inquisitive user faces, in fact, is to find what the various available
styles actually do. This is best achieved (if the links above don't
help) by using \Package{xampl.bib} from the \BibTeX{} documentation
distribution: one can get a pretty good feel for any style one has to
hand using this ``standard'' bibliography. For style
\Package{my-style.bst}, the simple \LaTeX{} document:
\begin{quote}
\begin{verbatim}
\documentclass{article}
\begin{document}
\bibliographystyle{my-style}
\nocite{*}
\bibliography{xampl}
\end{document}
\end{verbatim}
\end{quote}
will produce a representative sample of the citations the style will
produce. (Because \Package{xampl.bib} is so extreme in some of its
``examples'', the \BibTeX{} run will also give you an interesting
selection of \BibTeX{}'s error messages\dots{})
\begin{ctanrefs}
\item[xampl.bib]\CTANref{xampl-bib}
\end{ctanrefs}
\Question[Q-chapbib]{Separate bibliographies per chapter?}
A separate bibliography for each `chapter' of a document can be provided
with the package \Package{chapterbib} (which comes with a bunch of
other good bibliographic things). The package allows you a
different bibliography for each \csx{include}d file (i.e., despite the
package's name, the availability of bibliographies is related to the
component source files of the document rather than to the chapters that
logically structure the document).
The package \Package{bibunits} ties bibliographies to logical units
within the document: the package will deal with chapters and sections
(as defined by \LaTeX{} itself) and also defines a \environment{bibunit}
environment so that users can select their own structuring.
\Qref*{The \Package{biblatex} package}{Q-biblatex}, with
\ProgName{biber}, provides a similar facility; enclose the text for
which you want a local bibliography in a \environment{refsection}
environment, and place a \csx{printbibliography} command as the last
thing in that environment:
\begin{quote}
\begin{verbatim}
\begin{refsection}
\chapter{First chapter}
\section{Foo}
Some text \cite{this}
with citations \cite{that}.
\printbibliography
\end{refsection}
\end{verbatim}
\end{quote}
Then process with \LaTeX{} (of whatever flavour) and use
\ProgName{biber} to process the bibliography output. Note that
\csx{printbibliography} can take an optional argument
\pkgoption{heading=bib title} to provide the bibliography with a
(sub)section title.
\begin{ctanrefs}
\item[biber]\CTANref{biber}
\item[biblatex]\CTANref{biblatex}
\item[bibunits.sty]\CTANref{bibunits}
\item[chapterbib.sty]distributed as part of \CTANref{cite}[chapterbib]
\end{ctanrefs}
\LastEdit{2013-01-04}
\Question[Q-multbib]{Multiple bibliographies?}
If you're thinking of multiple bibliographies tied to some part of
your document (such as the chapters within the document), please see
\Qref[question]{bibliographies per chapter}{Q-chapbib}.
For more than one bibliography, there are three options.
The \Package{multibbl} package offers a very simple interface: you use
a command \csx{newbibliography} 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 \csx{bibliography} command itself also takes
a further extra argument that says what title to use for the resulting
section or chapter (i.e., it patches
\nothtml{\csx{refname} and \csx{bibname}~---}
\Qref{\csx{refname} and \csx{bibname}}{Q-fixnam}\nothtml{~---} in a
\Package{babel}-safe way). So one might write:
\begin{narrowversion}
\begin{quote}
\begin{verbatim}
\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}
\end{verbatim}
\end{quote}
\end{narrowversion}
\begin{wideversion}
\begin{quote}
\begin{verbatim}
\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}
\end{verbatim}
\end{quote}
\end{wideversion}
(Note that the optional argument of \csx{cite} appears \emph{before} the
new tag argument, and that the \csx{bibliography} commands may list
more than one \extension{bib} file~--- indeed all \csx{bibliography} commands
may list the same set of files.)
The \csx{bibliography} data goes into files whose names are
\meta{tag-name}\emph{.aux}, so you will need to run
\begin{quote}
\begin{verbatim}
bibtex bk
bibtex art
\end{verbatim}
\end{quote}
after the first run of \LaTeX{}, to get the citations in the correct
place.
The \Package{multibib} 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:
\begin{quote}
\begin{verbatim}
\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}
\end{verbatim}
\end{quote}
Again, as for \Package{multibbl}, any \csx{bibliography...} command may
scan any list of \extension{bib} files.
\BibTeX{} processing with \Package{multibib} is much like that with
\Package{multibbl}; with the above example, one needs:
\begin{quote}
\begin{verbatim}
bibtex bk
bibtex art
\end{verbatim}
\end{quote}
Note that, unlike \Package{multibbl}, \Package{multibib} allows a
simple, unmodified bibliography (as well as the ``topic'' ones).
The \Package{bibtopic} package allows you separately to cite several
different bibliographies. At the appropriate place in your document,
you put a sequence of \environment{btSect} environments (each of which
specifies a bibliography database to scan) to typeset the separate
bibliographies. Thus, one might have a file \File{diss.tex} containing:
\begin{quote}
\begin{verbatim}
\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}
\end{verbatim}
\end{quote}
Note the different way of specifying a bibliographystyle: if you want