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

Patrick W. Daly

This paper describes file merlin.mbs, version 4.05 from 2002/10/21^{∗}

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.

∗Work on custom-bib 4.00 was supported by the American Physical Society

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 then 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 was 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.

Version 4 arose out of a project by David Carlisle who created a variant of merlin.mbs for REVTEX and the American Physical Society with the help of Mark Doyle of the APS. The main purpose was to add extra fields (see page 43) that were needed. Subsequently Arthur Ogawa revised the code considerably, making it more rational, fixing some bugs and adding some extra features.

I was then asked to incorporate all these changes into the official version of merlin.mbs. This required much debugging, since the Ogawa’s rationalization upset several of the delicate interplays between various options. The result is version 4.0, the work on which has been supported by the American Physical Society.

Version 4.0 contains the REVTEX extra fields and the Carlisle-Doyle-Ogawa rewrites. An additional feature that derived from Carlisle’s work on REVTEX is the tagging of the text entries in the bibliography. This means the volume number is given as \bibinfo{volume}{5}. Normally only the number 5 is printed, but another program could use this to reconstruct the original database entries.

Arthur Ogawa also added some features to makebst to provide a more verbose protocol. As a result, version 4 of merlin.mbs can only be used with version 4 of makebst. Older versions of merlin.mbs will still function with the newer makebst. Also, .dbj files created with older versions should still produce the same results with merlin.mbs 4.

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 9, 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.

Apart from the language adaptation of the whole bibliography, there is also the possibility of switching languages for individual references, so as to hyphenate the title properly. This is done with the language field and the \setlanguage command.

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 file geojour.mbs with the names of geophysics journals, and 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 HTML Output

There is an option html to create a .bst file producing hypertext (HTML) output instead of the regular L^{A}TEX code. This is still experimental. The resulting BibTEX output will still be a file with extension .bbl and will contain the L^{A}TEX special characters, like \"a for ä. One must go over the output to convert such characters to the HTML equivalents, and to remove curly braces. Only then can it be renamed .html.

Three possible lists are offered:

• a simple paragraph for each entry, • a numbered list,

• a description list with the key as the label.

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

Version 4 of merlin.mbs can only be used with version 4 of makebst, whereas older versions of merlin.mbs will still function with the newer makebst. Also, .dbj files created with older versions should still produce the same results with merlin.mbs 4, albeit with different coding.

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

David Carlisle has added the REVTEX fields and \bibinfo tagging in a special variant of merlin.mbs; Arthur Ogawa then incorporated them into the main file, and overhauled much of the coding to make it more legible and rational.

I especially wish to thank Mark Doyle and the American Physical Society for supporting the work on custom-bib 4.0.

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.

9 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 10. 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. First three letters of single author, or first letters of first three authors.

alf-1 with alph, uses first three letters of first author’s name, regardless of how many authors.

alf-f with alph, uses first author’s whole name.

For numerical style, one can select the HTML option, to output a hypertext file instead of a L^{A}TEX one.

-- normal L^{A}TEX output;

html for HTML output, one reference per paragraph

htlist (with html) outputs to a numbered list;

htdes (with html) outputs description list, with the key.

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 (ascending), authors, title

seq-yrr order by year (descending), authors, title

seq-no 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;

lang adds the language field for switching language for one reference

only by means of the \setlanguage command in babel.

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. The language field is intended to allow the hyphenation patterns to be switched temporarily so that titles can be set in the original language. Annotation: annotations are added either by means of the annote field, or with a .tex file of the same name as the citation key. -- no annotations annote annotations enabled, with annote field. Missing names: If the author and/or editor is missing, the standard .bst files use the key field in place of the names for purposes of ordering the entries. For author–year styles, the key field is even inserted in the reference list and in the label in place of the authors. Optionally, one can suppress the year in this case, which causes natbib (version 7) to print only that key text as a code designation for the work. -- year is inserted in the labels when key replaces authors keyxyr year is left blank in this case 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-revv1 same as nm-rev1 but with full names 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 in collections are reversed the same as authors’ ed-au editors are formatted with same routine as authors; this is an

alias for ed-rev, which is kept only for compatibility

aunm-semi a semi-colon is placed between author names instead of a comma aunm-sl a slash is placed between author names instead of a comma nmdash repeated author/editor names replaced by dash jnrlab include the junior part of name in citations (normally appears

only in reference listing)

jnrlst with one of the nm-rev type options, puts the junior part last,

after the (reversed) first name

Number of names: normally all names listed (in reference list) nmlm limit number of names x1...x90 (with nmlm) maximum number of names to appear; for over 9,

give the tens and units separately, as x20,x5 for 25

m1...m90 (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 names are in some special font nmfted editors’ names in collections also get special fonts nmft-sc names in small caps nmft-it names in italics nmft-bf names in bold

nmft-def  names in user defined font \bibnamefont{}.

nmand-rm ‘and’ in normal font, not same as authors’. fnm-rm (with nmft) first names are in regular font fnm-def (with nmft) first names are in user defined font \bibfnamefont{}. -- first names are in same font as the surnames. Citation font: what is written by the \cite command -- default is no special font lab-it cited names in italics lab-sc cited names in small caps lab-bf cited names in bold face lab-def cited names in user defined font \bibnamefont{}. and-rm word ‘and’ in cited names in normal font xlab-it extra label (letter after year) in italics 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 like blk-com except period follows titles of articles and books blk-tita like blk-com except period follows article title com-semi with blk-com, uses semi-colon instead of comma com-blank with blk-com, uses blanks instead of comma in-col puts a colon after In or in for edited works in-it puts word in in italics (may be used with in-col) in-x suppresses the word in for edited works fin-bare no punctuation at the very end au-col puts a colon after the author/editor block blknt puts period before note Date: if missing

-- Missing date replaced by ???? (author–year) blkyear Missing date left blank, even in label.

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-com date preceded by comma and space 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 xmth suppress month for numerical mode 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 yrp-per adds period and space after date 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 injnl adds word in before journal name, same style as for incollections 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 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-b replace vol(num) with vol num jdt-v year in parentheses attached to volume: vol(year) num jdt-vs as above, with space: vol (year) num jdt-p year precedes pages: vol(num), (year) p1–p2 jdt-pc as above, with comma: vol(num), (year), p1–p2 jpg-1 only starting page given pgsep-c page numbers over 10,000 have comma pgsep-s page numbers over 10 000 have space pgsep-p page numbers over 10.000 have period jwdpg include ‘page’ or ‘pp’ for articles jwdvol include ‘volume’ or ‘vol’ for articles jnm-x no punctuation after journal name tit-it article title in italics tit-qq article title in quotes bt-rm booktitle in upright font, not italic (this will be issued with

btit-rm normally; separate options allow for more control if wanted

bt-qq booktitle of incollection and inproceedings in quotes qt-s (with tit-qq) single instead of double quotes qt-g (with tit-qq) guillemets instead of quotes qx (with tit-qq) comma outside 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 pp-last pages appear at end, before any notes Number and series: for collections and inproceedings This is a confusing issue. The standard wants to print something like “number 123 in Collected Works”, and issues a warning if there is a number without a series. However, for many such works, there is an identification number for the collection, such as ESA SP-123. Giving this as the number without a series results in “number ESA SP-123” and a warning. Setting the series to this code number produces desired results, but is illogical. Another problem is that this code number should often should appear just before the publisher name, whereas the standard places it elsewhere.

-- default, number must have series, number is printed num-xser default behaviour if both number and series present, but if only

number is there, it is printed without the word number and without a warning

numser moves the number/series to just before the publisher/organization

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 thtit-x no thesis title Technical Report title: formatted like book or article -- default is like an article title trtit-b titles of technical reports formatted like books trnum-it technical report and number italic Books: title font style, pages, and address location -- default is italicized btit-rm book title plain bkpg-par pages in books places in parentheses bkpg-x pages in books bare without word pages add-pub publisher’s address before name, colon separated pub-par publisher and address in parentheses pub-date publisher with address and date in parentheses pub-xc with pub-date, suppresses comma before date pub-xpar with pub-date to suppress parentheses pre-pub publisher placed before chapter and page information pre-edn edition before publisher pg-bk add number of pages for books and booklets 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. ednx abbreviates edition as ed. instead of edn. 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. xedn suppress conversion of editions (for English) to avoid overflow-

ing some BibTEX installations

Editor: alternative for in edited book, inbook, or proceedings. -- “in names, editors, title” edpar “in names (editors), title” edparc “in names, (editors) title” edparxc “in names (editors) title” bkedcap capitalizes “Editor” Editor: alternative for in edited incollection or inproceedings. If none of these are selected, they are treated the same as an edited book. -- “in names, editors, title” edby “in title, edited by names” edby-par “in title (edited by names)” edby-parc “in title, (edited by names)” edcap (with edby-par) capitalizes “Edited by” or “Editor” edbyx (with edby or edby-par) replaces text edited by by editor(s)

before the names,

edbyw same as edbyx but with word editor only in parentheses edbyy (with edby or edby-par) replaces text edited by by editor(s)

after the names, as “in title, names, editors”.

ISBN, ISSN numbers: include or not -- default is no ISBN number, ignore this field, isbn include an ISBN number as optional entry for books, booklets,

incollections, inproceedings

issn include an ISSN number for periodicals URL address: include or not, and how -- ignore URL field, url process URL field, url-blk (with url) URL text as regular blocked item, url-nt URL text treated as a note url-nl URL text added as new line below reference (Harvard style) REVTEX data fields: for use with revtex.bst. -- Do not include extra fields for REVTEX

revdata  Include fields collaboration, eid, numpages for REVTEX.

Eprint field: used by REVTEX but can be used on its own. -- Do not include eprint and archive fields

eprint  Include eprint and archive fields.

Reference component tagging: apply structure to the \bibitem contents. -- no tagging. bibinfo apply tags like \bibinfo, and \eprint to the fields of data in

the content of the \bibitem statement.

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 em-ul underline for emphasis (with or without ulem) 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)

and-com-ed the same as and-com but for editors in collections xand no and in an author list (references) etal-it et al. in italics etal-rm et al. in roman even if authors in different font

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ε

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

20 P. W. Daly

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 \expandafter\ifx\csname beginoptiongroup\endcsname\relax
 3 \mes{^^J******************^^J%
 4  !!!!!! VERSION CLASH !!!!!!!!!^^J%
 5  This mbs file requires makebst version 4.0 or more^^J%
 6  You must update makebst to run it with this mbs file^^J%
 7  No docstrip batch file can be produced on this run^^J%
 8  ******************}
 9 \let\temp\endinput\else\let\temp\relax\fi\temp

10

11 \newif\ifnumerical
12 \newif\ifmytemp
13 \mes{<<< For more information about the meanings of^^J%
14  <<< the various options, see the section on ^^J%
15  <<< Menu Information in the .mbs file documentation.}

16

17 \umes{EXTERNAL FILES:}
18 \expandafter\ifx\csname MBswitch\endcsname\relax
19 \mes{^^J**************^^J%
20  Makebst version is less than 3.0^^J%
21  Cannot add external file for language definition^^J%
22  **************}
23 \umes{No included files.}%
24 \def\cfile{}\def\jfile{}%
25 \else
26 \MBaskfile{^^JName of language definition file}(\mroot.\mext)i\cfile
27 \edef\ctemp{\mroot.\mext}
28 \ifx\ctemp\cfile\def\cfile{}\fi
29 \umes{Name of language file: \string\cfile=\cfile.}%

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.

30 \def\jfile{}
31 \ask{\yn}{^^JInclude file(s) for extra journal names? (NO)}
32 \mytempfalse
33 \if!\yn!\else\if\yn n\else\if\yn N\else\mytemptrue\fi\fi\fi

A General Master Bibliography Style 21

34 \ifmytemp
35 \MBaskfile{^^JFile to include}(physjour,geojour,photjour.mbs)o\jfile
36 \edef\jfile{\froot,.\fext}
37 \umes{Name of included files: \string\jfile=\jfile.}%
38 \else
39 \umes{No included files.}%
40 \fi
41 \fi%MBswitch
42 \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.

43 \if!\cfile\jfile!\else
44 \begingroup\MBswitch
45 \wr(\spsp head,\string\MBopta})
46 \if!\cfile!\else
47 \wr(\string\from{\cfile}{\string\MBopta})
48 \fi
49 \if!\jfile!\else
50 \let\jxfile\jfile
51 \loop

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

52  \expandafter\Mgetnext\jxfile??
53  \wr(\string\from{\froot.\fext}{\string\MBopta})
54  \edef\jxfile(\Mrest.\fext)
55  \if!\Mrest!\def\Mtst(1)\else\def\Mtst()\fi
56 \if!\Mtst!
57 \repeat
58 \fi
59 \wr(\string\from{\mroot.\mext}{tail,\string\MBopta}})
60 \wr(\string\def\string\MBopta{\pc)
61 \endgroup
62 \fi

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

63 \beginoptiongroup{INTERNAL LANGUAGE SUPPORT
64 (if no external language file)}%
65 {\if!\cfile!\relax*\fi}%
66 \optdef{*}{}{English}{words used explicitly}
67 \optdef{b}{babel}{Babel}
68  {(words replaced by commands defined in babelbst.tex)}
69 \getans

22 P. W. Daly

70 \endoptiongroup
71 \if!\cfile!\relax\else
72 \wr{\spsp\spsp\sep exlang\pc: External language file}
73 \def\sep{,}
74 \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.

The alph option produces labels as in alpha.bst; options alf-1 and alf-f modify these. Standard is: first three letters of the single author (Dal90 for Daly, 1990) and first letters of first three authors (DK90 for Daly and Kopka, 1990). Alternatives are first three letters of the first author, no matter how many authors there are, and full name of first author.

75 \beginoptiongroup{STYLE OF CITATIONS:}{}
76 \optdef{*}{}{Numerical}{as in standard LaTeX}
77 \optdef{a}{ay}{Author-year}{with some non-standard interface}
78 \optdef{b}{alph}{Alpha style, Jon90 or JWB90}{for single or multiple authors}
79 \optdef{o}{alph,alf-1}{Alpha style, Jon90}{even for multiple authors}
80 \optdef{f}{alph,alf-f}{Alpha style, Jones90}{(full name of first author)}
81 \optdef{c}{cite}{Cite key}{(special for listing contents of bib file)}
82 \getans
83 \endoptiongroup
84 \if\ans a\numericalfalse\else\numericaltrue\fi
85 \if\ans b\mytempfalse   \else\mytemptrue   \fi
86 \beginoptiongroup{HTML OUTPUT
87 (if non author-year citations)}
88 {\ifnumerical*\fi}
89 \optdef{*}{}{Normal LaTeX}{output}
90 \optdef{h}{html}{Hypertext}{output, in HTML code, in paragraphs}
91 \optdef{n}{html,htlist}{Hypertext list}{with sequence numbers}
92 \optdef{k}{html,htdes}{Hypertext with keys}{for viewing databases}
93 \getans
94 \endoptiongroup
95 \beginoptiongroup{AUTHOR--YEAR SUPPORT SYSTEM
96 (if author-year citations)}
97 {\ifnumerical\else*\fi}
98 \optdef{*}{nat}{Natbib}{for use with natbib v5.3 or later}
99 \optdef{o}{}{Older Natbib}{without full authors citations}
100 \optdef{l}{alk}{Apalike}{for use with apalike.sty}
101 \optdef{h}{har}{Harvard}{system with harvard.sty}
102 \optdef{a}{ast}{Astronomy}{system with astron.sty}
103 \optdef{c}{cay}{Chicago}{system with chicago.sty}
104 \optdef{n}{nmd}{Named}{system with named.sty}
105 \optdef{d}{cn}{Author-date}{system with authordate1-4.sty}
106 \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. These features may be added too. The URL field used to be exclusively part of Harvard, but now exists independently of it too.

107 \beginoptiongroup{HARVARD EXTENSIONS INCLUDED
108 (if Harvard support selected)}
109 {\if\ans h*\fi}%
110 \optdef{*}{harnm}{With Harvard extensions}{for LaTeX2e version of harvard.sty}

111 \optdef{n}{}{Older Harvard}{style, for LaTeX 2.09}
112 \getans
113 \endoptiongroup
114 \endoptiongroup

Language switching

A language field can be present to specify the original language of the reference; with \setlanguge, the hyphenation patterns are set for setting the title in that language.

115 \beginoptiongroup{LANGUAGE FIELD}{}
116 \optdef{*}{}{No language field}{}
117 \optdef{l}{lang}{Add language field}{to switch hyphenation patterns temporarily}
118 \getans
119 \endoptiongroup

Annotations

Annotations to a reference are additional information not normally printed out in the list of references. They are used for listing databases. The coding here was offered by Soren Dayton.

120 \beginoptiongroup{ANNOTATIONS:}{}
121 \optdef{*}{}{No annotations}{will be recognized}
122 \optdef{a}{annote}{Annotations}{in annote field or in .tex file of citekey name}
123 \getans
124 \endoptiongroup

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. Order of citation is also offered for author–year for natbib-type styles that can also be used for numerical listings.

Another possibility is to order first by year, then authors. This too only makes sense for numerical citations. However, it is offered for author–year in the event that a natbib-type style is used for numerical listings.

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.

125 \let\ans\relax
126 \beginoptiongroup{ORDERING OF REFERENCES
127 (if non-author/year and non-alph)}
128 {\ifnumerical\ifmytemp*\fi\fi}%
129 \optdef{*}{}{Alphabetical}{by all authors}
130 \optdef{c}{seq-no}{Citation order}{(unsorted, like unsrt.bst)}
131 \optdef{d}{seq-yr}{Year ordered}{and then by authors}
132 \optdef{r}{seq-yrr}{Reverse year ordered}{and then by authors}
133 \getans
134 \endoptiongroup

135 %

136 \beginoptiongroup{ORDERING OF REFERENCES
137 (if author-year citations)}
138 {\ifnumerical\else*\fi}%
139 \optdef{*}{}{Alphabetical}{by all authors}
140 \optdef{l}{seq-lab}{By label}%
141 {(Jones before Jones and James before Jones et al)}
142 \optdef{k}{seq-key}{By label and cite key}{instead of label and title, as above}
143 \optdef{d}{seq-yr}{Year ordered}{and then by authors (for publication lists)}
144 \optdef{r}{seq-yrr}{Reverse year ordered}{and then by authors (most recent first)}
145 \optdef{c}{seq-no}{Citation order}{(unsorted, only meaningful for numericals)}
146 \getans
147 \endoptiongroup

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.

148 \beginoptiongroup{ORDER ON VON PART
149 (if not citation order)}
150 {\if\ans c\else*\fi}%
151 \optdef{*}{}{Sort on von part}{(de la Maire before Defoe)}
152 \optdef{x}{vonx}{Sort without von part}{(de la Maire after Mahone)}
153 \getans
154 \endoptiongroup

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

155 \beginoptiongroup{AUTHOR NAMES:}{}
156 \optdef{*}{ed-au}{Full, surname last}{(John Frederick Smith)}
157 \optdef{f}{nm-revf}{Full, surname first}{(Smith, John Frederick)}
158 \optdef{i}{nm-init,ed-au}{Initials + surname}{(J. F. Smith)}
159 \optdef{r}{nm-rev}{Surname + initials}{(Smith, J. F.)}
160 \optdef{s}{nm-rv}{Surname + dotless initials}{(Smith J F)}
161 \optdef{x}{nm-rvx}{Surname + pure initials}{(Smith JF)}
162 \optdef{y}{nm-rvv}{Surname + spaceless initials}{(Smith J.F.)}
163 \optdef{a}{nm-rev1}{Only first name reversed, initials}%
164 {(AGU style: Smith, J. F., H. K. Jones)}
165 \optdef{b}{nm-revv1}{First name reversed, with full names}%
166 {(Smith, John Fred, Harry Kab Jones)}
167 \getans
168 \endoptiongroup
169 \mytempfalse
170 \if\ans f\mytemptrue\fi
171 \if\ans r\mytemptrue\fi
172 \if\ans s\mytemptrue\fi
173 \if\ans x\mytemptrue\fi
174 \if\ans y\mytemptrue\fi
175 \if\ans a\mytemptrue\fi
176 \if\ans b\mytemptrue\fi
177 \beginoptiongroup{EDITOR NAMES IN COLLECTIONS
178 (if author names reversed)}
179 {\ifmytemp*\fi}
180 \if\ans r
181 \optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
182 \fi
183 \if\ans s
184 \optdef{*}{}{Editor names NOT reversed}{as edited by J J Smith}
185 \fi
186 \if\ans a
187 \optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
188 \fi
189 \if\ans x
190 \optdef{*}{}{Editor names NOT reversed}{as edited by JJ Smith}
191 \fi
192 \if\ans f
193 \optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith}
194 \fi
195 \if\ans y
196 \optdef{*}{}{Editor names NOT reversed}{as edited by J.J. Smith}
197 \fi
198 \if\ans b
199 \optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith}
200 \fi
201 \optdef{r}{ed-rev}{Editor names reversed}{just like authors'}
202 \getans
203 \beginoptiongroup{POSITION OF JUNIOR
204 (if author names reversed)}

205 {}

206 \optdef{*}{jnrlst}{Junior comes last}{as Smith, John, Jr.}
207 \optdef{m}{}{Junior between}{as Smith, Jr., John}
208 \getans
209 \endoptiongroup
210 \endoptiongroup

211

212 \beginoptiongroup{JUNIOR PART IN THE CITATION
213 (if author-year citations)}
214 {\ifnumerical\else*\fi}%
215 \optdef{*}{}{No `junior' part in the citations}{but in the ref listing}
216 \optdef{j}{jnrlab}{`Junior' in citations}{as well as in ref listing}
217 \getans
218 \endoptiongroup

219

220 \beginoptiongroup{PUNCTUATION BETWEEN AUTHOR NAMES:}{}
221 \optdef{*}{}{Author names separated by commas}{}
222 \optdef{s}{aunm-semi}{Names separated by semi-colon}{}
223 \optdef{h}{aunm-sl}{Names separated by slash}{/}
224 \getans
225 \endoptiongroup

226

227 \beginoptiongroup{ADJACENT REFERENCES WITH REPEATED NAMES:}{}
228 \optdef{*}{}{Author/editor names always present}{}
229 \optdef{d}{nmdash}{Repeated author/editor names replaced by dash}{}
230 \getans
231 \endoptiongroup

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.

232 \beginoptiongroup{NUMBER OF AUTHORS:}{}
233 \optdef{*}{}{All authors}{included in listing}
234 \optdef{l}{nmlm}{Limited authors}{(et al replaces missing names)}
235 \getans
236 \endoptiongroup
237 \if\ans l
238 \loop
239 \ask{\num}{Maximum number of authors (1-99)}
240 \ifnum\num>99\relax
241 \mes{*** Must be between 1 and 99}
242 \repeat
243 \def\parsenum#1#2{\if#2\relax\wr{\spsp\spsp\sep x#1\pc: Maximum of #1\space authors}
244 \else\wr{\spsp\spsp\sep x#10,x#2\pc: Maximum of #1#2\space authors}\fi}
245 \expandafter\parsenum\num\relax
246 \mes{\spsp You have selected maximum \num\space authors}
247 \edef\numx{\num}
248 \loop

249 \ask{\num}{Minimum number (before et al given) (1-\numx)}
250 \ifnum\num>\numx
251 \mes{*** Must be between 1 and \numx}
252 \repeat
253 \def\parsenum#1#2{\if#2\relax\wr{\spsp\spsp\sep m#1\pc: Minimum of #1\space authors}
254 \else\wr{\spsp\spsp\sep m#10,m#2\pc: Minimum of #1#2\space authors}\fi}
255 \expandafter\parsenum\num\relax
256 \mes{\spsp You have selected minimum \num\space authors}
257 \fi

258

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.

Alternatively, the surnames only can be formatted, with the first names in the regular font. One can also specify that the words ‘and’ and ‘et al.’ should be in the regular font, or that ‘et al.’ be italic.

Another possibility is that the names be put into a command \bibnamefont{..}, which must be defined in the L^{A}TEX document. By default, this command does not format its argument. There is also a \bibfnamefont command for the first names, to be user-defined.

Editor names in a collection or in a book will not normally have these fonts applied to them; this may be additionally selected.

259 \beginoptiongroup{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:}{}
260 \optdef{*}{}{Normal font for author names}{}
261 \optdef{s}{nmft,nmft-sc}{Small caps authors}{(\string\sc)}
262 \optdef{i}{nmft,nmft-it}{Italic authors}{(\string\it\space or \string\em)}
263 \optdef{b}{nmft,nmft-bf}{Bold authors}{(\string\bf)}
264 \optdef{u}{nmft,nmft-def}{User defined author font}{(\string\bibnamefont)}
265 \getans
266 \endoptiongroup
267 \mytempfalse
268 \if\ans i\mytemptrue\fi
269 \if\ans s\mytemptrue\fi
270 \if\ans b\mytemptrue\fi
271 \if\ans u\mytemptrue\fi
272 \beginoptiongroup{FONT FOR FIRST NAMES
273 (if non-default font for authors)}
274 {\ifmytemp*\fi}%
275 \optdef{*}{}{First names same font as surnames}{}
276 \optdef{r}{fnm-rm}{First names in normal font}{}
277 \optdef{u}{fnm-def}{First names in user defined font}{(\string\bibfnamefont)}
278 \getans
279 \beginoptiongroup{EDITOR NAMES IN INCOLLECTION ETC:}{}
280 \optdef{*}{}{Editors incollection normal font}{}
281 \optdef{a}{nmfted}{Editors incollection like authors}{font}
282 \getans
283 \endoptiongroup

285 \beginoptiongroup{FONT FOR `AND' IN LIST:}{}
286 \optdef{*}{}{`And' in author font}{(JONES AND JAMES)}
287 \optdef{r}{nmand-rm}{`And' in normal font}{(JONES and JAMES)}
288 \getans
289 \endoptiongroup
290 \endoptiongroup

Names in 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.

This parallels the font selection for the names in the list of references except that there no choice for the first names, since only surnames are used in the labels. A user-defined \citefontname may also be selected, but this must be defined by the user since there will be no default definition for it.

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.

291 \beginoptiongroup{FONT OF CITATION LABELS IN TEXT
292 (if author-year citations)}
293 {\ifnumerical\else*\fi}%
294 \optdef{*}{}{Cited authors plain}{as result of \string\cite\space command}
295 \optdef{i}{lab,lab-it}{Cited authors italic}{}
296 \optdef{s}{lab,lab-sc}{Cited authors small caps}{}
297 \optdef{b}{lab,lab-bf}{Cited authors bold}{}
298 \optdef{u}{lab,lab-def}{User defined citation font}{(\string\citenamefont)}
299 \getans

300

301 \mytempfalse
302 \if\ans i\mytemptrue\fi
303 \if\ans s\mytemptrue\fi
304 \if\ans b\mytemptrue\fi
305 \if\ans u\mytemptrue\fi
306 \beginoptiongroup{FONT FOR `AND' IN CITATIONS
307 (if non-default font for citation lables)}
308 {\ifmytemp*\fi}%
309 \optdef{*}{}{Cited `and' in author font}{}
310 \optdef{r}{and-rm}{Cited `and' in normal font}{}
311 \getans
312 \endoptiongroup
313 \beginoptiongroup{FONT OF EXTRA LABEL
314 (The extra letter on the year)}{}
315 \optdef{*}{}{Extra label plain}{}
316 \optdef{i}{xlab-it}{Extra label italic}{}
317 \getans

318 \endoptiongroup
319 \endoptiongroup

Label for missing author names

If the author and/or editor is missing, the standard .bst files use the key field in place of the names for purposes of ordering the entries.

For author–year styles, the key field is even inserted in the reference list and in the label in place of the authors. Optionally, one can suppress the year in this case, which causes natbib (version 7) to print only that key text as a code designation for the work. Thus if KEY = "CS1-345" and there are no authors, then \citep produces (CS1-345) and \citet simply CS1-345. That is, they behave like \citeauthor. If natbib did not recognize the blank year, one would get (CS1-345, ) and CS1-345 (). (Earlier versions of natbib crash on a blank year.)

320 \beginoptiongroup{LABEL WHEN AUTHORS MISSING
321 (if author-year citations)}
322 {\ifnumerical\else*\fi}%
323 \optdef{*}{keyxyr}{Year blank when KEY replaces missing author}{(for natbib 7.0)}
324 \optdef{y}{}{Year included when KEY replaces missing author}{}
325 \getans
326 \endoptiongroup

Missing date

A missing date can be set to ???? or simply left blank. In the latter case, natbib version 7 will print only the authors without any year punctuation or brackets.

327 \beginoptiongroup{MISSING DATE
328 (if author-year citations)}
329 {\ifnumerical\else*\fi}%
330 \optdef{*}{}{Missing date set to ????}{in label and text}
331 \optdef{b}{blkyear}{Missing date left blank}{}
332 \getans
333 \endoptiongroup

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.

334 \beginoptiongroup{DATE POSITION:}{}
335 \optdef{*}{}{Date at end}{}
336 \optdef{b}{dt-beg}{Date after authors}{}

337 \optdef{j}{dt-jnl}{Date part of journal spec.}{(as 1994;45:34-40) else at end}
338 \optdef{e}{dt-end}{Date at very end}{after any notes}
339 \getans
340 \endoptiongroup
341 \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.

342 \beginoptiongroup{DATE FORMAT
343 (if non author-year citations)}
344 {\ifnumerical*\fi}%
345 \optdef{*}{}{Plain month and year}{without any brackets}
346 \optdef{p}{yr-par}{Date in parentheses}{as (May 1993)}
347 \optdef{b}{yr-brk}{Date in brackets}{as [May 1993]}
348 \optdef{c}{yr-col}{Date preceded by colon}{as `: May 1993'}
349 \optdef{d}{yr-per}{Date preceded by period}{as `. May 1993'}
350 \optdef{m}{yr-com}{Date preceded by comma}{as `, May 1993'}
351 \optdef{s}{yr-blk}{Date preceded by space}{only, as ` May 1993'}
352 \getans
353 \beginoptiongroup{SUPPRESS MONTH:}{}
354 \optdef{*}{}{Date is month and year}{}
355 \optdef{x}{xmth}{Date is year only}{}
356 \getans
357 \endoptiongroup
358 \beginoptiongroup{REVERSED DATE
359 (if including month)}
360 {\if\ans x\else*\fi}%
361 \optdef{*}{}{Date as month year}{}
362 \optdef{r}{dtrev}{Date as year month}{}
363 \getans
364 \endoptiongroup
365 \endoptiongroup

366

367 \beginoptiongroup{DATE FORMAT
368 (if author-year citations)}
369 {\ifnumerical\else*\fi}%
370 \optdef{*}{}{Year plain}{without any brackets}
371 \optdef{p}{yr-par}{Year in parentheses}{as (1993)}
372 \optdef{b}{yr-brk}{Year in brackets}{as [1993]}
373 \optdef{c}{yr-col}{Year preceded by colon}{as `: 1993'}
374 \optdef{d}{yr-per}{Year preceded by period}{as `. 1993'}
375 \optdef{m}{yr-com}{Date preceded by comma}{as `, 1993'}
376 \optdef{s}{yr-blk}{Year preceded by space}{only, as ` 1993'}

377 \getans
378 \beginoptiongroup{INCLUDE MONTHS:}{}
379 \optdef{*}{}{Date is year only}{without the month}
380 \optdef{m}{aymth}{Include month in date}{}
381 \getans
382 \endoptiongroup
383 \beginoptiongroup{REVERSED DATE
384 (if including month)}
385 {\if\ans m*\fi}%
386 \optdef{*}{}{Date as month year}{}
387 \optdef{r}{dtrev}{Date as year month}{}
388 \getans
389 \endoptiongroup
390 \endoptiongroup

391

392 \beginoptiongroup{DATE PUNCTUATION
393 (if date not at end)}
394 {\ifmytemp*\fi}%
395 \optdef{*}{}{Date with standard block punctuation}{(comma or period)}
396 \optdef{c}{yrp-col}{Colon after date}{as 1994:}
397 \optdef{s}{yrp-semi}{Semi-colon after date}{as 1994;}
398 \optdef{p}{yrp-per}{Period after date}{even when blocks use commas}
399 \optdef{x}{yrp-x}{No punct. after date}{}
400 \getans
401 \beginoptiongroup{BLANK AFTER DATE:}{}
402 \optdef{*}{}{Space after date}{and punctuation}
403 \optdef{x}{yrpp-xsp}{No space after date}{as 1994:45}
404 \getans
405 \endoptiongroup
406 \endoptiongroup
407 \beginoptiongroup{DATE FONT:}{}
408 \optdef{*}{}{Date in normal font}{}
409 \optdef{b}{dtbf}{Date in bold face}{}
410 \getans
411 \endoptiongroup

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.

412 \beginoptiongroup{TRUNCATE YEAR
413 (if author-year citations)}
414 {\ifnumerical\else*\fi}%
415 \optdef{*}{note-yr}{Year text full}{as 1990--1993 or `in press'}
416 \optdef{t}{}{Year truncated}{to last 4 digits}
417 \getans
418 \endoptiongroup

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 or even in guillemets. The last is best with T1 coding; a poor man’s version for OT1 is provided; L^{A}TEX 2ε is required in both cases.

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.

419 \beginoptiongroup{TITLE OF ARTICLE:}{}
420 \optdef{*}{}{Title plain}{with no special font}
421 \optdef{i}{tit-it}{Title italic}{(\string\em)}
422 \optdef{q}{tit-qq,qt-s}{Title and punctuation in single quotes}{(`Title,' ..)}
423 \optdef{d}{tit-qq}{Title and punctuation in double quotes}{(``Title,'' ..)}
424 \optdef{g}{tit-qq,qt-g}{Title and punctuation in guillemets}{(<<Title,>> ..)}
425 \optdef{x}{tit-qq,qt-s,qx}{Title in single quotes}{(`Title', ..)}
426 \optdef{y}{tit-qq,qx}{Title in double quotes}{(``Title'', ..)}
427 \optdef{z}{tit-qq,qt-g,qx}{Title in guillemets}{(<<Title>>, ..)}
428 \getans
429 \endoptiongroup
430 \mytempfalse
431 \if\ans q\mytemptrue\fi
432 \if\ans d\mytemptrue\fi
433 \if\ans g\mytemptrue\fi
434 \if\ans x\mytemptrue\fi
435 \if\ans y\mytemptrue\fi
436 \if\ans z\mytemptrue\fi
437 \beginoptiongroup{COLLECTION/PROCEEDINGS TITLES
438 (if quoted title)}
439 {\ifmytemp*\fi}%
440 \optdef{*}{bt-qq}{Quote collection and proceedings titles}{too}
441 \optdef{x}{}{Collection and proceedings titles not in quotes}{}
442 \getans
443 \endoptiongroup
444 \beginoptiongroup{CAPITALIZATION OF ARTICLE TITLE:}{}
445 \optdef{*}{}{Sentence style}{(capitalize first word and those in braces)}
446 \optdef{t}{atit-u}{Title style}{(just as in bib entry)}
447 \getans
448 \endoptiongroup

449

450 \beginoptiongroup{ARTICLE TITLE PRESENT:}{}
451 \optdef{*}{}{Article title present}{in journals and proceedings}
452 \optdef{x}{jtit-x}{No article title}{}
453 \getans
454 \endoptiongroup

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.

455 \beginoptiongroup{JOURNAL NAMES:}{}
456 \optdef{*}{}{Periods in journal names}{are retained, as `Phys. Rev.'}
457 \optdef{x}{jxper}{Dotless journal names}{as `Phys Rev'}
458 \getans
459 \endoptiongroup

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

460 \beginoptiongroup{JOURNAL NAME FONT:}{}
461 \optdef{*}{}{Journal name italics}{}
462 \optdef{r}{jttl-rm}{Journal name normal}{font}
463 \getans
464 \endoptiongroup

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.

465 \beginoptiongroup{THESIS TITLE:}{}
466 \optdef{*}{}{Thesis titles like books}{}
467 \optdef{a}{thtit-a}{Thesis title like article}{}
468 \optdef{x}{thtit-x}{No thesis title}{}
469 \getans
470 \endoptiongroup

471

472 \beginoptiongroup{TECHNICAL REPORT TITLE:}{}
473 \optdef{*}{}{Tech. report title like articles}{}
474 \optdef{b}{trtit-b}{Tech. report title like books}{}
475 \getans
476 \endoptiongroup

477

478 \beginoptiongroup{TECHNICAL REPORT NUMBER:}{}
479 \optdef{*}{}{Tech. report and number plain}{as `Tech. Rep. 123'}
480 \optdef{i}{trnum-it}{Tech. report and number italic}%
481  {as `{\string\it\space Tech. Rep. 123'}}
482 \getans
483 \endoptiongroup

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.

I am only aware of one journal that used to reset the pagination for each ‘number’, in which case the number was part of the page designation. I had erroneously provided an option vnum-pg to achieve this, but I now realize that instead, for this one journal, the database entries must contain pages="(2)33--2(55)". This option has been removed at version 3.84.

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(1995), 33-55
21(2) 33–55  vol. 21 (2), pp. 33–55

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

It is also possible to include the year as part of the journal specification, in which case the year is always in parentheses, attached snugly or with space to the volume, or preceding the pages.

484 \beginoptiongroup{JOURNAL VOLUME:}{}
485 \optdef{*}{}{Volume plain}{as vol(num)}
486 \optdef{i}{vol-it}{Volume italic}{as {\string\em\space vol}(num)}
487 \optdef{b}{vol-bf}{Volume bold}{as {\string\bf\space vol}(num)}
488 \optdef{d}{vol-2bf}{Volume and number bold}{as {\string\bf\space vol(num)}}
489 \getans
490 \endoptiongroup

The form of the ‘number’ is also given: in parentheses, with ‘no.’, with #, or omitted. The vnum-b option is meant to be used with jdt-v and jdt-vs but could be used alone.

491 \beginoptiongroup{JOURNAL VOL AND NUMBER:}{}
492 \optdef{*}{}{Journal vol(num)}{as 34(2)}
493 \optdef{s}{vnum-sp}{Journal vol (num)}{as 34 (2)}
494 \optdef{c}{vnum-cm}{Journal vol, num}{as 34, 2}
495 \optdef{n}{vnum-nr}{Journal vol, no. num}{as 34, no. 2}
496 \optdef{h}{vnum-h}{Journal vol, \string\# number}{as 34, \string\#2}
497 \optdef{b}{vnum-b}{Journal vol number}{as 34 2}
498 \optdef{x}{vnum-x}{Journal vol, without number}{as 34}
499 \getans
500 \endoptiongroup

501

502 \beginoptiongroup{VOLUME PUNCTUATION:}{}
503 \optdef{*}{}{Volume with colon}{as vol(num):ppp}
504 \optdef{s}{volp-sp}{Volume with colon and space}{as vol(num): ppp}
505 \optdef{h}{volp-semi}{Volume with semi-colon}{as vol(num); ppp}
506 \optdef{c}{volp-com}{Volume with comma}{as vol(num), ppp}
507 \optdef{b}{volp-blk}{Volume with blank}{as vol(num) ppp}
508 \getans
509 \endoptiongroup

510

511 \beginoptiongroup{YEAR IN JOURNAL SPECIFICATION:}{}
512 \optdef{*}{}{Journal year like others}{as given by date position}
513 \optdef{v}{jdt-v}{Journal vol(year)}{as 34(1995)}
514 \optdef{s}{jdt-vs}{Journal vol (year)}{as 34 (1995)}
515 \optdef{p}{jdt-p}{Year with pages}{as 34(2), (1995) 1345--1387}
516 \optdef{c}{jdt-pc}{Year, comma, pages}{as 34(2), (1995), 1345--1387}
517 \getans
518 \endoptiongroup

519

520 \beginoptiongroup{PAGE NUMBERS:}{}
521 \optdef{*}{}{Start and stop page numbers}{given}
522 \optdef{f}{jpg-1}{Only start page number}{}
523 \getans
524 \endoptiongroup

525

526 \beginoptiongroup{LARGE PAGE NUMBERS:}{}
527 \optdef{*}{}{No separators for large page numbers}{}
528 \optdef{c}{pgsep-c}{Comma inserted over 9999}{as 11,234}
529 \optdef{s}{pgsep-s}{Thin space inserted over 9999}{as 11 234}
530 \optdef{p}{pgsep-p}{Period inserted over 9999}{as 11.234}
531 \getans
532 \endoptiongroup

533

534 \beginoptiongroup{WORD `PAGE' IN ARTICLES:}{}
535 \optdef{*}{}{Article pages numbers only}{as 234-256}
536 \optdef{p}{jwdpg}{Include `page' in articles}{as pp. 234--256}
537 \getans
538 \endoptiongroup

Some journals want page numbers at the end, even for books, proceedings, as well as for journals.

539 \beginoptiongroup{POSITION OF PAGES:}{}
540 \optdef{*}{}{Pages given mid text}{as is normal}
541 \optdef{e}{pp-last}{Pages at end}{but before any notes}
542 \getans
543 \endoptiongroup

544

545 \beginoptiongroup{WORD `VOLUME' IN ARTICLES:}{}
546 \optdef{*}{}{Article volume as number only}{as 21}
547 \optdef{p}{jwdvol}{Include `volume' in articles}{as vol. 21}
548 \getans
549 \endoptiongroup

Fiddle with the format and location of the number/series for collections and inproceedings.

550 \beginoptiongroup{NUMBER AND SERIES FOR COLLECTIONS:}{}
551 \optdef{*}{num-xser}{Allows number without series}{and suppresses word "number"}
552 \optdef{s}{}{Standard BibTeX}{as: "number 123 in Total Works"; error if number and no series}
553 \getans
554 \endoptiongroup

555

556 \beginoptiongroup{POSITION OF NUMBER AND SERIES:}{}

557 \optdef{*}{}{After chapter and pages}{as in standard BibTeX}
558 \optdef{t}{numser}{Just before publisher}{or organization}
559 \getans
560 \endoptiongroup

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

561 \beginoptiongroup{JOURNAL NAME PUNCTUATION:}{}
562 \optdef{*}{}{Comma after journal}{name}
563 \optdef{x}{jnm-x}{Space after journal}{name}
564 \getans
565 \endoptiongroup

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

566 \beginoptiongroup{BOOK TITLE:}{}
567 \optdef{*}{}{Book title italic}{(\string\em)}
568 \optdef{p}{btit-rm,bt-rm}{Book title plain}{(no font command)}
569 \getans
570 \endoptiongroup

571

572 \beginoptiongroup{PAGES IN BOOKS:}{}
573 \optdef{*}{}{Pages in book plain}{as pp. 50-55}
574 \optdef{p}{bkpg-par}{Pages in book in parentheses}{as (pp. 50-55)}
575 \optdef{x}{bkpg-x}{Pages in book bare}{as 50-55}
576 \getans
577 \endoptiongroup
578 \beginoptiongroup{TOTAL PAGES OF A BOOK:}{}
579 \optdef{*}{}{Total book pages not printed}{}
580 \optdef{p}{pg-bk}{For book: 345 pages}{or pp.}
581 \getans
582 \endoptiongroup

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

New York: Wiley and Sons

Some journals (e.g. Nature) put publisher in parentheses with date, as (Wiley and Sons, New York, 1983). These normally put the date in parentheses at the end anyway, so this is a merging of the two sets of parentheses.

583 \beginoptiongroup{PUBLISHER ADDRESS:}{}
584 \optdef{*}{}{Publisher, address}{as Harcourt, New York}
585 \optdef{a}{add-pub}{Address: Publisher}{as New York: Harcourt}
586 \getans
587 \endoptiongroup

588

589 \beginoptiongroup{PUBLISHER IN PARENTHESES:}{}

590 \optdef{*}{}{Publisher as normal block}{without parentheses}
591 \optdef{p}{pub-par}{Publisher in parentheses}{}
592 \optdef{d}{pub-date}{Publisher and date in parentheses}{(Oxford, 1994)}
593 \optdef{c}{pub-date,pub-xc}{Publisher and date in parentheses, no comma}{(Oxford 1994)}
594 \optdef{f}{pub-date,pub-xpar}{Publisher and date without parentheses}{Oxford, 1994}
595 \optdef{k}{pub-date,pub-xpar,pub-xc}{Publisher and date, no parentheses, no comma}{Oxford 1994}
596 \getans
597 \endoptiongroup

598

599 \beginoptiongroup{PUBLISHER POSITION:}{}
600 \optdef{*}{}{Publisher after chapter, pages}{}
601 \optdef{p}{pre-pub}{Publisher before chapter, pages}{}
602 \optdef{e}{pre-edn}{Publisher after edition}{}
603 \getans
604 \endoptiongroup

ISBN and ISSN numbers

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

 optional entry for book, inbook, booklet, incollection, proceedings,

inproceedings. However, it should be suppressed for inbook etc. when there is a crossref to another book with the ISBN number.

Periodicals contain an ISSN number. Add this to article, or course, but also to inproceedings and proceedings, since they are sometimes printed in a periodical.

605 \beginoptiongroup{ISBN NUMBER:}{}
606 \optdef{*}{isbn}{Include ISBN}{for books, booklets, etc.}
607 \optdef{x}{}{No ISBN}{}
608 \getans
609 \endoptiongroup

610

611 \beginoptiongroup{ISSN NUMBER:}{}
612 \optdef{*}{issn}{Include ISSN}{for periodicals}
613 \optdef{x}{}{No ISSN}{}
614 \getans
615 \endoptiongroup

Editor of book without author

This is normally

J. K. James, editor

but may also be

J. K. James, (editor) J. K. James (editor),

Alternatively, the word editor may be capitalized and/or abbreviated.

616 \beginoptiongroup{`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):}{}
617 \optdef{*}{}{Word `editor' after name}{}
618 \optdef{a}{edpar}{`Name (editor),'}{in parentheses, after name, comma after}
619 \optdef{b}{edpar,bkedcap}{`Name (Editor),'}{as above, editor upper case}
620 \optdef{c}{edparc}{`Name, (editor)'}{in parentheses, after name, comma between}
621 \optdef{d}{edparc,bkedcap}{`Name, (Editor)'}{as above, editor upper case}
622 \optdef{e}{edparxc}{`Name (editor)'}{in parentheses, after name, no commas}
623 \optdef{f}{edparxc,bkedcap}{`Name (Editor)'}{as above, editor upper case}
624 \getans
625 \endoptiongroup

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

If none of the edby variations is used, then the same system is used as for edited books, i.e. edpar applies.

626 \beginoptiongroup{EDITOR IN COLLECTIONS:}{}
627 \optdef{*}{}{Same as for edited book}{(names before booktitle)}
628 \optdef{b}{edby}{In booktitle, edited by .. }{(where .. is names)}
629 \optdef{p}{edby-par}{In booktitle (edited by ..)}{}
630 \optdef{c}{edby-parc}{In booktitle, (edited by ..)}{}
631 \optdef{e}{edby,edbyx}{In booktitle, editor ..}{}
632 \optdef{f}{edby,edbyw}{In booktitle, (editor) ..}{}
633 \optdef{k}{edby-par,edbyx}{In booktitle (editor..)}{}
634 \optdef{g}{edby-parc,edbyx}{In booktitle, (editor..)}{}
635 \optdef{j}{edby,edbyy}{In booktitle, .., editor}{}
636 \optdef{m}{edby-par,edbyy}{In booktitle (.., editor)}{}
637 \getans
638 \endoptiongroup
639 \mytempfalse
640 \if\ans p\mytemptrue\fi
641 \if\ans k\mytemptrue\fi
642 \if\ans c\mytemptrue\fi
643 \if\ans f\mytemptrue\fi
644 \beginoptiongroup{CAPITALIZE `EDITOR' OR `EDITED BY'
645 (if editor capitalizable)}
646 {\ifmytemp*\fi}%
647 \optdef{*}{}{`(editor,..)' or `(edited by..)'}{in lower case}
648 \optdef{c}{edcap}{`(Editor,..)' or `(Edited by..)'}{in upper case}
649 \getans
650 \endoptiongroup

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.

651 \beginoptiongroup{PUNCTUATION BETWEEN SECTIONS (BLOCKS):}{}
652 \optdef{*}{}{\string\newblock\space after blocks}
653 {(periods or new lines with openbib option)}
654 \optdef{c}{blk-com}{Comma between blocks}{}
655 \optdef{s}{blk-com,com-semi}{Semi-colon between blocks}{}
656 \optdef{b}{blk-com,com-blank}{Blanks between blocks}{}
657 \optdef{t}{blk-tit}{Period after titles of articles, books, etc}{else commas}
658 \optdef{a}{blk-tita}{Period after titles of articles}{else commas}
659 \getans
660 \endoptiongroup
661 \mytempfalse
662 \if\ans c\mytemptrue\fi
663 \if\ans s\mytemptrue\fi
664 \if\ans b\mytemptrue\fi
665 \if\ans t\mytemptrue\fi
666 \if\ans a\mytemptrue\fi
667 \beginoptiongroup{PUNCTUATION BEFORE NOTES
668 (if not using \string\newblock)}
669 {\ifmytemp*\fi}%
670 \optdef{*}{}{Notes have regular punctuation}{like all other blocks}
671 \optdef{p}{blknt}{Notes preceded by period}{}
672 \getans
673 \endoptiongroup
674 \beginoptiongroup{PUNCTUATION AFTER AUTHORS:}{}
675 \optdef{*}{}{Author block normal}{with regular block punctuation}
676 \optdef{c}{au-col}{Author block with colon}{}
677 \getans
678 \endoptiongroup

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.

679 \beginoptiongroup{PUNCTUATION AFTER `IN':}{}
680 \optdef{*}{}{Space after `in'}{for incollection or inproceedings}
681 \optdef{c}{in-col}{Colon after `in'}{(as `In: ...')}
682 \optdef{i}{in-it}{Italic `in'}{and space}
683 \optdef{d}{in-col,in-it}{Italic `in' and colon}{}
684 \optdef{x}{in-x}{No word `in'}{for edited works}
685 \getans

686 \endoptiongroup
687 \beginoptiongroup{`IN' WITH JOURNAL NAMES
688 (if using 'in' with collections)}
689 {\if\ans x\else*\fi}
690 \optdef{*}{}{No `in' before journal name}{}
691 \optdef{i}{injnl}{Add `in' before journal name}{in style for incollection}
692 \getans
693 \endoptiongroup

Final punctuation

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

694 \beginoptiongroup{FINAL PUNCTUATION:}{}
695 \optdef{*}{}{Period at very end}{of the listed reference}
696 \optdef{x}{fin-bare}{No period at end}{}
697 \getans
698 \endoptiongroup

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

699 \beginoptiongroup{ABBREVIATE WORD `PAGES'
700 (if not using external language file)}
701 {\if!\cfile!\relax*\fi}%
702 \optdef{*}{}{`Page(s)'}{(no abbreviation)}
703 \optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
704 \optdef{x}{ppx}{`Page' omitted}{}
705 \getans
706 \beginoptiongroup{ABBREVIATE WORD `EDITORS':}{}
707 \optdef{*}{}{`Editor(s)'}{(no abbreviation)}
708 \optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
709 \getans
710 \endoptiongroup

711

712 \beginoptiongroup{OTHER ABBREVIATIONS:}{}
713 \optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
714 \optdef{a}{abr}{Abbreviations}{of such words}
715 \getans
716 \endoptiongroup
717 \beginoptiongroup{ABBREVIATION FOR `EDITION'
718 (if abbreviating words)}
719 {\if\ans a*\fi}%
720 \optdef{*}{}{`Edition' abbreviated as `edn'}{}
721 \optdef{a}{ednx}{`Edition' abbreviated as `ed'}{}

722 \getans
723 \beginoptiongroup{MONTHS WITH DOTS:}{}
724 \optdef{*}{}{Months with dots}{as Jan.}
725 \optdef{x}{mth-bare}{Months without dots}{as Feb Mar}
726 \getans
727 \endoptiongroup
728 \endoptiongroup
729 \beginoptiongroup{EDITION NUMBERS:}{}
730 \optdef{*}{xedn}{Editions as in database}{saving much processing memory}
731 \optdef{w}{}{Write out editions}{as first, second, third, etc}
732 \optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
733 \getans
734 \endoptiongroup
735 \endoptiongroup

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.

736 \umes{Reading external language file \string\cfile=\cfile}%
737 \if!\cfile!\relax\else
738 \input\cfile
739 \fi

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 options jabr or jaa since these options are selected here. No option menus from the journal-name files will be read in.

740 \beginoptiongroup{STORED JOURNAL NAMES:}{}
741 \optdef{*}{}{Full journal names}{for prestored journals}
742 \optdef{a}{jabr}{Abbreviated journal names}{}
743 \optdef{s}{jabr,jaa}{Abbreviated with astronomy shorthands}{like ApJ and AJ}
744 \getans
745 \endoptiongroup

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

746 \beginoptiongroup{AMPERSAND:}{}
747 \optdef{*}{}{Use word `and'}{in author lists}
748 \optdef{a}{amper}{Use ampersand}{in place of `and'}
749 \optdef{v}{varand}{Use \string\BIBand}{in place of `and'}
750 \getans
751 \endoptiongroup

753 \beginoptiongroup{COMMA BEFORE `AND':}{}
754 \optdef{*}{}{Comma before `and'}{as `Tom, Dick, and Harry'}
755 \optdef{n}{and-xcom}{No comma before `and'}{as `Tom, Dick and Harry'}
756 \optdef{c}{and-com}{Comma even with 2 authors}{as `Tom, and Harry'}
757 \getans
758 \endoptiongroup
759 \beginoptiongroup{COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS
760 (if using comma before `and' with authors)}
761 {\if\ans c*\fi}%
762 \optdef{*}{and-com-ed}{Comma with 2 editors}{in collections}
763 \optdef{x}{}{Two editors without comma}{as `Tom and Harry'}
764 \getans
765 \endoptiongroup
766 \beginoptiongroup{NO `AND' IN REFERENCE LIST:}{}
767 \optdef{*}{}{With `and'}{before last author in reference list}
768 \optdef{x}{xand}{No `and'}{as `Tom, Dick, Harry'}
769 \getans
770 \endoptiongroup

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.

771 \beginoptiongroup{FONT OF `ET AL':}{}
772 \optdef{*}{}{Plain et al}{}
773 \optdef{i}{etal-it}{Italic et al}{}
774 \optdef{r}{etal-rm}{Roman et al}{even when authors something else}
775 \getans
776 \endoptiongroup

Additional Data Fields

The American Physical Society’s REVTEX package contains BibTEX support with a bst file generated from a variant of merlin.mbs. The extra fields are also available here.

• collaboration: A collaboration name associated with a reference.

• eprint: The e-print citation for the reference (Los Alamos or otherwise). E-print numbers can be turned into hyperlinks to the online article. The output is

\eprint{eprint-spec}

• archive: is an optional argument for \eprint, as \eprint[archive-des]{eprint-spec}

The archive-des is some code such as arXiv that is translated to a base URL by a class or package file. The default definition of \eprint ignores archive-des and prints eprint-spec as a URL.

• url: A URL associated with the reference. Can be turned into a hyperlink.

A collaboration appears as part of the author list and the other two appear at the end of the citaton. The URL field can be selected independently of this option.

In addition there are new fields for journals like Phys. Rev. D that no longer use page numbers.

• eid: Electronic article identifier.

• numpages: Number of pages in an article. For use in conjunction with the eid field when page counts are desired. Deprecated when submitting to Phys. Rev.

The eprint (with archive) and url fields may be included independently of the other REVTEX fields.

777 \beginoptiongroup{ADDITIONAL REVTeX DATA FIELDS:}{}
778 \optdef{*}{}{No additional fields}{for REVTeX}
779 \optdef{r}{revdata,eprint,url,url-blk}{Include REVTeX data fields}
780 {collaboration, eid, eprint, archive, numpages, url}
781 \getans
782 \mytemptrue
783 \if\ans r\mytempfalse\fi
784 \beginoptiongroup{E-PRINT DATA FIELD:
785 (without REVTeX fields)}
786 {\ifmytemp*\fi}
787 \optdef{*}{}{Do not include eprint field}{}
788 \optdef{e}{eprint}{Include eprint and archive fields}{for electronic publications}
789 \getans
790 \endoptiongroup

URL address

For electronic documents with an Internet address, add a URL entry. Harvard already has this, but here it is done for all styles. The URL text will be set with the \url command in the url package by Donald Arseneau. This package must be loaded for the command to work right. It allows line breaks at punctuations. Otherwise, \texttt is used instead, with no line breaks. The URL text is preceded by \urlprefix which defaults to “URL ” but may be redefined by the user to be whatever s/he wants. The final space must be included.

Note: selecting the REVTEX fields automatically includes this, so the offer only is made if REVTEX has been rejected.

791 \beginoptiongroup{URL ADDRESS:
792 (without REVTeX fields}{\ifmytemp*\fi}
793 \optdef{*}{}{No URL}{for electronic (Internet) documents}
794 \optdef{u}{url,url-blk}{Include URL}{as regular item block}
795 \optdef{n}{url,url-nt}{URL as note}{}
796 \optdef{l}{url,url-nl}{URL on new line}{after rest of reference}
797 \getans
798 \endoptiongroup
799 \endoptiongroup

Reference Component Tagging

If reference component tagging is enabled, we apply tags like \bibinfo and \eprint to the fields of data in the content of the \bibitem statement. We also ensure that these commands have a default meaning within the scope of the thebibliography environment. The default definitions simply print the field and ignore the tag. However, other programs or packages might make use of the tag information to separate authors from title, for example.

800 \beginoptiongroup{REFERENCE COMPONENT TAGS:}{}
801 \optdef{*}{}{No reference component tags}
802 {in the \string\bibitem\space entries}
803 \optdef{b}{bibinfo}{Reference component tags}
804 {like \string\bibinfo\space in the content of \string\bibitem}
805 \getans
806 \endoptiongroup

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.

807 \beginoptiongroup{EMPHASIS:
808 (affects all so-called italics)}{}
809 \optdef{*}{}{Use emphasis}{ie, \string\em, allows font switching}
810 \optdef{i}{em-it}{Use true italics}{ie, \string\it, absolute italics}
811 \optdef{x}{em-x}{No italics}{at all}
812 \optdef{u}{em-ul}{Underlining}{in place of italics, best with ulem package}
813 \getans
814 \endoptiongroup

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

815 \beginoptiongroup{NEW FONT SELECTION SCHEME:}{}
816 \optdef{*}{}{No NFSS}{use 2.09 font commands}
817 \optdef{n}{nfss}{NFSS}{use \string\textbf, \string\emph, not \string\bf,
818  \string\em}
819 \getans
820 \endoptiongroup

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.

821 \if!\cfile\jfile!\else
822 \begingroup\MBswitch
823 \wr(,{\pc)
824 \endgroup
825 \fi

826

827 \endoptions

828 ⟨/options⟩