A Master Bibliographic Style File for numerical, author–year, multilingual applications

Patrick W. Daly

This paper describes file merlin.mbs, version 3.8 from 1996/05/29

1 Introduction

A problem facing users of BibTEX is that there is no standard for formatting lists of references. Publishers and journals insist on completely arbitrary placement of commas, colons, and ordering of entries. Furthermore, author–year styles of citations are supported by certain special L^{A}TEX packages, but each for only a very limited number of bibliographic styles. Finally, most such style files are for English only, and any adaptations to other languages must duplicate the entire spectrum of such files.

All of these obstacles are in principle easily overcome by simply reprogramming BibTEX by means of an appropriate bibliographic style file (extension .bst). BibTEX is in fact extremely flexible; unfortunately its programming language is very low-level, permitting only the most basic of hacks for the normal user.

The solution to this is a generic or master bibliographic style file (extension .mbs) containing docstrip options for alternative coding. By selecting the desired options, one can customize a .bst file to one’s needs.

This file, merlin.mbs, is my latest version of a general-purpose .mbs file to meet as many bibliographic needs as possible. It was originally assembled from Oren Patashnik’s standard files plain.bst and unsrt.bst, plus his non-standard file apalike.bst, a very basic author–year citation style. It has since evolved extensively as I have added features found in available .bst files, and those demanded by publishers or suggested to me by many user/contributors.

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

     merlin.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 History of this File

Since the first release of this generic file, in November 1993, under the name genbst.mbs, I have received innumerable suggestions for additions, most of which I have tried to include. Often this has resulted in reorganizing the coding, and adding new functions. The resulting .bst files are now quite different from those of Patashnik, although the underlying ideas are the same.

A second version was released shortly afterwards that paralleled the first one except that it included support for languages other than English. That file was named babel.mbs, following the babel system of Johannes Braams. Although I always viewed it as version 2 of genbst.mbs, all additions to the one were also included in the other. This of course was tedious and prone to error. I looked forward to the day when babel.mbs would become the only supported version. The reason I was reluctant to do that before was that the overhead per language was fairly high, and I dreaded to think how large the file would become when 20 or 30 languages were added.

I have now found a way to put the language definitions into separate files, one per language. This means that new languages do not burden the basic file, and that users need only keep those support files that might interest him or her. New ones may also be made up locally by hacking an existing language definition file. (The file english.mbs is supplied only for this purpose.)

For this reason, merlin.mbs is released as version 3 of genbst.mbs and babel.mbs. In spite of the new name, it should be regarded as their direct successor. Needless to say, this means that the earlier two .mbs files will no longer be maintained.

To include language support, all explicit English words like editor and chapter have been replaced by functions whose definitions may be altered in the resulting .bst file (less desirable method) or which may be redefined by an external language definition file (preferred method). Alternatively, one can select the pseudo-language named babel which inserts L^{A}TEX commands for the explicit words, the definitions of which must be contained in a file called babelbst.tex. Only the languages English and babel are included internally to merlin.mbs; all others are contained in external language definition files.

Another new feature is the possibility of including a file containing prestored shorthand designations for certain journal names. Such a file is provided for physics journals, but others could be made up using this one as a model. See Section 5.

To take advantage of these external files, one must use makebst version 3; merlin.mbs may still be used with earlier versions, but without the external files.

This file is now named after the legendary magician in the hope that it can produce wonders by incanting the right magic formulas. However, one should bear in mind that even Merlin was not omnipotent. It would be too much to hope that all bibliographic wishes will be fulfilled quickly and easily, but we shall try as best we can. Watch the wizardry at work!

3 About Master Bibliographic Style Files

For details about how master bibliography style files are to be constructed, see the documentation on makebst. Here only a rough overview is given.

3.1 The docstrip Program

The docstrip program, written by Frank Mittelbach, is now a fundamental part of the L^{A}TEX 2ε installation. Its original purpose is to remove comment lines from documented files, but has the secondary function of selecting alternative lines of coding.

A master BibTEX bibliographic style file is one that, when processed by docstrip with selected options, produces a regular BibTEX .bst file with the desired features.

In this sense, docstrip functions something like a C preprocessor. In fact, Oren Patashnik’s original .bst files were all produced from a single source file by means of the preprocessor. The advantage of docstrip is that it is portable to all installations with TEX.

3.2 The docstrip Batch Job

The docstrip program can be run either interactively, where the user must answer questions via the keyboard, or by means of a batch job where all the inputs are prepared in a file beforehand. For producing a BibTEX style file from a master file, the batch job method is the only feasible one, simply because of the large number of options available. (There is another reason for employing a batch job: the interactive method adds an \endinput command at the end, something that BibTEX will protest about.)

The batch job files in general do not have any particular extension but I use .dbj for docstrip batch job. These files are useful because they document the options used to produce the .bst file, and they may be edited to experiment with alternative options.

3.3 The makebst Program

It is possible to make up a batch job file by hand using the option information listed in Section 8, but my accompanying program makebst simplifies the task considerably. It reads menu information in the master file itself in order to present the user with an interactive list of choices, translating the answers into appropriate options that are then written to a batch job file.

To run it, simply process makebst.tex with TEX or L^{A}TEX, and answer the questions. The first of these is whether you want some instructions or not, and the second is the name of the .mbs that you want to use. The next query is about the name of the desired .bst file (which will also be the root name of the batch job). After that, all further questions come from menu information in the master file.

At the very end, makebst asks if it should run the batch job for you. Isn’t that a fine service?

4 Multilingual Adaptation

The original .bst files from Oren Patashnik contain 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 merlin.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.

Only English and babel are supported directly in merlin.mbs; all other language definitions are contained in separate definition files, e.g., french.mbs,

german.mbs.

The language selection is made during the makebst run, which asks for the name of the language definition file as the first menu item. If either English or babel is wanted, reply with the default, which is merlin.mbs itself; otherwise give the name of the desired language file.

Note: the language definition files can only be used with makebst version 3 or later, and

with an external definition file, the docstrip run requires two passes through merlin.mbs, doubling the processing time.

4.1 Adding a New Language Definition File

To create a new language definition file, simply take one of the existing ones, like english.mbs, and replace the explicit English words with their translations. There are, however, a number of points that can complicate this procedure.

1. Do not forget to change the documentation in the file, especially version number, date, author.

2. There are option menus that need to be translated too. It might also be desirable to add or remove options. In most cases, the options in the language files involve possible abbreviations, like

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

In this example, the option pp appears later in the definition

    FUNCTION {bbl.pages}
    %<!pp>{ "pages" }
    %<pp>{ "pp." }

This a local option, that only affects the coding in the definition file. It is possible to add more local options.

3. However, all options, whether activated by the main file or by the definition file, apply to both. In other words, there really is no such thing as a local option. In the above example, pp is only local because it is never

used in merlin.mbs.

4. Add the name of the language as an option, with

    \mes{^^JOptions for ENGLISH}
    \wr{\spsp\spsp\sep english\pc: English language}

(This is how options are added without \optdef and \getans.) The main file just might recognize it in order to take some language-specific action. The least it should do is add a comment at the start of the .bst file stating for which language it is to be used.

5. 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.

6. 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). It is then vital to add the option

umlaut with
    \wr{\spsp\spsp\sep umlaut\pc: Activate umlaut command}

Bernd Raichle points out that \^^b can be used in place of \" within BibTEX code. One can thus replace F\qq{u}nfte with F\^^b unfte and do away with the umlaut option.

4.2 Changing babelbst.tex for a New Language

Alternatively, 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 German, then put the English version of babelbst.tex into

englbst.tex and the German version in germbst.tex. Then babelbst.tex

could contain:

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

This is of course installation dependent.

4.3 Extracting the Sample babelbst.tex File

A sample babelbst.tex (for English) is contained in this master file. Extract it with docstrip and the option bblbst. It may be edited (and possibly renamed) for other languages as needed.

4.4 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.

5 Prestoring Names of Journals

The standard .bst files contain the names of some 20 journals in the field of computing, stored as macros for easy reference within the database .bib files. For example, the Journal of Computer and System Sciences can be referred to as jcss. With the option jabr (for journal abbreviation) this same shorthand produces J. Comput. Syst. Sci..

Some .bst files for physics journals include additional journal names, and it is conceivable that other faculties might wish to prepare their own such lists, with each name present in a full or abbreviated form. Such an external file can now be added with merlin.mbs and makebst version 3.

As a model, I supply a file physjour.mbs with the names of physics journals which I have taken from other .bst files. I also have a contributed file photjour.mbs containing names of optics journals.

In fact, version 3.5 can even include multiple journal-name files. Thus one can decide whether to include both, one, or none of the above files.

6 Updating Older .dbj Files

If you have existing .dbj files for generating .bst files from the older version genbst.mbs, these may be run with merlin.mbs by simply changing the name of the source .mbs file. For example, where the older .dbj file contains the line

     \generateFile{mystyle.bst}{f}{\from{genbst.mbs}{%

edit the file so that genbst.mbs is replaced by merlin.mbs. The resulting mystyle.bst file will then be an updated version of the older one, containing all the same features.

7 Acknowledgements

I wish to thank all the people who have taken the trouble to send me suggestions or special requests. Admittedly, it has been out of self-interest on their part, since they had bibliographic needs to be met. And I have often questioned the need for many of their demands. Yet, that is part of the bibliographic jungle that I am trying to eliminate. If I thought that bibliographies were arbitrarily formatted before I started this project, I have more than sufficient confirmation since then. The fault lies not with the poor contributors, but with the publishers who cannot agree on a decent standard.

I especially want to thank Frank Mittelbach, not only for creating docstrip in the first place, but also for sending me his bibliographic requirements, and for suggesting an improvement to makebst.

And finally, all of us must thank Oren Patashnik for providing BibTEX; without its flexibility and programmability (in spite of the complexity of the language) the master bibliographic styles would not be possible at all.

8 The Options

Here I present a list of all the docstrip options that are available in this file merlin.mbs. The normal user can skip this section since he will probably make use of the menus via makebst. These are described in Section 9. 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 if more than one has been specified. Such options have the same prefix, such as nm-rev and nm-init. If one uses makebst to produce the docstrip batch job, then it is impossible to give mutually exclusive options unless one edits the batch file oneself afterwards. (Anything is possible with computer freaks!)

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.

alph for alpha.bst style of citations; essentially numerical but an abbreviation of the author names plus year is used as the label.

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}...

nmd for the ‘named’ variant of Chicago (with named.sty).

             \bibitem[\protect\citeauthoryear{author}{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-yr order by year, authors, 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.)

seq-key (author–year) like seq-lab except that for identical authors

and year, the cite keyword is used instead of the title

vonx ignore von part of name when ordering (default is to consider

von as part of the whole surname)

Language selection: the translations of certain explicit words. -- default is English, for and, chapter, editor, etc.; babel replace words with L^{A}TEX commands that are defined in the file

             babelbst.tex;

If one of the external language definition files is used, then the name of its language should be in the list of active options. Many other language names are already included as options in this main file simply for the purpose of adding a comment at the start of the .bst file. Names formatting: how initials and surnames are to be combined. -- default is full names, given names first nm-revf full names, surname first nm-init initials plus surname nm-rev surname plus initials nm-rev1 surname plus initials (1st name only) then initials plus surname nm-rv as nm-rev, but initials without dots nm-rvv as nm-rev, but initials without spaces nm-rvx as nm-rev, but initials without dots or spaces ed-rev editors’ names are reversed the same as authors’ aunm-semi a semi-colon is placed between author names instead of a

comma

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...m6 (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 typeface nmft-sc names in small caps nmft-it names in italics nmft-bf names in bold nmand-rm ‘and’ in normal font, not same as authors’. 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) com-semi with blk-com, uses semi-colon instead of comma com-blank with blk-com, uses blanks instead of comma blk-tit use commas, except after a title and very end in-col puts a colon after In or in for edited works fin-bare no punctuation at the very end au-col puts a colon after the author/editor block Date: position and enclosure -- default is date at end, before notes; for author–year, date con-

sists only of year, no month

dt-jnl date at end as for default, except for journal articles where it

follows the journal name as part of specification

dt-end date goes after any notes dt-beg date goes after authors’ names yr-par date in parentheses () yr-brk date in brackets [] yr-col date preceded by colon and space yr-per date preceded by period and space yr-blk date preceded by space dtrev date as year month instead of month year dtbf date bold face aymth include month even for author-year yrp-x suppresses punctuation following month, year when date is just

after authors yrp-col adds colon and space after date when just after authors yrp-semi adds semi-colon and space after date when just after authors yrpp-xsp removes blank following year punctuation 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 volp-semi semi-colon instead of colon: vol(num); p1–p2 volp-com comma and space instead of colon: vol(num), p1–p2 volp-blk only space instead of colon: vol(num) p1–p2 volp-dt date between volume and pages: vol(num), (1994) p1–p2 vol-bf volume in bold vol-it volume in italics vol-2bf volume and number bold vnum-x no number for journals, only volume vnum-sp space between, as vol (num) vnum-cm replace vol(num) with vol, num vnum-nr replace vol(num) with vol, no. num vnum-h replace vol(num) with vol, #num vnum-dt as vol (year) num vnum-pg as vol, (num)p1–(num)p2 jpg-1 only starting page given jwdpg include ‘page’ or ‘pp’ for articles 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 capital-

ization (first word and words following colons) jxper abbreviated journal names have periods removed, as ‘Phys Rev’ jttl-rm name of journal not in italics 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 Technical Report title: formatted like book or article -- default is like an article title trtit-b titles of technical reports formatted like books Books: title font style, pages, and address location -- default is italicized btit-rm book title plain bkpg-par pages in books place in parentheses add-pub publisher’s address before name, colon separated pub-par publisher and address in parentheses ISBN number: include or not -- default is no ISBN number isbn include an ISBN number as optional entry for books, booklets,

incollections, inproceedings

Abbreviations: of various words, default is no abbreviations pp abbreviate page(s) as p. and pp. ppx no word page(s) or abbreviation ed abbreviate editor(s) as ed. and eds. abr abbreviate volume, edition, technical report, etc. mth-bare months abbreviated without dots jabr abbreviate names of prestored journals ord write edition numbers as 1st, 2nd, instead as words. Editor: alternative for in edited work -- “in names, editors, title” edpar “in names (editors), title” edby “in title, edited by names” edby-par “in title (Edited by names)” edbyx (with edby or edby-par) replaces text edited by by editor(s)

before the names.

Citation label: what is written by the \cite command -- default is no special font lab-it label (names printed by \cite) in italics lab-sc label in small caps lab-bf label in bold face and-rm word ‘and’ in labels in normal font 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 varand use command \BIBand in place of and and-xcom no comma before last and of an author list (citations and ref-

erences)

and-com add comma before and even for two authors (in list of refer-

ences)

xand no and in an author list (references) etal-it et al. in italics etal-rm et al. in roman 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ε

9 The Menu Information

Here I describe the options and menu information for this particular master file merlin.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

     merlin.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 the 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&!driver&!bblbst> . . . </!options&!driver&!bblbst>

in order to exclude it if docstrip is used to extract the menu information, the documentation driver, or the babelbst.tex file.

The main coding is divided into two sections, the head and tail; in between come any external language or journal name support files. The head part is marked with the docstrip guard option <!tail> and the tail with <!head>. This roundabout means of doing things makes it possible to process merlin.mbs with .dbj files that were generated for the older genbst.mbs file by simply changing the name of the source file as shown in Section 6. If both head and tail (and exlang) options are omitted, as they are in the older .dbj files, merlin.mbs is processed completely in one pass. To include external files, two passes are needed, one for each part, with the external file(s) coming in between.

Note too that if the internal language commands are taken (i.e., if exlang option is not given) then the default language is English, which is tested for as <!babel>. This too permits the simple update of older .dbj, at least for English.

Selecting Language

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.

The definitions of these functions for other languages are contained in external files. At this point, we can make use of features in makebst (version 3.0 or later) to ask for the name of such a definition file, and store it in \cfile. If no external file is specified, then the internal definitions are taken, for which there are two possibilities: English or L^{A}TEX commands (Babel).

The commands \MBswitch, \mes, \MBaskfile, \wr, \pc, \spsp are defined in
makebst.tex.

If \MBswitch does not exist, then the version of makebst cannot support external files.

1 ⟨∗options⟩

 2 \mes{<<< For more information about the meanings of^^J%
 3  <<< the various options, see the section on ^^J%
 4  <<< Menu Information in the .mbs file documentation.}

5

 6 \mes{^^JEXTERNAL FILES:}
 7 \expandafter\ifx\csname MBswitch\endcsname\relax
 8 \mes{^^J**************^^J%
 9  Makebst version is less than 3.0^^J%
10  Cannot add external file for language definition^^J%
11  **************}
12 \def\cfile{}\def\jfile{}\else
13 \MBaskfile{^^JName of language definition file}(\mroot.\mext)i\cfile
14 \edef\ctemp{\mroot.\mext}
15 \ifx\ctemp\cfile\def\cfile{}\fi

A second type of external file that can be added is one containing names of journals that are to be prestored into the .bst file. Several file names are allowed here, with the root names separated by commas, and with the common extension added at the end. To assist later parsing of the names, an additional comma is added before the extension.

Note that in this case \MBaskfile treats the file(s) as output, i.e., it does not check if the file(s) actually exist.

The macro \Mgetnext allows the root names to be extracted from the list of file names.

16 \def\jfile{}
17 \ask{\yn}{^^JInclude file(s) for extra journal names? (NO)}
18 \if!\yn!\else\if\yn n\else\if\yn N\else
19 \MBaskfile{^^JFile to include}(physjour,photjour.mbs)o\jfile
20 \edef\jfile{\froot,.\fext}
21 \fi\fi\fi
22 \fi
23 \def\Mgetnext#1,#2.#3??{\def\froot{#1}\def\Mrest{#2}\def\fext{#3}}

If no external files are specified, then both \cfile and \jfile are empty. In this case, do not set the options head and tail, which control the docstrip passes through filename. Now only one pass is made.

If there is an external definition file, or if an external list of journal names, then some extra text must be written to fit in with that already written by makebst. This is explained in that documentation. The \MBswitch command turns the curly braces {..} into normal characters, and the parentheses (..) take on their grouping functionality. This permits unbalances braces to be written to the output file.

24 \if!\cfile\jfile!\else
25 \begingroup\MBswitch
26 \wr(\spsp head,\string\MBopta})
27 \if!\cfile!\else
28 \wr(\string\from{\cfile}{\string\MBopta})
29 \fi
30 \if!\jfile!\else
31 \let\jxfile\jfile

32 \loop

Parse the list of journal name files, adding a new \from for each one.

33 \expandafter\Mgetnext\jxfile??
34 \wr(\string\from{\froot.\fext}{\string\MBopta})
35 \edef\jxfile(\Mrest.\fext)
36 \if!\Mrest!\def\Mtst(1)\else\def\Mtst()\fi
37 \if!\Mtst!
38 \repeat
39 \fi
40 \wr(\string\from{\mroot.\mext}{tail,\string\MBopta}})
41 \wr(\string\def\string\MBopta{\pc)
42 \endgroup
43 \fi

Ask whether explicit English words wanted or L^{A}TEX commands whose definitions are to be found in the file babelbst.tex.

44 \if!\cfile!
45 \mes{^^JINTERNAL LANGUAGE SUPPORT:}
46 \optdef{*}{}{English}{words used explicitly}
47 \optdef{b}{babel}{Babel}{(words replaced by commands defined in babelbst.tex)}
48 \getans
49 \else
50 \wr{\spsp\spsp\sep exlang\pc: External language file}
51 \def\sep{,}
52 \fi

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 ‘named’ variant of Chicago (with named.sty) with entries like

     \bibitem[\protect\citeauthoryear{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.

53 \newif\ifnumerical \numericalfalse
54 \newif\ifmytemp\mytempfalse
55 \mes{^^JSTYLE OF CITATIONS:}
56 \optdef{*}{}{Numerical}{as in standard LaTeX}
57 \optdef{a}{ay}{Author-year}{with some non-standard interface}
58 \optdef{b}{alph}{Alpha style}{(labels like DAL90)}
59 \optdef{c}{cite}{Cite key}{(special for listing contents of bib file)}
60 \getans
61 \numericaltrue
62 \if\ans a\numericalfalse\fi
63 \mytemptrue
64 \if\ans b\mytempfalse\fi

65

66 \ifnumerical\else
67 \mes{^^JAUTHOR--YEAR SUPPORT SYSTEM:}
68 \optdef{*}{nat}{Natbib}{for use with natbib.sty v5.3}
69 \optdef{o}{}{Older Natbib}{without full authors citations}
70 \optdef{l}{alk}{Apalike}{for use with apalike.sty}
71 \optdef{h}{har}{Harvard}{system with harvard.sty}
72 \optdef{a}{ast}{Astronomy}{system with astron.sty}
73 \optdef{c}{cay}{Chicago}{system with chicago.sty}
74 \optdef{n}{nmd}{Named}{system with named.sty}
75 \optdef{d}{cn}{Author-date}{system with authordate1-4.sty}
76 \getans

77

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.

78 \if\ans h%
79 \mes{^^JHARVARD EXTENSIONS INCLUDED:}
80 \optdef{*}{harnm}{With Harvard extensions}{for LaTeX2e version of harvard.sty}
81 \optdef{n}{}{Older Harvard}{style, for LaTeX 2.09}
82 \getans\fi
83 \fi

84

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 is the same as the original citations. This corresponds

to unsrt.bst.

Another possibility is to order first by year, then authors. This too only makes sense for numerical citations.

For the alpha style, the ordering is by label only, so no option is offered here (\ifnumerical is ⟨true⟩ and \ifmytemp is ⟨false⟩).

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).

One problem that can arise here is when two or more references have the same set of authors and year; normally they are then ordered by the title, ignoring initial words like the and a, with the letters a, b, c, …, added to the year. This can mean that a set of references with a natural sequence will be put into a different order. An alternative is to order them by the citation keyword instead of by title. This of course assumes that the keywords in this case reflect that natural sequence.

85 \ifnumerical
86 \ifmytemp
87 \mes{^^JORDERING OF REFERENCES:}
88 \optdef{*}{}{Alphabetical}{by all authors}
89 \optdef{c}{seq-no}{Citation order}{(unsorted, like unsrt.bst)}
90 \optdef{d}{seq-yr}{Year ordered}{and then by authors}
91 \getans
92 \fi
93 \else
94 \mes{^^JORDERING OF REFERENCES:}
95 \optdef{*}{}{Alphabetical}{by all authors}
96 \optdef{l}{seq-lab}{By label}%
97 {(Jones before Jones and James before Jones et al)}
98 \optdef{k}{seq-key}{By label and cite key}{instead of label and title, as above}
99 \optdef{d}{seq-yr}{Year ordered}{and then by authors (for publication lists)}

A General Master Bibliography Style 19

100 \getans
101 \fi

102

The standard BibTEX styles consider the von part of the name to be a fixed part of the surname. European usage tends to alphabetize ignoring these honorifics.

103 \if\ans c\else
104 \mes{^^JORDER ON VON PART:}
105 \optdef{*}{}{Sort on von part}{(de la Maire before Defoe)}
106 \optdef{x}{vonx}{Sort without von part}{(de la Maire after Mahone)}
107 \getans
108 \fi

109

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’.

110 \mes{^^JAUTHOR NAMES:}
111 \optdef{*}{}{Full, surname last}{(John Frederick Smith)}
112 \optdef{f}{nm-revf}{Full, surname first}{(Smith, John Frederick)}
113 \optdef{i}{nm-init}{Initials + surname}{(J. F. Smith)}
114 \optdef{r}{nm-rev}{Surname + initials}{(Smith, J. F.)}
115 \optdef{s}{nm-rv}{Surname + dotless initials}{(Smith J F)}
116 \optdef{x}{nm-rvx}{Surname + pure initials}{(Smith JF)}
117 \optdef{y}{nm-rvv}{Surname + spaceless initials}{(Smith J.F.)}
118 \optdef{a}{nm-rev1}{Only first name reversed}%
119 {(AGU style: Smith, J. F., H. K. Jones)}
120 \getans

121

122 \mytempfalse
123 \if\ans r\mytemptrue\fi
124 \if\ans s\mytemptrue\fi
125 \if\ans a\mytemptrue\fi
126 \if\ans f\mytemptrue\fi
127 \if\ans x\mytemptrue\fi
128 \if\ans y\mytemptrue\fi
129 \ifmytemp
130 \mes{^^JEDITOR NAMES IN COLLECTIONS:}
131 \if\ans r
132 \optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
133 \fi

20 P. W. Daly

134 \if\ans s
135 \optdef{*}{}{Editor names NOT reversed}{as edited by J J Smith}
136 \fi
137 \if\ans a
138 \optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
139 \fi
140 \if\ans x
141 \optdef{*}{}{Editor names NOT reversed}{as edited by JJ Smith}
142 \fi
143 \if\ans f
144 \optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith}
145 \fi
146 \optdef{r}{ed-rev}{Editor names reversed}{just like authors'}
147 \getans
148 \fi

149

150 \mes{^^JPUNCTUATION BETWEEN AUTHOR NAMES:}
151 \optdef{*}{}{Author names separated by commas}{}
152 \optdef{s}{aunm-semi}{Names separated by semi-colon}{}
153 \getans

154

Number of authors

Normally the complete list of authors as given in the .bib file is 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.

155 \mes{^^JNUMBER OF AUTHORS:}
156 \optdef{*}{}{All authors}{included in listing}
157 \optdef{l}{nmlm}{Limited authors}{(et al replaces missing names)}
158 \getans
159 \if\ans l
160 \loop
161 \ask{\num}{Maximum number of authors (1-9)}
162 \ifnum\num>9\relax
163 \mes{*** Must be between 1 and 9}
164 \repeat
165 \wr{\spsp\spsp\sep x\num\pc: Maximum of \num\space authors}
166 \mes{\spsp You have selected maximum \num\space authors}
167 \ifnum\num>6\def\numx{6}\else\edef\numx{\num}\fi
168 \loop
169 \ask{\num}{Minimum number (before et al given) (1-\numx)}
170 \ifnum\num>\numx
171 \mes{*** Must be between 1 and \numx}
172 \repeat
173 \wr{\spsp\spsp\sep m\num\pc: Minimum of \num\space authors}
174 \mes{\spsp You have selected minimum \num\space authors}
175 \fi

Typeface of names

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

177 \mes{^^JTYPEFACE FOR AUTHORS IN LIST OF REFERENCES:}
178 \optdef{*}{}{Normal font for authors}{}
179 \optdef{s}{nmft-sc}{Small caps authors}{(\string\sc)}
180 \optdef{i}{nmft-it}{Italic authors}{(\string\it\space or \string\em)}
181 \optdef{b}{nmft-bf}{Bold authors}{(\string\bf)}
182 \getans

183

184 \mytempfalse
185 \if\ans i\mytemptrue\fi
186 \if\ans s\mytemptrue\fi
187 \if\ans b\mytemptrue\fi
188 \ifmytemp
189 \mes{^^JFONT FOR `AND' THE IN LIST:}
190 \optdef{*}{}{`And' in author font}{(JONES AND JAMES)}
191 \optdef{r}{nmand-rm}{`And' in normal font}{(JONES and JAMES)}
192 \getans
193 \fi

194

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.

Medical journals have a system where the date is part of the journal specification, as Lancet 1994;45(2):34–40. Otherwise the date appears at the end.

195 \mes{^^JDATE POSITION:}
196 \optdef{*}{}{Date at end}{}
197 \optdef{b}{dt-beg}{Date after authors}{}
198 \optdef{j}{dt-jnl}{Date part of journal spec.}{(as 1994;45:34-40) else at end}
199 \optdef{e}{dt-end}{Date at very end}{after any notes}
200 \getans

201

202 \if\ans b\mytemptrue\else\if\ans j\mytemptrue\else\mytempfalse\fi\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 author– year, the date normally consists only of the year, no month, but this may be overridden.

If the date comes just after the authors, then one might want special punctuation following it, like a colon, or space only. The latter is probably desirable if the date is brackets or parentheses.

The date can even be put into bold face.

203 \ifnumerical
204 \mes{^^JDATE FORMAT:}
205 \optdef{*}{}{Plain month and year}{without any brackets}
206 \optdef{p}{yr-par}{Date in parentheses}{as (May 1993)}
207 \optdef{b}{yr-brk}{Date in brackets}{as [May 1993]}
208 \optdef{c}{yr-col}{Date preceded by colon}{as `: May 1993'}
209 \optdef{d}{yr-per}{Date preceded by period}{as `. May 1993'}
210 \optdef{s}{yr-blk}{Date preceded by space}{only, as ` May 1993'}
211 \getans

212

213 \mes{^^JREVERSED DATE:}
214 \optdef{*}{}{Date as month year}{}
215 \optdef{r}{dtrev}{Date as year month}{}
216 \getans
217 \else
218 \mes{^^JDATE FORMAT: (no months for author-year)}
219 \optdef{*}{}{Year plain}{without any brackets}
220 \optdef{p}{yr-par}{Year in parentheses}{as (1993)}
221 \optdef{b}{yr-brk}{Year in brackets}{as [1993]}
222 \optdef{c}{yr-col}{Year preceded by colon}{as `: 1993'}
223 \optdef{d}{yr-per}{Year preceded by period}{as `. 1993'}
224 \optdef{s}{yr-blk}{Year preceded by space}{only, as ` 1993'}
225 \getans

226

227 \mes{^^JINCLUDE MONTHS:}
228 \optdef{*}{}{Date is year only}{without the month}
229 \optdef{m}{aymth}{Include month in date}{}
230 \getans

231

232 \if\ans m
233 \mes{^^JREVERSED DATE:}
234 \optdef{*}{}{Date as month year}{}
235 \optdef{r}{dtrev}{Date as year month}{}
236 \getans
237 \fi
238 \fi

239

240 \ifmytemp
241 \mes{^^JDATE PUNCTUATION:}
242 \optdef{*}{}{Date with standard punctuation}{(comma or period)}
243 \optdef{c}{yrp-col}{Colon after date}{as 1994:}
244 \optdef{s}{yrp-semi}{Semi-colon after date}{as 1994;}
245 \optdef{x}{yrp-x}{No punct. after date}{}
246 \getans

247

248 \mes{^^JBLANK AFTER DATE:}
249 \optdef{*}{}{Space after date}{and punctuation}
250 \optdef{x}{yrpp-xsp}{No space after date}{as 1994:45}
251 \getans

252

253 \fi

255 \mes{^^JDATE FONT:}
256 \optdef{*}{}{Date in normal font}{}
257 \optdef{b}{dtbf}{Date in bold face}{}
258 \getans

259

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.” Another use for it is when years are given as “1968–72”. Actually, I have no idea why the year should be truncated at all.

260 \ifnumerical\else
261 \mes{^^JTRUNCATE YEAR:}
262 \optdef{*}{note-yr}{Year text full}{as 1990--1993 or `in press'}
263 \optdef{t}{}{Year truncated}{to last 4 digits}
264 \getans
265 \fi

266

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.

267 \mes{^^JTITLE OF ARTICLE:}
268 \optdef{*}{}{Title plain}{with no special font}
269 \optdef{i}{tit-it}{Title italic}{(\string\em)}
270 \optdef{q}{tit-q}{Title in single quotes}{(`Title')}
271 \optdef{d}{tit-qq}{Title in double quotes}{(``Title'')}
272 \getans

273

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

278

279 \mes{^^JARTICLE TITLE PRESENT:}
280 \optdef{*}{}{Article title present}{in journals and proceedings}
281 \optdef{x}{jtit-x}{No article title}{}
282 \getans

Journal names

Abbreviated journal names normally contain periods; the periods may be removed with this option. In fact, only letters, numbers, and spacing are retained.

284 \mes{^^JJOURNAL NAMES:}
285 \optdef{*}{}{Periods in journal names}{are retained, as `Phys. Rev.'}
286 \optdef{x}{jxper}{Dotless journal names}{as `Phys Rev'}
287 \getans

288

Journal title is normally printed in italics; can be left in normal font.

289 \mes{^^JJOURNAL TITLE FONT:}
290 \optdef{*}{}{Journal title italics}{}
291 \optdef{r}{jttl-rm}{Journal title normal}{font}
292 \getans

293

Title of Theses and Technical Reports

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.

The title of a technical report is normally treated the same as that of an article. Optionally, it may be formatted like that of a book.

294 \mes{^^JTHESIS TITLE:}
295 \optdef{*}{}{Thesis titles like books}{}
296 \optdef{a}{thtit-a}{Thesis title like article}{}
297 \getans

298

299 \mes{^^JTECHNICAL REPORT TITLE:}
300 \optdef{*}{}{Tech. report title like articles}{}
301 \optdef{b}{trtit-b}{Tech. report title like books}{}
302 \getans

303

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, no. 2: 33–55
21(2):33–55  21, #2, 33–55
21 (2), 33–55  21 (2); 33–55
21(2) (1995) 33–55  21, (2)33–(2)55

21(2) 33–55

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

304 \mes{^^JJOURNAL VOLUME NUMBER:}
305 \optdef{*}{}{Volume plain}{as vol(num)}
306 \optdef{i}{vol-it}{Volume italic}{as {\string\em\space vol}(num)}
307 \optdef{b}{vol-bf}{Volume bold}{as {\string\bf\space vol}(num)}
308 \optdef{d}{vol-2bf}{Volume and number bold}{as {\string\bf\space vol(num)}}
309 \getans

310

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

311 \mes{^^JJOURNAL VOL AND NUMBER:}
312 \optdef{*}{}{Journal vol(num)}{as 34(2)}
313 \optdef{s}{vnum-sp}{Journal vol (num)}{as 34 (2)}
314 \optdef{c}{vnum-cm}{Journal vol, num}{as 34, 2}
315 \optdef{n}{vnum-nr}{Journal vol, no. num}{as 34, no. 2}
316 \optdef{h}{vnum-h}{Journal vol, \string\# number}{as 34, \string\#2}
317 \optdef{p}{vnum-pg}{Journal vol, number(page)}{as 34, (2)33}
318 \optdef{d}{vnum-dt}{Journal vol (year) num}{as 34 (1994) 2}
319 \optdef{x}{vnum-x}{Journal vol, no number}{as 34}
320 \getans

321

322 \mes{^^JVOLUME PUNCTUATION:}
323 \optdef{*}{}{Volume with colon}{as vol(num):ppp}
324 \optdef{s}{volp-sp}{Volume with colon and space}{as vol(num): ppp}
325 \optdef{h}{volp-semi}{Volume with semi-colon}{as vol(num); ppp}
326 \optdef{c}{volp-com}{Volume with comma}{as vol(num), ppp}
327 \optdef{b}{volp-blk}{Volume with blank}{as vol(num) ppp}
328 \optdef{d}{volp-dt}{Volume with date}{as vol(num), date ppp}
329 \getans

330

331 \mes{^^JPAGE NUMBERS:}
332 \optdef{*}{}{Start and stop page numbers}{given}
333 \optdef{f}{jpg-1}{Only start page number}{}
334 \getans

335

336 \mes{^^JWORD `PAGE' IN ARTICLES:}
337 \optdef{*}{}{Article pages numbers only}{as 234-256}
338 \optdef{p}{jwdpg}{Include `page' in articles}{as pp. 234--256}
339 \getans

340

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

341 \mes{^^JJOURNAL NAME PUNCTUATION:}

342 \optdef{*}{}{Comma after journal}{name}
343 \optdef{x}{jnm-x}{Space after journal}{name}
344 \getans

345

Books

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.

The page numbers in books may be set in parentheses, as (pp. 345–350).

346 \mes{^^JBOOK TITLE:}
347 \optdef{*}{}{Book title italic}{(\string\em)}
348 \optdef{p}{btit-rm}{Book title plain}{(no font command)}
349 \getans

350

351 \mes{^^JPAGES IN BOOKS:}
352 \optdef{*}{}{Book pages normal}{as pp. 50-55}
353 \optdef{p}{bkpg-par}{Book pages in parentheses}{as (pp. 50-55)}
354 \getans

355

Some psychology journals wish to have the publisher’s address preceding the name, separated by colon, as

New York: Wiley and Sons

356 \mes{^^JPUBLISHER ADDRESS:}
357 \optdef{*}{}{Publisher, address}{as Harcourt, New York}
358 \optdef{a}{add-pub}{Address: Publisher}{as New York: Harcourt}
359 \getans

360

361 \mes{^^JPUBLISHER IN PARENTHESES:}
362 \optdef{*}{}{Publisher as normal block}{without parentheses}
363 \optdef{p}{pub-par}{Publisher in parentheses}{}
364 \getans

365

ISBN number

Books normally possess an ISBN number. This may be included as an

 optional entry for book, inbook, booklet, incollection, proceedings,
 inproceedings.
366 \mes{^^JISBN NUMBER:}
367 \optdef{*}{isbn}{Include ISBN}{for books, booklets, etc.}
368 \optdef{x}{}{No ISBN}{}
369 \getans

Edited by

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

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

Alternative forms are

In J. K. James (editor), Title … In Title, edited by J. K. James … In Title (Edited by J. K. James) …

371 \mes{^^JEDITOR STYLE, GENERAL:}
372 \optdef{*}{}{Plain `editor'}{after name of editor}
373 \optdef{a}{edpar}{`(editor)'}{in parentheses, after name}
374 \getans

375

376 \mes{^^JEDITOR IN COLLECTIONS:}
377 \optdef{*}{}{Word `editor' after name}{of collection editor}
378 \optdef{b}{edby}{`Edited by' before name}{of editor}
379 \optdef{p}{edby-par}{`(Edited by..)'}{all in parentheses}
380 \optdef{e}{edby}{`Editor' before name}{of editor}
381 \optdef{k}{edby-par}{`(Editor..)'}{all in parentheses}
382 \getans

383

384 \mytempfalse
385 \if\ans e\mytemptrue\fi
386 \if\ans k\mytemptrue\fi
387 \ifmytemp
388 \wr{\spsp\sep edbyx\pc: Replace `edited by' by `editor(s)'}
389 \fi

390

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.

L^{A}TEX offers an openbib option, which means that the blocks are not only new sentences, but new lines as well. This can only function when the default option here is taken, for then the command \newblock is placed between the blocks. This command is normally defined to do nothing, but L^{A}TEX redefines it to issue a new line when open bibliographies are wanted.

391 \mes{^^JPUNCTUATION BETWEEN SECTIONS (BLOCKS):}
392 \optdef{*}{}{Period after blocks}{of authors, title, etc}
393 \optdef{c}{blk-com}{Comma between blocks}{}
394 \optdef{s}{blk-com}{Semi-colon between blocks}{}
395 \optdef{b}{blk-com}{Blanks between blocks}{}
396 \optdef{t}{blk-tit}{Only titles with period}{but other blocks commas}
397 \getans

398

399 \if\ans s
400 \wr{\spsp\spsp\sep com-semi\pc: Semi-colon replaces comma between blocks}
401 \fi
402 \if\ans b
403 \wr{\spsp\spsp\sep com-blank\pc: Blank replaces comma between blocks}
404 \fi

405

406 \mes{^^JPUNCTUATION AFTER AUTHORS:}
407 \optdef{*}{}{Author block normal}{with regular block punctuation}
408 \optdef{c}{au-col}{Author block with colon}{}
409 \getans

410

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.

411 \mes{^^JPUNCTUATION AFTER `IN':}
412 \optdef{*}{}{Space after `in'}{for edited works or proceedings}
413 \optdef{c}{in-col}{Colon after `in'}{(as `In: ...')}
414 \getans

415

Final punctuation

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

416 \mes{^^JFINAL PUNCTUATION:}
417 \optdef{*}{}{Period at very end}{of the listed reference}
418 \optdef{x}{fin-bare}{No period at end}{}
419 \getans

420

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.)

421

422 \if!\cfile!
423 \mes{^^JABBREVIATE WORD `PAGES':}
424 \optdef{*}{}{`Page(s)'}{(no abbreviation)}
425 \optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
426 \optdef{x}{ppx}{`Page' omitted}{}

427 \getans

428

429 \mes{^^JABBREVIATE WORD `EDITORS':}
430 \optdef{*}{}{`Editor(s)'}{(no abbreviation)}
431 \optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
432 \getans

433

434 \mes{^^JOTHER ABBREVIATIONS:}
435 \optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
436 \optdef{a}{abr}{Abbreviations}{of such words}
437 \getans

438

439 \if\ans a
440 \mes{^^JMONTHS WITH DOTS:}
441 \optdef{*}{}{Months with dots}{as Jan.}
442 \optdef{x}{mth-bare}{Months without dots}{as Feb Mar}
443 \getans
444 \fi

445

446 \mes{^^JEDITION NUMBERS:}
447 \optdef{*}{}{Write out editions}{as first, second, third, etc}
448 \optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
449 \getans

The above choices about abbreviations are made only if the internal languages are taken (English or babel). For an external language definition file, these choices, along with possible other ones, are made in the external file, which is read in at this point.

450 \else
451 \input\cfile
452 \fi

453

This file contains the standard set of stored journal names present in the basic bibliography style files. If other files containing journal names are to be included, they may only contain the option jabr since that option is selected here. No option menus from the journal-name files will be read in.

454 \mes{^^JSTORED JOURNAL NAMES:}
455 \optdef{*}{}{Full journal names}{for prestored journals}
456 \optdef{a}{jabr}{Abbreviated journal names}{}
457 \getans

458

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.

If a font is selected for the cited authors, then the word ‘and’ may be optionally put in the normal font.

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.

459 \ifnumerical\else
460 \mes{^^JFONT OF CITATION LABELS IN TEXT:}
461 \optdef{*}{}{Cited authors plain}{as result of \string\cite\space command}
462 \optdef{i}{lab-it}{Cited authors italic}{}
463 \optdef{s}{lab-sc}{Cited authors small caps}{}
464 \optdef{b}{lab-bf}{Cited authors bold}{}
465 \getans

466

467 \mytempfalse
468 \if\ans i\mytemptrue\fi
469 \if\ans s\mytemptrue\fi
470 \if\ans b\mytemptrue\fi
471 \ifmytemp
472 \mes{^^JFONT FOR `AND' IN CITATIONS:}
473 \optdef{*}{}{Cited `and' in author font}{}
474 \optdef{r}{and-rm}{Cited `and' in normal font}{}
475 \getans
476 \fi

477

478 \mes{^^JFONT OF EXTRA LABEL:^^J(The extra letter on the year)}
479 \optdef{*}{}{Extra label plain}{}
480 \optdef{i}{xlab-it}{Extra label italic}{}
481 \getans
482 \fi

483

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.

A variable and may be provided for with the command \BIBand in place of the word. In this case, the command must be defined in the document file or some other package called. (This is intended for situations where an ampersand is wanted in parenthetical citations, but the word in textual ones.)

484 \mes{^^JAMPERSAND:}
485 \optdef{*}{}{Use word `and'}{in author lists}
486 \optdef{a}{amper}{Use ampersand}{in place of `and'}
487 \optdef{v}{varand}{Use \string\BIBand}{in place of `and'}
488 \getans

489

490 \mes{^^JCOMMA BEFORE `AND':}
491 \optdef{*}{}{Comma before `and'}{as `Tom, Dick, and Harry'}
492 \optdef{n}{and-xcom}{No comma before `and'}{as `Tom, Dick and Harry'}
493 \optdef{c}{and-com}{Comma with 2 authors}{as `Tom, and Harry'}
494 \getans

495

496 \mes{^^JNO `AND' IN REFERENCE LIST:}

497 \optdef{*}{}{With `and'}{before last author in reference list}
498 \optdef{x}{xand}{No `and'}{as `Tom, Dick, Harry'}
499 \getans

500

Font of et al

One can chose that et al. be put into italics. Or, if the authors are in a different font from the regular one, the et al. can still be Roman.

501 \mes{^^JFONT OF `ET AL':}
502 \optdef{*}{}{Plain et al}{}
503 \optdef{i}{etal-it}{Italic et al}{}
504 \optdef{r}{etal-rm}{Roman et al}{even when authors something else}
505 \getans

506

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.

507 \mes{^^JEMPHASIS:^^J(affects all so-called italics)}
508 \optdef{*}{}{Use emphasis}{ie, \string\em, allows font switching}
509 \optdef{i}{em-it}{Use true italics}{ie, \string\it, absolute italics}
510 \optdef{x}{em-x}{No italics}{at all}
511 \getans

512

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ε.

513 \mes{^^JNEW FONT SELECTION SCHEME:}
514 \optdef{*}{}{No NFSS}{use 2.09 font commands}
515 \optdef{n}{nfss}{NFSS}{use \string\textbf, \string\emph, not \string\bf,
516  \string\em}
517 \getans

518

Terminate the options list. If a language definition file has been called, then we have a closing brace too many, so add another dummy opening brace.

519 \if!\cfile\jfile!\else

520 \begingroup\MBswitch
521 \wr(,{\pc)
522 \endgroup
523 \fi

524

525 \endoptions

526 ⟨/options⟩