%\iffalse         THIS IS A META COMMENT
% File: english.mbs
% Copyright 1995-1999 Patrick W Daly
% Max-Planck-Institut f\"ur Aeronomie
% Max-Planck-Str. 2
% D-37191 Katlenburg-Lindau
% Germany
% E-mail: daly@linmpi.mpg.de
% 
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.
%
% It is part of the custom-bib collection, 
%   a contribution to the LaTeX2e system.
%==================================================================== 
%       A Language Definition File:  ENGLISH
%     to be included with other master bibliography style files
%--------------------------------------------------------------------
%   (See version and date in the \ProvidesFile command below)
%--------------------------------------------------------------------
%    This file is self-documenting: simply LaTeX it!
%==================================================================== 
%
 %-------------------------------------------------------------------
 % Begin module:
%\fi
 % \ProvidesFile{english.mbs}[1999/02/24 1.3 (PWD)]
%\iffalse
%<*a&!a>
% The following ensures that the driver part is not seen by makebst
% The driver part must not contain any \end other than \end{document} !
\ifx\endoptions\undefined\let\tempx=\relax\else
  \long\def\tempx#1\end#2{}\fi\tempx
%</a&!a>
%<*driver>
   \NeedsTeXFormat{LaTeX2e}%
   \documentclass[a4paper,10pt,twoside]{article}%
   \usepackage{doc}%
   \raggedbottom
   \CodelineNumbered
   \RecordChanges
 %  Comment out next line to print coding
   \OnlyDescription
   \setlength{\oddsidemargin}{0.5\paperwidth}
   \addtolength{\oddsidemargin}{-0.5\textwidth}
   \addtolength{\oddsidemargin}{-1in}
   \setlength{\evensidemargin}{\oddsidemargin}

\begin{document}
   \DocInput{english.mbs}
\end{document}
%</driver>
%                   END OF META COMMENT   \fi
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \setcounter{StandardModuleDepth}{1}
% \setcounter{IndexColumns}{2}
% \setlength{\IndexMin}{10cm}
%
% \changes{1.0}{1995 Mar 15}{Initial version}
% \changes{1.1}{1995 May 4}{Do no abbreviate `edited by'}
% \changes{1.2}{1998 Aug 17}{Add \texttt{bbl.etal}}
% \changes{1.3}{1999 Feb 1}{Make consistent with merlin 3.88}
% \changes{1.3}{1999 Feb 24}{Update copyright notice}
%
% \pagestyle{myheadings}
% \markboth{P. W. Daly}{English Bibliographies}
%
% \title{{\bfseries English Language Definition File}\\
%      for master bibliographic style files}
%    
% \author{Patrick W. Daly}
%         
% \GetFileInfo{english.mbs}
% \date{This paper describes file \texttt{\filename},\\
%  version \fileversion{} from \filedate}
% 
% \maketitle
%
% \MakeShortVerb{\|}
% 
% \parskip=1ex \parindent=0pt
%
% \newcommand{\btx}{{\sc Bib}\TeX}
% \newcommand{\dtx}{\textsf{docstrip}}
% 
% \section{Introduction}
% This file is to be used as a language definition file with master
% bibliographic files. The language it defines is
% \begin{quote}\bfseries English\end{quote}
% 
% This is not a self-sufficient \texttt{.mbs} file, but rather may
% be used together with one that contains language support via
% external definition files.
% 
% See the documentation for \texttt{makebst} for formatting details.
% 
% \section{The Menu Information}
% 
% All the menu information is nested between \dtx{} guard options
% |%<*options>| \dots\ |%</options>|, and the last command is
% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
% extract only the menu information or the documentation driver.
% 
%    \begin{macrocode}
%<*options>
\mes{^^JOptions for ENGLISH}
\wr{\spsp\spsp\sep english\pc: English language}

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

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

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

\if\ans a
\mes{^^JABBREVIATION FOR `EDITION':}
\optdef{*}{}{`Edition' abbreviated as `edn'}{}
\optdef{a}{ednx}{`Edition' abbreviated as `ed'}{}
\getans

\mes{^^JMONTHS WITH DOTS:}
\optdef{*}{}{Months with dots}{as Jan.}
\optdef{x}{mth-bare}{Months without dots}{as Feb Mar}
\getans
\fi

\mes{^^JEDITION NUMBERS:}
\optdef{*}{xedn}{Editions as in database}{saving much processing memory}
\optdef{w}{}{Write out editions}{as first, second, third, etc}
\optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
\getans

\endoptions
%</options>
%    \end{macrocode}
% 
% \StopEventually{\PrintChanges}
%
% \section{The Coding}
%    \begin{macrocode}
%<*!options&!driver>

 % The language selected here is ENGLISH
FUNCTION {bbl.and}
{ "and"}

FUNCTION {bbl.etal}
{ "et~al." }

FUNCTION {bbl.editors}
%<!ed>{ "editors" }
%<ed>{ "eds." }

FUNCTION {bbl.editor}
%<!ed>{ "editor" }
%<ed>{ "ed." }

FUNCTION {bbl.edby}
{ "edited by" }

FUNCTION {bbl.edition}
%<!abr>{ "edition" }
%<abr&!ednx>{ "edn." }
%<abr&ednx>{ "ed." }

FUNCTION {bbl.volume}
%<!abr>{ "volume" }
%<abr>{ "vol." }

FUNCTION {bbl.of}
{ "of" }

FUNCTION {bbl.number}
%<!abr>{ "number" }
%<abr>{ "no." }

FUNCTION {bbl.nr}
{ "no." }

FUNCTION {bbl.in}
{ "in" }

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

FUNCTION {bbl.page}
%<!pp>{ "page" }
%<pp>{ "p." }

FUNCTION {bbl.chapter}
%<!abr>{ "chapter" }
%<abr>{ "chap." }

FUNCTION {bbl.techrep}
%<!abr>{ "Technical Report" }
%<abr>{ "Tech. Rep." }

FUNCTION {bbl.mthesis}
{ "Master's thesis" }

FUNCTION {bbl.phdthesis}
{ "Ph.D. thesis" }

%<*!xedn>
FUNCTION {bbl.first}
%<!ord>{ "First" }
%<ord>{ "1st" }

FUNCTION {bbl.second}
%<!ord>{ "Second" }
%<ord>{ "2nd" }

FUNCTION {bbl.third}
%<!ord>{ "Third" }
%<ord>{ "3rd" }

FUNCTION {bbl.fourth}
%<!ord>{ "Fourth" }
%<ord>{ "4th" }

FUNCTION {bbl.fifth}
%<!ord>{ "Fifth" }
%<ord>{ "5th" }

FUNCTION {bbl.st}
{ "st" }

FUNCTION {bbl.nd}
{ "nd" }

FUNCTION {bbl.rd}
{ "rd" }

FUNCTION {bbl.th}
{ "th" }

%    \end{macrocode}
% This function adds English endings for ordinals 1, 2, 3. However, if
% the second last digit is 1, then the ending is `th' for all last digits.
% So far, all other languages included do not have this problem, and it is
% sufficient to add the \textsl{th} equivalent. This might change with further
% languages. 
% 
%    \begin{macrocode}
FUNCTION {eng.ord}
{ duplicate$ "1" swap$ * 
  #-2 #1 substring$ "1" =
     { bbl.th * }
     { duplicate$ #-1 #1 substring$ 
       duplicate$ "1" =
         { pop$ bbl.st * }
         { duplicate$ "2" =
             { pop$ bbl.nd * }
             { "3" =
                 { bbl.rd * }
                 { bbl.th * }
               if$
             }
           if$
          }
       if$
     }         
   if$
}

%</!xedn>
%<*!abr>
MACRO {jan} {"January"}

MACRO {feb} {"February"}

MACRO {mar} {"March"}

MACRO {apr} {"April"}

MACRO {may} {"May"}

MACRO {jun} {"June"}

MACRO {jul} {"July"}

MACRO {aug} {"August"}

MACRO {sep} {"September"}

MACRO {oct} {"October"}

MACRO {nov} {"November"}

MACRO {dec} {"December"}

%</!abr>
%<*abr>
MACRO {jan} {"Jan."}

MACRO {feb} {"Feb."}

MACRO {mar} {"Mar."}

MACRO {apr} {"Apr."}

MACRO {may} {"May"}

MACRO {jun} {"Jun."}

MACRO {jul} {"Jul."}

MACRO {aug} {"Aug."}

MACRO {sep} {"Sep."}

MACRO {oct} {"Oct."}

MACRO {nov} {"Nov."}

MACRO {dec} {"Dec."}

%</abr>
%</!options&!driver>
 % End module: english.mbs
%    \end{macrocode}
% \Finale
