summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-10 00:31:48 +0000
committerKarl Berry <karl@freefriends.org>2008-05-10 00:31:48 +0000
commit3affd633834494c279f96078e95831935ea51ca7 (patch)
treed18cbef6ade390df34099bff78c593f00e9d7971 /Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
parent78d169458ffb8d121d56a1345471b5dbe3f17a2a (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/tex4ht.sty')
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty98
1 files changed, 71 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty b/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
index a61c384ca6b..cc2dd5e19d2 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
+++ b/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
@@ -2,8 +2,8 @@
\string:RestoreCatcodes\endcsname{\catcode`\%\the
\catcode`\%}\catcode`\%14\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% tex4ht.sty 2006-10-28-15:32 %
-% Copyright (C) 1996--2006 Eitan M. Gurari %
+% tex4ht.sty 2008-02-25-14:04 %
+% Copyright (C) 1996--2008 Eitan M. Gurari %
% %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
@@ -27,7 +27,7 @@
% gurari@cse.ohio-state.edu %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\immediate\write-1{version 2006-10-28-15:32}
+\immediate\write-1{version 2008-02-25-14:04}
\ifx \Preamble\UnDef \else
\csname expand:after\endcsname{\csname
@@ -274,7 +274,7 @@
\def\:temp{#2}\ifx \:temp\empty \else
\expandafter\pend:defIII\csname toc#1\endcsname{#2####1}%
\fi
-
+%
}
\long\def\concat:config#1#2{\def\:temp{#2}%
@@ -967,9 +967,15 @@
\def\HtmlParOn{\gdef\HtmlPar:Off##1{##1}}
\HtmlParOn
\def\SaveEverypar{%
- \expand:after{\expandafter\gdef\csname \n:list L\endcsname }%
+ \expandafter\ifx\csname ht:everypar\endcsname\relax
+ \expand:after{\expandafter\gdef\csname \n:list L\endcsname }%
+ \expandafter{\expandafter\everypar
+ \expandafter{\the\everypar}}%
+ \else
+ \expand:after{\expandafter\gdef\csname \n:list L\endcsname }%
\expandafter{\expandafter\ht:everypar
\expandafter{\the\ht:everypar}}%
+ \fi
\expandafter\xdef\csname \n:list X\endcsname{%
\if:removeindent \global\noexpand\:removeindenttrue
\else \global\noexpand\:removeindentfalse \fi
@@ -1378,7 +1384,9 @@
\edef\re:call{\catcode`\noexpand\:\the\catcode`\: }%
\catcode`\:11
\let\sv:crs\:CrossWord
-\def\:CrossWord{\bgroup \catcode`\:12 \catcode`\@11
+\def\:CrossWord{\bgroup
+ \no:catcodes{128}{255}{12}%
+ \catcode`\:12 \catcode`\@11
\catcode`\^^M11 \:CrsWrd}%
\def\:CrsWrd##1##2##3{\egroup \sv:crs{##1}{##2}{##3}}%
%
@@ -1550,7 +1558,8 @@
\def\DefScript:#1#2#3#4#5{\def#1{\call:script{#2}{#3}{#4}{#5}}}
\def\call:script#1#2#3#4{\begingroup \vrb:tt
\leftskip\z@ \parindent\z@
- \Configure{HVerbatim}{\empty}{\empty}{\empty}{\empty}%
+ \Configure{HVerbatim}{\empty}{\empty}%
+ {\special{t4ht=}\empty}{\empty}%
\Configure{HVerbatim+}{\z@}{\hbox{ }}%
#3\ht:special{t4ht@@}%
\let\Verb:atim#1\let\Ver:batim#2%
@@ -1693,7 +1702,7 @@
\def\:temp{#2}\ifx \:temp\empty \else
\expandafter\pend:defIII\csname toc#1\endcsname{#2####1}%
\fi
-
+%
\fi
}
@@ -1813,10 +1822,18 @@
\def\:temp{#3}\ifx \:temp\empty
\Link{}{tail\Jobname}\EndLink
\else
- \expandafter\ifx \csname a:next\endcsname\relax #1\else
- \a:next \fi \Link[####1]{}{tail\Jobname}#3\EndLink
- \expandafter\ifx \csname b:next\endcsname\relax #2\else
- \b:next \fi
+ \expandafter\ifx \csname a:next+\endcsname\relax #1\else
+ \csname a:next+\endcsname \fi
+ \expandafter\ifx \csname a:next\endcsname\relax
+ \def\:next{#3}%
+ \else \let\:next\a:next \fi
+ \ifx \:next\empty
+ \Link{}{tail\Jobname}\EndLink
+ \else
+ \Link[####1]{}{tail\Jobname}\:next\EndLink
+ \fi
+ \expandafter\ifx \csname b:next+\endcsname\relax #2\else
+ \csname b:next+\endcsname \fi
\fi \fi}}%
\edef\:temp{\noexpand\:tempb
{\RefFileNumber\file:id}{\RefFile{)B\HP:file}}}%
@@ -1922,7 +1939,10 @@
\NewConfigure{crosslinks:tail}{1}
\NewConfigure{crosslinks:front}{1}
\NewConfigure{crosslinks:up}{1}
-\NewConfigure{next}[2]{\def\a:next{#1}\def\b:next{#2}}
+\NewConfigure{next}[1]{\def\a:next{#1}}
+\NewConfigure{next+}[2]{%
+ \expandafter\def\csname a:next+\endcsname{#1}%
+ \expandafter\def\csname b:next+\endcsname{#2}}
\NewConfigure{writetoc}[1]{\concat:config\a:writetoc{#1}}
\let\a:writetoc\empty
\NewConfigure{TocAt*}[2]{%
@@ -1932,9 +1952,14 @@
\Configure{TocAt*}{}{}
\Configure{TocAt}{}{}
\def\halignTD{\ifx \:mALIGN\empty \hT:D \else \:mALIGN \fi}
-\def\halignTB#1{\global\expandafter\let\expandafter\:MkHalign:
- \csname :#1:\endcsname \a:halignTB \expandafter\expandafter
- \expandafter\halign:TB \csname :#1:\endcsname!*?: \b:halignTB}
+\def\halignTB#1{
+ \expandafter\ifx \csname :#1:\endcsname\relax
+ \:warning{Missing \string\Configure{halignTB<>}{#1}}%
+ \else
+ \global\expandafter\let\expandafter\:MkHalign:
+ \csname :#1:\endcsname \a:halignTB \expandafter\expandafter
+ \expandafter\halign:TB \csname :#1:\endcsname!*?: \b:halignTB
+ \fi }
\NewConfigure{halignTB}{2}
\NewConfigure{halignTB<>}[2]{%
\expandafter\def\csname :#1:\endcsname{#2}}
@@ -2098,7 +2123,8 @@
}
\Configure{PictureAlt*+[]} {\NoFonts} {\EndNoFonts}
\Configure{PictureAttr*+[]} {\ht:special{t4ht=#1}}
-\def\HChar#1{{\leavevmode\ht:special{t4ht@#1}\ifnum #1>-1 \a:HChar\fi}}
+\def\HChar#1{{\leavevmode\ifmmode\else\expandafter\immediate\fi
+\ht:special{t4ht@#1}\ifnum #1>-1 \a:HChar\fi}}
\NewConfigure{HChar}{1}
\Configure{HChar}{x}
\NewConfigure{@Picture}[1]{\def\a:@Picture{#1}}
@@ -2288,7 +2314,9 @@
\ifx \alt:mth\empty\else \def\alt:mth{[#3]}\fi\def\c:math{#4}%
\c:def\env:PM{#1}\c:def\endenv:PM{#2}}
\def\DviMath{\a:DviMath\leavevmode \MathClass \ht:special{t4ht@(}\vbox
- \bgroup{\ht:everypar{}\leavevmode\ht:special{t4ht@)}}%
+ \bgroup{\expandafter\ifx\csname ht:everypar\endcsname\relax
+ \expandafter\everypar
+ \else \expandafter\ht:everypar\fi{}\leavevmode\ht:special{t4ht@)}}%
\DviSend}
\def\EndDviMath{\EndDviSend \ht:special{t4ht@(}\egroup\ht:special{t4ht@)}%
\EndMathClass \b:DviMath}
@@ -2606,13 +2634,18 @@
\def\::limits{\expandafter\ifx \blank:spc\:temp
\afterassignment\:l:mits \tmp:cnt0%
- \else\expandafter\:limits \fi}
+ \else
+ \ifx \limits\:temp\else
+ \expandafter\expandafter\expandafter\:limits
+ \fi
+ \fi}
\def\:l:mits{\futurelet\:temp\::limits}
\catcode`\ =13\relax\def\blank:spc{\let\blank:spc= }\blank:spc%
\catcode`\ =10\relax
\NewConfigure{displaylimits}[1]{\def\:temp{#1}\ifx \:temp\empty
\let\displaylimits\o:displaylimits: \else
- \def\:displaylimits{\ifx \:temp\nolimits \else#1\fi}%
+ \def\:displaylimits{\ifx \:temp\nolimits \else
+ \ifx \:temp\limits \else #1\fi\fi}%
\def\:temp{\o:displaylimits:\display:l:mits}%
\HLet\displaylimits\:temp \fi}
\let\o:displaylimits:\displaylimits
@@ -2676,16 +2709,27 @@
\NewConfigure{mathpunct*}[4]{\Configure{FormulaClass*}{6}{#1}{#2}{#3}%
\pend:def\a:mathpunct{#4}}
- \def\MathSymbol#1#2{%
+ \def\MathSymbol{\futurelet\:temp\:::MathSymbol}
+\def\:::MathSymbol{\if +\:temp
+ \expandafter\:MathSymbol \else
+ \expandafter\::MathSymbol \fi
+}
+\def\::MathSymbol#1#2{%
\def\:tempb##1"##2///{##1}%
\edef\:tempa{\expandafter\expandafter\expandafter\:tempb
\expandafter\meaning\csname#2\endcsname"///}%
\edef\:tempc{\string\mathchar}%
- \ifx \:tempa\:tempc \else
- \def\:temp{{\math:sym#1{#2}}}%
- \expandafter\HLet\csname #2\endcsname\:temp
+ \ifx \:tempa\:tempc
+ \NewConfigure{#2}{1}\Configure{#2}{\csname o:#2:\endcsname}%
+ \else
+ \:MathSymbol{}{#1}{#2}%
\fi
- \NewConfigure{#2}{1}\Configure{#2}{\csname o:#2:\endcsname}}
+}
+\def\:MathSymbol#1#2#3{%
+ \def\:temp{{\math:sym#2{#3}}}%
+ \expandafter\HLet\csname #3\endcsname\:temp
+ \NewConfigure{#3}{1}\Configure{#3}{\csname o:#3:\endcsname}%
+}
\def\math:sym#1#2{{\relax\ifmmode \expandafter#1\fi
{\csname a:#2\endcsname}}}
\def\:temp#1{\a:left{#1}\o:left:#1\b:left{#1}}
@@ -2851,10 +2895,10 @@
\expandafter\let\csname IF:#2toc\expandafter\endcsname
\csname if:#2toc\endcsname
\expandafter\let\csname if:#2toc\endcsname\:gobble
- \else \edef\:temp{@}\edef\:tempa{#1}%
+ \else \edef\:temp{\string @}\edef\:tempa{\string#1}%
\ifx \:temp\:tempa
\expandafter\let\csname if:#2toc\endcsname\empty
- \else \edef\:temp{?}%
+ \else \edef\:temp{\string ?}%
\ifx \:temp\:tempa
\expandafter\let\csname if:#2toc\expandafter\endcsname
\csname IF:#2toc\endcsname