summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tudscr/tudscr-misc.dtx
blob: 711cb08cda56cdf55c2e17d18242a118e26641a6 (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
% \CheckSum{106}
% \iffalse meta-comment
% 
% ============================================================================
% 
%  TUD-KOMA-Script
%  Copyright (c) Falk Hanisch <tudscr@gmail.com>, 2012-2016
% 
% ============================================================================
% 
%  This work may be distributed and/or modified under the conditions of the
%  LaTeX Project Public License, version 1.3c of the license. The latest
%  version of this license is in http://www.latex-project.org/lppl.txt and 
%  version 1.3c or later is part of all distributions of LaTeX 2005/12/01
%  or later and of this work. This work has the LPPL maintenance status 
%  "author-maintained". The current maintainer and author of this work
%  is Falk Hanisch.
% 
% ----------------------------------------------------------------------------
% 
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
% in der Version 1.3c, verteilt und/oder veraendert werden. Die aktuelle 
% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und 
% Version 1.3c oder spaeter ist Teil aller Verteilungen von LaTeX 2005/12/01 
% oder spaeter und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status 
% "author-maintained", wird somit allein durch den Autor verwaltet. Der 
% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
% 
% ============================================================================
%
% \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         \~}
%
% \iffalse
%%% From File: tudscr-misc.dtx
%<*driver>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\ProvidesFile{tudscr-misc.dtx}[%
  2015/06/12 v2.04 TUD-KOMA-Script (miscellaneous)%
]
\RequirePackage[ngerman=ngerman-x-latest]{hyphsubst}
\documentclass[english,ngerman]{tudscrdoc}
\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{tudscrfonts} % only load this package, if the fonts are installed
\KOMAoptions{parskip=half-}
\CodelineIndex
\RecordChanges
\GetFileInfo{tudscr-misc.dtx}
\begin{document}
  \maketitle
  \DocInput{\filename}
\end{document}
%</driver>
% \fi
%
% \selectlanguage{ngerman}
%
% \changes{v2.02}{2014/06/23}{Unterstützung für \pkg{titlepage} entfernt}^^A
% \changes{v2.02}{2014/07/08}{Optionen nutzen \cs{FamilyKeyState}}^^A
%
% \section{Verschiedenes für die Hauptklassen}
%
% Alles, wofür sich eine separate Datei nicht lohnt, landet hier.
%
% \StopEventually{\PrintIndex\PrintChanges}
%
% \iffalse
%<*class&option>
% \fi
%
% \subsection{Fußnoten in Überschriften}
%
% \begin{option}{footnotes}
% \changes{v2.02}{2014/06/27}{neu}^^A
% \begin{macro}{\if@tud@symbolheadings}
% \changes{v2.02}{2014/06/27}{neu}^^A
% Die \KOMAScript-Option \opt{footnotes} wird um den Schlüssel 
% \val{symbolheadings} erweitert, mit welchem eingestellt werden kann, ob in den
% Überschriften Symbole für die Fußnoten anstelle von Zahlen verwendet werden
% sollen.
%    \begin{macrocode}
\newif\if@tud@symbolheadings
\TUD@key{footnotes}{%
  \TUD@set@numkey{footnotes}{@tempa}{%
    {nosymbolheadings}{0},{numberheadings}{0},%
    {symbolheadings}{1}%
  }{#1}%
  \ifx\FamilyKeyState\FamilyKeyStateProcessed%
    \ifcase\@tempa\relax% nosymbolheadings
      \@tud@symbolheadingsfalse%
    \or% symbolheadings
      \@tud@symbolheadingstrue%
    \fi%
  \fi%
}
%    \end{macrocode}
% \end{macro}^^A \if@tud@bookmarks
% \end{option}^^A symbolheadings
%
% \iffalse
%</class&option>
%<*class&body>
% \fi
%
% \begin{counter}{symbolheadings}
% \changes{v2.02}{2014/06/27}{neu}^^A
% Dieser Zähler wird bei aktivierter Option \opt{footnotes=symbolheadings} für 
% die Symboleauswahl von Fußnoten in Überschirften inkrementiert.
%    \begin{macrocode}
%<book|report>\newcounter{symbolheadings}[chapter]%
%<article>\newcounter{symbolheadings}%
%    \end{macrocode}
% \end{counter}^^A symbolheadings
%
% \iffalse
%</class&body>
%<*class&option>
% \fi
%
% \subsection{Sprungmarken}
%
% \begin{option}{tudbookmarks}
% \begin{macro}{\if@tud@bookmarks}
% Wird das Paket \pkg{hyperref} geladen, so kann die Option \opt{tudbookmarks}
% genutzt werden, um zu steuern, ob für Titel und Inhaltsverzeichnis
% automatisch ein Eintrag für die Sprungmarken erzeugt werden soll.
%    \begin{macrocode}
\newif\if@tud@bookmarks
\TUD@ifkey{tudbookmarks}{@tud@bookmarks}
%    \end{macrocode}
% \end{macro}^^A \if@tud@bookmarks
% \end{option}^^A tudbookmarks
%
% \iffalse
%</class&option>
%<*class&body>
% \fi
%
% \begin{macro}{\tudbookmark}
% \begin{macro}{\tud@footnote@unhyper}
% \begin{macro}{\tud@footnote@rehyper}
% \changes{v2.02}{2014/11/13}{entfernt}^^A
% Die Befehle zum Eintragen der Sprungmarken. Im Dokument kann auch der Befehl
% \cs{tudbookmark} vom Anwender genutzt werden, um manuell weitere Lesezeichen
% zu erzeugen.
%
% Für die Titelseite werden~-- wie auch durch das Paket \pkg{hyperref}~-- die 
% Fußnoten mit dem Befehl \cs{tud@footnote@unhyper} auf den Originalzustand
% zurückgesetzt.
%    \begin{macrocode}
\newcommand*\tudbookmark[1][]{\@gobbletwo}
\newcommand*\tud@footnote@unhyper{}
\AfterPackage{hyperref}{%
  \renewcommand*\tudbookmark[3][]{%
    \relax%
    \if@tud@bookmarks%
      \phantomsection%
      \ifblank{#1}{\pdfbookmark{#2}{#3}}{\pdfbookmark[#1]{#2}{#3}}%
    \fi%
  }%
  \renewcommand*\tud@footnote@unhyper{%
    \let\Hy@saved@footnotemark\@footnotemark%
    \let\Hy@saved@footnotetext\@footnotetext%
    \let\@footnotemark\H@@footnotemark%
    \let\@footnotetext\H@@footnotetext%
  }%
  \pdfstringdefDisableCommands{\let\NoCaseChange\@firstofone}%
}
%    \end{macrocode}
% \end{macro}^^A \tud@footnote@rehyper
% \end{macro}^^A \tud@footnote@unhyper
% \end{macro}^^A \tudbookmark
% \begin{macro}{\maketitle}
% \begin{macro}{\tableofcontents}
% Für den Titel und das Inhaltsverzeichnis werden Outline-Einträge erzeugt.
%    \begin{macrocode}
\pretocmd{\maketitle}{%
  \if@tud@bookmarks%
    \ifdef{\bookmarksetup}{\bookmarksetup{startatroot}}{}%
  \fi%
%<*book|report>
  \tudbookmark[0]{\titlepagename}{title}%
%</book|report>
%<*article>
  \tudbookmark[1]{\titlepagename}{title}%
%</article>
}{}{\tud@patch@wrn{maketitle}}
\pretocmd{\tableofcontents}{%
  \if@tud@bookmarks%
    \ifdef{\bookmarksetup}{\bookmarksetup{startatroot}}{}%
  \fi%
%<*book|report>
  \tudbookmark[0]{\contentsname}{toc}%
%</book|report>
%<*article>
  \tudbookmark[1]{\contentsname}{toc}%
%</article>
}{}{\tud@patch@wrn{tableofcontents}}
%    \end{macrocode}
% \end{macro}^^A \tableofcontents
% \end{macro}^^A \maketitle
% Das Paket \pkg{tocloft} verursacht allerlei Probleme. Wird es geladen, so 
% erscheint eine entsprechende Warnung.
%    \begin{macrocode}
\BeforePackage{tocloft}{%
  \ClassWarning{\TUDClassName}{%
    It is not recommended to use package `tocloft'.\MessageBreak%
    Loading the package will certainly lead to problems\MessageBreak%
    with table of contents and any list of floats. You\MessageBreak%
    should use the appropriate options of KOMA-Script%
  }%
}
%    \end{macrocode}
%
% \iffalse
%</class&body>
%<*execute>
% \fi
%
% \subsection{Durchreichen von Optionen und Standardoptionen}
%
% Durchreichen aller Klassenoptionen an die \KOMAScript-Klasse bzw. an die
% genutzte \TUDScript-Elternklasse.
%    \begin{macrocode}
%<*class&!inherit>
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\TUDClassName@KOMA}}
%</class&!inherit>
%<*class&inherit>
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\TUDClassName@Parent}}
%</class&inherit>
%<*package&fonts>
\DeclareOption*{\KOMAoptions{\CurrentOption}}
%</package&fonts>
%<*package&poster>
\DeclareOption*{\TUDoptions{\CurrentOption}}
%</package&poster>
%    \end{macrocode}
% Es werden die Standardoptionen ausgeführt. Die Ausführung selbst wird durch
% den Befehl \cs{TUD@noworlater} innerhalb von \cs{TUD@key} auf das Ende der
% \KOMAScript-Klasse verzögert.
%    \begin{macrocode}
%<*class&!inherit>
\TUDExecuteOptions{cd=true,cdfont=true,tudbookmarks=true}
%</class&!inherit>
%    \end{macrocode}
% Für das Paket \pkg{tudscrfonts} werden die Schriften aktiviert.
%    \begin{macrocode}
%<*package&fonts>
\TUDExecuteOptions{cdfont=true}
%</package&fonts>
%<*package&poster>
\TUDExecuteOptions{cdstyle=bicolor}
%</package&poster>
\TUDProcessOptions\relax
%    \end{macrocode}
% Die korrespindierende \KOMAScript-Klasse bzw. \TUDScript-Elternklasse wird 
% geladen.
%    \begin{macrocode}
%<*class&!inherit>
\LoadClass{\TUDClassName@KOMA}[2015/04/23]
%</class&!inherit>
%<*class&inherit>
\LoadClass{\TUDClassName@Parent}
%</class&inherit>
%    \end{macrocode}
%
% \iffalse
%</execute>
% \fi
%
% \Finale
%
\endinput