1 % \iffalse meta-comment
3 % Copyright 1989-2008 Johannes L. Braams and any individual authors
4 % listed elsewhere in this file. All rights reserved.
6 % This file is part of the Babel system.
7 % --------------------------------------
9 % It may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either version 1.3
11 % of this license or (at your option) any later version.
12 % The latest version of this license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3 or later is part of all distributions of LaTeX
15 % version 2003/12/01 or later.
17 % This work has the LPPL maintenance status "maintained".
19 % The Current Maintainer of this work is Johannes Braams.
21 % The list of all files belonging to the Babel system is
22 % given in the file `manifest.bbl. See also `legal.bbl' for additional
25 % The list of derived (unpacked) files belonging to the distribution
26 % and covered by LPPL is defined by the unpacking scripts (with
27 % extension .ins) which are part of the distribution.
32 % Tell the \LaTeX\ system who we are and write an entry on the
35 \ProvidesFile{ngermanb.dtx}
37 %<code>\ProvidesLanguage{ngermanb}
39 %\ProvidesFile{ngermanb.dtx}
40 [2008/07/06 v2.6n new German support from the babel system]
42 %% File `ngermanb.dtx'
43 %% Babel package for LaTeX version 2e
44 %% Copyright (C) 1989 - 2008
45 %% by Johannes Braams, TeXniek
47 %% new Germanb Language Definition File
48 %% Copyright (C) 1989 - 2008
49 %% by Bernd Raichle raichle at azu.Informatik.Uni-Stuttgart.de
50 %% Johannes Braams, TeXniek,
52 % This file is based on german.tex version 2.5e
53 % by Bernd Raichle, Hubert Partl et.al.
55 %% Please report errors to: J.L. Braams
56 %% babel at braams.xs4all.nl
59 \documentclass{ltxdoc}
60 \font\manual=logo10 % font used for the METAFONT logo, etc.
61 \newcommand*\MF{{\manual META}\-{\manual FONT}}
62 \newcommand*\TeXhax{\TeX hax}
63 \newcommand*\babel{\textsf{babel}}
64 \newcommand*\langvar{$\langle \it lang \rangle$}
65 \newcommand*\note[1]{}
66 \newcommand*\Lopt[1]{\textsf{#1}}
67 \newcommand*\file[1]{\texttt{#1}}
69 \DocInput{ngermanb.dtx}
73 % \GetFileInfo{ngermanb.dtx}
75 % \changes{ngermanb-2.6f}{1999/03/24}{Renamed from \file{germanb.ldf};
76 % language names changed from \texttt{german} and \texttt{austrian}
77 % to \texttt{ngerman} and \texttt{naustrian}.}
79 % \section{The German language -- new orthography}
81 % The file \file{\filename}\footnote{The file described in this
82 % section has version number \fileversion\ and was last revised on
83 % \filedate.} defines all the language definition macros for the
84 % German language with the `new orthography' introduced in
85 % August 1998. This includes also the Austrian dialect of this
88 % As with the `traditional' German orthography,
89 % the character |"| is made active, and
90 % the commands in table~\ref{tab:german-quote} can be used, except
91 % for |"ck| and |"ff| etc., which are no longer required.
93 % The internal language names are |ngerman| and |naustrian|.
97 % When this file was read through the option \Lopt{ngermanb} we make
98 % it behave as if \Lopt{ngerman} was specified.
100 \def\bbl@tempa{ngermanb}
101 \ifx\CurrentOption\bbl@tempa
102 \def\CurrentOption{ngerman}
106 % The macro |\LdfInit| takes care of preventing that this file is
107 % loaded more than once, checking the category code of the
108 % \texttt{@} sign, etc.
111 \LdfInit\CurrentOption{captions\CurrentOption}
114 % When this file is read as an option, i.e., by the |\usepackage|
115 % command, \texttt{ngerman} will be an `unknown' language, so we
116 % have to make it known. So we check for the existence of
117 % |\l@ngerman| to see whether we have to do something here.
120 \ifx\l@ngerman\@undefined
121 \@nopatterns{ngerman}
122 \adddialect\l@ngerman0
126 % For the Austrian version of these definitions we just add another
129 \adddialect\l@naustrian\l@ngerman
132 % The next step consists of defining commands to switch to (and
133 % from) the German language.
135 % \begin{macro}{\captionsngerman}
136 % \begin{macro}{\captionsnaustrian}
137 % \changes{ngermab-v2.6n}{2008/07/06}{Corrected typo
138 % \cs{captionnsgerman}}
139 % Either the macro |\captionsngerman| or the macro
140 % |\captionsnaustrian| will define all strings used in the four
141 % standard document classes provided with \LaTeX.
143 % \changes{ngermanb-2.6k}{2000/09/20}{Added \cs{glossaryname}}
145 \@namedef{captions\CurrentOption}{%
146 \def\prefacename{Vorwort}%
147 \def\refname{Literatur}%
148 \def\abstractname{Zusammenfassung}%
149 \def\bibname{Literaturverzeichnis}%
150 \def\chaptername{Kapitel}%
151 \def\appendixname{Anhang}%
152 \def\contentsname{Inhaltsverzeichnis}% % oder nur: Inhalt
153 \def\listfigurename{Abbildungsverzeichnis}%
154 \def\listtablename{Tabellenverzeichnis}%
155 \def\indexname{Index}%
156 \def\figurename{Abbildung}%
157 \def\tablename{Tabelle}% % oder: Tafel
159 \def\enclname{Anlage(n)}% % oder: Beilage(n)
160 \def\ccname{Verteiler}% % oder: Kopien an
162 \def\pagename{Seite}%
164 \def\alsoname{siehe auch}%
165 \def\proofname{Beweis}%
166 \def\glossaryname{Glossar}%
172 % \begin{macro}{\datengerman}
173 % The macro |\datengerman| redefines the command
174 % |\today| to produce German dates.
176 \def\month@ngerman{\ifcase\month\or
177 Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
178 Juli\or August\or September\or Oktober\or November\or Dezember\fi}
179 \def\datengerman{\def\today{\number\day.~\month@ngerman
184 % \begin{macro}{\dateanustrian}
185 % The macro |\datenaustrian| redefines the command
186 % |\today| to produce Austrian version of the German dates.
188 \def\datenaustrian{\def\today{\number\day.~\ifnum1=\month
189 J\"anner\else \month@ngerman\fi \space\number\year}}
193 % \begin{macro}{\extrasngerman}
194 % \begin{macro}{\extrasnaustrian}
195 % \begin{macro}{\noextrasngerman}
196 % \begin{macro}{\noextrasnaustrian}
197 % Either the macro |\extrasngerman| or the macros |\extrasnaustrian|
198 % will perform all the extra definitions needed for the German
199 % language. The macro |\noextrasngerman| is used to cancel the
200 % actions of |\extrasngerman|.
202 % For German (as well as for Dutch) the \texttt{"} character is
203 % made active. This is done once, later on its definition may vary.
205 \initiate@active@char{"}
206 \@namedef{extras\CurrentOption}{%
207 \languageshorthands{ngerman}}
208 \expandafter\addto\csname extras\CurrentOption\endcsname{%
211 % Don't forget to turn the shorthands off again.
212 % \changes{ngermanb-2.6j}{1999/12/16}{Deactivate shorthands ouside of
215 \addto\noextrasngerman{\bbl@deactivate{"}}
219 % In order for \TeX\ to be able to hyphenate German words which
220 % contain `\ss' (in the \texttt{OT1} position |^^Y|) we have to
221 % give the character a nonzero |\lccode| (see Appendix H, the \TeX
224 \expandafter\addto\csname extras\CurrentOption\endcsname{%
225 \babel@savevariable{\lccode25}%
229 % The umlaut accent macro |\"| is changed to lower the umlaut dots.
230 % The redefinition is done with the help of |\umlautlow|.
232 \expandafter\addto\csname extras\CurrentOption\endcsname{%
233 \babel@save\"\umlautlow}
234 \@namedef{noextras\CurrentOption}{\umlauthigh}
237 % version of the `new' German hyphenation patterns (\file{dehyphn.tex}
238 % is to be used with |\lefthyphenmin| and |\righthyphenmin| set to~2.
239 % \changes{ngermanb-2.6k}{2000/09/22}{Now use \cs{providehyphenmins} to
240 % provide a default value}
242 \providehyphenmins{\CurrentOption}{\tw@\tw@}
244 % For German texts we need to make sure that |\frenchspacing| is
246 % \changes{ngermanb-2.6m}{2001/01/26}{Turn frenchspacing on, as in
247 % \texttt{german.sty}}
249 \expandafter\addto\csname extras\CurrentOption\endcsname{%
251 \expandafter\addto\csname noextras\CurrentOption\endcsname{%
252 \bbl@nonfrenchspacing}
259 % The code above is necessary because we need an extra active
260 % character. This character is then used as indicated in
261 % table~\ref{tab:german-quote}.
263 % To be able to define the function of |"|, we first define a
264 % couple of `support' macros.
268 % We save the original double quote character in |\dq| to keep
269 % it available, the math accent |\"| can now be typed as |"|.
271 \begingroup \catcode`\"12
273 \def\@SS{\mathchar"7019 }
279 % Now we can define the doublequote macros: the umlauts,
281 \declare@shorthand{ngerman}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}}
282 \declare@shorthand{ngerman}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}}
283 \declare@shorthand{ngerman}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
284 \declare@shorthand{ngerman}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}}
285 \declare@shorthand{ngerman}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}}
286 \declare@shorthand{ngerman}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
290 \declare@shorthand{ngerman}{"e}{\textormath{\"{e}}{\ddot e}}
291 \declare@shorthand{ngerman}{"E}{\textormath{\"{E}}{\ddot E}}
292 \declare@shorthand{ngerman}{"i}{\textormath{\"{\i}}%
294 \declare@shorthand{ngerman}{"I}{\textormath{\"{I}}{\ddot I}}
296 % german es-zet (sharp s),
298 \declare@shorthand{ngerman}{"s}{\textormath{\ss}{\@SS{}}}
299 \declare@shorthand{ngerman}{"S}{\SS}
300 \declare@shorthand{ngerman}{"z}{\textormath{\ss}{\@SS{}}}
301 \declare@shorthand{ngerman}{"Z}{SZ}
303 % german and french quotes,
305 \declare@shorthand{ngerman}{"`}{\glqq}
306 \declare@shorthand{ngerman}{"'}{\grqq}
307 \declare@shorthand{ngerman}{"<}{\flqq}
308 \declare@shorthand{ngerman}{">}{\frqq}
310 % and some additional commands:
312 \declare@shorthand{ngerman}{"-}{\nobreak\-\bbl@allowhyphens}
313 \declare@shorthand{ngerman}{"|}{%
314 \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
316 \declare@shorthand{ngerman}{""}{\hskip\z@skip}
317 \declare@shorthand{ngerman}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
318 \declare@shorthand{ngerman}{"=}{\penalty\@M-\hskip\z@skip}
321 % \begin{macro}{\mdqon}
322 % \begin{macro}{\mdqoff}
323 % All that's left to do now is to define a couple of commands
324 % for reasons of compatibility with \file{german.sty}.
326 \def\mdqon{\shorthandon{"}}
327 \def\mdqoff{\shorthandoff{"}}
332 % The macro |\ldf@finish| takes care of looking for a
333 % configuration file, setting the main language to be switched on
334 % at |\begin{document}| and resetting the category code of
335 % \texttt{@} to its original value.
337 \ldf@finish\CurrentOption
344 %% {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
345 %% 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
346 %% Digits \0\1\2\3\4\5\6\7\8\9
347 %% Exclamation \! Double quote \" Hash (number) \#
348 %% Dollar \$ Percent \% Ampersand \&
349 %% Acute accent \' Left paren \( Right paren \)
350 %% Asterisk \* Plus \+ Comma \,
351 %% Minus \- Point \. Solidus \/
352 %% Colon \: Semicolon \; Less than \<
353 %% Equals \= Greater than \> Question mark \?
354 %% Commercial at \@ Left bracket \[ Backslash \\
355 %% Right bracket \] Circumflex \^ Underscore \_
356 %% Grave accent \` Left brace \{ Vertical bar \|
357 %% Right brace \} Tilde \~}