| 1 |
% $Id: tex4ht-cond4ht.tex 1390 2023-10-13 22:00:45Z karl $ |
| 2 |
% (1) tex tex4ht-cond4ht or xhtex tex4ht-cond4ht |
| 3 |
% (2) tex cond4ht.4ht |
| 4 |
% |
| 5 |
% Copyright 2009-2023 TeX Users Group |
| 6 |
% Copyright 1997-2009 Eitan M. Gurari |
| 7 |
% Released under LPPL 1.3c+. |
| 8 |
% See tex4ht-cpright.tex for license text. |
| 9 |
|
| 10 |
\vbadness=10000 |
| 11 |
\csname tex4ht\endcsname |
| 12 |
|
| 13 |
\input ProTex.sty |
| 14 |
\def\CodeDel{{<<<<}{>>>>}} |
| 15 |
\AlProTex{sty,<<<>>>,?,title,list,[],ClearCode} |
| 16 |
|
| 17 |
\input common |
| 18 |
|
| 19 |
\<cond4ht.4ht\><<<< |
| 20 |
%Needs: tex cond4ht.4ht |
| 21 |
%% begin comment 29/09/2016 (dg) |
| 22 |
%% detaching mktex4ht.cnf as |
| 23 |
%% a separate file mktex4ht-cnf.tex (copy of mktex4ht.cnf) |
| 24 |
%% end |
| 25 |
\def\ConfigFiles{\input mktex4ht-cnf.tex} % Please, modify the bodies of the |
| 26 |
\def\mkfilename{mktex4ht.4ht} % first four macros. |
| 27 |
% The input file should consist |
| 28 |
% of records \AddFile{i}{name} |
| 29 |
% where i stands for a priority number |
| 30 |
% in the range 0--9, and name stands for |
| 31 |
% for a sty/cls file name. For instance, |
| 32 |
% |
| 33 |
% \AddFile{1}{latex} \AddFile{2}{article} |
| 34 |
% \AddFile{5}{amsmath} \AddFile{2}{report} ... |
| 35 |
|
| 36 |
% cond4ht.4ht (?version), generated from ?jobname.tex |
| 37 |
% Copyright 2009-2023 TeX Users Group |
| 38 |
% Copyright 1997-2009 Eitan M. Gurari |
| 39 |
?<TeX4ht copywrite?> |
| 40 |
|
| 41 |
\ifx \BREAK\UnDef |
| 42 |
\def\BREAK{^^J} |
| 43 |
\input common.tex |
| 44 |
\fi |
| 45 |
|
| 46 |
|
| 47 |
\ifx \OutputCode\UnDef |
| 48 |
|
| 49 |
\def\next{ |
| 50 |
\input tex4ht.sty \Preamble{html}\EndPreamble |
| 51 |
\input ProTex.sty |
| 52 |
\AlProTex{sty,<<<>>>,|,title,list,[[]],ClearCode} |
| 53 |
} |
| 54 |
\def\BYE{\csname bye\endcsname} |
| 55 |
\expandafter \next |
| 56 |
\fi |
| 57 |
|
| 58 |
|
| 59 |
\expandafter\def\csname lit0\endcsname{} |
| 60 |
\expandafter\def\csname lit1\endcsname{} |
| 61 |
\expandafter\def\csname lit2\endcsname{} |
| 62 |
\expandafter\def\csname lit3\endcsname{} |
| 63 |
\expandafter\def\csname lit4\endcsname{} |
| 64 |
\expandafter\def\csname lit5\endcsname{} |
| 65 |
\expandafter\def\csname lit6\endcsname{} |
| 66 |
\expandafter\def\csname lit7\endcsname{} |
| 67 |
\expandafter\def\csname lit8\endcsname{} |
| 68 |
\expandafter\def\csname lit9\endcsname{} |
| 69 |
\def\infostyles{} |
| 70 |
\def\hookstyles{} |
| 71 |
\def\XXXXs{} |
| 72 |
|
| 73 |
\def\litstyles{% |
| 74 |
\csname lit0\endcsname\BREAK |
| 75 |
\csname lit1\endcsname\BREAK |
| 76 |
\csname lit2\endcsname\BREAK |
| 77 |
\csname lit3\endcsname\BREAK |
| 78 |
\csname lit4\endcsname\BREAK |
| 79 |
\csname lit5\endcsname\BREAK |
| 80 |
\csname lit6\endcsname\BREAK |
| 81 |
\csname lit7\endcsname\BREAK |
| 82 |
\csname lit8\endcsname\BREAK |
| 83 |
\csname lit9\endcsname |
| 84 |
} |
| 85 |
\HAssign\AddFileN = -3 |
| 86 |
|
| 87 |
\catcode`\!=14 \catcode`\%=12 |
| 88 |
\def\AddFile#1#2{! |
| 89 |
! \csname append:def\endcsname\hookstyles{\string\LitRow{#2}}! |
| 90 |
\APPENDHOOK{\string\LitRow{#2}}! |
| 91 |
\csname expand:after\endcsname{\csname append:def\endcsname}\csname ! |
| 92 |
lit#1\endcsname{\string\lit\string{#2\string}}! |
| 93 |
\ifnum\AddFileN<0\else \csname append:def\endcsname\XXXXs{,}\fi ! |
| 94 |
\ifnum \AddFileN=4 ! |
| 95 |
\HAssign\AddFileN = 0 ! |
| 96 |
\csname append:def\endcsname\XXXXs{\BREAK\space\space\space} ! |
| 97 |
\csname expand:after\endcsname{\csname ! |
| 98 |
append:def\endcsname}\csname lit#1\endcsname{\BREAK}! |
| 99 |
! \csname append:def\endcsname\hookstyles{\BREAK}! |
| 100 |
\fi ! |
| 101 |
\csname append:def\endcsname\XXXXs{#2}! |
| 102 |
\ifnum \AddFileN<0 \HAssign\AddFileN = 2 \fi ! |
| 103 |
\HAdvance\AddFileN by 1 ! |
| 104 |
\csname append:def\endcsname\infostyles{\info.#2.}! |
| 105 |
} |
| 106 |
\catcode`\!=12 \catcode`\%=14 |
| 107 |
|
| 108 |
|
| 109 |
\def\getNextLit#1#2#3{\def\nextLit{#3 }\def\NextLit{#3}} |
| 110 |
|
| 111 |
\def\APPENDHOOK#1{% |
| 112 |
\getNextLit#1% |
| 113 |
\expandafter\let\expandafter\hookstyles\expandafter\empty |
| 114 |
\expandafter\sorthooks\hookstyles{}{}{}} |
| 115 |
|
| 116 |
\def\sorthooks#1#2#3{% |
| 117 |
\if !#3!% |
| 118 |
\expandafter\expandafter\csname append:def\endcsname |
| 119 |
\expandafter\hookstyles\expandafter{\expandafter\string |
| 120 |
\expandafter\LitRow\expandafter{\NextLit}}% |
| 121 |
\else |
| 122 |
\def\comp{0}% |
| 123 |
\expandafter\compare\nextLit<>#3 <>% |
| 124 |
\ifnum \comp<0 |
| 125 |
\expandafter\expandafter\csname append:def\endcsname |
| 126 |
\expandafter\hookstyles\expandafter{\expandafter\string |
| 127 |
\expandafter\LitRow\expandafter{\NextLit}}% |
| 128 |
\let\next=\resthooks |
| 129 |
\else |
| 130 |
\let\next\sorthooks |
| 131 |
\fi |
| 132 |
\csname append:def\endcsname\hookstyles{#1#2{#3}}% |
| 133 |
\expandafter\next |
| 134 |
\fi} |
| 135 |
|
| 136 |
\def\resthooks#1#2#3{% |
| 137 |
\if !#3!% |
| 138 |
\else |
| 139 |
\csname append:def\endcsname\hookstyles{#1#2{#3}}% |
| 140 |
\expandafter\next |
| 141 |
\fi} |
| 142 |
|
| 143 |
|
| 144 |
\def\compare#1#2<>#3#4<>{% |
| 145 |
\ifnum `#1<`#3\def\comp{-1}\let\next=\relax |
| 146 |
\else \ifnum `#1>`#3\def\comp{1}\let\next=\relax |
| 147 |
\else \def\next{\compare#2<>#4<>}% |
| 148 |
\if !#2!\let\next=\relax \fi |
| 149 |
\if !#4!\let\next=\relax \fi |
| 150 |
\def\tempa{#2}\def\tempb{#4}% |
| 151 |
\ifx \tempa\space |
| 152 |
\ifx \tempb\tempa \else \def\comp{-1}\fi |
| 153 |
\let\next=\relax |
| 154 |
\else\ifx \tempb\space \def\comp{1}\let\next=\relax |
| 155 |
\fi\fi |
| 156 |
\fi\fi |
| 157 |
\next |
| 158 |
} |
| 159 |
|
| 160 |
\HAssign\resthookN=0 |
| 161 |
\def\hookstylesBreaks#1#2#3{% |
| 162 |
\if !#3!\else |
| 163 |
\csname append:def\endcsname\hookstyles{#1#2{#3}}% |
| 164 |
\HAdvance\resthookN by 1 |
| 165 |
\ifnum \resthookN=4 |
| 166 |
\csname append:def\endcsname\hookstyles{\BREAK}% |
| 167 |
\HAssign\resthookN=0 |
| 168 |
\fi |
| 169 |
\expandafter\hookstylesBreaks |
| 170 |
\fi} |
| 171 |
|
| 172 |
\def\finalizeHooks{% |
| 173 |
\expandafter\let\expandafter\hookstyles\expandafter\empty |
| 174 |
\expandafter\hookstylesBreaks\hookstyles{}{}{}} |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
\ConfigFiles |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
\finalizeHooks |
| 189 |
|
| 190 |
\catcode`\%=12 |
| 191 |
|
| 192 |
\def\hook.#1.{\BREAK |
| 193 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\BREAK |
| 194 |
\string\section\string{#1\string}\string\rightline |
| 195 |
\string{\string\Link\string{#1-b\string}\string |
| 196 |
{#1-a\string}info\string\EndLink\string}\BREAK |
| 197 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\BREAK |
| 198 |
\BREAK |
| 199 |
\string\<configure 4ht #1\string\><<< \BREAK |
| 200 |
\BREAK |
| 201 |
>>>\BREAK\BREAK |
| 202 |
} |
| 203 |
|
| 204 |
|
| 205 |
\def\info.#1.{\BREAK \BREAK\BREAK |
| 206 |
\string\def\string\infolink{[\string\Link\string{#1-a\string}\string |
| 207 |
{#1-b\string}up\string\EndLink] \string\gdef |
| 208 |
\string\infolink{}}\BREAK |
| 209 |
\string\section{#1}\BREAK\BREAK |
| 210 |
\string\begin\string{verbatim\string}\BREAK |
| 211 |
\<info 4ht #1\> |
| 212 |
\string\end\string{verbatim\string}\BREAK |
| 213 |
} |
| 214 |
|
| 215 |
\def\lit.#1.{\BREAK |
| 216 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\BREAK |
| 217 |
\space\space\space\space\space\space\space\space |
| 218 |
\space\space\space\space\space\space\space\space |
| 219 |
|<configure 4ht|>\string{#1\string} \BREAK |
| 220 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\BREAK |
| 221 |
\space\space\space\space |<configure 4ht #1|> |
| 222 |
\space\space \<end configure 4ht\> \BREAK} |
| 223 |
|
| 224 |
\catcode`\%=14 |
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
\<*.4ht out of order\><<< |
| 231 |
\Hinclude{\@ifpackageloaded{colortbl}{% |
| 232 |
\no:dupl{array}{\input array.4ht}% |
| 233 |
\no:dupl{color}{\input color.4ht}% |
| 234 |
\no:dupl{colortbl}{\input colortbl.4ht}% |
| 235 |
}{}}{colortbl} |
| 236 |
>>> |
| 237 |
|
| 238 |
\<set Hinclude\><<< |
| 239 |
|
| 240 |
\<Hinclude plain\><<< |
| 241 |
\ifx \contextversion\Un:def |
| 242 |
\Hinclude{\input #1.4ht}{plain} |
| 243 |
\def\:temp{t}% |
| 244 |
\ifx \eplain\:temp |
| 245 |
\Hinclude{\input #1.4ht}{eplain} |
| 246 |
\fi |
| 247 |
||<include mex||> |
| 248 |
\ifx \d@nger\:UnDef \else |
| 249 |
\let\leftheadline\empty |
| 250 |
\let\rightheadline\empty |
| 251 |
\Hinclude{\input #1.4ht}{manmac} |
| 252 |
\fi |
| 253 |
\else |
| 254 |
\Hinclude{\input #1.4ht}{context} |
| 255 |
\fi |
| 256 |
>|empty>> |
| 257 |
|
| 258 |
\<Hinclude latex\><<< |
| 259 |
\Hinclude{\input #1.4ht}{latex} |
| 260 |
>|empty>> |
| 261 |
|
| 262 |
\<Hinclude plain lib\><<< |
| 263 |
||<Hinclude util||> |
| 264 |
>|empty>> |
| 265 |
|
| 266 |
\<Hinclude latex lib\><<< |
| 267 |
||<Hinclude util||> |
| 268 |
>|empty>> |
| 269 |
|
| 270 |
\<Hinclude plain + latex lib\><<< |
| 271 |
||<Hinclude util||> |
| 272 |
>|empty>> |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
\<include mex\><<< |
| 278 |
\def\:temp{M\kern-.111em\lower.6ex\hbox{E}\kern-.075emX} |
| 279 |
\ifx \nM@X\:temp |
| 280 |
\expandafter\ifx\csname emulateplain\endcsname\relax \else |
| 281 |
\Hinclude{\input #1.4ht}{mex} |
| 282 |
\fi\fi |
| 283 |
>|empty>> |
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
Style files, like xy, may be loaded in latex with \verb'\usepackage' or |
| 288 |
\verb'\input'. The latter case doesn't leave footprints, hence we need for |
| 289 |
it an explicitly check. On the other hand, we should avoid duplications. |
| 290 |
|
| 291 |
\<Hinclude util\><<< |
| 292 |
\expandafter\let\csname tex4ht:4ht\endcsname\empty |
| 293 |
\def\no:dupl#1#2{% |
| 294 |
\expandafter\ifx \csname #1:4ht\endcsname\relax |
| 295 |
\expandafter\let \csname #1:4ht\endcsname\empty |
| 296 |
\expand:after{#2}% |
| 297 |
\fi |
| 298 |
} |
| 299 |
>|empty>> |
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
\<Hinclude plain lib\><<< |
| 305 |
\Hinclude{\def\:temp{\ht:everypar={\setbox0=\lastbox\ht:everypar={}}}% |
| 306 |
\ifx \NoindentAfter\:temp |
| 307 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 308 |
{osudeG} |
| 309 |
\Hinclude{\ifx\amstexloaded@\relax |
| 310 |
\no:dupl{#1}{ |
| 311 |
\ifx \Space@\:UnDef \expand:after{\input #1.4ht} % |
| 312 |
\else \input vanilla.4ht \fi}% |
| 313 |
\fi} |
| 314 |
{amstex} |
| 315 |
\Hinclude{\expandafter\ifx \csname amsppt.sty\endcsname\relax \else |
| 316 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 317 |
{amsppt} |
| 318 |
\Hinclude{\ifx \texinfoversion\:UnDef\else |
| 319 |
\no:dupl{#1}{\expand:after{\input texinfo.4ht}}\fi} |
| 320 |
{texinfo} |
| 321 |
\Hinclude{\ifx \thistubstyle\:UnDef\else |
| 322 |
\no:dupl{#1}{\expand:after{\input tugboat.4ht}}\fi} |
| 323 |
{tugboat} |
| 324 |
>|empty>> |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
\<Hinclude latex lib\><<< |
| 329 |
\ifx\InputIfFileExists\UnDef% |
| 330 |
\def\input:if:fileexists#1#2#3{% |
| 331 |
\openin15 #1.4ht% |
| 332 |
\ifeof15% |
| 333 |
#3% |
| 334 |
\else% |
| 335 |
\input #1% |
| 336 |
\fi\closein15% |
| 337 |
}% |
| 338 |
\else |
| 339 |
\let\input:if:fileexists\InputIfFileExists% |
| 340 |
\fi% |
| 341 |
\Hinclude{\input #1.4ht}{fontmath} |
| 342 |
|<*.4ht out of order|> |
| 343 |
\def\:strip:quotes"#1"#2"#3\relax{\if .#1.#2\else #1\fi} |
| 344 |
\def\h:input#1.#2.#3?<par del?>{% |
| 345 |
\edef\:current:package{\:strip:quotes"#1""\relax} |
| 346 |
\:CheckOption{no_\:current:package}\if:Option |
| 347 |
\let\:temp\empty |
| 348 |
\else |
| 349 |
\let\:temp\empty |
| 350 |
\no:dupl{\:current:package}{% |
| 351 |
\def\:warn:msg{} |
| 352 |
\:CheckOption{debug}\if:Option |
| 353 |
\def\:warn:msg{% |
| 354 |
\:warning{No configuration file for \:current:package.\if .#2.tex\else #2\fi}% |
| 355 |
} |
| 356 |
\fi% |
| 357 |
\def\:temp{\input:if:fileexists{\:current:package.4ht}{}{\:warn:msg}}% |
| 358 |
}% |
| 359 |
\fi \:temp} |
| 360 |
\edef\:temp{\noexpand\Hinclude |
| 361 |
{\noexpand\h:input ##1..?<par del?>}{\@filelist}} |
| 362 |
\:temp |
| 363 |
>|empty>> |
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
\<Hinclude plain + latex lib\><<< |
| 368 |
\Hinclude{\ifx \PsfigVersion\:UnDef \else |
| 369 |
\no:dupl{#1}{\expand:after{\input psfig.4ht}}\fi} |
| 370 |
{psfig} |
| 371 |
\Hinclude{\:CheckOption{#1} |
| 372 |
\if:Option \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 373 |
{pictex} |
| 374 |
\Hinclude{% |
| 375 |
\expandafter\ifx \csname PSTricksLoaded\endcsname\relax\else |
| 376 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 377 |
{pstricks} |
| 378 |
\Hinclude{% |
| 379 |
\ifx \:DraCatCodes\:UnDef \else |
| 380 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 381 |
{dratex} |
| 382 |
\Hinclude{% |
| 383 |
\ifx \xyloaded\:UnDef \else |
| 384 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 385 |
{xy} |
| 386 |
|
| 387 |
\Hinclude{% |
| 388 |
\ifx \epsfsetgraph\:UnDef \else |
| 389 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 390 |
{epsf} |
| 391 |
|
| 392 |
\Hinclude{% |
| 393 |
\ifx \diagram@help@messages\:UnDef \else |
| 394 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 395 |
{diagrams} |
| 396 |
|
| 397 |
\Hinclude{% |
| 398 |
\ifx \figvisu\:UnDef \else |
| 399 |
\no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 400 |
{fig4tex} |
| 401 |
|
| 402 |
\Hinclude{|<pctex table 4ht|>} |
| 403 |
{pctable} |
| 404 |
\Hinclude{% |
| 405 |
\:CheckOption{xhtml}\if:Option |<xhtml.4ht|>\fi} |
| 406 |
{xhtml} |
| 407 |
\Hinclude{\:CheckOption{#1} |
| 408 |
\if:Option\else \:CheckOption{ShowFont}\fi |
| 409 |
\if:Option\else \:CheckOption{frames-}\fi |
| 410 |
\if:Option\else \:CheckOption{frames}\fi |
| 411 |
\if:Option\else \:CheckOption{image-maps}\fi |
| 412 |
\if:Option\else \:CheckOption{java}\fi |
| 413 |
\if:Option\else \:CheckOption{javascript}\fi |
| 414 |
\if:Option \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi} |
| 415 |
{th4} |
| 416 |
\Hinclude{\ifx \sethebrew\:UnDef\else \ifx \ArabTeX\:UnDef\else |
| 417 |
\no:dupl{#1}{\expand:after{\input hebtex.4ht}}\fi \fi} |
| 418 |
{hebtex} |
| 419 |
>|empty>> |
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
\<pctex table 4ht\><<< |
| 424 |
\ifx \BeginTable\:UnDef \else\ifx \EndTable\:UnDef \else |
| 425 |
\expandafter\ifx \csname !ttBeginTable\endcsname\relax\else |
| 426 |
\no:dupl{#1}{\input #1.4ht}% |
| 427 |
\fi\fi\fi |
| 428 |
>|empty>> |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
>>> |
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
{\tt \string\EXIST} is needed for styles/classes not coming from |
| 438 |
tex4ht-4ht, e.g., for adding cases to {\tt\string\exit:ifnot}. |
| 439 |
|
| 440 |
|
| 441 |
\input tex4ht-cpright % needed for this generation: |
| 442 |
|
| 443 |
\<\mkfilename\><<< |
| 444 |
% \def\HTML{...} \def\CONFIG{...} \def\MAKETITLE{...} \def\EXIST{...} |
| 445 |
% \def\OPTIONS{...} \def\PREAMBLE{...} |
| 446 |
% |
| 447 |
% Compile this file with the command `xhlatex |mkfilename', |
| 448 |
% and read the instructions at mktex4ht.html => index => mktex4ht. |
| 449 |
% |
| 450 |
% The compilation needs the files ProTex.sty & AlProTex.sty from |
| 451 |
% http://ctan.org/pkg/protex |
| 452 |
% |
| 453 |
% This file is designed for machines--not human beings! You |
| 454 |
% are strongly advised not to look at the code which follows |
| 455 |
% the copyright notice. |
| 456 |
% |
| 457 |
% |mkfilename (|version), generated from |jobname.4ht |
| 458 |
% Copyright 2009-2022 TeX Users Group |
| 459 |
% Copyright 1997-2009 Eitan M. Gurari |
| 460 |
|<TeX4ht copywrite|> |
| 461 |
|
| 462 |
|<list of info files|> |
| 463 |
|
| 464 |
\openin15=ProTex.sty \ifeof15 |
| 465 |
\immediate\write16{--- Needs ProTex.sty \& AlProTex.sty |
| 466 |
from http://ctan.org/pkg/protex --} |
| 467 |
\fi \closein15 |
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
\edef\RecallCats{\catcode`\noexpand\^=\the\catcode`\^} \catcode`\^=7 |
| 472 |
\catcode`\%=12 \catcode`\!=14 \catcode`\^^M=13 \catcode`\:=11 |
| 473 |
\def\lit#1{ |
| 474 |
\expandafter\ifx\csname ! |
| 475 |
cw:)\clearcode:id P:configure \HTML\space #1\endcsname\relax ! |
| 476 |
! % no code for <configure \HTML\space #1> ! |
| 477 |
\else ! |
| 478 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 479 |
\space\space\space\space\space\space\space\space! |
| 480 |
\space\space\space\space\space\space\space\space! |
| 481 |
\string\ConfigureHinput\string{#1\string} |
| 482 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 483 |
\space\space\space\space \<configure \HTML\space #1\> |
| 484 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 485 |
\space\space |
| 486 |
\string\endinput\string\empty\string\empty\string\empty\string\empty ! |
| 487 |
\string\empty\string\empty |
| 488 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 489 |
\fi ! |
| 490 |
} |
| 491 |
\catcode`\%=14 \catcode`\!=12 |
| 492 |
|
| 493 |
\def\GetLit#1,{\def\HTML{#1}\ifx \HTML\empty |
| 494 |
\def\GetLit##1?<par del?>{}\else% |
| 495 |
\section{Container of \HTML.4ht} |
| 496 |
\expandafter\ifx\csname YES\HTML\endcsname\relax\else |
| 497 |
\<\HTML\><<< |
| 498 |
\string\exit:ifnot{\csname YES\HTML\endcsname} |
| 499 |
>>|empty> |
| 500 |
\fi |
| 501 |
\<\HTML\><<< |
| 502 |
|litstyles |
| 503 |
\ifx \EXIST\UnDef\else \expandafter\moreLit\EXIST,,//\fi |
| 504 |
\string\endinput |
| 505 |
>>|empty> \LitFile \fi \GetLit} |
| 506 |
\catcode`\^^M=5 \RecallCats |
| 507 |
|
| 508 |
\def\moreLit#1,{\if !#1!\expandafter\SofLit\else |
| 509 |
\lit{#1}\expandafter\moreLit\fi} |
| 510 |
\def\moreLitRow#1,{\if !#1!\expandafter\SofLit\else |
| 511 |
\LitRow{#1}\expandafter\moreLitRow\fi} |
| 512 |
\def\SofLit#1//{} |
| 513 |
|
| 514 |
\def\LitFile{\OutputCode[4ht]\<\HTML\>} |
| 515 |
|
| 516 |
\def\cleancom#1,#2(){#1} |
| 517 |
\def\LitRow#1{% |
| 518 |
\let\next=\LitCols \def\RowTp{#1}% |
| 519 |
\HCode{<tr align="center"><td align="left">}\ifx \RowTp\empty \else |
| 520 |
\edef\temp{\noexpand\Link[\noexpand\cleancom |
| 521 |
\RefFile{f-#1}}\temp,()]{}{b-#1}#1\EndLink \fi \HCode{</td>}% |
| 522 |
\HAssign\curf=0 |
| 523 |
\ifx \HTML\:UnDef |
| 524 |
\expandafter\LitCols\infosources,,?<par del?> |
| 525 |
\else \expandafter\LitCols\HTML,,?<par del?>\fi |
| 526 |
\HCode{</tr>}% |
| 527 |
} |
| 528 |
\def\LitCols#1,{\def\temp{#1}\ifx \temp\empty |
| 529 |
\def\next##1?<par del?>{}\else% |
| 530 |
\ifx \RowTp\empty \HCode{<th>}\Vth#1:\HCode{</th>}\else |
| 531 |
\HCode{<td>}\expandafter\ifx\csname |
| 532 |
cw:)\clearcode:id P:configure #1 \RowTp\endcsname\relax |
| 533 |
|<non-code pointer|>\else \LinkPort\<configure #1 \RowTp\>*\EndLink |
| 534 |
\expandafter\edef\csname YES#1\endcsname{% |
| 535 |
\expandafter\ifx \csname YES#1\endcsname\relax\else |
| 536 |
\csname YES#1\endcsname,\%\Hnewline\fi \RowTp}% |
| 537 |
\fi |
| 538 |
\HCode{</td>}\fi |
| 539 |
\fi |
| 540 |
\next } |
| 541 |
|
| 542 |
\def\Vth#1{\if #1:\else #1\expandafter\VTH\fi} |
| 543 |
\def\VTH#1{\if #1:\else \HCode{<br />}#1\expandafter\VTH\fi} |
| 544 |
|
| 545 |
\expandafter\def\csname html4hook\endcsname{% |
| 546 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 547 |
% for bootstrapping, when html4.4ht is not available % |
| 548 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 549 |
\ifx \b:HEAD\UnDef |
| 550 |
% \let\tbl:XV=\empty |
| 551 |
\let\:Hii=\empty |
| 552 |
\let\End:Hii=\empty |
| 553 |
\let\:SPAN=\empty |
| 554 |
% |
| 555 |
\expandafter\def\csname html4hook\endcsname{% |
| 556 |
\csname newcount\endcsname\pageno |
| 557 |
\Configure{HtmlPar}{}{}{}{} |
| 558 |
\Configure{HEAD}{}{} |
| 559 |
\Configure{CssFile}{}{} |
| 560 |
\Configure{HTML}{}{} |
| 561 |
\Configure{TITLE}{}{} |
| 562 |
\Configure{BODY}{}{} |
| 563 |
\Configure{Css}{foo} |
| 564 |
\Configure{TITLE+}{} |
| 565 |
\Configure{HPageTITLE+}{} |
| 566 |
} \csname html4hook\endcsname |
| 567 |
\fi |
| 568 |
} |
| 569 |
\catcode`\:=12 |
| 570 |
|
| 571 |
\documentclass{book} |
| 572 |
\ifx \HCode\UnDef |
| 573 |
\ifx\OPTIONS\UnDef |
| 574 |
\toks0={xhtml,3,sections+}% |
| 575 |
\else |
| 576 |
\toks0={\OPTIONS}% |
| 577 |
\fi |
| 578 |
\def\temp{\usepackage[\the\toks0]{tex4ht}} |
| 579 |
\expandafter\temp |
| 580 |
\fi |
| 581 |
\Configure{ProTex}{4ht,<<<>>|empty>,||,title,list,[[]]} |
| 582 |
\csname PREAMBLE\endcsname |
| 583 |
\begin{document} |
| 584 |
|
| 585 |
\ifx \OPTIONS\UnDef |
| 586 |
\TocAt{section,subsection} |
| 587 |
\fi |
| 588 |
|
| 589 |
\title{TeX4ht: \ifx\HTML\UnDef Seeded Hooks\else Configuration Files\fi} |
| 590 |
\ifx \MAKETITLE\UnDef \else \expandafter\MAKETITLE\fi |
| 591 |
|
| 592 |
\maketitle |
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
\noindent |
| 597 |
[\HPage{index} |
| 598 |
\HCode{<table>}\LitRow{}|hookstyles |
| 599 |
\ifx \EXIST\UnDef\else \expandafter\moreLitRow\EXIST,,//\fi |
| 600 |
\ifvmode \IgnorePar\fi\EndP \HCode{</table>} |
| 601 |
\IgnoreIndent\par\rightline{[\ExitHPage{}]} \EndHPage{}] |
| 602 |
\ifx \HTML\UnDef |
| 603 |
\par |
| 604 |
\let\LitFile=\empty |
| 605 |
\def\HTML{replace-with-file-name} |
| 606 |
\immediate\write16{-- Missing definition for \noexpand\HTML --} |
| 607 |
See {\tt index => mktex4ht} for directions on how to create |
| 608 |
configuration files with `mktex4t.4ht'.\par |
| 609 |
WARNING: Missing definition for {\tt \string\HTML } |
| 610 |
\else |
| 611 |
[\HPage{the 4ht files} |
| 612 |
\def\Comma{\def\Comma{, }} |
| 613 |
\def\LitFiles#1,{\def\temp{#1}\ifx \temp\empty |
| 614 |
\def\LitFiles##1?<par del?>{}\else |
| 615 |
\Comma\Link[#1.4ht]{}{}#1.4ht\EndLink \fi |
| 616 |
\LitFiles } |
| 617 |
\expandafter\LitFiles\HTML,,?<par del?> |
| 618 |
\par\ShowPar[\ExitHPage{}] \EndHPage{}] |
| 619 |
\fi |
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
\ifx \CONFIG\UnDef |
| 624 |
WARNING: Missing definition for {\tt \string\CONFIG } |
| 625 |
\fi |
| 626 |
|
| 627 |
\IgnorePar\EndP |
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
\ifx \CONFIG\UnDef |
| 633 |
\immediate\write16{-- Missing definition for \noexpand\CONFIG --} |
| 634 |
\else |
| 635 |
\def\temp{\input \CONFIG}\expandafter\temp |
| 636 |
\fi |
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
\tableofcontents |
| 641 |
|
| 642 |
\chapter{Utilities} |
| 643 |
|
| 644 |
|<set Hinclude|> |
| 645 |
|
| 646 |
%% begin comment 29/09/2016 (dg) |
| 647 |
%% file \jobname.4ct does not exist on first run; |
| 648 |
%% it should be available on second and third run |
| 649 |
%% end |
| 650 |
\newif\ifFirstPass\FirstPassfalse |
| 651 |
\openin15=\Jobname.4ct |
| 652 |
\ifeof15 |
| 653 |
\FirstPasstrue |
| 654 |
\message{^^J warning *********** FIRST PASS **************************** ^^J} |
| 655 |
\fi |
| 656 |
\closein15 |
| 657 |
|
| 658 |
|
| 659 |
\chapter{Containers for the Configurations} |
| 660 |
|
| 661 |
%% |
| 662 |
%% Skip processing lit entries on first pass |
| 663 |
%% |
| 664 |
|
| 665 |
\ifFirstPass\else |
| 666 |
|
| 667 |
\catcode`\:=11 |
| 668 |
\expandafter\GetLit\HTML,,,?<par del?>\relax |
| 669 |
\catcode`\:=12 |
| 670 |
|
| 671 |
\fi |
| 672 |
|
| 673 |
|<include info4ht|> |
| 674 |
|
| 675 |
|
| 676 |
\end{document} |
| 677 |
\endinput |
| 678 |
>>> |
| 679 |
|
| 680 |
\<include info4ht\><<< |
| 681 |
\bgroup |
| 682 |
\catcode`\:=11 \catcode`\@=0 \catcode`\\=11 @relax |
| 683 |
|
| 684 |
@def@infoIVht[#1]#2//{@bgroup |
| 685 |
@no:catcodes0{255}{11}% |
| 686 |
@no:catcodes{47}{47}{12}% / |
| 687 |
@def@infoIVht##1\ConfigureHinput{@egroup |
| 688 |
@let@ConfigureHinput=@ConfigureHINPUT @ConfigureHinput}% |
| 689 |
@infoIVht } |
| 690 |
|
| 691 |
@def@ConfigureHINPUT#1{@bgroup |
| 692 |
@no:catcodes0{255}{11}% |
| 693 |
@no:catcodes{47}{47}{12}% / |
| 694 |
@no:catcodes{13}{13}{13}% ^^M |
| 695 |
@no:catcodes{32}{32}{13}% ^^M |
| 696 |
@def@ConfigureHinput##1//##2//##3\ifx\infoIVht##4\endinput{@egroup |
| 697 |
@HPage[f@curf-#1]{#1}% |
| 698 |
@rightline{@Link{b-#1}{}up@EndLink}@ShowPar@par@textbf{#1}@par |
| 699 |
@verbshow{##3}@rightline{@Link{b-#1}{}up@EndLink}% |
| 700 |
@EndHPage{}@par@ShowPar}@ConfigureHinput} |
| 701 |
|
| 702 |
@bgroup |
| 703 |
@catcode `[= 1 @catcode`]=2 @catcode `@{=12 @catcode `@}=12 |
| 704 |
@catcode`@\=12 |
| 705 |
@long@gdef@verbshow#1[@begin[verbatim]#1\end{verbatim}] |
| 706 |
@egroup |
| 707 |
|
| 708 |
@catcode`@\=0 \catcode`\:=12 \catcode`\@=12 \relax |
| 709 |
|
| 710 |
|
| 711 |
\def\curf{} \input info4ht.4ht |
| 712 |
\ifx \HTML\empty |
| 713 |
\HAssign\curf=0 |
| 714 |
\def\nextinfo#1,{\if !#1!\def\nextinfo##1//{} |
| 715 |
\else \HAdvance\curf by 1 |
| 716 |
\input #1.4ht \expandafter\nextinfo |
| 717 |
\fi |
| 718 |
} |
| 719 |
\expandafter\nextinfo\infofiles,,//% |
| 720 |
\fi |
| 721 |
\egroup |
| 722 |
|
| 723 |
>>> |
| 724 |
|
| 725 |
\<list of info files\><<< |
| 726 |
\def\infofiles{infoht4,infomml} |
| 727 |
\def\infosources{html4,mathml} |
| 728 |
>>> |
| 729 |
|
| 730 |
\<non-code pointer\><<< |
| 731 |
\HAdvance\curf by 1\relax |
| 732 |
\expandafter\ifx \csname cw:f\curf-\RowTp(L \endcsname\relax |
| 733 |
-\else\Link[\csname cw:f\curf-\RowTp(L \endcsname]{}{}*\EndLink |
| 734 |
\fi |
| 735 |
>>> |
| 736 |
|
| 737 |
|
| 738 |
%% |
| 739 |
%% set a hook for skipping mktex4ht.4ht generation from tex4ht-4ht.tex |
| 740 |
%% The file should be generated when cond4ht.4ht is processed, |
| 741 |
%% not when tex4ht-4ht. |
| 742 |
%% |
| 743 |
%% |
| 744 |
\csname Skipmkfilename\endcsname |
| 745 |
\expandafter\OutputCodE\expandafter\<\mkfilename\> |
| 746 |
|
| 747 |
\csname BYE\endcsname |
| 748 |
\endinput |
| 749 |
|
| 750 |
>>>> |
| 751 |
|
| 752 |
\<TeX4ht copywrite\><<<< |
| 753 |
% |
| 754 |
% This work may be distributed and/or modified under the |
| 755 |
% conditions of the LaTeX Project Public License, either |
| 756 |
% version 1.3c of this license or (at your option) any |
| 757 |
% later version. The latest version of this license is in |
| 758 |
% http://www.latex-project.org/lppl.txt |
| 759 |
% and version 1.3c or later is part of all distributions |
| 760 |
% of LaTeX version 2005/12/01 or later. |
| 761 |
% |
| 762 |
% This work has the LPPL maintenance status "maintained". |
| 763 |
% |
| 764 |
% The Current Maintainer of this work |
| 765 |
% is the TeX4ht Project <http://tug.org/tex4ht>. |
| 766 |
% |
| 767 |
% If you modify this program, changing the |
| 768 |
% version identification would be appreciated. |
| 769 |
\immediate\write-1{version ?version} |
| 770 |
>>>> |
| 771 |
|
| 772 |
\<par del\><<<< |
| 773 |
!*??: >>>> |
| 774 |
|
| 775 |
|
| 776 |
\OutputCodE\<cond4ht.4ht\> |
| 777 |
|
| 778 |
\immediate\write16{---------------------------------} |
| 779 |
\immediate\write16{--- needs --- tex cond4ht.4ht ---} |
| 780 |
\immediate\write16{---------------------------------} |
| 781 |
|
| 782 |
\bye |