% jsmath.4ht (2014-05-24-11:52), generated from tex4ht-jsmath.tex
% Copyright (C) 2009-2010 TeX Users Group
% Copyright (C) 2005-2009 Eitan M. Gurari
<.TeX4ht copywrite.> -_-_-
% html-jsmath.4ht (2014-05-24-11:52), generated from tex4ht-jsmath.tex
% Copyright (C) 2009-2010 TeX Users Group
% Copyright (C) 2006-2009 Eitan M. Gurari
<.TeX4ht copywrite.> -_-_-
\Configure{VERSION}{}
-_-_-
\NewConfigure{jsmath}{1}
\ifOption{easy-load}{%
\Configure{jsmath}{jsMath/easy/load.js}%
}{%
\Log:Note{The ‘easy-load’ command line option offers
an alternative loading approach of
jsMath version 3.4 or above}%
\Configure{jsmath}{jsMath/jsMath.js}%
}
-_-_-
Rob Beezer <[email protected]> reported parse errors triggered by
xtpipes when jsmath compatible html pages are generated. Hence the
\Hcode{<!--l. \the\inputlineno-->} has been commented out. Also commented
out is |<recall dvimath par|> which would insert a \sv:ignore macro at the
end of the DViMath configuration.
\Configure{DviMath}
{\a:DviJsmath \mathltxtrue
\ifOption{mml-fonts}{}{\mml:htfsym\NoFonts}%
\IgnoreRule
% \HCode{<!--l. \the\inputlineno-->}
\ifx \a:@math\empty\else
\Tg<\a:@math\space class="math"\Hnewline >\fi
\a:math
<.sv dvimath par.>\IgnorePar}
{\ifx \a:@math\empty\else \Tg</\a:@math>\fi \EndIgnoreRule
\ifOption{mml-fonts}{}{\ext:htfsym\EndNoFonts}%
\mathltxfalse \After:Math \b:DviJsmath % recall dvimath par
}
\NewConfigure{DviJsmath}{2} -_-_-
jsMath.Macro(’firstOfOne’,’\#1’,1)
-_-_-
\ht:special{t4ht@,}%
-_-_-
\ht:special{t4ht@,&\#x00A0;}%
-_-_-
Changes to fix bugs reported by Rob Beezer’s <[email protected]>: Values of
\@math in the configurations of $ and $$ have been changed from span and div to
\dlr and \dlr\dlr respectively. \dlr will expand to $ character which is needed by
jsMath. Removed |<inline end-par comment|> after IgnorePar in the
configuration for $$.
\def\dlr{\expandafter\@gobble\string\$}
\Configure{$}
{\Configure{@math}{\dlr}\DviMath}
{\EndDviMath}{}
\Configure{$$}
{\Configure{@math}{\dlr\dlr}\IgnorePar
\EndP\DviMath}
{\EndDviMath
\ShowPar\par{\csname HCondtrue\endcsname\noindent}}
{\DisplayMathtrue}
-_-_-
\edef\sv:ignore{\if:nopar
\noexpand\IgnorePar\else \noexpand\ShowPar\fi}%
-_-_-
\Configure{@HEAD}{<.load jsmath.>}
\Configure{@BODY}
{\ifvmode \IgnorePar\fi \EndP\HCode{%
<.window opening.>%
<.load jsmath warning.>%
}\par\ShowPar}
\ifOption{easy-load}{}{%
\Configure{@/BODY}{%
\par\IgnorePar\EndP
\HCode{
<script type="text/javascript" >\Hnewline
jsMath.Process();\Hnewline
</script>
}\par}%
}
\Configure{!BODY}{ class="tex2math_ignore" } -_-_-
\HCode{<script
type="text/javascript"
src="\a:jsmath"></script>\Hnewline
<script type="text/javascript"><.defs for jsmath.></script>\Hnewline} -_-_-
<noscript> \Hnewline
<div style="color:\#CC0000; text-align:center"> \Hnewline
<b>Warning: <a href="http://www.math.union.edu/locate/jsMath">jsMath</a> \Hnewline
requires JavaScript to process the mathematics on this page.<br /> \Hnewline
If your browser supports JavaScript, be sure it is enabled.</b> \Hnewline
</div> \Hnewline
<hr /> \Hnewline
</noscript>\Hnewline
-_-_-
\def\Hbrakets<#1>{\ifmathltx
\ifmtext @(#1)\else \string\hbox{@(#1)}\fi
\else <#1>\fi}
\def\EndLink{\ifmathltx
\ifmtext <.end mtext space.>%
\egroup \HCode{\%\Hnewline\%}\Endmtxt:link
\HCode{\string\end{ref}\Hnewline}<.start mtext space.>%
\else \HCode{\Hbrakets</a>}\fi
\else \expandafter\M:EndLink\fi}
\LinkCommand\msp:link{a, href, id, \mml:class="label",,} -_-_-
\def\Link{\M:Link}
\def\EndLink{\M:EndLink}
-_-_-
“The contents of an \hbox{} are not rendered by jsMath, but instead
are used as plain text in the browser. JsMath allows you to include HTML
commands through the (rather awkward) means of using @(...) in place of
<...>. For example, \hbox{@(tt) monospaced text@(/tt) would get the
enclosed text in the TT font.” The above also holds for \text instead of
\hbox.
\Configure{over}
{\Send{GROUP}{0}{\l:brace\space}}
{\HCode{\string\over\space}\Send{EndGROUP}{0}{\r:brace\space}}
\Configure{atop}
{\Send{GROUP}{0}{\l:brace\space}}
{\HCode{\string\atop\space}\Send{EndGROUP}{0}{\r:brace\space}}
-_-_-