Debian Codegraph @

texmf-dist/source/generic/tex4ht/common-info.tex

raw
1 % $Id: common-info.tex 237 2017-01-29 18:20:42Z karl $
2 % Common TeX definitions used only in the *-info.tex literate sources.
3 % Not installed.
4 %
5 % Copyright 2009-2017 TeX Users Group
6 % Copyright 1996-2009 Eitan M. Gurari
7 % Released under LPPL 1.3c+.
8 % See tex4ht-cpright.tex for license text.
9
10 \expandafter\ifx \csname YES\HTML\endcsname\relax
11 % begin comment. 21/07/2016 (dg)
12 % on first run \infoIVht expects \ConfigureHinput
13 % ( \def\infoIVht#1\ConfigureHinput{..} )
14 % so we feed it with "\ConfigureHinput" (no expansion here, merely
15 % a delimiter); the rest is slurped until the "//".
16 % end
17 \def\CleanComment{[0]\ConfigureHinput\id:gobble}
18 \else
19 \let\saveCd=\<
20 \def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}
21 %
22 % Eitan's commented-out definition started like this (and doesn't work):
23 %\def\CleanComment#1tex4ht-info#2#3#4.#5>#6//{[\eatIV#4% <--jobname
24 %
25 % Eitan's active definition started like this:
26 %\def\CleanComment#1tex4ht-info#2#3#4.#5>#6//{[#4% <--jobname
27 %
28 % However, that didn't work either. #4 is not the jobname.
29 % The arguments when running htlatex tex4ht-info-mml.tex are these:
30 % %#1<-
31 %\CleanComment #1tex4ht-info#2#3#4.#5>#6//->
32 %[\if ,\ifnum \FIRST =#6 .\else ,0\fi
33 %#1<-
34 %#2<--
35 %#3<-m
36 %#4<-ml
37 %#5<-html#QPrTx1"\<infomml\
38 %#6<-92\ifx \CodeId \:gobbleii \else ...\fi
39 %
40 % As a result, when running mzlatex hello.tex xhtml,info there was
41 % an error on the first line of infomml.4ht, which looked like this:
42 % \ifx\infoIVht\UnDeF\def\infoIVht#1//{}\fi\infoIVht[ml0]28...//
43 % That "ml" is not a number, so \ifnum fails. This only happens
44 % mzlatex and the info option, not htlatex. We don't understand.
45 %
46 % This version avoids the spurious "ml" but mzlatex hello.tex still
47 % fails, trying to process the \ConfigureHinput blocks as text.
48 % Changing the bracketed number in infomml.4ht to small values seems
49 % to make it pass, but can't see how to generate it. The number
50 % after the brackets (#6) changes also.
51 %
52 % Since all this is only about the info option with mzlatex,
53 % just leaving it failing for now. Other things to do.
54 \def\CleanComment#1tex4ht-info#2#3#4.#5>#6//{[1\empty %
55 \if,\ifnum \FIRST=#6 .\else ,0\fi\fi]#6//}
56 \def\eatIV#1#2#3#4{}
57 \fi
58
59 \Comment{
60
61 \string\ifx\string\infoIVht\string\UnDeF\string\def\string\infoIVht#1//{}\string\fi\string\infoIVht\CleanComment}{//
62
63 }
64
65 \def\>>>#1<<<{\bgroup\csname no:catcodes\endcsname0{255}{12}%
66 \csname no:catcodes\endcsname{13}{13}{13}% ^^M
67 \def\temp##1>>>{\egroup
68 \expandafter \def\csname #1\endcsname{##1}}\temp}