summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datetime2-german/datetime2-german-doc.dtx
blob: ed3a95d84360d68f3e3bfac8c02c9393285c5d32 (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
% \iffalse
%% Doc-Source file to use with LaTeX2e
%% Copyright (C) 2015 Nicola Talbot, all rights reserved.
%% Copyright (C) 2017-19 Sebastian Friedl, all rights reserved.
%%
%%  This work is subject to the LaTeX Project Public License, Version 1.3c or -- at
%%  your option -- any later version of this license.
%%  
%%
%%  This work has the LPPL maintenance status 'maintained'.
%%  Current maintainer of the work is Sebastian Friedl.
% \fi

% !TeX spellcheck=en_US

\documentclass[11pt]{ltxdoc}

\RequirePackage{iftex}
\RequireLuaTeX


\usepackage[no-math]{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\usepackage[english]{selnolig}

\usepackage{alltt}
\usepackage{csquotes}
\usepackage{graphicx}
\usepackage{hologo}
\usepackage{multicol}

\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}

\usepackage[unicode, pdfborder={0 0 0}, linktoc=all, hyperindex=false]{hyperref}
\usepackage{verbatim}

\usepackage[erewhon]{newtxmath}
\setmainfont{Source Serif Pro}
\setsansfont{Source Sans Pro}
\setmonofont[Scale=MatchLowercase]{Hack}

\usepackage[a4paper, left=4.50cm,right=2.75cm,top=3.25cm,bottom=2.75cm,nohead]{geometry}

\parindent 0pt

\CheckSum{1068}

\renewcommand*{\usage}[1]{\hyperpage{#1}}
\renewcommand*{\main}[1]{\hyperpage{#1}}
\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
\setcounter{IndexColumns}{2}

\newcommand*{\sty}[1]{\textsf{#1}}
\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}}

\RecordChanges
\PageIndex
\CodelineNumbered


\MakeShortVerb{"}

\title{German Module for the \sty{datetime2} Package \\ {\large\url{https://gitlab.com/SFr682k/datetime2-german}}}
\author{%
  \begin{tabularx}{.8\textwidth}{*{2}{>{\centering\arraybackslash}X}}
    Nicola L. C. Talbot & Sebastian Friedl \\
    (inactive)          & {\normalsize\href{mailto:sfr682k@t-online.de}{\texttt{sfr682k@t-online.de}}} \\
  \end{tabularx}%
}
\date{2019/12/13 (v3.0)}

\hypersetup{pdftitle={datetime2.sty German Module}, pdfauthor={Nicola L.C. Talbot, Sebastian Friedl}}


\begin{document}
    \maketitle
    
    
    \begin{abstract}
         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").
         
         If you want to use the settings in this module you must install it in addition to installing \sty{datetime2}.
         If you use \sty{babel} or \sty{polyglossia}, you will need this module to prevent them from redefining \cs{today}.
         
         The \sty{datetime2} \opt{useregional} setting must be set to "text" or "numeric" for the language styles to be set.
         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.
    \end{abstract}




    \clearpage
    \tableofcontents
    \clearpage
    
    
    
    \subsection*{Installation}
    \addcontentsline{toc}{subsection}{Installation}
    Extract the language definition files first:
    \begin{enumerate}
        \item Run \LaTeX\ over the file "datetime2-german.ins": \\
            "latex datetime2-german.ins"
            
        \item Move all "*.ldf" files to "TEXMF/tex/latex/datetime2-contrib/datetime2-german/"
    \end{enumerate}
    Then, you can compile the documentation yourself by executing \\[\smallskipamount]
    "lualatex datetime2-german-doc.dtx" \\
    "makeindex -s gind.ist datetime2-german-doc.idx" \\
    "makeindex -s gglo.ist -o datetime2-german-doc.gls datetime2-german-doc.glo" \\
    "lualatex datetime2-german-doc.dtx" \\
    "lualatex datetime2-german-doc.dtx" \\[\medskipamount]
    or just use the precompiled documentation shipped with the source files. \\
    In both cases, copy the files "datetime2-german-doc.pdf" and "README.md" to \\
    "TEXMF/doc/latex/datetime2-contrib/datetime2-german/"
    
    
    \subsection*{License}
    \addcontentsline{toc}{subsection}{License}
    This material is subject to the \LaTeX\ Project Public License, Version 1.3c or later. \\
    Details may be found in the respective language definition file's copyright header.
    
    
    \subsection*{Acknowledgments}
    \addcontentsline{toc}{subsection}{Acknowledgments}
    Thanks to \dots
    \begin{itemize}
        \item Jürgen Spitzmüller for his valuable advice while preparing version 2.0 of this module.
        
        \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.
        Previous versions used the ISO format (YYYY-MM-DD) as recommended by ÖNORM~1080, which was withdrawn in May~2018.
    \end{itemize}
    
    
    
    \clearpage
    \part{The Documentation}
    \section{Usage}
    
    
    \subsection{Setting up \sty{datetime2} with a language module}
    \textit{There are several methods of loading a language module. \\ Please refer to \sty{datetime2}'s documentation for details.}
    
    \bigskip
    \textbf{Variant 1:} \\
    Set the date style explicitly by passing "german", "de-DE", "de-AT" or "de-CH" to \sty{datetime2}: \\[\smallskipamount]
    "\documentclass{article}" \\
    "\usepackage[german]{datetime2}" \\
    "\begin{document}" \\
    "\today" \\
    "\end{document}"

    \medskip
    \textbf{Variant 2: Pick up the desired style from \sty{babel} or document class options)} \\
    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]
    "\documentclass[german]{article}" \\
    "\usepackage{babel}" \\
    "\usepackage[useregional]{datetime2}" \\
    "\begin{document}" \\
    "\today" \\
    "\end{document}"
    
    
    
    
    
    \subsection{Customization}
    There are a number of settings provided that can be used in \cs{DTMlangsetup} to modify the date-time style. These are:
    \begin{description}
    	\item["dowdaysep"]%
    	The separator between the day of week name and the day of month number.
    
    	\item["daymonthsep"]%
    	The separator between the day and the month name.
    
    	\item["monthyearsep"]%
    	The separator between the month name and year.
    
    	\item["datesep"]%
    	The separator between the date numbers in the "numeric" styles.
    
    	\item["timesep"]%
    	The separator between hours, minutes and seconds.
    
    	\item["datetimesep"]%
    	The separator between the date and time for the full date-time format.
    
    	\item["timezonesep"]%
    	The separator between the time and zone for the full date-time format.
    
    	\item["abbr"]%
    	This is a boolean key. If "true", the month (and weekday name, if shown) is abbreviated.
    
    	\item["mapzone"]%
    	This is a boolean key. If "true", the time zone mappings are applied.
    
    	\item["showdayofmonth"]%
    	A boolean key that determines whether or not to show the day of the month.
    
    	\item["showyear"]%
    	A boolean key that determines whether or not to show the year.
    \end{description}

    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.


    
    
    % TODO: check styles
    \section{The Modules}
    \subsection{Regionless style (\texttt{german})}
    \begin{tabularx}{\textwidth}{>{\itshape}rX}
    	\toprule
    	  \upshape\textbf{Textual style} & 13. Dezember 2019, 12:42:00 MEZ          \\
    	       with \opt{showdow} option & Freitag, 13. Dezember 2019, 12:42:00 MEZ \\
    	                           abbr. & 13. Dez. 2019, 12:42:00 MEZ              \\
    	abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12:42:00 MEZ          \\ \midrule
    	  \upshape\textbf{Numeric style} & 13.12.2019, 12:42:00 MEZ                 \\
    	       with \opt{showdow} option & Freitag, 13.12.2019, 12:42:00 MEZ        \\
    	                           abbr. & 13.12.19, 12:42:00 MEZ                   \\
    	abbr., with \opt{showdow} option & Fr, 13.12.19, 12:42:00 MEZ               \\ \bottomrule
    \end{tabularx}


    \subsection{German style (\texttt{de-DE})}
    \begin{tabularx}{\textwidth}{>{\itshape}rX}
    	\toprule
    	  \upshape\textbf{Textual style} & 13. Dezember 2019, 12:42:00 MEZ          \\
    	       with \opt{showdow} option & Freitag, 13. Dezember 2019, 12:42:00 MEZ \\
    	                           abbr. & 13. Dez. 2019, 12:42:00 MEZ              \\
    	abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12:42:00 MEZ          \\ \midrule
    	  \upshape\textbf{Numeric style} & 13.12.2019, 12:42:00 MEZ                 \\
    	       with \opt{showdow} option & Freitag, 13.12.2019, 12:42:00 MEZ        \\
    	                           abbr. & 13.12.19, 12:42:00 MEZ                   \\
    	abbr., with \opt{showdow} option & Fr, 13.12.19, 12:42:00 MEZ               \\ \bottomrule
    \end{tabularx}


    \subsection{Austrian style (\texttt{de-AT})}
    \begin{tabularx}{\textwidth}{>{\itshape}rX}
    	\toprule
    	  \upshape\textbf{Textual style} & 13. Dezember 2019, 12:42:00 MEZ          \\
    	       with \opt{showdow} option & Freitag, 13. Dezember 2019, 12:42:00 MEZ \\
    	                           abbr. & 13. Dez. 2019, 12:42:00 MEZ              \\
    	abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12:42:00 MEZ          \\ \midrule
    	  \upshape\textbf{Numeric style} & 13.12.2019, 12:42:00 MEZ                 \\
    	       with \opt{showdow} option & Freitag, 13.12.2019, 12:42:00 MEZ        \\
    	                           abbr. & 13.12.19, 12:42:00 MEZ                   \\
    	abbr., with \opt{showdow} option & Fr, 13.12.19, 12:42:00 MEZ               \\ \bottomrule
    \end{tabularx}


    \subsection{Swiss style (\texttt{de-CH})}
    \begin{tabularx}{\textwidth}{>{\itshape}rX}
    	\toprule
    	  \upshape\textbf{Textual style} & 13. Dezember 2019, 12.42.00 Uhr MEZ          \\
    	       with \opt{showdow} option & Freitag, 13. Dezember 2019, 12.42.00 Uhr MEZ \\
    	                           abbr. & 13. Dez. 2019, 12.42.00 Uhr MEZ              \\
    	abbr., with \opt{showdow} option & Fr, 13. Dez. 2019, 12.42.00 Uhr MEZ          \\ \midrule
    	  \upshape\textbf{Numeric style} & 13.12.2019, 12.42.00 Uhr MEZ                 \\
    	       with \opt{showdow} option & Freitag, 13.12.2019, 12.42.00 Uhr MEZ        \\
    	                           abbr. & 13.12.19, 12.42.00 Uhr MEZ                   \\
    	abbr., with \opt{showdow} option & Fr, 13.12.19, 12.42.00 Uhr MEZ               \\ \bottomrule
    \end{tabularx}
    
    
    


    \StopEventually{%
        \clearpage
        \phantomsection
        \addcontentsline{toc}{section}{Change History}%
        \PrintChanges%
        \addcontentsline{toc}{section}{\indexname}%
        \PrintIndex%
    }





    \clearpage
    \part{The Code}
    % TODO: Load code modules
    
    \section{The Base Module}
    The "german-base" module provides code common to all regional variations and engine-dependent code, e.\,g. commands printing weekday and month names.
    
    \DocInput{datetime2-german-base.dtx}
    \DocInput{datetime2-german-base-ascii.dtx}
    \DocInput{datetime2-german-base-utf8.dtx}
    

    \section{Regionless Style: \texttt{datetime2-german.ldf}}
    \DocInput{datetime2-german.dtx}

    \section{Regional Variations}
    \DocInput{datetime2-de-DE.dtx}
    \DocInput{datetime2-de-AT.dtx}
    \DocInput{datetime2-de-CH.dtx}

    \Finale
\end{document}