German and international ing A manual for the ’german’ styles

Martin Wallmeier^{∗} Göbelslehenstr. 1–b 16 8700 Würzburg West Germany e-mail: neuk121@wrzx13.rz.uni-wuerzburg.de 20^{th} April 1993

Inhaltsverzeichnis

1 Introduction 1 2 Restrictions of and problems with BIBT_{E}X 2 3 Implementation 2

3.1 mbibgerm.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.2 Available BIBTEX styles and file list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.3 Changes to the standard styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Changes 7 5 Known bugs 7

1 Introduction

The original BIBTEX version 0.99b standard styles allow only English references. There are some so called 'German' styles, but they allow only German references. I couldn’t find any style beeing able to switch between the language for mixed references. In scientific publications you will find a lot of English references beside the ones of the country, where the publication was written. But it looks awful, if you mix an english reference with german expressions, for example:

             Wilson, Braunwald, und Isselbacher, Herausgeber. Harrison's
             Principles of Internal Medicine. Band 1, twelfth Auflage...

So I tried to write a style being able to switch the language.

∗Tel.: [[0]0 49] (09 31) 80 05 – 5 10

2 Restrictions of and problems with BIBT_{E}X^{1}

There is a terrific restriction at least in my version of BIBT_{E}X: it allows only ten (10) global variables of type STRINGS. Therefore it was impossible to implement a function which would decide whether to switch the language and then call a specific function for every country that could actualize the contents of these string variables. So the only possible way seemed to be to create a series of TEX macros.

Another problem occured with BIBT_{E}X’s built in function add.period$. This function adds a point, if the last non ’}’ character is no ’.’, ’!’ or ’?’. But how to tell add.period$ that the TEX macros for abbreviations contain a point, although there is not one obvious for BIBT_{E}X? The TEX macros have one parameter now: If you abbreviate editors for example as ’eds.’ add.period$ mustn’t set a point if the corresponding TEX macro is set in the output. So \btxeditorsshort is defined as follows:

      \def\btxeditorsshort#1{eds#1}

Now you can write \btxeditorsshort{.} in the BIBT_{E}X style file and add.period$ will find a point if \btxeditorsshort{.} is the last expression in the sentence. As you can see this is only necessary for those expressions that can stand at the end of a sentence or block. ’And’ usually will not stay at the end of a sentence. So you can define the corresponding macros as pointed abbreviation, if you want to.

I had to face a last problem with the built in function change.case$. It’s similar to the one with add.period$. This function is also unable to expand the defined TEX macros. Therefore I had to define always two forms of macros \btx... and \Btx... where the second should be used where something like ‘The Quick Brown Fox Jumps Over The Lazy Dog’ is to occure and the first for something like ‘The quick brown fox… ’ if the expression starts a sentence or ‘the quick brown fox… ’ if it is used in the middle of a sentence. The change.case$ function will not be called if a title is going to be formatted and language is not set to 'english' or 'USenglish'. Henceforth you don’t have to use ’{}’ braces to avoid chang.case$ in titles of other languages. Thus typing is much easier. Typing comfort could be also improoved very much if BIBT_{E}X would understand umlauts as TEX version 3.1 and not only constructions like

{\"{a}}.

All these constructions are tricky and uncomfortable only to bypass or fool the built in BIBT_{E}X functions. Things would be much easier if more global string variables could be defined. Then BIBT_{E}X could format the content of the string variables directly and commands like add.period$ or \cange.case$ would work the same way as if the expression would occure in the text.

Now you know about the reasons why I had to make a new L^{A}T_{E}X style bibgerm.sty for use with the ger[...].bst BIBT_{E}X styles. It defines the TEX macros mentioned above and listed below.

3 Implementation

BIBT_{E}X was changed in the way that it doesn’t place string constants, but TEX macros into the output for expressions that vary in the different languages. So BIBT_{E}X generates a \selectlanguage{...} command just before the current \bibitem[...]{...} if the language field in the database entry is not empty. The-

re are only a few allowed contents for language: 'german', 'austrian', 'english', and 'USenglish',

because I’m speaking only German and bad English. 'english' does the same as 'USenglish' at the moment. I think there won’t be many differences, but I could imagine some concerning ’Master’s thesis’ and ’PhD thesis’. 'austrian' does nearly the same as 'german', only the month ’January’ is different.

It should be not so very difficult to implement other languages for someone who is a little bit acquainted to TEX or L^{A}T_{E}X. You probably needn’t change the BIBT_{E}X styles, but only to supplement the bibgerm.sty L^{A}T_{E}X style a little bit.

1Dedicated to Oren Patashnik at Stanford University. I hope this will find him anytime.

3.1 mbibgerm.sty

The macro \selectlanguage{...} of the original german.sty [4]switched already things like 'date' and 'captionnames'. There are now some new global definitions \bibsgerman, \bibsenglish and \bibsUSenglish being called by \selectlanguage{...}. The \bibs... macros redefine the meanings for a list of TEX macros according to the current language:

General Aspects

TEX macro  Meaning

\def\btx...{...} Expression in lower case letters for use in the middle of a sentence (e.

g. ’volume’).

\def\Btx...{...} Expression with the first letter capitalized for use at the beginning of a sentence (e. g. ’Volume’) or formatted like a booktitle (e. g. ’Technical Report 037’).

\def\...short##1{...##1} Mostly abbreviated expression. The tricky construction ##1 was explained above. You need double '#' because the macros are defined inside the global definition of the \bibs... macro. The parameter ##1 is used to set the last point of an abbreviation that can occure at the end of a sentence (e. g. \def\btxetalshort##1{et al##1}). If you don’t want to have a point at the end you skip the ##1 inside the braces.

\def\...long{...} Expression used for the long i. e. unabbreviated form (e. g.

                          \def\btxetallong{ et alii}).

Details

TEX macro  meaning

\def\btxetalshort##1 Used after authors or editors, if there is 'and othrers' at the end of the corresponding BIBTEX database entry field (defined as 'et al##1'). This expression might finish a sentence or block; so

                          '##1' is necessary for 'add.period$'.

\def\btxetallong  Unabbreviated form of the above (defined as 'et alii').

\def\btxandshort Used before the last author or editor if there are more than one

(defined as 'and').

\def\btxandlong  Unabbreviated form of the above (defined as 'and').

\def\btxinshort  Used with entry type @incollection or @inproceedings as

introduction for the reference to the superior work (defined as 'in').

\def\btxinlong  Unabbreviated form of the above (defined as 'in').
\def\Btxinshort  For use at the beginning of a sentence (defined as 'In').
\def\Btxinlong  Unabbreviated form of the above (defined as 'In').

\def\btxofseriesshort Used after the volume number before the title of the book series

(defined as 'of').

\def\btxofserieslong  Unabbreviated form of the above (defined as 'of').

\def\btxinseriesshort Used for a part of a book with a separate title. If there is a number

given it is placed before the title of the series (defined as 'in').

\def\btxinserieslong  Unabbreviated form of the above (defined as 'in').

TEX macro  meaning

\def\btxeditorshort##1 Abbreviation for a single editor that can be placed at the end of the

editor block (defined as 'ed##1').

\def\btxeditorlong  Unabbreviated form of the above (defined as 'editor').

\def\btxeditorsshort##1 Equivalent of the above for more than one editor (defined as

                          'eds##1').

\def\btxeditorslong  Unabbreviated form of the above (defined as 'editors').

\def\Btxeditorshort##1 This and the following macros could be used by a style file that would start a bibliography entry with something like ’Ed.: … ’ (defined as

                          'Ed##1').

\def\Btxeditorlong  Unabbreviated form of the above (defined as 'Editor').

\def\Btxeditorsshort##1 Plural of the above (defined as 'Eds##1').

\def\Btxeditorslong  Unabbreviated form of the above (defined as 'Editors').

\def\btxvolumeshort##1 Abbreviation for volume for use after a comma, i. e. in the middle of a

sentence (defined as 'vol##1').

\def\btxvolumelong  Unabbreviated form of the above (defined as 'volume').
\def\Btxvolumeshort##1  For use at the beginning of a sentence (defined as 'Vol##1').
\def\Btxvolumelong  Unabbreviated form of the above (defined as 'Volume').

\def\btxnumbershort##1 Abbreviation for number if used in the middle of a sentence (defined

                          as 'no##1').

\def\btxnumberlong  Unabbreviated form of the above (defined as 'number').
\def\Btxnumbershort##1  For use at the beginning of a sentence (defined as 'No##1').
\def\Btxnumberlong  Unabbreviated form of the above (defined as 'Number').

\def\btxeditionshort##1 Abbreviation for edition that can finish a sentence or block (defined as

                          'ed##1').

\def\btxeditionlong  Unabbreviated form of the above (defined as 'edition').
\def\Btxeditionshort##1 For use at the beginning of a sentence (defined as 'Ed##1').
\def\Btxeditionlong  Unabbreviated form of the above (defined as 'Edition').

\def\btxchaptershort##1 Abbreviation for chapter which might be placed at the end of a sentence if it would be used after first, second, etc. (defined as

                          'chap##1').

\def\btxchapterlong  Unabbreviated form of the above (defined as 'chapter').
\def\Btxchaptershort##1 For use at the beginning of a sentence (defined as 'Chap##1').
\def\Btxchapterlong  Unabbreviated form of the above (defined as 'Chapter').
\def\btxpageshort##1  Abbreviation for page (defined as 'p##1').
\def\btxpagelong  Unabbreviated form of the above (defined as 'page').

\def\btxpagesshort##1 If there are more than one page this abbreviation will be used (defined

                          as 'pp##1').

\def\btxpageslong  Unabbreviated form of the above (defined as 'pages').
\def\Btxpageshort##1  For use at the beginning of a sentence (defined as 'P##1').
\def\Btxpagelong  Unabbreviated form of the above (defined as 'Page').

\def\Btxpagesshort##1  Plural of the above (defined as 'Pp##1').

\def\Btxpageslong  Unabbreviated form of the above (defined as 'Pages').

TEX macro  Meaning

\def\btxmastthesis Expression that will be used by default if there is given no BIBTEX database entry field type in a @masterthesis entry (defined as

                          'Master's thesis').

\def\btxphdthesis Equivalent of the above for the @phdthesis entry (defined as 'PhD

                          thesis').

\def\btxtechrepshort##1 Equivalent of the above for abbreviated @techreport entry formatted like the title of an article or journal, i. e. only the first letter capitalized (defined as 'Techn. rep##1').

\def\btxtechreplong  Unabbreviated form of the above (defined as 'Technical report').

\def\Btxtechrepshort##1 Same as the above but formatted like a booktitle, i. e. all words capitalized except articles and conjunctions like ’the’ or ’of’, etc. This one is used if the number field of the @techreport entry is not empty

                          (defined as 'Techn. Rep##1').

\def\Btxtechreplong  Unabbreviated form of the above (defined as 'Technical Report').
\def\btxmonjanshort##1  Abbreviated names of the months (defined as 'Jan##1').

\def\btxmonfebshort##1  (defined as 'Feb##1').
\def\btxmonmarshort##1  (defined as 'Mar##1').
\def\btxmonaprshort##1  (defined as 'Apr##1').
\def\btxmonmayshort##1  (defined as 'May').
\def\btxmonjunshort##1  (defined as 'June').
\def\btxmonjulshort##1  (defined as 'July').
\def\btxmonaugshort##1  (defined as 'Aug##1').
\def\btxmonsepshort##1  (defined as 'Sept##1').
\def\btxmonoctshort##1  (defined as 'Oct##1').
\def\btxmonnovshort##1  (defined as 'Nov##1').
\def\btxmondecshort##1  (defined as 'Dec##1').

\def\btxmonjanlong  Unabbreviated names of the months (defined as 'January').

\def\btxmonfeblong  (defined as 'February').
\def\btxmonmarlong  (defined as 'March').
\def\btxmonaprlong  (defined as 'April').
\def\btxmonmaylong  (defined as 'May').
\def\btxmonjunlong  (defined as 'June').
\def\btxmonjullong  (defined as 'July').
\def\btxmonauglong  (defined as 'August').
\def\btxmonseplong  (defined as 'September').
\def\btxmonoctlong  (defined as 'October').
\def\btxmonnovlong  (defined as 'November').
\def\btxmondeclong  (defined as 'December').

For more details about macro programming refer to [1].

3.2 Available BIBT_{E}X styles and file list

All BIBTEX standard styles are available although I’ve changed their design a little bit. Furthermore, I adjusted the 'apalike.bst' which allows references like ’(Jones 1986)’. The names of the ’german’ BIBTEX styles, their corresponding standards, and the remaining files are listed in the following table:

BIBTEX Styles and Files

’german’  Standard

                             gerabbrv.bst  abbrv.bst
                             geralpha.bst  alpha.bst
                             gerplain.bst  plain.bst
                             gerunsrt.bst  unsrt.bst
                             gerapali.bst  apalike.bst
                             gerxampl.bib  xampl.bib

L^{A}TEX Styles

’german’  Standard

                             bibgerm.sty   german.sty
                             apalike.sty   apalike.sty

Manual for L^{A}TEX

                             gerbibtx.tex Manual and
                             gerbibtx.bib Bibliography

Original Manuals

btxdoc.tex  For general users
btxhak.tex  For style designers
btxdoc.bib  Bibliography

If you want to write BIBTEX styles on your own, you are absolutely in need of [5] and [6]. These documents should be as files in your distribution of BIBTEX. If they are not, complain violently to the distributor.

3.3 Changes to the standard styles

There are two new functions: after.authors and smallcaps. The last is similar to emphasize. It sets the authors or editors in Small Caps. If you don’t like that, you can change it to an empty function. The other one sets the new ’state’ before.title. These ’states’ are used by the different output routines to decide what punctuation is going to be placed (most times point or comma) before the string on the stack. If the current ’state’ is before.title a colon is placed before the title of what ever, i. e. regularly after authors and editors. If you don’t like this either, you can copy the function new.block to after.authors. Then a point will be set instead of a colon. gerapali.bst behaves in this way, because a colon after braces looks a little bit strange.

I’ve changed also the format of the authors’ and editors’ names to my personal favorites:

             Wallmeier, M. van, O. Patashnik, and L. van Lamport (eds.):
             BIBTEXing is great...

You can reset the original status by comparing the lines where the function format.name$ occures with the according lines in the original standard BIBTEX styles. Nevertheless you should be familar with BIBTEX’s name formatting [6, section 5.4].

I’m not in access to the original L^{A}TEX standard work [3]. But [2, appendix B] is marked as an almost extensive translation from [3]. If this is true, there are a few differences concerning the optional fields in some entry types. They concern the additional field number that is used by the entry types @book,

@inbook, @incollection, @inproceedings, and @proceedings and the additional field tpye that is used
in @masterthesis and @phdthesis.

Those were of most importance for writing bibgerm.sty and the ger[...].bst files, but there are some more [5, section 2.2 ’Changes to the standard styles’].

4 Changes

1993, April 20th: bibgerm.sty changed for use with ‘german.sty’ version 2.4. In detail: redefine ‘\selectlanguage’ or ‘\p@selectlanguage’ depending on version of ‘german.sty’.

5 Known bugs

german.sty: Probably ‘bibgerm.sty’ won’t work with ‘german.sty’ version 3.

Literatur

[1] Knuth, Donald E.: The TEXbook. Addison-Wesley Publishing Company, Reading, Massachusetts, 1984.

[2] Kopka, Helmut: L^{A}TEX — Eine Einführung. Addison-Wesley (Deutschland) GmbH, Bonn; Reading, Massachusetts, 1988. Das deutsche Standardwerk über L^{A}TEX.

[3] Lamport, Leslie: L^{A}TEX: A Document Preparation System. Addison-Wesley Publishing Company, Reading, Massachusetts, 1986.

[4] Partl, Hubert: german.sty — Version 2.3d. Erhältlich über DANTE (Deutsche Anwendervereinigung TEX e. V.): Bitnet server LISTSERV@DHDURZ1, 21. November 1990.

[5] Patashnik, Oren: BIBTEXing. Documentation for general BIBTEX users, 8^{th} February 1988.

[6] Patashnik, Oren: Designing BIBTEX styles. The part of BIBTEX’s documentation that’s not meant for general users, 8^{th} February 1988.