summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-german/germanb.dtx
blob: 8c367c5d6e274814707d7a0479e317067cf48580 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
% \iffalse meta-comment
%
% File `germanb.dtx'
% 
% Copyright 1989--2014 Johannes L. Braams
%                     Bernd Raichle
%                     Walter Schmidt,
%                     Juergen Spitzmueller
% All rights reserved.
% 
% This file is part of the babel-german bundle,
% an extension to the Babel system.
% ----------------------------------------------
% 
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
% 
% This work has the LPPL maintenance status "maintained".
% 
% The Current Maintainer of this work is Juergen Spitzmueller.
% \fi
% \CheckSum{413}
%
% \iffalse
%    Tell the \LaTeX\ system who we are and write an entry on the
%    transcript.
%<*dtx>
\ProvidesFile{germanb.dtx}
%</dtx>
%<austrian>\ProvidesLanguage{austrian}
%<german>\ProvidesLanguage{german}
%<swiss>\ProvidesLanguage{swissgerman}
%<germanb>\ProvidesLanguage{germanb}
%\fi
%\ProvidesFile{germanb.dtx}
        [2014/10/10 v2.7b German support for babel (traditional orthography)]
%\iffalse
%
%<*filedriver>
\documentclass{ltxdoc}
\usepackage{bera}
\usepackage{url}
\font\manual=logo10 % font used for the METAFONT logo, etc.
\newcommand*\MF{{\manual META}\-{\manual FONT}}
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\Babel{\textsf{Babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
\newcommand*\note[1]{}
\newcommand*\Lopt[1]{\textsf{#1}}
\newcommand*\file[1]{\texttt{#1}}
\GlossaryMin = .33\textheight

\begin{document}
 \DocInput{germanb.dtx}
\end{document}
%</filedriver>
%\fi
% \GetFileInfo{germanb.dtx}
%
%\RecordChanges
%
% \changes{germanb-1.0a}{1990/05/14}{Incorporated Nico's comments}
% \changes{germanb-1.0b}{1990/05/22}{fixed typo in definition for
%    austrian language found by Werenfried Spit
%    \texttt{nspit@fys.ruu.nl}}
% \changes{germanb-1.0c}{1990/07/16}{Fixed some typos}
% \changes{germanb-1.1}{1990/07/30}{When using PostScript fonts with
%    the Adobe fontencoding, the dieresis-accent is located elsewhere,
%    modified germanb}
% \changes{germanb-1.1a}{1990/08/27}{Modified the documentation
%    somewhat}
% \changes{germanb-2.0}{1991/04/23}{Modified for babel 3.0}
% \changes{germanb-2.0a}{1991/05/25}{Removed some problems in change
%    log}
% \changes{germanb-2.1}{1991/05/29}{Removed bug found by van der Meer}
% \changes{germanb-2.2}{1991/06/11}{Removed global assignments,
%    brought uptodate with \file{german.tex} v2.3d}
% \changes{germanb-2.2a}{1991/07/15}{Renamed \file{babel.sty} in
%    \file{babel.com}}
% \changes{germanb-2.3}{1991/11/05}{Rewritten parts of the code to use
%    the new features of babel version 3.1}
% \changes{germanb-2.3e}{1991/11/10}{Brought up-to-date with
%    \file{german.tex} v2.3e (plus some bug fixes) [br]}
% \changes{germanb-2.5}{1994/02/08}{Update or \LaTeXe}
% \changes{germanb-2.5c}{1994/06/26}{Removed the use of \cs{filedate}
%    and moved the identification after the loading of
%    \file{babel.def}}
% \changes{germanb-2.6a}{1995/02/15}{Moved the identification to the
%    top of the file}
% \changes{germanb-2.6a}{1995/02/15}{Rewrote the code that handles the
%    active double quote character}
% \changes{germanb-2.6d}{1996/07/10}{Replaced \cs{undefined} with
%    \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
%    with \LaTeX} 
% \changes{germanb-2.6d}{1996/10/10}{Moved the definition of
%    \cs{atcatcode} right to the beginning.}
% \changes{germanb-2.7}{2013/12/13}{Revised documentation: Turn the \babel{}
%          manual chapter into a self-enclosed manual.}
% \changes{germanb-2.7}{2013/12/13}{Added support for variety \texttt{swissgerman}.}
% \changes{germanb-2.7}{2013/12/13}{Revised \texttt{austrian} support.}
%
%  \title{Babel support for the German language (traditional~orthography)}
%  \author{Johannes Braams \and Bernd Raichle \and Walter Schmidt \and J\"urgen Spitzm\"uller\thanks{%
%         Current maintainer. Address correspondence to juergen (at) spitzmueller (dot) org.}}
%  \date{\fileversion\ (\filedate)}
%  \maketitle
%
%    \begin{abstract}
%      \noindent This manual documents the \babel\ language definition file \file{germanb.ldf}
%      for German (traditional orthography).
%      The file is part of the \textsf{babel-german} bundle.
%    \end{abstract}
%
%    \section{Aim and usage}
%
%    The file \file{germanb.ldf} provides the \babel\ package with all language definition
%    macros (language specific strings and settings) for the German language, including
%    the Austrian and Swiss varieties of German. Furthermore, it assures that the
%    correct hyphenation patterns for the respective language or variety are
%    used.\footnote{The file \file{germanb.ldf} started as a re-implementation of the package
%    \file{german.sty} (v.\,2.5b), which was originally developed by Hubert Partl
%    (cf. \cite{HP}) and later maintained by Bernd Raichle (cf. \cite{gerdoc}).
%    The re-implementation was done by Johannes Braams.}
%    The file adheres to the traditional (1901--1996) orthography.
%    For reformed (post-1996) German orthography support, please refer to the
%    complementary |ngermanb.ldf| file.
%
%    In order to use the language definitions provided here, you need to use
%    the \babel\ package and pass the respective language name as an
%    option, either of
%
%    \begin{itemize}
%       \setlength{\itemsep}{0pt}
%       \item |\usepackage[german]{babel}|
%       \item |\usepackage[austrian]{babel}|
%       \item |\usepackage[swissgerman]{babel}|
%    \end{itemize}
%    Please consult the \babel\ manual \cite{babel} for details.
%
%    \section{Shorthands}
%
%    For all three varieties of German, the character |"| is made active
%    in order to provide some shorthand macros.
%    One purpose of these shorthands is to get control over a
%    peculiarity of traditional German spelling: some consonantial
%    character combinations change in the context of hyphenations.
%    Furthermore, the shorthands provide access to some frequently
%    used special characters as well as some further possibilities
%    to control hyphenation, to break lines and to deal with ligatures.
%    Table~\ref{tab:german-quote} provides an overview of the shorthands
%    that are provided by \file{germanb.ldf}.
%
%    \begin{table}[htb]
%     \begin{center}
%     \begin{tabular}{lp{.75\textwidth}}
%      |"a| & umlaut \"a (shorthand for |\"a|). Similar shorthands are
%                  available for all other lower- and uppercase
%                  vowels (umlauts: |"a|, |"o|, |"u|, |"A|, |"O|,
%                  |"U|, as well as tremata: |"e|, |"i|, |"E|, |"I|).\\
%      |"s| & German \ss{} (shorthand for |\ss{}|).                \\
%      |"z| & German \ss{} (shorthand for |\ss{}|).                \\
%      |"ck|& for |ck| to be hyphenated as |k-k|.                  \\
%      |"ff|& for |ff| to be hyphenated as |ff-f|,
%                  this is also implemented for |l|, |m|, |n|, |p|,
%                 |r| and |t|.                                     \\
%      |"S| & |SS| (|\uppercase{"s}|, since \ss{} must be written
%                  as SS -- or SZ, see below -- in uppercase writing).\\
%      |"Z| & |SZ| (|\uppercase{"z}|, since \ss{} must be written
%                  as SZ -- or SS, see above -- in uppercase writing).\\
%      \verb="|= & disable ligature at this position
%                  (e.\,g. \verb=Auf"|lage=).                      \\
%      |"-| & an additional breakpoint that does still
%             allow for hyphenation at the breakpoints preset in
%             the hyphenation patterns (as opposed to |\-|).       \\
%      |""| & a breakpoint that does not output a hyphen sign
%             if the line break is performed (useful for compound
%             words with hyphen, e.\,g.\ |(Un-)""Sinn|).           \\
%      |"~| & a compound word mark without a breakpoint. Useful for
%              cases such as |bergauf und "~ab|.          \\
%      |"=| & a compound word mark with a breakpoint, allowing
%             for hyphenation at the other points preset in the
%             hyphenation patterns (as opposed to plain |-|).      \\
%      |"`| & German left double quotes (i.\,e. ,,).               \\
%      |"'| & German right double quotes (i.\,e. ``).              \\
%      |"<| & French/Swiss left double quotes (i.\,e. <<).   \\
%      |">| & French/Swiss right double quotes (i.\,e. >>).  \\
%     \end{tabular}
%     \caption{Shorthands provided by \file{germanb.ldf}}\label{tab:german-quote}
%     \end{center}
%    \end{table}
%
%    Table~\ref{tab:more-quote} lists some macros for quotation marks
%    that might be used as an alternative to the quotation mark shorthands
%    provided by \file{germanb.ldf}.
%    \begin{table}[htb]
%     \begin{center}
%     \begin{tabular}{lp{8cm}}
%      |\glqq| & German left double quotes (i.\,e. ,,).   \\
%      |\grqq| & German right double quotes (i.\,e. ``).  \\
%      |\glq|  & German left single quotes (i.\,e. ,).    \\
%      |\grq|  & German right single quotes (i.\,e. `).   \\
%      |\flqq| & French/Swiss left double quotes (i.\,e. <<). \\
%      |\frqq| & French/Swiss right double quotes (i.\,e. >>).\\
%      |\flq|  & French/Swiss left single quotes (i.\,e. \guilsinglleft).  \\
%      |\frq|  & French/Swiss right single quotes (i.\,e.  \guilsinglright). \\
%      |\dq|   & the original quotation mark character (i.\,e. |"|).       \\
%     \end{tabular}
%     \caption{Alternative commands for quotation marks (provided by \babel)}\label{tab:more-quote}
%     \end{center}
%    \end{table}
%
% \StopEventually{}
%
%    \section{Implementation}
%
%    \subsection{General settings}
%
%    If \file{germanb.ldf} is read via the \babel\ option \Lopt{germanb},
%    we make it behave as if \Lopt{german} was specified.
% \changes{germanb-2.6l}{2008/03/17}{Making germanb behave like german
%    needs some more work besides defining \cs{CurrentOption}}
% \changes{germanb-2.6m}{2008/06/01}{Corrected a typo}
% \iffalse
%<*germanb>
% \fi
%    \begin{macrocode}
\def\bbl@tempa{germanb}
\ifx\CurrentOption\bbl@tempa
  \def\CurrentOption{german}
  \ifx\l@german\@undefined
    \@nopatterns{German}
    \adddialect\l@german0
  \fi
  \let\l@germanb\l@german
  \AtBeginDocument{%
    \let\captionsgermanb\captionsgerman
    \let\dategermanb\dategerman
    \let\extrasgermanb\extrasgerman
    \let\noextrasgermanb\noextrasgerman
  }
\fi
%    \end{macrocode}
%
%    The macro |\LdfInit| takes care of preventing that this file is
%    loaded more than once, checking the category code of the
%    \texttt{@} sign, etc.
% \changes{germanb-2.6d}{1996/11/02}{Now use \cs{LdfInit} to perform
%    initial checks} 
%    \begin{macrocode}
\LdfInit\CurrentOption{captions\CurrentOption}
%    \end{macrocode}
%
%    If \file{germanb.ldf} is read as an option, i.e. via |\usepackage|
%    command, \texttt{german} could be an `unknown' language, so we
%    have to make it known.  We check for the existence of
%    |\l@german| to see whether we have to do something here.
%
% \changes{germanb-2.0}{1991/04/23}{Now use \cs{adddialect} if
%    language undefined}
% \changes{germanb-2.2d}{1991/10/27}{Removed use of \cs{@ifundefined}}
% \changes{germanb-2.3e}{1991/11/10}{Added warning, if no german
%    patterns loaded}
% \changes{germanb-2.5c}{1994/06/26}{Now use \cs{@nopatterns} to
%    produce the warning}
%    \begin{macrocode}
\ifx\l@german\@undefined
  \@nopatterns{German}
  \adddialect\l@german0
\fi
%    \end{macrocode}
%
%    We set \texttt{austrian} as a dialect of \texttt{german},
%    since the Austrian variety uses the same hyphenation patterns as
%    Germany's Standard German. 
% \changes{germanb-2.0}{1991/04/23}{Now use \cs{adddialect} for
%    austrian}
%    \begin{macrocode}
\adddialect\l@austrian\l@german
%    \end{macrocode}
%
%    For the Swiss variety, we attempt to load the specific
%    \texttt{swissgerman} hyphenation patterns and fall back to
%    \texttt{german} if those are not available.
% \changes{germanb-2.7b}{2014/10/10}{Do not warn about missing swissgerman patterns
%    if swissgerman is not loaded}
%    \begin{macrocode}
\def\bbl@tempa{swissgerman}
\ifx\CurrentOption\bbl@tempa
  \ifx\l@swissgerman\@undefined
    \ifx\l@german\@undefined
      \@nopatterns{swissgerman and german}
      \adddialect\l@swissgerman0
    \else
      \@nopatterns{swissgerman}
      \adddialect\l@swissgerman\l@german
    \fi
  \fi
\fi
%    \end{macrocode}
%
%    \subsection{Language-specific strings (captions)}
%
%    The next step consists of defining macros that provide language specific strings
%    and settings.
%
%  \begin{macro}{\captionsgerman}
%    The macro |\captionsgerman| defines all strings used in the four
%    standard document classes provided with \LaTeX\ for German.
%
% \changes{germanb-2.2}{1991/06/06}{Removed \cs{global} definitions}
% \changes{germanb-2.2}{1991/06/06}{\cs{pagename} should be
%    \cs{headpagename}}
% \changes{germanb-2.3e}{1991/11/10}{Added \cs{prefacename},
%    \cs{seename} and \cs{alsoname}}
% \changes{germanb-2.4}{1993/07/15}{\cs{headpagename} should be
%    \cs{pagename}}
% \changes{germanb-2.6b}{1995/07/04}{Added \cs{proofname} for
%    AMS-\LaTeX}
% \changes{germanb-2.6d}{1996/07/10}{Construct control sequence on the
%    fly}
% \changes{germanb-2.6j}{2000/09/20}{Added \cs{glossaryname}}
% \changes{germanb-2.7}{2013/12/13}{Split \cs{captionsgerman} from
%                                    \cs{captionsaustrian} and
%                                    \cs{captionsswissgerman}.}
% \changes{germanb-2.7}{2013/12/13}{Changed \cs{enclname} in
%                                    \texttt{austrian} to
%                                    \emph{Beilage(n)}.}
%    \begin{macrocode}
\@namedef{captionsgerman}{%
  \def\prefacename{Vorwort}%
  \def\refname{Literatur}%
  \def\abstractname{Zusammenfassung}%
  \def\bibname{Literaturverzeichnis}%
  \def\chaptername{Kapitel}%
  \def\appendixname{Anhang}%
  \def\contentsname{Inhaltsverzeichnis}%    % oder nur: Inhalt
  \def\listfigurename{Abbildungsverzeichnis}%
  \def\listtablename{Tabellenverzeichnis}%
  \def\indexname{Index}%
  \def\figurename{Abbildung}%
  \def\tablename{Tabelle}%                  % oder: Tafel
  \def\partname{Teil}%
  \def\enclname{Anlage(n)}%
  \def\ccname{Verteiler}%                   % oder: Kopien an
  \def\headtoname{An}%
  \def\pagename{Seite}%
  \def\seename{siehe}%
  \def\alsoname{siehe auch}%
  \def\proofname{Beweis}%
  \def\glossaryname{Glossar}%
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\captionsaustrian}
%    The macro |\captionsaustrian| builds on |\captionsgerman|, but
%    redefines some strings following Austrian conventions (for the
%    respective variants, cf. \cite{vwb}).
%    \begin{macrocode}
\@namedef{captionsaustrian}{%
  \@nameuse{captionsgerman}
  \def\enclname{Beilage(n)}%
  }
%    \end{macrocode}
%  \end{macro}
%  \begin{macro}{\captionsswissgerman}
%    The macro |\captionsswissgerman| builds on |\captionsgerman|, but
%    redefines some strings following Swiss conventions (for the
%    respective variants, cf. \cite{vwb}).
%    \begin{macrocode}
\@namedef{captionsswissgerman}{%
  \@nameuse{captionsgerman}
  \def\enclname{Beilage(n)}%
  }
%    \end{macrocode}
%  \end{macro}
%
%  \subsection{Date localizations}
%
%  \begin{macro}{\dategerman}
%    The macro |\dategerman| redefines the command
%    |\today| to produce German dates.
% \changes{germanb-2.3e}{1991/11/10}{Added \cs{month@german}}
% \changes{germanb-2.6f}{1997/10/01}{Use \cs{edef} to define
%    \cs{today} to save memory}
% \changes{germanb-2.6f}{1998/03/28}{use \cs{def} instead of
%    \cs{edef}}
%    \begin{macrocode}
\def\month@german{\ifcase\month\or
  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}
\def\dategerman{\def\today{\number\day.~\month@german
    \space\number\year}}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\dateswissgerman}
%    \changes{germanb-2.7}{2013/12/13}{Added \cs{dateswissgerman}.}
%    The macro |\dateswissgerman| does the same for Swiss German dates.
%    The result is identical to German.
%    \begin{macrocode}
\def\dateswissgerman{\def\today{\number\day.~\month@german
    \space\number\year}}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\dateaustrian}
%    The macro |\dateaustrian| redefines the command
%    |\today| to produce Austrian versions of the German dates.
%    Here, the naming of January (,,J\"anner``) differs from the
%    other German varieties.
% \changes{germanb-2.6f}{1997/10/01}{Use \cs{edef} to define
%    \cs{today} to save memory}
% \changes{germanb-2.6f}{1998/03/28}{use \cs{def} instead of
%    \cs{edef}}
%    \begin{macrocode}
\def\dateaustrian{\def\today{\number\day.~\ifnum1=\month
  J\"anner\else \month@german\fi \space\number\year}}
%    \end{macrocode}
%  \end{macro}
%
%  \subsection{Extras}
%
%  \begin{macro}{\extrasgerman}
% \changes{germanb-2.0b}{1991/05/29}{added some comment chars to
%    prevent white space}
% \changes{germanb-2.2}{1991/06/11}{Save all redefined macros}
%  \begin{macro}{\extrasaustrian}
%  \begin{macro}{\extrasswissgerman}
%  \begin{macro}{\noextrasgerman}
% \changes{germanb-1.1}{1990/07/30}{Added \cs{dieresis}}
% \changes{germanb-2.0b}{1991/05/29}{added some comment chars to
%    prevent white space}
% \changes{germanb-2.2}{1991/06/11}{Try to restore everything to its
%    former state}
% \changes{germanb-2.6d}{1996/07/10}{Construct control sequence
%    \cs{extrasgerman} or \cs{extrasaustrian} on the fly}
%  \begin{macro}{\noextrasaustrian}
%  \begin{macro}{\noextrasswissgerman}
%
%    The macros |\extrasgerman|, |\extrasaustrian|
%    and |\extrasswissgerman|, respectively, will perform all the extra 
%    definitions needed for the German language or the respective
%    variety. The macro |\noextrasgerman| is used to cancel the
%    actions of |\extrasgerman|. |\noextrasaustrian| and
%    |\noextrasswissgerman| behave analoguously.
%    \changes{germanb-2.7}{2013/12/13}{Added \cs{extrasswissgerman}
%                                       and \cs{noextrasswissgerman}.}
%
%    For all German varieties, the character \texttt{"} is
%    made active. This is done once, later on its definition may vary.
%    \begin{macrocode}
\initiate@active@char{"}
\@namedef{extras\CurrentOption}{%
  \languageshorthands{german}}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
  \bbl@activate{"}}
%    \end{macrocode}
%    Turn the shorthands off again outside of German.
% \changes{germanb-2.6i}{1999/12/16}{Deactivate shorthands outside of
%    German.}
% \changes{germanb-2.7}{2013/12/13}{Deactivate shorthands also outside of
%    \texttt{austrian} and \texttt{swissgerman}.}
%    \begin{macrocode}
\expandafter\addto\csname noextras\CurrentOption\endcsname{%
  \bbl@deactivate{"}}
%    \end{macrocode}
%
% \changes{germanb-2.6a}{1995/02/15}{All the code to handle the active
%    double quote has been moved to \file{babel.def}}
%
%    In order for \TeX\ to be able to hyphenate German words which
%    contain `\ss' (in the \texttt{OT1} position |^^Y|) we have to
%    give the character a nonzero |\lccode| (see Appendix H, the \TeX
%    book).
% \changes{germanb-2.6c}{1996/04/08}{Use decimal number instead of
%    hat-notation as the hat may be activated}
%    \begin{macrocode}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
  \babel@savevariable{\lccode25}%
  \lccode25=25}
%    \end{macrocode}
% \changes{germanb-2.6a}{1995/02/15}{Removeed \cs{3} as it is no
%    longer in \file{germanb.ldf}}
%
%    The umlaut accent macro |\"| is changed to lower the umlaut dots.
%    The redefinition is done with the help of |\umlautlow|.
%    \begin{macrocode}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
  \babel@save\"\umlautlow}
%    \end{macrocode}
% \changes{germanb-2.7}{2013/12/13}{Do not use \cs{@namedef} when
%    \cs{noextras} is already defined and should not be overwritten.}
%    \begin{macrocode}
\expandafter\addto\csname noextras\CurrentOption\endcsname{%
  \umlauthigh}
%    \end{macrocode}
%    The German hyphenation patterns can be used with |\lefthyphenmin|
%    and |\righthyphenmin| set to~2.
% \changes{germanb-2.6a}{1995/05/13}{use \cs{germanhyphenmins} to store
%    the correct values}
% \changes{germanb-2.6j}{2000/09/22}{Now use \cs{providehyphenmins} to
%    provide a default value}
%    \begin{macrocode}
\providehyphenmins{\CurrentOption}{\tw@\tw@}
%    \end{macrocode}
%    For German texts we need to assure that |\frenchspacing| is
%    turned on.
% \changes{germanb-2.6k}{2001/01/26}{Turn frenchspacing on, as in
%    \texttt{german.sty}}
%    \begin{macrocode}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
  \bbl@frenchspacing}
\expandafter\addto\csname noextras\CurrentOption\endcsname{%
  \bbl@nonfrenchspacing}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
% \changes{germanb-2.6a}{1995/02/15}{\cs{umlautlow} and
%    \cs{umlauthigh} moved to \file{glyphs.dtx}, as well as
%    \cs{newumlaut} (now \cs{lower@umlaut}}
%
%    \subsection{Active characters, macros \& shorthands}
%
%    The following code is necessary because we need an extra active
%    character. This character is then used as indicated in
%    table~\ref{tab:german-quote}.
%
%    In order to be able to define the function of |"|, we first define a
%    couple of `support' macros.
%
% \changes{germanb-2.3e}{1991/11/10}{Added \cs{save@sf@q} macro and
%    rewrote all quote macros to use it}
% \changes{germanb-2.3h}{1991/02/16}{moved definition of
%    \cs{allowhyphens}, \cs{set@low@box} and \cs{save@sf@q} to
%    \file{babel.com}}
% \changes{germanb-2.6a}{1995/02/15}{Moved all quotation characters to
%    \file{glyphs.dtx}}
%
%  \begin{macro}{\dq}
%    We save the original double quotation mark character in |\dq| to keep
%    it available, the math accent |\"| can now be typed as |"|.
%    \begin{macrocode}
\begingroup \catcode`\"12
\def\x{\endgroup
  \def\@SS{\mathchar"7019 }
  \def\dq{"}}
\x
%    \end{macrocode}
%  \end{macro}
% \changes{germanb-2.6c}{1996/01/24}{Moved \cs{german@dq@disc} to
%    babel.def, calling it \cs{bbl@disc}}
%
% \changes{germanb-2.6a}{1995/02/15}{Use \cs{ddot} instead of
%    \cs{@MATHUMLAUT}}
%
%   Now we can define the doublequote shorthands: the umlauts,
% \changes{germanb-2.6c}{1996/05/30}{added the \cs{allowhyphens}}
%    \begin{macrocode}
\declare@shorthand{german}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}}
\declare@shorthand{german}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}}
\declare@shorthand{german}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
\declare@shorthand{german}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}}
\declare@shorthand{german}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}}
\declare@shorthand{german}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
%    \end{macrocode}
%    tremata,
%    \begin{macrocode}
\declare@shorthand{german}{"e}{\textormath{\"{e}}{\ddot e}}
\declare@shorthand{german}{"E}{\textormath{\"{E}}{\ddot E}}
\declare@shorthand{german}{"i}{\textormath{\"{\i}}%
                              {\ddot\imath}}
\declare@shorthand{german}{"I}{\textormath{\"{I}}{\ddot I}}
%    \end{macrocode}
%    German \ss{},
% \changes{germanb-2.6f}{1997/05/08}{use \cs{SS} instead of
%    \texttt{SS}, removed braces after \cs{ss}} 
%    \begin{macrocode}
\declare@shorthand{german}{"s}{\textormath{\ss}{\@SS{}}}
\declare@shorthand{german}{"S}{\SS}
\declare@shorthand{german}{"z}{\textormath{\ss}{\@SS{}}}
\declare@shorthand{german}{"Z}{SZ}
%    \end{macrocode}
%    German and French/Swiss quotation marks,
%    \begin{macrocode}
\declare@shorthand{german}{"`}{\glqq}
\declare@shorthand{german}{"'}{\grqq}
\declare@shorthand{german}{"<}{\flqq}
\declare@shorthand{german}{">}{\frqq}
%    \end{macrocode}
%    discretionary commands
%    \begin{macrocode}
\declare@shorthand{german}{"c}{\textormath{\bbl@disc ck}{c}}
\declare@shorthand{german}{"C}{\textormath{\bbl@disc CK}{C}}
\declare@shorthand{german}{"F}{\textormath{\bbl@disc F{FF}}{F}}
\declare@shorthand{german}{"l}{\textormath{\bbl@disc l{ll}}{l}}
\declare@shorthand{german}{"L}{\textormath{\bbl@disc L{LL}}{L}}
\declare@shorthand{german}{"m}{\textormath{\bbl@disc m{mm}}{m}}
\declare@shorthand{german}{"M}{\textormath{\bbl@disc M{MM}}{M}}
\declare@shorthand{german}{"n}{\textormath{\bbl@disc n{nn}}{n}}
\declare@shorthand{german}{"N}{\textormath{\bbl@disc N{NN}}{N}}
\declare@shorthand{german}{"p}{\textormath{\bbl@disc p{pp}}{p}}
\declare@shorthand{german}{"P}{\textormath{\bbl@disc P{PP}}{P}}
\declare@shorthand{german}{"r}{\textormath{\bbl@disc r{rr}}{r}}
\declare@shorthand{german}{"R}{\textormath{\bbl@disc R{RR}}{R}}
\declare@shorthand{german}{"t}{\textormath{\bbl@disc t{tt}}{t}}
\declare@shorthand{german}{"T}{\textormath{\bbl@disc T{TT}}{T}}
%    \end{macrocode}
%    (we need to treat |"f| a bit differently in order to preserve the
%    ff-ligature)
% \changes{germanb-2.6f}{1998/06/15}{Copied the coding for \texttt{"f}
%    from german.dtx version 2.5d} 
%    \begin{macrocode}
\declare@shorthand{german}{"f}{\textormath{\bbl@discff}{f}}
\def\bbl@discff{\penalty\@M
  \afterassignment\bbl@insertff \let\bbl@nextff= }
\def\bbl@insertff{%
  \if f\bbl@nextff
    \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
  {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\bbl@nextff}}
\let\bbl@nextff=f
%    \end{macrocode}
%    and some additional commands (hyphenation and ligature control):
%    \begin{macrocode}
\declare@shorthand{german}{"-}{\nobreak\-\bbl@allowhyphens}
\declare@shorthand{german}{"|}{%
  \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
              \allowhyphens}{}}
\declare@shorthand{german}{""}{\hskip\z@skip}
\declare@shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{german}{"=}{\penalty\@M-\hskip\z@skip}
%    \end{macrocode}
%
%  \begin{macro}{\mdqon}
%  \begin{macro}{\mdqoff}
%  \begin{macro}{\ck}
%    All that's left to do now is to  define a couple of commands
%    for reasons of compatibility with \file{german.sty}.
% \changes{germanb-2.6f}{1998/06/07}{Now use \cs{shorthandon} and
%    \cs{shorthandoff}} 
%    \begin{macrocode}
\def\mdqon{\shorthandon{"}}
\def\mdqoff{\shorthandoff{"}}
\def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
%    The macro |\ldf@finish| takes care of looking for a
%    configuration file, setting the main language to be switched on
%    at |\begin{document}| and resetting the category code of
%    \texttt{@} to its original value.
% \changes{germanb-2.6d}{1996/11/02}{Now use \cs{ldf@finish} to wrap
%    up} 
%    \begin{macrocode}
\ldf@finish\CurrentOption
%    \end{macrocode}
% \iffalse
%</germanb>
% \fi
%
%
%  \subsection{\file{austrian.ldf}, \file{german.ldf} and \file{swissgerman.ldf}}
%
% \changes{germanb-2.7}{2013/12/13}{Generate portmanteau files \file{austrian.ldf},
%            \file{german.ldf} and \file{swissgerman.ldf}.}
%
%  \Babel\ expects a \file{\langvar{}.ldf} file for each \langvar. So we create portmanteau
%    ldf files for \texttt{austrian}, \texttt{german} and \texttt{swissgerman}.\footnote{%
%    For some \texttt{austrian} and \texttt{german}, this is not strictly necessary,
%    since \babel\ provides aliases for these languages (pointing to \texttt{germanb}).
%    However, since \babel\ does not officially support these aliases anymore after
%    the language definition files have been separated from the core, we provide
%    the whole range of ldf files for the sake of completeness.} These files themselves
%    only load \file{germanb.ldf}, which does the real work:
%
% \iffalse
%<*austrian|german|swiss>
% \fi
%    \begin{macrocode}
\input germanb.ldf\relax
%    \end{macrocode}
% \iffalse
%</austrian|german|swiss>
% \fi
%
%
%\PrintChanges
%
%  \begin{thebibliography}{9}
%    \bibitem{vwb} Ammon, Ulrich et al.:
%       \emph{Variantenw\"orterbuch des Deutschen. Die Standardsprache in \"Osterreich, der Schweiz
%        und Deutschland sowie in Liechtenstein, Luxemburg, Ostbelgien und S\"udtirol.}
%        Berlin, New York: De Gruyter.
%    \bibitem{babel} Braams, Johannes and Bezos, Javier:
%       \emph{Babel}.
%       \url{http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf}.
%    \bibitem{HP} Partl, Hubert:
%      \emph{German \TeX}, \emph{TUGboat} 9 (1988) \#1, p.~70--72.
%    \bibitem{gerdoc} Raichle, Bernd:
%       \emph{Kurzbeschreibung german.sty und ngerman.sty (Version 2.5)}.
%       \url{http://mirrors.ctan.org/language/german/gerdoc.pdf}.
%  \end{thebibliography}
%
% \Finale
%%
%% \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         \~}
%%
\endinput