% $Id: tex4ht-mathplayer.tex 65 2010-11-17 19:16:45Z karl $ % compile 3 times: latex tex4ht-mathplayer % or xhlatex tex4ht-mathplayer "html,3,sections+" % % Copyright (C) 2009-2010 TeX Users Group % Copyright (C) 1997-2009 Eitan M. Gurari % Released under LPPL 1.3c+. % See tex4ht-cpright.tex for license text. %%%%%%%%%%%%%%%%%% load style files %%%%%%%%%%%%%%%%%%%%%%%%%% \ifx \HTML\UnDef \def\HTML{mathplayer} \def\CONFIG{\jobname} \def\MAKETITLE{\author{Eitan M. Gurari}} \def\next{\input mktex4ht.4ht \endinput} \expandafter\next \fi \input{common} \input{tex4ht-cpright} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Preamble} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \<<< % mathplayer.4ht (|version), generated from |jobname.tex % Copyright (C) 2009-2010 TeX Users Group % Copyright (C) |CopyYear.2002. Eitan M. Gurari | >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Start Here} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%% \section{Header} %%%%%%%%%%%%%%%% \<<< \edef\Preamble{\Preamble,xht} \Configure{ext}{xht} >>> % \Configure{mathml}{m:} \<<< \expandafter \ifx \csname a:dtd-lang\endcsname\relax EN\else \csname a:dtd-lang\endcsname \fi >>> \<<< \Configure{DOCTYPE} {\HCode{"\Hnewline "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"\Hnewline [\Hnewline \Hnewline \Hnewline ]\Hnewline >\Hnewline }} \Configure{@BODY} {\ifvmode \EndP\fi \IgnorePar\HCode{\Hnewline }\par\ShowPar} \Configure{@HTML} {xmlns:m="http://www.w3.org/1998/Math/MathML"\Hnewline % xmlns:dsi="http://www.dessci.com/mathml" \Hnewline } %\let\dsi:=\empty >>> application/xhtml+xml \<<< if( navigator.appName=="Microsoft Internet Explorer" \Hnewline && navigator.platform=="Win32" \Hnewline ){ \Hnewline if( parseFloat(navigator.appVersion.substr( \Hnewline navigator.appVersion.indexOf("MSIE ")+5))>="5.5" \Hnewline ){ try { \Hnewline var oMP = new ActiveXObject("MathPlayer.Factory.1"); \Hnewline } \Hnewline catch(e) { alert("Can't find Design Science's MathPalyer" + \Hnewline "(http://www.dessci.com/webmath/mathplayer)");} \Hnewline } else { \Hnewline alert("Requires MSIE version 5.5 or later"); \Hnewline } } \Hnewline >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Wrapping in Tables} %%%%%%%%%%%%%%%%%%%%%%%%%%%% The attribute \verb+nowrap="nowrap"+ in table cells prevents Mathplayer from displaying them its own way, and one gets minimal cells, overlapped: it ought to be avoided altogether. \<<< \Configure{halignTD} {}{} {<}{\ifmathml \HCode{ columnalign="left"}\else \HCode{ style="text-align:left" }\fi} {-}{\ifmathml \HCode{ columnalign="center"}\else \HCode{ style="text-align:center" }\fi} {>}{\ifmathml \HCode{ columnalign="right"}\else \HCode{ style="text-align:right" }\fi} {^}{\ifmathml \HCode{ rowalign="top"}\else \HCode{ style="vertical-align:top" }\fi} {=}{\ifmathml \HCode{ rowalign="baseline"}\else \HCode{ style="vertical-align:baseline" }\fi} {||}{\ifmathml \HCode{ rowalign="center"}\else \HCode{ style="vertical-align:middle" }\fi} {_}{\ifmathml \HCode{ rowalign="bottom"}\else \HCode{ style="vertical-align:bottom" }\fi} {p}{\ifmathml \HCode{ columnalign="left"}\else \HCode{ style="text-align:left"}\fi} {} >>> % %%%%%%%%%%%%%%%%%%%%% % \section{Cross References} % %%%%%%%%%%%%%%%%%%%%% % % % \<<< % \LinkCommand\mtxt:link{\a:mathml maction,% % actiontype="link" \dsi: href, id, % class="label"|,,} % \LinkCommand\msp:link{\a:mathml maction,% % actiontype="link" \dsi: href, id, % class="label"|,,} % \def\Link{\ifmathml % \ifmtext |\HCode{}% % \expandafter\expandafter\expandafter\mtxt:link % \else \expandafter\expandafter\expandafter\msp:link\fi % \else \expandafter\M:Link\fi} % \def\EndLink{\ifmathml % \ifmtext ||% % \Endmtxt:link \HCode{<\a:mathml mtext\Hnewline % class="endlabel">}|% % \else \HCode{|}\fi % \else \expandafter\M:EndLink\fi} % >>> % % % % % % % \<<< % ><\a:mathml mtext mathbackground="yellow"% % >>> % \<<< % \HCode{}% % >>> % \<<< % ><\a:mathml mstyle mathbackground="yellow"% % >>> % \<<< % % % >>> % % \begin{verbatim} % JUST BACKGROUND (one could add colour, and it would be fine to include the % labels, if any) % 1 % HIGHLIGHT ON MOUSEOVER % 1 % TOOLTIP CLUE ON MOUSEOVER % % 1 % click to jump! % % * disables background colour in all % the (math-)links - this one coming from a typo in mathplayer.4ht, inserting % m: before mathbackground; % m: also problematic on actiontype % \end{verbatim} % \<<< % \ht:special{t4ht@,&\#x00A0;}% % >>> % \<<< % \ht:special{t4ht@,}% % >>> % % The area of the clickable links can be enlarged with a cpde similar to % the following one. % \begin{verbatim} % \let\svLink=\Link % \let\svEndLink=\EndLink % \Odef\Link[#1]#2#3{% % \svLink[#1]{#2}{#3}% % \ifmathml\ifmtext\else \HCode{}\fi\fi} % \def\EndLink{% % \ifmathml\ifmtext\else \HCode{}\fi\fi % \svEndLink} % \end{verbatim} %%%%%%%%%%%%%%%%%% \section{Namespace Prefixes} %%%%%%%%%%%%%%%%%% \<<< \:CheckOption{xht} \if:Option \else \:CheckOption{xml} \if:Option \else \Configure{DviMath} {\a:DviMathML \mathmltrue \ifOption{mml-fonts}{}{|%\mml:htfsym|%\NoFonts}% \IgnoreRule \HCode{}\HCode{<\a:mathml math\Hnewline}% |% \HCode{\csname a:math-xmlns\endcsname \Hnewline \a:@math>}% |\a:math |\IgnorePar} {\Tg\EndIgnoreRule \ifOption{mml-fonts}{}{|%\ext:htfsym|%\EndNoFonts}% \mathmlfalse \b:DviMathML |} \fi\fi >>> \<<< \sv:ignore >>> \<<< \edef\sv:ignore{\if:nopar \noexpand\IgnorePar\else \noexpand\ShowPar\fi}% >>> \<<< \let\sva:mathml=\a:mathml \let\a:mathml=\empty >>> \<<< \let\a:mathml=\sva:mathml >>> %%%%%%%%%%%%%%%%%% \section{Color} %%%%%%%%%%%%%%%%%% \<<< \let\a:txt:textcolor\a:textcolor \let\b:txt:textcolor\b:textcolor \Configure{textcolor} {\ifmathml \Configure{color}% {\Configure{SetHColor} {\HCode{}}}% \else \a:txt:textcolor \fi } {\ifmathml \HCode{}\else \b:txt:textcolor \fi} >>> \endinput