| 1 |
% $Id: tex4ht-tei.tex 768 2020-07-10 13:13:51Z michal_h21 $ |
| 2 |
% compile 3 times: latex tex4ht-tei |
| 3 |
% or xhlatex tex4ht-tei "html,3,sections+" |
| 4 |
% |
| 5 |
% Copyright 2009-2019 TeX Users Group |
| 6 |
% Copyright 2000-2009 Eitan M. Gurari |
| 7 |
% Released under LPPL 1.3c+. |
| 8 |
% See tex4ht-cpright.tex for license text. |
| 9 |
|
| 10 |
%%%%%%%%%%%%%%%%%% load style files %%%%%%%%%%%%%%%%%%%%%%%%%% |
| 11 |
|
| 12 |
\ifx \HTML\UnDef |
| 13 |
\def\HTML{tei,tei-mml,tei-mmltei,tei-math} |
| 14 |
\def\CONFIG{\jobname} |
| 15 |
\def\MAKETITLE{\title{Source for TEI}% |
| 16 |
\author{Eitan M. Gurari \& Sebastian Rahtz}} |
| 17 |
\def\next{\input mktex4ht.4ht \endinput} |
| 18 |
\expandafter\next |
| 19 |
\fi |
| 20 |
|
| 21 |
\input{common.tex} |
| 22 |
\input{tex4ht-cpright.tex} |
| 23 |
|
| 24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 25 |
\chapter{File Organization} |
| 26 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 27 |
|
| 28 |
\<tei\><<< |
| 29 |
% tei.4ht (|version), generated from |jobname.tex |
| 30 |
% Copyright 2009-2019 TeX Users Group |
| 31 |
% Copyright |CopyYear.2000. Eitan M. Gurari |
| 32 |
|<TeX4ht copywrite|> |
| 33 |
>>> |
| 34 |
|
| 35 |
\<configure tei tex4ht\><<< |
| 36 |
\if:latex |<Hinclude latex|> |
| 37 |
\else |<Hinclude plain|> \fi |
| 38 |
>>> |
| 39 |
|
| 40 |
\<configure tei plain\><<< |
| 41 |
|<Hinclude plain lib|> |
| 42 |
|<Hinclude plain + latex lib|> |
| 43 |
>>> |
| 44 |
|
| 45 |
\<configure tei latex\><<< |
| 46 |
|<Hinclude latex lib|> |
| 47 |
|<Hinclude plain + latex lib|> |
| 48 |
>>> |
| 49 |
|
| 50 |
\<configure tei Preamble\><<< |
| 51 |
\Configure{ext}{xml} |
| 52 |
\edef\Preamble{\Preamble,refcaption} |
| 53 |
>>> |
| 54 |
|
| 55 |
\<tei-mml\><<< |
| 56 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 57 |
% tei-mml.4ht (|version), generated from |jobname.tex |
| 58 |
% Copyright (C) |CopyYear.2000. Eitan M. Gurari |
| 59 |
|<TeX4ht copywrite|> |
| 60 |
>>> |
| 61 |
|
| 62 |
|
| 63 |
\<tei-math\><<< |
| 64 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 65 |
% tei-math.4ht (|version), generated from |jobname.tex |
| 66 |
% Copyright (C) |CopyYear.2000. Eitan M. Gurari |
| 67 |
|<TeX4ht copywrite|> |
| 68 |
>>> |
| 69 |
|
| 70 |
|
| 71 |
\<tei-mmltei\><<< |
| 72 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 73 |
% tei-mmltei.4ht (|version), generated from |jobname.tex |
| 74 |
% Copyright (C) |CopyYear.2000. Eitan M. Gurari |
| 75 |
|<TeX4ht copywrite|> |
| 76 |
>>> |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 81 |
\chapter{Origin of Hooks} |
| 82 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 83 |
|
| 84 |
%%%%%%%%%%%%%%%%%% |
| 85 |
\section{tex4ht} |
| 86 |
%%%%%%%%%%%%%%%%%% |
| 87 |
|
| 88 |
\<configure tei tex4ht\><<< |
| 89 |
|<tex4ht wrapper|> |
| 90 |
|<tex4ht paragraphs|> |
| 91 |
|<tex4ht cross-linking|> |
| 92 |
|<tex4ht math|> |
| 93 |
>>> |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
%%%%%%%%%%%%%%% |
| 98 |
\section{latex} |
| 99 |
%%%%%%%%%%%%%%% |
| 100 |
|
| 101 |
\<configure tei latex\><<< |
| 102 |
|<special latex environments|> |
| 103 |
|<revised TITLE for latex|> |
| 104 |
|<latex environments|> |
| 105 |
|<latex lists|> |
| 106 |
|<latex tables|> |
| 107 |
|<latex env|> |
| 108 |
|<latex,plain accents|> |
| 109 |
|<latex accents|> |
| 110 |
|<latex math|> |
| 111 |
|<obey lines|> |
| 112 |
|<latex etc|> |
| 113 |
>>> |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
%%%%%%%%%%%%%%% |
| 119 |
\section{plain} |
| 120 |
%%%%%%%%%%%%%%% |
| 121 |
|
| 122 |
\<configure tei plain\><<< |
| 123 |
|<latex,plain accents|> |
| 124 |
>>> |
| 125 |
|
| 126 |
|
| 127 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 128 |
\section{article, report, book} |
| 129 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 130 |
|
| 131 |
\<configure tei article\><<< |
| 132 |
|<article,report,book utilities|> |
| 133 |
|<article,report maketitle|> |
| 134 |
|<article sections|> |
| 135 |
|<article,report,book lists|> |
| 136 |
|<article,report,book figures|> |
| 137 |
|<article tocs|> |
| 138 |
|<article,report|> |
| 139 |
>>> |
| 140 |
|
| 141 |
|
| 142 |
\<configure tei report\><<< |
| 143 |
|<article,report,book utilities|> |
| 144 |
|<article,report maketitle|> |
| 145 |
|<article,report,book lists|> |
| 146 |
|<article,report,book figures|> |
| 147 |
|<report,book tocs|> |
| 148 |
|<article,report|> |
| 149 |
>>> |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
\<configure tei book\><<< |
| 154 |
|<article,report,book utilities|> |
| 155 |
|<book maketitle|> |
| 156 |
|<article,report,book lists|> |
| 157 |
|<article,report,book figures|> |
| 158 |
|<report,book tocs|> |
| 159 |
>>> |
| 160 |
|
| 161 |
|
| 162 |
\<configure tei amsart\><<< |
| 163 |
|<sectioning utilities|> |
| 164 |
|<article,report maketitle|> |
| 165 |
|<ams article,report maketitle|> |
| 166 |
|<ams art,proc,book|> |
| 167 |
>>> |
| 168 |
|
| 169 |
|
| 170 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 171 |
\section{TUG Boat/Proc} |
| 172 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 173 |
|
| 174 |
|
| 175 |
\<configure tei ltugboat\><<< |
| 176 |
\Configure{address} |
| 177 |
{\HCode{<byline rend="address">}} |
| 178 |
{\HCode{</byline>}} |
| 179 |
\Configure{netaddress} |
| 180 |
{\HCode{<byline rend="netaddress">}} |
| 181 |
{\HCode{</byline>}} |
| 182 |
\Configure{PersonalURL} |
| 183 |
{\HCode{<byline rend="PersonalURL">}} |
| 184 |
{\HCode{</byline>}} |
| 185 |
>>> |
| 186 |
|
| 187 |
|
| 188 |
\<configure tei ltugproc\><<< |
| 189 |
|<ltugproc maketitle|> |
| 190 |
\Configure{thanks author date and}{}{} |
| 191 |
{|<tag proc author|>\HCode{<docAuthor>}} |
| 192 |
{\HCode{</docAuthor>}} |
| 193 |
{\HCode{<docDate>}} {\HCode{</docDate>}} |
| 194 |
{\HCode{<!--and-->}} |
| 195 |
{} |
| 196 |
>>> |
| 197 |
|
| 198 |
\<tag proc author\><<< |
| 199 |
{\Configure{thanks author date and}{}{}{}{}{}{}{}{}% |
| 200 |
|<disable latex fonts|>|<proc title @author|>\Tag{)author)}{\@author}}% |
| 201 |
>>> |
| 202 |
|
| 203 |
\<proc title @author\><<< |
| 204 |
\count@\authornumber |
| 205 |
\@tempcnta0 |
| 206 |
\let\:temp\relax |
| 207 |
\let\@author\empty |
| 208 |
\loop |
| 209 |
\ifnum\count@>0 |
| 210 |
\advance\@tempcnta by \@ne |
| 211 |
\edef\@author{\@author \ifx\@author\empty\else, \fi |
| 212 |
\:temp{\number\@tempcnta}}% |
| 213 |
\advance\count@ by \m@ne |
| 214 |
\repeat |
| 215 |
\let\ignorespaces\empty |
| 216 |
\let\unskip\empty |
| 217 |
\def\:temp##1{\csname theauthor##1\endcsname}% |
| 218 |
>>> |
| 219 |
|
| 220 |
|
| 221 |
\<configure tei ltugproc\><<< |
| 222 |
\ConfigureEnv{abstract} |
| 223 |
{}{} {}{} |
| 224 |
\Configure{abstract} |
| 225 |
{\bgroup |
| 226 |
\HCode{<epigraph rend="abstract"><p>}\IgnoreIndent\par} |
| 227 |
{\ifvmode\IgnorePar\fi \EndP\HCode{</p></epigraph>}\egroup} |
| 228 |
>>> |
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 235 |
\chapter{Configurations} |
| 236 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 237 |
|
| 238 |
|
| 239 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 240 |
\section{Front and Back Matter} |
| 241 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
\begin{verbatim} |
| 246 |
<TEI.2> |
| 247 |
<teiHeader> [ TEI Header information ] </teiHeader> |
| 248 |
<text> |
| 249 |
<front> [ front matter ... ] </front> |
| 250 |
<body> [ body of text ... ] </body> |
| 251 |
<back> [ back matter ... ] </back> |
| 252 |
</text> |
| 253 |
</TEI.2> |
| 254 |
\end{verbatim} |
| 255 |
|
| 256 |
The front and back elements are optional. |
| 257 |
|
| 258 |
\<tex4ht wrapper\><<< |
| 259 |
\Configure{HTML} |
| 260 |
{\HCode{<TEI.2>}} |
| 261 |
{\HCode{</TEI.2>}} |
| 262 |
\Configure{HEAD} |
| 263 |
{\HCode{<teiHeader type="text" status="new"><fileDesc>}} |
| 264 |
{\HCode{</fileDesc>\Hnewline |
| 265 |
<revisionDesc><list |
| 266 |
type="simple"><item></item></list></revisionDesc>\Hnewline |
| 267 |
</teiHeader>}} |
| 268 |
\Configure{TITLE} |
| 269 |
{\HCode{<titleStmt><title></title></titleStmt>\Hnewline}} |
| 270 |
{} |
| 271 |
\Configure{TITLE+} |
| 272 |
{\HCode{<publicationStmt> <p></p> </publicationStmt>\Hnewline |
| 273 |
<sourceDesc><p>\FileName\space from \jobname.tex |
| 274 |
(TeX4ht)</p></sourceDesc>\Hnewline |
| 275 |
}} |
| 276 |
>>> |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
\<configure tei-mmltei tex4ht\><<< |
| 281 |
\Configure{HTML} |
| 282 |
{\HCode{<TEI.2>}|<xsl elements|>} |
| 283 |
{\HCode{</TEI.2>}} |
| 284 |
>>> |
| 285 |
|
| 286 |
|
| 287 |
The \verb+<!--@Basename=\jobname-->+ is for clean-tei.xsl. |
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
\<revised TITLE for latex\><<< |
| 292 |
\Configure{TITLE} |
| 293 |
{\HCode{<titleStmt>\Hnewline |
| 294 |
<title>\ifTag{TITLE+}{\LikeRef{TITLE+}}{}</title>\Hnewline |
| 295 |
<author>\ifTag{)author)}{\LikeRef{)author)}}{}</author>\Hnewline |
| 296 |
</titleStmt>\Hnewline |
| 297 |
}} |
| 298 |
{}% |
| 299 |
>>> |
| 300 |
|
| 301 |
\<tag author\><<< |
| 302 |
{\Configure{thanks author date and}{}{}{}{}{}{}{}{}% |
| 303 |
|<disable latex fonts|>\Tag{)author)}{\@author}}% |
| 304 |
>>> |
| 305 |
|
| 306 |
|
| 307 |
\<tag title\><<< |
| 308 |
{\Configure{maketitle}{}{}{}{}{}{}{}{}% |
| 309 |
|<disable latex fonts|>\Tag{TITLE+}{\@title}}% |
| 310 |
>>> |
| 311 |
|
| 312 |
% \let\thanks=\:gobble |
| 313 |
% |
| 314 |
% \def\TeX{TeX}% |
| 315 |
%\def\gobble:font##1##2{##2}\:TITLE: |
| 316 |
|
| 317 |
\<disable latex fonts\><<< |
| 318 |
\let\leavevmode=\empty \let\not@math@alphabet=\:gobbleII |
| 319 |
\def\text@command##1{##1}\let\selectfont=\empty \let\\=\empty |
| 320 |
\no:fonts \def\check@icl ##1\check@icr{}% |
| 321 |
\:TITLE: \a:NoSection |
| 322 |
>>> |
| 323 |
|
| 324 |
\<configure tei latex\><<< |
| 325 |
\Configure{@TITLE}{\def\LaTeX{LaTeX}\let\fontencoding=\:gobble |
| 326 |
\let\fontfamily=\:gobble \let\fontseries=\:gobble |
| 327 |
\let\fontshape=\:gobble \let\usefont=\:gobbleIV } |
| 328 |
>>> |
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
\<special latex environments\><<< |
| 338 |
\Configure{InsertTitle}{\let\label=\lb:l |
| 339 |
\let\ref=\o:ref \Configure{ref}{}{}{}} |
| 340 |
\Configure{AfterTitle}{\let\index=\:index |
| 341 |
\let\ref=\:ref \let\label=\lb:l } |
| 342 |
\Configure{NoSection} |
| 343 |
{\let\sv:index=\index \let\sv:label=\label \let\sv:ref=\ref |
| 344 |
\let\sv:newline=\newline \def\newline{ }% |
| 345 |
\let\sv:setfontsize=\@setfontsize \let\@setfontsize=\:gobbleIII |
| 346 |
\let\index=\@gobble \let\label=\@gobble \let\ref=\@gobble |
| 347 |
} |
| 348 |
{\let\index=\sv:index \let\label=\sv:label \let\ref=\sv:ref |
| 349 |
\let\newline=\sv:newline \let\@setfontsize=\sv:setfontsize |
| 350 |
} |
| 351 |
>>> |
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
\<book maketitle\><<< |
| 356 |
\Configure{maketitle} |
| 357 |
{|<tag title|>\HCode{<titlePage>}} |
| 358 |
{\HCode{</titlePage>}} |
| 359 |
{\HCode{<title>}} |
| 360 |
{\HCode{</title>}} |
| 361 |
\Configure{thanks author date and}{}{} |
| 362 |
{|<tag author|>\HCode{<author>}} |
| 363 |
{\HCode{</author>}} |
| 364 |
{\HCode{<date>}} {\HCode{</date>}} |
| 365 |
{\HCode{<!--and-->}} |
| 366 |
{} |
| 367 |
>>> |
| 368 |
|
| 369 |
\<article,report maketitle\><<< |
| 370 |
\Configure{maketitle} |
| 371 |
{|<tag title|>\HCode{<titlePage>}} |
| 372 |
{\HCode{</titlePage>}} |
| 373 |
{\HCode{<docTitle><titlePart type="main">}} |
| 374 |
{\HCode{</titlePart></docTitle>}} |
| 375 |
\Configure{thanks author date and}{}{} |
| 376 |
{|<tag author|>\HCode{<docAuthor>}} |
| 377 |
{\HCode{</docAuthor>}} |
| 378 |
{\HCode{<docDate>}} {\HCode{</docDate>}} |
| 379 |
{\HCode{<!--and-->}} |
| 380 |
{} |
| 381 |
>>> |
| 382 |
|
| 383 |
|
| 384 |
\<tex4ht wrapper\><<< |
| 385 |
\Configure{BODY} |
| 386 |
{\ifTag{TITLE+}% |
| 387 |
{\HCode{<text><front>}\PushStack\text:stack{front}}% |
| 388 |
{\HCode{<text><body>}\PushStack\text:stack{body}\ShowPar |
| 389 |
\csname par\endcsname}% |
| 390 |
} |
| 391 |
{\IgnorePar\EndP \PopStack\text:stack\:temp \def\:tempa{front}% |
| 392 |
\HCode{</\:temp>\ifx\:temp\:tempa <body><p></p></body>\fi</text>}} |
| 393 |
>>> |
| 394 |
|
| 395 |
\<ams article,report maketitle\><<< |
| 396 |
\Configure{authors} |
| 397 |
{\HCode{<docAuthor>}} {\HCode{</docAuthor>}} |
| 398 |
\Configure{setdate} |
| 399 |
{\HCode{<docDate>}} {\HCode{</docDate>}} |
| 400 |
\Configure{thanks author date and}{}{} |
| 401 |
{|<tag author|>\HCode{<docAuthor>}} |
| 402 |
{\HCode{</docAuthor>}} |
| 403 |
{\HCode{<date>}} {\HCode{</date>}} |
| 404 |
{\HCode{<!--and-->}} |
| 405 |
{} |
| 406 |
>>> |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
\<ltugproc maketitle\><<< |
| 412 |
\Configure{maketitle} |
| 413 |
{|<tag title|>\HCode{<titlePage>}% |
| 414 |
\bgroup \Configure{centerline} |
| 415 |
{\HCode{<byline rend="centerline">}} |
| 416 |
{\HCode{</byline>}} |
| 417 |
} |
| 418 |
{\egroup \HCode{</titlePage>}} |
| 419 |
{\HCode{<docTitle>}} |
| 420 |
{\HCode{</docTitle>}} |
| 421 |
>>> |
| 422 |
|
| 423 |
%%%%%%%%%%%%%%%%%% |
| 424 |
\subsection{DTD's} |
| 425 |
%%%%%%%%%%%%%%%%%% |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
\<configure tei Preamble\><<< |
| 432 |
\Configure{PROLOG}{VERSION,DOCTYPE,*XML-STYLESHEET} |
| 433 |
\:CheckOption{no-DOCTYPE} \if:Option |
| 434 |
\Configure{PROLOG}{VERSION,*XML-STYLESHEET} |
| 435 |
\fi |
| 436 |
>>> |
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
\<configure tei tex4ht\><<< |
| 441 |
\Configure{VERSION} |
| 442 |
{\HCode{<?xml version="1.0" encoding="utf-8"?>\Hnewline}} |
| 443 |
\Configure{VERSION} |
| 444 |
{\HCode{<?xml version="1.0"?>\Hnewline}} |
| 445 |
\Configure{DOCTYPE} |
| 446 |
{\HCode{<!DOCTYPE TEI.2 [|<tei dtd tex4ht|>]>}} |
| 447 |
>>> |
| 448 |
|
| 449 |
\<configure tei-mml tex4ht\><<< |
| 450 |
\Configure{VERSION} |
| 451 |
{\HCode{<?xml version="1.0"?>\Hnewline}} |
| 452 |
\Configure{VERSION} |
| 453 |
{\HCode{<?xml version="1.0"?>\Hnewline}} |
| 454 |
\Configure{DOCTYPE} |
| 455 |
{\HCode{<!DOCTYPE TEI.2 [\Hnewline|<tei-mml dtd tex4ht|>]>\Hnewline}} |
| 456 |
>>> |
| 457 |
|
| 458 |
\<configure tei-mmltei tex4ht\><<< |
| 459 |
\Configure{VERSION} |
| 460 |
{\HCode{<?xml version="1.0"?>\Hnewline}} |
| 461 |
\Configure{VERSION} |
| 462 |
{\HCode{<?xml version="1.0"?>\Hnewline}} |
| 463 |
\Configure{DOCTYPE} |
| 464 |
{\HCode{<!DOCTYPE TEI.2 |<tei-mmltei dtd tex4ht|> >\Hnewline}} |
| 465 |
>>> |
| 466 |
|
| 467 |
|
| 468 |
\<tei dtd tex4ht\><<< |
| 469 |
|<tei dtd|>% |
| 470 |
}\writesixteen{--- file \jobname.ent ---}\HCode{% |
| 471 |
|<tei entities dtd|>% |
| 472 |
>>> |
| 473 |
|
| 474 |
\<tei-mml dtd tex4ht\><<< |
| 475 |
|<tei-mml dtd|>% |
| 476 |
|<tei dtd tex4ht|>% |
| 477 |
|<mathml dtd|>% |
| 478 |
>>> |
| 479 |
|
| 480 |
|
| 481 |
\<tei-mmltei dtd tex4ht\><<< |
| 482 |
SYSTEM "teimml.dtd" [\Hnewline} |
| 483 |
|<xsl entities|>\HCode{% |
| 484 |
] |
| 485 |
>>> |
| 486 |
|
| 487 |
\<tei-mml dtd\><<< |
| 488 |
<!ELEMENT formula (math)>\Hnewline |
| 489 |
>>> |
| 490 |
|
| 491 |
% <!ENTITY \% list.qname "mathml-list">\Hnewline |
| 492 |
|
| 493 |
\<tei dtd\><<< |
| 494 |
<!ENTITY \% TEI.dtd PUBLIC\Hnewline |
| 495 |
"-//TEI//DTD TEI Lite XML ver. 1.3//|<dtd lang|>"\Hnewline |
| 496 |
"teixlite.dtd"> |
| 497 |
\Hnewline \%TEI.dtd; \Hnewline |
| 498 |
>>> |
| 499 |
|
| 500 |
\<mathml dtd\><<< |
| 501 |
<!ENTITY \% mathml.dtd PUBLIC |
| 502 |
"-//W3C//DTD MathML 2.0//|<dtd lang|>"\Hnewline\space\space |
| 503 |
"mathml2.dtd"> |
| 504 |
\Hnewline \%mathml.dtd;\Hnewline |
| 505 |
>>> |
| 506 |
|
| 507 |
|
| 508 |
\<xsl elements\><<< |
| 509 |
\HCode{<!--@entities=}|<xsl entities|>\HCode{-->}% |
| 510 |
>>> |
| 511 |
|
| 512 |
\<tei entities dtd\><<< |
| 513 |
<!ENTITY \% ENT-\jobname.ent SYSTEM "\jobname.ent"> |
| 514 |
\Hnewline \%ENT-\jobname.ent; \Hnewline |
| 515 |
>>> |
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
\<xsl entities\><<< |
| 520 |
\bgroup |
| 521 |
\def\toctei##1##2##3{\HCode{##2\Hnewline}}% |
| 522 |
\no:catcodes{34}{36}{12}\no:catcodes{94}{95}{12}\catcode`\~=12 |
| 523 |
\Configure{tableofcontents} {} {} {}{}{}% |
| 524 |
\:TableOfContents[tei]% |
| 525 |
\egroup |
| 526 |
>>> |
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
Instead of \verb=SYSTEM= earlier we had |
| 531 |
\verb=PUBLIC\Hnewline "-//TEI U5-1995//DTD TEI Lite 1.0 Extensions//|<dtd lang|>"\Hnewline=. |
| 532 |
|
| 533 |
|
| 534 |
\<early Decl\><<< |
| 535 |
\let\:NOTATIONs=\empty |
| 536 |
\def\Decl#1{\edef\:NOTATIONs{\:NOTATIONs#1\Hnewline}} |
| 537 |
>>> |
| 538 |
|
| 539 |
|
| 540 |
\<early xslt Decl\><<< |
| 541 |
\def\Decl#1{\edef\:temp{\the\:tokwrite{\string\doTocEntry |
| 542 |
\string\toc tei{}{#1}{}}}\:temp |
| 543 |
} |
| 544 |
>>> |
| 545 |
|
| 546 |
\<main Decl\><<< |
| 547 |
\def\Decl##1{{\everypar{}% |
| 548 |
\ht:special{t4ht>\jobname.ent}\hbox{\HCode{##1\Hnewline}}% |
| 549 |
\ht:special{t4ht>\FileName}}} |
| 550 |
\Decl{\:NOTATIONs}\let\:NOTATIONs=\:UnDef |
| 551 |
>>> |
| 552 |
|
| 553 |
|
| 554 |
\begin{verbatim} |
| 555 |
> oh yes. I copied the entity declaration into a comment after <TEI.2>, |
| 556 |
> because xsl has no access to the document subset... |
| 557 |
|
| 558 |
Consider this: |
| 559 |
|
| 560 |
<?xml version="1.0"?> |
| 561 |
<!DOCTYPE TEI.2 [ |
| 562 |
<!ELEMENT formula (math)> |
| 563 |
<!ENTITY % TEI.dtd PUBLIC |
| 564 |
"-//TEI//DTD TEI Lite XML ver. 1.3//|<dtd lang|>" |
| 565 |
"teixlite.dtd"> |
| 566 |
%TEI.dtd; |
| 567 |
<!ENTITY % ENT-1-3.ent SYSTEM "1-3.ent"> |
| 568 |
%ENT-1-3.ent; |
| 569 |
<!ENTITY % list.qname "mathml-list"> <!ENTITY % mathml.dtd PUBLIC "-//W3C//DTD \ |
| 570 |
MathML 2.0//|<dtd lang|>" |
| 571 |
"mathml2.dtd"> |
| 572 |
%mathml.dtd; |
| 573 |
]> |
| 574 |
|
| 575 |
|
| 576 |
the entities are read in from an external file via the %ENT-1-3.ent; |
| 577 |
unfortunately such parameter entities do not have to be expanded by |
| 578 |
XML processors, so the file can not get read. xmltex is an example of |
| 579 |
a system which fails to do so... |
| 580 |
|
| 581 |
we need to textually include the entity file, not reference it. |
| 582 |
\end{verbatim} |
| 583 |
|
| 584 |
|
| 585 |
\<configure tei tex4ht\><<< |
| 586 |
\HAssign\ent:cnt = 0 |
| 587 |
\Configure{Preamble} |
| 588 |
{} |
| 589 |
{{\ifdim \lastskip>\z@ \unskip\fi |
| 590 |
\IgnorePar\parindent\z@ \leavevmode}% |
| 591 |
|<main Decl|>% |
| 592 |
} |
| 593 |
|<early Decl|> |
| 594 |
>>> |
| 595 |
|
| 596 |
|
| 597 |
\<configure tei-mmltei tex4ht\><<< |
| 598 |
\Configure{Preamble} |
| 599 |
{} |
| 600 |
{{\ifdim \lastskip>\z@ \unskip\fi |
| 601 |
\IgnorePar\parindent\z@ \leavevmode}% |
| 602 |
} |
| 603 |
|<early xslt Decl|> |
| 604 |
>>> |
| 605 |
|
| 606 |
%%%%%%%%%%%%%%%%%%%% |
| 607 |
\section{Css} |
| 608 |
%%%%%%%%%%%%%%%%%%%% |
| 609 |
|
| 610 |
The following code has been copied from tex4ht-docbook.tex. It provides basic |
| 611 |
support for writing to the CSS file produced by tex4ht. |
| 612 |
|
| 613 |
\<configure tei tex4ht\><<< |
| 614 |
|<cascade style sheets|> |
| 615 |
\Configure{Preamble} |
| 616 |
{|<default cascade style sheets|>} {} |
| 617 |
\Configure{CssFile}{\jobname.css} |
| 618 |
{/* \aa:CssFile\space from \jobname.tex (TeX4ht) */} |
| 619 |
\Configure{Needs}{l. |
| 620 |
\the\inputlineno\space--- needs --- #1 ---} |
| 621 |
\Configure{Needs-}{l. |
| 622 |
\the\inputlineno\space--- needs --- #1 ---} |
| 623 |
>>> |
| 624 |
|
| 625 |
\<default cascade style sheets\><<< |
| 626 |
{\ifdim \lastskip>\z@ \unskip\fi \IgnorePar\parindent\z@ |
| 627 |
\leavevmode}% |
| 628 |
\immediate\write-1{--- file \aa:CssFile\space ---}% |
| 629 |
\ht:special{t4ht>\aa:CssFile}\ht:special{t4ht=\Hnewline /* css.sty */}% |
| 630 |
\ht:special{t4ht<\aa:CssFile}% |
| 631 |
>>> |
| 632 |
|
| 633 |
|
| 634 |
\<cascade style sheets\><<< |
| 635 |
\ScriptCommand{\CssFile}{% |
| 636 |
\immediate\write-1{--- file \aa:CssFile\space ---}% |
| 637 |
\def\FontSize##1##2{\:Context{##1}\ht:special{t4ht;\%##2}\%}% |
| 638 |
\def\FontName##1{\:Context{##1}\ht:special{t4ht;=}}% |
| 639 |
\def\:Context##1{\ht:special{t4ht>\jobname.tmp}##1\ht:special |
| 640 |
{t4ht>\aa:CssFile}}% |
| 641 |
\ht:special{t4ht>\jobname.tmp}\ht:special{t4ht>\aa:CssFile}\bb:CssFile |
| 642 |
\hfil\break\NoFonts}{\EndNoFonts |
| 643 |
\ht:special{t4ht<\aa:CssFile}\ht:special{t4ht<\jobname.tmp}} |
| 644 |
\let\Css:File|=\CssFile |
| 645 |
\def\CssFile{\futurelet\:temp\Css:Fl} |
| 646 |
\def\Css:Fl{\ifx [\:temp \expandafter\Css:fl |
| 647 |
\else \expand:after{\Css:File \space}\fi} |
| 648 |
\def\Css:fl[#1]{\Css:File\space \css:files #1,,|<par del|>} |
| 649 |
\def\css:files#1,#2|<par del|>{\def\:temp{#1}\ifx \:temp\empty |
| 650 |
\else \def\:temp{\in:css#1.|<par del|>\css:files#2,,|<par del|>}\fi |
| 651 |
\:temp } |
| 652 |
\def\in:css#1.#2|<par del|>{\def\:temp{#2}\ifx \:temp\empty \input #1.css |
| 653 |
\else \inc:ss#1.#2|<par del|>\fi} |
| 654 |
\def\inc:ss#1.|<par del|>{\input #1 } |
| 655 |
\NewConfigure{CssFile}[2]{\def\aa:CssFile{#1}\def\bb:CssFile{#2}} |
| 656 |
>>> |
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
\<cascade style sheets\><<< |
| 661 |
\def\Css#1{{\def\:temp{\Configure{Needs}}% |
| 662 |
\expandafter\:temp\expandafter{\aa:Css}\Needs{#1}}} |
| 663 |
|
| 664 |
\expandafter\ifx \csname aa:Css\endcsname\relax |
| 665 |
\Configure{Css}{Css: ##1} |
| 666 |
\fi |
| 667 |
>>> |
| 668 |
|
| 669 |
%%%%%%%%%%%%%%%%%% |
| 670 |
\section{HTF} |
| 671 |
%%%%%%%%%%%%%%%%%% |
| 672 |
|
| 673 |
Basic support for HTF fonts. I am not sure if this method is the best, |
| 674 |
there seems to be no direct equivalent to HTML class and corresponding CSS. |
| 675 |
|
| 676 |
\<configure tei tex4ht\><<< |
| 677 |
\Configure{htf}{0}{+}{<hi rendition="\#}{\%s}{-\%s}{x-x-\%d}{}{">}{</hi>} |
| 678 |
\Configure{htf}{4}{+}{<hi rend="small-caps">}{}{}{}{}{}{</hi>} |
| 679 |
\Configure{htf}{6}{+}{<hi rend="underline">}{}{}{}{}{}{</hi>} |
| 680 |
\Configure{htf}{8}{+}{<hi rend="superscript">}{}{}{}{}{}{</hi>} |
| 681 |
\Configure{htf}{10}{+}{<hi rend="bold">}{}{}{}{}{}{</hi>} |
| 682 |
\Configure{htf}{12}{+}{<hi rend="caligraphy">}{}{}{}{}{}{</hi>} |
| 683 |
\Configure{htf}{14}{+}{<hi rend="italic">}{}{}{}{}{}{</hi>} |
| 684 |
\Configure{htf}{16}{+}{<hi rend="bold">}{}{}{}{}{}{</hi>} |
| 685 |
\Configure{htf}{18}{+}{<hi rend="calligraphy-bold">}{}{}{}{}{}{</hi>} |
| 686 |
\Configure{htf}{20}{+}{<hi rend="htf-flip-hor">}{}{}{}{}{}{</hi>} |
| 687 |
\Configure{htf}{22}{+}{<hi rend="subscript>}{}{}{}{}{}{</hi>} |
| 688 |
\Configure{htf}{24}{+}{<hi rend="small-caps">}{}{}{}{}{}{</hi>} |
| 689 |
>>> |
| 690 |
|
| 691 |
|
| 692 |
%%%%%%%%%%%%%%%%%% |
| 693 |
\section{Sections} |
| 694 |
%%%%%%%%%%%%%%%%%% |
| 695 |
|
| 696 |
\<article sections\><<< |
| 697 |
\Configure{part} |
| 698 |
{\OpenDiv{part}} {\CloseDiv{part}} |
| 699 |
{\HCode{<head>}} {\CloseHead} |
| 700 |
\Configure{section} |
| 701 |
{\OpenDiv{section}} {\CloseDiv{section}} |
| 702 |
{\HCode{<head>}} {\CloseHead} |
| 703 |
\Configure{subsection} |
| 704 |
{\OpenDiv{subsection}} {\CloseDiv{subsection}} |
| 705 |
{\HCode{<head>}} {\CloseHead} |
| 706 |
\Configure{subsubsection} |
| 707 |
{\OpenDiv{subsubsection}} {\CloseDiv{subsubsection}} |
| 708 |
{\HCode{<head>}} {\CloseHead} |
| 709 |
\Configure{paragraph} |
| 710 |
{\OpenDiv{paragraph}} {\CloseDiv{paragraph}} |
| 711 |
{\HCode{<head>}} {\CloseHead} |
| 712 |
\Configure{subparagraph} |
| 713 |
{\OpenDiv{subparagraph}} {\CloseDiv{subparagraph}} |
| 714 |
{\HCode{<head>}} {\CloseHead} |
| 715 |
>>> |
| 716 |
|
| 717 |
|
| 718 |
|
| 719 |
|
| 720 |
\<article sections\><<< |
| 721 |
\Configure{likepart} |
| 722 |
{\OpenDiv{likepart}} {\CloseDiv{likepart}} |
| 723 |
{\HCode{<head>}} {\CloseHead} |
| 724 |
\Configure{likesection} |
| 725 |
{\OpenDiv{likesection}} {\CloseDiv{likesection}} |
| 726 |
{\HCode{<head>}} {\CloseHead} |
| 727 |
\Configure{likesubsection} |
| 728 |
{\OpenDiv{likesubsection}} {\CloseDiv{likesubsection}} |
| 729 |
{\HCode{<head>}} {\CloseHead} |
| 730 |
\Configure{likesubsubsection} |
| 731 |
{\OpenDiv{likesubsubsection}} {\CloseDiv{likesubsubsection}} |
| 732 |
{\HCode{<head>}} {\CloseHead} |
| 733 |
\Configure{likeparagraph} |
| 734 |
{\OpenDiv{likeparagraph}} {\CloseDiv{likeparagraph}} |
| 735 |
{\HCode{<head>}} {\CloseHead} |
| 736 |
\Configure{likesubparagraph} |
| 737 |
{\OpenDiv{likesubparagraph}} {\CloseDiv{likesubparagraph}} |
| 738 |
{\HCode{<head>}} {\CloseHead} |
| 739 |
>>> |
| 740 |
|
| 741 |
|
| 742 |
|
| 743 |
\<ams art,proc,book\><<< |
| 744 |
|<article sections|> |
| 745 |
>>> |
| 746 |
|
| 747 |
|
| 748 |
%\let\contentsname|=\empty |
| 749 |
|
| 750 |
\<article tocs\><<< |
| 751 |
\Configure{tableofcontents} |
| 752 |
{\ifvmode\IgnorePar\fi \EndP |
| 753 |
\HCode{<divGen type="toc"/>}} |
| 754 |
{} {}{}{} |
| 755 |
>>> |
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
\<report,book tocs\><<< |
| 760 |
|<article tocs|> |
| 761 |
\ConfigureToc{appendix}{}{}{}{} |
| 762 |
\ConfigureToc{chapter}{}{}{}{} |
| 763 |
\ConfigureToc{likechapter}{}{}{}{} |
| 764 |
>>> |
| 765 |
|
| 766 |
\<article tocs\><<< |
| 767 |
\ConfigureToc{likeparagraph}{}{}{}{} |
| 768 |
\ConfigureToc{likepart}{}{}{}{} |
| 769 |
\ConfigureToc{likesection}{}{}{}{} |
| 770 |
\ConfigureToc{likesubparagraph}{}{}{}{} |
| 771 |
\ConfigureToc{likesubsection}{}{}{}{} |
| 772 |
\ConfigureToc{likesubsubsection}{}{}{}{} |
| 773 |
\ConfigureToc{paragraph}{}{}{}{} |
| 774 |
\ConfigureToc{part}{}{}{}{} |
| 775 |
\ConfigureToc{section}{}{}{}{} |
| 776 |
\ConfigureToc{subparagraph}{}{}{}{} |
| 777 |
\ConfigureToc{subsection}{}{}{}{} |
| 778 |
\ConfigureToc{subsubsection}{}{}{}{} |
| 779 |
>>> |
| 780 |
|
| 781 |
|
| 782 |
|
| 783 |
|
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
\<configure tei tex4ht-OUT\><<< |
| 788 |
\Configure{TocEntry}{\Link{#2}{#3}#4\EndLink} |
| 789 |
>>> |
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
\<article tocs-OUT\><<< |
| 794 |
\Configure{tableofcontents} |
| 795 |
{\HCode{<list rend="toc">}} |
| 796 |
{\HCode{</list>}} |
| 797 |
{}{}{} |
| 798 |
>>> |
| 799 |
|
| 800 |
|
| 801 |
\<report,book tocs-OUT\><<< |
| 802 |
|<article tocs|> |
| 803 |
\ConfigureToc{appendix} |
| 804 |
{\HCode{\Hnewline<item rend="appendixToc">}} |
| 805 |
{\ }{} {\HCode{</item>}} |
| 806 |
\ConfigureToc{chapter} |
| 807 |
{\HCode{\Hnewline<item rend="chapterToc">}} |
| 808 |
{\ }{} {\HCode{</item>}} |
| 809 |
\ConfigureToc{likechapter} |
| 810 |
{} {\HCode{\Hnewline<item rend="likechapterToc">}} |
| 811 |
{} {\HCode{</item>}} |
| 812 |
>>> |
| 813 |
|
| 814 |
\<article tocs-OUT\><<< |
| 815 |
\ConfigureToc{likeparagraph} |
| 816 |
{} {\HCode{\Hnewline<item rend="likeparagraphToc">}} |
| 817 |
{} {\HCode{</item>}} |
| 818 |
\ConfigureToc{likepart} |
| 819 |
{} {\HCode{\Hnewline<item rend="likepartToc">}} |
| 820 |
{} {\HCode{</item>}} |
| 821 |
\ConfigureToc{likesection} |
| 822 |
{} {\HCode{\Hnewline<item rend="likesectionToc">}} |
| 823 |
{} {\HCode{</item>}} |
| 824 |
\ConfigureToc{likesubparagraph} |
| 825 |
{} {\HCode{\Hnewline<item rend="likesubparagraphToc">}} |
| 826 |
{} {\HCode{</item>}} |
| 827 |
\ConfigureToc{likesubsection} |
| 828 |
{} {\HCode{\Hnewline<item rend="likesubsectionToc">}} |
| 829 |
{} {\HCode{</item>}} |
| 830 |
\ConfigureToc{likesubsubsection} |
| 831 |
{} {\HCode{\Hnewline<item rend="likesubsubsectionToc">}} |
| 832 |
{} {\HCode{</item>}} |
| 833 |
\ConfigureToc{paragraph} |
| 834 |
{\HCode{\Hnewline<item rend="paragraphToc">}} |
| 835 |
{\ }{} {\HCode{</item>}} |
| 836 |
\ConfigureToc{part} |
| 837 |
{\HCode{\Hnewline<item rend="partToc">}} |
| 838 |
{\ }{} {\HCode{</item>}} |
| 839 |
\ConfigureToc{section} |
| 840 |
{\HCode{\Hnewline<item rend="sectionToc">}} |
| 841 |
{\ }{} {\HCode{</item>}} |
| 842 |
\ConfigureToc{subparagraph} |
| 843 |
{\HCode{\Hnewline<item rend="subparagraphToc">}} |
| 844 |
{\ }{} {\HCode{</item>}} |
| 845 |
\ConfigureToc{subsection} |
| 846 |
{\HCode{\Hnewline<item rend="subsectionToc">}} |
| 847 |
{\ }{} {\HCode{</item>}} |
| 848 |
\ConfigureToc{subsubsection} |
| 849 |
{\HCode{\Hnewline<item rend="subsubsectionToc">}} |
| 850 |
{\ }{} {\HCode{</item>}} |
| 851 |
>>> |
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
\subsection{Mapping Utilities} |
| 864 |
|
| 865 |
|
| 866 |
\begin{verbatim} |
| 867 |
\section{...} |
| 868 |
<div1 type="section"> |
| 869 |
<div2 type="preamble"> |
| 870 |
............................. |
| 871 |
</div2> |
| 872 |
\subsection{...} |
| 873 |
<div2 type="subsection"> |
| 874 |
............................. |
| 875 |
</div2> |
| 876 |
............................. |
| 877 |
</div1> |
| 878 |
\section{...} |
| 879 |
<div1 type="section"> |
| 880 |
............................. |
| 881 |
</div1> |
| 882 |
\end{verbatim} |
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
\<article,report,book utilities\><<< |
| 894 |
|<sectioning utilities|> |
| 895 |
>>> |
| 896 |
|
| 897 |
\<sectioning utilities\><<< |
| 898 |
\HAssign\DivLevel=0 |
| 899 |
\HAssign\DivCount=0 |
| 900 |
\def\OpenDiv#1{% |
| 901 |
\IgnorePar\EndP \PopStack\text:stack\:temp \def\:tempa{body}% |
| 902 |
\ifx \:temp\:tempa \else \HCode{</\:temp><body>}\fi |
| 903 |
\PushStack\text:stack{body}% |
| 904 |
|<close div preamble|>% |
| 905 |
\gHAdvance\DivLevel by 1 |
| 906 |
\HCode{<!--l. \the\inputlineno--><div\Hnewline |
| 907 |
type="#1">}\gHAdvance\P:level by 1 } |
| 908 |
\def\CloseDiv#1{% |
| 909 |
\IgnorePar\EndP \gHAdvance\P:level by -1 \HCode{</div><!--end #1-->}% |
| 910 |
\gHAdvance\DivLevel by -1 |
| 911 |
} |
| 912 |
\def\CloseHead{\HCode{</head>}% |
| 913 |
|<open div preamble|>\ShowPar\par} |
| 914 |
>>> |
| 915 |
|
| 916 |
|
| 917 |
\<close div preamble\><<< |
| 918 |
\ifnum \DivLevel>0 \ifnum \DivLevel=0\LikeRef{dv)\DivCount}\relax |
| 919 |
\gHAdvance\P:level by 1 |
| 920 |
\HCode{</div>}% |
| 921 |
\fi\fi |
| 922 |
>>> |
| 923 |
|
| 924 |
\<open div preamble\><<< |
| 925 |
\gHAdvance\DivCount by 1 |
| 926 |
\Tag{dv)\DivCount}{\DivLevel}% |
| 927 |
\HAdvance\DivLevel by 1 |
| 928 |
\HAdvance\DivCount by 1 |
| 929 |
\ifnum \DivLevel=0\LikeRef{dv)\DivCount}\relax |
| 930 |
\HCode{<div type="preamble"><p></p>}% |
| 931 |
\gHAdvance\P:level by 1 |
| 932 |
\fi |
| 933 |
\HAdvance\DivLevel by -1 |
| 934 |
\HAdvance\DivCount by -1 |
| 935 |
>>> |
| 936 |
|
| 937 |
|
| 938 |
The \verb+<p></p>+ is to ensure at least one paragaph in the preamble, e.g., |
| 939 |
between the section heads of |
| 940 |
\begin{verbatim} |
| 941 |
................. |
| 942 |
\section{Distributions}% |
| 943 |
\subsection{Definitions} |
| 944 |
............... |
| 945 |
\end{verbatim} |
| 946 |
|
| 947 |
|
| 948 |
\<latex etc\><<< |
| 949 |
\gHAssign\P:level=0 |
| 950 |
>>> |
| 951 |
|
| 952 |
|
| 953 |
|
| 954 |
|
| 955 |
|
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
|
| 961 |
|
| 962 |
|
| 963 |
|
| 964 |
\subsection{End Points} |
| 965 |
|
| 966 |
\<article sections\><<< |
| 967 |
\Configure{endsection} |
| 968 |
{likesection,chapter,likechapter,appendix,part,likepart} |
| 969 |
\Configure{endlikesection} |
| 970 |
{section,chapter,likechapter,appendix,part,likepart} |
| 971 |
\Configure{endsubsection} |
| 972 |
{likesubsection,section,likesection,chapter,% |
| 973 |
likechapter,appendix,part,likpart} |
| 974 |
\Configure{endlikesubsection} |
| 975 |
{subsection,section,likesection,chapter,% |
| 976 |
likechapter,appendix,part,likpart} |
| 977 |
\Configure{endsubsubsection} |
| 978 |
{likesubsubsection,subsection,likesubsection,section,% |
| 979 |
likesection,chapter,likechapter,appendix,part,likpart} |
| 980 |
\Configure{endlikesubsubsection} |
| 981 |
{subsubsection,subsection,likesubsection,section,% |
| 982 |
likesection,chapter,likechapter,appendix,part,likpart} |
| 983 |
\Configure{endparagraph} |
| 984 |
{likeparagraph,subsubsection,likesubsubsection,subsection,% |
| 985 |
likesubsection,section,% |
| 986 |
likesection,chapter,likechapter,appendix,part,likpart} |
| 987 |
\Configure{endlikeparagraph} |
| 988 |
{paragraph,subsubsection,likesubsubsection,subsection,% |
| 989 |
likesubsection,section,% |
| 990 |
likesection,chapter,likechapter,appendix,part,likpart} |
| 991 |
\Configure{endsubparagraph} |
| 992 |
{likesubparagraph,likeparagraph,subsubsection,likesubsubsection,% |
| 993 |
subsection,likesubsection,section,% |
| 994 |
likesection,chapter,likechapter,appendix,part,likpart} |
| 995 |
\Configure{endlikesubparagraph} |
| 996 |
{subparagraph,likeparagraph,subsubsection,likesubsubsection,% |
| 997 |
subsection,likesubsection,section,% |
| 998 |
likesection,chapter,likechapter,appendix,part,likpart} |
| 999 |
\ifx \part\:UnDef \else |
| 1000 |
\Configure{endpart}{likepart} |
| 1001 |
\Configure{endlikepart}{endpart} |
| 1002 |
\fi |
| 1003 |
>>> |
| 1004 |
|
| 1005 |
|
| 1006 |
|
| 1007 |
|
| 1008 |
|
| 1009 |
%%%%%%%%%%%%%%% |
| 1010 |
\section{Lists} |
| 1011 |
%%%%%%%%%%%%%%% |
| 1012 |
|
| 1013 |
|
| 1014 |
\<latex lists\><<< |
| 1015 |
\ConfigureList{trivlist}% |
| 1016 |
{\EndP\HCode{<list type="gloss">}\let\end:itm=\empty} |
| 1017 |
{\EndP\HCode{</item></list>}\ShowPar} |
| 1018 |
{\end:itm\def\end:itm{\EndP\Tg</item>}\HCode{<label>}\bgroup \bf} |
| 1019 |
{\egroup\HCode{</label><item\Hnewline>}} |
| 1020 |
\ConfigureList{list}% |
| 1021 |
{\EndP\HCode{<list type="gloss">}\let\end:itm=\empty} |
| 1022 |
{\EndP\HCode{</item></list>}\ShowPar} |
| 1023 |
{\end:itm\def\end:itm{\EndP\Tg</item>}\HCode{<label>}\bgroup \bf} |
| 1024 |
{\egroup\HCode{</label><item\Hnewline>}} |
| 1025 |
\ConfigureList{itemize}% |
| 1026 |
{\EndP\HCode{<list type="bulleted">}\let\end:itm=\empty} |
| 1027 |
{\EndP\HCode{</item></list>}\ShowPar} |
| 1028 |
{\end:itm\def\end:itm{\EndP\Tg</item>}\DeleteMark} |
| 1029 |
{\HCode{<item>}} |
| 1030 |
\ConfigureList{enumerate}% |
| 1031 |
{\EndP\HCode{<list type="ordered"\Hnewline>}\let\end:itm=\empty} |
| 1032 |
{\EndP\HCode{</item></list>}\ShowPar} |
| 1033 |
{\end:itm\def\end:itm{\EndP\Tg</item>}\DeleteMark} |
| 1034 |
{\HCode{<item>}\AnchorLabel} |
| 1035 |
>>> |
| 1036 |
|
| 1037 |
|
| 1038 |
\<article,report,book lists\><<< |
| 1039 |
\ConfigureList{thebibliography}% |
| 1040 |
{\IgnorePar\EndP |
| 1041 |
\HCode{<div rend="thebibliography"><listBibl>}\let\en:bib=\empty} |
| 1042 |
{\en:bib\HCode{</listBibl></div>}} |
| 1043 |
{\en:bib\def\en:bib{\HCode{</bibl>}}% |
| 1044 |
\HCode{<!--l. \the\inputlineno--><!--}|<par within bib|>} |
| 1045 |
{\HCode{--><bibl>}} |
| 1046 |
>>> |
| 1047 |
|
| 1048 |
|
| 1049 |
\<par within bib\><<< |
| 1050 |
\Configure{HtmlPar} |
| 1051 |
{\HCode{<!--l. \the\inputlineno--><gap desc="bib p"/>}} |
| 1052 |
{\HCode{<!--l. \the\inputlineno--><gap desc="bib p"/>}} |
| 1053 |
{} {} |
| 1054 |
>>> |
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
|
| 1059 |
|
| 1060 |
\<latex lists\><<< |
| 1061 |
\Configure{cite}{}{}{\Link}{\EndLink} |
| 1062 |
\Configure{bibitem}{\Link}{\EndLink} |
| 1063 |
>>> |
| 1064 |
|
| 1065 |
|
| 1066 |
|
| 1067 |
%%%%%%%%%%%%%%%% |
| 1068 |
\section{Tables} |
| 1069 |
%%%%%%%%%%%%%%%% |
| 1070 |
|
| 1071 |
|
| 1072 |
\<latex tables\><<< |
| 1073 |
\Configure{tabular} |
| 1074 |
{|<start count rows,cols|>|<set row count|>% |
| 1075 |
\HCode{<table\Hnewline |<insert row count|> >}} |
| 1076 |
{\HCode{</table>}% |
| 1077 |
|<end count rows,cols|>} |
| 1078 |
{|<modify rows count|>\HCode{<row role="data">}} |
| 1079 |
{\HCode{</row>}} |
| 1080 |
{|<modify cols count|>% |
| 1081 |
\HCode{<cell\Hnewline cols="\HMultispan" rows="1" role="data">}} |
| 1082 |
{\HCode{</cell>}} |
| 1083 |
\HAssign\tabularN=0 |
| 1084 |
>>> |
| 1085 |
|
| 1086 |
\<start count rows,cols\><<< |
| 1087 |
\gHAdvance\tabularN by 1 \PushStack\tabular:N\tabularN |
| 1088 |
\let\prevR:max=\R:max \let\prevC:max=\C:max \gHAssign\C:max=0 |
| 1089 |
>>> |
| 1090 |
|
| 1091 |
\<end count rows,cols\><<< |
| 1092 |
\PopStack\tabular:N\i:var |<toks Clr|>% |
| 1093 |
\Tag{rc-\i:var}{rend="|<get Clr|>" rows="\R:max" cols="\C:max"} |
| 1094 |
\global\let\R:max=\prevR:max \global\let\C:max=\prevC:max |
| 1095 |
>>> |
| 1096 |
|
| 1097 |
|
| 1098 |
|
| 1099 |
\<toks Clr\><<< |
| 1100 |
\expandafter\tmp:toks\expandafter{\Clr}% |
| 1101 |
>>> |
| 1102 |
|
| 1103 |
\<get Clr\><<< |
| 1104 |
\the\tmp:toks |
| 1105 |
>>> |
| 1106 |
|
| 1107 |
|
| 1108 |
|
| 1109 |
|
| 1110 |
|
| 1111 |
\<modify cols count\><<< |
| 1112 |
\HAssign\i:var=\HCol \HAdvance\i:var by \HMultispan |
| 1113 |
\HAdvance\i:var by -1 \ifnum \C:max<\i:var \gHAssign\C:max=\i:var \fi |
| 1114 |
>>> |
| 1115 |
|
| 1116 |
\<modify rows count\><<< |
| 1117 |
\gHAssign\R:max=\HRow |
| 1118 |
>>> |
| 1119 |
|
| 1120 |
\<set row count\><<< |
| 1121 |
\expandafter\ifx \csname cw:rc-\tabularN\endcsname \relax |
| 1122 |
\tmp:toks{ }% |
| 1123 |
\else |
| 1124 |
\expandafter\expandafter\expandafter\tmp:toks |
| 1125 |
\expandafter\expandafter\expandafter{\csname |
| 1126 |
cw:rc-\tabularN\endcsname}% |
| 1127 |
\fi |
| 1128 |
>>> |
| 1129 |
|
| 1130 |
\<insert row count\><<< |
| 1131 |
\the\tmp:toks |
| 1132 |
>>> |
| 1133 |
|
| 1134 |
\<latex tables\><<< |
| 1135 |
\Configure{hline}{} |
| 1136 |
\Configure{//[]}{} |
| 1137 |
>>> |
| 1138 |
|
| 1139 |
|
| 1140 |
\<obey lines\><<< |
| 1141 |
\Configure{verb}{}{} |
| 1142 |
\Configure{obeylines} |
| 1143 |
{\ifvmode \EndP |
| 1144 |
\HCode{<div rend="obeylines-v">}% |
| 1145 |
\gdef\ob:ln{div}% |
| 1146 |
\else \HCode{<emph rend="obeylines-h">}% |
| 1147 |
\gdef\ob:ln{emph}% |
| 1148 |
\fi |
| 1149 |
} |
| 1150 |
{\ht:special{t4ht=</\ob:ln>}\ShowPar} {\hbox{\HCode{<br />}}} |
| 1151 |
>>> |
| 1152 |
|
| 1153 |
|
| 1154 |
\<ams art,proc,book\><<< |
| 1155 |
\ifx \deferred@thm@head\:UnDef\else |
| 1156 |
\Configure{newtheorem} |
| 1157 |
{\par\HCode{<title rend="newtheorem-ams">}\IgnorePar\par} |
| 1158 |
{\HCode{</title>}} |
| 1159 |
{} |
| 1160 |
\fi |
| 1161 |
>>> |
| 1162 |
|
| 1163 |
|
| 1164 |
|
| 1165 |
|
| 1166 |
%%%%%%%%%%%%%%%%% |
| 1167 |
\section{Figures} |
| 1168 |
%%%%%%%%%%%%%%%%% |
| 1169 |
|
| 1170 |
\<article,report,book figures\><<< |
| 1171 |
\ConfigureEnv{figure} |
| 1172 |
{\ifvmode \IgnorePar\fi\EndP \HCode{<note rend="figure">}} |
| 1173 |
{\ifvmode \IgnorePar\fi\EndP \HCode{</note>}} |
| 1174 |
{}{} |
| 1175 |
\Configure{caption} |
| 1176 |
{}{} |
| 1177 |
{\HCode{<title>}} {\HCode{</title>}} |
| 1178 |
>>> |
| 1179 |
|
| 1180 |
|
| 1181 |
%%%%%%%%%%%%%%%%% |
| 1182 |
\section{Accents} |
| 1183 |
%%%%%%%%%%%%%%%%% |
| 1184 |
|
| 1185 |
|
| 1186 |
\<latex env\><<< |
| 1187 |
\Configure{centerline} |
| 1188 |
{\ifvmode \IgnorePar \fi \EndP\HCode{<p \Hnewline |
| 1189 |
rend="centerline">}} |
| 1190 |
{\EndP\HCode{</p>}\ShowPar} |
| 1191 |
\Configure{leftline} |
| 1192 |
{\ifvmode \IgnorePar \fi \EndP\HCode{<p \Hnewline |
| 1193 |
rend="leftline">}} |
| 1194 |
{\EndP\HCode{</p>}\ShowPar} |
| 1195 |
\Configure{rightline} |
| 1196 |
{\ifvmode \IgnorePar \fi \EndP\HCode{<p \Hnewline |
| 1197 |
rend="rightline">}} |
| 1198 |
{\EndP\HCode{</p>}\ShowPar} |
| 1199 |
>>> |
| 1200 |
|
| 1201 |
|
| 1202 |
%%%%%%%%%%%%%%%%% |
| 1203 |
\section{Accents} |
| 1204 |
%%%%%%%%%%%%%%%%% |
| 1205 |
|
| 1206 |
\<latex,plain accents\><<< |
| 1207 |
\:CheckOption{new-accents} \if:Option |
| 1208 |
|<new accents|> |
| 1209 |
\else |
| 1210 |
|<old accents|> |
| 1211 |
\fi |
| 1212 |
\let\^^_=\v |
| 1213 |
>>> |
| 1214 |
|
| 1215 |
|
| 1216 |
\<latex accents\><<< |
| 1217 |
\let\@acci=\' \let\@accii=\` \let\@acciii=\= |
| 1218 |
>>> |
| 1219 |
|
| 1220 |
\<new accents\><<< |
| 1221 |
\:CheckOption{accent-} \if:Option |
| 1222 |
\Configure{HAccent}\acute{AEIOUYaeiouy{}}{\Picture+{}}{\EndPicture} |
| 1223 |
\Configure{HAccent}\bar{}{\Picture+{}}{\EndPicture} |
| 1224 |
\Configure{HAccent}\breve{}{\Picture+{}}{\EndPicture} |
| 1225 |
\Configure{HAccent}\check{}{\Picture+{}}{\EndPicture} |
| 1226 |
\Configure{HAccent}\ddot{AEIOUYaeiouy{}}{\Picture+{}}{\EndPicture} |
| 1227 |
\Configure{HAccent}\dot{}{\Picture+{}}{\EndPicture} |
| 1228 |
\Configure{HAccent}\grave{AEIOUaeiou{}}{\Picture+{}}{\EndPicture} |
| 1229 |
\Configure{HAccent}\hat{AEIOUaeiou{}}{\Picture+{}}{\EndPicture} |
| 1230 |
\Configure{HAccent}\tilde{AOaoNn{}}{\Picture+{}}{\EndPicture} |
| 1231 |
\Configure{HAccent}\vec{}{\Picture+{}}{\EndPicture} |
| 1232 |
\Configure{HAccent}\widehat{}{\Picture+{}}{\EndPicture} |
| 1233 |
\Configure{HAccent}\widetilde{}{\Picture+{}}{\EndPicture} |
| 1234 |
\fi |
| 1235 |
\:CheckOption{mathaccent-} \if:Option |
| 1236 |
\Configure{HAccent}\"{AEIOUYaeiouy{}}{\Picture+{}}{\EndPicture} |
| 1237 |
\Configure{HAccent}\'{AEIOUYaeiouy{}}{\Picture+{}}{\EndPicture} |
| 1238 |
\Configure{HAccent}\.{}{\Picture+{}}{\EndPicture} |
| 1239 |
\Configure{HAccent}\={}{\Picture+{}}{\EndPicture} |
| 1240 |
\Configure{HAccent}\H{}{\Picture+{}}{\EndPicture} |
| 1241 |
\Configure{HAccent}\^{AEIOUaeiou{}}{\Picture+{}}{\EndPicture} |
| 1242 |
\Configure{HAccent}\`{AEIOUaeiou{}}{\Picture+{}}{\EndPicture} |
| 1243 |
\Configure{HAccent}\b{}{\Picture+{}}{\EndPicture} |
| 1244 |
\Configure{HAccent}\c{Cc{}}{\Picture+{}}{\EndPicture} |
| 1245 |
\Configure{HAccent}\d{}{\Picture+{}}{\EndPicture} |
| 1246 |
\Configure{HAccent}\t{}{\Picture+{}}{\EndPicture} |
| 1247 |
\Configure{HAccent}\u{}{\Picture+{}}{\EndPicture} |
| 1248 |
\Configure{HAccent}\v{}{\Picture+{}}{\EndPicture} |
| 1249 |
\Configure{HAccent}\~{AOaoNn{}}{\Picture+{}}{\EndPicture} |
| 1250 |
\fi |
| 1251 |
>>> |
| 1252 |
|
| 1253 |
|
| 1254 |
\<new accents\><<< |
| 1255 |
\Configure{accent}{*} |
| 1256 |
{<!--tex4ht:accent\Hnewline font="}{" char="}{" type="}{"-->} |
| 1257 |
{<!--tex4ht:end accent-->} |
| 1258 |
\Configure{mathaccent}{*} |
| 1259 |
{<!--tex4ht:mathaccent\Hnewline font="}{" char="}{" type="}{"-->} |
| 1260 |
{<!--tex4ht:end mathaccent-->} |
| 1261 |
\Configure{accented}{*} |
| 1262 |
{<!--tex4ht:accented\Hnewline font="}{" char="}{" type="}{"-->} |
| 1263 |
{<!--tex4ht:end accented-->} |
| 1264 |
\Configure{accenting}{*} |
| 1265 |
{<!--tex4ht:accenting\Hnewline-->} |
| 1266 |
{<!--tex4ht:end accenting-->} |
| 1267 |
>>> |
| 1268 |
|
| 1269 |
|
| 1270 |
|
| 1271 |
|
| 1272 |
\<old accents\><<< |
| 1273 |
\Configure{accent}\`\grave{A{A}E{E}I{I}O{O}U{U}% |
| 1274 |
a{a}e{e}i{i}\i{i}o{o}u{u}{}{}} |
| 1275 |
{\a:accents{grave}{#1}} {\b:accents{grave}{#1}{#2}} |
| 1276 |
\Configure{accent}\'\acute{A{A}E{E}I{I}O{O}U{U}Y% |
| 1277 |
{Y}a{a}e{e}i{i}\i{i}o{o}u{u}y{y}{}{}} |
| 1278 |
{\a:accents{acute}{#1}} {\b:accents{acute}{#1}{#2}} |
| 1279 |
\Configure{accent}\^\hat{A{A}E{E}I{I}O{O}U{U}a{a}% |
| 1280 |
e{e}i{i}\i{i}o{o}u{u}{}{}} |
| 1281 |
{\a:accents{circ}{#1}} {\b:accents{hat}{#1}{#2}} |
| 1282 |
\Configure{accent}\~\tilde{A{A}O{O}a{a}o{o}N{N}n{n}{}{}} |
| 1283 |
{\a:accents{tilde}{#1}} {\b:accents{tilde}{#1}{#2}} |
| 1284 |
\Configure{accent}\"\ddot{A{A}E{E}I{I}O{O}U{U}Y% |
| 1285 |
{Y}a{a}e{e}i{i}\i{i}o{o}u{u}y{y}{}{34}} |
| 1286 |
{\a:accents{uml}{#1}} {\b:accents{uml}{#1}{#2}} |
| 1287 |
>>> |
| 1288 |
|
| 1289 |
|
| 1290 |
|
| 1291 |
|
| 1292 |
|
| 1293 |
The following are also placed under accents configuration. |
| 1294 |
|
| 1295 |
\<old accents\><<< |
| 1296 |
\Configure{accent}\c\c{C{C}c{c}{}{}} |
| 1297 |
{\a:accents{cedil}{#1}} {\b:accents{cedil}{#1}{#2}} |
| 1298 |
\Configure{accent}\t\t{{}{}} |
| 1299 |
{\a:accents{udot}{#1}} {\b:accents{udot}{#1}{#2}} |
| 1300 |
\Configure{accent}\H\H{{}{}} {}{\b:accents{Huml}{#1}{#2}} |
| 1301 |
>>> |
| 1302 |
|
| 1303 |
The following originally have been defined to be parameter-less. |
| 1304 |
|
| 1305 |
|
| 1306 |
|
| 1307 |
\<old accents\><<< |
| 1308 |
\Configure{accent}\.\dot{{}{}} {}{\b:accents{dot}{#1}{#2}} |
| 1309 |
\Configure{accent}\u\breve{{}{}}{}{\b:accents{breve}{#1}{#2}} |
| 1310 |
\Configure{accent}\vec\vec{{}{}}{}{\b:accents{vec}{#1}{#2}} |
| 1311 |
\Configure{accent}\v\check{{}{}}{}{\b:accents{check}{#1}{#2}} |
| 1312 |
\Configure{accent}\=\bar{{}{}} {}{\b:accents{bar}{#1}{#2}} |
| 1313 |
>>> |
| 1314 |
|
| 1315 |
|
| 1316 |
% \= macron |
| 1317 |
|
| 1318 |
\<old accents\><<< |
| 1319 |
\Configure{accent}\widetilde\widetilde{{}{}} |
| 1320 |
{}{\b:accents{widetilde}{#1}{#2}} |
| 1321 |
\Configure{accent}\widehat\widehat{{}{}} |
| 1322 |
{}{\b:accents{widehat}{#1}{#2}} |
| 1323 |
>>> |
| 1324 |
|
| 1325 |
|
| 1326 |
\verb'\vec', \verb'\widetilde', and \verb'\widehat' are for math mode. |
| 1327 |
\verb'\b', \verb'\c', \verb'\d', \verb'\t', and \verb'\H' are for text mode. |
| 1328 |
|
| 1329 |
|
| 1330 |
|
| 1331 |
|
| 1332 |
\<configure tei-math plain\><<< |
| 1333 |
|<shared latex,plain accents|> |
| 1334 |
>>> |
| 1335 |
|
| 1336 |
\<configure tei-math latex\><<< |
| 1337 |
|<shared latex,plain accents|> |
| 1338 |
>>> |
| 1339 |
|
| 1340 |
\<shared latex,plain accents\><<< |
| 1341 |
\:CheckOption{new-accents} \if:Option \else |
| 1342 |
\Configure{accents} |
| 1343 |
{\ifmmode \expandafter\mathord\fi |
| 1344 |
{|<temp hcode accents|>% |
| 1345 |
\ht:special{t4ht@[}#2\ht:special{t4ht@]}}} |
| 1346 |
{\ifmmode \expandafter\mathord\fi |
| 1347 |
{\HCode{<term type='accent#1'>}#3\HCode{</term>}}} |
| 1348 |
\fi |
| 1349 |
>>> |
| 1350 |
|
| 1351 |
|
| 1352 |
|
| 1353 |
\<temp hcode accents\><<< |
| 1354 |
\HCode{&\#x\expandafter \ifx\csname U#2#1\endcsname\relax |
| 1355 |
#2#1\else \csname U#2#1\endcsname\fi;}% |
| 1356 |
>>> |
| 1357 |
|
| 1358 |
|
| 1359 |
%\HCode{#1;}% |
| 1360 |
|
| 1361 |
%%%%%%%%%%%%%%%%%%%% |
| 1362 |
\section{Math} |
| 1363 |
%%%%%%%%%%%%%%%%%%%% |
| 1364 |
|
| 1365 |
|
| 1366 |
|
| 1367 |
|
| 1368 |
\<latex math\><<< |
| 1369 |
\Configure{equation} |
| 1370 |
{} {\HCode{<title>}} {\HCode{</title>}} |
| 1371 |
\ConfigureEnv{equation} |
| 1372 |
{\IgnorePar\EndP |
| 1373 |
\HCode{<div rend="equation"><p rend="equation">}} |
| 1374 |
{\HCode{</p></div>}\ShowPar\par} |
| 1375 |
{}{} |
| 1376 |
>>> |
| 1377 |
|
| 1378 |
\<configure tei-mml tex4ht\><<< |
| 1379 |
\Configure{$$} |
| 1380 |
{\Configure{@math}{display="block"}\DviMath} |
| 1381 |
{\EndDviMath{\csname HCondtrue\endcsname\noindent}}{} |
| 1382 |
\Configure{DviMath} |
| 1383 |
{\mathmltrue \NoFonts\IgnoreRule\HCode{<!--l. |
| 1384 |
\the\inputlineno--><formula notation="mathml"\Hnewline |
| 1385 |
\expandafter\:rend \a:@math==//><math |
| 1386 |
xmlns="http://www.w3.org/1998/Math/MathML"\Hnewline |
| 1387 |
\expandafter\m:rend\a:@math==//>}\a:math |
| 1388 |
|<sv dvimath par|>\IgnorePar} |
| 1389 |
{\HCode{</math></formula>}\EndIgnoreRule\EndNoFonts |
| 1390 |
|<recall dvimath par|>\mathmlfalse} |
| 1391 |
\def\:rend#1=#2=#3//{\if !#1!\else rend=#2\fi} |
| 1392 |
\def\m:rend#1=#2=#3//{\if !#1!\else display=#2\fi} |
| 1393 |
>>> |
| 1394 |
|
| 1395 |
\<recall dvimath par\><<< |
| 1396 |
\sv:ignore |
| 1397 |
>>> |
| 1398 |
|
| 1399 |
\<sv dvimath par\><<< |
| 1400 |
\edef\sv:ignore{\if:nopar |
| 1401 |
\noexpand\IgnorePar\else \noexpand\ShowPar\fi}% |
| 1402 |
>>> |
| 1403 |
|
| 1404 |
|
| 1405 |
|
| 1406 |
\<configure tei-mml amsmath\><<< |
| 1407 |
\ConfigureEnv{gather} |
| 1408 |
{\ShowPar\par} {\ShowPar\par} |
| 1409 |
{}{} |
| 1410 |
>>> |
| 1411 |
|
| 1412 |
|
| 1413 |
|
| 1414 |
|
| 1415 |
|
| 1416 |
|
| 1417 |
\<configure tei-mml amsmath\><<< |
| 1418 |
\ConfigureEnv{align*} |
| 1419 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="align-star">}\fi} |
| 1420 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi} {}{} |
| 1421 |
\ConfigureEnv{alignat*} |
| 1422 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="alignat-star">}\fi} |
| 1423 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1424 |
\ConfigureEnv{alignat} |
| 1425 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="alignat">}\fi} |
| 1426 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1427 |
\ConfigureEnv{align} |
| 1428 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="align">}\fi} |
| 1429 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1430 |
\ConfigureEnv{eqxample} |
| 1431 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="eqxample">}\fi} |
| 1432 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1433 |
\ConfigureEnv{flalign*} |
| 1434 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="flalign*">}\fi} |
| 1435 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1436 |
\ConfigureEnv{flalign} |
| 1437 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="flalign">}\fi} |
| 1438 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1439 |
\ConfigureEnv{gather} |
| 1440 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="gather">}\fi} |
| 1441 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1442 |
\ConfigureEnv{gather*} |
| 1443 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="gather-star">}\fi} |
| 1444 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1445 |
\ConfigureEnv{gathered} |
| 1446 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="gathered">}\fi} |
| 1447 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1448 |
\ConfigureEnv{matrix} |
| 1449 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="matrix">}\fi} |
| 1450 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1451 |
\ConfigureEnv{xalignat*} |
| 1452 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="xalignat-star">}\fi} |
| 1453 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1454 |
\ConfigureEnv{xalignat} |
| 1455 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="xalignat">}\fi} |
| 1456 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1457 |
\ConfigureEnv{xxalignat} |
| 1458 |
{\ifmmode\else \IgnorePar\EndP \HCode{<note rend="xxalignat">}\fi} |
| 1459 |
{\ifmmode\else \HCode{</note>}\par\ShowPar\fi}{}{} |
| 1460 |
>>> |
| 1461 |
|
| 1462 |
|
| 1463 |
|
| 1464 |
|
| 1465 |
|
| 1466 |
%%%%%%%%%%%%%%%%%%%% |
| 1467 |
\section{Loose Ends} |
| 1468 |
%%%%%%%%%%%%%%%%%%%% |
| 1469 |
|
| 1470 |
|
| 1471 |
|
| 1472 |
|
| 1473 |
|
| 1474 |
\<latex environments\><<< |
| 1475 |
\ConfigureEnv{verbatim} |
| 1476 |
{\ifinner\else \vfill\break\fi |
| 1477 |
\IgnorePar\EndP\HCode{<p rend="verbatim">}\EndNoFonts} |
| 1478 |
{\NoFonts \ht:special{t4ht=</p>}\ShowPar\par} |
| 1479 |
{} {} |
| 1480 |
\ConfigureEnv{verbatim*} |
| 1481 |
{\ifinner\else \vfill\break\fi |
| 1482 |
\IgnorePar\EndP\HCode{<p rend="verbatim-star">}\EndNoFonts} |
| 1483 |
{\NoFonts \HCode{</note><p>}\ShowPar\par} |
| 1484 |
{} {} |
| 1485 |
\Configure{verbatim}{\:nbsp}{\a:sp} |
| 1486 |
>>> |
| 1487 |
|
| 1488 |
|
| 1489 |
\<latex environments\><<< |
| 1490 |
\ConfigureEnv{flushleft} |
| 1491 |
{\IgnorePar\EndP\HCode{<div type="flushleft">}% |
| 1492 |
\gHAdvance\P:level by 1 } |
| 1493 |
{\IgnorePar\EndP\gHAdvance\P:level by -1 \HCode{</div>}} |
| 1494 |
{}{} |
| 1495 |
\ConfigureEnv{flushright} |
| 1496 |
{\IgnorePar\EndP\HCode{<div type="flushright">}% |
| 1497 |
\gHAdvance\P:level by 1 } |
| 1498 |
{\IgnorePar\EndP\gHAdvance\P:level by -1 \HCode{</div>}} |
| 1499 |
{}{} |
| 1500 |
\ConfigureList{flushleft} |
| 1501 |
{}{} |
| 1502 |
{} {\par\ShowPar} |
| 1503 |
\ConfigureList{flushright} |
| 1504 |
{}{} |
| 1505 |
{} {\par\ShowPar} |
| 1506 |
>>> |
| 1507 |
|
| 1508 |
|
| 1509 |
\<article,report\><<< |
| 1510 |
\ConfigureEnv{abstract} |
| 1511 |
{\IgnorePar\EndP\HCode{<div type="abstract">}% |
| 1512 |
\gHAdvance\P:level by 1 } |
| 1513 |
{\IgnorePar\EndP\gHAdvance\P:level by -1 \HCode{</div>}} |
| 1514 |
{\HCode{<head>}} |
| 1515 |
{\HCode{</head>}} |
| 1516 |
>>> |
| 1517 |
|
| 1518 |
|
| 1519 |
\<tex4ht paragraphs\><<< |
| 1520 |
\newif\ifHCond |
| 1521 |
\Configure{HtmlPar} |
| 1522 |
{\EndP\HCode{<!--l. \the\inputlineno-->% |
| 1523 |
\ifnum\P:level=0 <div type="p">\fi |
| 1524 |
<p>}\gHAdvance\P:level by 1 } |
| 1525 |
{\EndP\HCode{<!--l. \the\inputlineno-->% |
| 1526 |
\ifnum\P:level=0 <div type="p">\fi |
| 1527 |
<p>}\gHAdvance\P:level by 1 } |
| 1528 |
{\gHAdvance\P:level by -1 \HCode{</p>\ifnum\P:level=0 </div>\fi }} |
| 1529 |
{\gHAdvance\P:level by -1 \HCode{</p>\ifnum\P:level=0 </div>\fi }} |
| 1530 |
>>> |
| 1531 |
|
| 1532 |
|
| 1533 |
|
| 1534 |
|
| 1535 |
|
| 1536 |
|
| 1537 |
\<latex etc\><<< |
| 1538 |
\Configure{newline}{\HCode{<!--br/-->}} |
| 1539 |
>>> |
| 1540 |
|
| 1541 |
\<configure tei-mml latex\><<< |
| 1542 |
\Configure{newline} |
| 1543 |
{\ifmtext \HCode{</mtext><mtext class="newline">}% |
| 1544 |
\else \HCode{<!--br role="newline" /-->}\fi} |
| 1545 |
>>> |
| 1546 |
|
| 1547 |
|
| 1548 |
|
| 1549 |
\<latex etc\><<< |
| 1550 |
\ConfigureEnv{minipage} |
| 1551 |
{\IgnorePar\EndP\HCode{<note rend="minipage">}} |
| 1552 |
{\IgnorePar\EndP\HCode{</note>}\ShowPar} |
| 1553 |
{}{} |
| 1554 |
\Configure{newtheorem} |
| 1555 |
{\IgnorePar\EndP\HCode{<note rend="newtheorem"><title>}} |
| 1556 |
{\HCode{</title>}\ShowPar\par} |
| 1557 |
{\IgnorePar\EndP\HCode{</note>}\ShowPar\par} |
| 1558 |
>>> |
| 1559 |
|
| 1560 |
|
| 1561 |
|
| 1562 |
|
| 1563 |
\<ams art,proc,book\><<< |
| 1564 |
\ifx \deferred@thm@head\:UnDef\else |
| 1565 |
|<shared ams thm/cls|> |
| 1566 |
\fi |
| 1567 |
>>> |
| 1568 |
|
| 1569 |
\<configure tei amsthm\><<< |
| 1570 |
|<shared ams thm/cls|> |
| 1571 |
>>> |
| 1572 |
|
| 1573 |
\<shared ams thm/cls\><<< |
| 1574 |
\Configure{proof} |
| 1575 |
{\IgnorePar\EndP\HCode{<note rend="proof"><title>}} |
| 1576 |
{\HCode{</title>}\ShowPar\par} |
| 1577 |
{\IgnorePar\EndP\HCode{</note>}\ShowPar\par} |
| 1578 |
>>> |
| 1579 |
|
| 1580 |
|
| 1581 |
|
| 1582 |
|
| 1583 |
\<tex4ht cross-linking\><<< |
| 1584 |
\Configure{Link}{ref}{ target=}{ id=}{\empty} |
| 1585 |
>>> |
| 1586 |
|
| 1587 |
\<configure tei url\><<< |
| 1588 |
\Decl{<!NOTATION URL SYSTEM "" >} |
| 1589 |
\Configure{url}{% |
| 1590 |
\urlLink[xr-ent\ent:cnt]{}{}#1\EndurlLink |
| 1591 |
\Decl{<!ENTITY xr-ent\ent:cnt\space SYSTEM "#1" NDATA URL>}% |
| 1592 |
\gHAdvance\ent:cnt by 1 |
| 1593 |
} |
| 1594 |
\LinkCommand\urlLink{xref,doc} |
| 1595 |
>>> |
| 1596 |
|
| 1597 |
xr-ent has to be a notation-type entity to fit with TEI's demand |
| 1598 |
of `\verb+doc ENTITY #IMPLIED+'. For instance, |
| 1599 |
|
| 1600 |
\begin{verbatim} |
| 1601 |
<!NOTATION URL SYSTEM ""> |
| 1602 |
<!ENTITY xr-ent0 SYSTEM |
| 1603 |
"http://wwwinfo.cern.ch/asdoc/geant/geantall.html" NDATA URL> |
| 1604 |
\end{verbatim} |
| 1605 |
|
| 1606 |
% \Decl{<!ATTLIST figure width CDATA \#IMPLIED>} |
| 1607 |
% \Decl{<!ATTLIST figure height CDATA \#IMPLIED>} |
| 1608 |
|
| 1609 |
|
| 1610 |
\<configure tei-mmltei graphics\><<< |
| 1611 |
\def\:tempc#1{% |
| 1612 |
\Configure{graphics*} |
| 1613 |
{#1} |
| 1614 |
{\HCode{<figure entity="fg-ent\ent:cnt" |
| 1615 |
width="\the\Gin@req@width" |
| 1616 |
height="\the\Gin@req@height" />}% |
| 1617 |
\Decl{<!ENTITY fg-ent\ent:cnt\space SYSTEM |
| 1618 |
"\csname Gin@base\endcsname" NDATA #1>}% |
| 1619 |
\gHAdvance\ent:cnt by 1 |
| 1620 |
}} |
| 1621 |
|<graphics types|> |
| 1622 |
>>> |
| 1623 |
|
| 1624 |
|
| 1625 |
\<configure tei graphics\><<< |
| 1626 |
\def\:tempc#1{% |
| 1627 |
\Decl{<!NOTATION #1 SYSTEM "" >} |
| 1628 |
\Configure{graphics*} |
| 1629 |
{#1} |
| 1630 |
{\HCode{<figure entity="fg-ent\ent:cnt" />% |
| 1631 |
<!--width="\the\Gin@req@width" |
| 1632 |
height="\the\Gin@req@height"-->}% |
| 1633 |
\Decl{<!ENTITY fg-ent\ent:cnt\space SYSTEM |
| 1634 |
"\csname Gin@base\endcsname.#1" NDATA #1>}% |
| 1635 |
\gHAdvance\ent:cnt by 1 |
| 1636 |
}} |
| 1637 |
|<graphics types|> |
| 1638 |
>>> |
| 1639 |
|
| 1640 |
\<graphics types\><<< |
| 1641 |
\:tempc{eps} |
| 1642 |
\:tempc{jpg} |
| 1643 |
\:tempc{pdf} |
| 1644 |
\:tempc{png} |
| 1645 |
\:tempc{tif} |
| 1646 |
\:tempc{gif} |
| 1647 |
>>> |
| 1648 |
|
| 1649 |
|
| 1650 |
\<configure tei fontmath\><<< |
| 1651 |
\Configure{mathit}{\ifmathml\else \HCode{<hi rend="it">}\fi} |
| 1652 |
{\ifmathml\else \HCode{</hi>}\fi} |
| 1653 |
\Configure{mathbf}{\ifmathml\else \HCode{<hi rend="bf">}\fi} |
| 1654 |
{\ifmathml\else \HCode{</hi>}\fi} |
| 1655 |
\Configure{mathtt}{\ifmathml\else \HCode{<hi rend="tt">}\fi} |
| 1656 |
{\ifmathml\else \HCode{</hi>}\fi} |
| 1657 |
\Configure{mathsf}{\ifmathml\else \HCode{<hi rend="sf">}\fi} |
| 1658 |
{\ifmathml\else \HCode{</hi>}\fi} |
| 1659 |
\Configure{mathrm}{\ifmathml\else \HCode{<hi rend="rm">}\fi} |
| 1660 |
{\ifmathml\else \HCode{</hi>}\fi} |
| 1661 |
>>> |
| 1662 |
|
| 1663 |
\<configure tei fontmath\><<< |
| 1664 |
\Configure{textbf}{\ifmathml\else |
| 1665 |
|<par within font|>\HCode{<hi rend="bf">}\fi} |
| 1666 |
{\ifmathml\else |
| 1667 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1668 |
\Configure{textit}{\ifmathml\else |
| 1669 |
|<par within font|>\HCode{<hi rend="it">}\fi} |
| 1670 |
{\ifmathml\else |
| 1671 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1672 |
\Configure{textrm}{\ifmathml\else |
| 1673 |
|<par within font|>\HCode{<hi rend="rm">}\fi} |
| 1674 |
{\ifmathml\else |
| 1675 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1676 |
\Configure{textup}{\ifmathml\else |
| 1677 |
|<par within font|>\HCode{<hi rend="up">}\fi} |
| 1678 |
{\ifmathml\else |
| 1679 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1680 |
\Configure{textsc}{\ifmathml\else |
| 1681 |
|<par within font|>\HCode{<hi rend="sc">}\fi} |
| 1682 |
{\ifmathml\else |
| 1683 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1684 |
\Configure{textsf}{\ifmathml\else |
| 1685 |
|<par within font|>\HCode{<hi rend="sf">}\fi} |
| 1686 |
{\ifmathml\else |
| 1687 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1688 |
\Configure{textsl}{\ifmathml\else |
| 1689 |
|<par within font|>\HCode{<hi rend="sl">}\fi} |
| 1690 |
{\ifmathml\else |
| 1691 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1692 |
\Configure{texttt}{\ifmathml\else |
| 1693 |
|<par within font|>\HCode{<hi rend="tt">}\fi} |
| 1694 |
{\ifmathml\else |
| 1695 |
\HCode{</hi>}|<end par within font|>\fi} |
| 1696 |
\Configure{emph}{\ifmathml\else |
| 1697 |
|<par within font|>\HCode{<emph>}\fi} |
| 1698 |
{\ifmathml\else |
| 1699 |
\HCode{</emph>}|<end par within font|>\fi} |
| 1700 |
>>> |
| 1701 |
|
| 1702 |
|
| 1703 |
|
| 1704 |
\<par within font\><<< |
| 1705 |
\leavevmode\SaveEndP\bgroup |
| 1706 |
\Configure{HtmlPar} |
| 1707 |
{\HCode{<!--br role="newline" /-->}} |
| 1708 |
{\HCode{<!--br role="newline" /-->}} |
| 1709 |
{}{}% |
| 1710 |
>>> |
| 1711 |
|
| 1712 |
\<end par within font\><<< |
| 1713 |
\egroup \RecallEndP |
| 1714 |
>>> |
| 1715 |
|
| 1716 |
\endinput |