Debian Codegraph @

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

raw
1 % memoir.4ht (2024-10-20-07:19), generated from tex4ht-4ht.tex
2 % Copyright 2003-2009 Eitan M. Gurari
3 % Copyright 2009-2024 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 2024-10-20-07:19}
21
22 \input book.4ht
23 \input verse.4ht
24 \let\columnlines\empty
25
26 \let\rm\empty
27 \let\sf\empty
28 \let\tt\empty
29 \let\bf\empty
30 \let\it\empty
31
32 \renewcommand*{\@memoldfonterr}[3]{}
33 \renewcommand*{\@memoldfontwarn}[3]{}
34
35
36 \def\@chapter[#1]#2{%
37 \gHAdvance\:mpNum by 1
38 \HAssign\minipageNum=\:mpNum \relax
39 %
40 {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII\no@chapter[#1]{}%
41 \global\let\f@rtoc\f@rtoc
42 \ifx\f@rtoc\empty\gdef\f@rtoc{#2}\fi
43 \global\let\f@rhdr\f@rhdr }%
44 \HtmlEnv \Toc:Title{\f@rtoc}\:chapter{#2}}
45 \def\:tempc{\@ifstar\o:tableofcontents:\o:tableofcontents:}
46 \HLet\tableofcontents\:tempc
47 \Def:Section\book{\thebook}{#1}
48 \NewConfigure{abstracttitle}{2}
49 \newenvironment{abstracttitle4ht}{\a:abstracttitle}{\b:abstracttitle\par\noindent}
50 % get rid of all extra <span> elements introduced by smaller font size
51 % \renewcommand{\abstracttextfont}{\normalfont}
52 % \renewcommand{\abstractnamefont}{\normalfont}
53 % use our dummy environment to insert tags around the abstract title
54 \renewcommand{\absnamepos}{abstracttitle4ht}
55
56 \NewConfigure{poemline}{2}
57 \NewConfigure{legend}{2}
58 \renewcommand\legend[1]{\a:legend #1\b:legend}
59 \@ifpackageloaded{hyperref}{%
60 \ifHy@hyperfootnotes
61 \Hy@hyperfootnotesfalse
62 \newcounter{Hfootnote}
63 \fi
64 }{}
65 \def\:tempa#1|#2|#3\\{%
66 \html:addr\hbox{\Link-{}{dx\last:haddr}\EndLink}%
67 \expandafter\protected@write\csname \jobname @idxfile\endcsname{}{\string\beforeentry{\RefFileNumber\FileNumber}{dx\last:haddr}{}}%
68 \expandafter\protected@write\csname \jobname @idxfile\endcsname{}{\string\indexentry[\@idxfile]{#1}{\thepage}}%
69 \endgroup%
70 \@esphack%
71 }
72 \HLet\@@wrindexhyp\:tempa
73 \HLet\@@wrspindexhyp\:tempa
74
75 % we use make4ht's splitindex functionality, which produces .ind files in the form of \jobname-idxname.ind
76 \renewcommand{\printindex}[1][\jobname]{\@input@{\jobname-#1.ind}}
77
78 \ifx \memgobble\:UnDef
79 \pend:defI\getthelinenumber{%
80 \let\sv:thepoemline\thepoemline
81 \pend:def\thepoemline{\a:poemline}%
82 \append:def\thepoemline{\b:poemline}}
83 \append:defI\getthelinenumber{\let\thepoemline\sv:thepoemline}
84
85 \else
86 \pend:defII\getthelinenumber{%
87 \let\sv:thepoemline\thepoemline
88 \pend:def\thepoemline{\a:poemline}%
89 \append:def\thepoemline{\b:poemline}}
90 \append:defII\getthelinenumber{\let\thepoemline\sv:thepoemline}
91
92 \let\no@Msect\M@sect
93 \NewConfigure{@sec @ssect}[1]{%
94 \def\rdef:sec##1{#1\csname no@##1\endcsname}}
95 \:CheckOption{sections-} \if:Option
96 \Configure{@sec @ssect}{}
97 \else
98 \Configure{@sec @ssect}{%
99 \let\sv:Sc\:Sc \let\sv:sect\@sect \let\sv:ssect\@ssect
100 \let\sv:Msect\M@sect
101 \let\:Sc\:gobble
102 \def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
103 \ifx \o:@seccntformat:\:UnDef
104 \let\o:@seccntformat:\@seccntformat
105 \fi
106 \let\@seccntformat\:gobble
107 %
108 \let\M@sect\no@Msect \xdef\c:secnumdepth{##2}%
109 {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII \let\mark\:gobble
110 \no@Msect{##1}{##2}{##3}{##4}{##5}{##6}[{##7}][{##8}]{}}%
111 \let\:Sc\sv:Sc \let\@sect\sv:sect \let\@ssect\sv:ssect
112 \let\M@sect\sv:Msect
113 %
114 \let\@seccntformat=\o:@seccntformat:
115 %
116 \HtmlEnv \Toc:Title{##8}\csname no:#1\endcsname{##9}}%
117 %
118 \def\@sect##1##2##3##4##5##6[##7]##8{%
119 \UseHookWithArguments{cmd/@sect/before}{8}{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}%
120 \ifx \o:@seccntformat:\:UnDef
121 \let\o:@seccntformat:\@seccntformat
122 \fi
123 \let\@seccntformat\:gobble
124 %
125 \let\@sect\no@sect \xdef\c:secnumdepth{##2}%
126 {\SkipRefstepAnchor \let\addcontentsline\:gobbleIII \let\mark\:gobble
127 \no@sect{##1}{##2}{##3}{##4}{##5}{##6}[{##7}]{}}%
128 \let\:Sc\sv:Sc \let\@sect\sv:sect \let\@ssect\sv:ssect
129 \let\M@sect\sv:Msect
130 %
131 \let\@seccntformat=\o:@seccntformat:
132 %
133 \HtmlEnv \Toc:Title{##7}\csname no:#1\endcsname{##8}%
134 \UseHookWithArguments{cmd/@sect/after}{8}{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}%
135 }%
136 %
137 \def\@ssect##1##2##3##4##5{%
138 \UseHookWithArguments{cmd/@ssect/before}{5}{##1}{##2}{##3}{##4}{##5}%
139 \gdef\ssect:ttl{##5}%
140 %
141 \let\@ssect\no@ssect
142 {\def\addcontentsline####1####2####3{}%
143 \no@ssect{##1}{##2}{##3}{##4}{}}%
144 \let\:Sc\sv:Sc \let\@sect\sv:sect \let\@ssect\sv:ssect
145 \let\M@sect\sv:Msect
146 %
147 \HtmlEnv \csname :like#1\endcsname{##5}%
148 \UseHookWithArguments{cmd/@ssect/after}{5}{##1}{##2}{##3}{##4}{##5}%
149 }%
150 \IgnorePar}
151 \fi
152
153 \fi
154 \ExplSyntaxOn
155 \renewcommand\:saveindex[2][]{\seq_gput_right:Nn\:savedindex{[#1]{#2}}}
156 \def\:printsavedindex{\seq_map_inline:Nn\:savedindex{\index##1}}
157 \ExplSyntaxOff
158
159 \Hinput{memoir}
160 \endinput
161