summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf
blob: b9a79ee33b26f879645c71d8bb2ab70aff7d9b16 (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
\ProvidesFile{gloss-german.ldf}[polyglossia: module for german]
\PolyglossiaSetup{german}{
  hyphenmins={2,2},
  frenchspacing=true,
  fontsetup=true,
}

\def\tmp@old{old}
\def\tmp@oldyr{1901}
\newif\if@german@oldspelling
\@german@oldspellingfalse
\define@key{german}{spelling}[new]{%
  \def\@tmpa{#1}%
  \ifx\@tmpa\tmp@oldyr\def\@tmpa{old}\fi
  \ifx\@tmpa\tmp@old
    \ifx\l@german\@undefined
      \xpg@nopatterns{german}%
      \adddialect\l@german\l@nohyphenation
    \fi
    \@german@oldspellingtrue
  \else %try ngerman
    \ifx\l@ngerman\@undefined
      \ifx\l@german\@undefined
        \xpg@nopatterns{ngerman}%
        \adddialect\l@ngerman\l@nohyphenation
      \else
        \xpg@warning{You asked for `ngerman' but only `german' hyphenation is available!}%
        \@german@oldspellingtrue
      \fi
    \else %we use ngerman
      \@german@oldspellingfalse
    \fi
  \fi
}

\newif\if@german@fraktur
\def\tmp@fraktur{fraktur}
\define@key{german}{script}[latin]{%
	\def\@tmpa{#1}%
	\ifx\@tmpa\tmp@fraktur\@german@frakturtrue\else
	  \@german@frakturfalse%
	\fi}

\define@boolkey{german}[german@]{latesthyphen}[false]{}

\define@boolkey{german}[german@]{babelshorthands}[true]{}

\setkeys{german}{spelling,latesthyphen,script}

\ifsystem@babelshorthands
  \setkeys{german}{babelshorthands=true}
\else
  \setkeys{german}{babelshorthands=false}
\fi

\ifcsundef{initiate@active@char}{%
\input{babelsh.def}%
\initiate@active@char{"}%
}{}

\def\german@shorthands{%
  \bbl@activate{"}%
  \def\language@group{german}%
  \declare@shorthand{german}{"`}{„}%
  \declare@shorthand{german}{"'}{“}%
  \declare@shorthand{german}{"<}{«}%
  \declare@shorthand{german}{">}{»}%
  \declare@shorthand{german}{"c}{\textormath{\bbl@disc@german ck}{c}}%
  \declare@shorthand{german}{"C}{\textormath{\bbl@disc@german CK}{C}}%
  \declare@shorthand{german}{"F}{\textormath{\bbl@disc@german F{FF}}{F}}%
  \declare@shorthand{german}{"l}{\textormath{\bbl@disc@german l{ll}}{l}}%
  \declare@shorthand{german}{"L}{\textormath{\bbl@disc@german L{LL}}{L}}%
  \declare@shorthand{german}{"m}{\textormath{\bbl@disc@german m{mm}}{m}}%
  \declare@shorthand{german}{"M}{\textormath{\bbl@disc@german M{MM}}{M}}%
  \declare@shorthand{german}{"n}{\textormath{\bbl@disc@german n{nn}}{n}}%
  \declare@shorthand{german}{"N}{\textormath{\bbl@disc@german N{NN}}{N}}%
  \declare@shorthand{german}{"p}{\textormath{\bbl@disc@german p{pp}}{p}}%
  \declare@shorthand{german}{"P}{\textormath{\bbl@disc@german P{PP}}{P}}%
  \declare@shorthand{german}{"r}{\textormath{\bbl@disc@german r{rr}}{r}}%
  \declare@shorthand{german}{"R}{\textormath{\bbl@disc@german R{RR}}{R}}%
  \declare@shorthand{german}{"t}{\textormath{\bbl@disc@german t{tt}}{t}}%
  \declare@shorthand{german}{"T}{\textormath{\bbl@disc@german T{TT}}{T}}%
  \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%
  \declare@shorthand{german}{"-}{\nobreak\-\nobreak\hskip\z@skip}%
  \declare@shorthand{german}{"|}{\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}}{}}%
  \declare@shorthand{german}{""}{\hskip\z@skip}%
  \declare@shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}}%
  \declare@shorthand{german}{"=}{\penalty\@M-\hskip\z@skip}%
  \def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens}%
}

\def\nogerman@shorthands{%
  \@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
}

\def\captions@german{%
  \def\prefacename{Vorwort}%
  \def\refname{Literatur}%
  \def\abstractname{Zusammenfassung}%
  \def\bibname{Literaturverzeichnis}%
  \def\chaptername{Kapitel}%
  \def\appendixname{Anhang}%
  \def\contentsname{Inhaltsverzeichnis}%
  \def\listfigurename{Abbildungsverzeichnis}%
  \def\listtablename{Tabellenverzeichnis}%
  \def\indexname{Index}%
  \def\figurename{Abbildung}%
  \def\tablename{Tabelle}%
  \def\partname{Teil}%
  \def\enclname{Anlage(n)}%
  \def\ccname{Verteiler}%
  \def\headtoname{An}%
  \def\pagename{Seite}%
  \def\seename{siehe}%
  \def\alsoname{siehe auch}%
  \def\proofname{Beweis}%
  \def\glossaryname{Glossar}%
}
\def\date@german{%   
  \def\today{\number\day.%
    \space \ifcase\month%TODO add option for Austrian forms (Jänner etc)
    \or Januar\or Februar\or März\or April\or Mai\or Juni\or%
    Juli\or August\or September\or Oktober\or November\or%
    Dezember\fi
    \space \number\year}%
}

%%Strings for Fraktur contributed by Gerrit <z0idberg . gmx . de>
\def\captions@german@fraktur{%
  \captions@german%
  \def\abstractname{Zuſammenfaſſung}%
  \def\seename{ſiehe}%
  \def\alsoname{ſiehe auch}%
  \def\glossaryname{Gloſſar}%
}

\def\date@german@fraktur{%
  \def\today{\number\day.%
    \space \ifcase\month%TODO add option for Austrian forms (Jänner etc)
    \or Januar\or Februar\or März\or April\or Mai\or Juni\or%
    Juli\or Auguſt\or September\or Oktober\or November\or%
    Dezember\fi
    \space \number\year}%
}

\def\captionsgerman{%
  \if@german@fraktur\captions@german@fraktur\else\captions@german\fi
}

\def\dategerman{%
  \if@german@fraktur\date@german@fraktur\else\date@german\fi
}

\def\german@language{\language=%
  \csname l@\if@german@oldspelling\else n\fi german\ifgerman@latesthyphen -x-latest\fi\endcsname}

\def\noextras@german{%
  \nogerman@shorthands%
}

\def\blockextras@german{%
  \ifgerman@babelshorthands\german@shorthands\fi
}

\def\inlineextras@german{%
  \ifgerman@babelshorthands\german@shorthands\fi
}

\endinput