Debian Codegraph @

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

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