From 6d6621ddda94a8d3eb3fcd67b4dcfc61335d5450 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:47:11 +0000 Subject: trunk/Master/texmf-dist/tex/xmltex/ git-svn-id: svn://tug.org/texlive/trunk@627 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/xmltex/base/iso-8859-1.xmt | 29 + Master/texmf-dist/tex/xmltex/base/iso-8859-2.xmt | 96 + Master/texmf-dist/tex/xmltex/base/koi8-r.xmt | 131 ++ Master/texmf-dist/tex/xmltex/base/langtest.xmt | 32 + Master/texmf-dist/tex/xmltex/base/mathml2.xmt | 191 ++ Master/texmf-dist/tex/xmltex/base/sec.xmt | 42 + Master/texmf-dist/tex/xmltex/base/utf-16.xmt | 4 + Master/texmf-dist/tex/xmltex/base/windows-1250.xmt | 123 + Master/texmf-dist/tex/xmltex/base/xmltex.cfg | 178 ++ Master/texmf-dist/tex/xmltex/base/xmltex.tex | 2400 ++++++++++++++++++++ Master/texmf-dist/tex/xmltex/config/pdfxmltex.ini | 2 + Master/texmf-dist/tex/xmltex/config/xmltex.ini | 1 + .../texmf-dist/tex/xmltex/passivetex/dummyels.sty | 136 ++ Master/texmf-dist/tex/xmltex/passivetex/fotex.sty | 2238 ++++++++++++++++++ Master/texmf-dist/tex/xmltex/passivetex/fotex.xmt | 1664 ++++++++++++++ .../texmf-dist/tex/xmltex/passivetex/mlnames.sty | 448 ++++ .../tex/xmltex/passivetex/nomulticol.sty | 1065 +++++++++ Master/texmf-dist/tex/xmltex/passivetex/tei.xmt | 219 ++ .../tex/xmltex/passivetex/teiprintslides.xmt | 316 +++ .../texmf-dist/tex/xmltex/passivetex/teislides.xmt | 298 +++ Master/texmf-dist/tex/xmltex/passivetex/teixml.sty | 40 + .../tex/xmltex/passivetex/teixmlslides.sty | 63 + .../tex/xmltex/passivetex/ucharacters.sty | 2379 +++++++++++++++++++ .../texmf-dist/tex/xmltex/passivetex/unicode.sty | 577 +++++ Master/texmf-dist/tex/xmltex/xmlplay/play.xmt | 122 + 25 files changed, 12794 insertions(+) create mode 100644 Master/texmf-dist/tex/xmltex/base/iso-8859-1.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/iso-8859-2.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/koi8-r.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/langtest.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/mathml2.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/sec.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/utf-16.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/windows-1250.xmt create mode 100644 Master/texmf-dist/tex/xmltex/base/xmltex.cfg create mode 100644 Master/texmf-dist/tex/xmltex/base/xmltex.tex create mode 100644 Master/texmf-dist/tex/xmltex/config/pdfxmltex.ini create mode 100644 Master/texmf-dist/tex/xmltex/config/xmltex.ini create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/dummyels.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/fotex.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/fotex.xmt create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/mlnames.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/nomulticol.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/tei.xmt create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/teiprintslides.xmt create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/teislides.xmt create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/teixml.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/teixmlslides.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/ucharacters.sty create mode 100644 Master/texmf-dist/tex/xmltex/passivetex/unicode.sty create mode 100644 Master/texmf-dist/tex/xmltex/xmlplay/play.xmt diff --git a/Master/texmf-dist/tex/xmltex/base/iso-8859-1.xmt b/Master/texmf-dist/tex/xmltex/base/iso-8859-1.xmt new file mode 100644 index 00000000000..a8ae88d109c --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/iso-8859-1.xmt @@ -0,0 +1,29 @@ + + + \count@128\relax + + \loop + \bgroup + \uccode`\~\count@ + \uppercase{ + \egroup + \xdef~{\noexpand\utfeightb\string^^c2\string~} + } + \ifnum\count@<191\relax + \advance\count@\@ne + \repeat + + \count@192\relax + \loop + \bgroup + \uccode`\~\count@ + \advance\count@-64 + \uccode`\!\count@ + \uppercase{ + \egroup + \xdef~{\noexpand\utfeightb\string^^c3\string!} + } + \ifnum\count@<255\relax + \advance\count@\@ne + \repeat + diff --git a/Master/texmf-dist/tex/xmltex/base/iso-8859-2.xmt b/Master/texmf-dist/tex/xmltex/base/iso-8859-2.xmt new file mode 100644 index 00000000000..a48a5a8fdf1 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/iso-8859-2.xmt @@ -0,0 +1,96 @@ +\InputCharacter{xA0}{x00A0} +\InputCharacter{xA1}{x0104} +\InputCharacter{xA2}{x02D8} +\InputCharacter{xA3}{x0141} +\InputCharacter{xA4}{x00A4} +\InputCharacter{xA5}{x013D} +\InputCharacter{xA6}{x015A} +\InputCharacter{xA7}{x00A7} +\InputCharacter{xA8}{x00A8} +\InputCharacter{xA9}{x0160} +\InputCharacter{xAA}{x015E} +\InputCharacter{xAB}{x0164} +\InputCharacter{xAC}{x0179} +\InputCharacter{xAD}{x00AD} +\InputCharacter{xAE}{x017D} +\InputCharacter{xAF}{x017B} +\InputCharacter{xB0}{x00B0} +\InputCharacter{xB1}{x0105} +\InputCharacter{xB2}{x02DB} +\InputCharacter{xB3}{x0142} +\InputCharacter{xB4}{x00B4} +\InputCharacter{xB5}{x013E} +\InputCharacter{xB6}{x015B} +\InputCharacter{xB7}{x02C7} +\InputCharacter{xB8}{x00B8} +\InputCharacter{xB9}{x0161} +\InputCharacter{xBA}{x015F} +\InputCharacter{xBB}{x0165} +\InputCharacter{xBC}{x017A} +\InputCharacter{xBD}{x02DD} +\InputCharacter{xBE}{x017E} +\InputCharacter{xBF}{x017C} +\InputCharacter{xC0}{x0154} +\InputCharacter{xC1}{x00C1} +\InputCharacter{xC2}{x00C2} +\InputCharacter{xC3}{x0102} +\InputCharacter{xC4}{x00C4} +\InputCharacter{xC5}{x0139} +\InputCharacter{xC6}{x0106} +\InputCharacter{xC7}{x00C7} +\InputCharacter{xC8}{x010C} +\InputCharacter{xC9}{x00C9} +\InputCharacter{xCA}{x0118} +\InputCharacter{xCB}{x00CB} +\InputCharacter{xCC}{x011A} +\InputCharacter{xCD}{x00CD} +\InputCharacter{xCE}{x00CE} +\InputCharacter{xCF}{x010E} +\InputCharacter{xD0}{x0110} +\InputCharacter{xD1}{x0143} +\InputCharacter{xD2}{x0147} +\InputCharacter{xD3}{x00D3} +\InputCharacter{xD4}{x00D4} +\InputCharacter{xD5}{x0150} +\InputCharacter{xD6}{x00D6} +\InputCharacter{xD7}{x00D7} +\InputCharacter{xD8}{x0158} +\InputCharacter{xD9}{x016E} +\InputCharacter{xDA}{x00DA} +\InputCharacter{xDB}{x0170} +\InputCharacter{xDC}{x00DC} +\InputCharacter{xDD}{x00DD} +\InputCharacter{xDE}{x0162} +\InputCharacter{xDF}{x00DF} +\InputCharacter{xE0}{x0155} +\InputCharacter{xE1}{x00E1} +\InputCharacter{xE2}{x00E2} +\InputCharacter{xE3}{x0103} +\InputCharacter{xE4}{x00E4} +\InputCharacter{xE5}{x013A} +\InputCharacter{xE6}{x0107} +\InputCharacter{xE7}{x00E7} +\InputCharacter{xE8}{x010D} +\InputCharacter{xE9}{x00E9} +\InputCharacter{xEA}{x0119} +\InputCharacter{xEB}{x00EB} +\InputCharacter{xEC}{x011B} +\InputCharacter{xED}{x00ED} +\InputCharacter{xEE}{x00EE} +\InputCharacter{xEF}{x010F} +\InputCharacter{xF0}{x0111} +\InputCharacter{xF1}{x0144} +\InputCharacter{xF2}{x0148} +\InputCharacter{xF3}{x00F3} +\InputCharacter{xF4}{x00F4} +\InputCharacter{xF5}{x0151} +\InputCharacter{xF6}{x00F6} +\InputCharacter{xF7}{x00F7} +\InputCharacter{xF8}{x0159} +\InputCharacter{xF9}{x016F} +\InputCharacter{xFA}{x00FA} +\InputCharacter{xFB}{x0171} +\InputCharacter{xFC}{x00FC} +\InputCharacter{xFD}{x00FD} +\InputCharacter{xFE}{x0163} +\InputCharacter{xFF}{x02D9} diff --git a/Master/texmf-dist/tex/xmltex/base/koi8-r.xmt b/Master/texmf-dist/tex/xmltex/base/koi8-r.xmt new file mode 100644 index 00000000000..1abaae5fefb --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/koi8-r.xmt @@ -0,0 +1,131 @@ +\global\tracingmacros2 +\global\tracingcommands2 + +\InputCharacter{x80}{x2500} +\InputCharacter{x81}{x2502} +\InputCharacter{x82}{x250C} +\InputCharacter{x83}{x2510} +\InputCharacter{x84}{x2514} +\InputCharacter{x85}{x2518} +\InputCharacter{x86}{x251C} +\InputCharacter{x87}{x2524} +\InputCharacter{x88}{x252C} +\InputCharacter{x89}{x2534} +\InputCharacter{x8A}{x253C} +\InputCharacter{x8B}{x2580} +\InputCharacter{x8C}{x2584} +\InputCharacter{x8D}{x2588} +\InputCharacter{x8E}{x258C} +\InputCharacter{x8F}{x2590} +\InputCharacter{x90}{x2591} +\InputCharacter{x91}{x2592} +\InputCharacter{x92}{x2593} +\InputCharacter{x93}{x2320} +\InputCharacter{x94}{x25A0} +\InputCharacter{x95}{x2022} +\InputCharacter{x96}{x221A} +\InputCharacter{x97}{x2248} +\InputCharacter{x98}{x2264} +\InputCharacter{x99}{x2265} +\InputCharacter{x9A}{x00A0} +\InputCharacter{x9B}{x2321} +\InputCharacter{x9C}{x00B0} +\InputCharacter{x9D}{x00B2} +\InputCharacter{x9E}{x00B7} +\InputCharacter{x9F}{x00F7} +\InputCharacter{xA0}{x2550} +\InputCharacter{xA1}{x2551} +\InputCharacter{xA2}{x2552} +\InputCharacter{xA3}{x0451} +\InputCharacter{xA4}{x2553} +\InputCharacter{xA5}{x2554} +\InputCharacter{xA6}{x2555} +\InputCharacter{xA7}{x2556} +\InputCharacter{xA8}{x2557} +\InputCharacter{xA9}{x2558} +\InputCharacter{xAA}{x2559} +\InputCharacter{xAB}{x255A} +\InputCharacter{xAC}{x255B} +\InputCharacter{xAD}{x255C} +\InputCharacter{xAE}{x255D} +\InputCharacter{xAF}{x255E} +\InputCharacter{xB0}{x255F} +\InputCharacter{xB1}{x2560} +\InputCharacter{xB2}{x2561} +\InputCharacter{xB3}{x0401} +\InputCharacter{xB4}{x2562} +\InputCharacter{xB5}{x2563} +\InputCharacter{xB6}{x2564} +\InputCharacter{xB7}{x2565} +\InputCharacter{xB8}{x2566} +\InputCharacter{xB9}{x2567} +\InputCharacter{xBA}{x2568} +\InputCharacter{xBB}{x2569} +\InputCharacter{xBC}{x256A} +\InputCharacter{xBD}{x256B} +\InputCharacter{xBE}{x256C} +\InputCharacter{xBF}{x00A9} +\InputCharacter{xC0}{x044E} +\InputCharacter{xC1}{x0430} +\InputCharacter{xC2}{x0431} +\InputCharacter{xC3}{x0446} +\InputCharacter{xC4}{x0434} +\InputCharacter{xC5}{x0435} +\InputCharacter{xC6}{x0444} +\InputCharacter{xC7}{x0433} +\InputCharacter{xC8}{x0445} +\InputCharacter{xC9}{x0438} +\InputCharacter{xCA}{x0439} +\InputCharacter{xCB}{x043A} +\InputCharacter{xCC}{x043B} +\InputCharacter{xCD}{x043C} +\InputCharacter{xCE}{x043D} +\InputCharacter{xCF}{x043E} +\InputCharacter{xD0}{x043F} +\InputCharacter{xD1}{x044F} +\InputCharacter{xD2}{x0440} +\InputCharacter{xD3}{x0441} +\InputCharacter{xD4}{x0442} +\InputCharacter{xD5}{x0443} +\InputCharacter{xD6}{x0436} +\InputCharacter{xD7}{x0432} +\InputCharacter{xD8}{x044C} +\InputCharacter{xD9}{x044B} +\InputCharacter{xDA}{x0437} +\InputCharacter{xDB}{x0448} +\InputCharacter{xDC}{x044D} +\InputCharacter{xDD}{x0449} +\InputCharacter{xDE}{x0447} +\InputCharacter{xDF}{x044A} +\InputCharacter{xE0}{x042E} +\InputCharacter{xE1}{x0410} +\InputCharacter{xE2}{x0411} +\InputCharacter{xE3}{x0426} +\InputCharacter{xE4}{x0414} +\InputCharacter{xE5}{x0415} +\InputCharacter{xE6}{x0424} +\InputCharacter{xE7}{x0413} +\InputCharacter{xE8}{x0425} +\InputCharacter{xE9}{x0418} +\InputCharacter{xEA}{x0419} +\InputCharacter{xEB}{x041A} +\InputCharacter{xEC}{x041B} +\InputCharacter{xED}{x041C} +\InputCharacter{xEE}{x041D} +\InputCharacter{xEF}{x041E} +\InputCharacter{xF0}{x041F} +\InputCharacter{xF1}{x042F} +\InputCharacter{xF2}{x0420} +\InputCharacter{xF3}{x0421} +\InputCharacter{xF4}{x0422} +\InputCharacter{xF5}{x0423} +\InputCharacter{xF6}{x0416} +\InputCharacter{xF7}{x0412} +\InputCharacter{xF8}{x042C} +\InputCharacter{xF9}{x042B} +\InputCharacter{xFA}{x0417} +\InputCharacter{xFB}{x0428} +\InputCharacter{xFC}{x042D} +\InputCharacter{xFD}{x0429} +\InputCharacter{xFE}{x0427} +\InputCharacter{xFF}{x042A} diff --git a/Master/texmf-dist/tex/xmltex/base/langtest.xmt b/Master/texmf-dist/tex/xmltex/base/langtest.xmt new file mode 100644 index 00000000000..ff4d8a4624d --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/langtest.xmt @@ -0,0 +1,32 @@ + +\XMLelement{langtest} +{} + {\documentclass{article} + \usepackage[OT2,OT1]{fontenc} + \pagestyle{headings} + \begin{document} + \tableofcontents} + {\end{document}} + + +\XMLelement{document} + {\XMLattribute{att}{\langatt}{}}{}{} + +\XMLelement{head} + {}{\xmlgrab}{\section{#1 (\langatt)}} + + +\XMLelement{documento} + {\XMLattribute{att}{\langatt}{}}{}{} + +\XMLelement{cabeçalho} + {}{\xmlgrab}{\section{#1 (\langatt)}} + + +\XMLelement{документ} + {\XMLattribute{атт}{\langatt}{}}{\fontencoding{OT2}\selectfont}{} + +\XMLelement{голова} + {}{\xmlgrab}{\section{\fontencoding{OT2}\selectfont#1 (\langatt)}} + + diff --git a/Master/texmf-dist/tex/xmltex/base/mathml2.xmt b/Master/texmf-dist/tex/xmltex/base/mathml2.xmt new file mode 100644 index 00000000000..1895c725152 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/mathml2.xmt @@ -0,0 +1,191 @@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% mathml2.xmt + +%% Copyright 2003 David Carlisle, Sebastian Rahtz + +%% This file is distributed under the LaTeX Project Public License +%% (LPPL) as found at http://www.latex-project.org/lppl.txt +%% Either version 1.0, or at your option, any later version. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\DeclareNamespace{m}{http://www.w3.org/1998/Math/MathML} + + +\XMLstring\att@BLOCK<>block +\XMLstring\att@PREFIX<>prefix +\XMLstring\att@EQUATION<>equation + +\XMLname{m:math}{\MATH} +\XMLname{m:mlabeledtr}{\LABELEDTR} + +\XMLnamespaceattribute{m}{open}{\XML@fenceopen}{(} +\XMLnamespaceattribute{m}{close}{\XML@fenceclose}{)} +\XMLnamespaceattribute{m}{width}{\XML@mspacewidth}{0} + +\XMLelement{m:math} + {\XMLattribute{display}{\XML@mathmlmode}{foo} + } + {\def\GATHER{1}% + \ifx\XML@mathmlmode\att@BLOCK\[\else\(\fi + } + { + \ifx\XML@mathmlmode\att@BLOCK\]\else\)\fi + } + + +\XMLelement{m:mi} + {} + {\xmlgrab} + {\def\a{#1}\mi@test#1\relax} + +\gdef\mi@test#1#2\relax{ + \ifx\mi@test#2\mi@test + \expandafter#1 + \else + \mathrm{#1#2} + \fi} + +\XMLelement{m:mn} + {} + {\xmlgrab} + {\mathrm{#1}} + +\XMLelement{m:mo} + {\XMLattribute{form}{\XML@mathmlform}{inline}} + {\xmlgrab} + {\ifx\XML@mathmlform\att@PREFIX + \mathop{{\operator@font #1}}% + \else + #1% + \fi + } + +\XMLelement{m:mrow} + {} + {} + {} + + +\XMLelement{m:msub} + {} + {\xmlgrab} + {\xmltextwochildren\@firstofone\sb#1} + +\XMLelement{m:msup} + {} + {\xmlgrab} + {\xmltextwochildren\@firstofone\sp#1} + + +\XMLelement{m:msubsup} + {} + {\xmlgrab} + {\xmltexthreechildren\@firstofone\sb\sp#1} + +\XMLelement{m:mroot} + {} + {\xmlgrab} + {\xmltextwochildren\mathmlroot{}#1} + +\gdef\mathmlroot#1#2{\root#2\of{#1}} + + +\XMLelement{m:mfrac} + {} + {\xmlgrab} + {\xmltextwochildren\frac{}#1} + + +\XMLelement{m:msqrt} + {} + {\xmlgrab} + {\sqrt{#1}} + +\XMLelement{m:mtext} + {} + {\xmlgrab} + {\hbox{#1}} + + +\XMLelement{m:mover} + {} + {\xmlgrab} + {\xmltextwochildren\mathmlmover{}#1} +\XMLelement{m:munder} + {} + {\xmlgrab} + {\xmltextwochildren\mathmlmunder{}#1} + +\gdef\mathmlmover#1#2{\overset{#2}{#1}} +\gdef\mathmlmunder#1#2{\underset{#2}{#1}} + +% \DeclareMathDelimiter{{}{\mathopen} {operators}{"28}{largesymbols}{"00} +\global\delcode`{"66308 +\global\delcode`}"67309 + +\XMLelement{m:mfenced} + { } + {\left\XML@fenceopen} + {\right\XML@fenceclose} + +\XMLelement{m:mtable} + {\XMLattribute{class}{\XML@mtableclass}{}} + { + \def\StartTable{1}% + \def\LABELED{0}% + \ifx\XML@mtableclass\att@EQUATION + \def\GATHER{1}% + \begin{gathered} + \else + \def\GATHER{0}% + \begin{array}{*{99}{c}} + \fi + } + { + \ifx\XML@mtableclass\att@EQUATION + \end{gathered} + \else + \end{array} + \fi + } + + +\XMLelement{m:mtr} + {} + {\xmlgrab} + {\ifnum\StartTable=1 + \gdef\temp{#1\def\StartTable{0}}% + \else + \gdef\temp{\\#1}% + \fi + \aftergroup\temp} + +\XMLelement{m:mlabeledtr} + {} + {\xmlgrab} + {\xmltextwochildren{\tag*}\@firstofone#1\gdef\temp{\\}\aftergroup\temp} + +\XMLelement{m:mtd} + {} + {\xmlgrab} + {\ifnum\GATHER=1 + \gdef\temp{#1}% + \else + \gdef\temp{#1\tabcellsep}% + \fi + \aftergroup\temp + } + +\XMLelement{m:munderover} + {} + {} + {} + +\XMLelement{m:mspace} + {} + {} + {\@defaultunits\dimen@\XML@mspacewidth pt\relax\@nnil + \ifnum\dimen@=\z@\else\kern\dimen@\fi} + diff --git a/Master/texmf-dist/tex/xmltex/base/sec.xmt b/Master/texmf-dist/tex/xmltex/base/sec.xmt new file mode 100644 index 00000000000..74f44231be1 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/sec.xmt @@ -0,0 +1,42 @@ + +\DeclareNamespace{dpcsec}{http://www.dcarlisle.demon.co.uk/sec} + + +\XMLelement{dpcsec:doc} +{} + {\documentclass{article} + \usepackage[TS1,T1]{fontenc} + \usepackage{color,textcomp} + \textheight15\baselineskip + \parskip1\baselineskip plus \baselineskip + \pagestyle{headings} + \begin{document} + \tableofcontents} + {\end{document}} + +\XMLelement{dpcsec:sec} +{} + {} + {} + +\XMLelement{dpcsec:head} +{} + {\xmlgrab} + {\section{{\tt aaa} #1}} + +\XMLelement{dpcsec:p} +{} +{\par} + {\par} + + +\XMLelement{dpcsec:tt} +{} +{\ttfamily} +{} + +\XMLelement{dpcsec:it} +{} +{\itshape} +{\/} + diff --git a/Master/texmf-dist/tex/xmltex/base/utf-16.xmt b/Master/texmf-dist/tex/xmltex/base/utf-16.xmt new file mode 100644 index 00000000000..8efd4363b8c --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/utf-16.xmt @@ -0,0 +1,4 @@ +% not a serious implementation + +\input iso-8859-1.xmt +\catcode0=9 \ No newline at end of file diff --git a/Master/texmf-dist/tex/xmltex/base/windows-1250.xmt b/Master/texmf-dist/tex/xmltex/base/windows-1250.xmt new file mode 100644 index 00000000000..5ce7b9f8af6 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/windows-1250.xmt @@ -0,0 +1,123 @@ +\InputCharacter{x80}{x20AC} +\InputCharacter{x82}{x201A} +\InputCharacter{x84}{x201E} +\InputCharacter{x85}{x2026} +\InputCharacter{x86}{x2020} +\InputCharacter{x87}{x2021} +\InputCharacter{x89}{x2030} +\InputCharacter{x8A}{x0160} +\InputCharacter{x8B}{x2039} +\InputCharacter{x8C}{x015A} +\InputCharacter{x8D}{x0164} +\InputCharacter{x8E}{x017D} +\InputCharacter{x8F}{x0179} +\InputCharacter{x91}{x2018} +\InputCharacter{x92}{x2019} +\InputCharacter{x93}{x201C} +\InputCharacter{x94}{x201D} +\InputCharacter{x95}{x2022} +\InputCharacter{x96}{x2013} +\InputCharacter{x97}{x2014} +\InputCharacter{x99}{x2122} +\InputCharacter{x9A}{x0161} +\InputCharacter{x9B}{x203A} +\InputCharacter{x9C}{x015B} +\InputCharacter{x9D}{x0165} +\InputCharacter{x9E}{x017E} +\InputCharacter{x9F}{x017A} +\InputCharacter{xA0}{x00A0} +\InputCharacter{xA1}{x02C7} +\InputCharacter{xA2}{x02D8} +\InputCharacter{xA3}{x0141} +\InputCharacter{xA4}{x00A4} +\InputCharacter{xA5}{x0104} +\InputCharacter{xA6}{x00A6} +\InputCharacter{xA7}{x00A7} +\InputCharacter{xA8}{x00A8} +\InputCharacter{xA9}{x00A9} +\InputCharacter{xAA}{x015E} +\InputCharacter{xAB}{x00AB} +\InputCharacter{xAC}{x00AC} +\InputCharacter{xAD}{x00AD} +\InputCharacter{xAE}{x00AE} +\InputCharacter{xAF}{x017B} +\InputCharacter{xB0}{x00B0} +\InputCharacter{xB1}{x00B1} +\InputCharacter{xB2}{x02DB} +\InputCharacter{xB3}{x0142} +\InputCharacter{xB4}{x00B4} +\InputCharacter{xB5}{x00B5} +\InputCharacter{xB6}{x00B6} +\InputCharacter{xB7}{x00B7} +\InputCharacter{xB8}{x00B8} +\InputCharacter{xB9}{x0105} +\InputCharacter{xBA}{x015F} +\InputCharacter{xBB}{x00BB} +\InputCharacter{xBC}{x013D} +\InputCharacter{xBD}{x02DD} +\InputCharacter{xBE}{x013E} +\InputCharacter{xBF}{x017C} +\InputCharacter{xC0}{x0154} +\InputCharacter{xC1}{x00C1} +\InputCharacter{xC2}{x00C2} +\InputCharacter{xC3}{x0102} +\InputCharacter{xC4}{x00C4} +\InputCharacter{xC5}{x0139} +\InputCharacter{xC6}{x0106} +\InputCharacter{xC7}{x00C7} +\InputCharacter{xC8}{x010C} +\InputCharacter{xC9}{x00C9} +\InputCharacter{xCA}{x0118} +\InputCharacter{xCB}{x00CB} +\InputCharacter{xCC}{x011A} +\InputCharacter{xCD}{x00CD} +\InputCharacter{xCE}{x00CE} +\InputCharacter{xCF}{x010E} +\InputCharacter{xD0}{x0110} +\InputCharacter{xD1}{x0143} +\InputCharacter{xD2}{x0147} +\InputCharacter{xD3}{x00D3} +\InputCharacter{xD4}{x00D4} +\InputCharacter{xD5}{x0150} +\InputCharacter{xD6}{x00D6} +\InputCharacter{xD7}{x00D7} +\InputCharacter{xD8}{x0158} +\InputCharacter{xD9}{x016E} +\InputCharacter{xDA}{x00DA} +\InputCharacter{xDB}{x0170} +\InputCharacter{xDC}{x00DC} +\InputCharacter{xDD}{x00DD} +\InputCharacter{xDE}{x0162} +\InputCharacter{xDF}{x00DF} +\InputCharacter{xE0}{x0155} +\InputCharacter{xE1}{x00E1} +\InputCharacter{xE2}{x00E2} +\InputCharacter{xE3}{x0103} +\InputCharacter{xE4}{x00E4} +\InputCharacter{xE5}{x013A} +\InputCharacter{xE6}{x0107} +\InputCharacter{xE7}{x00E7} +\InputCharacter{xE8}{x010D} +\InputCharacter{xE9}{x00E9} +\InputCharacter{xEA}{x0119} +\InputCharacter{xEB}{x00EB} +\InputCharacter{xEC}{x011B} +\InputCharacter{xED}{x00ED} +\InputCharacter{xEE}{x00EE} +\InputCharacter{xEF}{x010F} +\InputCharacter{xF0}{x0111} +\InputCharacter{xF1}{x0144} +\InputCharacter{xF2}{x0148} +\InputCharacter{xF3}{x00F3} +\InputCharacter{xF4}{x00F4} +\InputCharacter{xF5}{x0151} +\InputCharacter{xF6}{x00F6} +\InputCharacter{xF7}{x00F7} +\InputCharacter{xF8}{x0159} +\InputCharacter{xF9}{x016F} +\InputCharacter{xFA}{x00FA} +\InputCharacter{xFB}{x0171} +\InputCharacter{xFC}{x00FC} +\InputCharacter{xFD}{x00FD} +\InputCharacter{xFE}{x0163} +\InputCharacter{xFF}{x02D9} \ No newline at end of file diff --git a/Master/texmf-dist/tex/xmltex/base/xmltex.cfg b/Master/texmf-dist/tex/xmltex/base/xmltex.cfg new file mode 100644 index 00000000000..afe5d0038c0 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/xmltex.cfg @@ -0,0 +1,178 @@ +% +% xmltex Catalogue +\xmltraceoff +\SYSTEM {http://www.oucs.ox.ac.uk/dtds/tei-oucs.dtd} {tei.xmt} +\NAMESPACE{http://www.w3.org/1998/Math/MathML} {mathml2.xmt} +\NAMESPACE{http://www.dcarlisle.demon.co.uk/sec} {sec.xmt} +\NAME{langtest} {langtest.xmt} +\NAME{TEI.2} {tei.xmt} +\NAME{html} {html.xmt} +\NAMESPACE{http://www.w3.org/1999/XSL/Format} {fotex.xmt} + +% latin 1 and cyrillic (using OT2 encoded fonts) only + + +\UnicodeCharacter{160}{\nobreakspace} +\UnicodeCharacter{161}{\textexclamdown } +\UnicodeCharacter{162}{\ifmmode \mbox{\textcent}\else \textcent \fi}% +\UnicodeCharacter{163}{\ifmmode \pounds \else \textsterling \fi}% +\UnicodeCharacter{164}{\ifmmode \mbox{\textcurrency}\else \textcurrency \fi}% +\UnicodeCharacter{165}{\ifmmode \yen \else \textyen \fi}% +\UnicodeCharacter{166}{\ifmmode \textbrokenbar \else \textbrokenbar \fi}% +\UnicodeCharacter{167}{\ifmmode \S \else \textsection \fi}% +\UnicodeCharacter{168}{\textasciidieresis } +\UnicodeCharacter{169}{\ifmmode \copyright \else \textcopyright \fi}% +\UnicodeCharacter{170}{\textordfeminine } +\UnicodeCharacter{171}{\ifmmode \mbox{\guillemotleft}\else \guillemotleft \fi}% +\UnicodeCharacter{172}{\ensuremath{\lnot }} +\UnicodeCharacter{173}{\ensuremath{\-}} +\UnicodeCharacter{174}{\ifmmode \circledR \else \textregistered \fi}% +\UnicodeCharacter{175}{\textasciimacron } +\UnicodeCharacter{176}{\ifmmode \mbox{\textdegree}\else \textdegree \fi}% +\UnicodeCharacter{177}{\ensuremath{\pm }} +\UnicodeCharacter{178}{\ensuremath{{^2}}} +\UnicodeCharacter{179}{\ensuremath{{^3}}} +\UnicodeCharacter{180}{\textasciiacute } +\UnicodeCharacter{181}{\ensuremath{\mathrm{\mu}}} +\UnicodeCharacter{182}{\ifmmode \P \else \textparagraph \fi}% +\UnicodeCharacter{183}{\ensuremath{\cdot }} +\UnicodeCharacter{184}{\ifmmode \mbox{\c{}}\else \c{}\fi}% +\UnicodeCharacter{185}{\ensuremath{{^1}}} +\UnicodeCharacter{186}{\textordmasculine } +\UnicodeCharacter{187}{\ifmmode \mbox{\guillemotright}\else \guillemotright \fi}% +\UnicodeCharacter{188}{\textonequarter } +\UnicodeCharacter{189}{\textonehalf } +\UnicodeCharacter{190}{\textthreequarters } +\UnicodeCharacter{191}{\textquestiondown } +\UnicodeCharacter{192}{\ifmmode \grave{A}\else \`{A}\fi}% +\UnicodeCharacter{193}{\ifmmode \acute{A}\else \'{A}\fi}% +\UnicodeCharacter{194}{\ifmmode \hat{A}\else \^{A}\fi}% +\UnicodeCharacter{195}{\ifmmode \tilde{A}\else \~{A}\fi}% +\UnicodeCharacter{196}{\ifmmode \ddot{A}\else \"{A}\fi}% +\UnicodeCharacter{197}{\AA } +\UnicodeCharacter{198}{\AE } +\UnicodeCharacter{199}{\ifmmode \mbox{\c{C}}\else \c{C}\fi}% +\UnicodeCharacter{200}{\ifmmode \grave{E}\else \`{E}\fi}% +\UnicodeCharacter{201}{\ifmmode \acute{E}\else \'{E}\fi}% +\UnicodeCharacter{202}{\ifmmode \hat{E}\else \^{E}\fi}% +\UnicodeCharacter{203}{\ifmmode \ddot{E}\else \"{E}\fi}% +\UnicodeCharacter{204}{\ifmmode \grave{I}\else \`{I}\fi}% +\UnicodeCharacter{205}{\ifmmode \acute{I}\else \'{I}\fi}% +\UnicodeCharacter{206}{\ifmmode \hat{I}\else \^{I}\fi}% +\UnicodeCharacter{207}{\ifmmode \ddot{I}\else \"{I}\fi}% +\UnicodeCharacter{208}{\DH } +\UnicodeCharacter{209}{\ifmmode \tilde{N}\else \~{N}\fi}% +\UnicodeCharacter{210}{\ifmmode \grave{O}\else \`{O}\fi}% +\UnicodeCharacter{211}{\ifmmode \acute{O}\else \'{O}\fi}% +\UnicodeCharacter{212}{\ifmmode \hat{O}\else \^{O}\fi}% +\UnicodeCharacter{213}{\ifmmode \tilde{O}\else \~{O}\fi}% +\UnicodeCharacter{214}{\ifmmode \ddot{O}\else \"{O}\fi}% +\UnicodeCharacter{215}{\ifmmode \times \else \texttimes \fi}% +\UnicodeCharacter{216}{\O } +\UnicodeCharacter{217}{\ifmmode \grave{U}\else \`{U}\fi}% +\UnicodeCharacter{218}{\ifmmode \acute{U}\else \'{U}\fi}% +\UnicodeCharacter{219}{\ifmmode \hat{U}\else \^{U}\fi}% +\UnicodeCharacter{220}{\ifmmode \ddot{U}\else \"{U}\fi}% +\UnicodeCharacter{221}{\ifmmode \acute{Y}\else \'{Y}\fi}% +\UnicodeCharacter{222}{\TH } +\UnicodeCharacter{223}{\ss } +\UnicodeCharacter{224}{\ifmmode \grave{a}\else \`{a}\fi}% +\UnicodeCharacter{225}{\ifmmode \acute{a}\else \'{a}\fi}% +\UnicodeCharacter{226}{\ifmmode \hat{a}\else \^{a}\fi}% +\UnicodeCharacter{227}{\ifmmode \tilde{a}\else \~{a}\fi}% +\UnicodeCharacter{228}{\ifmmode \ddot{a}\else \"{a}\fi}% +\UnicodeCharacter{229}{\aa } +\UnicodeCharacter{230}{\ae } +\UnicodeCharacter{231}{\ifmmode \mbox{\c{c}}\else \c{c}\fi}% +\UnicodeCharacter{232}{\ifmmode \grave{e}\else \`{e}\fi}% +\UnicodeCharacter{233}{\ifmmode \acute{e}\else \'{e}\fi}% +\UnicodeCharacter{234}{\ifmmode \hat{e}\else \^{e}\fi}% +\UnicodeCharacter{235}{\ifmmode \ddot{e}\else \"{e}\fi}% +\UnicodeCharacter{236}{\ifmmode \grave{\imath}\else \`{\i}\fi}% +\UnicodeCharacter{237}{\ifmmode \acute{\imath}\else \'{\i}\fi}% +\UnicodeCharacter{238}{\ifmmode \hat{\imath}\else \^{\i}\fi}% +\UnicodeCharacter{239}{\ifmmode \ddot{\imath}\else \"{\i}\fi}% +\UnicodeCharacter{240}{\dh } +\UnicodeCharacter{241}{\ifmmode \tilde{n}\else \~{n}\fi}% +\UnicodeCharacter{242}{\ifmmode \grave{o}\else \`{o}\fi}% +\UnicodeCharacter{243}{\ifmmode \acute{o}\else \'{o}\fi}% +\UnicodeCharacter{244}{\ifmmode \hat{o}\else \^{o}\fi}% +\UnicodeCharacter{245}{\ifmmode \tilde{o}\else \~{o}\fi}% +\UnicodeCharacter{246}{\ifmmode \ddot{o}\else \"{o}\fi}% +\UnicodeCharacter{247}{\ensuremath{\div }} +\UnicodeCharacter{248}{\o } +\UnicodeCharacter{249}{\ifmmode \grave{u}\else \`{u}\fi}% +\UnicodeCharacter{250}{\ifmmode \acute{u}\else \'{u}\fi}% +\UnicodeCharacter{251}{\ifmmode \hat{u}\else \^{u}\fi}% +\UnicodeCharacter{252}{\ifmmode \ddot{u}\else \"{u}\fi}% +\UnicodeCharacter{253}{\ifmmode \acute{y}\else \'{y}\fi}% +\UnicodeCharacter{254}{\th } +\UnicodeCharacter{255}{\ifmmode \ddot{y}\else \"{y}\fi}% + + +\UnicodeCharacter{x044E}{yu} +\UnicodeCharacter{x0430}{a} +\UnicodeCharacter{x0431}{b} +\UnicodeCharacter{x0446}{ts} +\UnicodeCharacter{x0434}{d} +\UnicodeCharacter{x0435}{e} +\UnicodeCharacter{x0444}{f} +\UnicodeCharacter{x0433}{g} +\UnicodeCharacter{x0445}{kh} +\UnicodeCharacter{x0438}{i} +\UnicodeCharacter{x0439}{{\u\i}} +\UnicodeCharacter{x043A}{k} +\UnicodeCharacter{x043B}{l} +\UnicodeCharacter{x043C}{m} +\UnicodeCharacter{x043D}{n} +\UnicodeCharacter{x043E}{o} +\UnicodeCharacter{x043F}{p} +\UnicodeCharacter{x044F}{ya} +\UnicodeCharacter{x0440}{r} +\UnicodeCharacter{x0441}{s} +\UnicodeCharacter{x0442}{t} +\UnicodeCharacter{x0443}{u} +\UnicodeCharacter{x0436}{zh} +\UnicodeCharacter{x0432}{v} +\UnicodeCharacter{x044C}{{\cprime}} +\UnicodeCharacter{x044B}{y} +\UnicodeCharacter{x0437}{z} +\UnicodeCharacter{x0448}{sh} +\UnicodeCharacter{x044D}{{\`e}} +\UnicodeCharacter{x0449}{shch} +\UnicodeCharacter{x0447}{ch} +\UnicodeCharacter{x044A}{{\cdprime}} +\UnicodeCharacter{x042E}{YU} +\UnicodeCharacter{x0410}{A} +\UnicodeCharacter{x0411}{B} +\UnicodeCharacter{x0426}{TS} +\UnicodeCharacter{x0414}{D} +\UnicodeCharacter{x0415}{E} +\UnicodeCharacter{x0424}{F} +\UnicodeCharacter{x0413}{G} +\UnicodeCharacter{x0425}{KH} +\UnicodeCharacter{x0418}{I} +\UnicodeCharacter{x0419}{{\U\I}} +\UnicodeCharacter{x041A}{K} +\UnicodeCharacter{x041B}{L} +\UnicodeCharacter{x041C}{M} +\UnicodeCharacter{x041D}{N} +\UnicodeCharacter{x041E}{O} +\UnicodeCharacter{x041F}{P} +\UnicodeCharacter{x042F}{YA} +\UnicodeCharacter{x0420}{R} +\UnicodeCharacter{x0421}{S} +\UnicodeCharacter{x0422}{T} +\UnicodeCharacter{x0423}{U} +\UnicodeCharacter{x0416}{ZH} +\UnicodeCharacter{x0412}{V} +\UnicodeCharacter{x042C}{{\CPRIME}} +\UnicodeCharacter{x042B}{Y} +\UnicodeCharacter{x0417}{Z} +\UnicodeCharacter{x0428}{SH} +\UnicodeCharacter{x042D}{{\`E}} +\UnicodeCharacter{x0429}{SHCH} +\UnicodeCharacter{x0427}{CH} +\UnicodeCharacter{x042A}{{\CDPRIME}} + + diff --git a/Master/texmf-dist/tex/xmltex/base/xmltex.tex b/Master/texmf-dist/tex/xmltex/base/xmltex.tex new file mode 100644 index 00000000000..70a41b40e19 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/base/xmltex.tex @@ -0,0 +1,2400 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% xmltex.tex + +%% Copyright 2000 David Carlisle, NAG Ltd. +%% re-released by Sebastian Rahtz June 2002 +%% This file is distributed under the LaTeX Project Public License +%% (LPPL) as found at http://www.latex-project.org/lppl.txt +%% Either version 1.0, or at your option, any later version. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\catcode`\{=1 \catcode`\}=2 \catcode`\@=11 \catcode`\#=6 + +\gdef\XML@tempa#1: #2.tex,v #3 #4 #5 #6 #7${ + \def\xmltexversion{#4 v#3 (#6)}} + +\XML@tempa +$Id: xmltex.tex,v 1.9 2002/06/25 rahtz Exp $ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% initial setup so that xmltex independent of any existing format +% even if normally built on top of latex + +\endlinechar-1 + +\catcode`\&=4 +\catcode`\^=7 +\catcode`\_13 +\catcode`\|=14 % +\catcode`\~=13 % + +\ifx\count@\@undefined + \countdef\count@200 % fingers crossed + \countdef\XML@ns@count201\relax + \expandafter\def\csname newcount\endcsname#1{} + \expandafter\def\csname newtoks\endcsname#1{} + \toksdef\toks@200\relax + \toksdef\XML@catalogue201\relax + \toksdef\XML@attribute@toks202\relax + \def\maxdimen{16383.99999pt} + \def\space{ } + \chardef\active13 % + \countdef\z@0 % +\fi +\ifx\@tempcnta\@undefined + \countdef\@tempcnta202 % fingers crossed + \countdef\@tempcntb203 % fingers crossed + \edef\@spaces{\space\space\space\space} + \begingroup + \catcode`\>12 + \gdef\strip@prefix#1>{} + \endgroup +\fi + + +% set up 7bit range +\count@0 +\catcode0=13 +\gdef\XML@tempa{ + \begingroup + \uccode0\count@ + \uppercase{\endgroup + \edef^^@{ + \ifnum\catcode\count@=11 % + \noexpand\utfeightay\else\noexpand\utfeightax\fi + \noexpand^^@} + \expandafter\edef\csname 8:\string^^@\endcsname{\string^^@}} + \ifnum\count@<127\advance\count@1 \expandafter\XML@tempa\fi} +\XML@tempa +\catcode0=9 + +\begingroup +\catcode`\^^M=\active\gdef^^M{\utfeightay^^M} +\catcode`\^=\active\gdef^{\utfeightay^} +\catcode`\_=\active\gdef_{\utfeightay_} +\catcode`\~=\active\gdef~{\utfeightay~} +\catcode`\%=\active\gdef%{\utfeightay%} +\catcode`\$=\active\gdef${\utfeightay$} +\catcode`\#=\active\gdef#{\utfeightay#} +\catcode`\(=1 +\catcode`\)=2 +\catcode`\{=\active\gdef{(\utfeightay{) +\catcode`\}=\active\gdef}(\utfeightay}) +\catcode`\/0 \catcode`\\=\active /gdef\(/utfeightay\) +/endgroup + + + +\long\def\@gobble#1{} +\def\@empty{} + +\ifx\@@end\@undefined + \let\@@end\end +\fi + +\ifx\nfss@catcodes\@undefined + \def\nfss@catcodes{ + \catcode`\\0 + \catcode`\{1 + \catcode`\}2 + \catcode`\%14 + \catcode`\@11 + \catcode`\#6 + \catcode`\"12 + \catcode`\'12 + \catcode`\<12 + \catcode`\=12 + \catcode`\>12 + \catcode`\^7 % + } +\fi + +% This is standard in LaTeX. +\ifx\zap@space\@undefined +\def\zap@space#1 {#1} +\fi + +\newlinechar`\^^J + +\ifx\@@input\@undefined +\let\@@input\input +\def\input#1{\@@input#1 } +\fi +\chardef\active=13 +\chardef\@ne=1 + +% +\ifx\IfFileExists\@undefined + \def\IfFileExists#1#2#3{\def\@filef@und{#1 }#2} +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\immediate\write20{xmltex version: \xmltexversion} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\let\tabcellsep& + +\def\afterfi#1\fi{\fi#1} + + +% set catcodes of low chars to 12 and hight 10 13. +\gdef\XML@tempa#1#2{ + \catcode\count@#2\relax + \ifnum\count@<#1\relax + \advance\count@\@ne + \afterfi + \XML@tempa{#1}{#2} + \fi + } +\count@0\relax +\XML@tempa{`\^^K}{12} + +\count@127\relax +\XML@tempa{255}{13} + + +\def\XML@catcodes{ +% white + \catcode`\ \active + \catcode`\^^M\active + \catcode`\^^I\active +% xml + \catcode`\<\active + \catcode`\>\active + \catcode`\:\active + \catcode`\[\active + \catcode`\]\active + \catcode`\%\active + \catcode`\&\active + \catcode`\"\active + \catcode`\'\active + \catcode`\=\active +% tex + \catcode`\/\active + \catcode`\!\active + \catcode`\?\active + \catcode`\-\active + \catcode`\$\active + \catcode`\{\active + \catcode`\}\active + \catcode`\#\active + \catcode`\_\active + \catcode`\\\active + \catcode`\~\active\def~{\utfeightay~} +% and these are not catcodes + \let\XML@ns@a@\XML@ns@a@xml + \let\XML@ns\XML@ns@xml +} + + +\catcode`\/\active +\catcode`\!\active +\catcode`\?\active +\catcode`\"\active +\catcode`\'\active +\catcode`\<\active +\catcode`\>\active +\catcode`\&\active +\catcode`\_\active +\catcode`\ 10 +\catcode`\^^M\active + + + +%% half baked bom and utf-16 support +\catcode`^^ff\active +\catcode`^^fe\active +\catcode0=9 + +% do this also in everyjob incase a has turned it iff. +\def^^ff^^fe{ + \def\XML@thisencoding{utf-16}} +\def^^fe^^ff{ + \def\XML@thisencoding{utf-16}} + +%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% warnings +\def\XML@warnNI#1{ + {\let\protect\string\utfeight@protect@typeout\message{^^J#1}}} +\def\XML@warn#1{ + {\let\protect\string\utfeight@protect@typeout\message{^^J\XML@w@#1}}} +\let\XML@trace@warn\XML@warn +\let\XML@trace@warnNI\XML@warnNI +\let\XML@trace@warnE\message + +\let\XML@w@\@empty + +% quoted literals +% " or ' +% #1 command to call, gets quoted string as #1 +% #2 " or ' +% " and ' assumed active +\def\XML@quoted#1#2{ + \ifx#2"\expandafter\XML@qq + \else\ifx#2'\expandafter\expandafter\expandafter\XML@q + \else + \ERROR#2 + \fi + \fi + #1} + + +\def\XML@qq#1#2"{#1{#2}} +\def\XML@q#1#2'{#1{#2}} + + +%%%%%%%%%%%%%%%%% + +% < handler + +% / ! ? assumed active +\def\XML@lt@markup#1{ + \catcode`\^^I=10 % + \catcode`\^^M=10 % + \catcode`\ =10 % + \ifx/#1\XML@getend + \else\ifx!#1\XML@getdecl + \else\ifx?#1\XML@getpi + \else\XML@getname#1\@} + +\def\XML@first@lt{ + \let<\XML@lt@markup + \let^^ff\@undefined + \let^^fe\@undefined + \XML@lt@markup} + + +%% reset catcodes +\def\XML@reset{ + \nfss@catcodes + \catcode`\$3 + \catcode`\&4 + \catcode`\^7 + \catcode`\_8 + \catcode`\:12 + \catcode`\!12 + \catcode`\=12 + \catcode`\=12 + \catcode`\|12 + \catcode`\ =10 + \catcode`\~\active\def~{\nobreakspace{}} +% catcodes? + \let\XML@ns@a@\XML@ns@a@tex + \let\XML@ns\XML@ns@tex} + + +%% begin tag +\begingroup + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active +% +% #1 first char of name +% grab the name into an xdef so that derminating string can +% be any of whitespace / or > +\gdef\XML@getname#1\@{ +\fi\fi\fi +\begingroup +\catcode`\^^M\active +\catcode`\^^I\active +\catcode`\ \active +\def {\iffalse{\fi}\XML@getname@} +\let^^M % +\let^^I % +\def/{\iffalse{\fi}\XML@getname@/} +\def>{\iffalse{\fi}\XML@getname@>} +\unrestored@protected@xdef\XML@tempa{\iffalse}\fi#1} + +\endgroup + +% finish the special group for the name xdef, start an XML@begingroup +% for the element, and begin processing any attributes. +\def\XML@getname@{ + \endgroup + \XML@begingroup + \edef\XML@w@{ \XML@w@} + \let\begintag\XML@tempa + \let\XML@parent\XML@this@element + \XML@attribute@toks{} + \XML@getattrib} + +% elements put in an \XML@begingroup which is a not a group at the +% outer level to save save stack, but turns itself into a group +% for nexted elements. +\def\XML@begingroup{ + \def\XML@begingroup{ + \begingroup + \let\XML@begingroup\begingroup + \let\XML@endgroup\endgroup}} + +\let\XML@endgroup\@@end + + + +%% attributes + +% #1 first letter of attribute name, or / or > to finish. +\def\XML@getattrib#1{ + \ifx#1/ + \expandafter\XML@endempty + \else + \ifx#1> + \expandafter\expandafter\expandafter\XML@startelement + \else + \XML@getattrib@a#1 + \fi + \fi} + +\let\XML@@getattrib\XML@getattrib + +\begingroup +\catcode`\:\active +\catcode`\<12 +\catcode`\>12 + +% restore normal XML whitespace regime +% namespace check element name (has to be done after attribute handling) +% trace the element start then `do' the element which might be +% noop, execute package code, or grab, depending. + +\gdef\XML@startelement{ + \XML@default@attributes + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active + \XML@ns\begintag + \edef\XML@this@element{ + \csname XMLNS@\XML@this@prefix\expandafter\endcsname\noexpand: + \XML@this@local} + \XML@trace@warn{<\XML@this@element} + \XML@checkknown + \XML@attrib@trace + \XML@doelement} + +\endgroup + +% This is a noop if tracing turned off, otherwise loop through +% attlist with a typeout on each. +\def\XML@attrib@trace{ + \begingroup + \let\XML@doattribute\XML@doattribute@warn + \def\XMLNS@{0} + \utfeight@protect@typeout + \the\XML@attribute@toks + \XML@trace@warnE{ >} + \endgroup} + +% execute package code for an element start. +\def\XML@doelement{ + \csname + E:\XML@this@element + \endcsname +} + +\begingroup +\catcode`\:\active +\uccode`\~`\^^I% + +% grab element content into a token register. +% has to pass through xdef to normalise encodings. +\uppercase{ +\gdef\XML@grabelement{ +\catcode`\ \active\catcode`\^^M\active\catcode`\^^I\active + \global\XMLgrabtoks\expandafter{ + \the\expandafter\XMLgrabtoks + \expandafter<\XML@this@element~} +% check if I can switch this just once, where grabelement switched. + \begingroup + \let\XML@doattribute\XML@grabattribute + \def\XMLNS@{0} + \expandafter\let\csname XMLNS@0\endcsname\XMLNS@ + \the\XML@attribute@toks + \endgroup +% +\catcode`\ \active\catcode`\^^M\active\catcode`\^^I\active + \global\XMLgrabtoks\expandafter{ + \the\XMLgrabtoks + >} + \XMLgrab@} +} + +% #1 namespace +% #2 local name +% #3 value + +\catcode`\=\active +\gdef\XML@grabattribute#1#2#3{ + \protected@xdef\XML@tempa{\csname XMLNS@#1\endcsname:#2} + \global\XMLgrabtoks\expandafter{ + \the\expandafter\XMLgrabtoks + \XML@tempa="#3" }} +\endgroup + +% #1 should be empty, between the / and the > +% probably should put some internal form here rather than literally adding +% end tag to be reparsed, but this simplifies grab code. +\def\XML@endempty#1>{ + \expandafter\XML@startelement + \expandafter<\expandafter/\begintag>} + + +%% check we know what to do with an element +\def\XML@checkknown{ + \expandafter\ifx +% catcode :? \csname E:\XML@this@element\endcsname + \csname E:\csname XMLNS@\XML@this@prefix\endcsname:\XML@this@local\endcsname + \relax + \let\XML@use\@empty + \ifnum0=\csname XMLNS@\XML@this@prefix\endcsname + \let\XML@NAME\XML@this@local +% prerun catalogue in this case which might coerce element into a new namespace + \the\XML@catalogue + \else + \edef\XML@NAMESPACE{\csname XMLNS@\XML@this@prefix\endcsname} + \fi + \let\XML@NAME\relax + \the\XML@catalogue + \inputonce\XML@use + \expandafter\ifx\csname E:\csname + XMLNS@\XML@this@prefix\endcsname:\XML@this@local\endcsname\relax + \XML@trace@warnE{Undefined} + \fi + \fi} + + + +%% end tag + +\def\XML@getend#1\@#2>{ + \fi +\catcode`\ \active +% removed by Peter Housel housel@acm.org 2000/09/06 +% \catcode`\^^M\active\catcode`\^^I\active + \XML@getend@a#2 \@} + +\begingroup +\catcode`\/=12 +\catcode`\<=12 +\catcode`\>=12 +\catcode`\:=12 + +% namespace normalise element name in end tag. +\gdef\XML@getend@a#1 #2\@{ +\catcode`\ \active\catcode`\^^M\active\catcode`\^^I\active + \def\endtag{#1} + \XML@ns\endtag + \XML@trace@warn{} + \XML@doend +} + +% execute package code for element end. +\gdef\XML@doend{ + \csname + E/:\csname XMLNS@\XML@this@prefix\endcsname:\XML@this@local + \endcsname + \XML@endgroup +% added by Peter Housel housel@acm.org 2000/09/06 + \catcode`\^^M\active \catcode`\^^I\active \catcode`\ \active} +\endgroup + +% flag children: put \@empty after every child element +% used by \xmltextwochildren and friends + +% need active and non active : and / so... +\begingroup +\catcode`\:\active +\uccode`\*=`\: +\uccode`\.=`\/ +\uccode`\a\z@ +\uccode`\b\z@ +\uccode`\c\z@ +\uccode`\d\z@ +\uccode`\e\z@ +\uccode`\n\z@ +\uccode`\r\z@ +\uccode`\o\z@ +\uccode`\t\z@ + +\uppercase{ +\gdef\XML@grabend{ + \ifx\XML@this@level\XML@w@ +% end inner group to restore \XML@doelement and friends + \endgroup + \XML@trace@warn{Grabbed content} + \csname + E.*\csname XMLNS@\XML@this@prefix\endcsname + *\XML@this@local + \expandafter\endcsname\expandafter{ + \the\XMLgrabtoks} + \XML@trace@warn{End grabbed content} + \XML@endgroup +% \XMLstring usage means catcode restoring varies +% must fix this one day, for now use ifnum avoidance +\ifnum\catcode`\^^M=10 +\catcode`\ \active\catcode`\^^M\active\catcode`\^^I\active +\fi + \else + \xdef\XML@tempa{\noexpand<\noexpand/ + \csname XMLNS@\XML@this@prefix\expandafter\endcsname\noexpand: + \XML@this@local + \noexpand> + \ifx\XML@next@level\XML@w@\noexpand\@empty\fi} + \global\XMLgrabtoks\expandafter{ + \the\expandafter\XMLgrabtoks + \XML@tempa} + \XML@endgroup + \expandafter + \XMLgrab@ + \fi}} +\endgroup +%%% + +% syntax for these will probably change. +\def\xmltexfirstchild#1\@empty#2\@{ + #1} +\def\xmltextwochildren#1#2#3\@empty#4\@empty{ + #1{#3}#2{#4}} +\def\xmltexthreechildren#1#2#3#4\@empty#5\@empty#6\@empty{ + #1{#4}#2{#5}#3{#6}} +\def\xmltexforall#1#2{ + \xmltexf@rall#1#2< >\@empty} + +\def\xmltexf@rall#1#2<#3 #4>#5\@empty{ + \ifx\relax#3\relax + \else + \def\xml@name{#3}#1{<#3 #4>#5} + \expandafter\xmltexf@rall\expandafter#1 + \fi} + +% #1 entity name (or tex macro holding same, eg from an attrbute) +% #2 #3 inserted before each compontent +% so #2{GIF}#3{xxx/yyy.gif} +\begingroup +\catcode`\&12 +\catcode`\+12 + +\gdef\NDATAEntity#1{ + \expandafter\expandafter\expandafter + \XML@ndataentity\csname+\endcsname} + +\gdef\XML@ndataentity#1#2#3#4{ + #3{#1}#4{#2}} + +\endgroup + + +%%%%%%% + +% this relies on = being catcode 13. +\begingroup +\catcode`\=\active + +\gdef\XML@getattrib@a#1\fi\fi#2={ + \fi\fi + \XML@set@this@attribute#1#2 \@ + \XML@quoted\XML@attribval} + +\endgroup + +%% remove trailing space from `foo =' +\def\XML@set@this@attribute#1 #2\@{ +% should probably do an edef at this point, and optimise +% later code + \def\XML@this@attribute{#1}} + +% #1 = attribute value +\def\XML@attribval#1{ +% allow for arbitrary catcodes. + \xdef\XML@tempa{\expandafter\strip@prefix\meaning\XML@this@attribute} + \ifx\XML@tempa\XML@ns@decl + \XML@ns@uri{}{#1} + \else + \XML@ns\XML@this@attribute +% catcode avoidance + \edef\XML@this@prefix{\expandafter\strip@prefix\meaning\XML@this@prefix} + \ifx\XML@this@prefix\XML@ns@decl + \XML@ns@uri\XML@this@local{#1} + \else + \begingroup +% check if this still needed with protect setting? +% \def"{\noexpand"} + \utfeight@protect@internal + \xdef\XML@tempa{ + \the\XML@attribute@toks + \noexpand\XML@doattribute{\XML@this@prefix}{\XML@this@local}{#1}} + \endgroup + \XML@attribute@toks\expandafter{\XML@tempa} + \fi + \fi + \XML@getattrib} + + +%% activate attributes + +% this seems over complicated and perhaps I should re-implement. +% currently tries to avoid making a csname for each attribute. +% declaration of attributes provides a normal tex command name +% to access the value in the element code, could have instead +% just had declaration of attribute name and default and used something +% like \attributevalue{html:href} but would need to work out a way +% of resolving prefixes at definition time if this was embedded in +% the element code. (The prefix such as `html' used in the definition +% file isn't known by the time the code is run.) +\def\XML@doattribute@warn#1#2#3{ + \XML@trace@warn{\@spaces\csname XMLNS@#1\endcsname:#2 = \string"#3\string"}} + +% #1 element specific attribute defaults, first token is +% macro for namespace-global attributes (hence \expandafter) +\def\XML@setattributes#1{ + \let\XMLNS@@\XMLNS@ + \def\XMLNS@{0} + \the\expandafter\XML@attribute@toks#1\relax\relax + \let\XMLNS@\XMLNS@@} + +% #1 prefix +% #2 local name +% #3 value +\def\XML@doattribute#1#2#3{ + \xdef\XML@tempa##1{\noexpand##1{ + \noexpand\XML@attrib\csname XMLNS@#1\endcsname:#2\relax}} + \XML@tempa\XML@attrib@x{#3} + \XML@tempa\XML@attrib@y} + +% #1 \XML@attrib qname\relax +% #2 value given in document instance +\def\XML@attrib@x#1#2{ + \gdef\XML@tempb##1#1##2##3##4\relax\relax{ + \def##2{#2} + ##1##4\relax\relax}} + +% #1 \XML@attrib qname\relax +% #2 original attribute defaults +\def\XML@attrib@y#1#2\relax\relax{ + \XML@tempb#2#1\XML@temp@l{6}\relax\relax} + + +% if default is inherit, set it to \relax the first time, otherwise +% let whatever value it has drop through. Note this is inheritance of the +% tex csname declared as the internal access, not of the xml attribute name. +% #1 = junk +% #2 = tex csname +% #3 = attribute default (should be encoding neutral: not normalised) +\def\XML@attrib#1\relax#2#3{ + \ifx\inherit#3\relax% #3 might be empty + \ifx#2\@undefined + \def#2{\relax} + \fi + \else + \def#2{#3} + \fi} + +% any distinguishing value would do... +\let\inherit\XML@attrib + + +\newtoks\XML@attribute@toks + +%%%%% namespace declarations + +\newcount\XML@ns@count + +% need to protect against active chars +\def\XML@ns@decl{xmlns} +\edef\XML@ns@decl{\expandafter\strip@prefix\meaning\XML@ns@decl} + + +% #1 prefix (or empty) +% #2 uri +% globally allocate number to uri if new +% locally alocate prefix to number +% globally allocate number as a prefix (canonical form) +\def\XML@ns@uri#1#2{ + \utfeight@protect@chars + \XML@ns@alloc{#2} + \expandafter\edef\csname XMLNS@#1\endcsname + {\csname XML:#2\endcsname} + \XML@trace@warn{xmlns:#1 = \csname XMLNS@#1\endcsname} + \unprotect@utfeight + } + +% and the same without any prefix +% always use in scope of utfeight protect +% #1 uri +\def\XML@ns@alloc#1{ + \expandafter\ifx\csname XML:#1\endcsname\relax + \global\advance\XML@ns@count\@ne + \expandafter\xdef\csname XML:#1\endcsname{\the\XML@ns@count} + \global\expandafter\let\csname A:\the\XML@ns@count\endcsname\@empty + \XML@trace@warnNI{URI: \csname XML:#1\endcsname\space = #1} + \expandafter\xdef\csname XMLNS@\the\XML@ns@count\endcsname + {\the\XML@ns@count} + \fi} + +% and version for xmt files +\let\DeclareNamespace\XML@ns@uri + +%% namespace support + +%% : is active in xml state but inactive in tex state, so need to do +%% this twice, grrr... +\begingroup +\catcode`\:\active + +% #1 = qname to be split on : +\gdef\XML@ns@xml#1{ + \expandafter\XML@ns@a@xml#1:\@:\\} + +% #1 = prefix (or empty) +% #2 = local name or \@ if no prefix +\gdef\XML@ns@a@xml#1:#2:#3\\{ + \ifx\@#2 + \XML@ns@b{}{#1} + \else + \XML@ns@b{#1}{#2} + \fi} +\endgroup + +% same with inactive : +% #1 = qname to be split on : +\def\XML@ns@tex#1{ + \expandafter\XML@ns@a@tex#1:\@:\\} + +% #1 = prefix (or empty) +% #2 = local name or \@ if no prefix +\def\XML@ns@a@tex#1:#2:#3\\{ + \ifx\@#2 + \XML@ns@b{}{#1} + \else + \XML@ns@b{#1}{#2} + \fi} + +\let\XML@ns@a@\XML@ns@a@tex +\let\XML@ns\XML@ns@tex + +%%%%%%%%%%%%%%%%%%%% + +% nullnamespace +\expandafter\def\csname XML:\endcsname{0} +\expandafter\let\csname A:0\endcsname\@empty +\def\XMLNS@{0} +\expandafter\gdef\csname XMLNS@0\endcsname{0} + +% xml namespace +\let\utfeightax\string +\expandafter\def\csname XML:http://www.w3.org/1998/xml\endcsname{1} +\expandafter\let\csname A:1\endcsname\@empty +\def\XMLNS@xml{1} +\expandafter\gdef\csname XMLNS@1\endcsname{1} +\XML@ns@count1 + +% #1 = prefix or empty +% #2 = local name +\def\XML@ns@b#1#2{ + \begingroup + \utfeight@protect@chars + \xdef\XML@tempa{#1} + \xdef\XML@tempb{#2} + \endgroup + \let\XML@this@prefix\XML@tempa + \let\XML@this@local\XML@tempb + } + +%%%%% +% pi +\begingroup +\catcode`\?\active +\catcode`\ \active +\catcode`\^^M\active +\catcode`\^^I\active + +\gdef\XML@getpi#1\@{ +\fi\fi\fi +\begingroup +\utfeight@protect@chars +\catcode`\ \active +\catcode`\^^M\active +\catcode`\^^I\active +\def?{\endcsname?} +\let \endcsname +\let^^M\endcsname +\let^^I\endcsname +\expandafter\XML@getpi@\csname +Q:} + +\endgroup + +\def\XML@getpi@#1{ + \endgroup + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active + \ifx#1\@undefined + \expandafter\XML@getpi@x + \fi + #1} + +\def\XML@getpi@x#1#2?>{ + \XML@dopi{Undefined}{}} + +% currently ? not reset by XML@reset +\expandafter\def \csname Q:xmltex\endcsname{ + \begingroup + \XML@reset + \catcode`\>\active + \XML@xmltexpi} + + +\gdef\XML@xmltexpi#1?>{ + \endgroup + \XML@dopi{xmltex}{#1}} + + + +% #1 = piname or `piname Undefined' +\def\XML@dopi#1#2{ + \XML@trace@warn{\string} + #2} + +\begingroup +\catcode`\^^I\active + +\gdef\XML@grabpi#1#2{ + \global\XMLgrabtoks\expandafter{ + \the\XMLgrabtoks} + \XMLgrab@} + +\endgroup + + + +%% XML and declarations +% only care about encoding. Ignore version and standalone. + +% #1 content +% #2 end of test code +\begingroup +\catcode`\=\active + +\expandafter\gdef \csname Q:xml\endcsname{ + \catcode`\^^M10 + \catcode`\^^I10 + \catcode`\ 10 % + \XML@xmldecl} + +\gdef\XML@xmldecl#1?>{ + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active + \XML@encoding#1 e="utf-8"\relax} + + +% actually encoding supposed to be after version if it comes at all +% so I could simplify this and get rid of the loop. +\gdef\XML@encoding#1 #2{ + \if\noexpand#2e + \expandafter\XML@encoding@aux + \else + \expandafter\XML@encoding + \fi} + +\gdef\XML@encoding@aux#1={ + \XML@quoted\XML@setenc} + +\endgroup + +% do nothing if newly specied encoding is same as old one +% #1 is name of encoding (upper or lower case, and dubious catcodes +% #2 is junk + +\def\XML@setenc#1#2\relax{ + \lowercase{\gdef\XML@tempa{#1}} + \xdef\XML@tempa{\expandafter\strip@prefix\meaning\XML@tempa} + \ifx\XML@tempa\XML@thisencoding + \else + \ifx\XML@utfeight\XML@tempa + \XML@setutfeight + \else + \let\XML@thisencoding\XML@tempa + \XML@trace@warnNI{Encoding = \XML@thisencoding} + \begingroup + \XML@reset\input{\XML@thisencoding.xmt} + \endgroup + \fi + \fi} + +% public version of same +\def\FileEncoding#1{ + \XML@setenc{#1}\relax} + +% catcode neutral lowercase utf-8 + +\def\XML@utfeight{utf-8} +\edef\XML@utfeight{\expandafter\strip@prefix\meaning\XML@utfeight} + +%% internalise utf8 encoding as needed before every file include. +\begingroup +\catcode`\~13 +\catcode`\"12 +\catcode`\<12 + +\gdef\utfeightloop{ + \uccode`\~\count@ + \expandafter\uppercase\XML@tempa + \advance\count@\@ne + \ifnum\count@<\@tempcnta + \expandafter\utfeightloop + \fi} + +\gdef\XML@setutfeight{ + \ifx\XML@utfeight\XML@thisencoding + \else + \let\XML@thisencoding\XML@utfeight + \XML@trace@warnNI{Encoding = \XML@thisencoding} +% + \begingroup +% + \count@"C2 + \@tempcnta"E0 + \gdef\XML@tempa{{ + \xdef~####1{\noexpand\utfeightb\string~####1}}} + \utfeightloop +% + \count@"E0 + \@tempcnta"F0 + \gdef\XML@tempa{{ + \xdef~####1####2{\noexpand\utfeightc\string~####1####2}}} + \utfeightloop +% + \@tempcnta"F4 + \gdef\XML@tempa{{ + \xdef~####1####2####3{\noexpand\utfeightd\string~####1####2####3}}} + \utfeightloop +% + \endgroup + \fi} + +\endgroup + + +\def\xmlinput#1{ + \IfFileExists{#1} + {\expandafter\XML@xmlinput\expandafter + \XML@setenc\expandafter{\XML@thisencoding}\relax + }{\XML@warn{No file: #1}}} + +\def\XML@xmlinput{ + \def^^ff^^fe{\XML@setenc{utf-16}\relax} + \def^^fe^^ff{\XML@setenc{utf-16}\relax} +% in principle a parsed entity might just be text with no markup +% but the utf16 is so broken anyway don't worry about that. + \let<\XML@first@lt + \XML@setutfeight + \@@input\@filef@und\relax} + +%%%%%%%%%%%%% + +%% declarations +% made safe against active chars. +% #1 = rest of if test +% #2#3 = first two characters after { + \fi\fi\fi + \XML@checkend@subset} + + +% attribute declarations +% #1 = rest of if test + TLIST +% #2 = element name +\def\XML@dec@a#1 #2 { + \fi\fi\fi\fi + \protected@xdef\XML@tempa{#2} + \XML@dec@a@x} + +\gdef\XML@dec@a@x#1 #2{ + \protected@xdef\XML@tempb{#1} + \if(\noexpand#2 + \begingroup + \catcode`\(\active + \expandafter\XML@dec@a@brack + \else + \expandafter\XML@dec@a@type + \fi} + +\begingroup +\catcode`\(\active + +% #1 = enumerated attribute type tokens, up to ) +\gdef\XML@dec@a@brack#1){ + \endgroup + \XML@dec@a@hash} + +\endgroup + +% #1 = junk up to next space token +\def\XML@dec@a@type#1 { + \XML@dec@a@hash} + +\begingroup +\catcode`\$=\catcode`\# +\catcode`\#=12 + +% #1 = nextchar after space, if it is # step to next space +% otherwise look for possible " or ' or > +\gdef\XML@dec@a@hash$1{ + \if\noexpand$1# + \expandafter\XML@dec@a@type + \else + \ifx$1> + \let\ERROR\@undefined + \expandafter\expandafter\expandafter\XML@checkend@subset + \else + \let\ERROR\XML@dec@a@nodef + \XML@dec@a@def$1 + \fi + \fi} + + +\endgroup + +\gdef\XML@dec@a@nodef#1\fi\fi#2{ + \fi\fi + \XML@dec@a@x#1} + + +\def\XML@dec@a@def#1\fi\fi{ + \fi\fi + \XML@quoted\XML@dec@a@default#1} + +\def\XML@dec@a@default#1#2{ + \XML@warn{Default: \XML@tempa\space\XML@tempb="#1"} + \ifx\XML@default@attributes\relax + \let\XML@default@attributes\@empty + \fi + \toks@\expandafter{\XML@default@attributes} + \protected@xdef\XML@default@attributes{ + \the\toks@\noexpand\XML@add@attrib{\XML@tempa}{\XML@tempb}{#1}} +% reusing this wastes some tests but only done in local subset + \XML@dec@a@hash#2 + } + + +\let\XML@default@attributes\relax + +% this comparison is encoding normalised, but namespace unaware, grr. +\def\XML@add@attrib#1#2#3{ + \gdef\XML@tempa{#1} + \ifx\XML@tempa\begintag + \def\XML@this@attribute{#2} +% stop getattrib looking for nexted xml syntax attribute setting. + \let\XML@getattrib\relax + \XML@attribval{#3} + \let\XML@getattrib\XML@@getattrib + \fi} + +%% comment +% - is active +% #1 = rest of if test +% #2 = comment text +\begingroup +\catcode`\-\active +\uppercase{\endgroup +\def\XML@comment#1@#2-->}{ + \fi + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active + \XML@trace@warn{\string} + \XML@comment@} + +\def\XML@comment@{ + \XML@checkend@subset} + +\def\XML@grabcomment@{ + \XMLgrab@} + +%% entity defs + +% #1 = rest of \if test + TITY +% #2 = % or entity name +\begingroup +\catcode`\&=12 +\catcode`\%=13 + +\gdef\XML@entity#1 #2 { + \fi\fi + \ifx%#2 + \def\XML@input{ + \ifx\XML@use\XML@SYSTEM\expandafter\@gobble\else + \noexpand\inputonce\fi} + \expandafter\XML@p@ent + \else + \def\XML@input{\noexpand\xmlinput} + {\utfeight@protect@chars\xdef\XML@ename{}} + \XML@trace@warn{\XML@ename; = } + \expandafter\XML@ent + \fi} + +\endgroup + +% input some file at most once (and ignore arguments that +% expand to empty) +% done in a local group +\def\inputonce#1{ + \expandafter\ifx\csname xmt:#1\endcsname\relax + \global\expandafter\let\csname xmt:#1\endcsname\@ne + \begingroup + \XML@reset +% package files should have their own namespace declarations +% don't want to inherit from some random point when file is loaded. +% in principle should clear all prefix assignments in local scope +% but I don't currently maintain a list of those, and not needed as long +% as package files declare all prefixes used. But do set the default +% namespace back to the null namespace. +% +% should force utf-8 as well. + \def\XMLNS@{0} + \input{#1} + \endgroup + \fi} + +% ignore include of empty filename +\expandafter\let\csname xmt:\endcsname\@ne + +% \noexpand protect against active ascii +\begingroup +\catcode`\%12 +\gdef\XML@p@ent#1 #2{ + {\utfeight@protect@chars\xdef\XML@ename{%#1}} + \XML@trace@warn{\XML@ename; = } + \if\noexpand#2P\XML@E@public + \else\if\noexpand#2S\XML@E@system + \else\XML@E@internal#2} +\endgroup + +% #1 = next char( P or S for external entities) +\def\XML@ent#1{ + \if\noexpand#1P\XML@E@public + \else\if\noexpand#1S\XML@E@system + \else\XML@E@internal#1} + + +\begingroup +\catcode`\:\active + +% special `prefix' that just removes following colon. +\expandafter\gdef\csname XMLNS@*\endcsname#1{} + +\endgroup + +\begingroup +\catcode`\:=12 + +%#1 = " or ' +\gdef\XML@E@internal#1{ + \fi\fi + \begingroup + \let\XML@trace@warn\@gobble + \let\XML@endgroup\endgroup + \let\XML@begingroup\begingroup +% make " or ' close the grab `element'. the nameless close tag is completed +% by the > coming from the ENTITY declaration syntax. +% Using a mangled grab code is a bit complicated but it allows +% catcode 10 simplification in the normal case of element handling +% and allows characters to be correctly normalised to utf8. + \def#1{ +\begingroup +\uccode`\~`\# +\catcode`\~\active +\uppercase{\endgroup +\def\XML@E@internal@#1#2>{ + \expandafter\protected@xdef\csname+\XML@ename\endcsname{#1} + \XML@trace@warn{\@spaces\string"#1\string"} + \XML@checkend@subset}} + +%% check for ]> that ends internal subset +\begingroup +\catcode`\]\active + + +% #1 is next token in local subset (normally < or >) +% after subset finishes % stops being markup, and the package +% relating to any external entity in the doctype is loaded. +\gdef\XML@checkend@subset{ + \catcode`\^^M10 + \catcode`\^^I10 + \catcode`\ 10 % + \XML@checkend@subset@} + +% #1 = next character +\catcode`\%\active +\gdef\XML@checkend@subset@#1#2#3#4{ + \ifx]#1 + \let\XML@w@\@empty + \XML@trace@warn{]} + \gdef%{\utfeightay%} + \let\XML@checkend@subset\relax + \expandafter\XML@loaddoctype + \fi + #1#2#3#4} + +\endgroup + +%% #1#2 just gobble ]> +\def\XML@loaddoctype#1#2{ + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active + \ifx\XML@D@dtd\relax\else + \XML@trace@warn{Doctype Package: \XML@D@dtd} + \inputonce\XML@D@dtd + \fi} + + +% #1 = rest of \if test + PUBLIC +\def\XML@E@public#1 { + \fi + \XML@quoted\XML@E@pubid} + +% #1 = FPI +\def\XML@E@pubid#1{ + \def\XML@PUBLIC{#1} + \edef\XML@PUBLIC{\expandafter\strip@prefix\meaning\XML@PUBLIC} + \XML@quoted\XML@E@systemid} + +% #1 = rest of if test up to SYSTEM +\def\XML@E@system#1 { + \fi\fi + \def\XML@PUBLIC{} + \XML@quoted\XML@E@systemid} + + +% #1 URL +% #2 next token, N or > +\def\XML@E@systemid#1#2{ + \def\XML@SYSTEM{#1} + \let\XML@use\XML@SYSTEM + \XML@trace@warn{\@spaces Public: \XML@PUBLIC} + \XML@trace@warn{\@spaces System: \XML@SYSTEM} + \the\XML@catalogue + \if\noexpand#2N + \expandafter\XML@E@ndata + \else + \afterfi + \XML@E@internal@{\XML@input{\XML@use}}#2 + \fi} + + +% NDATA token terminated by > or white space +% #1 = DATA +% #2 ndata token with possible extra space +\def\XML@E@ndata#1 #2>{\XML@ndata@#2 >} + +% #1 = ndata toke +% #2 = junk +\def\XML@ndata@#1 #2>{ + \XML@E@internal@{{#1}{\XML@use}}>} + + +%% DOCTYPE +% #1 rest of \if test + OCTYPE +% #2 document element name +% #3 P or S or [ or > +% noexpand for P and S, [ assumed active + +\begingroup +\catcode`\[\active + +\gdef\XML@doctype#1 #2 #3{ + \fi\fi\fi\fi\fi + \def\documentelement{#2} + \let\XML@D@dtd\relax + \XML@trace@warn{Document Element: \documentelement} + \if\noexpand#3P\XML@D@public + \else\if\noexpand#3S\XML@D@system + \else\ifx#3[\XML@D@internal + \else%must be > the end + \XML@D@empty + @} + + +\gdef\XML@D@empty @{ + \fi\fi\fi} + +% #1 = rest of \if test + UBLIC +\gdef\XML@D@public#1 { + \fi + \XML@quoted\XML@pubid} + +% #1 = FPI +\gdef\XML@pubid#1{ + \def\XML@PUBLIC{#1} + \edef\XML@PUBLIC{\expandafter\strip@prefix\meaning\XML@PUBLIC} + \XML@quoted\XML@systemid} + + +% #1 = rest of \if test + YSTEM +\gdef\XML@D@system#1 { + \fi\fi + \def\XML@PUBLIC{} + \XML@quoted\XML@systemid} + +% #1 = URI +\gdef\XML@systemid#1{ + \protected@edef\XML@SYSTEM{#1} + \edef\XML@SYSTEM{\expandafter\strip@prefix\meaning\XML@SYSTEM} + \XML@trace@warn{Doctype Public: \XML@PUBLIC} + \XML@trace@warn{Doctype System: \XML@SYSTEM} + \let\XML@use\@empty + \the\XML@catalogue + \let\XML@D@dtd\XML@use + \XML@D@internal@} + +% #1 = rest of if test +\gdef\XML@D@internal#1@{ + \fi\fi\fi + \XML@D@internal@[} + +% #1 = [ for local subset or > for the end. +\catcode`\%\active +\gdef\XML@D@internal@#1{ + \ifx[#1 + \XML@trace@warn{Internal Subset[} + \let%\XML@pcent + \edef\XML@w@{ \XML@w@} + \expandafter\XML@checkend@subset + \else + | it had better be the closing > + \fi} + +\endgroup + + +%%%%%%%%%%%%%%% +%% catalogue support +\newtoks\XML@catalogue + +%% should rationalise this code + +% #1 = FPI +% #2 = xmltex package file +\def\PUBLIC#1#2{ + \xdef\XML@tempa{#1} + \xdef\XML@tempa{\noexpand\the\XML@catalogue\noexpand\XML@@PUBLIC + {\expandafter\strip@prefix\meaning\XML@tempa}} + \global\XML@catalogue\expandafter\expandafter\expandafter{ + \XML@tempa{#2}}} + + +% #1 = URI +% #2 = xmltex package file +\def\SYSTEM#1#2{ + \xdef\XML@tempa{#1} + \xdef\XML@tempa{\noexpand\the\XML@catalogue\noexpand\XML@@SYSTEM + {\expandafter\strip@prefix\meaning\XML@tempa}} + \global\XML@catalogue\expandafter\expandafter\expandafter{ + \XML@tempa{#2}}} + +% #1 = namespace URI +% #2 = xmltex package file +\def\NAMESPACE#1#2{ + \utfeight@protect@chars + \XML@ns@alloc{#1} + \edef\@tempa{{\csname XML:#1\endcsname}} + \global\XML@catalogue\expandafter{\the\expandafter\XML@catalogue + \expandafter\XML@@NAMESPACE\@tempa{#2}} + \unprotect@utfeight} + + +% #1 = unprefixed element name +% #2 = xmltex package file +\def\NAME#1#2{ + \global\XML@catalogue\expandafter{\the\XML@catalogue\XML@@NAME{#1}{#2}}} + +% #1 = unprefixed element name +% #2 = namespace URI +\def\XMLNS#1#2{ + \utfeight@protect@chars + \XML@ns@alloc{#2} + \edef\@tempa{{#1}{\csname XML:#2\endcsname}} + \global\XML@catalogue\expandafter{\the\expandafter\XML@catalogue + \expandafter\XML@@XMLNS\@tempa} + \unprotect@utfeight} + + + +\def\XML@@PUBLIC#1#2{ + \gdef\XML@tempa{#1} + \ifx\XML@tempa\XML@PUBLIC + \def\XML@use{#2} + \fi} + +\def\XML@@SYSTEM#1#2{ + \def\@tempa{#1} + \ifx\@tempa\XML@SYSTEM + \def\XML@use{#2} + \fi} + +\def\XML@@NAMESPACE#1#2{ + \def\@tempa{#1} + \ifx\@tempa\XML@NAMESPACE + \def\XML@use{#2} + \fi} + + +\def\XML@@NAME#1#2{ + \def\@tempa{#1} + \ifx\@tempa\XML@NAME + \def\XML@use{#2} + \fi} + + + +\begingroup +\catcode`\:\active + +\def\XML@@XMLNS#1#2{ + \def\@tempa{#1} + \ifx\@tempa\XML@NAME + \edef\XMLNS@{#2} + \edef\XML@this@element{ + \XMLNS@\noexpand:\XML@this@local} + \XML@trace@warn{ \XML@this@element} + \let\XML@NAMESPACE\XMLNS@ + \fi} +\endgroup + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% entity refs +\begingroup +\catcode`\$=\catcode`\# +\catcode`\#=\active + +\gdef\XML@amp@markup$1$2;{ + \ifx#$1\@empty + \XML@charref$2; + \XML@tempa + \else + \begingroup\utfeight@protect@chars + \expandafter\aftergroup + \csname+\string&$1$2\expandafter\endcsname + \endgroup + \fi} + +\endgroup + +\let&\XML@amp@markup + +\begingroup +\catcode`\%=12 +\catcode`\&=12 + +\gdef\XML@pcent#1;{ + \csname+%#1\endcsname + \XML@checkend@subset} + +\gdef\XMLentity#1#2{ + \expandafter\gdef\csname+\endcsname{#2}} + +\endgroup + +% predefined definitions +\begingroup +\XMLentity{amp}{\utfeightaz&} +\XMLentity{quot}{\utfeightax"} +\XMLentity{apos}{\utfeightax'} +\XMLentity{lt}{\utfeightaz<} +\XMLentity{gt}{\utfeightax>} +\endgroup + +%% character refs + +% longwinded way so can share code later, also need to do d case. +% this does up to x1F FFFF which is higher than needed for XML +% (x10 FFFF) +\begingroup +\catcode`\"=12 +\catcode`\<=12 +\catcode`\.=12 +\catcode`\,=12 +\catcode`\;=12 +\catcode`\!=12 +\catcode`\~=13 + +% definition is of form +% \utfeightX + +% except for non active chars below 128 which are just def of catcode 12 version. +\gdef\XML@charref#1#2;{ + \begingroup + \uppercase{\count@\if x\noexpand#1"\else#1\fi#2}\relax + \ifnum\count@<"80\relax + \uccode`\~\count@ + \uppercase{ + \ifnum\catcode\count@=\active + \gdef\XML@tempa{\utfeightay~} + \else + \gdef\XML@tempa{~} + \fi} + \else\ifnum\count@<"800\relax + \XML@utfeight@a, + \XML@utfeight@b C\utfeightb., + \else\ifnum\count@<"10000\relax + \XML@utfeight@a; + \XML@utfeight@a, + \XML@utfeight@b E\utfeightc.{,;} + \else + \XML@utfeight@a; + \XML@utfeight@a, + \XML@utfeight@a! + \XML@utfeight@b F\utfeightd.{!,;} + \fi + \fi + \fi + \endgroup} + +% while I support mixed tex/xml files I need to have a version +% of { that always fetches the definition even if +% character is currently non active +\global\let\XML@@charref\XML@charref + + +\gdef\XML@charref@tex#1#2;{ + \begingroup + \uppercase{\count@\if x\noexpand#1"\else#1\fi#2}\relax + \ifnum\count@<"80\relax + \uccode`\~\count@ + \uppercase{ + \gdef\XML@tempa{\utfeightay~}} + \else\ifnum\count@<"800\relax + \XML@utfeight@a, + \XML@utfeight@b C\utfeightb., + \else\ifnum\count@<"10000\relax + \XML@utfeight@a; + \XML@utfeight@a, + \XML@utfeight@b E\utfeightc.{,;} + \else + \XML@utfeight@a; + \XML@utfeight@a, + \XML@utfeight@a! + \XML@utfeight@b F\utfeightd.{!,;} + \fi + \fi + \fi + \endgroup} + +\gdef\XML@utfeight@a#1{ + \@tempcnta\count@ + \divide\count@64 + \@tempcntb\count@ + \multiply\count@64 + \advance\@tempcnta-\count@ + \advance\@tempcnta"80 + \uccode`#1\@tempcnta + \count@\@tempcntb} + +\gdef\XML@utfeight@b#1#2#3#4{ + \advance\count@"#10\relax + \uccode`#3\count@ + \uppercase{\gdef\XML@tempa{#2#3#4}}} + + +%%%%%%%%%%%%%%%% + +% #1 unicode slot, either 123 decimal or xA23 hex +% #2 tex definition of character when used as character data. +% code for chars below 127 somewhat experimental +\gdef\UnicodeCharacter#1#2{ + \begingroup +% suppress active test in charref + \def\active{\catcode\count@} + \XML@charref#1; + \expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \expandafter + \gdef\XML@tempa{#2} + \endgroup} + +\endgroup + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newtoks\XMLgrabtoks + +\def\xmlgrab{ + \begingroup + \global\XMLgrabtoks{} + \let\XML@this@level\XML@w@ + \edef\XML@next@level{ \XML@w@} + \let\XML@doelement\XML@grabelement + \let\XML@doend\XML@grabend + \let\XML@docdata\XML@grabcdata + \let\XML@comment@\XML@grabcomment@ + \let\XML@dopi\XML@grabpi + \XMLgrab@} + +\def\XMLgrab@{ + \utfeight@protect@internal + \def<{\iffalse{\fi}\XMLgrab@@} + \xdef\XML@tempa{\iffalse}\fi} + +\def\XMLgrab@@{ + \global\XMLgrabtoks\expandafter{\the\expandafter\XMLgrabtoks\XML@tempa} + \XML@lt@markup} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% cdata +\begingroup +\catcode`\[\active +\catcode`\]\active + +% #1 = DATA +\gdef\XML@cdata #1[{ + \fi\fi\fi\fi\fi\fi + \catcode`\^^M\active + \catcode`\^^I\active + \catcode`\ \active + \XML@cdata@a} + +% #1 = CDADA section text +\gdef\XML@cdata@a#1]]>{ + \begingroup + \XML@trace@warn{CDATA} + \edef<{\noexpand\utfeightaz\string<} + \edef&{\noexpand\utfeightaz\string&} + \XML@docdata{#1}} + +\endgroup + +% #1 = CDADA section text +\def\XML@docdata#1{#1\endgroup} + +% #1 = CDADA section text +\def\XML@grabcdata#1{ + \utfeight@protect@internal + \edef<{\noexpand\utfeightaz\string<} + \edef&{\noexpand\utfeightaz\string&} + \xdef\XML@tempa{#1} + \endgroup + \expandafter\XMLgrab@\XML@tempa} + +%%%%%%%%%% +% notation + +% parse past the public and system ids +% in case they contain a >. +% unlike entities PUBLIC need not have a system id +% #1 junk +% #2 notation name +% #3 PUBLIC or SYSTEM +\def\XML@dec@n#1N #2 #3 { + \fi\fi\fi\fi\fi\fi + \XML@trace@warn{NOTATION #2} + \XML@quoted\XML@notation + } + +\def\XML@notation#1#2{ + \ifx>#2 + \expandafter\XML@checkend@subset + \else + \afterfi + \XML@quoted\XML@notation#2 + \fi} + +%%%%%%%% +%% xmt definitions + +%% #1 element, may use prefix : using prefixes in current scope +%% #2 attlist +%% #3 begin code +%% #4 end code +%% if #3 is \xmlgrab, #4 may access the content of the element as #1 +\long\def\XMLelement#1#2#3#4{ + \XML@ns{#1} + \xdef\XML@tempc{:\csname + XMLNS@\XML@this@prefix\endcsname:\XML@this@local} +% attlist + \toks@\expandafter{\csname A:\csname + XMLNS@\XML@this@prefix\endcsname\endcsname} + #2 + \expandafter\gdef\csname E\XML@tempc\expandafter\endcsname + \expandafter{\expandafter\XML@setattributes\expandafter{\the\toks@}#3} + \gdef\XML@tempa{#3} + \ifx\XML@tempa\XML@xmlgrab + \expandafter\gdef\csname E\string/\XML@tempc\endcsname##1 + {#4} + \else + \expandafter\gdef\csname E\string/\XML@tempc\endcsname + {#4} + \fi} + +\def\XML@xmlgrab{\xmlgrab} + +%% #1 attribute, may use prefix : using prefixes in current scope +%% #2 macro to access attribute in begin or end code +%% #3 default + +\long\def\XMLattribute#1#2#3{ + {\def\XMLNS@{0} + \XML@ns{#1} + \xdef\XML@tempa{\noexpand\XML@attrib + \csname XMLNS@\XML@this@prefix\endcsname + :\XML@this@local\relax\noexpand#2}} + \toks@\expandafter{\the\expandafter\toks@\XML@tempa{#3}}} + +\long\def\XMLattributeX#1#2#3{ + {\def\XMLNS@{0} + \XML@ns{#1} + \xdef\XML@tempa{\noexpand\XML@attrib + \csname XMLNS@\XML@this@prefix\endcsname + :\XML@this@local\relax\noexpand#2}} + \toks@\expandafter{\the\expandafter\toks@\XML@tempa{#3}\utfeight@chardef#2}} + +\def\utfeight@chardef#1{ +\begingroup +\utfeight@protect@chars +\xdef\x@temp{#1} +\endgroup +\let#1\x@temp} + +% version for namespace global attributes, used at top level. +%% #1 prefix for namespace this is for. using prefixes in current scope +%% #2 attribute, may use prefix : using prefixes in current scope +%% #3 macro to access attribute in begin or end code +%% #4 default + +\long\def\XMLnamespaceattribute#1#2#3#4{ + \toks@\expandafter\expandafter\expandafter{\csname A:\csname + XMLNS@#1\endcsname\endcsname} + \XMLattribute{#2}{#3}{#4} + \expandafter\xdef\csname A:\csname + XMLNS@#1\endcsname\endcsname{\the\toks@}} + +\long\def\XMLnamespaceattributeX#1#2#3#4{ + \toks@\expandafter\expandafter\expandafter{\csname A:\csname + XMLNS@#1\endcsname\endcsname} + \XMLattributeX{#2}{#3}{#4} + \expandafter\xdef\csname A:\csname + XMLNS@#1\endcsname\endcsname{\the\toks@}} + + + +%% #1 QName, may use prefix : using prefixes in current scope +%% #2 macro to access attribute in begin or end code +\begingroup +\catcode`\:\active + +\long\gdef\XMLname#1#2{{ + \XML@ns{#1} + \xdef#2{ + \csname XMLNS@\XML@this@prefix\endcsname + \noexpand:\XML@this@local}}} +\endgroup + +\begingroup +\catcode`\<=12 +\catcode`\>=12 +\catcode`\:=12 +\catcode`\/=12 + +\gdef\XMLstring#1#2<>{ + \begingroup + \let\XML@endgroup\endgroup + \let\XML@this@local\@empty + \let\XML@this@prefix\@empty + \expandafter\def\csname + E/:\XMLNS@:\endcsname{ + \gdef#1} + \XML@catcodes + \xmlgrab} + +\gdef\XMLstringX#1#2<>{ + \begingroup + \let\XML@endgroup\endgroup + \let\XML@this@local\@empty + \let\XML@this@prefix\@empty + \expandafter\def\csname + E/:\XMLNS@:\endcsname{ + \xdef#1} + \XML@catcodes + \utfeight@protect@chars + \xmlgrab} + +\endgroup + +%% #1 name +%% #2 code, gets data as #1 +\long\def\XMLProcessInstruction#1#2{ + \expandafter\gdef\csname P:#1\endcsname##1{#2}} + +%%%%%%%%%%% +%% xmltex format support +\everyjob\expandafter{\the\everyjob + \immediate\write20{xmltex version: \xmltexversion:} +\def^^ff^^fe{\XML@setenc{utf-16}\relax} +\def^^fe^^ff{\XML@setenc{utf-16}\relax} +\ActivateASCII{45}% - +\UnicodeCharacter{45}{-\kern\z@} +\let<\XML@first@lt + \IfFileExists{xmltex.cfg} + {\begingroup + \XML@reset + \@@input\@filef@und + \endgroup}{\XML@warn{No File: xmltex.cfg}} + \IfFileExists{\jobname.cfg} + {\begingroup + \XML@reset + \@@input\@filef@und + \endgroup}{\XML@warn{No File: \jobname.cfg}} +} + + +%%%%%%%%%%% +%% not currently used +% +%\def\XML@setlatexcodes{ +%\ifnum\catcode`\&\active +% \let\XML@restore\XML@catcodes +% \let\XML@setlatexcodes\relax +%\fi} +% +%\let\XML@restore\relax + + +%% allow package and class loading with normal latex catcodes + + +\def\@fileswith@pti@ns#1[#2]#3[#4]{ + \XML@reset + \catcode`\^^M5 % + \let\@fileswith@pti@ns\@@fileswith@pti@ns + \@@fileswith@pti@ns{#1}[{#2}]{#3}[{#4}] + \XML@catcodes + \let\@fileswith@pti@ns\XML@@fileswith@pti@ns} + +\let\XML@@fileswith@pti@ns\@fileswith@pti@ns + + + +% and similar for input of aux files +\def\@input#1{ + \XML@reset + \catcode`\^^I\active + \catcode`\<\active + \catcode`\>\active + \catcode`\&\active + \catcode`\#\active + \catcode`\/\active + \catcode`\:\active + \catcode`\=\active + \let\XML@charref\XML@charref@tex + \IfFileExists{#1}{\@@input\@filef@und}{\typeout{No file #1.}} + \XML@catcodes + \let\XML@charref\XML@@charref +} + +% and end doc +\def\enddocument{ + \@enddocumenthook + \@checkend{document} + \clearpage + \begingroup + \if@filesw + \immediate\closeout\@mainaux + \let\@setckpt\@gobbletwo + \let\@newl@bel\@testdef + \@tempswafalse +\XML@reset + \catcode`\^^I\active + \catcode`\<\active + \catcode`\>\active + \catcode`\&\active + \catcode`\#\active + \catcode`\/\active + \catcode`\:\active + \catcode`\=\active + \let\XML@charref\XML@charref@tex + \makeatletter \input\jobname.aux + \fi + \@dofilelist + \ifdim \font@submax \string>\fontsubfuzz\relax + \@font@warning{Size substitutions with differences\MessageBreak + up to \font@submax\space have occured.\@gobbletwo} + \fi + \@defaultsubs + \@refundefined + \if@filesw + \ifx \@multiplelabels \relax + \if@tempswa + \@latex@warning@no@line{Label(s) may have changed. + Rerun to get cross-references right} + \fi + \else + \@multiplelabels + \fi + \fi + \endgroup + \deadcycles\z@\@@end} + + +%% protected write +\long\def \protected@write#1#2#3{ + \begingroup + \let\thepage\relax + #2 + \utfeight@protect@external + \let\protect\@unexpandable@protect + \edef\reserved@a{\write#1{#3}} + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi +} + + +%% typeout etc +\def\set@display@protect{ + \let\protect\string + \utfeight@protect@typeout} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +% xmltex namespace +\expandafter\def\csname + XML:http://www.dcarlisle.demon.co.uk/xmltex\endcsname{2} +\expandafter\let\csname A:2\endcsname\@empty +\expandafter\gdef\csname XMLNS@2\endcsname{2} +\XML@ns@count2 + +\iffalse +% this is some currently used code aiming at having an aux file +% in xml syntax using commands from the xmltex namespace. +% this would avoid some of the problems involved in having +% mixed xml/tex aux files. +\def\addcontentsline#1#2#3{ + \addtocontents{#1}{ + <2:contentsline level="#2"> + <2:toctitle>#3 + <2:page>\thepage + }} + +\long\def\addtocontents#1#2{ + \protected@write\@auxout + {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble} + {<2:@writefile ext="#1">#2}} + +\def\numberline#1{<2:numberline>#1} + +\fi +% end of xml-aux code. + +%%%%%%%%%%%%%%%%%% +% tracing +\long\def\@gobble#1{} +\long\def\@gobbletwo#1#2{} +\long\def\@gobblethree#1#2#3{} + +\def\xmltraceonly{ + \global\hfuzz\maxdimen + \global\nullfont + \global\everypar{} + \global\let\XML@doelement\relax + \global\let\wrong@fontshape\relax + \global\let\selectfont\relax + \expandafter\gdef\expandafter\XML@catcodes\expandafter{\XML@catcodes + \gdef\unprotect@utfeight{ + \let<\XML@lt@markup + \let&\XML@amp@markup + \global\let\utfeightax\@gobble + \global\let\utfeightay\@gobble + \global\let\utfeightaz\@gobble + \global\let\utfeightb\@gobbletwo + \global\let\utfeightc\@gobblethree + \global\let\utfeightd\@gobblefour} + \unprotect@utfeight} + \gdef\XML@doend{\XML@endgroup} + \gdef\XML@docdata##1{\endgroup} + \global\let\XML@dopi\@gobbletwo +} + +\def\xmltraceoff{ + \global\let\XML@trace@warn\@gobble + \global\let\XML@trace@warnNI\@gobble + \global\let\XML@trace@warnE\@gobble + \global\let\XML@attrib@trace\relax} + + +%%%%% +%% xmltex PI +%% +%% +%% content of pi may be a latex command. +%% Arguments may be given in {} as usual +%% Do not use \ . First `word' (ignoring white space) taken as a tex +%% command name. May be a standard latex command, as here, +%% or some special command defined in a cfg file or package. +\begingroup +\catcode`[=1 +\catcode`]=2 +\catcode`\{\active +\catcode`\}\active +\XMLProcessInstruction[xmltex][ + \XML@pi#1{\relax}] + +\gdef\XML@pi#1{#2}[ + \ifx\relax#2 + \csname\zap@space#1 \@empty\expandafter\endcsname + \else + \afterfi + \expandafter + \XML@pi@b\csname\zap@space#1 \@empty\endcsname[#2] + \fi] + +\gdef\XML@pi@b#1{#2}[ + \ifx\relax#2 + #1 + \else + \afterfi + \XML@pi@b#1[#2] + \fi] + +\endgroup + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% unicode support + +% \utfeighta#1 1 byte utf8 char +% \utfeightb#1#2 2 byte utf8 char +% \utfeightc#1#2#3 3 byte utf8 char +% \utfeightd#1#2#3#4 4 byte utf8 char + +\def\unprotect@utfeight{ + \let<\XML@lt@markup + \let&\XML@amp@markup + \def\utfeightax##1{ + \csname 8:\string##1\endcsname} + \let\utfeightay\utfeightax + \let\utfeightaz\utfeightax + \def\utfeightb##1##2{ + \csname 8:##1\string##2\endcsname} + \def\utfeightc##1##2##3{ + \csname 8:##1\string##2\string##3\endcsname} + \def\utfeightd##1##2##3##4{ + \csname 8:##1\string##2\string##3\string##4\endcsname}} + +\unprotect@utfeight + +% do this also in everyjob +\let<\XML@first@lt + + +% for moving internal arguments (not writes) +\def\utfeight@protect@internal{ + \let\utfeightax\noexpand + \let\utfeightay\noexpand + \def\utfeightaz{ + \noexpand\utfeightaz\noexpand} + \let<\relax\let&\relax + \def\utfeightb##1##2{ + \noexpand\utfeightb##1\string##2} + \def\utfeightc##1##2##3{ + \noexpand\utfeightc##1\string##2\string##3} + \def\utfeightd##1##2##3##4{ + \noexpand\utfeightd##1\string##2\string##3\string##4}} + + +% for external files (expands one in an edef and once in a write +\def\utfeight@protect@external{ + \def\utfeightax{ + \noexpand\noexpand\noexpand} + \let\utfeightay\utfeighta@ref + \let\utfeightaz\utfeighta@ref + \edef<{\string<} + \edef&{\string&} + \def\utfeightb##1##2{ + ##1\string##2} + \def\utfeightc##1##2##3{ + ##1\string##2\string##3} + \def\utfeightd##1##2##3##4{ + ##1\string##2\string##3\string##4}} + +% for typeouts and immediate writes and messages +%\def\utfeight@protect@typeout{ +% \let\utfeightax\noexpand +% \let\utfeightay\noexpand +% \let\utfeightaz\utfeighta@ref +% \let<\relax\let&\relax +% \def\utfeightb##1##2{##1\string##2} +% \def\utfeightc##1##2##3{##1\string##2\string##3} +% \def\utfeightd##1##2##3##4{##1\string##2\string##3\string##4}} + +% plan b +\def\utfeight@protect@typeout{ + \utfeight@protect@chars + \let<\relax + \let&\relax} + +% for csname (will fall over < or & but they should not be there) +\def\utfeight@protect@chars{ + \let\utfeightax\string + \let\utfeightay\string + \let\utfeightaz\string + \def\utfeightb##1##2{ + ##1\string##2} + \def\utfeightc##1##2##3{ + ##1\string##2\string##3} + \def\utfeightd##1##2##3##4{ + ##1\string##2\string##3\string##4}} + + +\def\utfeighta@ref#1{ + \string&\string##\number\expandafter`\string#1\string;} + + +%%%%%%%%%%%%%%%%%%%% +%% mapping input encodings to unicode. + + +\begingroup +\catcode`\"=12\relax +\gdef\InputCharacter#1#2{ + \begingroup + \XML@charref#2; + \count@"0\if\noexpand x#1\relax\else\count@#1\fi\relax + \uccode`\~\count@ + \uppercase{ + \global\let~\XML@tempa} + \endgroup} +\endgroup + +%%%%%%%%%%%%%%%%%%%%%%%% +% default encoding + +%% need to change this default if hit BOM or xml or text decl, +\XML@setutfeight + +%%%%%%%%%%%%%%%%%%%%% +% adding xmltex style protection to standard latex commands. +% if xmltex being used with other formats this does no harm +% except take up a bit of space. + +\begingroup +\catcode`\:\active +\catcode`\/\active + +\gdef\markboth#1#2{\gdef\@themark{{#1}{#2}}{ + \utfeight@protect@internal + \let\protect\@unexpandable@protect + \let\label\relax \let\index\relax \let\glossary\relax + \mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi} +\gdef\markright#1{{\let\protect\@unexpandable@protect + \utfeight@protect@internal + \let\label\relax \let\index\relax \let\glossary\relax + \expandafter\@markright\@themark + {#1}\mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi} + +\endgroup + +% this one not safe, restore not complete +\def\protected@edef{ + \let\@@protect\protect + \let\protect\@unexpandable@protect + \utfeight@protect@internal + \afterassignment\restore@protect + \edef +} +\def\protected@xdef{ + \begingroup + \utfeight@protect@internal + \let\protect\@unexpandable@protect + \afterassignment\endgroup + \xdef +} +\def\unrestored@protected@xdef{ + \utfeight@protect@internal + \let\protect\@unexpandable@protect + \xdef +} + +% should really save and restore, not always back to markup +\def\restore@protect{\let\protect\@@protect + \unprotect@utfeight +} + +%%%%% stop this doing damage, also stops it working +\def\MakeUppercase#1{#1} + + +%%%%%%%%%%%%%%%%%%%%% + +% support for making 7bit characters active + +\begingroup +\catcode`\"=12\relax +\gdef\ActivateASCII#1{ + \uppercase{\count@"0\if x\noexpand#1\relax\else\count@#1\fi\relax} + \toks@\expandafter{\nfss@catcodes} + \xdef\nfss@catcodes{ + \catcode\the\count@=\the\catcode\the\count@\relax\the\toks@} + \toks@\expandafter{\XML@catcodes} + \xdef\XML@catcodes{ + \catcode\the\count@\active\the\toks@} + \expandafter\ifx\csname8:"\endcsname\relax + \expandafter\gdef\csname8:"\endcsname{"} + \fi} +\endgroup + + +% some of these should not be active by default, but OK for now. +% could use \ActivateASCII for most if not all of these now. +% should probably use \UnicodeCharacter for these now +\expandafter\def\csname8:\string<\endcsname{\ifmmode\langle\else\textless\fi} +\expandafter\def\csname8:\string>\endcsname{\ifmmode\rangle\else\textgreater\fi} +\expandafter\def\csname8:\string{\endcsname{\{} +\expandafter\def\csname8:\string}\endcsname{\}} + +% activateacii would use ax code, want ay code so ^ not written to aux files +% and clash with tex usage. so locally lie and make it a letter +\ActivateASCII{94}% ^ for tex ^^ notation in aux files +\UnicodeCharacter{94}{\textasciicircum} + + +\ActivateASCII{x5C}% \ +\UnicodeCharacter{x5C}{\textbackslash} +\ActivateASCII{x5F}% \ +\UnicodeCharacter{x5F}{\textunderscore} +\ActivateASCII{123}% { +\ActivateASCII{125}% { + +%%%%%%%%%%%%%%%% +% white space + +\UnicodeCharacter{13}{ \ignorespaces} +\UnicodeCharacter{32}{ \ignorespaces} +\UnicodeCharacter{9}{ \ignorespaces} + + +\expandafter\def\expandafter\obeylines\expandafter{ +\expandafter\def\csname 8:\string^^M\endcsname{\leavevmode\hfil \break\null}} + +\expandafter\def\expandafter\xmlnewlineaction\expandafter{ +\expandafter\def\csname 8:\string^^M\endcsname} + +\expandafter\def\expandafter\obeyspaces\expandafter{ +\expandafter\def\csname 8: \endcsname{\nobreakspace}} + +% tabs just do whatver the current space does. +\catcode`\^^I\active +\expandafter\def\csname 8:\string^^I\expandafter\endcsname + \expandafter{\csname 8: \endcsname} + + +% tex conventions +\XML@reset +\IfFileExists{xmltex.cfg} + { + \@@input\expandafter\@filef@und\expandafter\relax + \expandafter\XML@setenc\expandafter{\XML@thisencoding}\relax + }{\XML@warn{No File: xmltex.cfg}} + + +% get xmltex in catcode 12, for comparing with \jobname +\gdef\XML@tempa#1>{} +\gdef\XML@tempb{xmltex} +\xdef\XML@tempb{\expandafter\XML@tempa\meaning\XML@tempb} +% +\gdef\XML@tempc{pdfxmltex} +\xdef\XML@tempc{\expandafter\XML@tempa\meaning\XML@tempc} +% +\xdef\XML@tempa{\lowercase{\gdef\noexpand\XML@tempa{\jobname}}} +\XML@tempa + + +% if jobname is xmltex or pdfxmltex dump the format, otherwise +% try to load \jobname.cfg and input \xmlfile +% put white space back so the filename can be read off the command line +\ifx\XML@tempa\XML@tempc + \let\XML@tempb\XML@tempc +\fi +\ifx\XML@tempa\XML@tempb + \def\XML@tempa{ +\catcode`\ =10\relax +\catcode`\^^M=10\relax +\catcode`\^^I=10\relax +\dump} +\else +\IfFileExists{\jobname.cfg} + { + \@@input\expandafter\@filef@und\expandafter\relax + \expandafter\XML@setenc\expandafter{\XML@thisencoding}\relax + }{\XML@warn{No File: \jobname.cfg}} + + +\ifx\xmlfile\@undefined + \def\XML@tempa{\catcode`\-12\relax} +\else + \def\XML@tempa{\catcode`\-12\relax\input\xmlfile\relax} +\fi +\fi + +\endlinechar`\^^M \expandafter\XML@catcodes\XML@tempa diff --git a/Master/texmf-dist/tex/xmltex/config/pdfxmltex.ini b/Master/texmf-dist/tex/xmltex/config/pdfxmltex.ini new file mode 100644 index 00000000000..aeff5a5b4f5 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/config/pdfxmltex.ini @@ -0,0 +1,2 @@ +\input pdftexconfig.tex +\input xmltex.tex diff --git a/Master/texmf-dist/tex/xmltex/config/xmltex.ini b/Master/texmf-dist/tex/xmltex/config/xmltex.ini new file mode 100644 index 00000000000..95b736b44ed --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/config/xmltex.ini @@ -0,0 +1 @@ +\input xmltex diff --git a/Master/texmf-dist/tex/xmltex/passivetex/dummyels.sty b/Master/texmf-dist/tex/xmltex/passivetex/dummyels.sty new file mode 100644 index 00000000000..45b81ed1014 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/passivetex/dummyels.sty @@ -0,0 +1,136 @@ +\ProvidesPackage{dummyels}[1999/12/06: S Rahtz; dummy Elsevier names] +% for those who don't have Elsevier fonts +\def\ElOr{\UnavailableSymbol{ElOr}} +\def\Elbcong{\UnavailableSymbol{Elbcong}} +\def\Elolarr{\UnavailableSymbol{Elolarr}} +\def\Elorarr{\UnavailableSymbol{Elorarr}} +\def\Elroang{\UnavailableSymbol{Elroang}} +\def\Elxsqcup{\UnavailableSymbol{Elxsqcup}} +\def\Elxuplus{\UnavailableSymbol{Elxuplus}} +\def\ElzAnd{\UnavailableSymbol{ElzAnd}} +\def\ElzCint{\UnavailableSymbol{ElzCint}} +\def\ElzInf{\UnavailableSymbol{ElzInf}} +\def\ElzLap{\UnavailableSymbol{ElzLap}} +\def\ElzOr{\UnavailableSymbol{ElzOr}} +\def\ElzRlarr{\UnavailableSymbol{ElzRlarr}} +\def\ElzSup{\UnavailableSymbol{ElzSup}} +\def\ElzThr{\UnavailableSymbol{ElzThr}} +\def\ElzTimes{\UnavailableSymbol{ElzTimes}} +\def\Elzbar{\UnavailableSymbol{Elzbar}} +\def\Elzbtdl{\UnavailableSymbol{Elzbtdl}} +\def\Elzcirfb{\UnavailableSymbol{Elzcirfb}} +\def\Elzcirfl{\UnavailableSymbol{Elzcirfl}} +\def\Elzcirfr{\UnavailableSymbol{Elzcirfr}} +\def\Elzclomeg{\UnavailableSymbol{Elzclomeg}} +\def\Elzcreps{\UnavailableSymbol{Elzcreps}} +\def\Elzdbnd{\UnavailableSymbol{Elzdbnd}} +\def\ElzdbndSIX{\UnavailableSymbol{ElzdbndSIX}} +\def\Elzddfnc{\UnavailableSymbol{Elzddfnc}} +\def\Elzdefas{\UnavailableSymbol{Elzdefas}} +\def\Elzdlcorn{\UnavailableSymbol{Elzdlcorn}} +\def\Elzdrcorn{\UnavailableSymbol{Elzdrcorn}} +\def\Elzdshfnc{\UnavailableSymbol{Elzdshfnc}} +\def\Elzdyogh{\UnavailableSymbol{Elzdyogh}} +\def\Elzesh{\UnavailableSymbol{Elzesh}} +\def\Elzfhr{\UnavailableSymbol{Elzfhr}} +\def\Elzggrave{\UnavailableSymbol{Elzggrave}} +\def\Elzglst{\UnavailableSymbol{Elzglst}} +\def\Elzherma{\UnavailableSymbol{Elzherma}} +\def\Elzhex{\UnavailableSymbol{Elzhex}} +\def\Elzhlmrk{\UnavailableSymbol{Elzhlmrk}} +\def\Elzht{\UnavailableSymbol{Elzht}} +\def\Elzinglst{\UnavailableSymbol{Elzinglst}} +\def\ElzinvR{\UnavailableSymbol{ElzinvR}} +\def\Elzinvv{\UnavailableSymbol{Elzinvv}} +\def\Elzinvw{\UnavailableSymbol{Elzinvw}} +\def\ElzlbdTWObd{\UnavailableSymbol{ElzlbdTWObd}} +\def\ElzlbdTWOtd{\UnavailableSymbol{ElzlbdTWOtd}} +\def\ElzlbondTHREE{\UnavailableSymbol{ElzlbondTHREE}} +\def\ElzlbondTWO{\UnavailableSymbol{ElzlbondTWO}} +\def\Elzlmrk{\UnavailableSymbol{Elzlmrk}} +\def\Elzlow{\UnavailableSymbol{Elzlow}} +\def\Elzlozfl{\UnavailableSymbol{Elzlozfl}} +\def\Elzlozfr{\UnavailableSymbol{Elzlozfr}} +\def\Elzlpargt{\UnavailableSymbol{Elzlpargt}} +\def\Elzltlmr{\UnavailableSymbol{Elzltlmr}} +\def\Elzltln{\UnavailableSymbol{Elzltln}} +\def\Elzlyogh{\UnavailableSymbol{Elzlyogh}} +\def\Elzminhat{\UnavailableSymbol{Elzminhat}} +\def\Elznesim{\UnavailableSymbol{Elznesim}} +\def\Elzopeno{\UnavailableSymbol{Elzopeno}} +\def\ElzpSlash{\UnavailableSymbol{ElzpSlash}} +\def\Elzpalh{\UnavailableSymbol{Elzpalh}} +\def\Elzpbgam{\UnavailableSymbol{Elzpbgam}} +\def\Elzpdbdbd{\UnavailableSymbol{Elzpdbdbd}} +\def\Elzpdbdtd{\UnavailableSymbol{Elzpdbdtd}} +\def\Elzpdbond{\UnavailableSymbol{Elzpdbond}} +\def\Elzpent{\UnavailableSymbol{Elzpent}} +\def\Elzpes{\UnavailableSymbol{Elzpes}} +\def\Elzpgamma{\UnavailableSymbol{Elzpgamma}} +\def\Elzpscra{\UnavailableSymbol{Elzpscra}} +\def\Elzpscrv{\UnavailableSymbol{Elzpscrv}} +\def\Elzptbdbd{\UnavailableSymbol{Elzptbdbd}} +\def\Elzptbdtd{\UnavailableSymbol{Elzptbdtd}} +\def\Elzpupsil{\UnavailableSymbol{Elzpupsil}} +\def\Elzqbnd{\UnavailableSymbol{Elzqbnd}} +\def\ElzrLarr{\UnavailableSymbol{ElzrLarr}} +\def\Elzrais{\UnavailableSymbol{Elzrais}} +\def\Elzrarrx{\UnavailableSymbol{Elzrarrx}} +\def\ElzrbdTWObd{\UnavailableSymbol{ElzrbdTWObd}} +\def\ElzrbdTWOtd{\UnavailableSymbol{ElzrbdTWOtd}} +\def\ElzrbondTHREE{\UnavailableSymbol{ElzrbondTHREE}} +\def\ElzrbondTWO{\UnavailableSymbol{ElzrbondTWO}} +\def\Elzreapos{\UnavailableSymbol{Elzreapos}} +\def\Elzreglst{\UnavailableSymbol{Elzreglst}} +\def\Elzreve{\UnavailableSymbol{Elzreve}} +\def\Elzreveps{\UnavailableSymbol{Elzreveps}} +\def\Elzrh{\UnavailableSymbol{Elzrh}} +\def\Elzrl{\UnavailableSymbol{Elzrl}} +\def\Elzrparlt{\UnavailableSymbol{Elzrparlt}} +\def\Elzrtld{\UnavailableSymbol{Elzrtld}} +\def\Elzrtll{\UnavailableSymbol{Elzrtll}} +\def\Elzrtln{\UnavailableSymbol{Elzrtln}} +\def\Elzrtlr{\UnavailableSymbol{Elzrtlr}} +\def\Elzrtls{\UnavailableSymbol{Elzrtls}} +\def\Elzrtlt{\UnavailableSymbol{Elzrtlt}} +\def\Elzrtlz{\UnavailableSymbol{Elzrtlz}} +\def\Elzrttrnr{\UnavailableSymbol{Elzrttrnr}} +\def\Elzrvbull{\UnavailableSymbol{Elzrvbull}} +\def\Elzsbbrg{\UnavailableSymbol{Elzsbbrg}} +\def\Elzsblhr{\UnavailableSymbol{Elzsblhr}} +\def\Elzsbrhr{\UnavailableSymbol{Elzsbrhr}} +\def\Elzschwa{\UnavailableSymbol{Elzschwa}} +\def\Elzsqfb{\UnavailableSymbol{Elzsqfb}} +\def\Elzsqfl{\UnavailableSymbol{Elzsqfl}} +\def\Elzsqfne{\UnavailableSymbol{Elzsqfne}} +\def\Elzsqfnw{\UnavailableSymbol{Elzsqfnw}} +\def\Elzsqfr{\UnavailableSymbol{Elzsqfr}} +\def\Elzsqfse{\UnavailableSymbol{Elzsqfse}} +\def\Elzsqfsw{\UnavailableSymbol{Elzsqfsw}} +\def\Elzsqft{\UnavailableSymbol{Elzsqft}} +\def\Elzsqshd{\UnavailableSymbol{Elzsqshd}} +\def\Elzsqspne{\UnavailableSymbol{Elzsqspne}} +\def\Elzsyllab{\UnavailableSymbol{Elzsyllab}} +\def\Elztbnd{\UnavailableSymbol{Elztbnd}} +\def\ElztbndSIX{\UnavailableSymbol{ElztbndSIX}} +\def\Elztdcol{\UnavailableSymbol{Elztdcol}} +\def\Elztesh{\UnavailableSymbol{Elztesh}} +\def\Elztfnc{\UnavailableSymbol{Elztfnc}} +\def\Elztrisla{\UnavailableSymbol{Elztrisla}} +\def\Elztrna{\UnavailableSymbol{Elztrna}} +\def\Elztrnh{\UnavailableSymbol{Elztrnh}} +\def\Elztrnm{\UnavailableSymbol{Elztrnm}} +\def\Elztrnmlr{\UnavailableSymbol{Elztrnmlr}} +\def\Elztrnr{\UnavailableSymbol{Elztrnr}} +\def\Elztrnrl{\UnavailableSymbol{Elztrnrl}} +\def\Elztrnsa{\UnavailableSymbol{Elztrnsa}} +\def\Elztrnt{\UnavailableSymbol{Elztrnt}} +\def\Elztrny{\UnavailableSymbol{Elztrny}} +\def\Elzverti{\UnavailableSymbol{Elzverti}} +\def\Elzverts{\UnavailableSymbol{Elzverts}} +\def\Elzvrecto{\UnavailableSymbol{Elzvrecto}} +\def\Elzxh{\UnavailableSymbol{Elzxh}} +\def\Elzxl{\UnavailableSymbol{Elzxl}} +\def\Elzxrat{\UnavailableSymbol{Elzxrat}} +\def\Elzyogh{\UnavailableSymbol{Elzyogh}} +\endinput diff --git a/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty b/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty new file mode 100644 index 00000000000..f0581d1b4f3 --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty @@ -0,0 +1,2238 @@ +%RCS: $Id: //depot/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty#1 $, $Date: 2004/02/09 $ +% +% Copyright 2003 Sebastian Rahtz/Oxford University +% +% +% Permission is hereby granted, free of charge, to any person obtaining +% a copy of this software and any associated documentation files (the +% ``Software''), to deal in the Software without restriction, including +% without limitation the rights to use, copy, modify, merge, publish, +% distribute, sublicense, and/or sell copies of the Software, and to +% permit persons to whom the Software is furnished to do so, subject to +% the following conditions: +% +% The above copyright notice and this permission notice shall be included +% in all copies or substantial portions of the Software. +% +\batchmode +\ProvidesPackage{fotex}[2003/03/10: version 1.25. support for XSL formatting, S Rahtz] +\RequirePackage{graphicx,color} +%\IfFileExists{multicol.sty} +% {\RequirePackage{multicol}[1997/12/16]} +% {\newenvironment{multicols}[1]% +% {\typeout{Warning, at line \the\inputlineno, multicol package not available}}{}% +%} + +\def\confirmnomulticols{ + \RequirePackage{nomulticol}[2003/01/09] + \typeout{INFO (nomulticol.sty: fo:block span="all" works} +} +\def\warnnomulticols{ + \RequirePackage{multicol}[1997/12/16] + \typeout{WARNING (multicol.sty: fo:block span="all" does not work} + \fakenomulticols +} +\def\warnmulticols{ + \typeout{WARNING (no multicol.sty: multiple columns not available} + \newenvironment{multicols}[1]{\typeout{Warning, at line \the\inputlineno, multicol package not available}}{} + \fakenomulticols +} +\def\fakenomulticols{ + \def\nobeginmulticols##1{\begin{multicols}{##1}} + \def\noendmulticols{\end{multicols}} + \def\interbeginmulticols##1{} + \let\interendmulticols\relax + \let\refreshmulticols\relax +} +\IfFileExists{nomulticol.sty} +{\confirmnomulticols} +{\IfFileExists{multicol.sty} + {\warnnomulticols} + {\warnmulticols} +} +\RequirePackage{rotating} +\RequirePackage{array} +\gdef\arraybackslash{\let\\=\@arraycr} +\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} +\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} +\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} +\newcolumntype{P}[1]{>{\arraybackslash}p{#1}} +\RequirePackage{soul} +\RequirePackage{amsmath} +\let\Vec\undefined +\RequirePackage{longtable} +\RequirePackage{url} +\RequirePackage[normalem]{ulem} +\RequirePackage{times} +\RequirePackage{mlnames} +\RequirePackage{unicode} +\RequirePackage{marvosym} +\RequirePackage{ucharacters} +%\usepackage{ucs}\usepackage[utf8]{inputenc} +\RequirePackage{nameref} +\RequirePackage[pdfcreator={PassiveTeX 1.25},colorlinks=false,plainpages=true,hypertexnames=false,pdfborder={1 0 0}]{hyperref}[1999/08/1] +%------------------------------------------- +\newcount\FOListBlocks +\edef\This@FOListBlocks{\the\FOListBlocks} +\newcount\FOTableNesting +\newcount\FOinList +\newcount\FOinTable +\newcount\NCols +\newcount\RowCount +\newcount\SimplePMRefs +\newskip\LeaderLength +\newdimen\CurrentCellWidth +\newdimen\FObalancespace +\newdimen\FOspaceleft +\newdimen\MasterBottomMargin +\newdimen\MasterLeftMargin +\newdimen\MasterRightMargin +\newdimen\MasterTopMargin +\newdimen\NoTableCellHeight +\newdimen\TableWidth +\newdimen\XFOendindent +\newdimen\XFOstartindent +\newdimen\bottommargin +\newdimen\FOtempdim +\newif\ifFOBlockGrab +\newif\ifFODebug +\newif\ifFODefiningPage +\newif\ifFOFirstCell +\newif\ifFOListBody +\newif\ifFOListInnerPar +\newif\ifFOSub +\newif\ifFOSuper +\newif\ifFOinLayout +\newif\ifFOinOutput +\newif\ifMulticolPending +\newif\ifNoTableCheckHeight +\newif\ifStartWithOmit +\newif\ifForcePageSetup +\newif\ifBlankPage +\newif\ifInInsertion +\newsavebox\BlockBox +\newsavebox\CellBox +\newsavebox\FOBOX +\newsavebox\ItemBox +\newtoks\ColSpecs +\newtoks\BoxedFootnotes +% +%\FODebugtrue +\FOBlockGrabfalse +\FODefiningPagefalse +\FOListBodyfalse +\FOListInnerParfalse +\FOinLayoutfalse +\FOinList0 +\FOinOutputfalse +\FOTableNesting0 +\FOinTable0 +\MasterBottomMargin\z@ +\MasterLeftMargin\z@ +\MasterRightMargin\z@ +\MasterTopMargin\z@ +\MulticolPendingfalse +\StartWithOmitfalse +% smarts from Anton to deal with long lines in verbatim +\gdef\FOdiscretionary{\ifx\FOwrapoption\att@nowrap\discretionary{\kern-.5ex\lower1ex\hbox{$\hookleftarrow$}}{}{\kern1ex}\else\space\fi} +\def\obeyspaces{\catcode`\ =\active} +{\obeyspaces\global\let =\FOdiscretionary} +\def\DEBUG#1{% + \ifFODebug + \typeout{#1, at \the\inputlineno}% + \fi +} +\def\expandFont#1 #2 #3\\{% + \typeout{FONT expanding to #1 / #2 / #3}% +} +\def\expandBorder#1 #2 #3\\{% + \def\FOborderstartcolor{#3}% + \def\FOborderendcolor{#3}% + \def\FOborderbeforecolor{#3}% + \def\FOborderaftercolor{#3}% + \def\FOborderstartwidth{#1}% + \def\FOborderendwidth{#1}% + \def\FOborderbeforewidth{#1}% + \def\FOborderafterwidth{#1}% + \def\FOborderstartstyle{#2}% + \def\FOborderendstyle{#2}% + \def\FOborderbeforestyle{#2}% + \def\FOborderafterstyle{#2}% + \interpretwidth +} +\def\FOexpandattributes{% +% +% links +\ifx\FObordertopstyle\LINK\else\let\FOborderbeforestyle\FObordertopstyle\fi +\ifx\FOborderbottomstyle\LINK\else\let\FOborderafterstyle\FOborderbottomstyle\fi +\ifx\FOborderrightstyle\LINK\else\let\FOborderendstyle\FOborderrightstyle\fi +\ifx\FOborderleftstyle\LINK\else\let\FOborderstartstyle\FOborderleftstyle\fi +\ifx\FObordertopwidth\LINK\else\let\FOborderbeforewidth\FObordertopwidth\fi +\ifx\FOborderbottomwidth\LINK\else\let\FOborderafterwidth\FOborderbottomwidth\fi +\ifx\FOborderrightwidth\LINK\else\let\FOborderendwidth\FOborderrightwidth\fi +\ifx\FOborderleftwidth\LINK\else\let\FOborderstartwidth\FOborderleftwidth\fi +\ifx\FObordertopcolor\LINK\else\let\FOborderbeforecolor\FObordertopcolor\fi +\ifx\FOborderbottomcolor\LINK\else\let\FOborderaftercolor\FOborderbottomcolor\fi +\ifx\FOborderrightcolor\LINK\else\let\FOborderendcolor\FOborderrightcolor\fi +\ifx\FOborderleftcolor\LINK\else\let\FOborderstartcolor\FOborderleftcolor\fi +% shortcuts + \ifx\FObordercolor\att@black + \else + \let\FOborderstartcolor\FObordercolor + \let\FOborderendcolor\FObordercolor + \let\FOborderbeforecolor\FObordercolor + \let\FOborderaftercolor\FObordercolor + \fi + \ifx\FOborderwidth\@empty + \else + \let\FOborderstartwidth\FOborderwidth + \let\FOborderendwidth\FOborderwidth + \let\FOborderbeforewidth\FOborderwidth + \let\FOborderafterwidth\FOborderwidth + \fi + \ifx\FOborderstyle\@empty + \else + \let\FOborderstartstyle\FOborderstyle + \let\FOborderendstyle\FOborderstyle + \let\FOborderbeforestyle\FOborderstyle + \let\FOborderafterstyle\FOborderstyle + \fi + \ifx\FOborder\@empty + \else + \expandafter\expandBorder\FOborder\\{}% + \fi +% \ifx\FOfont\@empty +% \else +% \expandafter\expandFont\FOfont\relax \\{}% +% \fi + \ifdim\FOpadding>\z@ + \let\FOpaddingstart\FOpadding + \let\FOpaddingend\FOpadding + \let\FOpaddingbefore\FOpadding + \let\FOpaddingafter\FOpadding + \fi + \ifx\FOmargin\@empty + \else + \let\tmpmargin\FOmargin + \let\FOmarginleft\tmpmargin + \let\FOmarginright\tmpmargin + \let\FOmargintop\tmpmargin + \let\FOmarginbottom\tmpmargin + \fi +% end of shortcuts + \ifx\FOborderendstyle\att@solid + \FOBlockGrabtrue + \else + \def\FOborderendwidth{\z@}% + \fi + \ifx\FOborderstartstyle\att@solid + \FOBlockGrabtrue + \else + \def\FOborderstartwidth{\z@}% + \fi + \ifx\FOborderafterstyle\att@solid + \else + \def\FOborderafterwidth{\z@}% + \fi + \ifx\FOborderbeforestyle\att@solid + \FOBlockGrabtrue + \else + \def\FOborderbeforewidth{\z@}% + \fi + \interpretwidth +} +%------------------------------------------- +% +% NoTable. Making tables using fixed width cells. +% From ideas and code by C V Radhakrishnan. +% +\newcount\AbsoluteTableCount +\newcount\CellCount +\newcount\arraylength +\newcounter{ArrayIndex}% +\newcounter{zeroCtr}% +\def\DeclareArray#1{% + \Array{#1}[0]{}% + \expandafter\gdef\csname #1\endcsname[##1]{\csname #1##1\endcsname}% +} +\def\Array#1[#2]#3{% + \expandafter\xdef\csname #1#2\endcsname{#3}% +} + +% +\def\getArraylength#1{% + \arraylength0 + \loop\expandafter\ifx\csname #1\the\arraylength\endcsname\relax% + \else\advance\arraylength by1\repeat}% +% +\def\addToArray#1#2{\arraylength0% + \loop\expandafter\ifx\csname #1\the\arraylength\endcsname\relax% + \else\advance\arraylength by 1\repeat% + \Array{#1}[\the\arraylength]{#2}}% +% +\def\clearArray#1{\getArraylength{#1}% + \loop\ifnum\arraylength >0% + \global\expandafter\let\csname #1\the\arraylength\endcsname\relax% + \advance\arraylength by-1\repeat}% +% +\long\def\ArrayIterator#1#2{% + \setcounter{ArrayIndex}{1}\getArraylength{#1}% + \setcounter{zeroCtr}{\c@arraylength}% + \loop\ifnum\c@ArrayIndex<\c@zeroCtr{#2}% + \stepcounter{ArrayIndex}\repeat% +}% + +\def\NoTableSetup{% + \global\advance\AbsoluteTableCount by 1 + \DeclareArray{fotable\the\AbsoluteTableCount:}% + \DeclareArray{fotabletextalign\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderbeforestyle\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderafterstyle\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderstartstyle\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderendstyle\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderbeforewidth\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderafterwidth\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderstartwidth\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderendwidth\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderbeforecolor\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderaftercolor\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderstartcolor\the\AbsoluteTableCount:}% + \DeclareArray{fotableborderendcolor\the\AbsoluteTableCount:}% + \global\CellCount0 +\ifnum\FOinTable=0 + \global\BoxedFootnotes{}% + \global\let\FOfoottext\FOboxedfoottext +\fi +} + +\def\NoTableFinish{ +\ifnum\FOinTable=0 + \the\BoxedFootnotes + \global\BoxedFootnotes={}% + \global\let\FOfoottext\FOplainfoottext +\fi +} + +\def\saveinterlineskip{% + \edef\savedbaselineskip{\the\baselineskip}% + \edef\savedlineskip{\the\lineskip}% + \edef\savedlineskiplimit{\the\lineskiplimit}% + \baselineskip=-1000pt\relax + \lineskiplimit=16383pt\relax + \lineskip=0pt +} + +\def\restoreinterlineskip{% + \baselineskip\savedbaselineskip\relax + \lineskip\savedlineskip\relax + \lineskiplimit\savedlineskiplimit\relax +} + +\def\NoTableStart#1{#1} + +\def\NoTableEnd{% + \clearArray{fotable\the\AbsoluteTableCount:}% + \clearArray{fotabletextalign\the\AbsoluteTableCount:}% + \clearArray{fotableborderbeforestyle\the\AbsoluteTableCount:}% + \clearArray{fotableborderafterstyle\the\AbsoluteTableCount:}% + \clearArray{fotableborderstartstyle\the\AbsoluteTableCount:}% + \clearArray{fotableborderendstyle\the\AbsoluteTableCount:}% + \clearArray{fotableborderbeforewidth\the\AbsoluteTableCount:}% + \clearArray{fotableborderafterwidth\the\AbsoluteTableCount:}% + \clearArray{fotableborderstartwidth\the\AbsoluteTableCount:}% + \clearArray{fotableborderendwidth\the\AbsoluteTableCount:}% + \clearArray{fotableborderbeforecolor\the\AbsoluteTableCount:}% + \clearArray{fotableborderaftercolor\the\AbsoluteTableCount:}% + \clearArray{fotableborderstartcolor\the\AbsoluteTableCount:}% + \clearArray{fotableborderendcolor\the\AbsoluteTableCount:}% +} + +\def\NoTableColumn{% + \ifx\@empty\FOcolumnnumber + \global\advance\NCols by 1 + \else + \global\NCols\FOcolumnnumber + \fi + \ifx\prop@width\FOcolumnwidth\def\FOcolumnwidth{1in}\fi + \ifx\@empty\FOcolumnwidth\def\FOcolumnwidth{1in}\fi + \TablePercentToDimen{\FOcolumnwidth}% + \addToArray{fotable\the\AbsoluteTableCount:}{\the\@tempdima}% + \addToArray{fotabletextalign\the\AbsoluteTableCount:}{\FOtextalign}% + \addToArray{fotableborderbeforestyle\the\AbsoluteTableCount:}{\FOborderbeforestyle}% + \addToArray{fotableborderafterstyle\the\AbsoluteTableCount:}{\FOborderafterstyle}% + \addToArray{fotableborderstartstyle\the\AbsoluteTableCount:}{\FOborderstartstyle}% + \addToArray{fotableborderendstyle\the\AbsoluteTableCount:}{\FOborderendstyle}% + \addToArray{fotableborderbeforewidth\the\AbsoluteTableCount:}{\FOborderbeforewidth}% + \addToArray{fotableborderafterwidth\the\AbsoluteTableCount:}{\FOborderafterwidth}% + \addToArray{fotableborderstartwidth\the\AbsoluteTableCount:}{\FOborderstartwidth}% + \addToArray{fotableborderendwidth\the\AbsoluteTableCount:}{\FOborderendwidth}% + \addToArray{fotableborderbeforecolor\the\AbsoluteTableCount:}{\FOborderbeforecolor}% + \addToArray{fotableborderaftercolor\the\AbsoluteTableCount:}{\FOborderaftercolor}% + \addToArray{fotableborderstartcolor\the\AbsoluteTableCount:}{\FOborderstartcolor}% + \addToArray{fotableborderendcolor\the\AbsoluteTableCount:}{\FOborderendcolor}% + \DEBUG{Table Column \the\NCols, in Table \the\AbsoluteTableCount, + \FOcolumnwidth, = \the\@tempdima}% +} +\def\NoTableRow#1{% + \setbox0=\vbox{ + \ifx\FOheight\att@auto% + \strut They + \else + \rule{\z@}{\FOheight}% + \fi + }% + \NoTableCellHeight=\ht0 + \advance\NoTableCellHeight by \dp0 + \global\CellCount0 + \NoTableCheckHeightfalse + \setbox0=\vbox{\hbox{\let\FOfoottext\FOnofoottext#1}}% + \@tempdima=\ht0 + \advance\@tempdima by \dp0 + \FOspaceleft=\pagegoal + \advance\FOspaceleft by -\pagetotal +% \DEBUG{Space check for \the\@tempdima, [\the\FOspaceleft] PageTotal [\the\pagetotal/\the\pagegoal] l.\the\inputlineno}% + \ifdim\FOspaceleft<\@tempdima + \DEBUG{ .. page in table break fires, l. \the\inputlineno... }% + \clearpage + \fi + \ifdim\@tempdima>\NoTableCellHeight +%\typeout{row pass 2 at \the\inputlineno, as [\the\@tempdima] > [\the\NoTableCellHeight]}% + \NoTableCellHeight=\@tempdima + \fi + \global\CellCount0 + \NoTableCheckHeighttrue + \vbox to \NoTableCellHeight{\hbox{#1}}% +% \ifFOinOutput\else\vskip-\lineskip\fi +} + +\def\inheritfromcolumn#1#2{% + \explicitattribute{#1}% + \ifx\isexplicit\relax + \expandafter\edef\csname FO#2\endcsname{\csname fotable#2\the\AbsoluteTableCount:\the\CellCount\endcsname}% + \fi +} + +\def\NoTableCell#1{% + \ifx\FOstartsrow\att@true +% \vskip-\lineskip + \global\CellCount1 + \else + \global\advance\CellCount by 1 + \fi + \ifnum\NCols<1 + \CurrentCellWidth\z@ + \setbox0=\hbox{\restoreinterlineskip#1\strut}% + \CurrentCellWidth=\wd0 +%\DEBUG{report \the\CurrentCellWidth}% + \else + \CurrentCellWidth=\csname fotable\the\AbsoluteTableCount:\the\CellCount\endcsname + \inheritfromcolumn{text-align}{textalign}% + \inheritfromcolumn{border-before-style}{borderbeforestyle}% + \inheritfromcolumn{border-after-style}{borderafterstyle}% + \inheritfromcolumn{border-start-style}{borderstartstyle}% + \inheritfromcolumn{border-end-style}{borderendstyle}% + \inheritfromcolumn{border-before-width}{borderbeforewidth}% + \inheritfromcolumn{border-after-width}{borderafterwidth}% + \inheritfromcolumn{border-start-width}{borderstartwidth}% + \inheritfromcolumn{border-end-width}{borderendwidth}% + \inheritfromcolumn{border-before-color}{borderbeforecolor}% + \inheritfromcolumn{border-after-color}{borderaftercolor}% + \inheritfromcolumn{border-start-color}{borderstartcolor}% + \inheritfromcolumn{border-end-color}{borderendcolor}% + \interpretwidth + \fi + \advance\CurrentCellWidth by -\FOpaddingstart + \advance\CurrentCellWidth by -\FOpaddingend + \ifx\FOborderstartstyle\att@solid\advance\CurrentCellWidth by -\FOborderstartwidth\fi + \ifx\FOborderendstyle\att@solid\advance\CurrentCellWidth by -\FOborderendwidth\fi + \advance\CurrentCellWidth by -\FOmarginright + \advance\CurrentCellWidth by -\FOmarginleft + \ifnum\FOnumbercolumnsspanned>1 + \@tempcnta1 + \loop\ifnum\@tempcnta<\FOnumbercolumnsspanned + \advance\@tempcnta by 1 + \global\advance\CellCount by 1 + \advance\CurrentCellWidth\csname fotable\the\AbsoluteTableCount:\the\CellCount\endcsname +% \typeout{add extra column \the\@tempcnta, to reach \FOnumbercolumnsspanned: \the\CurrentCellWidth}% + \repeat + \fi + \ifx\XML@parent\FOTableRow + \FOTableCellBlock#1\FOEndTableCellBlock + \else + \leavevmode\hbox{\FOTableCellBlock#1\FOEndTableCellBlock}% + \fi + \ifx\FOendsrow\att@true +% \vskip-\lineskip + \global\CellCount0 + \fi +} + +\def\FOTableCellBlock{% + \begin{lrbox}{\CellBox}% + \vbox\bgroup + \hsize\the\CurrentCellWidth + \restoreinterlineskip + \ifFOinOutput\else \color@begingroup\fi + \FOSetFont{tablecellblock}% + \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi + \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi + \ifx\FOwrapoption\att@nowrap\obeylines\fi + \ifx\FOverticalalign\att@bottom\vfill\fi + } + +\def\FOEndTableCellBlock{% + \ifx\FOverticalalign\att@top\vfill\fi + \ifFOinOutput\else \color@endgroup\fi + \egroup + \end{lrbox}% + \@tempdima\FOmargintop + \advance\@tempdima\FOpaddingbefore + \ifx\FOborderbeforestyle\att@solid\advance\@tempdima\FOborderbeforewidth\fi +% \advance\@tempdima\dp\CellBox +%\typeout{CELL to height \the\NoTableCellHeight. Padding \FOpaddingbefore,\FOpaddingafter,\FOpaddingstart,\FOpaddingend; Border \FOborderbeforewidth,\FOborderafterwidth,\FOborderstartwidth,\FOborderendwidth; lower by \the\@tempdima; Margin \FOmargintop,\FOmarginbottom,\FOmarginleft,\FOmarginright}% +\@tempdimb\wd\CellBox +\advance\@tempdimb by \FOpaddingstart +\advance\@tempdimb by \FOpaddingend +\hbox{% + \lower\@tempdima + \hbox{% + \hskip\FOmarginleft + \vbox{% + \kern\FOmargintop + \vbox{% + \ifx\FOborderbeforestyle\att@solid + {\color{\FOborderbeforecolor}\hrule\@height\FOborderbeforewidth}% + \fi + \hbox{% + \ifx\FOborderstartstyle\att@solid + {\color{\FOborderstartcolor}\vrule\@width\FOborderstartwidth}% + \fi + \ifx\FObackgroundcolor\att@transparent + \else + {\color{\FObackgroundcolor}\vrule\@width\@tempdimb\kern-\@tempdimb}% + \fi + \ifNoTableCheckHeight +% According to FOdisplayalign property, we put glue +% before and/or after the cell contents + \vtop to \NoTableCellHeight{% + \kern\FOpaddingbefore + \ifx\FOdisplayalign\att@auto + \else\ifx\FOdisplayalign\att@before + \else\ifx\FOdisplayalign\att@after\vfil + \else\ifx\FOdisplayalign\att@centered\vfil\fi + \fi + \fi + \fi + \hbox{\kern\FOpaddingstart\box\CellBox\kern\FOpaddingend}% + \ifx\FOdisplayalign\att@auto\vfil + \else\ifx\FOdisplayalign\att@before\vfil + \else\ifx\FOdisplayalign\att@after + \else\ifx\FOdisplayalign\att@centered\vfil\fi + \fi + \fi + \fi + \kern\FOpaddingafter + }% + \else + \vbox{% + \kern\FOpaddingbefore + \hbox{\kern\FOpaddingstart\box\CellBox\kern\FOpaddingend}% + \kern\FOpaddingafter + }% + \fi + \ifx\FOborderendstyle\att@solid + {\color{\FOborderendcolor}\vrule\@width\FOborderendwidth}% + \fi + }% + \ifx\FOborderafterstyle\att@solid + {\color{\FOborderaftercolor}\hrule\@height\FOborderafterwidth}\fi + }% + \kern\FOmarginbottom + }% + \hskip\FOmarginright + }% + }% +} + +\def\FOBoxedBlock#1{% +% Dirk Roorda: I cannot perceive what should be going on here. +% But \hbox{#1} cannot be right, since #1 is a length or even a dimen. +% In the latter case this leads to a TeX error! +% So I have commented out the then-branch. +% \ifdim\@tempdimb=\z@ +% \setbox0=\hbox{#1}\@tempdimb\wd0\relax +%\typeout{report \the\CurrentCellWidth}% +% \else + \@tempdimb#1\relax% +% \fi + \advance\@tempdimb by -\FOpaddingstart\relax + \advance\@tempdimb by -\FOpaddingend\relax + \ifx\FOborderstartstyle\att@solid\advance\@tempdimb by -\FOborderstartwidth\relax\fi + \ifx\FOborderendstyle\att@solid\advance\@tempdimb by -\FOborderendwidth\relax\fi + \advance\@tempdimb by -\FOmarginright\relax + \advance\@tempdimb by -\FOmarginleft\relax + \begin{lrbox}{\BlockBox}% + \vbox\bgroup + \hsize\the\@tempdimb + \FOSetFont{tableblock}% + \color@begingroup + \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi + \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi + \ifx\FOwrapoption\att@nowrap\obeylines\fi + \parindent\FOtextindent + \Quadding + %\strut + \start@strut + } + +\def\FOEndBoxedBlock{% + \start@strut + \color@endgroup + \egroup + \end{lrbox}% + \@tempdimb\FOmargintop + \advance\@tempdimb\FOpaddingbefore + \ifx\FOborderbeforestyle\att@solid\advance\@tempdimb\FOborderbeforewidth\fi +% \advance\@tempdimb by \dp\BlockBox +%\typeout{BLOCK. Padding \FOpaddingbefore,\FOpaddingafter,\FOpaddingstart,\FOpaddingend; Border \FOborderbeforewidth,\FOborderafterwidth,\FOborderstartwidth,\FOborderendwidth; lower by \the\@tempdimb, margin \FOmargintop,\FOmarginbottom,\FOmarginleft,\FOmarginright}% +\@tempdimc\wd\BlockBox +\advance\@tempdimc by \FOpaddingstart +\advance\@tempdimc by \FOpaddingend +\FOtempdim\FOmarginleft +\advance\FOtempdim by \FOtextindent +\hbox{% + \lower\@tempdimb + \hbox{% + \kern\FOtempdim + \vbox{% + \kern\FOmargintop + \vbox{% + \ifx\FOborderbeforestyle\att@solid + {\color{\FOborderbeforecolor}\hrule\@height\FOborderbeforewidth}% + \fi + \hbox{% + \ifx\FOborderstartstyle\att@solid + {\color{\FOborderstartcolor}\vrule\@width\FOborderstartwidth}\fi + \ifx\FObackgroundcolor\att@transparent + \else + {\color{\FObackgroundcolor}\vrule\@width\@tempdimc\kern-\@tempdimc}% + \fi + \vbox{% + \kern\FOpaddingbefore + \hbox{\kern\FOpaddingstart\box\BlockBox\kern\FOpaddingend}% + \kern\FOpaddingafter + }% + \ifx\FOborderendstyle\att@solid + {\color{\FOborderendcolor}\vrule\@width\FOborderendwidth}\fi + }% + \ifx\FOborderafterstyle\att@solid + {\color{\FOborderaftercolor}\hrule\@height\FOborderafterwidth}\fi + }% + \kern\FOmarginbottom + }% + \kern\FOmarginright + }% + }% +} + +\def\OldTableCell#1{% + \ifx\FOendsrow\att@true + \gdef\w@@t{\\}% + \else + \gdef\w@@t{\tabcellsep}% + \fi + \ifx\FOstartsrow\att@true + \gdef\w@@@t{\\}% + \else + \gdef\w@@@t{}% + \fi + \xdef\MyRows{\FOnumberrowsspanned}% + \xdef\MyCols{\FOnumbercolumnsspanned}% + \ifnum\MyCols>1 + \gdef\w@t{\multicolumn{\MyCols}{l}{#1}\w@@t}% + \else + \ifnum\MyRows>1 + \gdef\w@t{\sbox{\FOBOX}{\hbox{#1}}% + \@tempdima\ht\FOBOX + \advance\@tempdima by -\baselineskip + \raisebox{-\@tempdima}[\z@][\z@]{\usebox{\FOBOX}}\w@@t}% + \else + \gdef\w@t{\w@@@t#1\w@@t}% + \fi + \fi + \aftergroup\w@t +} +%------------------------------------------- +% utility macros +\def\protectCS#1{% + \begingroup + \utfeight@protect@chars + \xdef\FOtempCS{#1}% + \endgroup + \let#1\FOtempCS}% +\def\GrabFileName#1:#2\@nil{% + \DEBUG{Graphic #1 + #2}% + \xdef\FOsrcname{#1}% +} +\def\NColumns{1} +\gdef\PrevNColumns{1} +\def\Pass#1\\{\expandafter\@Pass#1} +\def\@Pass#1|#2|#3|#4|{% + \columnsep=#1 + \def\NColumns{#2}% + \def\Marginbottom{#3}% + \def\Margintop{#4}% + } +\def\FOfiletest#1#2#3#4#5#6#7#8\@{% + \def\@tempa{#1#2#3#4#5#6#7}% + \def\@tempb{#1#2#3#4#5}% + \def\@tempc{#1#2#3#4}% + \ifx\@tempa\file@prefix + \xdef\FOsrcname{#8}% + \else + \ifx\@tempb\file@shortprefix + \xdef\FOsrcname{#6#7#8}% + \else + \ifx\@tempc\file@urlprefix + \expandafter\FOurlfiletest#5#6#7#8\@empty\@empty\@empty\@empty\@empty\@empty\@empty\@empty\@empty\@empty + \else + \xdef\FOsrcname{#1#2#3#4#5#6#7#8}% + \fi + \fi + \fi} + +\def\FOurlfiletest#1#2#3#4#5#6#7#8){% + \def\@tempa{#1#2#3#4#5#6#7}% + \def\@tempb{#1#2#3#4#5}% + \ifx\file@prefix\@tempa + \xdef\FOsrcname{#8}% + \else + \ifx\@tempb\file@shortprefix + \xdef\FOsrcname{#6#7#8}% + \else + \xdef\FOsrcname{#1#2#3#4#5#6#7#8}% + \fi + \fi} + + +{\catcode`\%=12\relax +\gdef\percentother{%} +} +{\catcode`\%=13\relax +\gdef\defpercentother{\xdef%{\percentother}} +} +{\catcode`\%=12\relax +\gdef\percenttest#1%#2#3\@{\ifx#2\relax\def\percentval{#1}\expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\gdef\performpercent#1{\defpercentother\edef\dopercent{\noexpand\percenttest#1\relax%.\noexpand\@}\dopercent} + +\gdef\TablePercentToDimen#1{\performpercent{#1} + {\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 + \edef\SCALE{\strip@pt\@tempdimb}\global\@tempdima=\SCALE\TableWidth}{\global\@tempdima#1} +} +\gdef\PercentToDimen#1{\performpercent{#1} + {\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 + \edef\SCALE{\strip@pt\@tempdimb}\global\@tempdima=\SCALE\hsize}{\global\@tempdima#1} +} +\gdef\FOSetGWidth{\performpercent{\FOcontentwidth} + {\@tempdima\percentval pt\relax\divide\@tempdima by 100 + \edef\WSCALE{\strip@pt\@tempdima}\setkeys{Gin}{width=\WSCALE\Gin@nat@width}}{\setkeys{Gin}{width=\FOcontentwidth}}} + +\gdef\FOSetGHeight{\performpercent{\FOcontentheight} + {\@tempdima\percentval pt\relax\divide\@tempdima by 100 + \edef\HSCALE{\strip@pt\@tempdima}\setkeys{Gin}{height=\HSCALE\Gin@nat@height}}{\setkeys{Gin}{height=\FOcontentheight}}} + +\gdef\PlayWithFSize#1{\@default\f@size pt + \performpercent{#1} + {\dimen@0.01\@default + \multiply\dimen@\percentval\relax}{\dimen@#1}\edef\FOfontsizefinal{\the\dimen@}} +\gdef\PlayWithShift{performpercent{\FOverticalalign} + {\dimen@0.01\baselineskip\multiply\dimen@\percentval\relax}{\dimen@\FOverticalalign}} +} +\def\strip@pt@and@otherjunk#1{\expandafter\rem@ptetc\the#1!} +\begingroup + \catcode`P=12 + \catcode`T=12 + \lowercase{\endgroup + \gdef\rem@ptetc#1.#2PT#3!{#1\ifnum#2>\z@.#2\fi}% +} +\catcode`\/\active + +\def\@basiclink#1//#2\@nil#3\@nil#4\@nil{% + {% +\ifx\\#2\\% + \href{#4}{\FO@inlinesequence{#1}}% +\else + \href{#4}{\FO@inlinesequence{\XURL{#3}}}% +\fi + }% +} +\catcode`\/=12 +% +\def\nocontentbox{\vbox to \z@{}} + +\def\BlankPage{% + \DEBUG{Blank Page \the\c@page}% +% \def\@thehead{\csname\FirstHead\endcsname}% +% \def\@thefoot{\csname\FirstTail\endcsname}% +% \let\@themargin\oddsidemargin +% \def\headheight{\FirstHeadExtent}% +% \def\tailheight{\FirstTailExtent}% +% \mark{}% + \global\BlankPagetrue + \nocontentbox + \newpage +} +%----------------------------------------------- +% longtable +\LTpre\z@ +\LTpost-10\p@ +\def\LTleft@center{\LTleft=\FOmarginleft plus 1.0fill} +\def\LTright@center{\LTright=\FOmarginright plus 1.0fill} +\def\LTleft@start{\LTleft=\FOmarginleft} +\def\LTright@start{\LTright=\fill} +\def\LTleft@end{\LTleft=\fill} +\def\LTright@end{\LTright=\FOmarginright} +\def\LTleft@justify{\LTleft=\fill} +\def\LTright@justify{\LTright=\fill} +\gdef\LeftMargin{\FOmarginleft} +\gdef\RightMargin{\FOmarginright} +\gdef\TopMargin{\Margintop} +\gdef\BottomMargin{\Marginbottom} +\gdef\EndIndent{\ifx\FOendindent\att@labelend\z@\else\FOendindent\fi} +\gdef\StartIndent{\ifx\FOstartindent\att@bodystart\z@\else\FOstartindent\fi} +\gdef\OddTail {} +\gdef\OddHead {} +\gdef\EvenTail {} +\gdef\EvenHead {} +\gdef\FirstTail {} +\gdef\FirstHead {} +\gdef\OddTailExtent{\z@} +\gdef\OddHeadExtent{\z@} +\gdef\EvenTailExtent{\z@} +\gdef\EvenHeadExtent{\z@} +\gdef\FirstTailExtent{\z@} +\gdef\FirstHeadExtent{\z@} + +\DefineCharacter{8232}{2028}{\newline} +\DefineCharacter{8208}{2010}{-\/} +\def\XURL{\begingroup \urlstyle{same}\Url} +\def\T@pageref#1{% + \expandafter\@setref\csname r@#1\endcsname\@secondoffive{#1}% +} +\let\@@ReadBookmarks\ReadBookmarks +\def\ReadBookmarks{{\let\InputIfFileExists\@input\@@ReadBookmarks}} +\def\XReadBookmarks{% + \begingroup + \escapechar=`\\% + \let\escapechar\@gobble % + \def\@@BOOKMARK [##1][##2]##3##4##5{\calc@bm@number{##5}}% + \@input{\jobname.out}% + \ifx\WriteBookmarks\relax + \global\let\WriteBookmarks\relax + \fi + \def\@@BOOKMARK[##1][##2]##3##4##5{% + \def\Hy@temp{##4}% + \pdfoutline goto + name{##3}% + count ##2\check@bm@number{##3}{% + \expandafter\strip@prefix\meaning\Hy@temp + }% + }% + {% + \def\WriteBookmarks{0}% + \@input{\jobname.out}% + }% + %{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}% + \ifx\WriteBookmarks\relax\else + \if@filesw\immediate\openout\@outlinefile=\jobname.out + \ifHy@typexml + \immediate\write\@outlinefile{\relax}% + \fi + \fi + \fi + \endgroup +} + +\def\oline#1{$\overline{\mbox{#1}}$} +\def\TableHeader{} +\def\DECO@{\@firstofone} +\def\DECO@blink{\uwave} +\def\DECO@underline{\uline} +\def\DECO@overline{\oline} +\expandafter\def\csname DECO@line-through\endcsname{\sout} +\def\QuaddingStart{% + \ifx\FOtextalignlast\att@relative + \csname startQ@\FOtextalign\endcsname + \else + \csname startQ@\FOtextalignlast\endcsname + \fi +}% +\def\QuaddingEnd{% + \ifx\FOtextalignlast\att@relative + \csname endQ@\FOtextalign\endcsname + \else + \csname endQ@\FOtextalignlast\endcsname + \fi +}% +\def\Quadding{% + \ifx\FOtextalignlast\att@relative + \csname Q@\FOtextalign\endcsname + \else + \csname Q@\FOtextalignlast\endcsname + \fi +}% +% page number compression (by David Carlisle) +\def\fopagecitation{\csname r@\FOrefid\endcsname} +%was \hyperlink{\FOrefid}{\pageref{\FOrefid}}} +\newcount\sortcount +\newtoks\sorttoks +\def\fosortpagecitation{% + \setbox0\hbox{\global\sortcount=0\expandafter\expandafter\expandafter + \@secondoffive\csname r@\FOrefid\endcsname + \relax\relax\relax\relax\relax}% + \let\@elt\fosort@elt + \global\sorttoks\expandafter{\expandafter}\the\sorttoks + \ifnum\sortcount<\maxdimen + \global\sorttoks\expandafter{% + \the\expandafter\sorttoks\expandafter\@elt\expandafter{\the\sortcount}}% + \fi + } + +\def\fosort@elt#1{% + \ifnum#1>\sortcount + \global\sorttoks\expandafter{\the\expandafter\sorttoks\expandafter\@elt + \expandafter{\the\sortcount}\@elt{#1}}% + \global\sortcount\maxdimen + \else + \ifnum#1<\sortcount + \global\sorttoks\expandafter{\the\sorttoks\@elt{#1}}% + \fi + \fi +} + +\gdef\focompress@elt#1{% + \global\advance\sortcount\@ne + \ifnum#1=\sortcount\relax + \edef\foheld{#1}% + \else + \ifx\foheld\relax + \else + \FOrangechar + \fi + \foheld\fosep#1\relax + \let\foheld\relax + \fi + \global\sortcount#1\relax + \def\fosep{, }% +} + +% headers +\def\FirstHead{\csname right-xsl-before\endcsname} +\def\FirstFoot{\csname right-xsl-after\endcsname} +\expandafter\def\csname left-xsl-before\endcsname{} +\expandafter\def\csname left-xsl-after\endcsname{} +\expandafter\def\csname right-xsl-before\endcsname{} +\expandafter\def\csname right-xsl-after\endcsname{} +\@ifundefined{pdfoutput}{}{\def\pdfBorderAttrs{/Border [0 0 0]}} + +%color +\def\@declaredcolor#1{% + \@ifundefined{\string\color @#1}% + {\expandafter\HTMLXColor#1000000\\{#1}}% + {}% + \expandafter\let\expandafter\current@color + \csname\string\color @#1\endcsname + \set@color + \ignorespaces} + +\def\HTMLXColor#1#2#3#4#5#6#7#8\\#9{% +% \typeout{Defining color #9 as RGB "#2#3, "#4#5, "#6#7}% + \toks@{\definecolor{#9}{RGB}}% +\uppercase{\the\toks@{"#2#3, "#4#5, "#6#7}}% +} +\def\HTMLColor#1#2#3#4#5#6#7#8{% + \definecolor{#1}{RGB}{"#3#4, "#5#6, "#7#8}} +\HTMLColor{aqua}.00FFFF +\HTMLColor{black}.000000 +\HTMLColor{blue}.0000FF +\HTMLColor{fuchsia}.FF00FF +\HTMLColor{gray}.808080 +\HTMLColor{green}.008000 +\HTMLColor{lime}.00FF00 +\HTMLColor{maroon}.800000 +\HTMLColor{navy}.000080 +\HTMLColor{olive}.808000 +\HTMLColor{purple}.800080 +\HTMLColor{red}.FF0000 +\HTMLColor{silver}.C0C0C0 +\HTMLColor{teal}.008080 +\HTMLColor{white}.FFFFFF +\HTMLColor{yellow}.FFFF00 + +\definecolor{orange}{cmyk}{0,0.61,0.87,0} + \long\def\@firstoffive#1#2#3#4#5{#1}% + \long\def\@secondoffive#1#2#3#4#5{#2}% + \long\def\@thirdoffive#1#2#3#4#5{#3}% + \long\def\@fourthoffive#1#2#3#4#5{#4}% + \long\def\@fifthoffive#1#2#3#4#5{#5}% + +\expandafter\let\csname Format-1\endcsname\@arabic +\expandafter\let\csname Format-i\endcsname\@roman +\expandafter\let\csname Format-I\endcsname\@Roman +\expandafter\let\csname Format-a\endcsname\@alph +\expandafter\let\csname Format-A\endcsname\@Alph + +\def\FOgeneratePage#1#2\@null{\csname Format-#1\endcsname{\c@page}#2} + +\def\endtrivlist{% + \if@inlabel + \leavevmode + \global \@inlabelfalse + \fi + \if@newlist + \@noitemerr + \global \@newlistfalse + \fi + \ifhmode\unskip \par\fi + \if@noparlist \else + \ifInInsertion\else + \ifdim\lastskip >\z@ + \@tempskipa\lastskip \vskip -\lastskip + \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip + \vskip\@tempskipa + \fi + \fi + \@endparenv + \fi +} + +\def\@endparenv{% + \ifInInsertion\else\addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue\fi +} + +\def\@item[#1]{% + \if@noparitem + \@donoparitem + \else + \if@inlabel + \indent \par + \fi + \ifhmode + \unskip\unskip \par + \fi + \ifInInsertion + \else + \if@newlist +% removed this test 2000/11/05. always put in topsep. +% \if@nobreak +% \@nbitem +% \else + \addpenalty\@beginparpenalty + \addvspace\@topsep + \addvspace{-\parskip}% +% \fi + \else + \addpenalty\@itempenalty + \addvspace\itemsep + \fi + \fi + \global\@inlabeltrue + \fi + \global\everypar{% + \@minipagefalse + \global\@newlistfalse + \if@inlabel + \global\@inlabelfalse + {\setbox\z@\lastbox + \ifvoid\z@ + \kern-\itemindent + \fi}% + \box\@labels\FOlabel + \penalty\z@ + \fi + \if@nobreak + \global\@nobreakfalse + \clubpenalty \@M + \else + \clubpenalty \@clubpenalty + \global\everypar{}% + \fi + }% + \if@noitemarg + \@noitemargfalse + \if@nmbrlist + \refstepcounter\@listctr + \fi + \fi + \sbox\@tempboxa{\makelabel{#1}}% +%\typeout{LIST at \the\inputlineno, \the\itemindent, \the\labelwidth, \the\wd\@tempboxa}% + \global\setbox\@labels\hbox{% + \unhbox\@labels + \hskip \itemindent + \hskip -\labelwidth + \hskip -\labelsep + \ifdim \wd\@tempboxa >\labelwidth + \box\@tempboxa + \else + \hbox to\labelwidth {\unhbox\@tempboxa}% + \fi + \hskip \labelsep}% + \ignorespaces} + + +% support for markers +\gdef\FOmarks{} + +\gdef\FOaddmarker#1#2{% + \ifx\relax#1 + \else + \def\FOtemp{#1}% + \ifx\FOtemp\FOmarkerclassname + \else + \toks@\expandafter{\the\toks@{#1}{#2}}% + \fi + \expandafter\FOaddmarker + \fi} + + +\gdef\FOgetmarker#1#2{% + \ifx\relax#1 + \DEBUG{unknown mark \FOretrieveclassname, at \the\inputlineno}% + \else + \def\FOtemp{#1}% + \ifx\FOtemp\FOthisretrieveclassname +% \typeout{\the\inputlineno: Retrieve mark (\FOretrieveposition): +% \FOthisretrieveclassname: #2}% + \FOmarkergobble{#2}% + \fi + \expandafter\FOgetmarker + \fi} + +\gdef\FOmarkergobble#1#2\relax\relax{\fi\fi#1} + +% linebreak +\def\FOLINEBREAK{% +\ifnum\FOTableNesting>0 +\else + \\ +\fi +} + + +%\tracingpages3\relax +% vertical spacing +\newskip\FOafterskip +\def\FOvspaceafter{% + \ifFOinOutput + \else + \ifnum\FOTableNesting>0 + \else + \ifx\@empty\FOspaceafter + \@tempdima\FOspaceafteroptimum + \advance\@tempdima by -\FOspaceafterminimum + \@tempdimb\FOspaceafteroptimum + \advance\@tempdimb by \FOspaceaftermaximum + \FOafterskip\FOspaceafteroptimum plus \@tempdimb minus \@tempdima + \else + \FOafterskip\FOspaceafter + \fi + \@tempswafalse + \ifx\FOkeepwithnext\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi + \addvspace\FOafterskip + \if@tempswa \addpenalty{9996}\fi + \fi + \fi +} + +\@secpenalty = -300 +\def\FOvspacebefore{% + \ifFOinOutput + \else + \ifx\@empty\FOspacebefore + \@tempdima\FOspacebeforeoptimum + \advance\@tempdima by -\FOspacebeforeminimum + \@tempdimb\FOspacebeforeoptimum + \advance\@tempdimb by \FOspacebeforemaximum + \@tempskipa\FOspacebeforeoptimum plus \@tempdimb minus \@tempdima + \else + \@tempskipa\FOspacebefore + \fi + %\typeout{SPACE BEFORE \the\inputlineno: \the\@tempskipa, \FOspacebeforeminimum/\FOspacebeforemaximum/\FOspacebeforeoptimum}% + \ifnum\FOTableNesting>0 + \rule{\z@}{\@tempskipa}% + \else + \@tempswafalse + \ifx\FOkeepwithnext\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi + \@tempskipb\f@baselineskip\relax\@tempskipb3\@tempskipb\relax + %\ifx\@empty\FOspacebefore\else + %\if@tempswa\vskip0pt plus \@tempskipb + %\addpenalty\@secpenalty\vskip-\lastskip\fi\fi + \if@tempswa\addpenalty\@secpenalty\fi + \addvspace\@tempskipa + \fi + \fi + \def\FOspacebefore{\z@}% +} + +\def\addpenalty#1{% + \ifvmode + \if@minipage + \else + \if@nobreak + \else + \ifdim\lastskip=\z@ + \penalty#1\relax + \else + \@tempskipb\lastskip + \vskip -\lastskip + \penalty#1% + \vskip\@tempskipb + \fi + \fi + \fi + \else + \@noitemerr + \fi +} +% lets do some setup +% setup +\paperwidth211mm +\paperheight297mm +\hoffset-1in +\voffset-1in +\def\fps@table{!htbp} +\def\fps@figure{!htbp} +\parindent\z@ +\parskip\z@ +\emergencystretch 3em +\tabcolsep3pt +\hbadness=4000 +\hyphenpenalty=400 +\pretolerance=500 +\relpenalty=500 +\tolerance=1000 +\vbadness=3000 +\widowpenalty=0 +\clubpenalty=0 +\@twosidetrue +\fboxsep0pt +\setcounter{topnumber}{5} +\renewcommand\topfraction{.9} +\setcounter{bottomnumber}{12} +\renewcommand\bottomfraction{.9} +\setcounter{totalnumber}{6} +\renewcommand\textfraction{.1} +\def\FOpdfsetpagesize#1#2{% + \@ifundefined{pdfoutput}{}{% + \global\pdfpagewidth\paperwidth + \global\pdfpageheight\paperheight + \DEBUG{Setting pdf size to \the\pdfpagewidth, \the\pdfpageheight}% + }% +} +\let\SpecialOffset\z@ +% and now read the .cfg +\openin\@inputcheck fotex.cfg +\ifeof\@inputcheck\relax +\else + \closein\@inputcheck + \input{fotex.cfg} +\fi +\begingroup +\catcode`\^^M\active\catcode`\ \active\gdef\@resetactivechars{\def^^M{}\def {}}\endgroup +%\catcode`\^^M\active\gdef\@resetactivechars{\def^^M{x}}\endgroup + +\def\@outputpage{% + \begingroup % the \endgroup is put in by \aftergroup + \let\protect\noexpand +% \@resetactivechars + \@parboxrestore + \shipout\vbox{% + \set@typeset@protect + \aftergroup\endgroup + \aftergroup\set@typeset@protect + % correct? or just restore by ending + % the group? + \if@specialpage +% \typeout{PAGE=FIRST \the\c@page}% + \global\@specialpagefalse + \def\@thehead{\csname\FirstHead\endcsname}% + \def\@thefoot{\csname\FirstTail\endcsname}% + \let\@themargin\oddsidemargin + \def\headheight{\FirstHeadExtent}% + \def\tailheight{\FirstTailExtent}% + \else + \ifBlankPage +%\typeout{PAGE=BLANK \the\c@page}% + \global\BlankPagefalse + \def\@thehead{\csname\BlankHead\endcsname}% + \def\@thefoot{\csname\BlankTail\endcsname}% + \let\@themargin\oddsidemargin + \def\headheight{\BlankHeadExtent}% + \def\tailheight{\BlankTailExtent}% + \else + \ifodd\count\z@ +% \typeout{PAGE=ODD \the\c@page}% + \def\@thehead{\csname\OddHead\endcsname}% + \def\@thefoot{\csname\OddTail\endcsname}% + \let\@themargin\oddsidemargin + \def\headheight{\OddHeadExtent}% + \def\tailheight{\OddTailExtent}% + \else +% \typeout{PAGE=EVEN \the\c@page}% + \def\@thehead{\csname\EvenHead\endcsname}% + \def\@thefoot{\csname\EvenTail\endcsname}% + \let\@themargin\evensidemargin + \def\headheight{\EvenHeadExtent}% + \def\tailheight{\EvenTailExtent}% + \fi + \fi + \fi + \@tempdima\textwidth + \advance\@tempdima by -\FOheadindent + \reset@font + \normalsize + \normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + %\baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \offinterlineskip + \@begindvi + \vskip \topmargin + \vskip -\InnerTopMargin + \moveright\@themargin \vbox {% + \setbox\@tempboxa \vbox to\z@{% + \color@hbox + \normalcolor + \hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thehead}}}% + \color@endbox + \vss + }% + \dp\@tempboxa \z@ + \box\@tempboxa + \vskip\headsep + \vskip\InnerTopMargin + \box\@outputbox + \baselineskip\footskip + \vskip\bottommargin + \vskip-\tailheight + \@tempdima\textwidth + \advance\@tempdima by -\FOheadindent + \setbox\@tempboxa \vbox to\tailheight{% + \color@hbox + \normalcolor + \hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thefoot}}}% + \color@endbox + \vfil + }% + \dp\@tempboxa \z@ + \box\@tempboxa + }% + }% + \global \@colht \textheight + \stepcounter{page}% + \ifForcePageSetup + \global\advance\SimplePMRefs1\relax + \DEBUG{Start page \the\SimplePMRefs\space of page sequence, using layout \CurrentPageMaster, at page \the\c@page}% + \setaccordingtomaster + \ifnum\NColumns>1\relax + \refreshmulticols % this is defined in nomulticols.sty + \fi + \else + \DEBUG{Skipping page set up at page \the\c@page}% + \fi + \let\firstmark\botmark +} + +\def\FO@character#1{% +\ifx\FOverticalalign\att@baseline + #1% +\else + \ifx\FOverticalalign\att@super + \textsuperscript{#1}% + \else + \ifx\FOverticalalign\att@sub + \textsubscript{#1}% + \else + \PlayWithShift + \raisebox{\dimen@}{#1}% + \fi + \fi +\fi +} +\def\FO@inlinesequence#1{% + \FOSetFont{normal}% + \ifx\FOletterspacing\att@normal + \def\pre@sequence{{#1}}% + \else + \def\pre@sequence{\@ifundefined{thisso}{\sodef\thisso{}{\FOletterspacing}{.4em}{.5em}}{}{\thisso{#1}}}% + \fi + \ifx\FOverticalalign\att@baseline + \csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}% + \else + \ifx\FOverticalalign\att@super + \textsuperscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}}% + \else + \ifx\FOverticalalign\att@sub + \textsubscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}}% + \else + \PlayWithShift + \raisebox{\dimen@}{\csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}}% + \fi + \fi + \fi +} +\def\interpretwidth{% + \ifx\FOborderwidth\att@thin\def\FOborderwidth{0.4pt}\fi + \ifx\FOborderwidth\att@medium\def\FOborderwidth{0.8pt}\fi + \ifx\FOborderwidth\att@thick\def\FOborderwidth{1.2pt}\fi + \ifx\FOborderbeforewidth\att@thin\def\FOborderbeforewidth{0.4pt}\fi + \ifx\FOborderbeforewidth\att@medium\def\FOborderbeforewidth{0.8pt}\fi + \ifx\FOborderbeforewidth\att@thick\def\FOborderbeforewidth{1.2pt}\fi + \ifx\FOborderafterwidth\att@thin\def\FOborderafterwidth{0.4pt}\fi + \ifx\FOborderafterwidth\att@medium\def\FOborderafterwidth{0.8pt}\fi + \ifx\FOborderafterwidth\att@thick\def\FOborderafterwidth{1.2pt}\fi + \ifx\FOborderstartwidth\att@thin\def\FOborderstartwidth{0.4pt}\fi + \ifx\FOborderstartwidth\att@medium\def\FOborderstartwidth{0.8pt}\fi + \ifx\FOborderstartwidth\att@thick\def\FOborderstartwidth{1.2pt}\fi + \ifx\FOborderendwidth\att@thin\def\FOborderendwidth{0.4pt}\fi + \ifx\FOborderendwidth\att@medium\def\FOborderendwidth{0.8pt}\fi + \ifx\FOborderendwidth\att@thick\def\FOborderendwidth{1.2pt}\fi +} + +\def\FOboxedsequence#1{% +\FOSetFont{normal}% +\ifx\FOborderwidth\@empty +\else + \interpretwidth + \fboxrule\FOborderwidth +\fi +\ifx\FOverticalalign\att@baseline + \fbox{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% +\else + \ifFOSuper + \fbox{\textsuperscript{\FOlabel#1}}% + \else + \ifFOSub + \fbox{\textsubscript{\FOlabel#1}}% + \else + \PlayWithShift + \fbox{\raisebox{\dimen@}{\FOlabel#1}}% + \fi + \fi +\fi +} +% +\def\FOSetStatic{\expandafter\@SetStatic\FOtextindent\\} +\def\@SetStatic#1\\{\expandafter\@@SetStatic\FOfontsize\\{#1}} +\def\@@SetStatic#1\\#2{\expandafter\@@@SetStatic\FOfontweight\\{#1}{#2}} +\def\@@@SetStatic#1\\#2#3{\expandafter\@@@@SetStatic\FOfontvariant\\{#1}{#2}{#3}} +\def\@@@@SetStatic#1\\#2#3#4{\expandafter\@@@@@SetStatic\FOfontstyle\\{#1}{#2}{#3}{#4}} +\def\@@@@@SetStatic#1\\#2#3#4#5{\expandafter\@@@@@@SetStatic\FOfontstretch\\{#1}{#2}{#3}{#4}{#5}} +\def\@@@@@@SetStatic#1\\#2#3#4#5#6{\expandafter\@@@@@@@SetStatic\FOfontfamily\\{#1}{#2}{#3}{#4}{#5}{#6}} + +\expandafter\def\csname Static:DummyRegion\endcsname{} +\def\@@@@@@@SetStatic#1\\#2#3#4#5#6#7#8#9{% + \DEBUG{ set up static area Static:#9 [#8]}% + \expandafter\gdef\csname Static:#9\endcsname{% + {% + {\def\XML@parent{}\global\FOinOutputtrue + \def\FOwhitespacecollapse{true}% + \def\FOwrapoption{wrap}% + \def\FOtextalign{start}% + \def\FOfontfamily{#1}% + \def\FOfontsize{#6}% + \def\FOfontstretch{#2}% + \def\FOfontvariant{#4}% + \def\FOfontweight{#5}% + \def\FOfontstyle{#3}#8\global\FOinOutputfalse}}}% + \ifx\FOflowname\att@xsl@footnote@separator\relax + \xdef\footnoterulepre{Static:#9}% + \global\footnotesep\z@\relax + \setbox\@tempboxa\vbox{\csname\footnoterulepre\endcsname}% + \@tempdima=\z@\relax + \advance\@tempdima\ht\@tempboxa\relax + \advance\@tempdima\dp\@tempboxa\relax + \global\skip\footins\@tempdima\relax + \gdef\footnoterule{\vfill\vbox to\z@{\vss\csname\footnoterulepre\endcsname}}% + \fi +} + +\def\setaccordingtomaster{% + \global\@specialpagetrue + \@ifundefined{Atomic:\CurrentPageMaster} + { + \@ifundefined{Lead:\the\SimplePMRefs:\CurrentPageMaster} + { + \ifnum\SimplePMRefs>1\relax\global\@specialpagefalse\fi + \@ifundefined{First:\CurrentPageMaster} + { + \ifx\FOinitialpagenumber\att@auto + \ifodd\c@page + \DEBUG{Master \CurrentPageMaster: no first page, use odd page} + \xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname} + \else + \DEBUG{Master \CurrentPageMaster: no first page, use even page} + \@ifundefined{Even:\CurrentPageMaster} + {\xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname}} + {\xdef\PFirst{\csname Even:\CurrentPageMaster\endcsname}} + \fi + \else + \ifx\FOinitialpagenumber\att@autoeven + \@ifundefined{Even:\CurrentPageMaster} + {\xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname}} + {\xdef\PFirst{\csname Even:\CurrentPageMaster\endcsname}} + \else + \ifx\FOinitialpagenumber\att@autoodd + \xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname} + \else + \ifodd\FOinitialpagenumber + \xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname} + \else + \@ifundefined{Even:\CurrentPageMaster} + {\xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname}} + {\xdef\PFirst{\csname Even:\CurrentPageMaster\endcsname}} + \fi + \fi + \fi + \fi + } + { + \xdef\PFirst{\csname First:\CurrentPageMaster\endcsname} + } + \@ifundefined{Blank:\CurrentPageMaster} + {\xdef\PBlank{\csname Odd:\CurrentPageMaster\endcsname}} + {\xdef\PBlank{\csname Blank:\CurrentPageMaster\endcsname}} + \@ifundefined{Even:\CurrentPageMaster} + {\xdef\PEven{\csname Odd:\CurrentPageMaster\endcsname}} + {\xdef\PEven{\csname Even:\CurrentPageMaster\endcsname}} + \xdef\POdd{\csname Odd:\CurrentPageMaster\endcsname} + } + { + \xdef\PFirst{\csname Lead:\the\SimplePMRefs:\CurrentPageMaster\endcsname} + \global\let\POdd\PFirst + \global\let\PEven\PFirst + \global\let\PBlank\PFirst + } + } + { + \global\let\PFirst\CurrentPageMaster + \global\let\PBlank\CurrentPageMaster + \global\let\POdd\CurrentPageMaster + \global\let\PEven\CurrentPageMaster + } + \DEBUG{ first page master is [\PFirst]} + \DEBUG{ odd page master is [\POdd]} + \DEBUG{ even page master is [\PEven]} + \DEBUG{ blank page master is [\PBlank]} + \expandafter\Pass\csname\POdd:xsl-region-body\endcsname\\ + \csname Atomic:\POdd\endcsname + \global\oddsidemargin\MasterLeftMargin + \global\evensidemargin\MasterLeftMargin + \global\advance\evensidemargin by \SpecialOffset + \global\advance\oddsidemargin by \SpecialOffset + \@ifundefined{Atomic:\PEven} + { + \DEBUG{no master for Atomic:\PEven} + } + { + \csname Atomic:\PEven\endcsname + \global\evensidemargin\MasterLeftMargin + \global\advance\evensidemargin by \SpecialOffset + } + \xdef\EvenHeadExtent{\csname\PEven:before-extent\endcsname} + \xdef\EvenHead{Static:\csname\PEven:before\endcsname} + \xdef\EvenTailExtent{\csname\PEven:after-extent\endcsname} + \xdef\EvenTail{Static:\csname\PEven:after\endcsname} + \xdef\FirstHeadExtent{\csname\PFirst:before-extent\endcsname} + \xdef\FirstHead{Static:\csname\PFirst:before\endcsname} + \xdef\FirstTailExtent{\csname\PFirst:after-extent\endcsname} + \xdef\FirstTail{Static:\csname\PFirst:after\endcsname} + \xdef\OddHeadExtent{\csname\POdd:before-extent\endcsname} + \xdef\OddHead{Static:\csname\POdd:before\endcsname} + \xdef\OddTailExtent{\csname\POdd:after-extent\endcsname} + \xdef\OddTail{Static:\csname\POdd:after\endcsname} + \xdef\BlankHeadExtent{\csname\PBlank:before-extent\endcsname} + \xdef\BlankHead{Static:\csname\PBlank:before\endcsname} + \xdef\BlankTailExtent{\csname\PBlank:after-extent\endcsname} + \xdef\BlankTail{Static:\csname\PBlank:after\endcsname} + \FOSetPage +} + +\let\olditem\item +\def\item{\if@inlabel\leavevmode\fi\olditem} +\def\FOlabel{% + \ifx\@empty\FOid\else + % \typeout{Hypertext label \FOid, at \the\inputlineno}% + \@bsphack + \protected@write\@mainaux{}% + {\string\newlabel{\FOid}{{}{\noexpand\FOgeneratePage\FOformat\noexpand\@null}{}{}{}}}% + \@esphack + \hyper@@anchor{\FOid}{\relax}% + \global\let\FOid\@empty + \fi +} + +\def\FOListBlock{% + \FOSetFont{normal}% + \get@external@font\xdef\FOlistlabelfont{\external@font}% + \ifx\@empty\FOspacebefore + \@tempdima\FOspacebeforeoptimum + \advance\@tempdima by -\FOspacebeforeminimum + \@tempdimb\FOspacebeforeoptimum + \advance\@tempdimb by \FOspacebeforemaximum + \itemsep\FOspacebeforeoptimum plus \@tempdimb minus \@tempdima + \else + \itemsep\FOspacebefore + \fi + \itemindent=\FOstartindent + \PercentToDimen{\FOprovisionaldistancebetweenstarts}% + \leftmargin=\@tempdima\relax + \rightmargin=\FOmarginright + \labelwidth=\@tempdima\relax + \advance\labelwidth by -\FOprovisionallabelseparation + \expandafter\csname List\FOtextalign\endcsname +%\typeout{List at \the\inputlineno: labelwidth: \the\labelwidth, +% labelsep: \the\labelsep, leftmargin: \the\leftmargin, itemindent +% \the\itemindent, makelabel: \meaning\makelabel, +% itemsep: \the\itemsep, \FOtextalign}% +} + +\def\FOOutputBlock{% + \FOSetFont{output}% + \ifx\FOtextalignlast\att@relative + \csname startQ@\FOtextalign\endcsname +% \csname Q@\FOtextalign\endcsname + \else + \csname startQ@\FOtextalignlast\endcsname +% \csname Q@\FOtextalignlast\endcsname + \fi +% \Quadding + \ifFOBlockGrab + \FOBoxedBlock{\textwidth}% + \fi +} + +\def\list#1#2{% + \ifnum \@listdepth >5\relax + \@toodeep + \else + \global\advance\@listdepth\@ne + \fi + \rightmargin\z@ + \listparindent\z@ + \itemindent\z@ + \csname @list\romannumeral\the\@listdepth\endcsname + \def\@itemlabel{#1}% + \let\makelabel\@mklab + \@nmbrlistfalse + #2\relax + \@trivlist + \parskip\parsep + \parindent\listparindent + \global\advance\linewidth -\rightmargin + \global\advance\linewidth -\leftmargin + \advance\@totalleftmargin \leftmargin + \parshape \@ne \@totalleftmargin \linewidth + \ignorespaces} + +\def\FONormalBlock{% + \ifnum\FOTableNesting>0 + \ifx\FOtextalign\att@centered + \centering + \fi + \FOSetFont{normalblock}% +% \vrule height \f@baselineskip depth \z@ width \z@\relax + \else + \ifnum\FOinList>0 + \ifFOListInnerPar + \unskip\par + \FOvspacebefore + \fi + \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi + \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi + \ifx\FOwrapoption\att@nowrap\obeylines\fi + \ifInInsertion\start@strut\fi + \else + \ifx\FObreakbefore\att@page + \let\tempID\FOid +% \penalty -\@M + \newpage + \let\FOid\tempID + \else + \ifx\FObreakbefore\att@oddpage + \let\tempID\FOid +% \penalty -\@M + \newpage + \ifodd\c@page\else\BlankPage\fi + \let\FOid\tempID + \else + \ifx\FObreakbefore\att@evenpage + \let\tempID\FOid +% \penalty -\@M + \newpage + \ifodd\c@page\BlankPage\fi + \let\FOid\tempID + \fi + \fi + \fi + \par + \Quadding + \ifFOBlockGrab + \FOBoxedBlock{\linewidth}% + \else + \FOBorderTop + \ifdim\FOpaddingbefore>\z@ + \vskip\FOpaddingbefore + \fi + \FOvspacebefore + \parindent\FOtextindent + \advance\leftskip by \FOpaddingstart + \advance\leftskip by \FOmarginleft + \advance\rightskip by \FOpaddingend + \advance\rightskip by \FOmarginright + \fi +% \par + \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi + \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi + \ifx\FOwrapoption\att@nowrap\obeylines\fi + \FOlabel + \fi + \ifx\XML@parent\FOFootnoteBody\else\FOSetFont{normal}\fi + \fi +} + +\def\FOEndOutputBlock{% + \ifx\FOtextalignlast\att@relative + \csname endQ@\FOtextalign\endcsname + \else + \csname endQ@\FOtextalignlast\endcsname + \fi + \ifFOBlockGrab + \FOEndBoxedBlock + \fi + \par +} +\def\FOEndBlock{% + \ifx\XML@parent\FOListItemLabel + \else + \ifnum\FOinList>0 + \ifInInsertion\start@strut\fi + \ifFOListInnerPar\unskip\par\fi + \else + \ifnum\FOTableNesting>0 + \else + \FOEndBlockTwo + \fi + \fi + \fi +} + + +\def\FOEndBlockTwo{% + \par + \ifFOBlockGrab + \FOEndBoxedBlock + \else + \ifdim\FOpaddingafter>\z@ + \vskip\FOpaddingafter + \fi + \FOBorderBottom + \fi + \ifx\FObreakafter\att@page + \clearpage +% \penalty -\@M + \else + \ifx\FObreakafter\att@oddpage + \ifodd\c@page\cleardoublepage\else\clearpage\fi + \else + \ifx\FObreakafter\att@evenpage + \ifodd\c@page\clearpage\else\cleardoublepage\fi + \fi + \fi + \fi + \@tempswafalse + \ifx\FOkeepwithnext\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi + \if@tempswa\addpenalty{9993}\fi + \FOvspaceafter +% \if@tempswa\@afterheading\fi +} + +% \FOStartGrab is never called, so it seems +\def\FOStartGrab#1{% + \@tempdima#1 + \XFOstartindent\FOstartindent + \ifnum\XFOstartindent=\z@ + \else + \advance\XFOstartindent by -\FOmarginleft + \advance\XFOstartindent by -\FOborderstartwidth + \advance\XFOstartindent by -\FOpaddingstart + \advance\@tempdima by -\XFOstartindent + \fi + \advance\@tempdima by -\FOmarginleft + \advance\@tempdima by -\FOborderstartwidth + \advance\@tempdima by -\FOpaddingstart + \XFOendindent\FOendindent + \ifx\FOstartindent\att@bodystart + \let\FOstartindent\z@ + \fi + \ifx\FOendindent\att@labelend + \let\FOendindent\z@ + \fi + \ifnum\XFOendindent=\z@ + \else + \advance\XFOendindent by -\FOpaddingend + \advance\XFOendindent by -\FOmarginright + \advance\XFOendindent by -\FOborderendwidth + \advance\@tempdima by -\XFOendindent + \fi + \advance\@tempdima by -\FOpaddingend + \advance\@tempdima by -\FOmarginright + \advance\@tempdima by -\FOborderendwidth +%\typeout{Block at\the\inputlineno,Padding:\FOpaddingstart/\FOpaddingend,Border:\FOborderstartwidth/\FOborderendwidth,Margin:\FOmarginleft/\FOmarginleft,Indent:\FOstartindent/\FOendindent, \the\XFOstartindent/\the\XFOendindent}% +% + \begin{lrbox}{\BlockBox}% + \begin{minipage}[b]{\@tempdima}% + \vskip\FOpaddingbefore + \parindent\FOtextindent\leftskip\z@\rightskip\z@ +} +% \FOEndGrab is never called, so it seems +\def\FOEndGrab#1{% + \vspace*{\FOpaddingafter}% + \end{minipage}% + \end{lrbox}% +%\typeout{Grabbed Block at\the\inputlineno,Padding:\FOpaddingstart/\FOpaddingend,|\FOpaddingbefore/\FOpaddingafter, Border:\FOborderstartwidth/\FOborderendwidth,Margin:\FOmarginleft/\FOmarginleft,Indent:\FOstartindent/\FOendindent, \the\XFOstartindent/\the\XFOendindent}% + \FOvspacebefore + \@tempdima\ht\BlockBox +% \advance\@tempdima by \FOpaddingbefore +% \advance\@tempdima by \FOpaddingafter + \advance\@tempdima by \FOborderbeforewidth + \advance\@tempdima by \FOborderafterwidth + \ifx\FOborderstyle\att@solid + \interpretwidth + \ifx\FObackgroundcolor\att@transparent + \fboxrule\FOborderwidth + \fboxsep\FOpadding + \vbox to \@tempdima{\hsize#1\parindent\z@\vfil + \hbox{\hfil\fbox{\usebox{\BlockBox}}\hfil}\vfil}% + \else + \vbox to \@tempdima{\hsize#1\vfil\fboxsep\FOpadding\fboxrule\FOborderwidth + \hbox{\hfil\fcolorbox{\FObordercolor}{\FObackgroundcolor}% + {\box\BlockBox}\hfil}\vfil}% + \fi + \else + \vbox to \@tempdima{\hsize#1\parindent\z@\vfil + \ifdim\FOborderbeforewidth>\z@ + {\color{\FOborderbeforecolor}% + \vrule width #1 depth \z@ height \FOborderbeforewidth}% + \fi + \hbox{% + \hskip\XFOstartindent + \hskip\FOmarginleft + \ifdim\FOborderstartwidth>\z@ + {\color{\FOborderstartcolor}% + \vrule width \FOborderstartwidth height \the\@tempdima}% + \fi + \hskip\FOpaddingstart + \ifx\FObackgroundcolor\att@transparent + \hbox{\box\BlockBox}% + \else + \colorbox{\FObackgroundcolor}% + {\box\BlockBox}% + \fi + \hskip\FOpaddingend + \ifdim\FOborderendwidth>\z@ + {\color{\FOborderendcolor}% + \vrule width \FOborderendwidth depth \z@ height + \the\@tempdima}% + \fi + \hskip\FOmarginright + \hskip\XFOendindent + }% + \ifdim\FOborderafterwidth>\z@ + {\color{\FOborderaftercolor}% + \vrule width #1 depth \z@ height \FOborderafterwidth }% + \fi + \vfil + }% + \fi +} + +\def\FOBorderBottom{% + \ifx\FOborderafterstyle\att@solid + \ifx\FOborderafterwidth\att@thin\def\FOborderafterwidth{0.4pt}\fi + \ifx\FOborderafterwidth\att@medium\def\FOborderafterwidth{0.8pt}\fi + \ifx\FOborderafterwidth\att@thick\def\FOborderafterwidth{1.2pt}\fi + \else + \def\FOborderafterwidth{\z@}% + \fi + \ifx\FOborderbeforestyle\att@solid + \ifx\FOborderbeforewidth\att@thin\def\FOborderbeforewidth{0.4pt}\fi + \ifx\FOborderbeforewidth\att@medium\def\FOborderbeforewidth{0.8pt}\fi + \ifx\FOborderbeforewidth\att@thick\def\FOborderbeforewidth{1.2pt}\fi + \FOBlockGrabtrue + \else + \def\FOborderbeforewidth{\z@}% + \fi + \ifdim\FOborderafterwidth>\z@ + \ifx\FOborderafterstyle\att@solid + {\color{\FObordercolor}\hrule height \FOborderafterwidth}% + \fi + \fi +} + +\def\FOBorderTop{% + \ifdim\FOborderbeforewidth>\z@ + \ifx\FOborderbeforestyle\att@solid + {\color{\FObordercolor}\hrule height \FOborderbeforewidth}% + \fi + \fi +} + +\def\FOfootnotemark{\protect\@FOfootnotemark} +\def\@FOfootnotemark#1{% tag + \def\@thefnmark{#1}% + \expandafter\let\csname p@footnote\endcsname\relax + \@footnotemark% +} +\def\FOfootnotetext{\protect\@FOfootnotetext} +\def\@FOfootnotetext#1#2{% plain tag and text, no interpretation + \def\@thefnmark{#1}% + \expandafter\let\csname p@footnote\endcsname\relax + \@footnotetext{\FOlabel#2}} + +\def\start@strut{% + \vrule height \ht\strutbox depth \dp\strutbox width \z@\relax +} + +\def\FOplainfootmark#1{#1} + +\newtoks\sav@everypar +\newbox\sav@labels + +%\showboxbreadth10 +%\showboxdepth10 +\gdef \@makecol {% + \ifvoid\footins + \setbox\@outputbox \box\@cclv + \else +% \showbox\footins + \setbox\@outputbox \vbox {% + \boxmaxdepth \@maxdepth + \@tempdima\dp\@cclv + \unvbox \@cclv + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule + \unvbox \footins + \color@endgroup + }% + \fi + \xdef\@freelist{\@freelist\@midlist}% + \global \let \@midlist \@empty + \@combinefloats + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht {% + \@texttop + \dimen@ \dp\@outputbox + \unvbox \@outputbox + \vskip -\dimen@ + \@textbottom + }% + \fi + \global \maxdepth \@maxdepth +} + +\long\def\FOplainfoottext#1{% + \insert\footins{\relax + \reset@font\footnotesize + \FORestoreFontSize + \size@update + \interlinepenalty\interfootnotelinepenalty + \splittopskip0pt\relax + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth\@parboxrestore + \color@begingroup\InInsertiontrue + \xdef\Sav@FOListBlocks{\the\FOListBlocks}\FOListBlocks0\relax + \global\let\sav@if@inlabel\if@inlabel + \global\let\sav@if@nobreak\if@nobreak + \global\let\sav@if@newlist\if@newlist + \global\setbox\sav@labels\box\@labels + \expandafter\global\expandafter\sav@everypar\expandafter{\the\everypar}\global\everypar{}\relax + \FOinList0\relax + \FOListBodyfalse + #1\ifhmode\nobreak\fi + \global\FOListBlocks\Sav@FOListBlocks\relax + \global\let\if@inlabel\sav@if@inlabel + \global\let\if@nobreak\sav@if@nobreak + \global\let\if@newlist\sav@if@newlist + \global\setbox\@labels\box\sav@labels + \expandafter\global\expandafter\everypar\expandafter{\the\sav@everypar}\relax + %\vskip\lineskip + \color@endgroup}% +} +\let\FOfoottext\FOplainfoottext + +\def\FOboxedfoottext#1{ + \edef\boxedfootnotetext{\the\BoxedFootnotes\noexpand\FOplainfoottext}% + \global\BoxedFootnotes=\expandafter{\boxedfootnotetext{#1}}% +} + +\def\FOnofoottext#1{} + +\ColSpecs={}% +\NCols0 +\RowCount0 +\def\doTable#1\\#2{% + \par + \advance\leftskip by \FOpaddingstart + \advance\rightskip by \FOpaddingend + \advance\rightskip by \FOmarginright + \advance\leftskip by \FOmarginleft + \FOSetFont{normal}% + \csname LTleft@\FOtextalign\endcsname + \csname LTright@\FOtextalign\endcsname +%\typeout{LT: \FOtextalign, \the\LTleft, \the\LTright}% + \FOlabel + \ifnum\NColumns>1 + \tabular{#1} + \else + \ifnum\FOTableNesting>1 + \tabular{#1}% + \else + \longtable{#1}% + \fi + \fi + #2} + +\newdimen\@default +\@default=10pt + +% set up hyphenation and font-related things +\def\LastLanguage{(undefined)} +\selectlanguage{english} + +\def\LoadLanguage#1{% + \begingroup\utfeight@protect@chars\xdef\newL{#1}\endgroup +% \@ifundefined{L@\newL}{% +% \DEBUG{WARNING: unknown language \newL, loading english}% +% \csname L@us\endcsname +% }{% + \ifx\newL\LastLanguage + \else + \DEBUG{\the\inputlineno: hyphenation \newL, to replace \LastLanguage}% + \csname L@\newL\endcsname + \fi +%} +\edef\LastLanguage{\newL}} + +\def\FoTeXSetSpacingStyle{% + \ifx\FoTeXSpacingStyle\att@french + \frenchspacing + \typeout{INFO: Using french-spacing in document}% + \else + \typeout{INFO: Using normal, i.e. nonfrench-spacing in document}% + %\nonfrenchspacing + \fi +} +\def\FOSetHyphenation{% + \ifx\FOhyphenate\att@true + \LoadLanguage{\FOlanguage}% + \hyphenpenalty=\exhyphenpenalty + \else + \hyphenpenalty=10000 + \fi +} +\def\FOSetFont#1{% + \FOSetHyphenation + \edef\LaTeXshape{\csname Width@\FOfontstretch\endcsname + \csname Weight@\FOfontweight\endcsname}% + \ifx\LaTeXshape\@empty\def\LaTeXshape{m}\fi +\edef\fFamName{\FOfontfamily}% +\DEBUG{#1: \FOfontweight, \FOfontstyle, + \FOfontsize, \FOtextalign, \LaTeXshape}% + \edef\f@series{\LaTeXshape}% + \edef\f@shape{\csname Posture@\FOfontstyle\endcsname}% + \ifx\FOfontvariant\att@smallcaps + \def\f@shape{sc}% + \fi + \let\f@family\relax + \@for\FOfoo:=\FOfontfamily\do{% + \ifx\f@family\relax + \expandafter\let\expandafter\f@family + \csname Family@\FOfoo\endcsname + \fi}% + \ifx\f@family\relax + \def\f@family{\csname Family@\Defaultx@fontfamily\endcsname}% + \fi + \FOSetFontSize + \selectfont + \ifx\FOcolor\@empty + \else + \color{\FOcolor}% + \fi +} +\expandafter\def\csname size-xx-small\endcsname{7pt} +\expandafter\def\csname size-x-small\endcsname{8pt} +\expandafter\def\csname size-small\endcsname{9pt} +\expandafter\def\csname size-medium\endcsname{10pt} +\expandafter\def\csname size-large\endcsname{14.4pt} +\expandafter\def\csname size-x-large\endcsname{18pt} +\expandafter\def\csname size-xx-large\endcsname{20pt} +\def\computeFOfontsize{% + \expandafter\ifx\csname size-\FOfontsize\endcsname\relax + \PlayWithFSize\FOfontsize + \else + \edef\FOfontsizefinal{\csname size-\FOfontsize\endcsname}% + \fi +} +\def\FOSetFootFont{% + \computeFOfontsize + \ifx\FOlineheight\att@normal + \@tempdima\FOfontsizefinal + \multiply\@tempdima by 12 + \divide\@tempdima by 10 + \set@fontsize\FOfootnotesize{\FOfontsizefinal}{\@tempdima}% + \else + \@setfontsize\FOfootnotesize{\FOfontsizefinal}{\FOlineheight}% + \fi +} +\def\FOSetFontSize{% + \computeFOfontsize + \ifx\FOlineheight\att@normal + \@tempdima\FOfontsizefinal + \multiply\@tempdima by 12 + \divide\@tempdima by 10 + \set@fontsize\baselinestretch{\FOfontsizefinal}{\@tempdima}% + \else + \set@fontsize\baselinestretch{\FOfontsizefinal}{\FOlineheight}% + \fi +} +\def\FOSaveFontSize{% + \computeFOfontsize + \ifx\FOlineheight\att@normal + \@tempdima\FOfontsizefinal + \multiply\@tempdima by 12 + \divide\@tempdima by 10 + \xdef\FORestoreFontSize{\noexpand\set@fontsize\noexpand\baselinestretch{\FOfontsizefinal}{\the\@tempdima}}% + \else + \xdef\FORestoreFontSize{\noexpand\set@fontsize\noexpand\baselinestretch{\FOfontsizefinal}{\FOlineheight}}% + \fi +} + + +\DeclareRobustCommand*\textsubscript[1]{% + \@textsubscript{\selectfont#1}} +%\def\@textsubscript#1{% +% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} +\def\@textsubscript#1{% + {\m@th\ensuremath{_{\mbox{#1}}}}} +\def\@textsuperscript#1{% + {\m@th\ensuremath{^{\mbox{#1}}}}} +\def\reserved@e{} + +\def\FOSetPage{% + \global\bottommargin\Marginbottom +% \headsep\Margintop + \global\headsep\z@ + \global\topmargin\MasterTopMargin + \global\advance\topmargin by \SpecialOffset + \global\textheight\paperheight + \global\textwidth\paperwidth +% \advance\textheight by -\FirstHeadExtent +% \advance\textheight by -\FirstTailExtent + \global\advance\textheight by -\MasterTopMargin +% \advance\textheight by -\Margintop + \global\advance\textheight by -\MasterBottomMargin +% \advance\textheight by -\Marginbottom + \global\advance\textwidth by -\MasterLeftMargin + \global\advance\textwidth by -\MasterRightMargin + \FOpdfsetpagesize{\paperwidth}{\paperheight} + \global\@colht\textheight + \global\@colroom\textheight + \global\vsize\textheight + \global\columnwidth\textwidth + \global\hsize\columnwidth + \global\linewidth\hsize + \gdef\headheight{12pt}% +% if we are in the middle of a list, we have to redo some of the list assignments + \FOResetPageParts + \DEBUG{Page size is \the\textwidth/\the\textheight, + on paper \the\paperwidth/\the\paperheight,^^J + with paper margins \the\MasterRightMargin/\the\MasterLeftMargin, + and region margins \the\topmargin/\the\MasterBottomMargin;^^J + footskip is \the\footskip, headsep is \the\headsep^^J + evensidemargin \the\evensidemargin, oddsidemargin \the\oddsidemargin}% +} + +\def\FOResetPageParts{ + \expandafter\ifx\csname This@LineWidth\endcsname\relax\else + \global\linewidth\This@LineWidth\relax + \fi +} + +% don't ask +\def\supppdf{supp-pdf} +\let\FOinputIfFileExists\InputIfFileExists +\def\InputIfFileExists#1#2#3{% + {\def\@tempa{#1}\ifx\@tempa\supppdf\else + \FOinputIfFileExists{#1}{#2}{#3}\fi}} +%\catcode`^^M=10 +\providecommand\textasciitilde{~} + +\define@key{Gin}{scale}{% + \if@tempswa + \edef\@tempa{\toks@{\noexpand\Gscale@box{#1}[#1]{\the\toks@}}}% + \@tempa + \else + \def\Gin@req@sizes{% + \def\Gin@scalex{#1}\let\Gin@scaley\Gin@exclamation + \Gin@req@height\Gin@scalex\Gin@nat@height + \Gin@req@width\Gin@scalex\Gin@nat@width}% + \fi + \@tempswatrue} + + +\def\usewhitespace{% + \UnicodeCharacter{13}{ \ignorespaces}% + \UnicodeCharacter{32}{ \ignorespaces}% + \UnicodeCharacter{9}{ \ignorespaces}% +} +\def\ignorewhitespace{% + \UnicodeCharacter{13}{}% + \UnicodeCharacter{32}{}% + \UnicodeCharacter{9}{}% +} + +% taken from Heiko Oberdiek's epstopdf.sty +% but the redefinitions need to be global +\global\let\orgGin@setfile\Gin@setfile +\global\def\Gin@setfile#1#2#3{% + \if`\@car #3\relax\@nil + \let\Gin@base\filename@base + \immediate\write18{\@cdr #3\@empty\@nil}% + \orgGin@setfile{#1}{#2}{\filename@base #2}% + \else + \orgGin@setfile{#1}{#2}{#3}% + \fi +} + +% support .gif and .eps +\g@addto@macro\Gin@extensions{,.eps} +\g@addto@macro\Gin@extensions{,.gif} +\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf #1}} +\@namedef{Gin@rule@.gif}#1{{png}{.png}{`giftopng #1}} +\errorstopmode +\endinput diff --git a/Master/texmf-dist/tex/xmltex/passivetex/fotex.xmt b/Master/texmf-dist/tex/xmltex/passivetex/fotex.xmt new file mode 100644 index 00000000000..8bdbe94be2c --- /dev/null +++ b/Master/texmf-dist/tex/xmltex/passivetex/fotex.xmt @@ -0,0 +1,1664 @@ +% $Id: //depot/Master/texmf-dist/tex/xmltex/passivetex/fotex.xmt#1 $, $Date: 2004/02/09 $ +% +% PassiveTeX version 1.25 +% +% Copyright 2003 Sebastian Rahtz/Oxford University +% +% +% Permission is hereby granted, free of charge, to any person obtaining +% a copy of this software and any associated documentation files (the +% ``Software''), to deal in the Software without restriction, including +% without limitation the rights to use, copy, modify, merge, publish, +% distribute, sublicense, and/or sell copies of the Software, and to +% permit persons to whom the Software is furnished to do so, subject to +% the following conditions: +% +% The above copyright notice and this permission notice shall be included +% in all copies or substantial portions of the Software. +% +% Includes fixes from Tomas Bures +% Yura Zotov +% Anton V. Boyarshinov +% Dirk Roorda + + +% MODIFICATIONS IN XMLTEX (Dirk) +% allow an explicit inheritance of attributes + +\gdef\XML@attrib@x#1#2{ + \gdef\XML@tempb##1#1##2##3##4\relax\relax{ + \global\let\inheritexplicit\relax + {\set@display@protect + \expandafter\ifx\csname#2\endcsname\inherit + \global\let\inheritexplicit\noexpand + \fi}% + \ifx\inheritexplicit\relax + \def##2{#2}% + \fi + ##1##4\relax\relax}} + +% test whether an attribute was explicitly set on an element + +\gdef\explicitattribute#1{ + { \expandafter\def\csname#1-test\endcsname{\global\def\isexplicit{1}} + \global\let\isexplicit\relax + \def\XML@doattribute##1##2##3{\csname##2-test\endcsname} + \the\XML@attribute@toks + } +} + +\DeclareNamespace{fotex}{http://www.tug.org/fotex} +\DeclareNamespace{fo}{http://www.w3.org/1999/XSL/Format} +\def\string@autoauto{autoauto} +\XMLstring\FirstOnPage<>first-starting-within-page +\XMLstring\LastOnPage<>last-starting-within-page +\XMLstring\LINK<>LINK +\XMLstring\file@urlprefix<>url( +\XMLstring\file@prefix<>file:// +\XMLstring\file@shortprefix<>file: +\XMLstring\prop@width<>proportional-column-width(1) +\XMLstringX\@staticafter<>xsl-after +\XMLstringX\@staticbefore<>xsl-before +\XMLstringX\@staticstart<>xsl-start +\XMLstringX\att@NaN<>NaN +\XMLstringX\att@after<>after +\XMLstringX\att@all<>all +\XMLstringX\att@always<>always +\XMLstringX\att@any<>any +\XMLstringX\att@auto<>auto +\XMLstringX\att@autoeven<>auto-even +\XMLstringX\att@autoodd<>auto-odd +\XMLstringX\att@baseline<>baseline +\XMLstringX\att@before<>before +\XMLstringX\att@black<>black +\XMLstringX\att@blank<>blank +\XMLstringX\att@bottom<>bottom +\XMLstringX\att@centered<>center +\XMLstringX\att@endoneven<>end-on-even +\XMLstringX\att@endonodd<>end-on-odd +\XMLstringX\att@even<>even +\XMLstringX\att@evenpage<>even-page +\XMLstringX\att@false<>false +\XMLstringX\att@first<>first +\XMLstringX\att@first@starting@within@page<>first-starting-within-page +\XMLstringX\att@french<>french +\XMLstringX\att@last@starting@within@page<>last-starting-within-page +\XMLstringX\att@lr@tb<>lr-tb +\XMLstringX\att@maximum<>maximum +\XMLstringX\att@maximumuniform<>maximum-uniform +\XMLstringX\att@medium<>medium +\XMLstringX\att@no<>no +\XMLstringX\att@no@limit<>no-limit +\XMLstringX\att@none<>none +\XMLstringX\att@normal<>normal +\XMLstringX\att@nowrap<>no-wrap +\XMLstringX\att@odd<>odd +\XMLstringX\att@oddpage<>odd-page +\XMLstringX\att@page<>page +\XMLstringX\att@page@sequence<>page-sequence +\XMLstringX\att@pre<>pre +\XMLstringX\att@preserve<>preserve +\XMLstringX\att@relative<>relative +\XMLstringX\att@repeat<>repeat +\XMLstringX\att@replace<>replace +\XMLstringX\att@scaletofit<>scale-to-fit +\XMLstringX\att@scroll<>scroll +\XMLstringX\att@show<>show +\XMLstringX\att@smallcaps<>small-caps +\XMLstringX\att@solid<>solid +\XMLstringX\att@static<>static +\XMLstringX\att@sub<>sub +\XMLstringX\att@super<>super +\XMLstringX\att@thick<>thick +\XMLstringX\att@thin<>thin +\XMLstringX\att@tiny<>true +\XMLstringX\att@top<>top +\XMLstringX\att@transparent<>transparent +\XMLstringX\att@true<>true +\XMLstringX\att@uniform<>uniform +\XMLstringX\att@use@font@metrics<>use-font-metrics +\XMLstringX\att@visible<>visible +\XMLstringX\att@xsl@any<>xsl-any +\XMLstringX\att@xsl@footnote@separator<>xsl-footnote-separator +\XMLstringX\att@yes<>yes +\XMLstring\att@bodystart<>body-start() +\XMLstring\att@labelend<>label-end() +\XMLstringX\leader@pattern@space<>space +\XMLstringX\leader@pattern@rule<>rule +\XMLstringX\leader@pattern@dots<>dots +\XMLstringX\rule@style@dashed<>dashed +\XMLstringX\rule@style@dotted<>dotted +\XMLnamespaceattributeX{fo}{media-usage}{\FOmediausage}{} +% The "media-usage" property is used to control +% how the selected display medium is used to +% present the page(s) specified by the stylesheet. +\XMLnamespaceattributeX{fo}{text-altitude}{\FOtextaltitude}{} +% Specifies the "height" to be used for the ascent +% above the dominant baseline +\XMLnamespaceattributeX{fo}{text-depth}{\FOtextdepth}{} +% Specifies the "depth" to be used for the descent +% below the domiant baseline. +%auto | absolute | fixed | inherit +%\XMLnamespaceattributeX{fo}{absolute-position}{\FOabsoluteposition}{auto} +%link | visited | active | hover | focus +%\XMLnamespaceattributeX{fo}{active-state}{\FOactivestate}{} +%auto | | | inherit +\XMLnamespaceattributeX{fo}{alignment-adjust}{\FOalignmentadjust}{auto} +%yes | no +%\XMLnamespaceattributeX{fo}{auto-restore}{\FOautorestore}{\inherit} +% | [[ left-side | far-left | left +%| center-left | center | center-right | right | far-right | right-side +%] || behind ] | leftwards | rightwards | inherit +%\XMLnamespaceattributeX{fo}{azimuth}{\FOazimuth}{\inherit} +%[ || +% +%|| || || +%| ]]inherit +\XMLnamespaceattributeX{fo}{background}{\FObackground}{} +%scroll | fixed | inherit +%\XMLnamespaceattributeX{fo}{background-attachment}{\FObackgroundattachment}{scroll} +% | transparent | inherit +\XMLnamespaceattribute{fo}{background-color}{\FObackgroundcolor}{transparent} +% | none | inherit +%\XMLnamespaceattributeX{fo}{background-image}{\FObackgroundimage}{none} +%[ [ | ]{1,2} | +% [ [top | center | bottom] || [left | center | right] ] ] | inherit +%\XMLnamespaceattributeX{fo}{background-position}{\FObackgroundposition}{0\% 0\%} +% | | +%left | center | right | inherit +%\XMLnamespaceattributeX{fo}{background-position-horizontal}{\FObackgroundpositionhorizontal}{0\%} +% | | +%top | center | bottom | inherit +%\XMLnamespaceattributeX{fo}{background-position-vertical}{\FObackgroundpositionvertical}{0\%} +%repeat | repeat-x | repeat-y | no-repeat | inherit +%\XMLnamespaceattributeX{fo}{background-repeat}{\FObackgroundrepeat}{repeat} +%baseline | before-edge +%| text-before-edge | middle | after-edge +%| text-after-edge | ideographic | alphabetic | hanging | mathematical +%| inherit +%\XMLnamespaceattributeX{fo}{baseline-identifier}{\FObaselineidentifier}{} +%baseline | sub | super | | | inherit +\XMLnamespaceattributeX{fo}{baseline-shift}{\FObaselineshift}{baseline} +%blank | not-blank | any | inherit +\XMLnamespaceattributeX{fo}{blank-or-not-blank}{\FOblankornotblank}{any} +%auto | | | | inherit +%\XMLnamespaceattributeX{fo}{block-progression-dimension}{\FOblockprogressiondimension}{auto} +%[ || || ] | inherit +\XMLnamespaceattributeX{fo}{border}{\FOborder}{} +% | inherit +\XMLnamespaceattribute{fo}{border-after-color}{\FOborderaftercolor}{\FOcolor} +% | inherit +\XMLnamespaceattributeX{fo}{border-after-style}{\FOborderafterstyle}{none} +% | | inherit +\XMLnamespaceattribute{fo}{border-after-width}{\FOborderafterwidth}{medium} +% | inherit +\XMLnamespaceattribute{fo}{border-before-color}{\FOborderbeforecolor}{\FOcolor} +% | inherit +\XMLnamespaceattributeX{fo}{border-before-style}{\FOborderbeforestyle}{none} +% | | inherit +\XMLnamespaceattribute{fo}{border-before-width}{\FOborderbeforewidth}{medium} +\XMLnamespaceattributeX{fo}{border-collapse}{\FObordercollapse}{\inherit} +%{1,4} | transparent | inherit +\XMLnamespaceattribute{fo}{border-color}{\FObordercolor}{black} +% | inherit +\XMLnamespaceattribute{fo}{border-end-color}{\FOborderendcolor}{\FOcolor} +% | inherit +\XMLnamespaceattributeX{fo}{border-end-style}{\FOborderendstyle}{none} +% | inherit +\XMLnamespaceattributeX{fo}{border-end-width}{\FOborderendwidth}{medium} +\XMLnamespaceattributeX{fo}{border-separation}{\FOborderseparation}{\inherit} +% ? | inherit +\XMLnamespaceattributeX{fo}{border-spacing}{\FOborderspacing}{\inherit} +% | inherit +\XMLnamespaceattribute{fo}{border-start-color}{\FOborderstartcolor}{\FOcolor} +% | inherit +\XMLnamespaceattributeX{fo}{border-start-style}{\FOborderstartstyle}{none} +% | inherit +\XMLnamespaceattributeX{fo}{border-start-width}{\FOborderstartwidth}{medium} +%{1,4} | inherit +\XMLnamespaceattributeX{fo}{border-style}{\FOborderstyle}{} +% | | auto | inherit +\XMLnamespaceattributeX{fo}{border-width}{\FOborderwidth}{} +\XMLnamespaceattributeX{fo}{border-bottom}{\FOborderbottom}{\LINK} +\XMLnamespaceattribute{fo}{border-bottom-color}{\FOborderbottomcolor}{\LINK} +\XMLnamespaceattributeX{fo}{border-bottom-style}{\FOborderbottomstyle}{\LINK} +\XMLnamespaceattributeX{fo}{border-bottom-width}{\FOborderbottomwidth}{\LINK} +\XMLnamespaceattributeX{fo}{border-left}{\FOborderleft}{\LINK} +\XMLnamespaceattribute{fo}{border-left-color}{\FOborderleftcolor}{\LINK} +\XMLnamespaceattributeX{fo}{border-left-style}{\FOborderleftstyle}{\LINK} +\XMLnamespaceattributeX{fo}{border-left-width}{\FOborderleftwidth}{\LINK} +\XMLnamespaceattributeX{fo}{border-right}{\FOborderright}{\LINK} +\XMLnamespaceattribute{fo}{border-right-color}{\FOborderrightcolor}{\LINK} +\XMLnamespaceattributeX{fo}{border-right-style}{\FOborderrightstyle}{\LINK} +\XMLnamespaceattributeX{fo}{border-right-width}{\FOborderrightwidth}{\LINK} +\XMLnamespaceattributeX{fo}{border-top}{\FObordertop}{\LINK} +\XMLnamespaceattribute{fo}{border-top-color}{\FObordertopcolor}{\LINK} +\XMLnamespaceattributeX{fo}{border-top-style}{\FObordertopstyle}{\LINK} +\XMLnamespaceattributeX{fo}{border-top-width}{\FObordertopwidth}{\LINK} + + +% | | auto | inherit +\XMLnamespaceattributeX{fo}{bottom}{\FObottom}{auto} +%auto | column | page | even-page | odd-page | inherit +\XMLnamespaceattributeX{fo}{break-after}{\FObreakafter}{auto} +%auto | column | page | even-page | odd-page | inherit +\XMLnamespaceattributeX{fo}{break-before}{\FObreakbefore}{auto} +%before | after | start | end | top | bottom | left | right | inherit +\XMLnamespaceattributeX{fo}{caption-side}{\FOcaptionside}{\inherit} +% +\XMLnamespaceattributeX{fo}{case-name}{\FOcasename}{} +% +\XMLnamespaceattributeX{fo}{case-title}{\FOcasetitle}{} +% +\XMLnamespaceattribute{fo}{character}{\FOcharacter}{} +%start | end | left | right | both | none | inherit +\XMLnamespaceattributeX{fo}{clear}{\FOclear}{none} +% | auto | inherit +\XMLnamespaceattributeX{fo}{clip}{\FOclip}{auto} +% | inherit +\XMLnamespaceattribute{fo}{color}{\FOcolor}{\inherit} +% | inherit +\XMLnamespaceattributeX{fo}{color-profile-name}{\FOcolorprofilename}{} +% | inherit +\XMLnamespaceattributeX{fo}{column-count}{\FOcolumncount}{1} +% | | inherit +\XMLnamespaceattributeX{fo}{column-gap}{\FOcolumngap}{12.0pt} +% +\XMLnamespaceattributeX{fo}{column-number}{\FOcolumnnumber}{} +% +\XMLnamespaceattribute{fo}{column-width}{\FOcolumnwidth}{} +% | auto +%\XMLnamespaceattributeX{fo}{content-type}{\FOcontenttype}{auto} + +%none | | inherit +\XMLnamespaceattributeX{fo}{country}{\FOcountry}{\inherit} +% || | inherit +%\XMLnamespaceattributeX{fo}{cue}{\FOcue}{} +% | none | inherit +%\XMLnamespaceattributeX{fo}{cue-after}{\FOcueafter}{none} +% | none | inherit +%\XMLnamespaceattributeX{fo}{cue-before}{\FOcuebefore}{none} +% +%\XMLnamespaceattributeX{fo}{destination-placement-offset}{\FOdestinationplacementoffset}{\z@} +%ltr | rtl | inherit +\XMLnamespaceattributeX{fo}{direction}{\FOdirection}{\inherit} +%auto | before | center | after | inherit +\XMLnamespaceattributeX{fo}{display-align}{\FOdisplayalign}{\inherit} +%auto | autosense-script | no-change | reset-size +%| ideographic | alphabetic | hanging | mathematical | inherit +%\XMLnamespaceattributeX{fo}{dominant-baseline}{\FOdominantbaseline}{auto} +% | below | level | above | higher | lower | inherit +%\XMLnamespaceattributeX{fo}{elevation}{\FOelevation}{\inherit} +%show | hide | inherit +\XMLnamespaceattributeX{fo}{empty-cells}{\FOemptycells}{\inherit} +% | inherit +\XMLnamespaceattribute{fo}{end-indent}{\FOendindent}{\inherit} +%yes | no +%\XMLnamespaceattributeX{fo}{ends-row}{\FOendsrow}{no} +% | | inherit +\XMLnamespaceattributeX{fo}{extent}{\FOextent}{0.0pt} +% +\XMLnamespaceattributeX{fo}{external-destination}{\FOexternaldestination}{} +%before | start | end | left | right | none | inherit +\XMLnamespaceattributeX{fo}{float}{\FOfloat}{none} +% +\XMLnamespaceattributeX{fo}{flow-name}{\FOflowname}{} +%[ [ || +%|| ]? [ / ]? +%] | caption | icon | menu | message-box | small-caption | status-bar +%| inherit +\XMLnamespaceattributeX{fo}{font}{\FOfont}{\inherit} +%[[ | ],]* [ | ] | inherit +\XMLnamespaceattributeX{fo}{font-family}{\FOfontfamily}{\inherit} +%\XMLnamespaceattributeX{fo}{font-selection-strategy}{\FOselectionstrategy}{auto} +% | | | | inherit +\XMLnamespaceattribute{fo}{font-size}{\FOfontsize}{\inherit} +% | none | inherit +\XMLnamespaceattributeX{fo}{font-size-adjust}{\FOfontsizeadjust}{\inherit} +%normal | wider | narrower | ultra-condensed +% | extra-condensed | condensed | semi-condensed | semi-expanded | +% expanded | extra-expanded | ultra-expanded |inherit +\XMLnamespaceattributeX{fo}{font-stretch}{\FOfontstretch}{\inherit} +%normal | italic | oblique | backslant | inherit +\XMLnamespaceattributeX{fo}{font-style}{\FOfontstyle}{\inherit} +%normal | small-caps | inherit +\XMLnamespaceattributeX{fo}{font-variant}{\FOfontvariant}{\inherit} +%normal | bold | bolder | lighter | 100 | 200 +% | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit +\XMLnamespaceattributeX{fo}{font-weight}{\FOfontweight}{\inherit} +%auto | even | odd | end-on-even | end-on-odd | no-force | inherit +\XMLnamespaceattributeX{fo}{force-page-count}{\FOforcepagecount}{auto} +% +\XMLnamespaceattributeX{fo}{format}{\FOformat}{\inherit} +% | inherit +%\XMLnamespaceattributeX{fo}{glyph-orientation-horizontal}{\FOglyphorientationhorizontal}{\inherit} +%auto | | inherit +%\XMLnamespaceattributeX{fo}{glyph-orientation-vertical}{\FOglyphorientationvertical}{\inherit} +% +\XMLnamespaceattributeX{fo}{grouping-separator}{\FOgroupingseparator}{} +% +%\XMLnamespaceattributeX{fo}{grouping-size}{\FOgroupingsize}{} +% | | auto | inherit +\XMLnamespaceattributeX{fo}{height}{\FOheight}{auto} +%false | true | inherit +\XMLnamespaceattributeX{fo}{hyphenate}{\FOhyphenate}{\inherit} +% | inherit +\XMLnamespaceattributeX{fo}{hyphenation-character}{\FOhyphenationcharacter}{\inherit} +%auto | column | page | inherit +%\XMLnamespaceattributeX{fo}{hyphenation-keep}{\FOhyphenationkeep}{\inherit} +%no-limit | | inherit +%\XMLnamespaceattributeX{fo}{hyphenation-ladder-count}{\FOhyphenationladdercount}{\inherit} +% | inherit +\XMLnamespaceattributeX{fo}{hyphenation-push-character-count}{\FOhyphenationpushcharactercount}{\inherit} +% | inherit +%\XMLnamespaceattributeX{fo}{hyphenation-remain-character-count}{\FOhyphenationremaincharactercount}{\inherit} +% +\XMLnamespaceattributeX{fo}{id}{\FOid}{} +%yes | no +%\XMLnamespaceattributeX{fo}{indicate-destination}{\FOindicatedestination}{no} +%auto | auto-odd | auto-even | | inherit +\XMLnamespaceattributeX{fo}{initial-page-number}{\FOinitialpagenumber}{auto} +%auto | | | | inherit +%\XMLnamespaceattributeX{fo}{inline-progression-dimension}{\FOinlineprogressiondimension}{auto} +%null string | +\XMLnamespaceattributeX{fo}{internal-destination}{\FOinternaldestination}{} +% | inherit +\XMLnamespaceattributeX{fo}{keep-together}{\FOkeeptogether}{\inherit} +\XMLnamespaceattributeX{fo}{keep-together.within-line}{\FOkeeptogetherLine}{\inherit} +% since we dont support column keeps, use Page here (not) +\XMLnamespaceattributeX{fo}{keep-together.within-column}{\FOkeeptogetherColumn}{\inherit} +\XMLnamespaceattributeX{fo}{keep-together.within-page}{\FOkeeptogetherPage}{\inherit} +% | inherit +\XMLnamespaceattributeX{fo}{keep-with-next}{\FOkeepwithnext}{auto} +\XMLnamespaceattributeX{fo}{keep-with-next.within-line}{\FOkeepwithnextLine}{auto} +\XMLnamespaceattributeX{fo}{keep-with-next.within-column}{\FOkeepwithnextColumn}{auto} +\XMLnamespaceattributeX{fo}{keep-with-next.within-page}{\FOkeepwithnextPage}{auto} +% | inherit +\XMLnamespaceattributeX{fo}{keep-with-previous}{\FOkeepwithprevious}{auto} +\XMLnamespaceattributeX{fo}{keep-with-previous.within-line}{\FOkeepwithpreviousLine}{auto} +\XMLnamespaceattributeX{fo}{keep-with-previous.within-column}{\FOkeepwithpreviousColumn}{auto} +\XMLnamespaceattributeX{fo}{keep-with-previous.within-page}{\FOkeepwithpreviousPage}{auto} +%none | | inherit +\XMLnamespaceattributeX{fo}{language}{\FOlanguage}{\inherit} +% | | inherit +\XMLnamespaceattributeX{fo}{last-line-end-indent}{\FOlastlineendindent}{\inherit} +%none | reference-area | page | inherit + \XMLnamespaceattribute{fo}{leader-length.maximum}{\FOleaderlengthmaximum}{\textwidth} +% leader-length.minimum=0pt, .optimum=12.0pt, .maximum=100percent + \XMLnamespaceattributeX{fo}{leader-alignment}{\FOleaderalignment}{\inherit} + \XMLnamespaceattributeX{fo}{leader-length}{\FOleaderlength}{\inherit} +%space | rule | dots | use-content | inherit + \XMLnamespaceattributeX{fo}{leader-pattern}{\FOleaderpattern}{\inherit} +%use-font-metrics | | inherit + \XMLnamespaceattributeX{fo}{leader-pattern-width}{\FOleaderpatternwidth}{\inherit} +% | | auto | inherit + \XMLnamespaceattribute{fo}{leader-length.optimum}{\FOleaderlengthoptimum}{0pt} + \XMLnamespaceattributeX{fo}{leader-length.minimum}{\FOleaderlengthminimum}{\z@}\XMLnamespaceattributeX{fo}{left}{\FOleft}{auto} +%normal | | | inherit +\XMLnamespaceattributeX{fo}{letter-spacing}{\FOletterspacing}{\inherit} +%auto | alphabetic | traditional +\XMLnamespaceattributeX{fo}{letter-value}{\FOlettervalue}{auto} +%ignore | preserve | treat-as-space | inherit +\XMLnamespaceattributeX{fo}{linefeed-treatment}{\FOlinefeedtreatment}{\inherit} +%normal | | | | | inherit +\XMLnamespaceattributeX{fo}{line-height}{\FOlineheight}{\inherit} +%consider-shifts | disregard-shifts | inherit +\XMLnamespaceattributeX{fo}{line-height-shift-adjustment}{\FOlineheightshiftadjustment}{\inherit} +%line-height | font-height | max-height | inherit +\XMLnamespaceattributeX{fo}{line-stacking-strategy}{\FOlinestackingstrategy}{\inherit} +%{1,4} | inherit +\XMLnamespaceattributeX{fo}{margin}{\FOmargin}{} +\XMLnamespaceattributeX{fo}{margin-left} {\FOmarginleft} {0pt} +\XMLnamespaceattributeX{fo}{margin-right} {\FOmarginright} {0pt} +\XMLnamespaceattributeX{fo}{margin-top} {\FOmargintop} {0pt} +\XMLnamespaceattributeX{fo}{margin-bottom} {\FOmarginbottom} {0pt} +% +\XMLnamespaceattributeX{fo}{marker-class-name}{\FOmarkerclassname}{} +% +\XMLnamespaceattributeX{fo}{master-reference}{\FOmasterreference}{} +\XMLnamespaceattributeX{fo}{master-name}{\FOmastername}{} +% | | none | inherit +\XMLnamespaceattributeX{fo}{max-height}{\FOmaxheight}{\z@} +% | no-limit | inherit +\XMLnamespaceattributeX{fo}{maximum-repeats}{\FOmaximumrepeats}{no-limit} +% | | none | inherit +\XMLnamespaceattributeX{fo}{max-width}{\FOmaxwidth}{none} +% | | inherit +\XMLnamespaceattributeX{fo}{min-height}{\FOminheight}{\z@} +% | | inherit +\XMLnamespaceattributeX{fo}{min-width}{\FOminwidth}{} +% +\XMLnamespaceattributeX{fo}{number-columns-repeated}{\FOnumbercolumnsrepeated}{1} +% +\XMLnamespaceattributeX{fo}{number-columns-spanned}{\FOnumbercolumnsspanned}{1} +% +\XMLnamespaceattributeX{fo}{number-rows-spanned}{\FOnumberrowsspanned}{1} +%odd | even | any | inherit +\XMLnamespaceattributeX{fo}{odd-or-even}{\FOoddoreven}{any} +% | inherit +\XMLnamespaceattributeX{fo}{orphans}{\FOorphans}{\inherit} +%visible | hidden | scroll | auto | inherit +\XMLnamespaceattributeX{fo}{overflow}{\FOoverflow}{auto} +%{1,4} | inherit +\XMLnamespaceattributeX{fo}{padding}{\FOpadding}{\z@} +% | | inherit +\XMLnamespaceattributeX{fo}{padding-after}{\FOpaddingafter}{\z@} +% | | inherit +\XMLnamespaceattributeX{fo}{padding-before}{\FOpaddingbefore}{\z@} +% | inherit +\XMLnamespaceattributeX{fo}{padding-bottom}{\FOpaddingbottom}{\z@} +% | inherit +\XMLnamespaceattributeX{fo}{padding-end}{\FOpaddingend}{\z@} +% | inherit +\XMLnamespaceattributeX{fo}{padding-left}{\FOpaddingleft}{\z@} +% | inherit +\XMLnamespaceattributeX{fo}{padding-right}{\FOpaddingright}{\z@} +% | inherit +\XMLnamespaceattributeX{fo}{padding-start}{\FOpaddingstart}{\z@} +% | inherit +\XMLnamespaceattributeX{fo}{padding-top}{\FOpaddingtop}{\z@} +%auto | always | avoid | left | right | inherit +\XMLnamespaceattributeX{fo}{page-break-after}{\FOpagebreakafter}{auto} +%auto | always | avoid | left | right | inherit +\XMLnamespaceattributeX{fo}{page-break-before}{\FOpagebreakbefore}{auto} +%auto | indefinite | | inherit +\XMLnamespaceattribute{fo}{page-height}{\FOpageheight}{auto} +%first | last | rest | any | inherit +\XMLnamespaceattributeX{fo}{page-position}{\FOpageposition}{any} +%auto | indefinite | | inherit +\XMLnamespaceattribute{fo}{page-width}{\FOpagewidth}{auto} +%[