Debian Codegraph @

texmf-dist/source/latex/datetime2-german/datetime2-german-doc.dtx

raw
1 % \iffalse
2 %% Doc-Source file to use with LaTeX2e
3 %% Copyright (C) 2015 Nicola Talbot, all rights reserved.
4 %% Copyright (C) 2017-19 Sebastian Friedl, all rights reserved.
5 %%
6 %% This work is subject to the LaTeX Project Public License, Version 1.3c or -- at
7 %% your option -- any later version of this license.
8 %%
9 %%
10 %% This work has the LPPL maintenance status 'maintained'.
11 %% Current maintainer of the work is Sebastian Friedl.
12 % \fi
13
14 % !TeX spellcheck=en_US
15
16 \documentclass[11pt]{ltxdoc}
17
18 \RequirePackage{iftex}
19 \RequireLuaTeX
20
21
22 \usepackage[no-math]{fontspec}
23 \usepackage{polyglossia}
24 \setdefaultlanguage{english}
25 \usepackage[english]{selnolig}
26
27 \usepackage{alltt}
28 \usepackage{csquotes}
29 \usepackage{graphicx}
30 \usepackage{hologo}
31 \usepackage{multicol}
32
33 \usepackage{array}
34 \usepackage{booktabs}
35 \usepackage{tabularx}
36
37 \usepackage[unicode, pdfborder={0 0 0}, linktoc=all, hyperindex=false]{hyperref}
38 \usepackage{verbatim}
39
40 \usepackage[erewhon]{newtxmath}
41 \setmainfont{Source Serif Pro}
42 \setsansfont{Source Sans Pro}
43 \setmonofont[Scale=MatchLowercase]{Hack}
44
45 \usepackage[a4paper, left=4.50cm,right=2.75cm,top=3.25cm,bottom=2.75cm,nohead]{geometry}
46
47 \parindent 0pt
48
49 \CheckSum{1068}
50
51 \renewcommand*{\usage}[1]{\hyperpage{#1}}
52 \renewcommand*{\main}[1]{\hyperpage{#1}}
53 \IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
54 \setcounter{IndexColumns}{2}
55
56 \newcommand*{\sty}[1]{\textsf{#1}}
57 \newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}
58
59 \RecordChanges
60 \PageIndex
61 \CodelineNumbered
62
63
64 \MakeShortVerb{"}
65
66 \title{German Module for the \sty{datetime2} Package \\ {\large\url{https://gitlab.com/SFr682k/datetime2-german}}}
67 \author{%
68 \begin{tabularx}{.8\textwidth}{*{2}{>{\centering\arraybackslash}X}}
69 Nicola L. C. Talbot & Sebastian Friedl \\
70 (inactive) & {\normalsize\href{mailto:[email protected]}{\texttt{[email protected]}}} \\
71 \end{tabularx}%
72 }
73 \date{2019/12/13 (v3.0)}
74
75 \hypersetup{pdftitle={datetime2.sty German Module}, pdfauthor={Nicola L.C. Talbot, Sebastian Friedl}}
76
77
78 \begin{document}
79 \maketitle
80
81
82 \begin{abstract}
83 This is the German language module for the \sty{datetime2} package. It defines a regionless style as well as variant styles ("de-DE", "de-AT" and "de-CH").
84
85 If you want to use the settings in this module you must install it in addition to installing \sty{datetime2}.
86 If you use \sty{babel} or \sty{polyglossia}, you will need this module to prevent them from redefining \cs{today}.
87
88 The \sty{datetime2} \opt{useregional} setting must be set to "text" or "numeric" for the language styles to be set.
89 Alternatively, you can set the style in the document using \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} depending on the value of the \opt{useregional} setting.
90 \end{abstract}
91
92
93
94
95 \clearpage
96 \tableofcontents
97 \clearpage
98
99
100
101 \subsection*{Installation}
102 \addcontentsline{toc}{subsection}{Installation}
103 Extract the language definition files first:
104 \begin{enumerate}
105 \item Run \LaTeX\ over the file "datetime2-german.ins": \\
106 "latex datetime2-german.ins"
107
108 \item Move all "*.ldf" files to "TEXMF/tex/latex/datetime2-contrib/datetime2-german/"
109 \end{enumerate}
110 Then, you can compile the documentation yourself by executing \\[\smallskipamount]
111 "lualatex datetime2-german-doc.dtx" \\
112 "makeindex -s gind.ist datetime2-german-doc.idx" \\
113 "makeindex -s gglo.ist -o datetime2-german-doc.gls datetime2-german-doc.glo" \\
114 "lualatex datetime2-german-doc.dtx" \\
115 "lualatex datetime2-german-doc.dtx" \\[\medskipamount]
116 or just use the precompiled documentation shipped with the source files. \\
117 In both cases, copy the files "datetime2-german-doc.pdf" and "README.md" to \\
118 "TEXMF/doc/latex/datetime2-contrib/datetime2-german/"
119
120
121 \subsection*{License}
122 \addcontentsline{toc}{subsection}{License}
123 This material is subject to the \LaTeX\ Project Public License, Version 1.3c or later. \\
124 Details may be found in the respective language definition file's copyright header.
125
126
127 \subsection*{Acknowledgments}
128 \addcontentsline{toc}{subsection}{Acknowledgments}
129 Thanks to \dots
130 \begin{itemize}
131 \item Jürgen Spitzmüller for his valuable advice while preparing version 2.0 of this module.
132
133 \item Bernhard Waldbrunner for his merge request, which resulted in the adoption of the DD.MM.YYYY numeric date format with the Austrian numeric style in version 3.0.
134 Previous versions used the ISO format (YYYY-MM-DD) as recommended by ÖNORM~1080, which was withdrawn in May~2018.
135 \end{itemize}
136
137
138
139 \clearpage
140 \part{The Documentation}
141 \section{Usage}
142
143
144 \subsection{Setting up \sty{datetime2} with a language module}
145 \textit{There are several methods of loading a language module. \\ Please refer to \sty{datetime2}'s documentation for details.}
146
147 \bigskip
148 \textbf{Variant 1:} \\
149 Set the date style explicitly by passing "german", "de-DE", "de-AT" or "de-CH" to \sty{datetime2}: \\[\smallskipamount]
150 "\documentclass{article}" \\
151 "\usepackage[german]{datetime2}" \\
152 "\begin{document}" \\
153 "\today" \\
154 "\end{document}"
155
156 \medskip
157 \textbf{Variant 2: Pick up the desired style from \sty{babel} or document class options)} \\
158 Pass the language (e.g. "german", "ngerman", "austrian", "naustrian", \dots) as an option to the \cs{documentclass} command (or \sty{babel} itself). As soon as the \opt{useregional} option is passed to \sty{datetime2}, the suitable language module is loaded: \\[\smallskipamount]
159 "\documentclass[german]{article}" \\
160 "\usepackage{babel}" \\
161 "\usepackage[useregional]{datetime2}" \\
162 "\begin{document}" \\
163 "\today" \\
164 "\end{document}"
165
166
167
168
169
170 \subsection{Customization}
171 There are a number of settings provided that can be used in \cs{DTMlangsetup} to modify the date-time style. These are:
172 \begin{description}
173 \item["dowdaysep"]%
174 The separator between the day of week name and the day of month number.
175
176 \item["daymonthsep"]%
177 The separator between the day and the month name.
178
179 \item["monthyearsep"]%
180 The separator between the month name and year.
181
182 \item["datesep"]%
183 The separator between the date numbers in the "numeric" styles.
184
185 \item["timesep"]%
186 The separator between hours, minutes and seconds.
187
188 \item["datetimesep"]%
189 The separator between the date and time for the full date-time format.
190
191 \item["timezonesep"]%
192 The separator between the time and zone for the full date-time format.
193
194 \item["abbr"]%
195 This is a boolean key. If "true", the month (and weekday name, if shown) is abbreviated.
196
197 \item["mapzone"]%
198 This is a boolean key. If "true", the time zone mappings are applied.
199
200 \item["showdayofmonth"]%
201 A boolean key that determines whether or not to show the day of the month.
202
203 \item["showyear"]%
204 A boolean key that determines whether or not to show the year.
205 \end{description}
206
207 Although these keys are \textit{defined} for all variant styles, it depends on \sty{datetime2}'s configuration and the requested styles whether they're \textit{used}. More details about the \cs{DTMlangsetup} command can be found in \sty{datetime2}'s documentation.
208
209
210
211
212 % TODO: check styles
213 \section{The Modules}
214 \subsection{Regionless style (\texttt{german})}
215 \begin{tabularx}{\textwidth}{>{\itshape}rX}
216 \toprule
217 \upshape\textbf{Textual style} & 13. Dezember 2019, 12:42:00 MEZ \\
218 with \opt{showdow} option & Freitag, 13. Dezember 2019, 12:42:00 MEZ \\
219 abbr. & 13. Dez. 2019, 12:42:00 MEZ \\
220 abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12:42:00 MEZ \\ \midrule
221 \upshape\textbf{Numeric style} & 13.12.2019, 12:42:00 MEZ \\
222 with \opt{showdow} option & Freitag, 13.12.2019, 12:42:00 MEZ \\
223 abbr. & 13.12.19, 12:42:00 MEZ \\
224 abbr., with \opt{showdow} option & Fr, 13.12.19, 12:42:00 MEZ \\ \bottomrule
225 \end{tabularx}
226
227
228 \subsection{German style (\texttt{de-DE})}
229 \begin{tabularx}{\textwidth}{>{\itshape}rX}
230 \toprule
231 \upshape\textbf{Textual style} & 13. Dezember 2019, 12:42:00 MEZ \\
232 with \opt{showdow} option & Freitag, 13. Dezember 2019, 12:42:00 MEZ \\
233 abbr. & 13. Dez. 2019, 12:42:00 MEZ \\
234 abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12:42:00 MEZ \\ \midrule
235 \upshape\textbf{Numeric style} & 13.12.2019, 12:42:00 MEZ \\
236 with \opt{showdow} option & Freitag, 13.12.2019, 12:42:00 MEZ \\
237 abbr. & 13.12.19, 12:42:00 MEZ \\
238 abbr., with \opt{showdow} option & Fr, 13.12.19, 12:42:00 MEZ \\ \bottomrule
239 \end{tabularx}
240
241
242 \subsection{Austrian style (\texttt{de-AT})}
243 \begin{tabularx}{\textwidth}{>{\itshape}rX}
244 \toprule
245 \upshape\textbf{Textual style} & 13. Dezember 2019, 12:42:00 MEZ \\
246 with \opt{showdow} option & Freitag, 13. Dezember 2019, 12:42:00 MEZ \\
247 abbr. & 13. Dez. 2019, 12:42:00 MEZ \\
248 abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12:42:00 MEZ \\ \midrule
249 \upshape\textbf{Numeric style} & 13.12.2019, 12:42:00 MEZ \\
250 with \opt{showdow} option & Freitag, 13.12.2019, 12:42:00 MEZ \\
251 abbr. & 13.12.19, 12:42:00 MEZ \\
252 abbr., with \opt{showdow} option & Fr, 13.12.19, 12:42:00 MEZ \\ \bottomrule
253 \end{tabularx}
254
255
256 \subsection{Swiss style (\texttt{de-CH})}
257 \begin{tabularx}{\textwidth}{>{\itshape}rX}
258 \toprule
259 \upshape\textbf{Textual style} & 13. Dezember 2019, 12.42.00 Uhr MEZ \\
260 with \opt{showdow} option & Freitag, 13. Dezember 2019, 12.42.00 Uhr MEZ \\
261 abbr. & 13. Dez. 2019, 12.42.00 Uhr MEZ \\
262 abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12.42.00 Uhr MEZ \\ \midrule
263 \upshape\textbf{Numeric style} & 13.12.2019, 12.42.00 Uhr MEZ \\
264 with \opt{showdow} option & Freitag, 13.12.2019, 12.42.00 Uhr MEZ \\
265 abbr. & 13.12.19, 12.42.00 Uhr MEZ \\
266 abbr., with \opt{showdow} option & Fr, 13.12.19, 12.42.00 Uhr MEZ \\ \bottomrule
267 \end{tabularx}
268
269
270
271
272
273 \StopEventually{%
274 \clearpage
275 \phantomsection
276 \addcontentsline{toc}{section}{Change History}%
277 \PrintChanges%
278 \addcontentsline{toc}{section}{\indexname}%
279 \PrintIndex%
280 }
281
282
283
284
285
286 \clearpage
287 \part{The Code}
288 % TODO: Load code modules
289
290 \section{The Base Module}
291 The "german-base" module provides code common to all regional variations and engine-dependent code, e.\,g. commands printing weekday and month names.
292
293 \DocInput{datetime2-german-base.dtx}
294 \DocInput{datetime2-german-base-ascii.dtx}
295 \DocInput{datetime2-german-base-utf8.dtx}
296
297
298 \section{Regionless Style: \texttt{datetime2-german.ldf}}
299 \DocInput{datetime2-german.dtx}
300
301 \section{Regional Variations}
302 \DocInput{datetime2-de-DE.dtx}
303 \DocInput{datetime2-de-AT.dtx}
304 \DocInput{datetime2-de-CH.dtx}
305
306 \Finale
307 \end{document}