diff options
author | Karl Berry <karl@freefriends.org> | 2008-05-10 00:31:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-05-10 00:31:48 +0000 |
commit | 3affd633834494c279f96078e95831935ea51ca7 (patch) | |
tree | d18cbef6ade390df34099bff78c593f00e9d7971 /Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht | |
parent | 78d169458ffb8d121d56a1345471b5dbe3f17a2a (diff) |
tex4ht-1.0.2008_05_07_2048
git-svn-id: svn://tug.org/texlive/trunk@8000 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht')
-rwxr-xr-x | Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht | 146 |
1 files changed, 96 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht b/Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht index 201bec23690..05a9e37b88a 100755 --- a/Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/mathltx.4ht @@ -1,6 +1,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% mathltx.4ht 2006-10-24-00:58 % -% Copyright (C) 2005--2006 Eitan M. Gurari % +% mathltx.4ht 2007-09-24-22:51 % +% Copyright (C) 2005--2007 Eitan M. Gurari % % % % This work may be distributed and/or modified under the % % conditions of the LaTeX Project Public License, either % @@ -24,7 +24,7 @@ % gurari@cse.ohio-state.edu % % http://www.cse.ohio-state.edu/~gurari % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\immediate\write-1{version 2006-10-24-00:58} +\immediate\write-1{version 2007-09-24-22:51} \exit:ifnot{Preamble,% amsfonts,% @@ -82,10 +82,15 @@ vanilla} \HCode{<![CDATA[}\IgnorePar} {\HCode{]]>}\EndIgnoreRule \ifOption{mml-fonts}{}{\EndNoFonts}% - \mathltxfalse \b:DviMathltx + \mathltxfalse \After:Math \b:DviMathltx \sv:ignore } \NewConfigure{DviMathltx}{2} +\def\After:Math{\After:EndMath + \global\let\After:EndMath=\empty} +\let\After:EndMath=\empty +\def\AfterMath#1{\append:def\After:EndMath{#1}% + \global\let\After:EndMath=\After:EndMath} \newif\ifmathltx \mathltxfalse \newif\ifmtext \mtextfalse \LinkCommand\mtxt:link{mtext, xlink:href, id,,,} @@ -262,6 +267,8 @@ vanilla} {htf}{254}{+}{<mglyph\Hnewline fontfamily="}{\%s"}{ index="\%s"}{ mathsize="\%d\%\%"}{}{ alt="}{"/>}} \def\ext:htfsym{\Configure{htf}{254}{+}{}{}{}{}{}{}{}} +\NewConfigure{math:amp}{1} +\Configure{math:amp}{\string&} \Configure{over} {\Send{GROUP}{0}{\string\bgroup\space}} {\HCode{\string\over\space}\Send{EndGROUP}{0}{\string\egroup\space}} @@ -412,7 +419,7 @@ vanilla} \Configure{newline} {\ht:special{t4ht@,}% \HCode{</mtext><\a:mathltx - mtext \mml:class="newline">}\ht:special{t4ht@,&\#x00A0;}% + mtext\Hnewline \mml:class="newline">}\ht:special{t4ht@,&\#x00A0;}% \ht:special{t4ht@, }% } \Configure{[]} @@ -436,7 +443,7 @@ vanilla} {\ifvmode \IgnorePar\fi \HCode{\string\end{array}}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -542,7 +549,7 @@ vanilla} \ht:special{t4ht@, }% \PauseMathClass \mtexttrue - \fi \HCode{\string&}% + \fi \HCode{\a:math:amp}% \fi} {\ifnum \HCol=4 \mtextfalse \EndPauseMathClass \ht:special{t4ht@,}% @@ -631,18 +638,15 @@ vanilla} \def\TeX{\ifmathltx \HCode{<mtext \mml:class="TeX">TeX</mtext>}\else \mml:TeX\fi} -\Configure{afterSUB}{'}{\def\SUB:prime{\SUB:SUP}} \Configure{'} {\let\:primes=\empty} - {\relax \csname SUB:prime\endcsname\sp{% - \global\let\SUB:prime=\:UnDef - \def\:tempa{\prime\prime}\ifx \:tempa\:primes - \mathop{\HCode{\string&\#x2033;}}\else + {\def\:tempa{\prime\prime}\ifx \:tempa\:primes + \HCode{''}\else \def\:tempa{\prime\prime\prime}\ifx \:tempa\:primes - \mathop{\HCode{\string&\#x2034;}}\else - \:primes \fi\fi}% + \HCode{'''}\else + \HCode{\:primes}\fi\fi } - {\let\prime=\relax \xdef\:primes{\:primes\prime}} + {\xdef\:primes{\:primes'}} \def\left#1{\bgroup \a:left{#1}\b:left{#1}} \def\right#1{\a:right{#1}\b:right{#1}\egroup} \Configure{left} @@ -799,8 +803,7 @@ vanilla} \Configure{mfenced}{\rceil}{\string&\#x2309;} \Configure{mfenced}{\lfloor}{\string&\#x230A;} \Configure{mfenced}{\rfloor}{\string&\#x230B;} -\Configure{mfenced}{\Vert}{\string&\#x2193;} -\Configure{mfenced}{\Vert}{\string&\#x2191;} +\Configure{mfenced}{\Vert}{\string&\#x2225;} \Configure{mfenced}{\rgroup}{)} \Configure{mfenced}{\lgroup}{(} \Configure{mfenced}{\bracevert}{|} @@ -838,7 +841,7 @@ vanilla} {\ifvmode \IgnorePar\fi \HCode{\r:brace}} {\ifnum \HRow>1 \HCode{\string\cr\space}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -848,7 +851,7 @@ vanilla} {\HCode{\r:brace}} {\ifnum \HRow>1 \HCode{\string\cr\space}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -863,6 +866,14 @@ vanilla} \Configure{,} {{\HCode{\string\,}}} +\let\m:Make:Label\Make:Label +\def\Make:Label#1#2{% + \ifmathltx \edef\:temp{#1}% + \expandafter\AfterMath\expandafter{\expandafter\Make:Label + \expandafter{\:temp}{#2}}% + \else \m:Make:Label{#1}{#2}% + \fi +} \def\set:label#1{\ifmathltx \HCode{\%\Hnewline\%\string\begin{label}}% {\ht:special{t4ht@, }\let\:newlnch\space \mathltxfalse #1}% @@ -893,8 +904,6 @@ vanilla} \HLet\grave=\:tempc \def\:tempc#1{\HCode{\string\hat\l:brace}#1\HCode{\r:brace}} \HLet\hat=\:tempc -\def\:tempc#1{\HCode{\string\r\l:brace}#1\HCode{\r:brace}} -\HLet\r=\:tempc \def\:tempc#1{\HCode{\string\ring\l:brace}#1\HCode{\r:brace}} \HLet\ring=\:tempc \def\:tempc#1{\HCode{\string\t\l:brace}#1\HCode{\r:brace}} @@ -907,6 +916,12 @@ vanilla} \HLet\uml=\:tempc \def\:tempc#1{\HCode{\string\vec\l:brace}#1\HCode{\r:brace}} \HLet\vec=\:tempc +\ifx\jsm:r\:UnDef + \let\jsm:r\r + \def\:tempc#1{\ifmmode\HCode{\string\r\l:brace}#1\HCode{\r:brace}% + \else \jsm:r{#1}\fi } + \HLet\r=\:tempc +\fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1191,8 +1206,6 @@ vanilla} - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{amsmath} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1273,7 +1286,7 @@ vanilla} {\ifvmode\IgnorePar\fi \HCode{\string\end \l:brace split\r:brace}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } {} @@ -1292,7 +1305,7 @@ vanilla} {\HCode{\string\begin\l:brace multline\r:brace}} {\HCode{\string\end \l:brace multline\r:brace}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } {} @@ -1327,7 +1340,7 @@ vanilla} {\HCode{\string\begin\l:brace gather\r:brace}} {\HCode{\string\end \l:brace gather\r:brace}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } {} @@ -1346,7 +1359,7 @@ vanilla} {\HCode{\string\begin\l:brace gather*\r:brace}} {\HCode{\string\end \l:brace gather*\r:brace}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } {} @@ -1359,7 +1372,7 @@ vanilla} {\HCode{\string\begin\l:brace smallmatrix\r:brace}} {\HCode{\string\end \l:brace smallmatrix\r:brace}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } {} @@ -1383,7 +1396,7 @@ vanilla} \HCode{\string\begin\l:brace #2\r:brace}} {\HCode{\string\end \l:brace #2\r:brace}\end:mathalign } {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -1554,6 +1567,16 @@ vanilla} \Send{EndGROUP}{0}{\r:brace}% \fi } +\def\:temp{\HCode{\string\firstOfOne}\,\HCode{\string\int + \string\int\space}} +\HLet\iint\:temp +\def\:temp{\HCode{\string\firstOfOne}\,\HCode{\string\int + \string\int\string\int\space}} +\HLet\iiint\:temp +\def\:temp{\HCode{\string\Rightarrow }} +\HLet\implies\:temp +\def\:temp{\HCode{\string\Leftarrow }} +\HLet\impliedby\:temp \pend:def\n:iint:{\ifDisplayMath\mathop:prefix{mathsize="big"}\fi} \pend:def\n:iiint:{\ifDisplayMath\mathop:prefix{mathsize="big"}\fi} \pend:def\n:idotsint:{\ifDisplayMath\mathop:prefix{mathsize="big"}\fi} @@ -1581,8 +1604,6 @@ vanilla} \HLet\grave=\:tempc \def\:tempc#1{\HCode{\string\hat\l:brace}#1\HCode{\r:brace}} \HLet\hat=\:tempc -\def\:tempc#1{\HCode{\string\r\l:brace}#1\HCode{\r:brace}} -\HLet\r=\:tempc \def\:tempc#1{\HCode{\string\ring\l:brace}#1\HCode{\r:brace}} \HLet\ring=\:tempc \def\:tempc#1{\HCode{\string\t\l:brace}#1\HCode{\r:brace}} @@ -1595,6 +1616,12 @@ vanilla} \HLet\uml=\:tempc \def\:tempc#1{\HCode{\string\vec\l:brace}#1\HCode{\r:brace}} \HLet\vec=\:tempc +\ifx\jsm:r\:UnDef + \let\jsm:r\r + \def\:tempc#1{\ifmmode\HCode{\string\r\l:brace}#1\HCode{\r:brace}% + \else \jsm:r{#1}\fi } + \HLet\r=\:tempc +\fi \def\:tempc#1{\HCode{\string\dddot\l:brace}#1\HCode{\r:brace}} \HLet\dddot=\:tempc @@ -1605,13 +1632,13 @@ vanilla} {\HCode{\string\end{aligned}}} {} {\HCode{\string\\}} - {\ifnum \HCol>1\HCode{\string&}\fi} {} + {\ifnum \HCol>1\HCode{\a:math:amp}\fi} {} \Configure{alignedat} {\HCode{\string\begin{alignedat}}} {\HCode{\string\end{alignedat}}} {} {\HCode{\string\\}} - {\ifnum \HCol>1\HCode{\string&}\fi} {} + {\ifnum \HCol>1\HCode{\a:math:amp}\fi} {} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1629,7 +1656,6 @@ vanilla} \endinput\empty\empty\empty\empty\empty\empty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{amstext} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1640,6 +1666,7 @@ vanilla} \endinput\empty\empty\empty\empty\empty\empty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{amstex1} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1812,7 +1839,7 @@ vanilla} {\HCode{<mtable\Hnewline \mml:class="matrix">}} {\HCode{</mtable>}} {\HCode{<mtr\Hnewline>}} {\HCode{</mtr>}} - {\HCode{\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% }} {\HCode{</mtd>}} @@ -1855,7 +1882,6 @@ vanilla} - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{plain} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2150,18 +2176,15 @@ vanilla} \def\TeX{\ifmathltx \HCode{<mtext \mml:class="TeX">TeX</mtext>}\else \mml:TeX\fi} -\Configure{afterSUB}{'}{\def\SUB:prime{\SUB:SUP}} \Configure{'} {\let\:primes=\empty} - {\relax \csname SUB:prime\endcsname\sp{% - \global\let\SUB:prime=\:UnDef - \def\:tempa{\prime\prime}\ifx \:tempa\:primes - \mathop{\HCode{\string&\#x2033;}}\else + {\def\:tempa{\prime\prime}\ifx \:tempa\:primes + \HCode{''}\else \def\:tempa{\prime\prime\prime}\ifx \:tempa\:primes - \mathop{\HCode{\string&\#x2034;}}\else - \:primes \fi\fi}% + \HCode{'''}\else + \HCode{\:primes}\fi\fi } - {\let\prime=\relax \xdef\:primes{\:primes\prime}} + {\xdef\:primes{\:primes'}} \def\left#1{\bgroup \a:left{#1}\b:left{#1}} \def\right#1{\a:right{#1}\b:right{#1}\egroup} \Configure{left} @@ -2318,8 +2341,7 @@ vanilla} \Configure{mfenced}{\rceil}{\string&\#x2309;} \Configure{mfenced}{\lfloor}{\string&\#x230A;} \Configure{mfenced}{\rfloor}{\string&\#x230B;} -\Configure{mfenced}{\Vert}{\string&\#x2193;} -\Configure{mfenced}{\Vert}{\string&\#x2191;} +\Configure{mfenced}{\Vert}{\string&\#x2225;} \Configure{mfenced}{\rgroup}{)} \Configure{mfenced}{\lgroup}{(} \Configure{mfenced}{\bracevert}{|} @@ -2357,7 +2379,7 @@ vanilla} {\ifvmode \IgnorePar\fi \HCode{\r:brace}} {\ifnum \HRow>1 \HCode{\string\cr\space}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -2367,7 +2389,7 @@ vanilla} {\HCode{\r:brace}} {\ifnum \HRow>1 \HCode{\string\cr\space}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -2388,7 +2410,6 @@ vanilla} \endinput\empty\empty\empty\empty\empty\empty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{amsopn} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2449,6 +2470,12 @@ vanilla} + + + + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{array} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2461,7 +2488,7 @@ vanilla} {\ifvmode \IgnorePar\fi \HCode{\string\end{array}}} {\ifnum \HRow> 1\HCode{\string\\\Hnewline}\fi} {} - {\HCode{\ifnum \HCol>1 \string&\fi + {\HCode{\ifnum \HCol>1 \a:math:amp\fi \ifnum 1<\HMultispan \string\multicolumn\l:brace\HMultispan\r:brace \fi}% } @@ -2511,6 +2538,11 @@ vanilla} + + + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{vanilla} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2736,6 +2768,8 @@ vanilla} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{rlbabel} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2979,5 +3013,17 @@ vanilla} + + + + + + + + + + + + \endinput |