Debian Codegraph @

texmf-dist/doc/latex/eqnlines/eqnlines-src.tex

raw
1 %%
2 %% This is file `eqnlines-src.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% eqnlines.dtx (with options: `source')
8 %%
9 %% Copyright (C) 2024-2026 Niklas Beisert
10 %%
11 %% Based on the latex package amsmath:
12 %% Copyright (C) 1995, 2000, 2013 American Mathematical Society.
13 %% Copyright (C) 2016-2024 LaTeX Project and American Mathematical Society.
14 %%
15 %% This work may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.3
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% https://www.latex-project.org/lppl.txt
20 %% and version 1.3c or later is part of all distributions of LaTeX
21 %% version 2008 or later.
22 %%
23 \ProvidesFile{eqnlines-src.tex}[2026-03-23 v1.0.1 eqnlines source code documentation]
24 \def\thepkg/{eqnlines}\def\thedate/{2026-03-23}\def\theversion/{v1.0.1}
25 \def\thecopyright/{2024\texorpdfstring{--}{-}2026 Niklas Beisert}
26 \PassOptionsToClass{10pt,a4paper}{article}
27 \documentclass{ltxdoc}
28
29 \usepackage[margin=35mm]{geometry}
30 \usepackage[hyperindex=false]{hyperref}
31 \usepackage{hyperxmp}
32 \usepackage[usenames]{color}
33 \usepackage{longtable}
34
35 \title{The \markpkg{\thepkg/} Package\\Source Code Documentation}
36 \hypersetup{pdftitle={The \thepkg/ Package -- Source Code Documentation}}
37 \hypersetup{pdfsubject={Documented Source for the LaTeX2e Package \thepkg/}}
38 \author{Niklas Beisert\\[2ex]
39 Institut f\"ur Theoretische Physik\\
40 Eidgen\"ossische Technische Hochschule Z\"urich\\
41 Wolfgang-Pauli-Strasse 27, 8093 Z\"urich, Switzerland\\[1ex]
42 \href{mailto:[email protected]}
43 {\texttt{[email protected]}}}
44 \hypersetup{pdfauthor={Niklas Beisert}}
45 \date{\theversion/: \markdate{\thedate/}\\[1ex]
46 \url{https://ctan.org/pkg/\thepkg/}\\[0.5ex]
47 \url{https://github.com/nbeisert/latex-pkg-nb}}
48
49 \hypersetup{pdflang={en-UK}}
50 \hypersetup{pdfurl={https://ctan.org/pkg/\thepkg/}}
51 \hypersetup{pdfcopyright={Copyright \thecopyright/.
52 This work may be distributed and/or modified under the
53 conditions of the LaTeX Project Public License, either version 1.3
54 of this license or (at your option) any later version.}}
55 \hypersetup{pdflicenseurl={https://www.latex-project.org/lppl.txt}}
56 \hypersetup{pdfcontactaddress={ETH Zurich, ITP, HIT K,
57 Wolfgang-Pauli-Strasse 27}}
58 \hypersetup{pdfcontactpostcode={8093}}
59 \hypersetup{pdfcontactcity={Zurich}}
60 \hypersetup{pdfcontactcountry={Switzerland}}
61 \hypersetup{pdfcontactemail={[email protected]}}
62 \hypersetup{pdfcontacturl={https://people.phys.ethz.ch/\xmptilde nbeisert/}}
63
64 \hypersetup{keeppdfinfo=true}
65 \hypersetup{pdfsource={}}
66 \AddToHook{begindocument/before}{\hypersetup{colorlinks=false}}
67 \hypersetup{urlbordercolor={.5 1 1}}
68 \hypersetup{linkbordercolor={1 .7 .7}}
69 \AddToHook{begindocument/before}{\hypersetup{pdfstartview=FitH}}
70
71 \parskip1ex
72 \parindent0pt
73 \edef\itemize{\unexpanded\expandafter{\itemize}\parskip0pt}
74
75 \newcommand{\markpkg}[1]{\textsf{#1}}
76 \newcommand{\markdate}[1]{\textsf{#1}}
77 \newcommand{\secref}[1]{\hyperref[#1]{section \ref*{#1}}}
78 \newcommand{\ctanref}[2]{\href{https://ctan.org/#1}{#2}}
79 \newcommand{\ctanpkg}[1]{\ctanref{pkg/#1}{\markpkg{#1}}}
80
81 \def\verbbar{\texttt{\char"7C}}
82 \def\verbpkg{\texttt{\thepkg/}}
83 \def\thepkgctan/{\ctanpkg{\thepkg/}}
84
85 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86
87 \RenewDocElement[macrolike = true ,
88 toplevel = false,
89 idxtype = ,
90 idxgroup = LaTeX commands\actualchar\latex/ commands ,
91 printtype =
92 ]{Macro}{macro}
93 \RenewDocElement[macrolike = false ,
94 toplevel = false,
95 idxtype = env. ,
96 idxgroup = Package environments,
97 printtype = \textit{env.}
98 ]{Env}{environment}
99 \NewDocElement[macrolike = true ,
100 toplevel = false,
101 idxtype = ,
102 idxgroup = Package commands,
103 printtype =
104 ]{InterfaceMacro}{imacro}
105 \NewDocElement[macrolike = true ,
106 toplevel = false,
107 idxtype = ,
108 idxgroup = Package commands (obsolete),
109 printtype =
110 ]{ObsoleteInterfaceMacro}{omacro}
111 \NewDocElement[macrolike = false ,
112 toplevel = false,
113 idxtype = key ,
114 idxgroup = Package keys ,
115 printtype = \textit{key}
116 ]{Key}{key}
117 \NewDocElement[macrolike = false ,
118 toplevel = false,
119 idxtype = mod ,
120 idxgroup = Command modifiers ,
121 printtype = \textit{mod.}
122 ]{Mod}{modifier}
123 \NewDocElement[macrolike = false ,
124 toplevel = false,
125 idxtype = ctrl ,
126 idxgroup = Control key ,
127 printtype = \textit{ctrl.}
128 ]{Control}{controlkey}
129 \NewDocElement[macrolike = false ,
130 toplevel = false,
131 idxtype = setup ,
132 idxgroup = Setup key ,
133 printtype = \textit{setup}
134 ]{Setup}{setupkey}
135 \NewDocElement[macrolike = false ,
136 toplevel = false,
137 idxtype = opt ,
138 idxgroup = Option key ,
139 printtype = \textit{opt.}
140 ]{Option}{optionkey}
141 \NewDocElement[macrolike = true ,
142 toplevel = false,
143 idxtype = counter ,
144 idxgroup = TeX counters\actualchar \protect\tex/ counters ,
145 printtype = \textit{counter}
146 ]{TeXCounter}{tcounter}
147 \NewDocElement[macrolike = false ,
148 toplevel = false,
149 idxtype = counter ,
150 idxgroup = LaTeX counters\actualchar \latex/ counters ,
151 printtype = \textit{counter}
152 ]{LaTeXCounter}{lcounter}
153 \NewDocElement[macrolike = true ,
154 toplevel = false,
155 idxtype = skip ,
156 idxgroup = LaTeX length\actualchar \latex/ length (skip) ,
157 printtype = \textit{skip}
158 ]{LaTeXSkip}{lskip}
159 \NewDocElement[macrolike = true ,
160 toplevel = false,
161 idxtype = dimen ,
162 idxgroup = LaTeX length\actualchar \latex/ length (dimen) ,
163 printtype = \textit{dimen}
164 ]{LaTeXDimen}{ldimen}
165 \NewDocElement[macrolike = true ,
166 toplevel = false,
167 idxtype = box ,
168 idxgroup = LaTeX box\actualchar \latex/ box ,
169 printtype = \textit{box}
170 ]{LaTeXBox}{lbox}
171 \NewDocElement[macrolike = true ,
172 toplevel = false,
173 idxtype = bool ,
174 idxgroup = eqnlines bool\actualchar eqnlines bool ,
175 printtype = \textit{bool}
176 ]{eqnlinesBool}{ebool}
177 \NewDocElement[macrolike = true ,
178 toplevel = false,
179 idxtype = bool ,
180 idxgroup = LaTeX conditional\actualchar \latex/ conditional ,
181 printtype = \textit{bool}
182 ]{LaTeXConditional}{lcond}
183
184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
185
186 \usepackage{verbatim}
187 \makeatletter
188 \def\example@addline#1{%
189 \g@addto@macro\example@dbuf{#1 }%
190 \g@addto@macro\example@pbuf{\item|#1|}}
191 \def\scanexample{%
192 \gdef\example@dbuf{}%
193 \gdef\example@pbuf{}%
194 \begingroup
195 \@bsphack
196 \let\do\@makeother\dospecials
197 \catcode`\^^M\active
198 \def\verbatim@processline{\expandafter\example@addline\expandafter%
199 {\the\verbatim@line}}%
200 \verbatim@start}
201 \def\endscanexample{\@esphack\endgroup\ignorespacesafterend}
202 \def\printexample{\begingroup
203 \topsep\z@skip\parsep\z@skip\itemsep\z@skip\partopsep\z@skip\parskip\z@skip
204 \trivlist
205 \expandafter\scantokens\expandafter{\example@pbuf}%
206 \endtrivlist
207 \endgroup}
208 \def\doexample{\expandafter\scantokens\expandafter{\example@dbuf}}
209 \newcommand{\showexampleh}[1][0.5]{\par%
210 \parbox{\dimexpr#1\textwidth\relax}{\printexample}%
211 \parbox{\dimexpr\textwidth-#1\textwidth\relax}{\doexample}%
212 \par\medskip\ignorespaces}
213 \newcommand{\showexamplev}{%
214 \printexample
215 \par\medskip
216 \parbox{\textwidth}{\doexample}%
217 \par\medskip\ignorespaces}
218 \newenvironment{example}
219 {\parskip\z@skip\par\medskip\hrule\medskip}
220 {\par\hrule\par\medskip}
221 \makeatother
222
223 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
224
225 \newcommand{\TODO}{\textbf{\textcolor{red}{TODO:}} }
226
227 \def\tex/{\TeX}
228 \def\latex/{\LaTeX}
229 \def\amsmath/{\ctanpkg{amsmath}}
230
231 \usepackage{eqnlines}
232 \eqnlinesset{belowtopmode=top,belowtopskip=0pt}
233 \def\pstrut{\vphantom{(}}
234 \def\bstrut{\vphantom{b}}
235
236 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239 \begin{document}
240
241 \maketitle
242
243 \begin{abstract}\noindent
244 \markpkg{eqnlines} is a \LaTeXe{} package providing
245 a framework for typesetting single- and multi-line equations
246 which extends the established equation environments
247 of \latex/ and the \markpkg{amsmath} package
248 with many options for convenient adjustment of the intended layout.
249 In particular, the package adds flexible schemes for numbering,
250 horizontal alignment and semi-automatic punctuation, and it improves
251 upon the horizontal and vertical spacing options. The extensions can
252 be used and adjusted through optional arguments and modifiers to the
253 equation environments as well as global settings.
254 \end{abstract}
255
256 \begingroup
257 \parskip0ex
258 \tableofcontents
259 \endgroup
260
261 \raggedright
262 \settowidth\MacroIndent{\rmfamily\scriptsize 0000\ }
263
264 \DocInput{\thepkg/.dtx}
265
266 \end{document}
267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 \endinput
271 %%
272 %% End of file `eqnlines-src.tex'.