Debian Codegraph @

texmf-dist/tex/generic/tex4ht/scrreprt.4ht

raw
1 % scrreprt.4ht (2025-12-27-14:44), generated from tex4ht-4ht.tex
2 % Copyright (C) 1999-2009 Eitan M. Gurari
3 % Copyright 2009-2025 TeX Users Group
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either
7 % version 1.3c of this license or (at your option) any
8 % later version. The latest version of this license is in
9 % https://www.latex-project.org/lppl.txt
10 % and version 1.3c or later is part of all distributions
11 % of LaTeX version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status "maintained".
14 %
15 % The Current Maintainer of this work
16 % is the TeX4ht Project <https://tug.org/tex4ht>.
17 %
18 % If you modify this program, changing the
19 % version identification would be appreciated.
20 \immediate\write-1{version 2025-12-27-14:44}
21
22 \let\o:maketitle:\maketitle
23 \def\maketitle{\bgroup
24 \gHAdvance\:mpNum by 1
25 \HAssign\minipageNum=\:mpNum \relax
26 %
27 \ifx \EndPicture\:UnDef
28 \def\sec:typ{title}%
29 \Configure{HtmlPar}{}{}{}{}%
30 \Configure{newpage}{}%
31 \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
32 \let\a:tabular:sv\a:tabular \let\b:tabular:sv\b:tabular
33 \let\c:tabular:sv\c:tabular \let\d:tabular:sv\d:tabular
34 \let\e:tabular:sv\e:tabular \let\f:tabular:sv\f:tabular
35 \let\before:begintabular:sv\before:begintabular
36 %
37 \Configure{HBorder}{}{}{}{}{}{}{}{}{}{}%
38 \Configure{tabular}{}{}{}{\e:mktl}
39 {\bgroup \let\a:tabular\a:tabular:sv \let\b:tabular\b:tabular:sv
40 \let\c:tabular\c:tabular:sv \let\d:tabular\d:tabular:sv
41 \let\e:tabular\e:tabular:sv \let\f:tabular\f:tabular:sv
42 \let\before:begintabular\before:begintabular:sv
43 }{\egroup}
44 \ConfigureEnv{tabular}{\empty}{}{}{}%
45 %
46 \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
47 \pend:def\@date{\a:date}\append:def\@date{\b:date}%
48 \pend:def\@author{\a:author}\append:def\@author{\b:author}%
49 \def\and{\a:and}
50 %
51 \fi
52 \pic:gobble\a:mktl \o:maketitle: \pic:gobble\b:mktl
53 \egroup \let\maketitle\empty}
54 \NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
55 \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
56 \NewConfigure{thanks author date and}[8]{%
57 \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:author{#3}\c:def\b:author{#4}%
58 \c:def\a:date{#5}\c:def\b:date{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
59
60 \pend:def\titlepage{%
61 \cfg:maketitle
62 }
63 \def\cfg:maketitle{%
64 \global\let\cfg:maketitle\empty
65 \ifx\@dedication\@empty \else
66 \pend:def\@dedication{\a:dedication}%
67 \append:def\@dedication{\b:dedication}%
68 \fi
69 \pend:def\@subtitle{\a:subtitle}
70 \append:def\@subtitle{\b:subtitle}
71
72 }
73 \NewConfigure{dedication}{2}
74
75 \Configure{UndefinedSec}{likepart}
76 \Configure{UndefinedSec}{likechapter}
77 \Configure{UndefinedSec}{likesection}
78 \Configure{UndefinedSec}{likesubsection}
79 \def\tableofcontents{%
80 \ifx\contentsname\empty \else
81 %
82 \chapter*{\contentsname}%
83 %
84 %
85 \fi
86 \:tableofcontents}
87
88
89 \let\:tempb\chapter
90 \Def:Section\chapter{\thechapter}{#1}
91 \let\:chapter\chapter
92 \let\chapter\:tempb
93 \def\@makechapterhead#1{}
94 \let\no@chapter\@chapter
95 \def\@chapter[#1]#2{%
96 \gHAdvance\:mpNum by 1
97 \HAssign\minipageNum=\:mpNum \relax
98 %
99 {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}}%
100 \HtmlEnv \Toc:Title{#1}\:chapter{#2}}
101 \Def:Section\likechapter{}{#1}
102 \let\:likechapter\likechapter
103 \let\likechapter\:UnDef
104 \let\no@schapter\@schapter
105 \def\@schapter#1{%
106 {\let\addcontentsline\:gobbleIII\no@schapter{}}%
107 \HtmlEnv \:likechapter{#1}}
108 \let\no@appendix\appendix
109 \Def:Section\appendix{\thechapter}{#1}
110 \let\:appendix\appendix
111 \def\appendix{%
112 \def\@chapter[##1]##2{%
113 \gHAdvance\:mpNum by 1
114 \HAssign\minipageNum=\:mpNum \relax
115 %
116 {\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
117 \HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
118 \no@appendix}
119
120 \NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
121 \c:def\cptC:{#3}\c:def\cptD:{#4}}
122 \long\def\@makecaption#1#2{%
123 {\cptA: \cap:ref{#1}%
124 \if :#1:\else\cptB:\fi}{\cptC:{#2}\cptD:}}
125
126 \pend:def\caption{\SkipRefstepAnchor}
127 \append:def\quote{\par\@totalleftmargin\z@}
128 \long\def\c:theindex:#1#2#3#4#5#6#7#8#9{%
129 \def\theindex{\SaveEverypar\ht:everypar{}#1%
130 \def\idx:item{}%
131 \def\endtheindex{\idx:item#2\RecallEverypar}%
132 \def\item{\idx:item\def\idx:item{#4}\let\index\@gobble #3}%
133 \def\subitem{\idx:item\def\idx:item{#6}\let\index\@gobble #5}%
134 \def\subsubitem{\idx:item\def\idx:item{#8}\let\index\@gobble #7}}%
135 \def\indexspace{\idx:item#9\let\idx:item\empty}}
136 \def\warn:idx#1{%
137 \expandafter\ifx \csname #1warn:idx\endcsname\relax
138 \expandafter\global
139 \expandafter\let \csname #1warn:idx\endcsname\def
140 \writesixteen
141 {---------------------------------------------------------}%
142 \:warning{If not done so, the index is to be processed by
143 ^^J\space\space tex '\string\def\string\filename
144 {{#1}{idx}{4dx}{ind}} \noexpand\input\space idxmake.4ht'
145 ^^J\space\space makeindex -o #1.ind #1.4dx
146 ^^Jinstead of
147 ^^J\space\space makeindex -o #1.ind #1.idx
148 ^^JOn some platforms, the quotation marks ' should be
149 ^^J replaced by double quotation marks " or eliminated.
150 ^^J---------------------------------------------------------
151 }%
152 {\Configure{Needs}{File: #1.4idx}\Needs{}}%
153 \fi}
154 \ifOption{info}{\Log:Note{
155 A script of the form
156 ^^Jtex '\def\string\filename{{\%\%1}{idx}{4dx}{ind}}
157 \string\input\space idxmake.4ht'
158 ^^Jmakeindex -o \%\%1.ind \%\%1.4dx
159 ^^Jin the env file, automatically calls to the revised makeindex
160 ^^Jcommand. An extra compilation of the source LaTeX file is required,
161 ^^Jto get the index correctly into the output.}}{}
162 \def\ind:defs{\let\LNKidx\empty
163 \def\LNK##1##2##3##4{\ifx\NewConfigure\:UnDef\else
164 \def\LNK:number{##4}%
165 \a:LNK[##1]{##2}{}\gHAdvance\:LNKno1
166 \def\:THIrd{##3}\ifx\:THIrd\empty
167 \LNKidx{\ifx\c:LNK\empty\:LNKno\else \c:LNK\fi}\else
168 \LNKidx{##3}\fi
169 \global\let\LNKidx\empty
170 \b:LNK
171 \fi}%
172 \def\:LNKno{0}}
173 \NewConfigure{LNK}{3}
174 \Configure{LNK}{\Link}{\EndLink}{}
175 \def\yhbLNK#1{\expandafter\let\expandafter\LNKidx\csname
176 #1\endcsname\LNK}
177
178 \Configure{@begin}{theindex}{\ind:defs}
179
180 \NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
181 \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
182 \NewConfigure{thanks author date and}[8]{%
183 \c:def\a:thanks{#1}\c:def\b:thanks{#2}%
184 \c:def\a:author{#3}\c:def\b:author{#4}%
185 \c:def\a:date{#5}\c:def\b:date{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
186
187 \append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
188 \NewConfigure{quotation}{1}
189 \NewConfigure{listof}{6}
190
191 \def\tableofcontents{%
192 \ifx\contentsname\empty \else
193 %
194 \chapter*{\contentsname}%
195 %
196 %
197 \fi
198 \:tableofcontents}
199
200 \edef\:TOC{%
201 \noexpand\ifx [\noexpand\:temp
202 \noexpand\expandafter\noexpand\:TableOfContents
203 \noexpand\else
204 \noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
205 \ifnum \c@tocdepth >\m@ne chapter,appendix,addchap,\fi
206 \ifnum \c@tocdepth>0 section,\fi
207 \ifnum \c@tocdepth>1 subsection,\fi
208 \ifnum \c@tocdepth>2 subsubsection,\fi
209 \ifnum \c@tocdepth>3 paragraph,\fi
210 \ifnum \c@tocdepth>4 subparagraph,\fi
211 UnDFexyz}%
212 \noexpand\fi}
213 \def\:tableofcontents{\futurelet\:temp\:TOC}
214 \def\Auto:ent#1{%
215 \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
216 #1\else \auto:toc \fi]} \auto:toc
217 \global\let\auto:toc\:UnDef }
218 \def\:tocs{\noexpand\:tableofcontents}
219 \pend:defIII\addcontentsline{%
220 \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
221 \gHAdvance\TitleCount 1 \fi }
222 \def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
223 ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
224 \def\@starttoc#1{%
225 \begingroup
226 \makeatletter \Configure{cite}{}{}{}{}%
227 \def\:temp{#1}\def\:tempa{toc}%
228 \a:listof\par
229 \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
230 \b:listof
231 \if@filesw
232 \expandafter\expandafter\csname
233 newwrite\endcsname\csname tf@#1\endcsname
234 \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
235 \fi
236 \global\@nobreakfalse
237 \endgroup}
238 \NewConfigure{tableofcontents*}[1]{%
239 \def\:tempa{#1}\ifx\empty\:tempa
240 \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
241 \else
242 \edef\auto:toc{#1}%
243 \ifx \au:StartSec\:UnDef
244 \let\au:StartSec\:StartSec
245 \def\:StartSec{\:tableofcontents
246 \global\let\auto:toc\:UnDef \:StartSec}%
247 \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
248 \fi \fi
249 }
250
251
252 \ifx \@openbib@code\:UnDef \else
253 \pend:def\@openbib@code{\labelsep\z@}
254 \fi
255
256 \let\:tempc\listoffigures
257 \pend:def\:tempc{\begingroup \a:listoffigures
258 \def\@starttoc{\:tableofcontents[lof]\:gobble}}
259 \append:def\:tempc{\b:listoffigures \endgroup}
260 \HLet\listoffigures\:tempc
261 \let\:tempc\listoftables
262 \pend:def\:tempc{\begingroup \a:listoftables
263 \def\@starttoc{\:tableofcontents[lot]\:gobble}}
264 \append:def\:tempc{\b:listoftables \endgroup}
265 \HLet\listoftables\:tempc
266
267 \NewConfigure{listoffigures}{2}
268 \NewConfigure{listoftables}{2}
269
270 \ifx \part\:UnDef\else
271 \def\@part[#1]#2{%
272 \ifnum \c@secnumdepth >-2\relax
273 \SkipRefstepAnchor \refstepcounter{part}%
274 \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
275 \else
276 \addcontentsline{toc}{part}{#1}%
277 \fi
278 }
279 \let\:tempb\part
280 \Def:Section\part{\thepart}{#1}
281 \let\:part\part
282 \let\part\:tempb
283 \let\no@part\@part
284 \def\@part[#1]#2{%
285 {\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
286 \HtmlEnv \Toc:Title{#1}\:part{#2}%
287 \csname @endpart\endcsname%
288 }
289 \Def:Section\likepart{}{#1}
290 \let\:likepart\likepart
291 \let\likepart\:UnDef
292 \let\no@spart\@spart
293 \def\@spart#1{%
294 {\let\addcontentsline\:gobbleIII\no@spart{}}%
295 \HtmlEnv \:likepart{#1}%
296 \csname @endpart\endcsname%
297 }
298
299 \fi
300 \ifx \section\:UnDef\else
301 \let\no@section\section
302 \Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth \else
303 \thesection \fi}{#1}
304 \let\no:section\section
305 \def\section{\rdef:sec{section}}
306 \Def:Section\likesection{}{#1}
307 \let\:likesection\likesection
308 \let\likesection\:UnDef
309 \fi
310 \let\no@subsection\subsection
311 \Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
312 \thesubsection \fi}{#1}
313 \let\no:subsection\subsection
314 \def\subsection{\rdef:sec{subsection}}
315 \Def:Section\likesubsection{}{#1}
316 \let\:likesubsection\likesubsection
317 \let\likesubsection\:UnDef
318 \let\no@subsubsection\subsubsection
319 \Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
320 \thesubsubsection \fi}{#1}
321 \let\no:subsubsection\subsubsection
322 \def\subsubsection{\rdef:sec{subsubsection}}
323 \Def:Section\likesubsubsection{}{#1}
324 \let\:likesubsubsection\likesubsubsection
325 \let\likesubsubsection\:UnDef
326 \let\no@paragraph\paragraph
327 \Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
328 \theparagraph \fi}{#1}
329 \let\no:paragraph\paragraph
330 \def\paragraph{\rdef:sec{paragraph}}
331 \Def:Section\likeparagraph{}{#1}
332 \let\:likeparagraph\likeparagraph
333 \let\likeparagraph\:UnDef
334 \let\no@subparagraph\subparagraph
335 \Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
336 \thesubparagraph \fi}{#1}
337 \let\no:subparagraph\subparagraph
338 \def\subparagraph{\rdef:sec{subparagraph}}
339 \Def:Section\likesubparagraph{}{#1}
340 \let\:likesubparagraph\likesubparagraph
341 \let\likesubparagraph\:UnDef
342 \ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
343 \ConfigureToc{likepart} {}{\empty}{}{\newline}
344 \ConfigureToc{likesection} {}{\empty}{}{\newline}
345 \ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
346 \ConfigureToc{likesubsection} {}{\empty}{}{\newline}
347 \ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
348 \ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
349 \ConfigureToc{part} {\empty}{\ }{}{\newline}
350 \ConfigureToc{section} {\empty}{\ }{}{\newline}
351 \ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
352 \ConfigureToc{subsection} {\empty}{\ }{}{\newline}
353 \ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}
354 \ConfigureToc{appendix} {\empty}{\ }{}{\newline}
355 \ConfigureToc{chapter} {\empty}{\ }{}{\newline}
356 \ConfigureToc{likechapter} {}{\empty}{}{\newline}
357
358 \ifx \@@maybeautodot\:UnDef
359 \let\add:chap=\@addchap
360 \def\@addchap{%
361 \let\chap:addcontentsline=\addcontentsline
362 \def\addcontentsline{\let\addcontentsline\chap:addcontentsline
363 \:gobbleIII }%
364 \add:chap}
365
366 \else
367 \let\no@addchap\@addchap
368 \def\@addchap[#1]#2{%
369 \HtmlEnv \Toc:Title{#1}\:addchap{#2}}
370
371 \fi
372 \let\:makeschapterhead=\@makeschapterhead
373 \def\::makeschapterhead#1{\:makeschapterhead{\normalfont\normalsize
374 \:addchap {#1}}}
375 \pend:def\addchap{\let\@makeschapterhead\::makeschapterhead}
376 \pend:def\chapter{\let\@makeschapterhead\:makeschapterhead}
377 \let\:tempb=\addchap
378 \Def:Section\addchap{}{#1}
379 \let\:addchap=\addchap
380 \let\addchap=\:tempb
381 \ConfigureToc{addchap} {\empty}{\ }{}{\newline}
382
383 \Def:Section\minisec{}{#1}
384 \let\:minisec=\minisec
385 \def\minisec#1{\:minisec{#1}\@afterheading}
386 % \scr@startsection breaks TeX4ht section handling mechanism, so we will just call the original LaTeX \@startsection
387 %\newcommand*\scr:startsection[6]{\ifvmode\HCode{}\IgnorePar\fi\o:scr@startsection:{#1}{#2}{#3}{#4}{#5}{#6}}
388 \newcommand*\scr:startsection[6]{\ifvmode\HCode{}\IgnorePar\fi\@startsection{#1}{#2}{#3}{#4}{#5}{#6}}
389 \HLet\scr@startsection\scr:startsection
390 \NewConfigure{subtitle}{2}
391 \pend:defI\@makefntext{\IgnorePar}
392 \let\scr@defineobsoletefonts\thr@@
393
394 \Hinput{scrreprt}
395 \endinput
396