% allemand.sty --- Marc Torzynski, ENSPS --- 2 f\'evrier 1993
%
% A german style file compatible with `french.sty' (Bernard Gaulle &
% GUTenberg group), useful for typesetting german/french documents (may
% also be used alone for full-german documents, or with any other language
% style file based on the same language switching rules).
%
% This style option is based on AND FULL COMPATIBLE WITH:
%     GERMAN.STY, Vers. 2.4a, 12 Apr 1991,
%     maintained by Bernd Raichle (Uni Stuttgart)
%     available from DANTE by:
%        anonymous ftp: rusinfo.rus.uni-stuttgart.de [129.69.1.12]
%        in soft/tex/latex-style-supported/german
%
% Commands to be used by the end-user: see `allemand.tex' (french guide)
%                                      or  `deutsch.tex'  (german guide)
%                                      or below.
%
% Comments, inaccuracies, bugs reports to:
%   Marc Torzynski
%   ENSPS --- 7 rue de l'Universit\'e --- F-67000 Strasbourg
%   u97102 @ frccsc21.bitnet
%
% History
%
%   25 Nov. 92: first version.
%    2 Feb. 93: corrections in the switching language mecanisms for
%               compatibility with new version of french.sty.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Commands to be used by the end users:
%
% TYPOGRAPHY
%
% "a                 for Umlaut-a (like \"a), also for all other vowels.
% "s                 for sharp s  (like \ss{}).
% "ck                for ck to be hyphenated as k-k.
% "ff                for ff to be hyphenated as ff-f, also for certain
%                    other consonants.
% "S                 for SS to be \uppercase{"s}.
% "Z                 for special case SZ (use "z for lowercase \ss).
% "A, "CK, "FF etc.  uppercase versions of the above.
% "|                 to separate ligatures.
% "-                 like \-, but allowing hyphenation in the rest of
%                    the word (i.e., in the parts before and after the
%                    hyphenation point added by "-)
% ""                 like "-, but producing no hyphen sign (for x-""y).
% "~                 for an unbreakable hyphen (for `bergauf und "~ab').
% "=                 for an explicit hyphen, allowing hyphenation in
%                    the rest of the word.
% "` or \glqq        for german left  double quotes   (similar to ,,).
% "' or \grqq        for german right double quotes   (similar to ``).
%       \glq         for german left  single quotes   (similar to , ).
%       \grq         for german right single quotes   (similar to ` ).
% "< or \flqq        for french left  double quotes   (similar to <<).
% "> or \frqq        for french right double quotes   (similar to >>).
%       \flq         for (french) left  single quotes (similar to < ).
%       \frq         for (french) right single quotes (similar to > ).
% \dq                for the original quotes character (").
%
% LANGUAGE SWITCHING
%
% \german            to switch to german conventions (default if `german'
%                    is the last style-option).
% \austrian          to switch to the austrian conventions.
% \english           to go back to `normal' (i.e. english) conventions.
% \<language>        if you use a compatible style option defining
%                    \<language>, to switch to <language> conventions and,
%                    if installed, <language> hyphenation.
%
%
% COMMANDS FOR COMPATIBILTY WITH german 2.4a
%
% \selectlanguage{n} same as \<language>.
% \originalTeX       same as \english.
% \germanTeX         same as \german.
%
% Obsolete commands, provided for compatibility with existing
% applications:
% \3                 for sharp s (like "s).
% \ck                for ck to be hyphenated as k-k (like "ck).
%
% Obsolete command, incompatible with the former definition:
% \setlanguage       the former name of \selectlanguage;
%                    TeX 3.x introduces a new primitive with the
%                    same name (DO NOT USE \setlanguage!)
%
% LOWER LEVEL COMMANDS AND FEATURES
% \umlautlow         redefines the Umlaut accent such that the dots come
%                    nearer to the letter and that hyphenation is enabled
%                    in the rest of the word.
% \umlauthigh        restores \" to its original meaning.
% \ss                is \lccode'd to enable hyphenation.
% \mdqon             makes " an active (meta-) character that does the
%                    pretty things described above.
% \mdqoff            restores " to its original meaning.
% \dospecials,\@sanitize  are extended to include the ".
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END OF DOCUMENTATION, BEGINNING THE CODE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% GENERALITIES
%
% Disallow twice loading:
%
\expandafter\ifx\csname germanTeXmods\endcsname\relax\else\endinput\fi
%
% Some macros needed by the style file but not known by plain TeX:
%
\def\makeatletter{\catcode`\@=11\relax}%...................\makeatletter
\def\makeatother{\catcode`\@=12\relax}%....................\makeatother
\ifcat/@ \makeatletter\let\resetat\makeatother%
    \else\let\resetat\relax\fi
\newwrite\@unused%..........................................\@unused
\long\def\@ifundefined#1#2#3{\expandafter\ifx\csname%......\@ifundefined
    #1\endcsname\relax#2\else#3\fi}
\@ifundefined{protect}{\def\protect{}}{}%..................\protect
\@ifundefined{typeout}{%....................................\typeout
    \global\newlinechar`\^^J%
    \def\typeout#1{{\let\protect\string\immediate\write\@unused{#1}}}%
    }{}%
%
\typeout{^^J Option de style ALLEMAND -- 2 fevrier 1993}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MACROS FROM `german.sty' V.2.4a, 12/4/92
%
% \allowhyphens simulates a word boundary,
% kerning information will be lost!
\def\allowhyphens{\penalty\@M \hskip\z@skip}
%                {\nobreak    \hskip 0pt plus 0pt\relax}
%
\def\umlauthigh{\def\"##1{{\accent127 ##1}}}
\def\umlautlow{\def\"{\protect\newumlaut}}
%
% The macro \newumlaut fools the TeX primitive \accent to lower the
% accent character to the base character. To do this, the current
% value of `ex' (or \fontdimen5 of the current font) is changed to
%    height(umlautaccent) - (0.25ex + 0.20ex)
% [ ~= 1.10117ex for cm-fonts]
% The value of `0.20ex' depends on the METAFONT parameters of the
% fonts, it may vary around the value of .20ex -- just try out, which
% look the best!
%
\expandafter\ifx\csname U@D\endcsname\relax
  \csname newdimen\endcsname\U@D
\fi
\def\newumlaut#1{\leavevmode\allowhyphens{\U@D 1ex%
%       compute new ex value
  {\setbox\z@\hbox{\char127}\dimen@-.45ex\advance\dimen@\ht\z@
%       don't change, if new-ex <= old-ex
  \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}%
%       because \fontdimen changes are global, restore ex
  \accent127\fontdimen5\font\U@D #1}\allowhyphens}
%
\def\highumlaut#1{\leavevmode\allowhyphens
   {\accent127 #1}\allowhyphens}
%
%  Quotes
%  ------
%
\def\set@low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}%
  \setbox\z@\hbox{\dimen@\ht\z@ \advance\dimen@ -\ht\tw@
      \lower\dimen@\box\z@}%
  \ht\z@\ht\tw@ \dp\z@\dp\tw@}
% (This lowers the german left quotes to the same level as the comma.
% Use it inside a group only.)
%
\def\save@sf@q#1{{\ifhmode \edef\@SF{\spacefactor\the\spacefactor}\else
  \let\@SF\empty \fi \leavevmode #1\@SF}}
%
% Defining macros for quotes but saving older definitions:
%
\let\@glqqGORI\glqq
\let\@grqqGORI\grqq
\let\@glqGORI\glq
\let\@grqGORI\grq
\let\@flqqGORI\flqq
\let\@frqqGORI\frqq
\let\@flqGORI\flq
\let\@frqGORI\frq
%
\def\@glqq{\save@sf@q{\set@low@box{''\/}\box\z@\kern-.04em\allowhyphens}}
\def\glqq{\ifGMA\protect\@glqq\else\@glqqGORI\fi}
\def\@grqq{\save@sf@q{\kern-.07em``\kern.07em}}
\def\grqq{\ifGMA\protect\@grqq\else\@grqqGORI\fi}
\def\@glq{\save@sf@q{\set@low@box{'\/}\box\z@\kern-.04em\allowhyphens}}
\def\glq{\ifGMA\protect\@glq\else\@glqGORI\fi}
\def\@grq{\save@sf@q{\kern-.0125em`\kern.07em}}
\def\grq{\ifGMA\protect\@grq\else\@grqGORI\fi}
\def\@flqq{\relax\ifmmode \ll \else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle \ll $}\allowhyphens}\fi}
\def\flqq{\ifGMA\protect\@flqq\else\@flqqGORI\fi}
\def\@frqq{\relax\ifmmode \gg \else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle \gg $}\allowhyphens}\fi}
\def\frqq{\ifGMA\protect\@frqq\else\@frqqGORI\fi}
\def\@flq{\relax\ifmmode <\else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle <$}\allowhyphens}\fi}
\def\flq{\ifGMA\protect\@flq\else\@flqGORI\fi}
\def\@frq{\relax\ifmmode >\else \save@sf@q{\allowhyphens
    \raise .2ex\hbox{$\scriptscriptstyle >$}\allowhyphens}\fi}
\def\frq{\ifGMA\protect\@frq\else\@frqGORI\fi}
%
% enable hyphenations after \ss:
%
\lccode`\^^Y=`\^^Y
%
\let\original@three=\3 % Note that \3 may be defined or undefined.
%
% add doublequotes to the definitions of dospecials and sanitize:
\begingroup
  \def\do{\noexpand\do\noexpand}%
  \edef\x{\endgroup
    \def\noexpand\dospecials{\dospecials\do\"}}%
\x
% not ( \ifundefined{@sanitize} or \@sanitize=\relax ) = if LaTeX
\expandafter\ifx\csname @sanitize\endcsname\relax \else
  \begingroup
    \def\@makeother{\noexpand\@makeother\noexpand}%
    \edef\x{\endgroup
      \def\noexpand\@sanitize{\@sanitize\@makeother\"}}%
  \x
\fi
%
\def\mdqon{\catcode`\"\active}
\def\mdqoff{\catcode`\"12 }
%
\def\ck{\allowhyphens\discretionary{k-}{}{c}k\allowhyphens}
%
%  active doublequote mechanism
%  ----------------------------
%
\begingroup \mdqoff
\def\x{\endgroup
  \def\@UMLAUT{\"}%
  \def\@MATHUMLAUT{\ddot}%  \mathaccent"707F
  \def\@SS{\mathchar"7019 }%
  \def\dq{"}}
\x
%
% Older versions of german.sty (before 2.3e incl.) don't warn about
% undefined "x sequences used by the user.  The current version allows
% three warning/error levels:
%   0... no warning/error
%   1... error when using an undefined "x sequence
%   2... same as 1, additionally warning for rarely used "x sequences
% (Remark: this is a experimental feature!)
%
\def\dqwarninglevel#1{\chardef\dq@warninglevel=#1\relax}
% intialize the warning level
\dqwarninglevel{1}
%
% Error and warning messages:
% TeX 3.x has an additional register containing the current input line
% number. If \on@line is undefined (it's defined in newer versions of
% `lplain'), define it.
%
\ifx\on@line\undefined
  \ifx\inputlineno\undefined \let\on@line\@empty
  \else
    \ifnum\inputlineno<\z@ \let\on@line\@empty
    \else \def\on@line{ on input line \the\inputlineno}
    \fi
  \fi
\fi
%
\def\@dq@error#1{%
  \errhelp{Use `` for a simple double quote character.}%
  \errmessage{allemand.sty: the command `\dq\string#1' is undefined}}
%
\def\@dq@warning#1{%
   \immediate\write\sixt@@n{allemand.sty: %
       `\dq\string#1' is possibly wrong\on@line !}}
%
% For all arguments of an active doublequote which should be treated in
% a special way, we define a macro with the argument text in the name.
%
% \dq@macro#1#2 constructs this name out of #2 before calling #1.
%
% - If the expansion of \dq@macro results in another call of \dq@macro
%   the inner macro shouldn't contain unexpandable primitives like
%   \relax. Otherwise TeX warns about a "Missing \endcsname inserted."
%   Example: Gr"{u"se})
% - When this macro is used in the following code, a `@' is added at
%   the end of argument #2, because we use \string in \dq@prtct to
%   protect the argument of an active doublequote (Example: "").
%
\def\dq@macro#1#2{\expandafter#1\csname @dq@\string #2@dq\endcsname}
%
% The definition of the active doublequote macro:
%
% If used with DC/EC-fonts, correct kerning and ligature building is
% inhibited by \protect (with meaning \relax). This is checked in the macro
% \@@@active@dq.
%
\def\@active@dq#1{%
  \dq@macro\ifx{#1@}\relax%
    \ifnum\dq@warninglevel>\z@ \@dq@error{#1}\fi%
    \expandafter\@normal@dq%
  \else%
    \expandafter\@@active@dq%
  \fi {#1}}
%
\def\@@active@dq#1{%
  \dq@macro\ifx{#1@}\noexpand%
    \expandafter\normal@dq%
  \else%
    \expandafter\@@@active@dq%
  \fi {#1}}
%
% The braces of {#1} in \@active@dq are necessary if someone wants to
% define a doublequote macro for things like "{}. They ensure that
% \active@dq is called with the correct argument.
% For \normal@dq we have to delete the braces and insert a normal
% doublequote.
%
\def\normal@dq#1{\dq #1}
\def\@normal@dq#1{``#1}
%
% \protect (with meaning \relax) should expand to \empty.
% This is necessary to allow correct kerning and ligatures when
% these macros are used with the new DC-/EC-fonts.
% The additional hack `\dq@prtct' is necessary if \protect is set
% to \noexpand or \string (in \write and \mark commands; see
% LaTeX.tex) and the argument is an expandable token (e.g. when
% using "").
%
\def\@@@active@dq#1{\ifx\protect\relax \else%
  \ifx\protect\empty \else%
    \expandafter\expandafter\expandafter\protect%
  \fi\fi%
  \active@dq\dq@prtct{#1@}}
%
% \dq@prtct is used to protect the argument (with \string).
% If the "x command is written to the toc-file (in LaTeX), it is
% written and read more than once. To make sure that this is done
% properly, this macro expands to "itself" (\string\dq@prtct).
% To get rid of unwanted tokens (e.g. a possible stringified
% `\dq@prtct') in \active@dq, we use the opening brace as
% delimiter.
%
\def\dq@prtct#1#{\@dq@prtct}
\def\@dq@prtct#1{\string\dq@prtct{\string#1}}
%
% For combinations "x which should be treated in a special way,
% \active@dq is called with `x' as argument.
% In the current implementation the actions for argument #2 are saved
% in macros with name \dq@macro{..}{#2@}. (The `@' is inserted in
% \@@active@dq.) These macros expand to two groups containing the
% action for text and for math mode.
% The support of other ``modes'' (e.g. DC/EC-Fonts) can be implemented
% in this macro.
%
\def\active@dq#1#{\active@@dq}
\def\active@@dq#1{%
  \csname dq@\ifmmode second\else first\fi%
%     \dq@macro has to be expanded three times:
%     1. \dq@macro          --> \expandafter..\csname...
%     2. \csname...         --> control seqence
%     3. control seqence    --> {text mode}{math mode}
    \expandafter\expandafter\expandafter\expandafter%
  \dq@macro\endcsname{#1}}
%
\def\dq@first#1#2{#1}
\def\dq@second#1#2{#2}
%
% The definition of a "-macro is done with...
%
\def\def@dqmacro#1#2#3{\dq@macro\def{#1@}{{#2}{#3}}}
%
\def\let@dqmacro#1#2{\begingroup%
  \edef\x{\endgroup \let%
    \dq@macro\noexpand{#1@}\dq@macro\noexpand{#2@}}%
  \x}
%
% For all possible "x combinations for a hex number, we
% assign the meaning of \noexpand to the "-macro.
% These "x combinations expand to `\dq x'.
% (Remark: "A, "C, "E and "F will be redefined later.)
%
\dq@macro\let{0@}=\noexpand
\let@dqmacro{1}{0}\let@dqmacro{2}{0}\let@dqmacro{3}{0}
\let@dqmacro{4}{0}\let@dqmacro{5}{0}\let@dqmacro{6}{0}
\let@dqmacro{7}{0}\let@dqmacro{8}{0}\let@dqmacro{9}{0}
\let@dqmacro{A}{0}\let@dqmacro{B}{0}\let@dqmacro{C}{0}
\let@dqmacro{D}{0}\let@dqmacro{E}{0}\let@dqmacro{F}{0}
% For compatibility, we let "{} expand to a \dq without
% a warning.
\let@dqmacro{}{0}
%
% Definitions for all doublequote macros...
% (The empty groups after some macros are necessary for \write commands,
% otherwise spaces after these macros will be ignored.)
%
% umlauts:
%
\def@dqmacro{a}{\@UMLAUT a}{\@MATHUMLAUT a}
\def@dqmacro{o}{\@UMLAUT o}{\@MATHUMLAUT o}
\def@dqmacro{u}{\@UMLAUT u}{\@MATHUMLAUT u}
\def@dqmacro{A}{\@UMLAUT A}{\@MATHUMLAUT A}
\def@dqmacro{O}{\@UMLAUT O}{\@MATHUMLAUT O}
\def@dqmacro{U}{\@UMLAUT U}{\@MATHUMLAUT U}
%
% german es-zet:
%
\def@dqmacro{s}{\ss{}}{\@SS{}}
\def@dqmacro{S}{SS}{SS}
%
% special case: MASSE/Masse vs. MASZE/Ma\ss e/Ma"ze
\let@dqmacro{z}{s}
\def@dqmacro{Z}{SZ}{SZ}
%
% german and french quotes:
%
\def@dqmacro{`}{\glqq{}}{\glqq{}}
\def@dqmacro{'}{\grqq{}}{\grqq{}}
\def@dqmacro{<}{\flqq{}}{\flqq{}}
\def@dqmacro{>}{\frqq{}}{\frqq{}}
%
% tremas:
%
\def@dqmacro{e}{\highumlaut e}{\@MATHUMLAUT e}
\def@dqmacro{E}{\highumlaut E}{\@MATHUMLAUT E}
\def@dqmacro{i}{\highumlaut\i{}}{\@MATHUMLAUT\imath}
\def@dqmacro{I}{\highumlaut I}{\@MATHUMLAUT I}
%
% misc.:
%
\def@dqmacro{-}{\allowhyphens\-\allowhyphens}%
    {\allowhyphens\-\allowhyphens}
\def@dqmacro{|}{\allowhyphens
    \discretionary{-}{}{\kern.03em}\allowhyphens}{}
\def@dqmacro{"}{\hskip\z@skip}{\hskip\z@skip}
%
\def@dqmacro{~}{\leavevmode\hbox{-}}{-}
\def@dqmacro{=}{\allowhyphens-\hskip\z@skip}{\allowhyphens-\hskip\z@skip}
%
% discretionaries:
%
\def\dq@disc#1#2{\allowhyphens
  \ifnum\dq@warninglevel>\@ne \@dq@warning{#1}\fi
  \discretionary{#2-}{}{#1}\allowhyphens}
%
\def@dqmacro{c}{\dq@disc ck}{c}
\def@dqmacro{C}{\dq@disc CK}{C}
\def@dqmacro{f}{\dq@disc f{ff}}{f}
\def@dqmacro{F}{\dq@disc F{FF}}{F}
\def@dqmacro{l}{\dq@disc l{ll}}{l}
\def@dqmacro{L}{\dq@disc L{LL}}{L}
\def@dqmacro{m}{\dq@disc m{mm}}{m}
\def@dqmacro{M}{\dq@disc M{MM}}{M}
\def@dqmacro{n}{\dq@disc n{nn}}{n}
\def@dqmacro{N}{\dq@disc N{NN}}{N}
\def@dqmacro{p}{\dq@disc p{pp}}{p}
\def@dqmacro{P}{\dq@disc P{PP}}{P}
\def@dqmacro{t}{\dq@disc t{tt}}{t}
\def@dqmacro{T}{\dq@disc T{TT}}{T}
%
%  Language Specific Settings
%  --------------------------
%
\def\extrasgerman{\frenchspacing%...........................\extrasgerman
    \lefthyphenmin=2 \righthyphenmin=2}
\def\noextrasgerman{\nonfrenchspacing%......................\noextrasgerman
    \lefthyphenmin=2 \righthyphenmin=3}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CAPTIONS STUFF: loading and restoring macros
%
\@ifundefined{captionsnames}{\input english.sty}{}%.........loading captions
%
% `french.sty'-compatible definitions of german or austrian captions & date:
%
\def\todaygerman{\number\day.~\ifcase\month \or%...........\todaygerman
    Januar\or Februar\or M\"arz\or%
    April\or Mai\or Juni\or%
    Juli\or August\or September\or%
    Oktober\or November\or Dezember\fi%
    \space\number\year}
%
\def\todayaustrian{\number\day.~\ifcase\month \or%.........\todayaustrian
    J\"anner\or Februar\or M\"arz\or%
    April\or Mai\or Juni\or%
    Juli\or August\or September\or%
    Oktober\or November\or Dezember\fi%
    \space\number\year}
%
\def\captionsgerman{%......................................\captionsgerman
    \ifx\captionsnames\captionsgerman\else%
    \let\@tdGORI\today%
    \let\@cnGORI\captionsnames%
% The following for styles: article, report and book
    \def\pagename{Seite}%
    \def\refname{Literatur}%
    \def\abstractname{Zusammenfassung}%
    \def\bibname{Literaturverzeichnis}%
    \def\contentsname{Inhaltverzeichnis}% or: Inhalt
    \def\listfigurename{Abbildungsverzeichnis}%
    \def\listtablename{Tabellenverzeichnis}%
    \def\indexname{Index}%
    \def\seename{siehe}% used normally in makeidx.sty
    \def\seealsoname{siehe auch}%
    \def\figurename{Abbildung}%
    \def\tablename{Tabbelle}%             or: Tafel
    \def\partname{Teil}%
    \def\glossaryname{Glossar}%
% The following is only for the letter style
    \def\headtoname{An}%
    \def\ccname{Verteiler}%               or: Kopien an
    \def\enclname{Anlange(n)}%            or: Beilage(n)
    \def\PSname{PS:}%
    \def\Objectname{Betreff:}% Object of the letter
    \def\YourRefname{Ihre Zeichen:}% Your reference number
    \def\OurRefname{Unsere Zeichen:}% Our reference number
%
% The following is only for report and book styles
    \def\chaptername{Kapitel}%
    \def\appendixname{Anhang}%
%
    \let\captionsnames\captionsgerman%
    \fi%
    \let\today\todaygerman%
\def\@cGORI{\@cnGORI% Restore original caption names
    \let\today\@tdGORI}%
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FRENCH.STY-LIKE LANGUAGE SWITCHING MACROS
%
% Command to do extra things and switch to another language:
%
\@ifundefined{switchtolanguage}{%...........................\switchtolanguage
    \def\switchtolanguage#1{#1}}{}%
\let\@stlGORI\switchtolanguage%
%
%%%%%%%%%%% GERMAN
% Commands to (in)activate all german tools except hyphenation:
%
\begingroup \mdqon%
\def\x{\endgroup%
\def\nomoregerman{%........................................\nomoregerman
    \let\ifGMA\iffalse%
    \@cGORI%
    \mdqoff \let"\dq \umlauthigh \let\3\original@three%
    \noextrasgerman%
    \let\switchtolanguage\@stlGORI%
    \switchtolanguage}
\gdef\germanTeXmods{%.......................................\germanTeXmods
    \let\ifGMA\iftrue%
    \captionsgerman%
    \mdqon \let"\@active@dq \umlautlow  \let\3\ss%
    \extrasgerman%
    \let\switchtolanguage\nomoregerman}
}%end \x
\x
%
% The command to set german hyphenation:
% (normally set at INITeX) it should equal to \language=x and nothing else
%
\@ifundefined{german}{\gdef\german{\relax}}{}%..............Default \german
\let\germanORI\german% assuming \language=x was set here
%
% Final command to initialize german stuff:
%
\def\german{\switchtolanguage\germanTeXmods\germanORI}%.....Final \german
%
%%%%%%%%%%% AUSTRIAN
% Commands to (in)activate all austrian tools except hyphenation:
% the same as those for german, except for the date command.
%
\let\nomoreaustrian\nomoregerman%..........................\nomoreaustrian
\def\austrianTeXmods{\germanTeXmods%.......................\austrianTeXmods
    \let\today\todayaustrian}
\@ifundefined{austrian}%...................................Default \austrian
    {\let\austrianORI\germanORI}% if undef'd, use german patterns
    {\let\austrianORI\austrian}%  else use austrian
\def\austrian{\switchtolanguage\austrianTeXmods\austrianORI}% Final \austrian
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMMANDS FOR COMPATIBILITY WITH `german.sty' V.2.4a, 12/4/92
%
\let\originalTeX\english%...................................\originalTeX
\let\germanTeX\german%......................................\germanTeX
\let\USenglish\english%.....................................\USenglish
%
\def\selectlanguage#1{\protect\p@selectlanguage{%...........\selectlanguage
    \ifnum\escapechar=\expandafter`\string#1\empty
    \else \string#1\empty\fi}}
\def\p@selectlanguage#1{
    \@ifundefined{#1}{
    \errhelp{Your command will be ignored.}
    \errmessage{allemand.sty: the language `#1' is undefined}}
    {\csname #1\endcsname}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPLY GERMAN CONVENTIONS
%
% Redefinition of cs \document for switch directly to the \beginlanguage
% at the \begin{document} time:
%
\@ifundefined{document}{}{% let it undefined.................\document
        \let\@dGORI\document%
        \def\document{\@dGORI\beginlanguage}}
%
% For Latex: first language will be German (unless redefined):
\def\beginlanguage{\german}% might be used at \begin{document} time
%
% For plain TeX (or any format which don't def. a cs \document):
% switch direclty to german conventions:
\expandafter\ifx\csname document\endcsname\relax\german\fi
%
\resetat
\endinput
