Debian Codegraph @

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

raw
1 % amsbook.4ht 2023-03-21-10:02, 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-03-21-10:02}
21
22 \pend:defII\@starttoc{\par}
23 \append:def\quote{\par\@totalleftmargin\z@}
24 \NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
25 \c:def\cptC:{#3}\c:def\cptD:{#4}}
26 \long\def\@makecaption#1#2{%
27 {\cptA: \cap:ref{#1}%
28 \if :#1:\else\cptB:\fi}{\cptC:{#2}\cptD:}}
29
30
31 \pend:def\caption{\SkipRefstepAnchor}
32 \long\def\c:theindex:#1#2#3#4#5#6#7#8#9{%
33 \def\theindex{\SaveEverypar\ht:everypar{}#1%
34 \def\idx:item{}%
35 \def\endtheindex{\idx:item#2\RecallEverypar}%
36 \def\item{\idx:item\def\idx:item{#4}\let\index\@gobble #3}%
37 \def\subitem{\idx:item\def\idx:item{#6}\let\index\@gobble #5}%
38 \def\subsubitem{\idx:item\def\idx:item{#8}\let\index\@gobble #7}}%
39 \def\indexspace{\idx:item#9\let\idx:item\empty}}
40 \def\warn:idx#1{%
41 \expandafter\ifx \csname #1warn:idx\endcsname\relax
42 \expandafter\global
43 \expandafter\let \csname #1warn:idx\endcsname\def
44 \writesixteen
45 {---------------------------------------------------------}%
46 \:warning{If not done so, the index is to be processed by
47 ^^J\space\space tex '\string\def\string\filename
48 {{#1}{idx}{4dx}{ind}} \noexpand\input\space idxmake.4ht'
49 ^^J\space\space makeindex -o #1.ind #1.4dx
50 ^^Jinstead of
51 ^^J\space\space makeindex -o #1.ind #1.idx
52 ^^JOn some platforms, the quotation marks ' should be
53 ^^J replaced by double quotation marks " or eliminated.
54 ^^J---------------------------------------------------------
55 }%
56 {\Configure{Needs}{File: #1.4idx}\Needs{}}%
57 \fi}
58 \ifOption{info}{\Log:Note{
59 A script of the form
60 ^^Jtex '\def\string\filename{{\%\%1}{idx}{4dx}{ind}}
61 \string\input\space idxmake.4ht'
62 ^^Jmakeindex -o \%\%1.ind \%\%1.4dx
63 ^^Jin the env file, automatically calls to the revised makeindex
64 ^^Jcommand. An extra compilation of the source LaTeX file is required,
65 ^^Jto get the index correctly into the output.}}{}
66 \def\ind:defs{\let\LNKidx\empty
67 \def\LNK##1##2##3##4{\ifx\NewConfigure\:UnDef\else
68 \def\LNK:number{##4}%
69 \a:LNK[##1]{##2}{}\gHAdvance\:LNKno1
70 \def\:THIrd{##3}\ifx\:THIrd\empty
71 \LNKidx{\ifx\c:LNK\empty\:LNKno\else \c:LNK\fi}\else
72 \LNKidx{##3}\fi
73 \global\let\LNKidx\empty
74 \b:LNK
75 \fi}%
76 \def\:LNKno{0}}
77 \NewConfigure{LNK}{3}
78 \Configure{LNK}{\Link}{\EndLink}{}
79 \def\yhbLNK#1{\expandafter\let\expandafter\LNKidx\csname
80 #1\endcsname\LNK}
81
82 \Configure{@begin}{theindex}{\ind:defs}
83
84
85 \Configure{UndefinedSec}{likepart}
86 \Configure{UndefinedSec}{likechapter}
87 \Configure{UndefinedSec}{likesection}
88 \Configure{UndefinedSec}{likesubsection}
89 \let\no@section\section
90 \Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth \else
91 \thesection \fi}{#1}
92 \let\no:section\section
93 \def\section{\rdef:sec{section}}
94 \let\no@subsection\subsection
95 \Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
96 \thesubsection \fi}{#1}
97 \let\no:subsection\subsection
98 \def\subsection{\rdef:sec{subsection}}
99 \let\no@subsubsection\subsubsection
100 \Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth \else
101 \thesubsubsection \fi}{#1}
102 \let\no:subsubsection\subsubsection
103 \def\subsubsection{\rdef:sec{subsubsection}}
104 \let\no@paragraph\paragraph
105 \Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
106 \theparagraph \fi}{#1}
107 \let\no:paragraph\paragraph
108 \def\paragraph{\rdef:sec{paragraph}}
109 \let\no@subparagraph\subparagraph
110 \Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth \else
111 \thesubparagraph \fi}{#1}
112 \let\no:subparagraph\subparagraph
113 \def\subparagraph{\rdef:sec{subparagraph}}
114
115 \let\:setaddresses=\@setaddresses
116 \def\@setaddresses{\bgroup
117 \pend:def\addresses{%
118 \let\:address=\address
119 \def\address########1########2{%
120 \@ifnotempty{########2}{%
121 \def\:temp{########1}\ifx \:temp\empty
122 \:address{}{\a:address\b:address########2\c:address}%
123 \else
124 \:address{\a:address
125 ########1}{\b:address########2\c:address}%
126 \fi }}%
127 \let\:curraddr=\curraddr
128 \def\curraddr########1########2{%
129 \@ifnotempty{########2}{\a:curraddr
130 \:curraddr{########1}{\b:curraddr########2\c:curraddr}%
131 }}%
132 \let\:email=\email
133 \def\email########1########2{%
134 \@ifnotempty{########2}{\a:email
135 \:email{########1}{\b:email########2\c:email}%
136 }}%
137 \let\:urladdr=\urladdr
138 \def\urladdr########1########2{%
139 \@ifnotempty{########2}{\a:urladdr
140 \:urladdr{########1}{\b:urladdr########2\c:urladdr}%
141 }}%
142 %
143 }%
144 \a:addresses \:setaddresses \b:addresses\egroup }
145 \NewConfigure{addresses}{2}
146 \NewConfigure{address}{3}
147 \NewConfigure{curraddr}{3}
148 \NewConfigure{email}{3}
149 \NewConfigure{urladdr}{3}
150 \pend:def\@settranslators{\a:translators\bgroup
151 \def\and{\unskip{ } \d:translators and~\c:translators\ignorespaces}%
152 \def\andify{\nxandlist{\unskip, }{\unskip{} \and}{\unskip, \and}}%
153 \pend:def\@translators{\c:translators}%
154 \append:def\@translators{\d:translators}%
155 }
156 \append:def\@settranslators{\egroup\b:translators}
157 \NewConfigure{translators}{4}
158 \NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
159 \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
160 \append:def\@maketitle{\a:@maketitle\after:maketitle\b:@maketitle}
161 \long\def\end:maketitle#1#2{\ifx #1\empty \else
162 \expandafter\let\csname :\string #1\endcsname=#1
163 \let#1=\empty
164 \append:def\after:maketitle{\expand:after{\let#1=}\csname
165 :\string #1\endcsname#2}\fi}
166 \NewConfigure{@maketitle}{2}
167 \HRestore\thanks
168 \let\@adminfootnotes\relax
169 \def\:thanks#1{\par \a:thanks#1\@addpunct.\b:thanks}
170 \NewConfigure{thanks author date and}[8]{%
171 \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:author{#3}\c:def\b:author{#4}%
172 \c:def\a:date{#5}\c:def\b:date{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
173 \NewConfigure{subjclass}{2}
174 \NewConfigure{keywords}{2}
175 \pend:def\@setabstracta{\ifvoid\abstractbox
176 \else\a:setabstract \fi}
177 \append:def\@setabstracta{\ifvoid\abstractbox
178 \else\b:setabstract \fi}
179 \NewConfigure{setabstract}{2}
180 \pend:defI\@seccntformat{%
181 \def\@secnumpunct{\ifnum \c:secnumdepth>0
182 \expandafter\ifx\csname the##1\endcsname\relax \else. \fi\fi}}
183
184 \pend:def\@maketitle{%
185 \pend:def\newpage{\IgnorePar}%
186 \let\after:maketitle=\empty
187 \end:maketitle\@subjclass{\a:subjclass\@setsubjclass\b:subjclass}%
188 \end:maketitle\@keywords{\a:keywords\@setkeywords\b:keywords}%
189 \end:maketitle\@setthanks{\let\thanks=\:thanks\thankses}%
190 }
191
192 \pend:def\@maketitle{%
193 \pend:def\@title{\a:ttl}%
194 \append:def\@title{\b:ttl}%
195 }
196 \pend:def\@maketitle{%
197 \pend:def\authors{\a:author\def\and{\a:and}
198 }%
199 \append:def\authors{\b:author}%
200 }
201 \let\:tempb\part
202 \Def:Section\part{\ifnum \c@secnumdepth >-2 \the\c@part\fi}{#1}
203 \let\:part\part
204 \let\part\:tempb
205 \let\no@part\@part
206 \def\@part[#1]#2{%
207 \gdef\c:secnumdepth{-2}%
208 \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}\fi
209 \HtmlEnv \Toc:Title{#1}\:part{#2}}
210 \Def:Section\likepart{}{#1}
211 \let\:likepart\likepart
212 \let\likepart\:UnDef
213 \let\no@spart\@spart
214 \def\@spart#1{\HtmlEnv \:likepart{#1}}
215 \def\tableofcontents{%
216 \ifx\contentsname\empty \else
217 % \Configure{toToc}{}{likechapter}%
218 %
219 \chapter*{\contentsname}%
220 %
221 %
222 % \Configure{toToc}{?}{likechapter}%
223 \fi
224 \:tableofcontents}
225
226 \let\o:maketitle:\maketitle
227 \def\maketitle{\bgroup
228 \gHAdvance\:mpNum by 1
229 \HAssign\minipageNum=\:mpNum \relax
230 %
231 \ifx \EndPicture\:UnDef
232 \def\sec:typ{title}%
233 %
234 \pend:def\@author{\a:author}\append:def\@author{\b:author}%
235 \def\and{\a:and}
236 %
237 %
238 \fi
239 \pic:gobble\a:mktl \o:maketitle: \pic:gobble\b:mktl
240 \egroup \let\maketitle\empty}
241
242
243 \ifx \deferred@thm@head\:UnDef\else
244 \ifx \deferred@thm@head\:UnDef\else
245 \expandafter\dth@everypar\expandafter{%
246 \the\dth@everypar
247 \edef\:temp{\the\ht:everypar}\ifx \:temp\empty
248 \ht:everypar{\HtmlPar}\ShowPar
249 \fi
250 }%
251 \def\deferred@thm@head#1{%
252 \if@inlabel \indent \par \fi
253 \if@nobreak
254 \adjust@parskip@nobreak
255 \else
256 \addpenalty\@beginparpenalty
257 \addvspace\@topsep
258 \addvspace{-\parskip}%
259 \fi
260 \global\@inlabeltrue
261 \ht:everypar\dth@everypar
262 \let\sv:newtheorem=\b:newtheorem \let\b:newtheorem=\empty
263 \item[\normalfont#1]%
264 \let\b:newtheorem=\sv:newtheorem \b:newtheorem \ignorespaces
265 }
266
267 \fi
268 \def\:temp#1{%
269 \def\:temp{#1}%
270 \edef\:temp{\expandafter\eorem:syle \meaning\:temp!*?: }%
271 \expandafter\let\expandafter\@tmp:sv\csname th@\:temp\endcsname
272 \def\:tempa##1{%
273 \expandafter\append:def\csname th@##1\endcsname{%
274 \expandafter\let\csname th@##1\endcsname=\@tmp:sv
275 \let\thm:headnl=\thmheadnl
276 \pend:def\thmheadnl{\let\thmheadnl\thm:headnl \b:newtheorem}%
277 \append:def\thmheadnl{\expandafter
278 \ht:everypar\expandafter{\the\ht:everypar
279 \ht:everypar{\HtmlPar}}}}}%
280 \expandafter\:tempa\expandafter{\:temp}%
281 \let\sv:trivlist=\trivlist
282 \def\trivlist{\let\trivlist\sv:trivlist \let\sv:trivlist\:unDef
283 \a:newtheorem \trivlist}%
284 \aftergroup\c:newtheorem
285 \:thm{#1}}
286 \HLet\@thm\:temp
287 \HRestore\@endtheorem
288 \bgroup
289 \def\bgroup{\catcode`\\=0 \catcode`\t=11 }
290 \catcode`\/=0
291 \catcode`\@=12
292 \catcode`\h=12
293 \catcode`\\=12
294 /catcode`/t=12
295 /edef~{/def/noexpand/eorem:syle##1\th@##2 !*?: {##2}}
296 /bgroup
297 \expandafter\egroup ~
298 \long\def\:temp[#1]{\par\a:proof
299 \csname o:\string\proof :\endcsname[#1]\b:proof}
300 \expandafter\HLet\csname \string\proof \endcsname=\:temp
301 \append:def\endproof{\c:proof}
302 \NewConfigure{proof}{3}
303
304 \def\:tempc{\ifmmode \mathqed \else
305 \leavevmode \a:qed\hbox {\qedsymbol}\b:qed\fi}
306 \expandafter\HLet\csname qed \endcsname=\:tempc
307 \NewConfigure{qed}{2}
308
309 \fi
310
311 \let\:tempb\chapter
312 \Def:Section\chapter{\thechapter}{#1}
313 \let\:chapter\chapter
314 \let\chapter\:tempb
315 \def\@makechapterhead#1{}
316 \let\no@chapter\@chapter
317 \def\@chapter[#1]#2{%
318 \gHAdvance\:mpNum by 1
319 \HAssign\minipageNum=\:mpNum \relax
320 %
321 {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}}%
322 \HtmlEnv \Toc:Title{#1}\:chapter{#2}}
323 \Def:Section\likechapter{}{#1}
324 \let\:likechapter\likechapter
325 \let\likechapter\:UnDef
326 \let\no@schapter\@schapter
327 \def\@schapter#1{%
328 \gdef\sch:ttl{#1}%
329 %
330 {\let\addcontentsline\:gobbleIII\no@schapter{}}%
331 \HtmlEnv \:likechapter{#1}}
332 \let\no@appendix\appendix
333 \Def:Section\appendix{\thechapter}{#1}
334 \let\:appendix\appendix
335 \def\appendix{%
336 \def\@chapter[##1]##2{%
337 \gHAdvance\:mpNum by 1
338 \HAssign\minipageNum=\:mpNum \relax
339 %
340 {\def\addcontentsline####1####2####3{}\no@chapter[##1]{}}%
341 \HtmlEnv \Toc:Title{##1}\:appendix{##2}}%
342 \no@appendix}
343
344 \def\no@sect#1#2#3#4#5#6[#7]#8{%
345 \edef\@toclevel{\ifnum#2=\@m 0\else\number#2\fi}%
346 \ifnum #2>\c@secnumdepth \let\@secnumber\@empty
347 \else \@xp\let\@xp\@secnumber\csname the#1\endcsname
348 \refstepcounter{#1}\fi
349 \let\@svsec\empty
350 \let\@svsechd\empty
351 \global\@nobreaktrue
352 \@xsect{#5}}
353 \let\@ssect=\relax
354
355
356 \def\endtable{\end@float}
357 \def\endfigure{\end@float}
358
359 \def\:tableofcontents{\futurelet\:temp\:TOC}
360 \def\Auto:ent#1{%
361 \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
362 #1\else \auto:toc \fi]} \auto:toc
363 \global\let\auto:toc\:UnDef }
364
365 \edef\:TOC{%
366 \noexpand\ifx [\noexpand\:temp
367 \noexpand\expandafter\noexpand\:TableOfContents
368 \noexpand\else
369 \noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,likepart,\fi
370 \ifnum \c@tocdepth >\m@ne chapter,likechapter,appendix,\fi
371 \ifnum \c@tocdepth >\z@ section,likesection,\fi
372 \ifnum \c@tocdepth >1 subsection,likesubsection,\fi
373 \ifnum \c@tocdepth >2 subsubsection,likesubsubsection,\fi
374 \ifnum \c@tocdepth >3 paragraph,\fi
375 \ifnum \c@tocdepth >4 subparagraph,\fi
376 UnDFexyz
377 }\noexpand\fi}
378 \ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
379 \ConfigureToc{likepart} {}{\empty}{}{\newline}
380 \ConfigureToc{likesection} {}{\empty}{}{\newline}
381 \ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
382 \ConfigureToc{likesubsection} {}{\empty}{}{\newline}
383 \ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
384 \ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
385 \ConfigureToc{part} {\empty}{\ }{}{\newline}
386 \ConfigureToc{section} {\empty}{\ }{}{\newline}
387 \ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
388 \ConfigureToc{subsection} {\empty}{\ }{}{\newline}
389 \ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}
390
391 \ConfigureToc{appendix} {\empty}{\ }{}{\newline}
392 \ConfigureToc{chapter} {\empty}{\ }{}{\newline}
393 \ConfigureToc{likechapter} {}{\empty}{}{\newline}
394
395
396 \NewConfigure{tableofcontents*}[1]{%
397 \def\:tempa{#1}\ifx\empty\:tempa
398 \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
399 \else
400 \edef\auto:toc{#1}%
401 \ifx \au:StartSec\:UnDef
402 \let\au:StartSec\:StartSec
403 \def\:StartSec{\:tableofcontents
404 \global\let\auto:toc\:UnDef \global\let\:StartSec\au:StartSec\:StartSec}%
405 \append:def\tableofcontents{\gdef\:StartSec{\au:StartSec}}%
406 \fi \fi
407 }
408
409 \Hinput{amsbook}
410 \endinput
411