summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nchairx/source/nchairx.dtx
blob: 3350a15508fe872a0f4b9f2236d5f0580f960fa8 (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
% \iffalse meta-comment
%
% Copyright (C) 2018 - 2021 by ChairX
%
 % This work 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 2005/12/01 or later.
%
% \fi
%
%\iffalse
%<*nchairx>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nchairx}
   [2021/07/29 v1.0.0 First major release]
%</nchairx>
%
%<*driver>
\documentclass{ltxdoc}

\usepackage[english,german,strings]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{nchairx}
\usepackage{ifdraft}
\usepackage{gitinfo2}
\usepackage[linktoc=all]{hyperref}

\EnableCrossrefs

\CodelineIndex

\RecordChanges

\begin{document}
	\DocInput{nchairx.dtx}
\end{document}
%</driver>
%\fi
%
% \CheckSum{2012}
%
% \changes{v0.1}{2018/02/27}{Initial test}
% \changes{v0.9}{2019/02/21}{First official release}
% \changes{v1.0.0}{2021/07/29}{First major release}
%
% \GetFileInfo{nchairx.sty}
%
% \title{The \textsf{nChairX} package}
% \author{ChairX \\
% \ifdraft{Last changes by \gitAuthorName{} on \gitAuthorDate \\ }
% \ifdraft{Git revision of nchairx:}
% \ifdraft{\texttt{\gitAbbrevHash{}} {\gitReferences{}} \\ }
% \ifdraft{}
% Version \fileversion{} (\filedate) \\
% \texttt{marvin.dippell@mathematik.uni-wuerzburg.com}}
%
% \maketitle
%
% \selectlanguage{english}
%
% \begin{abstract}
%     This is a part of the new nChairX package providing the famous
%     ChairX style.
% \end{abstract}
%
% \setcounter{tocdepth}{2}
% \tableofcontents
%
% \section{Introduction}
% This package defines the New ChairX style. Based on previous
% versions we provide a major clean-up with many additional features
% and easier handling. The style file is a rather high-level style
% file providing many standard environments needed in math, many
% macros needed in differential geometry, algebra, and analysis and
% some other useful tools. The style file includes several other
% packages and sets various defaults. There is a companion package
% called |chairxmath| which only defines the math-related macros but
% avoids setting environments etc.
%
%
% \section{Usage}
% \label{sec:Usage}
%
% To use the package you have to include it as usual by
% \begin{center}
%     \begin{tabular}[l]{p{0.8\textwidth}}
%         \verb|\usepackage{nchairx}|
%     \end{tabular}
% \end{center}
% and specify some options if needed.
%
%
% \subsection{Package Options}
%
% \DescribeMacro{noMath} The math
% macros of the |nchairx| package can be excluded with the option |noMath|.
% This can be used if one does not need the math macros of |nchairx| and there occur
% clashes with other packages or macros, but the environments and other settings of
% |nchairx| are still desired.
%
% \subsection{Setting the Defaults}
% \label{sec:SettingDefaults}
%
% \input{chairxDefaultsDoc.dtx}
%
%
% \subsection{Supporting many Languages}
% \label{sec:LanguageSupport}
%
% For the use of other languages than English (our default) the
% options of the |babel| package are respected. The important keywords
% of \textsf{nChairX} (essentially the names of the environments) will
% then be translated accordingly.  In order to enable this you have to
% load |babel| with the additional language you intend to use, e.g.
% \begin{center}
%     \begin{tabular}[l]{p{0.8\textwidth}}
%         \verb|\usepackage[german,strings]{babel}|
%     \end{tabular}
% \end{center}
% \emph{before} you load |nchairx|.
% Currently, only German is supported beside English. Then you can
% switch between the languages inside one document with
% |\selectlanguage{language}| to get the correct names of the
% keywords.  When loading several languages it is always a good idea
% to place an explicit |\selectlanguage{language}| at the beginning of
% the document to set the stage correctly. Note that you have to use
% the |strings| option for babel as well.
%
%
% \subsection{Environments}
% \label{sec:Environments}
%
% The \textsf{nChairX} package provides many predefined mathematical
% environments like definitions, theorems etc. The styling is fairly
% standard. The names of the environments are language sensitive based
% on the |babel| package.
%
% \input{chairxEnvDoc.dtx}
%
%
% \subsection{Logo Support}
% \label{sec:LogoSupport}
%
% \input{chairxLogoDoc.dtx}
%
%
% \section{The Math Macros}
%
% One of the main purposes of |nchairx| is to provide several (in
% fact, many) new math macros needed in various situations: we have
% support for many things in differential geometry, algebra, and
% functional analysis. The math macros can be used independently of
% the full |nchairx| package under the name |chairxmath|. However,
% |nchairx| always includes the math macros.
%
% \subsection{The Handling of the Fonts}
% \input{chairxmathFontsDoc.dtx}
%
% \subsection{New Delimiter Sizes}
% \input{chairxmathDelimitersDoc.dtx}
%
% \subsection{Decoration}
% \input{chairxmathDecorationDoc.dtx}
%
% \setlength{\parindent}{0pt}
%
% \subsection{General Mathematics Macros}
% \input{chairxmathGeneralDoc.dtx}
%
% \subsection{Algebra}
% \input{chairxmathAlgebraDoc.dtx}
%
% \subsection{Analysis}
% \input{chairxmathAnalysisDoc.dtx}
%
% \subsection{Category Theory}
% \input{chairxmathCategoryDoc.dtx}
%
% \subsection{Differential Geometry}
% \input{chairxmathDiffgeoDoc.dtx}
%
% \subsection{Linear Algebra}
% \input{chairxmathLinalgDoc.dtx}
%
% \subsection{Statistics}
% \input{chairxmathStatisticsDoc.dtx}
%
% \subsection{Topology}
% \input{chairxmathTopologyDoc.dtx}
%
% \section{Known Bugs and Conflicts}
%
% There are several conflicts possible since |nchairx| loads a number
% of other packages, some with explicit options needed to obtain the
% aspired functionality. In this case, it can not be avoided that the
% packages is loaded via |nchairx|.
% \begin{itemize}
% \item The package |xkeyval| is loaded without options. This is
%     necessary for many reasons like internal processing of ifs etc.
% \item The package |amsmath| and |amssymb| are loaded. This can
%     sometimes yield unexpected conflicts with packages overwriting
%     commands from these two packages.
% \item We define a smiley symbol from the |wasysym| font. This gives
%     a conflict with the |wasysym| package.
% \item We load the |tensor| package and overwrite the |\tensor|
%     command of that package. The original macro is available under
%     |\originaltensor| and as identical macro |\decorate|.
% \item We load |ntheorem| with specified options. This is unavoidable
%     to have the correct behaviour of our environments.
% \item The theorem lists from the |ntheorem| package seem to crash
%     with the |babel| names we use for the actual environments. A
%     workaround for this is e.g.
%     \begin{quote}
%         |\makeatletter \listtheorems{definitions} \makeatother|
%     \end{quote}
%     to get the list of definitions.
% \end{itemize}
%
% \StopEventually{\PrintIndex \PrintChanges}
%
%
% \section{Implementation}
% \label{sec:Implementation}
%
%
% \subsection{Processing the Options}
%
% Before including other packages we make sure that we can use
% key-value pairs as options using |xkeyval|
%
%    \begin{macrocode}
\RequirePackage{xkeyval}
%    \end{macrocode}
%
% Before including other required packages we have to process the
% options that might alter the options given to these packages.
%
% First we create ifs for later use.
%
%    \begin{macrocode}
\newif\if@loadmath \@loadmathtrue
%    \end{macrocode}
%
% Define option for excluding math macros
%
%    \begin{macrocode}
\DeclareOptionX[chairx]<math>{noMath}{
	\@loadmathfalse
}
%    \end{macrocode}
%
% Process options for the style file
%
%    \begin{macrocode}
\ProcessOptionsX[chairx]<math>
%    \end{macrocode}
%
% \subsection{Required Packages}
%
% After processing the options we can now load the other required
% packages. The following packages are required for the correct usage
% of |nchairx|. We include them with some mandatory options.
%
% We will need several things from |amsmath| and |amssymb|.
%
%    \begin{macrocode}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
%    \end{macrocode}
%
% The |suffix| package allows to define $*$-versions of macros.
%
%    \begin{macrocode}
\RequirePackage{suffix}
%    \end{macrocode}
%
% The |mathtools| package provides so many nice things to type-set
% math. Always a good idea to include this. In particular, we will
% need the |\DeclarePairedDelimiter| command a lot.
%
%    \begin{macrocode}
\RequirePackage{mathtools}
%    \end{macrocode}
%
% The |ntheorem| package is used to define math environments of
% various type. We need this package with particular options to make
% the proof environment work correctly. Note that the proof
% environment of |ntheorem| places the end-of-proof in a much better
% way than every other available option.
%
%    \begin{macrocode}
\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
%    \end{macrocode}
%
% The |graphicx| package is useful for many things. We need it for our
% logo support to include pdf-files
%    \begin{macrocode}
\RequirePackage{graphicx}
%    \end{macrocode}
%
% The |enumitem| package is now used to generate the enumerated lists
% of items for the math environments. This allows various fine-tuning
% and additional functionality for referring to items in lists.
%
%    \begin{macrocode}
\RequirePackage{enumitem}
%    \end{macrocode}
%
% The |tensor| package is used to place symbols at all possible
% positions around one central symbol
%    \begin{macrocode}
\RequirePackage{tensor}
%    \end{macrocode}
%
% Some additional fonts and symbols from |stmaryrd|: we only load the
% font and grab those symbols we actually need to keep things easy.
%
%    \begin{macrocode}
\DeclareSymbolFont{stmry}{U}{stmry}{m}{n}
\SetSymbolFont{stmry}{bold}{U}{stmry}{b}{n}
%    \end{macrocode}
%
% Last we need |aliascnt| to allow the usage of |\autoref|.
%
%    \begin{macrocode}
\RequirePackage{aliascnt}
%    \end{macrocode}
%
% \subsection{The Handling of the Fonts}
% \input{chairxmathFonts.dtx}
%
%
% \subsection{Setting some Defaults}
% \input{chairxDefaults.dtx}
%
%
% \subsection{Environments}
% \input{chairxEnv.dtx}
%
%
% \subsection{Logo Support}
% \input{chairxLogo.dtx}
%
%
% \subsection{The Math Macros}
%
% Include the math macros in alphabetical order of the file names.
%
% \input{chairxmathDelimiters.dtx}
% \input{chairxmathDecoration.dtx}
% \input{chairxmathGeneral.dtx}
% \input{chairxmathAlgebra.dtx}
% \input{chairxmathAnalysis.dtx}
% \input{chairxmathCategory.dtx}
% \input{chairxmathDiffgeo.dtx}
% \input{chairxmathLinalg.dtx}
% \input{chairxmathStatistics.dtx}
% \input{chairxmathTopology.dtx}
%
%    \begin{macrocode}
%    \end{macrocode}
%
% \Finale
\endinput