Debian Codegraph @

texmf-dist/source/latex/ltx-talk/ltx-talk-required.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: ltx-talk-required.dtx Copyright (C) 2025,2026 Joseph Wright
4 %
5 % It may be distributed and/or modified under the conditions of the
6 % LaTeX Project Public License (LPPL), either version 1.3c of this
7 % license or (at your option) any later version. The latest version
8 % of this license is in the file
9 %
10 % https://www.latex-project.org/lppl.txt
11 %
12 % This file is part of the "ltx-talk bundle" (The Work in LPPL)
13 % and all files in that bundle must be distributed together.
14 %
15 % The released version of this bundle is available from CTAN.
16 %
17 % -----------------------------------------------------------------------
18 %
19 % The development version of the bundle can be found at
20 %
21 % https://github.com/josephwright/ltx-talk
22 %
23 % for those people who are interested.
24 %
25 % -----------------------------------------------------------------------
26 %
27 %<*driver>
28 \documentclass{l3doc}
29 % Additional commands needed in this source
30 \NewDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
31 \begin{document}
32 \DocInput{\jobname.dtx}
33 \end{document}
34 %</driver>
35 % \fi
36 %
37 % ^^A As we are dealing with a class, this has to be done manually
38 % \def\filedate{2026-04-30}
39 % \def\fileversion{v0.5.0}
40 %
41 % \title{^^A
42 % \pkg{ltx-talk-required} -- \enquote{Required} definitions^^A
43 % \thanks{This file describes \fileversion,
44 % last revised \filedate.}^^A
45 % }
46 %
47 % \author{^^A
48 % Joseph Wright^^A
49 % \thanks{^^A
50 % E-mail: \email{[email protected]}^^A
51 % }^^A
52 % }
53 %
54 % \date{Released \filedate}
55 %
56 % \maketitle
57 %
58 % \begin{documentation}
59 %
60 % \end{documentation}
61 %
62 % \begin{implementation}
63 %
64 % \section{\pkg{ltx-talk-required} implementation}
65 %
66 % Start the \pkg{DocStrip} guards.
67 % \begin{macrocode}
68 %<*class>
69 % \end{macrocode}
70 %
71 % Identify the internal prefix.
72 % \begin{macrocode}
73 %<@@=talk>
74 % \end{macrocode}
75 %
76 % Here we collect up things that are more-or-less required to create a useful
77 % class but are not defined by the \LaTeX{} kernel for historical reasons. They
78 % are therefore largely copies from \texttt{article.cls} and contain
79 % \enquote{classical} definitions so that they follow the expectations of
80 % third-party code.
81 %
82 % \begin{macro}{\today}
83 % This is the definition as done in the standard classes.
84 % \begin{macrocode}
85 \cs_new_nopar:Npn \today
86 {
87 \ifcase \month \or
88 January \or
89 February \or
90 March \or
91 April \or
92 May \or
93 June \or
94 July \or
95 August \or
96 September \or
97 October \or
98 November \or
99 December
100 \fi
101 \space
102 \number \day ,
103 \space
104 \number \year
105 }
106 % \end{macrocode}
107 % \end{macro}
108 %
109 % \subsection{Standard design settings}
110 %
111 % \begin{macrocode}
112 \setcounter { tocdepth } { 3 }
113 \setlength \arraycolsep { 5pt }
114 \setlength \tabcolsep { 6pt }
115 \setlength \arrayrulewidth { 0.4pt }
116 \setlength \doublerulesep { 2pt }
117 \setlength \tabbingsep { \labelsep }
118 \skip \@mpfootins = \skip \footins
119 \setlength \fboxsep { 3pt }
120 \setlength \fboxrule { 0.4pt }
121 % \end{macrocode}
122 %
123 % \subsection{List support}
124 %
125 % \begin{macrocode}
126 \setlength \labelsep { 0.5em }
127 \cs_new:Npn \labelenumi { \theenumi . }
128 \cs_new:Npn \labelenumii { ( \theenumii ) }
129 \cs_new:Npn \labelenumiii { \theenumiii . }
130 \cs_new:Npn \labelenumiv { \theenumiv . }
131 \cs_new:Npn \labelitemi { \labelitemfont \textbullet }
132 \cs_new:Npn \labelitemii { \labelitemfont \bfseries \textendash }
133 \cs_new:Npn \labelitemiii { \labelitemfont \textasteriskcentered }
134 \cs_new:Npn \labelitemiv { \labelitemfont \textperiodcentered }
135 \cs_new:Npn \labelitemfont { \normalfont }
136 % \end{macrocode}
137 %
138 % \begin{macrocode}
139 \setlength \leftmargini { 2em }
140 \setlength \leftmarginii { 2em }
141 \setlength \leftmarginiii { 2em }
142 \setlength \labelsep { 0.5em }
143 \setlength \labelwidth { \leftmargini }
144 \addtolength \labelwidth { -\labelsep }
145 \cs_gset_nopar:Npn \@listi
146 {
147 \leftmargin \leftmargini
148 \topsep 3pt plus 2pt minus 2.5pt
149 \parsep 0pt
150 \itemsep 3pt plus 2pt minus 3pt
151 }
152 \cs_gset_eq:NN \@listI \@listi
153 \cs_gset_nopar:Npn \@listii
154 {
155 \leftmargin \leftmarginii
156 \topsep 2pt plus 1pt minus 2pt
157 \parsep 0pt plus 1pt
158 \itemsep \parsep
159 }
160 \cs_gset_nopar:Npn \@listiii
161 {
162 \leftmargin \leftmarginiii
163 \topsep 2pt plus 1pt minus 2pt
164 \parsep 0pt plus 1pt
165 \itemsep \parsep
166 }
167 \setlength \partopsep { 0pt }
168 % \end{macrocode}
169 %
170 % \begin{macrocode}
171 %</class>
172 % \end{macrocode}
173 %
174 % \end{implementation}
175 %
176 % \PrintIndex