A Generic Bibliographic Style File with Multilingual Applications

Patrick W. Daly

This paper describes file babel.mbs, version 2.4 from 1995/02/02

1 Introduction

This generic, or master, BibTEX style file is intended to be used with docstrip in order to produce actual .bst files. By selecting desired options, the output is customized to the particular requirements needed.

The file has been assembled from Oren Patashnik’s standard files plain.bst and unsrt.bst, plus his non-standard file apalike.bst. This last is an author-year citation style, although somewhat imperfect. I have added a number of other options and codings to produce the features that I deem necessary.

The file now contains the possibility of changing languages. All explicit words have been replaced by functions whose definitions may be altered in the resulting .bst file (less desirable method) or for which optional definitions may be added in the master file as a new language option (preferred method). Alternatively, one can select the ‘language’ named babel and then L^{A}TEX commands are inserted for the explicit words, the definitions of which must be contained in a file called babelbst.tex.

To produce a customized bibliographic style (.bst) file from this master file, simply TEX or L^{A}TEX the ‘program’ makebst.tex. When asked for the name of the master file, answer with

     babel.mbs

and then reply to the questions in the following menus. The last question is whether you want to generate the .bst file right away.

More details on this process and on the options available are to be found in the rest of this article.

2 About Master Bibliographic Style Files

2.1 The docstrip Options

This master file is a BibTEX bibliographic style file containing alternative coding depending on docstrip options. The options are selected when docstrip is run, either interactively or through a batch job.

Suppose that one of the options is called xyz. Then the following alternatives are possible:

%<xyz> one line of coding

includes the single line of coding;

%<!xyz> one line of coding

excludes the single line;

     %<*xyz>

several lines of coding

     %</xyz>

includes all the bracketted lines;

     %<*!xyz>

several lines of coding

     %</!xyz>

excludes all the bracketted lines.

Options may be logically combined: the symbol | is a logical or, & a logical and, ! a logical not; parentheses ( and ) may be used to group options.

2.2 The docstrip Batch Job

In order to generate a true BibTEX style file with selected options from this master file, it is necessary to run a docstrip batch job. Suppose that the master file is named master.mbs, and the resulting BibTEX style file is to be silly.bst, and the batch job file itself is called silly.dbj. To produce this with options, say, xyz and abc, the batch job would look something like:

      \def\batchfile{silly.dbj}
      \input docstrip

      \preamble
      This is for Journal of Silly Results
      \endpreamble
      \postamble
      End of customized bst file
      \endpostamble
      \keepsilent
      \generateFile{silly.bst}{f}{\from{master.mbs}{xyz,abc}}

A preamble is not necessary, although it is advisable to include some statement about the application of the bibliographic style. A postamble is vital, otherwise the default will add \endinput at the end of the file, something that BibTEX will not understand. The \keepsilent is optional and just suppresses docstrip output during processing.

2.3 The makebst Program

The program makebst simplifies the creation of the batch job file. To do that, it needs information on the available options. This information must be stored in a special format, either in the master file itself, or in a file with the same root name but extension .opt. The form of this format is described in the documentation on makebst.

In the master file, this information must be enclosed within docstrip options

%<*options> . . . %</options> and must include an \endoptions command.

It may also include any number of comments.

A sample menu in the master file to select one or none of options xyz or zyx would look thus:

      %<*options>
      \mes{Select one of these}
      \optdef{f}{xyz}{Option forword}{to do forward stuff}
      \optdef{r}{zyx}{Option reverse}{to do reverse stuff}
      \optdef{*}{}{None of the above}{}
      \getans
      \endoptions
      %</options>
      %<*!options>
      . . . . . .
      %</!options>

An explanation of these commands is to be found in the documentation on

makebst.

The menu information may be extracted from the master file by means of docstrip and stored in a file with extension .opt. If this file is missing, the program tries to read it from the master file. (I do not actually recommend doing this; the information should come from the true file and not from one that may have been edited)

3 Multilingual Adaptation

In the original .bst files from Oren Patashnik, there are explicit English words that are output into the final text. Since L^{A}TEX is increasingly being used for other languages, and since the official version since December 1991 also uses macros in place of explicit words, it seems appropriate for BibTEX to follow suit.

In this master bibliographic style file babel.mbs, all explicit words have been replaced by functions: e.g., the word ‘editor’ has become the function bbl.editor. Depending on the language option chosen, this function is defined to be the text "editor", "Redakteur", or "redacteur", for English, German, and French, respectively.

There is another special ‘language’ called babel that instead inserts the text "\bbleditor{}"; the definitions of these L^{A}TEX commands must be in a separate file named babelbst.tex that is read in at the start of the bibliography.

There are thus two ways of generating a .bst file for a given language:

1. Select one of the allowed docstrip language options (see page 9) or makebst language menu choices (page 15) for a .bst file that is valid for that language only.

2. Select the language babel and then edit the file babelbst.tex to contain the desired translations, whereby a number of languages might be included in it with switching according to some criterion.

I am uncertain as to which is the better method. With 1, the .bst file is complete on its own, but a different file must be generated for every language. This is probably necessary anyway since the bibliography style might be language dependent. Articles in English would have a different argument to the \bibliographystyle command from those in other languages. So what? Languages cannot really be switched so easily as an option in \documentstyle. The disadvantage is that the addition of further languages is somewhat complicated and the master file could grow to a very large size, slowing down the docstrip processing.

Method 2 produces a single .bst file for all languages, the differences appearing only in the file babelbst.tex. This makes it easier to add new languages. However, unless the user is working exclusively in one language, he will need some kind of switching method. Most language installations provide tests for the current language, and these would have to be built into

the babelbst.tex file.

3.1 Adding New Languages to the Master File

To add a new language to this master file, changes must be made at 6 places, all of which are marked with the text NEWLANGUAGE:. You only need to search for these and follow the instructions there, also looking at the existing languages as examples.

Let us suppose the language Newl is to be added with the docstrip option

name newlang.

1. Add an entry in the description of the options. This will appear as

         % \item[newlang]      the equivalent Newl words;

2. Add the option to the makebst language menu. This will be like

         \optdef{x}{newlang}{Newl}{}

where x stands for some unique letter within the menu.

3. Add a headline for the .bst file that states right at the start for which language it is intended.

         %<newlang> %                NEWL

4. Now for the hard part. Add all the translations for bbl.and etc. Follow the models shown. The addition should be something like

          % The Newl translations
          %    \begin{macrocode}
          %<*newlang>
           % The language selected is NEWL
          FUNCTION {bbl.and}
          { "ee"}
          . . . . . . . . . . . . . .
          FUNCTION {bbl.fifth}
          %<!ord>{ "Frotty" }
          %<ord>{ "5-y" }

          FUNCTION {bbl.th}
          { "-y" }
          %</newlang>
          %    \end{macrocode}

5. A similar addition is made for the names of the months.

6. There could be some problems with edition numbers due to language dependent ways of treating ordinal numbers (1st, 2nd, 3rd in English; 1^{re}, 2^{e}, 3^{e} in French; 1., 2., 3., in German). Some accommodation already exists for the oddball language English, and further hacking may be needed for others.

7. Finally, if there should be any need for a double-quote character in the translations (German needs it for umlauts) then there is trouble because the BibTEX strings do not allow it. Instead, use the command \qq, as in the German word F\qq{u}nfte for Fünfte (fifth). This command must then be defined for the source text, by adding its definition to the start of the .bbl file. The function begin.bib already includes this for the german option, which may be added in the same manner for other languages.

3.2 Changing babelbst.tex for New Languagues

If the above is too complex, then a new language can be added by modifying the file babelbst.tex and selecting the language babel for the .bst file. If this is the only language to be used, then just change the English words in the definitions.

However, some form of switching would be more desirable. With TEX version 3, there is a \language parameter to control the hyphenation patterns, and this could be used to select the correct language. For example, if language 0 is English and language 1 Newl, then put the English version of

babelbst.tex into englbst.tex and the Newl version in newlbst.tex.

Then babelbst.tex could contain:

      \ifcase\language \input{englbst} \or \input{newlbst}
        \else \input{newlbst} \fi

This is of course installation dependent.

3.3 A Compromise Method of Adding a Language

A third method is a mix between the above two and requires some hacking on the part of the user.

1. Make up a file like babelbst.tex for the new language, say newlbst.tex.

2. Generate a .bst file with the babel language option.

3. Go to the line near the end of the .bst file and replace

         \input{babelbst.tex} with \input{newlbst.tex}

The resulting .bst file is valid for one language only (as for method 1), and its name should reflect this.

3.4 Extracting Sample babelbst.tex Files

Language dependent definition files suitable to be used as babelbst.tex, or to be read in by it, are contained in this master file for English, German, and French. Extract them with docstrip and the options bblbst,english,

bblbst,german, and bblbst,french.

3.5 Problem with Edition Numbers

Something to note here is the ordinal numbers for editions. BibTEX demands that the field edition be given in the database as a word ‘First’, ‘Second’, etc., or as ‘1st’, ‘2nd’, etc. This is bad policy because it is language dependent. So what I do is to test for the words ‘first’ through ‘fifth’ (case independently) and replace them with language-dependent equivalents. If the <ord> option is selected, these equivalents are ordinal numbers for that language. Any other words cannot be interpreted and must be printed as is.

However, if the edition is given as a number, with or without following letters, then the numbers 1 through 5 are replaced by their words; any higher numbers just have the ordinal ending (‘th’ in English) added to them.

These numbers are only used with the word ‘edition’ or its equivalent in other languages, so the translators need to provide only the one gender, e.g., feminine for both German and French.

4 The Options

Here I present a list of all the docstrip options that are available in this file babel.mbs. The normal user can skip this section since he will probably make use of the menus via makebst. These are described in Section 5. The menus provide much more informative prompts than the heavily abbreviated option names listed here. In other words, the options described in this section are meant for internal (programmer) usage, while the normal interface for the user is the menus.

I have tried to avoid conflicts with mutually exclusive options by always letting one dominate. For example, if a and b are to be mutually exclusive, then the three possibilities are:

      neither %<!a&!b>
      a only %<a>
      b only %<!a&b>

so that if both a and b have been selected, the result is as if only a had been given. (If one uses makebst to produce the docstrip batch job, then it is impossible to give mutually exclusive options.)

Most mutually exclusive options have the same prefix before the hyphen.

Citation style: whether or not a numerical or author-year system is to be used.

-- default is numerical, standard L^{A}TEX, as for plain.bst.

            \bibitem{key}...

cite special for listing entire databases; the cite key is used as the label so it may be listed.

            \bibitem[key]{key}...

ay for author-year style of citations. Various forms of \bibitem are provided under this option, to support different types of L^{A}TEX styles for interfacing with the author-year system.

If ay has been selected, then the type of author-year interface is selectable. Some of these, like natbib and harvard exist in two versions because of updates in these systems.

-- default is the system I invented for my natbib.sty.

            \bibitem[author(year)]{key}...

nat for extended format of natbib.sty version 5.3

            \bibitem[author(year)full author]{key}...

alk for the apalike.sty of Oren Patashnik and related systems

            \bibitem[author, year]{key}...

har for the Harvard family of styles (with harvard.sty).

            \harvarditem[short]{long}{year}{key}...

harnm for the extended Harvard family, containing some extra commands used by L^{A}TEX 2ε version 2.0.3 of harvard.sty

ast for astronomy family of styles (with astron.sty).

            \bibitem[\protect\astroncite{author}{year}]{key}...

cay for the Chicago family of styles (with chicago.sty).

            \bibitem[\protect\citeauthoryear{long}{short}{year}]{key}...

cn for the “author-date” group of styles (with authordate1-4.sty)

            \bibitem[\protect\citename{author, }year]{key}...

Sequence: the order in which the references are listed. -- default is alphabetical by all authors, date, title seq-no (numerical only) sequence by citation order seq-lab (author-year) by label, date, title (means that Daly precedes

Daly and Williams, precedes Daly et al.)

Language selection: the translations of certain explicit words. english English, for ‘and’, ‘chapter’, ‘editor’, etc’; german the equivalent German words; french the equivalent French words; espo the equivalent Esperanto words; babel replace words with L^{A}TEX commands that are defined in the

            file babelbst.tex;

?? whatever other languages have been added.

Warning: There is no default language! One of the above options must be given.

Names formatting: how initials and surnames are to be combined. -- default is full names, given names first nm-init initials plus surname nm-rev surname plus initials nm-rev1 surname plus initials (1st name only) then initials plus sur-

name

nm-rv as nm-rev, but initials without dots ed-rev editors’ names are reversed the same as authors’ Number of names: normally all names listed (in reference list) nmlm limit number of names x1...x9 (with nmlm) maximum number of names to appear m1...m5 (with nmlm) minimum number before ‘et al’ written; no check

for consistency is taken; one x and one m number must be given, and x≤m

Names font: in the reference list -- default is names in normal type face nmft-sc names in small caps nmft-it names in italics nmft-bf names in bold Block punctuation: between logical sections (not mutually exclusive) -- default is period after each logical section, including end blk-com use commas, except at very end (changes ‘In’ to ‘in’) blk-tit use commas, except after a title and very end in-blk when commas used between blocks, starts sentence after art-

icle title when followed by “In: … ”

in-col puts a colon after ‘In’ or ‘in’ for edited works fin-bare no punctuation at the very end Date: position and enclosure -- default is date at end, before notes; for author-year, date

consists only of year, no month

dt-beg date goes after authors’ names dt-end date goes after any notes yr-par no month, year in parentheses () yr-brk no month, year in brackets [] yr-col no month, year preceded by colon and space yr-per year preceded by period and space yr-blk year preceded by space note-yr permits text (like “in press”) in the year field Article in journal: style of title, volume, pages -- default is: Title. Journal, vol(num):p1–p2 volp-sp as above, but with a space, vol(num): p1–p2 vol-bf volume in bold vol-it volume in italics vol-2bf volume and number bold volp-com comma and space instead of colon: vol(num), p1–p2 vnum-x no number for journals, only volume vnum-s replace vol(num) with vol, num vnum-nr replace vol(num) with vol, no. num vnum-h replace vol(num) with vol, #num jpg-1 only starting page given jnm-x no punctuation after journal name tit-it article title in italics tit-q article title in single quotes tit-qq article title in double quotes jtit-x no article title (applies only to journals and collections) atit-u article title capitalized as in entry, default is sentence capit-

alization (first word and words following colons)

Thesis title: formatted like a book or article -- default is like a book title thtit-a titles of PhD and Master theses formatted like articles Book title: font style -- default is italicized btit-rm book title plain Abbreviations: of various words, default is no abbreviations pp abbreviate ‘page(s)’ as ‘p.’ and ‘pp.’ ed abbreviate ‘editor(s)’ as ‘ed.’ and ‘eds.’ abr abbreviate ‘volume’, ‘edition’, ‘technical report’, etc. ord write edition numbers as 1st, 2nd, instead as words. Editor: alternative for in edited work -- in names, editors, title edby in title, edited by names edby-par in title (Edited by names) Citation label: what is written by the \cite command -- default is no special font lab-it label (names printed by \cite) in italics xlab-it extra label (letter after year) in italics Emphasis: defines what ‘italicized’ really means -- default is \em (can switch between \it and \rm em-it use \it instead (always italic) em-x no emphasis Special punctuation: amper use & in place of ‘and’ and-xcom no comma before last ‘and’ of an author list (citations and

references)

and-com add comma before ‘and’ even for two authors (in list of ref-

erences)

xand no ‘and’ in an author list (references) etal-it ‘et al.’ in italics

Font commands:

-- use L^{A}TEX 2.09 font commands

 nfss  use \textbf, \textit, \emph in place of \bf, \it, and \em;

only works then with L^{A}TEX 2ε

5 The Menu Information

Here I describe the options and menu information for this particular master file babel.mbs. To construct a docstrip driver file to generate a desired .bst file, simply process makebst.tex with TEX or L^{A}TEX, and give

     babel.mbs

when prompted for the name of the master file. Then answer the questions in the menus that follow. The menu information is extracted from here.

All this menu information is nested between docstrip guard options %<*options> … %</options>, and the last command is \endoptions. The rest of the file is nested between %<*!options> … %</!options> in order to exclude it if docstrip is used to extract only the menu information.

Author-year or numerical

The first question is whether a numerical or author-year citation style is to be used. If the latter, the supporting system is my natbib.sty, which expects \bibitem to have an optional argument containing the short form of the authors, plus year in parentheses. E.g.,

     \bibitem[Daly et al.(1990)]{key}...

There is now a newer version of natbib.sty (v5.3) that supports an optional full author list too, as

     \bibitem[Daly et al.(1990)Daly, Keppler, and Williams]{key}...

Other systems are also supported, such as the Harvard family of bibliography styles (with harvard.sty), which have entries in the form

     \harvarditem[Daly et al.]{Daly, Keppler,
            and Williams}{1990}{key}...

or the astronomy family (with astron.sty) with entries like

     \bibitem[\protect\astroncite{Daly et al.}{1990}]{key}...

or the Chicago family (with chicago.sty) with entries like

     \bibitem[\protect\citeautheryear{Daly, Keppler, and
           Williams}{Daly et al.}{1990}]{key}...

or the so-called “author-date” group (with authordate1-4.sty) with entries of the form

     \bibitem[\protect\citename{Daly et al.}1990]{key}...

Finally, there is the apalike format of Oren Patashnik, for use with apalike.sty that has entries of the form

     \bibitem[Daly et al., 1990]{key}...

In addition to numerical or author-year citation styles, there is also a cite style available in which the label is the same as the cite key. This is for listing entire contents of databases with the cite key visible.

A flag \ifnumerical is established because some of the following menu features depend on which system is to be used.

1 ⟨∗options⟩

 2 \newif\ifnumerical \numericalfalse
 3 \newif\ifmytemp\mytempfalse
 4 \mes{^^JSTYLE OF CITATIONS:}
 5 \optdef{*}{}{Numerical}{as in standard LaTeX}
 6 \optdef{a}{ay}{Author-year}{with some non-standard interface}
 7 \optdef{c}{cite}{Cite key}{(special for listing contents of bib file)}
 8 \getans
 9 \numericaltrue
10 \if\ans a\numericalfalse\fi

11

12 \ifnumerical\else
13 \mes{^^JAUTHOR-YEAR SUPPORT SYSTEM:}
14 \optdef{*}{}{Natbib}{for use with natbib.sty}
15 \optdef{l}{alk}{Apalike}{for use with apalike.sty}
16 \optdef{h}{har}{Harvard}{system with harvard.sty}
17 \optdef{a}{ast}{Astronomy}{system with astron.sty}
18 \optdef{c}{cay}{Chicago}{system with chicago.sty}
19 \optdef{d}{cn}{Author-date}{system with authordate1-4.sty}
20 \getans

The harvard family has been extended for L^{A}TEX 2ε, and the new .bst files allow the word ‘and’ and the brackets around years to be variable with commands. A URL entry is added, for the on-line network reference. These features may be added too.

22 \if\ans h%
23 \mes{^^JHARVARD EXTENSIONS INCLUDED:}
24 \optdef{*}{harnm}{With Harvard extensions}{for LaTeX2e version of harvard.sty}
25 \optdef{n}{}{Older Harvard}{style, for LaTeX 2.09}
26 \getans\fi
27 \fi

28

Ordering of the listed references

Choices here depend on citation style. The default in both cases is alphabetical order of all authors. For numerical style, one may also choose an unsorted order, which means the order the same as the original citations. This corresponds to unsrt.bst.

For author-year, the second choice is by label. (The label is the optional \bibitem argument, and is what is printed in place of the \cite command.) With this option, all the papers with the same first author are ordered so that the one-author papers come first, followed by the two-author papers, followed by the multiple-author papers. This is a more sensible system for author-year citations, and is demanded by some journals (like JGR).

29 \ifnumerical
30 \mes{^^JORDERING OF REFERENCES:}
31 \optdef{*}{}{Alphabetical}{by all authors}
32 \optdef{c}{seq-no}{Citation order}{(unsorted, like unsrt.bst)}
33 \getans
34 \else
35 \mes{^^JORDERING OF REFERENCES:}
36 \optdef{*}{}{Alphabetical}{by all authors}
37 \optdef{l}{seq-lab}{By label}%
38 {(Jones before Jones and James before Jones et al)}
39 \getans
40 \fi

41

Selecting Language

16 P. W. Daly

Explicit words in the bibliography style, such as ‘and’, ‘editor’, etc., are represented by functions bbl.and, bbl.editor, and so on. By default these functions translate to the normal English text, but other languages are also possible. All the definitions of these functions are kept together to simplify the addition of further languages, or to allow someone to hack the .bst file for another language.

42 \mes{^^JLANGUAGE:}
43 \optdef{*}{english}{English}{}
44 \optdef{b}{babel}{Babel}{, word definitions to be found in babelbst.tex}
45 \optdef{g}{german}{German}{}
46 \optdef{f}{french}{French}{}
47 \optdef{e}{espo}{Esperanto}{}
48 \getans

49

Formatting author names

The default is that the full names of the authors are listed, given names first, unabbreviated. Of course, if only the initials have been given in the .bib file, then that is all that can appear in the list. Other possibilities are to use initials (even if full names in the .bib file) either before or after the surnames. A specialty of the journals of the American Geophysical Union is to have only the first name with reversed initials.

If the reference is part of a larger work with editors, then the editor names appear later in the reference text, usually as “edited by … ” or as “names (editors)”. In these cases, the editor names are not usually reversed (surname first) even if the authors’ names are. An option is provided to format such editor names exactly as the authors’.

50 \mes{^^JAUTHOR NAMES:}
51 \optdef{*}{}{Full, surname last}{(John Frederick Smith)}
52 \optdef{i}{nm-init}{Initials + surname}{(J. J. Smith)}
53 \optdef{r}{nm-rev}{Surname + initials}{(Smith, J. J.)}
54 \optdef{s}{nm-rv}{Surname + dotless initials}{(Smith J J)}
55 \optdef{a}{nm-rev1}{Only first name reversed}%
56 {(AGU style: Smith, J. J., H. K. Jones)}
57 \getans

58

59 \mytempfalse
60 \if\ans r\mytemptrue\fi
61 \if\ans s\mytemptrue\fi
62 \if\ans a\mytemptrue\fi
63 \ifmytemp
64 \mes{^^JEDITOR NAMES IN COLLECTIONS:}
65 \if\ans r
66 \optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
67 \fi
68 \if\ans s
69 \optdef{*}{}{Editor names NOT reversed}{as edited by J J Smith}
70 \fi

Generic Multilingual Bibliography Style 17

71 \if\ans a
72 \optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
73 \fi
74 \optdef{r}{ed-rev}{Editor names reversed}{just like authors'}
75 \getans
76 \fi

Number of authors

Normally the complete list of authors as given in the .bib file are presented in the reference list. However, some journals prefer to limit them to a maximum. If there are more than this maximum number of author names, then a minimum number plus ‘et al.’ are listed.

Because no test for consistency of the numbers is carried out in the .bst file itself (it might be possible, but I found it too complex), this is done here.

77 \mes{^^JNUMBER OF AUTHORS:}
78 \optdef{*}{}{All authors}{included in listing}
79 \optdef{l}{nmlm}{Limited authors}{(et al replaces missing names)}
80 \getans
81 \if\ans l
82 \loop
83 \ask{\num}{Maximum number of authors (1-9)}
84 \ifnum\num>9
85 \mes{*** Must be between 1 and 9}
86 \repeat
87 \wr{\spsp\spsp\sep x\num\pc: Maximum of \num\space authors}
88 \mes{\spsp You have selected maximum \num\space authors}
89 \ifnum\num>5\def\numx{5}\else\edef\numx{\num}\fi
90 \loop
91 \ask{\num}{Minimum number (before et al given) (1-\numx)}
92 \ifnum\num>\numx
93 \mes{*** Must be between 1 and \numx}
94 \repeat
95 \wr{\spsp\spsp\sep m\num\pc: Minimum of \num\space authors}
96 \mes{\spsp You have selected minimum \num\space authors}
97 \fi

98

Type face of names

The author names in the list of references normally appear in the current type face. This may be changed to small caps, bold, or italics.

99 \mes{^^JTYPEFACE FOR AUTHORS:}
100 \optdef{*}{}{Normal font for authors}{}
101 \optdef{s}{nmft-sc}{Small caps authors}{(\string\sc)}

102 \optdef{i}{nmft-it}{Italic authors}{(\string\it\space or \string\em)}
103 \optdef{b}{nmft-bf}{Bold authors}{(\string\bf)}
104 \getans

105

Position of date

This applies to author-year style only. It makes sense to put the date immediately after the author list, since the two items (author and year) are the identifiers of the reference. Default position is at the end of the references, before any notes. It is also possible to place it even after the notes.

106 \mes{^^JDATE POSITION:}
107 \optdef{*}{}{Date at end}{}
108 \optdef{b}{dt-beg}{Date after authors}{}
109 \optdef{e}{dt-end}{Date at very end}{after any notes}
110 \getans

111

112 \if\ans b\mytemptrue\else\mytempfalse\fi

Format of date

The year may be enclosed in parentheses, brackets, or preceded by a colon. If none of these are selected, the date (month plus year) appears. For authoryear, the date always consists only of the year, no month.

If the date is to go inside parentheses or brackets, and it is just after the authors, then one might want to suppress the following punctuation.

113 \ifnumerical
114 \mes{^^JDATE FORMAT:}
115 \optdef{*}{}{Month and year}{without any brackets}
116 \optdef{p}{yr-par}{Date in parentheses}{as (May 1993)}
117 \optdef{b}{yr-brk}{Date in brackets}{as [May 1993]}
118 \optdef{c}{yr-col}{Date preceded by colon}{as `: May 1993'}
119 \optdef{d}{yr-per}{Date preceded by period}{as `. May 1993'}
120 \optdef{s}{yr-blk}{Date preceded by space}{only, as ` May 1993'}
121 \else
122 \mes{^^JDATE FORMAT:^^J(no months for author-year)}
123 \optdef{*}{}{Year plain}{without any brackets}
124 \optdef{p}{yr-par}{Year in parentheses}{as (1993)}
125 \optdef{b}{yr-brk}{Year in brackets}{as [1993]}
126 \optdef{c}{yr-col}{Year preceded by colon}{as `: 1993'}
127 \optdef{d}{yr-per}{Year preceded by period}{as `. 1993'}
128 \optdef{s}{yr-blk}{Year preceded by space}{only, as ` 1993'}
129 \fi
130 \getans

132 \if\ans p\else\if\ans b\else\mytempfalse\fi\fi
133 \ifmytemp
134 \mes{^^JDATE PUNCTUATION:}
135 \optdef{*}{}{Date with punctuation}{(comma or period)}
136 \optdef{x}{yrp-x}{No punct. after date}{}
137 \getans
138 \fi

Normally in author-year citations, the year entry is truncated to the last 4 characters, which should be the 4 digits of the year. Some users have requested the possibility of suppressing this truncation so that they may put text in the year field, such as “in press.”

139 \ifnumerical\else
140 \mes{^^JTRUNCATE YEAR:}
141 \optdef{*}{}{Year truncated}{to last 4 digits}
142 \optdef{t}{note-yr}{Year text full}{to allow text in place of digits}
143 \getans
144 \fi

145

Article title in journal

The title of an article in a journal or in a collection (a book, or conference proceedings) may appear plain, in italics, within single or double quotes.

Furthermore, it may have sentence capitalization (first word and word following colon) or be capitalized as in the .bib file entry. That is why it is recommended to capitalize the entry text as it should appear when fully capitalized, putting words that are always capitalized in braces. Example:

     TITLE="The Results of the {Giotto} Mission"

which produces either “The results of the Giotto mission” or “The Results of the Giotto Mission”, depending on option.

Additionally, the article titles may be fully suppressed.

146 \mes{^^JTITLE OF ARTICLE:}
147 \optdef{*}{}{Title plain}{with no special font}
148 \optdef{i}{tit-it}{Title italic}{(\string\em)}
149 \optdef{q}{tit-q}{Title in single quotes}{(`Title')}
150 \optdef{d}{tit-qq}{Title in double quotes}{(``Title'')}
151 \getans

152

153 \mes{^^JCAPITALIZATION OF ARTICLE TITLE:}
154 \optdef{*}{}{Sentence style}{(first word and those in braces)}
155 \optdef{t}{atit-u}{Title style}{(just as in bib entry)}
156 \getans

157

158 \mes{^^JARTICLE TITLE PRESENT:}
159 \optdef{*}{}{Article title present}{in journals and proceedings}
160 \optdef{x}{jtit-x}{No article title}{}
161 \getans

162

Title of Theses

The title of a these (PhD or Master’s) is normally treated the same as that of a book. Optionally, it may be formatted like that of an article.

163 \mes{^^JTHESIS TITLE:}
164 \optdef{*}{}{Thesis titles like books}{}
165 \optdef{a}{thtit-a}{Thesis title like article}{}
166 \getans

167

Journal reference

Great diversity of opinion exists as to how a journal reference is to be formatted. It consists of a volume, possibly a number, and page limits. The number is really only necessary if the page numbers within one volume start at 1 for each physical ‘number’. Since journals are often bound together in one volume later, it makes more sense to number the pages continuously through the whole volume. However, this is not always so, and then the ‘number’ is necessary for the full specification.

A number of styles for journal specifications are

21(2):33–55 21(2):33–55 21 (2), 33–55

Here both start and stop page numbers have been given; often only the start page is wanted.

168 \mes{^^JJOURNAL VOLUME NUMBER:}
169 \optdef{*}{}{Volume plain}{as vol(num)}
170 \optdef{i}{vol-it}{Volume italic}{as {\string\em\space vol}(num)}
171 \optdef{b}{vol-bf}{Volume bold}{as {\string\bf\space vol}(num)}
172 \optdef{d}{vol-2bf}{Volume and number bold}{as {\string\bf\space vol(num)}}
173 \getans

174

The form of the ‘number’ is also given: in parentheses, with ‘no.’, with #, or omitted.

175 \mes{^^JJOURNAL VOL AND NUMBER:}
176 \optdef{*}{}{Journal vol(num)}{as 34(2)}
177 \optdef{n}{vnum-nr}{Journal vol, no. num}{as 34, no. 2}
178 \optdef{h}{vnum-h}{Journal vol, \string\# number}{as 34, \string\#2}
179 \optdef{s}{vnum-s}{Journal vol, num}{as 34, 2}
180 \optdef{x}{vnum-x}{Journal vol, no number}{as 34}
181 \getans

182

It is possible to decide whether the journal name should be separated from the following specifications with a blank or comma.

183 \mes{^^JVOLUME PUNCTUATION:}
184 \optdef{*}{}{Volume with colon}{as vol(num):ppp}
185 \optdef{s}{volp-sp}{Volume with colon and space}{as vol(num): ppp}
186 \optdef{c}{volp-com}{Volume with comma}{as vol(num), ppp}
187 \getans

188

189 \mes{^^JPAGE NUMBERS:}
190 \optdef{*}{}{Start and stop page numbers}{given}
191 \optdef{f}{jpg-1}{Only start page number}{}
192 \getans

193

194 \mes{^^JJOURNAL NAME PUNCTUATION:}
195 \optdef{*}{}{Comma after journal}{name}
196 \optdef{x}{jnm-x}{Space after journal}{name}
197 \getans

198

Book title

The title of a book (as opposed to an article in a book or journal) is normally italicized. This may be set to the regular font.

199 \mes{^^JBOOK TITLE:}
200 \optdef{*}{}{Book title italic}{(\string\em)}
201 \optdef{p}{btit-rm}{Book title plain}{(no font command)}
202 \getans

203

Edited by

For an article within an edited collection, the normal form is

In J. K. James, editor, Title of Collection …

An alternative is the form

In Title of Collection, edited by J. K. James …

204 \mes{^^JEDITOR STYLE:}
205 \optdef{*}{}{Word editor}{after name of editor}
206 \optdef{b}{edby}{Edited by}{before name of editor}
207 \optdef{p}{edby-par}{`(Edited by..)'}{editor(s) in parentheses}
208 \getans

209

Block punctuation

Blocks are logical sections of the reference specification, such as the author block, the journal block, editor block, etc. These are normally separated by periods, but alternatively a comma may be used. Another choice is to use commas except after titles where a period is given. In this case, one might also want the title of a work in a collection to be followed by a period.

210 \mes{^^JPUNCTUATION BETWEEN SECTIONS (BLOCKS):}
211 \optdef{*}{}{Period after blocks}{of authors, title, etc}
212 \optdef{c}{blk-com}{Comma after blocks}{}
213 \optdef{t}{blk-tit}{Only titles with period}{but other blocks commas}
214 \getans

215

216 \mytempfalse
217 \if\ans c\mytemptrue\fi
218 \if\ans t\mytemptrue\fi
219 \ifmytemp
220 \mes{^^JPUNCTUATION AFTER TITLE OF INCOLLECTION:}
221 \optdef{*}{}{Comma after title in collection}{as Title, in:...}
222 \optdef{p}{in-blk}{Period after title in collection}{as Title. In:...}
223 \getans
224 \fi

‘In’ with colon

When referring to works in a collection, one begins the block describing that collection with ‘In’. Optionally, one may add a colon.

225 \mes{^^JPUNCTUATION AFTER `IN':}
226 \optdef{*}{}{Space after `in'}{for editted works or proceedings}
227 \optdef{c}{in-col}{Colon after `in'}{(as `In: ...')}
228 \getans

Final punctuation

The punctuation at the end of the reference is normally a period. This may be suppressed.

230 \mes{^^JFINAL PUNCTUATION:}
231 \optdef{*}{}{Period at very end}{of the listed reference}
232 \optdef{x}{fin-bare}{No period at end}{}
233 \getans

234

Abbreviations

A number of words may be abbreviated: pages, editors, volume, chapter, and so on. The first two may be independently set to abbreviation, the rest with a single option.

Additionally, the edition numbers may be output as words (first, second, etc.) or as numbers (1st, 2nd, etc.). (Recall that the input in the .bib file is always as English words.)

235 \mes{^^JABBREVIATE WORD `PAGES':}
236 \optdef{*}{}{`Page(s)'}{(no abbreviation)}
237 \optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
238 \getans

239

240 \mes{^^JABBREVIATE WORD `EDITORS':}
241 \optdef{*}{}{`Editor(s)'}{(no abbreviation)}
242 \optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
243 \getans

244

245 \mes{^^JOTHER ABBREVIATIONS:}
246 \optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
247 \optdef{a}{abr}{Abbreviations}{of such words}
248 \getans

249

250 \mes{^^JEDITION NUMBERS:}
251 \optdef{*}{}{Write out editions}{as first, second, third, etc}
252 \optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
253 \getans

254

Citation label

This applies to author-year style only. The label is the text written by the \cite command, and for author-year style, this is something like ‘Daly et al. (1990b)’. One may select italics for the authors and for the extra label attached to the year. The year always remains plain.

It is not possible to select the type of brackets for the year, since this is determined by the L^{A}TEX style option that manages the author-year citations. This is not standard L^{A}TEX, so that there are a number of private style files for achieving this.

255 \ifnumerical\else
256 \mes{^^JFONT OF CITATION LABEL:}
257 \optdef{*}{}{Cited authors plain}{as result of \string\cite\space command}
258 \optdef{i}{lab-it}{Cited authors italic}{}
259 \getans

260

261 \mes{^^JFONT OF EXTRA LABEL:^^J(The extra letter on the year)}
262 \optdef{*}{}{Extra label plain}{}
263 \optdef{i}{xlab-it}{Extra label italic}{}
264 \getans
265 \fi

266

Variations on ‘and’

It is possible to replace the word ‘and’ with an ampersand &, and to specify whether a comma is to precede ‘and’ in a list of more than two names.

267 \mes{^^JAMPERSAND:}
268 \optdef{*}{}{Use word `and'}{in author lists}
269 \optdef{a}{amper}{Use ampersand}{in place of `and'}
270 \getans

271

272 \mes{^^JCOMMA BEFORE `AND':}
273 \optdef{*}{}{Comma before `and'}{as `Tom, Dick, and Harry'}
274 \optdef{n}{and-xcom}{No comma before `and'}{as `Tom, Dick and Harry'}
275 \optdef{c}{and-com}{Comma with 2 authors}{as `Tom, and Harry'}
276 \getans

277

278 \mes{^^JNO `AND' IN REFERENCE LIST:}
279 \optdef{*}{}{With `and'}{before last author in reference list}
280 \optdef{x}{xand}{No `and'}{as `Tom, Dick, Harry'}
281 \getans

282

Font of ‘et al’

One can chose that ‘et al.’ be put into italics.

283 \mes{^^JFONT OF `ET AL':}
284 \optdef{*}{}{Plain et al}{}
285 \optdef{i}{etal-it}{Italic et al}{}
286 \getans

Change History 25

287

Define emphasis

In everything that been mentioned so far, italicization should be understood to mean ‘emphasize’ in the L^{A}TEX sense. This means that the command \em is used. This is not the same as \it, which is always italics. Rather, with \em, the font style switches between \rm and \it depending on the context. Here one may choose to true italics, or to switch off italics altogether.

288 \mes{^^JEMPHASIS:^^J(affects all so-called italics)}
289 \optdef{*}{}{Use emphasis}{ie, \string\em, allows font switching}
290 \optdef{i}{em-it}{Use true italics}{ie, \string\it, absolute italics}
291 \optdef{x}{em-x}{No italics}{at all}
292 \getans

293

New Font Selection Scheme

Bold face, italics, and emphasis are made with the L^{A}TEX 2.09 commands. This makes them compatible with L^{A}TEX 2ε as well, but it is possible that in future they might die out. Also, they might not be provided with future classes. Allow an option to use the New Font Selection Scheme (NFSS) font commands in L^{A}TEX 2ε. If this option is taken, then the .bst file may only be used with L^{A}TEX 2ε.

294 \mes{^^JNEW FONT SELECTION SCHEME:}
295 \optdef{*}{}{No NFSS}{use 2.09 font commands}
296 \optdef{n}{nfss}{NFSS}{use \string\textbf, \string\emph, not \string\bf,
297  \string\em}
298 \getans
299 \endoptions

300 ⟨/options⟩

Change History

1.0

"General": Initial version …. 1 2.0

"General": Add multilingual

capabilities . . . . . . . . . . . . . 1 2.1

"General": Change documentation to L^{A}TEX 2ε . . . . . . . . . 1 2.1a

"General": Alter wording of article title capitalization choice 1

2.2

"General": Add full author name possibilities . . . . . . . . . . . . . 1

Fix up some punctuations … 1

26 Change History

2.2a

"General": Add possibility to

put titles in quotes . . . . . . . 1 2.3

"General": Accommodate new harvard.sty . . . . . . . . . . . 1 Add full names for natbib v5.3 1

2.3a

"General": Add option so year

can contain any text . . . . . . 1 2.3b

"General": Allow (year) to have no punctuation following … 1 Allow edited by to be in parentheses . . . . . . . . . . . . . . . . . 1

2.3c

"General": Journal volume num-

bers with more choice . . . . . 1 2.4

"General": Can abbreviate ‘edited by’ to ‘ed(s).’ . . . . . . . . 1 Date with no punctuation preceding it . . . . . . . . . . . . . . . 1 Editor names can be reversed like authors’ . . . . . . . . . . . . 1 Released version . . . . . . . . . . 1