Debian Codegraph @

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

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