Debian Codegraph @

texmf-dist/tex/generic/tex4ht/html-mml.4ht

raw
1 % html-mml.4ht (2026-04-27-13:30), generated from tex4ht-mathml.tex
2 % Copyright 2009-2026 TeX Users Group
3 % Copyright 1999-2009 Eitan M. Gurari
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 2026-04-27-13:30}
21
22 \exit:ifnot{amsmath,%
23 array,%
24 color,%
25 frenchb,%
26 latex,%
27 plain,%
28 rlbabel,%
29 tex4ht}
30
31
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 \ConfigureHinput{tex4ht}
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 \:CheckOption{frames} \if:Option
36 \Configure{frames-altDOCTYPE}{\Configure{DOCTYPE}{\HCode
37 {<!DOCTYPE html PUBLIC
38 "-//W3C//DTD XHTML 1.1 plus MathML 2.0//\expandafter
39 \ifx \csname a:dtd-lang\endcsname\relax EN\else
40 \csname a:dtd-lang\endcsname
41 \fi
42 "\Hnewline
43 "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"
44 %
45 >\Hnewline
46 }}
47 }
48 \else
49 \def\:temp{xhtml}
50 \ifx \:DTD\:temp
51 \Configure{DOCTYPE}{\HCode
52 {<!DOCTYPE html PUBLIC
53 "-//W3C//DTD XHTML 1.1 plus MathML 2.0//\expandafter
54 \ifx \csname a:dtd-lang\endcsname\relax EN\else
55 \csname a:dtd-lang\endcsname
56 \fi
57 "\Hnewline
58 "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"
59 %
60 >\Hnewline
61 }}
62
63 \fi
64
65 \fi
66 \Configure{IMG}
67 {\ht:special{t4ht=\ifmathml <\a:mathml semantics><\a:mathml annotation-xml encoding="application/xhtml+xml">\fi<img\Hnewline \ifmathml xmlns="http://www.w3.org/1999/xhtml"\fi\Hnewline src="\a:imgdir }\PauseMathClass}
68 {\ht:special{t4ht=" alt="}}
69 {" }
70 {\ht:special{t4ht=" }}
71 {\EndPauseMathClass\ht:special{t4ht=\xml:empty>\ifmathml </\a:mathml annotation-xml></\a:mathml semantics>\fi}}
72 \Configure{DviMath}
73 {\a:DviMathML \mathmltrue
74 \ifOption{mml-fonts}{\Configure{htf}{0}{+}{<\a:mathml mstyle\Hnewline
75 class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</\a:mathml mstyle>}%
76 }{\NoFonts}%
77 \IgnoreRule \HCode{<!--l.
78 \the\inputlineno-->}\Tg<\a:mathml math\Hnewline
79 \csname a:math-xmlns\endcsname \Hnewline \a:@math>\a:math
80 \edef\sv:ignore{\if:nopar
81 \noexpand\IgnorePar\else \noexpand\ShowPar\fi}%
82 \IgnorePar}
83 {\Tg</\a:mathml math>\EndIgnoreRule
84 \ifOption{mml-fonts}{\Configure{htf}{0}{+}{<span\Hnewline
85 class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</span>}%
86 }{\EndNoFonts}%
87 \mathmlfalse \b:DviMathML \sv:ignore
88 }
89 \Css{\a:mathml math { text-indent: 0em; }}
90 \Configure{halignTBL}
91 {t}{\ifmathml \HCode{ align="baseline 1" style="\border:lines
92 " }\fi}
93 {b}{\ifmathml \HCode{ align="baseline -1" style="\border:lines
94 " }\fi}
95 {c}{\ifmathml \HCode{ align="axis" style="\border:lines
96 " }\fi}
97 {}
98 \Configure{halignTD} {}{}
99 {<}{\ifmathml \HCode{ \a:mathml columnalign="left"}\else
100 \HCode{ style="text-align:left; white-space:nowrap;"}\fi}
101 {-}{\ifmathml \HCode{ \a:mathml columnalign="center"}\else
102 \HCode{ style="text-align:center; white-space:nowrap;"}\fi}
103 {>}{\ifmathml \HCode{ \a:mathml columnalign="right"}\else
104 \HCode{ style="text-align:right; white-space:nowrap;"}\fi}
105 {^}{\ifmathml \HCode{ \a:mathml rowalign="top"}\else
106 \HCode{ style="vertical-align:top; white-space:nowrap;"}\fi}
107 {=}{\ifmathml \HCode{ \a:mathml rowalign="baseline"}\else
108 \HCode{ style="vertical-align:baseline; white-space:nowrap;"}\fi}
109 {|}{\ifmathml \HCode{ \a:mathml rowalign="center"}\else
110 \HCode{ style="vertical-align:middle; white-space:nowrap;"}\fi}
111 {_}{\ifmathml \HCode{ \a:mathml rowalign="bottom"}\else
112 \HCode{ style="vertical-align:bottom; white-space:nowrap;"}\fi}
113 {p}{\ifmathml \HCode{ \a:mathml columnalign="left"}\else
114 \HCode{ style="text-align:left;"}\fi}
115 {}
116
117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
118
119 \endinput\empty\empty\empty\empty\empty\empty
120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
121
122
123
124
125
126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 \ConfigureHinput{latex}
128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129 \Configure{equation}
130 {\IgnorePar\ifvmode\else \HCode{<!--tex4ht:inline-->}\fi
131 \EndP
132 \HCode{<table class="equation"><tr><td>}\IgnorePar
133 \Configure{$$}
134 {\Configure{@math}{%\a:mathml
135 display="block"
136 %
137 \mml:class="equation"}\IgnorePar\EndP\DviMath}
138 {\EndDviMath\EndP}
139 {\DisplayMathtrue}%
140 }
141 {\ifvmode \IgnorePar\fi\EndP\HCode{</td><td class="eq-no">}}
142 {\HCode{</td></tr></table>}\ShowPar\par{\HCondtrue\noindent}%
143 }
144 \Css{.equation td{text-align:center; vertical-align:middle; }}
145 \Css{td.eq-no{ width:5\%; }}
146 \Css{table.equation { width:100\%; } }
147 \Configure{romannumeral}
148 {\ifmtext\else
149 \HCode{<\ifmathml \a:mathml mrow \else span \fi \mml:class="romannumeral">}\fi
150 }
151 {\ifmtext\else \HCode{</\ifmathml \a:mathml mrow\else span\fi>}\fi }
152 \Configure{hspace}
153 {\ifmathml \ifmtext \else \Tg<\a:mathml mspace width="\the\tmp:dim"/>\fi\fi}
154 {}{\ifmathml \else \:nbsp\fi}
155 \:CheckOption{new-accents} \if:Option \else
156 \ifx \mathml:on\:UnDef
157 \Configure{accents}
158 {\ifmmode \expandafter\mathord\fi
159 {\leavevmode
160 \if !#1!\ht:special{t4ht@+\string&{35}x#2;}%
161 \else \expandafter \ifx\csname U#2#1\endcsname\relax
162 \ht:special{t4ht@+\string&{35}x#2;}%
163 \else
164 \ht:special{t4ht@+\string&{35}x\csname U#2#1\endcsname;}%
165 \fi \fi x%
166 %
167 \ht:special{t4ht@[}\if!#1!x\else#2\fi\ht:special{t4ht@]}}}
168 {\ifmmode
169 \Tg<\a:mathml mrow
170 \mml:class="accent#1">\mathord{#3}\Tg</\a:mathml mrow>%
171 \else \HCode{<span class="accent#1">}#3\HCode{</span>}%
172 \fi
173 }%
174 \fi
175 \fi
176
177 \Configure{newline}
178 {\ifmtext \ht:special{t4ht@,}%
179 \HCode{</\a:mathml mtext><\a:mathml
180 mtext \mml:class="newline">}%
181 \ht:special{t4ht@,&\#x00A0;}%
182 %
183 \else \Tg<br\Hnewline class="newline" />\fi}
184 \Configure{mathml[]}
185 {\edef\MathPar{\ifvmode par-\fi}\IgnorePar\endgraf\EndP
186 \HCode{<div class="\MathPar math-display">}}
187 {\HCode{</div>}\ShowPar\par{\HCondtrue\noindent}%
188 }
189 \Css{div.math-display, div.par-math-display{text-align:center;}}
190 \ConfigureEnv{array}
191 {\PushStack\Col:Marg\AllColMargins
192 \bgroup\Configure{$}{}{}{}}
193 {\egroup \PopStack\Col:Marg\AllColMargins}
194 {}{}
195 \def\:MM{\ifmathml \a:mathml m\fi}
196 \Configure{HBorder}
197 {<\:MM tr\Hnewline
198 \ifmathml \expandafter\mml:class\else class\fi="array-hline">}
199 {\ifmathml<\a:mathml mtd \mml:class="hline-mtd"></\a:mathml mtd>
200 \else
201 <td></td>\fi}
202 {</\:MM tr>}
203 {<\:MM tr\Hnewline
204 \ifmathml \expandafter\mml:class\else class\fi ="array-cline">}
205 {<\:MM td></\:MM td>}
206 {\ifmathml<\a:mathml mtd \mml:class="hline-mtd"></\a:mathml mtd>
207 \else
208 <td></td>\fi}
209 {</\:MM tr>}
210 {<\:MM tr\Hnewline
211 \ifmathml \expandafter\mml:class\else class\fi="array-vspace"
212 style="font-size:\HBorderspace">}
213 {<\:MM td\Hnewline>\ifmathml\else\string&\#x00A0;\fi
214 </\:MM td>}
215 {</\:MM tr>}
216 \Configure{halign}
217 {\EndP
218 \PushStack\Table:Stck\TableNo
219 \gHAdvance\Next:TableNo by 1
220 \global\let\TableNo=\Next:TableNo
221 \halignTB{halign}}
222 {\HCode{</\:MT table>}\PopStack\Table:Stck\TableNo}
223 {\HCode{<\:MT tr \Hnewline}\halignTR
224 \HCode{ id="TBL-\TableNo-\HRow-">}}
225 {\HCode{</\:MT tr>}}
226 {\SaveEndP
227 \HCode{<td
228 \ifnum \HMultispan>1 colspan="\HMultispan"\fi}%
229 \halignTD \HCode{\Hnewline
230 id="TBL-\TableNo-\HRow-\HCol">}\ShowPar\par}
231 {\ifvmode \IgnorePar \fi \EndP
232 \HCode{</\:MT td>}\RecallEndP
233 }
234 \Css{.array-hline,.array-cline{
235 border-top: 1px solid black;
236 height:0px;
237 }}
238 \Css{.array-hline + .array-vspace:last-child{display:none;}}
239 \Css{.hline-mtd, .array-hline td{
240 display:none
241 }}
242 % why was the following line here? it hides last row even if it contains content
243 % \Css{.array-hline + .array-row:last-child{display:none;}}
244 \Css{.array-hline:first-child{border-bottom:1px solid black;border-top:none;}}
245 \:CheckOption{fonts} \if:Option
246 \Configure{texttt}
247 {\ifmathml \providemtextclass{\mml:class="texttt"
248 mathvariant="monospace" }%
249 \else \HCode{<span class="texttt">}\NoFonts\fi}
250 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
251 \Configure{textit}
252 {\ifmathml \providemtextclass{\mml:class="textit"
253 mathvariant="italic" }%
254 \else \HCode{<span class="textit">}\NoFonts\fi}
255 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
256 \Configure{textrm}
257 {\ifmathml \providemtextclass{ \mml:class="textrm"
258 mathvariant="normal" }%
259 \else \HCode{<span class="textrm">}\NoFonts\fi}
260 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
261 \Configure{textup}
262 {\ifmathml \providemtextclass{ \mml:class="textup"
263 mathvariant="normal" }%
264 \else \HCode{<span class="textup">}\NoFonts\fi}
265 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
266 \Configure{textsl}
267 {\ifmathml \providemtextclass{ \mml:class="textst"
268 mathvariant="italic" }%
269 \else \HCode{<span class="textsl">}\NoFonts\fi}
270 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
271 \Configure{textsf}
272 {\ifmathml \providemtextclass{ \mml:class="textsf"
273 mathvariant="sans-serif" }%
274 \else \HCode{<span class="textsf">}\NoFonts\fi}
275 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
276 \Configure{textbf}
277 {\ifmathml \providemtextclass{ \mml:class="textbf"
278 mathvariant="bold" }%
279 \else \HCode{<span class="textbf">}\NoFonts\fi}
280 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
281 \Configure{textsc}
282 {\ifmathml \providemtextclass{ \mml:class="textsc"
283 mathvariant="normal" }%
284 \else \HCode{<span class="textsc">}\NoFonts\fi}
285 {\ifmathml\else \EndNoFonts\HCode{</span>}\fi}
286 \Configure{emph}
287 {\ifmathml \providemtextclass{ \mml:class="emph"
288 mathvariant="italic" }%
289 \else \HCode{<span class="emph">}\NoFonts\fi}
290 {\ifmathml\else\EndNoFonts \HCode{</span>}\fi}
291 \fi
292 \Css{math .texttt { font-family: monospace; }}
293 \Css{math .textit { font-style: italic; }}
294 \Css{math .textsl { font-style: oblique; }}
295 \Css{math .textsf { font-family: sans-serif; }}
296 \Css{math .textbf { font-weight: bold; }}
297 \:CheckOption{mathjax}\if:Option
298 \Configure{MathjaxSource}{https://cdn.jsdelivr.net/npm/mathjax@3/es5/mml-chtml.js}
299 \Configure{@HEAD}{\HCode{ <script type="text/javascript" id="MathJax-script" async="async" src="\a:MathjaxSource"></script> \Hnewline}}
300 \fi
301 \:CheckOption{texsource}\if:Option
302
303 \newtoks\mmleqtoks
304 \ExplSyntaxOn
305 \cs_new_protected:Npn \mmlalteqtoks #1
306 {
307 % save tokens, but preserve spaces
308 % https://tex.stackexchange.com/a/44444/2891
309 \tl_set:Nn \l_tmpa_tl {#1}
310 \regex_replace_all:nnN { . } { \c{string} \0 } \l_tmpa_tl
311 \tl_set:Nx \l_tmpa_tl { \l_tmpa_tl }
312 % % replace < > and & with xml entities
313 \regex_replace_all:nnN { \x{26} } { &amp; } \l_tmpa_tl
314 \regex_replace_all:nnN { \x{3C} } { &lt; } \l_tmpa_tl
315 \regex_replace_all:nnN { \x{3E} } { &gt; } \l_tmpa_tl
316 % \regex_replace_all:nnN { \n } {\HCode{ \Hnewline }} \l_tmpa_tl
317 % replace \par command with blank lines
318 \regex_replace_all:nnN { \x{5C}par\b } {\x{A}\x{A}} \l_tmpa_tl
319 \tl_set:Nx \mmleqtoks{ \l_tmpa_tl }
320
321 %\HCode{\l_tmpb_tl}
322 }
323 \ExplSyntaxOff
324
325
326 \def\AltMath#1${\mmlalteqtoks{#1}%
327 #1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}$}
328 \Configure{$}{\Configure{@math}{display="inline"}\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}}{\HCode{</\a:mathml semantics>}\EndDviMath}{\expandafter\AltMath}
329
330 \def\AltMathParen#1\){\mmlalteqtoks{#1}%
331 #1\HCode{</\a:mathml mrow><a\a:mathml nnotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}$}
332
333 \def\AltMathParen#1\){\mmlalteqtoks{#1}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}\)}
334 %\Configure{()}{\Configure{@math}{display="inline"}\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}\AltMathParen$}{\EndDviMath\HCode{</\a:mathml semantics>}}
335 \Configure{()}
336 {\Configure{@math}{%\a:mathml
337 display="inline"
338 }\csname a:mathml()\endcsname
339 \DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}$\expandafter\AltMathParen}
340 {$\HCode{</\a:mathml semantics>}\EndDviMath\csname b:mathml()\endcsname}
341
342
343 \long\def\AltDisplay#1\]{\mmlalteqtoks{#1}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation></\a:mathml semantics>}\]}
344 \Configure{[]}{\Configure{@math}{display="block"}\DviMath$$\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow>}\AltDisplay}{$$\EndDviMath}
345
346
347 % \long\def\MMLAltlDisplayDollars#1$${\mmlalteqtoks{#1}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}$$}
348
349 % configuration of display math doesn't work yet. I need to investigate it.
350 % \Configure{$$}
351 % {\Configure{@math}{%\a:mathml
352 % display="block"
353 % }\IgnorePar
354 % \ifvmode\else \HCode{<!--tex4ht:inline-->}\fi
355 % \EndP\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}}
356 % {\HCode{</\a:mathml semantics>}\EndDviMath\ShowPar\par{\csname HCondtrue\endcsname\noindent}}
357 % {\DisplayMathtrue\expandafter\MMLAltlDisplayDollars}
358
359
360 % \renewcommand\eqannotate[1]{\mmlalteqtoks{#1}\HCode{<\a:mathml semantics><\a:mathml mrow>}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation></\a:mathml semantics>}}
361
362
363 % environment support
364 \newcommand\MMLVerbMathToks[2]{%
365 \ifmmode%
366 \begin{old#2}%
367 #1%
368 \end{old#2}%
369 \else%
370 \mmlalteqtoks{\begin{#2}
371 #1
372 \end{#2}}%
373 \begingroup%
374 \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow>}
375 \Configure{$$}{}{}{}
376 \begin{old#2}
377 #1
378 \end{old#2}
379 \HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">}
380 \HCode{\mmleqtoks}
381 \HCode{</\a:mathml annotation></\a:mathml semantics>}
382 \EndDviMath
383 \endgroup
384 \fi
385 }
386
387 % we must handle equations separatelly.
388 % it is a bit messy
389 \newcommand\MMLVerbMathToksEquation[2]{%
390 \mmlalteqtoks{\begin{#2}
391 #1
392 \end{#2}}%
393 \begingroup%
394 \def\mlabeledtr{mtr}
395 \def\swapmlabeledtr##1##2{##2\HCode{</\a:mathml mtd><\a:mathml mtd>}##1}%
396 \ifOption{mathjax}{%
397 % the mlabeledtr element expects the equation number as the first child. This element is supported only by MathJax,
398 % so we use normal mtr if we don't use the MathJax renderer. In that case, the equationnumber should be second
399 \def\mlabeledtr{mlabeledtr} % this element can be used to print the equation number, but it is supported only by MathJax%
400 \def\swapmlabeledtr##1##2{##1\HCode{</\a:mathml mtd><\a:mathml mtd>}##2}%
401 }{}%
402 \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow><\a:mathml mtable><\a:mathml \mlabeledtr><\a:mathml mtd>}%
403 \refstepcounter{equation}%
404 \swapmlabeledtr{\hbox{\@eqnnum}}{#1}%
405 \HCode{</\a:mathml mtd>
406 </\a:mathml \mlabeledtr></\a:mathml mtable></\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">}%
407 \HCode{\mmleqtoks}%
408 \HCode{</\a:mathml annotation></\a:mathml semantics>}%
409 \EndDviMath%
410 \endgroup%
411 }
412
413 \ExplSyntaxOn
414 \newcommand\MMLVerbMath[1]{%
415 \cs_if_exist:cTF{#1}{
416 \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
417 \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname
418 \RenewDocumentEnvironment{#1}{+!b}{%
419 \NoFonts\expandafter\MMLVerbMathToks\expandafter{##1}{#1}\EndNoFonts%
420 }{}
421 }{}%
422 }
423
424 \newcommand\MMLVerbEquation[1]{%
425 \cs_if_exist:cTF{#1}{
426 \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
427 \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname
428 \RenewDocumentEnvironment{#1}{+!b}{%
429 \ifmmode\begin{old#1}##1\end{old#1}\else%
430 \NoFonts\expandafter\MMLVerbMathToksEquation\expandafter{##1}{#1}\EndNoFonts%
431 \fi
432 }{}
433 }{}%
434 }
435
436
437 \ExplSyntaxOff
438
439 \MMLVerbEquation{equation}
440 % \MMLVerbEquation{equation*}
441
442 \fi
443 \Configure{multicolumn}
444 {\let\sv:VBorder\VBorder
445 \let\VBorder\empty
446 \Configure{VBorder}{}{}{}{}%
447 }
448 {\let\VBorder\sv:VBorder}
449 {\ifmmode \HCode{<\a:mathml mrow\Hnewline \mml:class="multicolumn}%
450 {\Configure{halignTD} {}{}
451 {<}{\HCode{-left}}
452 {-}{\HCode{-center}}
453 {>}{\HCode{-right}}
454 {p}{\HCode{-left}}
455 {}%
456 \HColAlign}\HCode{">}\else
457 \ifvmode\IgnorePar\fi
458 \HCode{<div class="multicolumn" }\HColAlign\HCode{>}\fi }
459 {\ifmmode \HCode{</\a:mathml mrow>}\else
460 \ifvmode\IgnorePar\fi \EndP\HCode{</div>}\fi }
461 \def\gob:sp#1{#1}
462
463 \Configure{overline}
464 {\bgroup\ifmathml \HCode{<\a:mathml mover accent="false"\Hnewline
465 \mml:class="mml-overline"><\a:mathml mrow>}%
466 \else
467 \HCode{<span class="overline">}\fi}
468 {\ifmathml \HCode{</\a:mathml mrow><\a:mathml mo\Hnewline
469 accent="true">&\#x00AF;</\a:mathml mo>%
470 </\a:mathml mover>}%
471 \else \HCode{</span>}\fi\egroup}
472 \Configure{underline}
473 {\bgroup
474 \ifmathml \HCode{<\a:mathml munder \a:mathml accentunder="false"\Hnewline
475 \mml:class="mml-underline"><\a:mathml mrow>}%
476 %
477 \else \expandafter\everymath
478 \expandafter{\expandafter\everymath
479 \expandafter{\the\everymath}}%
480 \let\o::@underline:\o:@@underline:
481 \def\o:@@underline:{\let\o:@@underline:\o::@underline:}%
482 \HCode{<span class="underline">}\fi}
483 {\ifmathml \HCode{</\a:mathml mrow><\a:mathml mo\Hnewline
484 accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}%
485 \else \HCode{</span>}\fi \egroup}
486 \Configure{footnote-mark}
487 {\ifmathml \ifmtext \else
488 \HCode{<\a:mathml mrow \mml:class="footnote-mark">}\fi
489 \else \HCode{<span class="footnote-mark">}\fi }
490 {\ifmathml \ifmtext \else \HCode{</\a:mathml mrow>}\fi
491 \else \HCode{</span>}\fi }
492 \Configure{thank-mark}
493 {\HCode{<\ifmathml \a:mathml mrow \expandafter\mml:class\else span class\fi
494 ="thank-mark">}}
495 {\HCode{</\ifmathml \a:mathml mrow\else span\fi>}}
496 \:CheckOption{fn-in}\if:Option \else
497 \expandafter\let\csname A:footnote-text\expandafter\endcsname
498 \csname a:footnote-text\endcsname
499 \expandafter\let\csname B:footnote-text\expandafter\endcsname
500 \csname b:footnote-text\endcsname
501 \NewConfigure{footnote-text}[2]{%
502 \expandafter\def\csname a:footnote-text\endcsname{%
503 #1%
504 \ifmathml
505 \HCode{<\a:mathml math\Hnewline
506 \csname a:math-xmlns\endcsname \Hnewline \a:@math>%
507 \ifmtext <\a:mathml mtext>\fi}
508 \fi
509 \ifmathml \fi
510 }%
511 \expandafter\def\csname b:footnote-text\endcsname{%
512 \ifmathml
513 \HCode{\ifmtext</\a:mathml mtext>\fi </\a:mathml math>}%
514 \fi
515 #2%
516 }%
517 }
518 \Configure{footnote-text}
519 {\csname A:footnote-text\endcsname}
520 {\csname B:footnote-text\endcsname}
521 \fi
522 \let\A:footnotetext=\a:footnotetext
523 \let\B:footnotetext=\b:footnotetext
524 \let\C:footnotetext=\c:footnotetext
525 \NewConfigure{footnotetext}[3]{%
526 \def\a:footnotetext{%
527 \ifmathml \ifmtext \ht:special{t4ht@,}%
528 \fi\fi
529 #1%
530 \ifmathml \ifmtext \ht:special{t4ht@,}%
531 \fi\fi
532 }%
533 \def\b:footnotetext{%
534 \ifmathml \ifmtext \ht:special{t4ht@,}%
535 \fi\fi
536 #2%
537 \ifmathml \ifmtext \ht:special{t4ht@,}%
538 \fi\fi
539 }%
540 \def\c:footnotetext{%
541 \ifmathml \ifmtext \ht:special{t4ht@,}%
542 \fi\fi
543 #3%
544 \ifmathml \ifmtext \ht:special{t4ht@,&\#x00A0;}%
545 \fi\fi
546 }%
547 }
548 \Configure{footnotetext}
549 {\A:footnotetext}
550 {\B:footnotetext}
551 {\C:footnotetext}
552 \Configure{footnotebody}
553 {\tmp:toks=}
554 {\ifmathml \ifmmode $\mbox{$\the\tmp:toks$}$
555 \else $\mbox{\the\tmp:toks}$\fi
556 \else \the\tmp:toks\fi}
557 \:CheckOption{mouseover} \if:Option
558 \pend:def\js:on{\ifmathml \ifmtext \ht:special{t4ht@,}%
559 \fi\fi}
560 \append:def\js:on{\ifmathml \ifmtext \ht:special{t4ht@,&\#x00A0;}%
561 \fi\fi}
562 \fi
563 \def\border:lines{%
564 \ifnum \borderlines>0
565 \ifnum \borderlines>1 border-right:solid 1px black;\fi
566 \ifodd \borderlines border-left:solid 1px black;\fi
567 \fi
568 }
569 \Configure{VBorder}
570 {\let\VBorder=\empty \let\AllColMargins=\empty
571 \global\let\GROUPS=\empty \HAssign\NewGroup = 0
572 \gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo
573 \HAssign\borderlines = 0
574 \global\let\columnlines=\relax
575 %
576 }
577 {\ifx \columnlines\relax \gHAssign\borderlines = 1
578 \else \gHAdvance\borderlines by 2 \fi
579 %
580 \xdef\VBorder{\VBorder\ifnum \NewGroup> 0 </colgroup>\fi}
581 \HAssign\NewGroup = 0 \gdef\GROUPS{rules="groups"}}
582 {\Advance:\NewGroup by 1
583 \ifnum \borderlines>1 \gHAdvance\borderlines by -2 \fi
584 \ifx \columnlines\relax
585 \global\let\columnlines\empty
586 \else
587 \ifnum \NewGroup=1
588 \xdef\columnlines{\columnlines\ifx\columnlines\empty
589 \else \space\fi solid}%
590 \else
591 \xdef\columnlines{\columnlines\ifx\columnlines\empty
592 \else \space\fi none}%
593 \fi
594 \fi
595 %
596 \ifnum \NewGroup=1 \xdef\VBorder{\VBorder<colgroup
597 id="TBL-\TableNo-\ar:cnt g">}\fi
598 \xdef\VBorder{\VBorder<col\Hnewline id="TBL-\TableNo
599 -\ar:cnt"\xml:empty>}\xdef\AllColMargins{\AllColMargins1}}
600 {\xdef\AllColMargins{\AllColMargins 0}}
601 \Configure{putHBorder}{\bgroup\ifmathml\mathml:hborder\fi\HCode{\HBorder}\egroup}
602
603
604 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
605
606 \endinput\empty\empty\empty\empty\empty\empty
607 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
636 \ConfigureHinput{amsmath}
637 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
638 \ifx \mathdisplay@@pop\:UnDef
639 \ifx \emdf@La\:UnDef
640 % pre 2000
641 \Configure{equation}
642 {\ifvmode \IgnorePar\fi \EndP
643 \HCode{<table class="equation"><tr><td>}%
644 \Configure{$$}{}{}{}%
645 \Configure{gather}
646 {\Configure{$$}
647 {\Configure{@math}{\mml:class="equation"}\IgnorePar\EndP\DviMath}
648 {\EndDviMath\EndP}%
649 {}%
650 \IgnorePar
651 }{}{}{}{}{}
652 %
653 \IgnorePar
654 }
655 {\ifvmode \IgnorePar\fi\EndP \HCode{</td><td class="eq-no">}}
656 {\ifvmode \IgnorePar\fi\EndP \HCode{</td></tr></table>}%
657 \IgnoreIndent\par}
658 \Configure{equation*}
659 {\ifvmode \IgnorePar\fi \EndP
660 \HCode{<table class="equation-star"><tr><td>}%
661 \Configure{$$}{}{}{}%
662 \Configure{gather}
663 {\Configure{$$}
664 {\Configure{@math}{\mml:class="equation"}\IgnorePar\EndP\DviMath}
665 {\EndDviMath\EndP}%
666 {}%
667 \IgnorePar
668 }{}{}{}{}{}
669 %
670 \IgnorePar
671 }
672 {\ifvmode \IgnorePar\fi\EndP \HCode{</td></tr></table>}%
673 \IgnoreIndent\par}
674
675 \else
676 % jan 2000
677 \Configure{equation}
678 {\ifvmode \IgnorePar\fi \EndP
679 \HCode{<table class="equation"><tr><td>}%
680 \Configure{gather}
681 {\HCode{<\a:mathml mtable\Hnewline
682 \mml:class="equation"><\a:mathml mtr><\a:mathml mtd>}\IgnorePar
683 \Configure{$$}
684 {\Configure{@math}{%\a:mathml
685 display="block"
686 %
687 \mml:class="equation"}\IgnorePar\EndP\DviMath}
688 {\EndDviMath\EndP}
689 {\DisplayMathtrue}%
690 }
691 {\HCode{</\a:mathml mtd></\a:mathml mtr></\a:mathml mtable>}}
692 {}
693 {}
694 {\ifnum\HCol=2 \IgnorePar
695 \HCode{</\a:mathml mtd><\a:mathml mtd>}\fi }
696 {}
697 %
698 %
699 \IgnorePar
700 }
701 {\ifvmode \IgnorePar\fi\EndP
702 \HCode{</td><td class="eq-no">}%
703 }
704 {\ifvmode \IgnorePar\fi\EndP
705 \HCode{</td></tr></table>}%
706 \IgnoreIndent\par}
707 \Configure{equation*}
708 {\ifvmode \IgnorePar\fi \EndP
709 \HCode{<table class="equation-star"><tr><td>}%
710 \Configure{gather}
711 {\HCode{<\a:mathml mtable\Hnewline
712 \mml:class="equation"><\a:mathml mtr><\a:mathml mtd>}\IgnorePar
713 \Configure{$$}
714 {\Configure{@math}{%\a:mathml
715 display="block"
716 %
717 \mml:class="equation"}\IgnorePar\EndP\DviMath}
718 {\EndDviMath\EndP}
719 {\DisplayMathtrue}%
720 }
721 {\HCode{</\a:mathml mtd></\a:mathml mtr></\a:mathml mtable>}}
722 {}
723 {}
724 {\ifnum\HCol=2 \IgnorePar
725 \HCode{</\a:mathml mtd><\a:mathml mtd>}\fi }
726 {}
727 %
728 %
729 \IgnorePar
730 }
731 {\ifvmode \IgnorePar\fi\EndP
732 \HCode{</td></tr></table>}%
733 \IgnoreIndent\par}
734
735 \fi
736 \else
737 \Configure{equation}
738 {\ifvmode \IgnorePar\fi\EndP
739 \HCode{<table class="equation"><tr><td>}%
740 \Configure{gather}
741 {\HCode{<\a:mathml mtable\Hnewline
742 \mml:class="equation"><\a:mathml mtr><\a:mathml mtd>}\IgnorePar
743 \Configure{$$}
744 {\Configure{@math}{%\a:mathml
745 display="block"
746 %
747 \mml:class="equation"}\IgnorePar\EndP\DviMath}
748 {\EndDviMath\EndP}
749 {\DisplayMathtrue}%
750 }
751 {\HCode{</\a:mathml mtd></\a:mathml mtr></\a:mathml mtable>}}
752 {}
753 {}
754 {\ifnum\HCol=2 \IgnorePar
755 \HCode{</\a:mathml mtd><\a:mathml mtd>}\fi }
756 {}
757 %
758 \Configure{$$}
759 {\Configure{@math}{%\a:mathml
760 display="block"
761 %
762 \mml:class="equation"}\IgnorePar\EndP\DviMath}
763 {\EndDviMath\EndP}
764 {\DisplayMathtrue}%
765 %
766 }
767 {\ifvmode \IgnorePar\fi\EndP
768 \HCode{</td><td class="eq-no">}%
769 }
770 {\ifvmode \IgnorePar\fi\EndP \HCode{</td></tr></table>}%
771 \par\ShowPar\noindent}
772 \Configure{equation*}
773 {\ifvmode \IgnorePar\fi\EndP
774 \HCode{<table class="equation-star"><tr><td>}%
775 \Configure{gather}
776 {\HCode{<\a:mathml mtable\Hnewline
777 \mml:class="equation"><\a:mathml mtr><\a:mathml mtd>}\IgnorePar
778 \Configure{$$}
779 {\Configure{@math}{%\a:mathml
780 display="block"
781 %
782 \mml:class="equation"}\IgnorePar\EndP\DviMath}
783 {\EndDviMath\EndP}
784 {\DisplayMathtrue}%
785 }
786 {\HCode{</\a:mathml mtd></\a:mathml mtr></\a:mathml mtable>}}
787 {}
788 {}
789 {\ifnum\HCol=2 \IgnorePar
790 \HCode{</\a:mathml mtd><\a:mathml mtd>}\fi }
791 {}
792 %
793 \Configure{$$}
794 {\Configure{@math}{%\a:mathml
795 display="block"
796 %
797 \mml:class="equation"}\IgnorePar\EndP\DviMath}
798 {\EndDviMath\EndP}
799 {\DisplayMathtrue}%
800 %
801 }
802 {\ifvmode \IgnorePar\fi\EndP \HCode{</td></tr></table>}%
803 \ShowPar\IgnoreIndent\par}
804
805 \fi
806 \:CheckOption{texsource}\if:Option
807
808 % we must handle equations separatelly.
809 \renewcommand\MMLVerbMathToksEquation[2]{%
810 \mmlalteqtoks{\begin{#2}
811 #1
812 \end{#2}}%
813 \begingroup%
814 \def\@tempa{#2}%
815 \def\@equationname{equation}%
816 \def\mlabeledtr{mtr}
817 \def\swapmlabeledtr##1##2{##2\HCode{</\a:mathml mtd><\a:mathml mtd>}##1}%
818 \ifx\@equationname\@tempa%
819 \ifOption{mathjax}{%
820 \def\mlabeledtr{mlabeledtr}% this element can be used to print the equation number, but it is supported only by MathJax
821 \def\swapmlabeledtr##1##2{##1\HCode{</\a:mathml mtd><\a:mathml mtd>}##2}%
822 }{}%
823 \fi
824 \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow><\a:mathml mtable><\a:mathml \mlabeledtr><\a:mathml mtd>}%
825 \Configure{$}{}{}{}%
826 \Configure{$$}{}{}{}%
827 \@eqnswfalse% Disable duplicate equation number in the first equation in the document
828 \ifx\@equationname\@tempa%
829 \incr@eqnum%
830 \fi
831 \swapmlabeledtr{%
832 \ifx\@equationname\@tempa%
833 \print@eqnum%
834 \fi%
835 }{%
836 \mathdisplay{#2}%
837 #1%
838 \endmathdisplay{#2}%
839 }%
840 \HCode{</\a:mathml mtd></\a:mathml \mlabeledtr></\a:mathml mtable></\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">}%
841 \HCode{\mmleqtoks}%
842 \HCode{</\a:mathml annotation></\a:mathml semantics>}%
843 \EndDviMath%
844 \endgroup%
845 }
846
847 % \MMLVerbMath{subarray}
848 % \MMLVerbMath{smallmatrix}
849 % \MMLVerbMath{matrix}
850 % \MMLVerbMath{pmatrix}
851 % \MMLVerbMath{bmatrix}
852 % \MMLVerbMath{Bmatrix}
853 % \MMLVerbMath{vmatrix}
854 % \MMLVerbMath{Vmatrix}
855 % \MMLVerbMath{cases}
856 % \MMLVerbMath{subequations}
857 % \MMLVerbMath{aligned}
858 % \MMLVerbMath{alignedat}
859 \MMLVerbMath{gathered}
860 \MMLVerbMath{gather}
861 \MMLVerbMath{gather*}
862 \MMLVerbMath{alignat}
863 \MMLVerbMath{alignat*}
864 \MMLVerbMath{xalignat}
865 \MMLVerbMath{xalignat*}
866 \MMLVerbMath{xxalignat}
867 \MMLVerbMath{align}
868 \MMLVerbMath{align*}
869 \MMLVerbMath{flalign}
870 \MMLVerbMath{flalign*}
871 % \MMLVerbMath{split}
872 \MMLVerbMath{multline}
873 \MMLVerbMath{multline*}
874 % equations fails with errors, even though it worked in a .cfg
875 % I will need to investigate it more
876 \MMLVerbEquation{equation}
877 \MMLVerbEquation{equation*}
878 \MMLVerbMath{math}
879 \MMLVerbMath{displaymath}
880 \MMLVerbMath{eqnarray}
881 \MMLVerbMath{eqnarray*}
882
883 \def\MML:DisplayMath#1\]{\begin{equation*}#1\end{equation*}}
884
885 \AtBeginDocument{
886 \DeclareRobustCommand\[{\MML:DisplayMath}
887 \DeclareRobustCommand\]{}
888 }
889 \fi
890 \Configure{@begin}
891 {split}
892 {\let\tagform@=\:gobble }
893 \Css{mtd.align-odd{margin-left:2em; text-align:right;}}
894 \Css{mtd.align-even{margin-right:2em; text-align:left;}}
895
896 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
897
898 \endinput\empty\empty\empty\empty\empty\empty
899 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
900
901
902
903
904
905
906
907
908
909
910 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
911 \ConfigureHinput{plain}
912 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
913 \:CheckOption{new-accents} \if:Option \else
914 \ifx \mathml:on\:UnDef
915 \Configure{accents}
916 {\ifmmode \expandafter\mathord\fi
917 {\leavevmode
918 \if !#1!\ht:special{t4ht@+\string&{35}x#2;}%
919 \else \expandafter \ifx\csname U#2#1\endcsname\relax
920 \ht:special{t4ht@+\string&{35}x#2;}%
921 \else
922 \ht:special{t4ht@+\string&{35}x\csname U#2#1\endcsname;}%
923 \fi \fi x%
924 %
925 \ht:special{t4ht@[}\if!#1!x\else#2\fi\ht:special{t4ht@]}}}
926 {\ifmmode
927 \Tg<\a:mathml mrow
928 \mml:class="accent#1">\mathord{#3}\Tg</\a:mathml mrow>%
929 \else \HCode{<span class="accent#1">}#3\HCode{</span>}%
930 \fi
931 }%
932 \fi
933 \fi
934
935
936 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
937
938 \endinput\empty\empty\empty\empty\empty\empty
939 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
969 \ConfigureHinput{array}
970 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
971 \Css{.hline:first-child{border-bottom:1px solid black;border-top:none;}}
972
973 \ConfigureEnv{array}
974 {\PushStack\Col:Marg\AllColMargins
975 \bgroup\Configure{$}{}{}{}}
976 {\egroup \PopStack\Col:Marg\AllColMargins}
977 {}{}
978 \Configure{multicolumn}
979 {\let\sv:VBorder\VBorder
980 \let\VBorder\empty
981 \Configure{VBorder}{}{}{}{}%
982 }
983 {\let\VBorder\sv:VBorder}
984 {\ifmmode \HCode{<\a:mathml mrow\Hnewline \mml:class="multicolumn}%
985 {\Configure{halignTD} {}{}
986 {<}{\HCode{-left}}
987 {-}{\HCode{-center}}
988 {>}{\HCode{-right}}
989 {p}{\HCode{-left}}
990 {}%
991 \HColAlign}\HCode{">}\else
992 \ifvmode\IgnorePar\fi
993 \HCode{<div class="multicolumn" }\HColAlign\HCode{>}\fi }
994 {\ifmmode \HCode{</\a:mathml mrow>}\else
995 \ifvmode\IgnorePar\fi \EndP\HCode{</div>}\fi }
996 \def\gob:sp#1{#1}
997
998 \Configure{VBorder}
999 {\let\VBorder=\empty \let\AllColMargins=\empty
1000 \global\let\GROUPS=\empty \HAssign\NewGroup = 0
1001 \gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo
1002 \HAssign\borderlines = 0
1003 \global\let\columnlines=\relax
1004 %
1005 }
1006 {\ifx \columnlines\relax \gHAssign\borderlines = 1
1007 \else \gHAdvance\borderlines by 2 \fi
1008 %
1009 \xdef\VBorder{\VBorder\ifnum \NewGroup> 0 </colgroup>\fi}
1010 \HAssign\NewGroup = 0 \gdef\GROUPS{rules="groups"}}
1011 {\Advance:\NewGroup by 1
1012 \ifnum \borderlines>1 \gHAdvance\borderlines by -2 \fi
1013 \ifx \columnlines\relax
1014 \global\let\columnlines\empty
1015 \else
1016 \ifnum \NewGroup=1
1017 \xdef\columnlines{\columnlines\ifx\columnlines\empty
1018 \else \space\fi solid}%
1019 \else
1020 \xdef\columnlines{\columnlines\ifx\columnlines\empty
1021 \else \space\fi none}%
1022 \fi
1023 \fi
1024 %
1025 \ifnum \NewGroup=1 \xdef\VBorder{\VBorder<colgroup
1026 id="TBL-\TableNo-\ar:cnt g">}\fi
1027 \xdef\VBorder{\VBorder<col\Hnewline id="TBL-\TableNo
1028 -\ar:cnt"\xml:empty>}\xdef\AllColMargins{\AllColMargins1}}
1029 {\xdef\AllColMargins{\AllColMargins 0}}
1030 \Configure{putHBorder}{\bgroup\ifmathml\mathml:hborder\fi\HCode{\HBorder}\egroup}
1031
1032
1033 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1034
1035 \endinput\empty\empty\empty\empty\empty\empty
1036 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1065 \ConfigureHinput{color}
1066 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1067 \Configure{textcolor}
1068 {\gHAdvance\textcolorN by 1
1069 \Configure{color}%
1070 {\Configure{SetHColor}
1071 {\Css{.textcolor\textcolorN{color:\HColor}}}}%
1072 \HCode{<\ifmathml\a:mathml mstyle\else span\fi
1073 \space id="textcolor\textcolorN">}}%
1074 {\HCode{</\ifmathml\a:mathml mstyle\else span\fi>}}
1075 \Configure{textcolor}
1076 {\ifmathml%
1077 \ifmtext\ht:special{t4ht@,}%
1078 \fi\HCode{<\a:mathml mstyle style="color:\:currentcolor;">}%
1079 \else%
1080 \HCode{<span style="color:\:currentcolor;">}%
1081 \fi%
1082 }%
1083 {\HCode{</\ifmathml\a:mathml mstyle\else span\fi>}\ifmtext\ht:special{t4ht@,&\#x00A0;}%
1084 \fi}
1085
1086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1087
1088 \endinput\empty\empty\empty\empty\empty\empty
1089 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1157 \ConfigureHinput{rlbabel}
1158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1159 \Configure{moreL}
1160 {\ifmathml \ifmtext
1161 \leavevmode\special{t4ht@+</\a:mathml mtext><\a:mathml mtext{32}\mml:class="ltr">}x%
1162 \def\end:moreRL{\HCode{</\a:mathml mtext><\a:mathml mtext>}}%
1163 \else
1164 \let\end:moreRL=\empty
1165 \fi
1166 %
1167 \else
1168 \ifvmode \let\end:moreRL=\empty
1169 \else\HCode{<span dir="ltr" >}%
1170 \def\end:moreRL{\HCode{</span>}}%
1171 \fi
1172 \fi
1173 }
1174 {\end:moreRL}
1175 \Configure{moreR}
1176 {\ifmathml \ifmtext
1177 \leavevmode\special{t4ht@+</\a:mathml mtext><\a:mathml mtext{32}\mml:class="rtl">}x%
1178 \def\end:moreRL{\HCode{</\a:mathml mtext><\a:mathml mtext>}}%
1179 \else
1180 \let\end:moreRL=\empty
1181 \fi
1182 %
1183 \else
1184 \ifvmode \let\end:moreRL=\empty
1185 \else\HCode{<span dir="rtl" >}\def\end:moreRL{\HCode{</span>}}\fi
1186 \fi
1187 }
1188 {\end:moreRL}
1189 \Css{.rtl {direction: rtl}
1190 .ltr {direction: ltr} }
1191
1192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1193
1194 \endinput\empty\empty\empty\empty\empty\empty
1195 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1196
1197
1198
1199
1200
1201
1202
1203
1204 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1205 \ConfigureHinput{frenchb}
1206 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1207 \Configure{frenchb-nbsp}
1208 {\ifmtext \:unicodespace%
1209 \else\ifmathml
1210 \Tg<\a:mathml mspace class="frenchb-nbsp" />%
1211 \else
1212 \ht:special{t4ht@?unhskip}\HCode{<span class="frenchb-thinspace">}%
1213 \:unicodespace%
1214 \HCode{</span>}%
1215 \fi\fi
1216 \setbox\tmp:bx=\hbox\bgroup}
1217 {\egroup}
1218
1219 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1220
1221 \endinput\empty\empty\empty\empty\empty\empty
1222 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606 \endinput
1607