summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty942
1 files changed, 690 insertions, 252 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index b5810e6e6b6..333d89cbbad 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,8 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/10/07 v0.41 Allows LaTeX to directly produce HTML5 output.]
+ [2017/10/30 v0.42 Allows LaTeX to directly produce HTML5 output.]
+
@@ -290,6 +291,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
+\LWR@loadafter{overpic}
\LWR@loadafter{pagenote}
\LWR@loadafter{paralist}
\LWR@loadafter{parskip}
@@ -644,15 +646,96 @@ top=1in,bottom=1in,%
\LWR@traceinfo{AtBeginDocument}
}
+\end{warpall}
+
+\begin{warpall}
\newbool{FormatEPUB}
\boolfalse{FormatEPUB}
-\newbool{FormatWordProcessor}
-\boolfalse{FormatWordProcessor}
-\newbool{HTMLMarkFloats}
-\booltrue{HTMLMarkFloats}
+\newbool{FormatWP}
+\boolfalse{FormatWP}
+\newbool{WPMarkFloats}
+\boolfalse{WPMarkFloats}
+
+\newbool{WPMarkMinipages}
+\boolfalse{WPMarkMinipages}
+
+\newbool{WPMarkTOC}
+\booltrue{WPMarkTOC}
+
+\newbool{WPMarkLOFT}
+\boolfalse{WPMarkLOFT}
+
+\newbool{WPMarkMath}
+\boolfalse{WPMarkMath}
+
+\newbool{WPTitleHeading}
+\boolfalse{WPTitleHeading}
\end{warpall}
+\begin{warpHTML}
+\AtBeginDocument{
+\ifbool{FormatWP}{
+\@ifundefined{chapter}{
+\ifbool{WPTitleHeading}{% part and section starting at h2
+\renewcommand*{\LWR@tagtitle}{h1}
+\renewcommand*{\LWR@tagtitleend}{/h1}
+\renewcommand*{\LWR@tagpart}{h2}
+\renewcommand*{\LWR@tagpartend}{/h2}
+\renewcommand*{\LWR@tagsection}{h3}
+\renewcommand*{\LWR@tagsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsection}{h4}
+\renewcommand*{\LWR@tagsubsectionend}{/h4}
+\renewcommand*{\LWR@tagsubsubsection}{h5}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
+\renewcommand*{\LWR@tagparagraph}{h6}
+\renewcommand*{\LWR@tagparagraphend}{/h6}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraphend}{/span}
+}% WPTitleHeading
+{% not WPTitleHeading, part and section starting at h1
+\renewcommand*{\LWR@tagtitle}{div class="title"}
+\renewcommand*{\LWR@tagtitleend}{/div}
+\renewcommand*{\LWR@tagpart}{h1}
+\renewcommand*{\LWR@tagpartend}{/h1}
+\renewcommand*{\LWR@tagsection}{h2}
+\renewcommand*{\LWR@tagsectionend}{/h2}
+\renewcommand*{\LWR@tagsubsection}{h3}
+\renewcommand*{\LWR@tagsubsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsubsection}{h4}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h4}
+\renewcommand*{\LWR@tagparagraph}{h5}
+\renewcommand*{\LWR@tagparagraphend}{/h5}
+\renewcommand*{\LWR@tagsubparagraph}{h6}
+\renewcommand*{\LWR@tagsubparagraphend}{/h6}
+}% not WPTitleHeading
+}% chapter undefined
+{% chapter defined
+\ifbool{WPTitleHeading}{}
+{% not WPTitleHeading, part and chapter starting at h1
+\renewcommand*{\LWR@tagtitle}{div class="title"}
+\renewcommand*{\LWR@tagtitleend}{/div}
+\renewcommand*{\LWR@tagpart}{h1}
+\renewcommand*{\LWR@tagpartend}{/h1}
+\renewcommand*{\LWR@tagchapter}{h2}
+\renewcommand*{\LWR@tagchapterend}{/h2}
+\renewcommand*{\LWR@tagsection}{h3}
+\renewcommand*{\LWR@tagsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsection}{h4}
+\renewcommand*{\LWR@tagsubsectionend}{/h4}
+\renewcommand*{\LWR@tagsubsubsection}{h5}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
+\renewcommand*{\LWR@tagparagraph}{h6}
+\renewcommand*{\LWR@tagparagraphend}{/h6}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraphend}{/span}
+}% not WPTitleHeading
+}% chapter defined
+}{}% FormatWP
+}% AtBeginDocument
+
+\end{warpHTML}
+
\begin{warpHTML}
@@ -685,8 +768,12 @@ top=1in,bottom=1in,%
\let\LWR@origsp\sp
\let\LWR@origsb\sb
-\let\LWR@origtextsuperscript\textsuperscript
-\let\LWR@origtextsubscript\textsubscript
+\LetLtxMacro\LWR@origtextsuperscript\textsuperscript
+\LetLtxMacro\LWR@orig@textsuperscript\@textsuperscript
+\AtBeginDocument{
+\LetLtxMacro\LWR@origtextsubscript\textsubscript
+\LetLtxMacro\LWR@orig@textsubscript\@textsubscript
+}
\LetLtxMacro\LWR@origunderline\underline
\let\LWR@origscriptsize\scriptsize
@@ -968,6 +1055,13 @@ span.poemtitle {
font-size: 120% ; font-weight: bold;
}
+pre.tabbing {
+ font-family: "Linux Libertine Mono O", "Lucida Console",
+ "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
+ "Liberation Mono", "FreeMono", "Andale Mono",
+ "Nimbus Mono L", "Courier New", monospace;
+}
+
blockquote {
margin-left: 0px ;
margin-right: 0px ;
@@ -1345,6 +1439,11 @@ div.singlespace { line-height: 1.2 ; }
div.onehalfspace { line-height: 1.5 ; }
div.doublespace { line-height: 2 ; }
+/* Word processor format output: */
+div.wpfigure { border: 1px solid red ; margin: .5ex ; padding: .5ex ; }
+div.wptable { border: 1px solid blue ; margin: .5ex ; padding: .5ex ; }
+div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
+
/* Minipage environments, vertically aligned to top, center, bottom: */
.minipage, .fminipage, .fcolorminipage {
/* display: inline-block ; */
@@ -2593,15 +2692,16 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
"https://cdn.mathjax.org/mathjax/contrib";
</script>
-<!-- https://github.com/mathjax/MathJax-third-party-extensions/
- tree/master/siunitx -->
+<!-- https://github.com/burnpanck/MathJax-siunitx -->
+
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
- extensions: ["tex2jax.js","[Contrib]/siunitx/siunitx.js"],
+ extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
});
+ MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
</script>
<script type="text/x-mathjax-config">
@@ -2639,7 +2739,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.41"
+printversion = "v0.42"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3272,7 +3372,7 @@ end -- not --version
\begin{warpHTML}
\NewDocumentCommand{\LWR@setexparray}{m m m}{%
\ifthenelse{\isempty{#3}}%
-{\csdef{#1#2}{}}
+{\csdef{#1#2}{}}%
{\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}%
}
\newcommand*{\LWR@getexparray}[2]{\csuse{#1#2}}
@@ -3438,6 +3538,8 @@ end -- not --version
\begin{warpHTML}
+\newcommand*{\LWR@tagtitle}{h1}
+\newcommand*{\LWR@tagtitleend}{/h1}
\newcommand*{\LWR@tagpart}{h2}
\newcommand*{\LWR@tagpartend}{/h2}
\newcommand*{\LWR@tagchapter}{h3}
@@ -3720,6 +3822,33 @@ end -- not --version
\NewDocumentCommand{\InlineClass}{o m +m}{#3}%
\end{warpprint}
+\begin{warpHTML}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}%
+{%
+\LWR@stoppars%
+\ifbool{FormatWP}%
+{%
+ \LWR@maybeincthisfloat%
+ \LWR@htmltag{%
+ div class="#3" %
+ id="autofloat-\arabic{LWR@thisfloat}"%
+ \ifblank{#1}{}{ style="#1"}%
+ }%
+}% FormatWP
+{% not FormatWP
+ \LWR@htmltag{%
+ div class="#3"%
+ \ifblank{#2}{}{ style="#2"}%
+ }%
+}% not FormatWP
+\LWR@startpars%
+}
+{\LWR@htmldivclassend{#3}}
+\end{warpHTML}
+\begin{warpprint}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
+\end{warpprint}
+
\begin{warpHTML}
@@ -4019,7 +4148,7 @@ end -- not --version
\fi
}
\newcommand*{\LWR@epubprintpendingfootnotes}{%
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}%
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}%
{\LWR@printpendingfootnotes}%
{}%
}
@@ -4029,7 +4158,13 @@ end -- not --version
\begin{warpHTML}
\renewcommand{\marginpar}[2][]{%
-\LWR@htmlspanclass{marginpar}{#2}%
+\ifbool{FormatWP}%
+{%
+\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock}
+#2
+\end{LWR@BlockClassWP}
+}%
+{\LWR@htmlspanclass{marginpar}{#2}}%
}
\end{warpHTML}
@@ -4062,7 +4197,7 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\LWR@origampersand}{-}[\LWR@thisnewfilename]
+ {\LWR@origampersand}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{+}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{/}{-}[\LWR@thisnewfilename]
@@ -4073,16 +4208,16 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}{@}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{"}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textless}{-}[\LWR@thisnewfilename]
+ {\textless}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textgreater}{-}[\LWR@thisnewfilename]
+ {\textgreater}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\#}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{|}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textbackslash}{-}[\LWR@thisnewfilename]
+ {\textbackslash}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{[}{-}[\LWR@thisnewfilename]
@@ -4132,7 +4267,7 @@ end -- not --version
\LWR@htmlelementend{footer}
}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}}
@@ -4156,11 +4291,11 @@ end -- not --version
\LWR@filestart{ — #1}% there is an EMdash in front of the #1
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@topnavigation}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{
\LWR@htmlelement{header}
@@ -4170,11 +4305,11 @@ end -- not --version
\LWR@htmlelementend{header}
}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\ifcsvoid{thetitle}{}{\LWR@printthetitle}}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@sidetoc}
@@ -4514,7 +4649,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@LwarpStart}
{%
\LWR@traceinfo{LWR@lwarpStart}
-\ifbool{FormatWordProcessor}{%
+\ifbool{FormatWP}{%
\setcounter{FileDepth}{-5}%
\boolfalse{HTMLDebugComments}%
}{}
@@ -4571,7 +4706,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\catcode`\$=3% math shift until lwarp starts
-
\end{warpHTML}
@@ -4599,7 +4733,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@htmlelementend{footer}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{
\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}
@@ -4650,17 +4784,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\printtitle}
{
\LWR@stoppars
-\LWR@htmltag{h1}%
+\LWR@htmltag{\LWR@tagtitle}%
\@title%
-\LWR@htmltag{/h1}
+\LWR@htmltag{\LWR@tagtitleend}
\LWR@startpars
}
\newcommand*{\LWR@printthetitle}
{
\LWR@stoppars
-\LWR@htmltag{h1}%
+\LWR@htmltag{\LWR@tagtitle}%
\thetitle%
-\LWR@htmltag{/h1}
+\LWR@htmltag{\LWR@tagtitleend}
\LWR@startpars
}
@@ -4737,9 +4871,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\let\and\relax
}
\DeclareDocumentCommand{\@maketitle}{}{%
- \LWR@stoppars\LWR@htmltag{h1}
+ \LWR@stoppars\LWR@htmltag{\LWR@tagtitle}
\@title
- \LWR@htmltag{/h1}\LWR@startpars
+ \LWR@htmltag{\LWR@tagtitleend}\LWR@startpars
\begin{BlockClass}{author}
\renewcommand{\and}{
\end{BlockClass}
@@ -4915,7 +5049,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@forcenewpage
\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
}
-\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim}
+\AfterEndEnvironment{verbatim}{%
+ \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
+}
+}
+
+\AfterEndPreamble{
+\LWR@traceinfo{Patching tabbing.}
+\AtBeginEnvironment{tabbing}{%
+\LWR@forcenewpage
+\LWR@atbeginverbatim{tabbing}\unskip\LWR@origvspace*{-\baselineskip}%
+}
+\AfterEndEnvironment{tabbing}{%
+ \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
+}
}
\end{warpHTML}
@@ -5406,16 +5553,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printbartag}[1]{%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
-{%
-}%
-{ % not muting
- \ifstrequal{#1}{leftedge}{%
- \LWR@getexparray{LWR@colbarspec}{leftedge} %
- }%
- {
- \LWR@getexparray{LWR@colbarspec}{#1} %
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
- } %
+{}% muting or empty
+{% not muting
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
+ \ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
}% not muting
}
@@ -5431,7 +5572,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@subaddcmidruletrim{}{}%
\LWR@printbartag{#2}%
"%
+ \LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@tdendstyles%
}%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
{}%
@@ -5471,7 +5614,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+ \LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@addformatwpalignment%
+ \LWR@tdendstyles%
}%
\ifthenelse{%
\equal{\LWR@strresult}{p}\OR%
@@ -5545,13 +5691,34 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newlength{\LWR@templengthone}%
\newlength{\LWR@templengthtwo}%
+\newboolean{LWR@tdhavecellstyle}
+
+\newcommand*{\LWR@tdstartstyles}{\global\boolfalse{LWR@tdhavecellstyle}}
+
+\newcommand*{\LWR@tdaddstyle}{%
+\ifbool{LWR@tdhavecellstyle}%
+{; }%
+{ style="}%
+\booltrue{LWR@tdhavecellstyle}%
+}
+
+\newcommand*{\LWR@tdendstyles}{%
+\ifbool{LWR@tdhavecellstyle}{%
+ "%
+ \global\boolfalse{LWR@tdhavecellstyle}%
+}{}%
+}
+
\newcommand*{\LWR@subaddcmidruletrim}[2]{%
\setlength{\LWR@templengthone}{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}%
\ifdimcomp{\LWR@templengthone}{>}{0pt}%
{%
\LWR@origtilde tdrule#1#2%
\setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
-}{}%
+}%
+{%
+ \setlength{\LWR@thiscmidrulewidth}{0pt}%
+}%
}
\newcommand*{\LWR@addcmidruletrim}{%
@@ -5561,12 +5728,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand{\LWR@addrulewidth}[2]{%
-\ifdimcomp{#1}{=}{#2}%
+\ifboolexpr{%
+ test{\ifdimcomp{#1}{=}{0pt}}%
+ or ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )%
+}%
{}% default width
{% custom width
\LWR@forceminwidth{#1}%
- \uselengthunit{PT} % explicit space
- style="border-top:\rndprintlength{\LWR@atleastonept} solid %
+ \LWR@tdaddstyle%
+ \uselengthunit{PT}%
+ border-top:\rndprintlength{\LWR@atleastonept} solid %
\ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
{\#A0A0A0}%
{% lightrule or heaver
@@ -5574,7 +5745,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{\#808080}%
{black}%
}% lightrule or heavier
- "%
}% custom width
}
@@ -5582,6 +5752,26 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addrulewidth{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
}
+\newcommand*{\LWR@WPcell}[2]{%
+\LWR@tdaddstyle%
+text-align:#1; vertical-align:#2%
+}
+
+\newcommand*{\LWR@addformatwpalignment}{%
+\ifbool{FormatWP}{%
+\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]%
+\ifdefstring{\LWR@strresult}{l}{\LWR@WPcell{left}{middle}}{}%
+\ifdefstring{\LWR@strresult}{c}{\LWR@WPcell{center}{middle}}{}%
+\ifdefstring{\LWR@strresult}{r}{\LWR@WPcell{right}{middle}}{}%
+\ifdefstring{\LWR@strresult}{p}{\LWR@WPcell{left}{bottom}}{}%
+\ifdefstring{\LWR@strresult}{m}{\LWR@WPcell{left}{middle}}{}%
+\ifdefstring{\LWR@strresult}{b}{\LWR@WPcell{left}{top}}{}%
+\ifdefstring{\LWR@strresult}{P}{\LWR@WPcell{center}{bottom}}{}%
+\ifdefstring{\LWR@strresult}{M}{\LWR@WPcell{center}{middle}}{}%
+\ifdefstring{\LWR@strresult}{B}{\LWR@WPcell{center}{top}}{}%
+}{}%
+}
+
\newcounter{LWR@tablemulticolswidth}
@@ -5687,7 +5877,10 @@ rowspan="#2" %
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+\LWR@addformatwpalignment%
+\LWR@tdendstyles%
}% end of the opening table data tag
\global\boolfalse{LWR@intabularmetadata}%
\LWR@parsemulticolumnalignment{#4}{\LWR@printmccoldata}%
@@ -5718,9 +5911,9 @@ rowspan="#2" %
\LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{P}{% \LWR@domulticolumn
\IfBooleanTF{#1}% star?
{% yes star
- \LWR@htmlblocktag{figcaption}%
+ \LWR@figcaption%
#3%
- \LWR@htmlblocktag{/figcaption}%
+ \endLWR@figcaption%
}%
{% No star:
\ifbool{LWR@starredlongtable}%
@@ -5733,9 +5926,9 @@ rowspan="#2" %
\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
}%
}{}%
- \LWR@htmlblocktag{figcaption}%
+ \LWR@figcaption%
\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
- \LWR@htmlblocktag{/figcaption}%
+ \endLWR@figcaption%
\ifthenelse{\equal{#2}{}}% TOC entry empty
{}%
{% TOC entry not empty
@@ -5931,12 +6124,20 @@ rowspan="#2" %
\newcommand*{\LWR@origspecialrule}[3]{\hline}
\AtBeginDocument{
\@ifpackageloaded{lwarp-tabls}
-{\newcommand*{\LWR@hline}[1][]{%
- \booltrue{LWR@doinghline}%
- \LWR@getmynexttoken}}
-{\newcommand*{\LWR@hline}{%
- \booltrue{LWR@doinghline}%
- \LWR@getmynexttoken}}
+{
+\newcommand*{\LWR@hline}[1][]{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+}
+{
+\newcommand*{\LWR@hline}{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+}
}% AtBeginDocument
\AtBeginDocument{
@@ -5982,13 +6183,21 @@ rowspan="#2" %
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doingtbrule}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
\LWR@getmynexttoken}%
\DeclareDocumentCommand{\midrule}{o d()}%
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doinghline}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ }%
\LWR@getmynexttoken}%
\DeclareDocumentCommand{\cmidrule}{O{\LWR@cmidrulewidth} d() m}%
{\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}%
@@ -5996,7 +6205,11 @@ rowspan="#2" %
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doingtbrule}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
\LWR@getmynexttoken}%
\DeclareDocumentCommand{\addlinespace}{o}{}%
\DeclareDocumentCommand{\morecmidrules}{}{}%
@@ -6258,34 +6471,41 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begin{warpHTML}
\NewDocumentCommand{\LWR@floatbegin}{m o}{%
-\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{%
-
-=== #1 begin
-
-}{}%
+\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars
\addtocounter{LWR@thisfloat}{1}%
\booltrue{LWR@freezethisfloat}%
-\begingroup
-\LWR@origraggedright
-\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}
-\renewcommand*{\@captype}{#1}
-\caption@settype{#1}
-\LWR@startpars
+\begingroup%
+\LWR@origraggedright%
+\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}%
+\ifbool{FormatWP}{%
+ \LWR@orignewline%
+ \LWR@BlockClassWP{}{}{wp#1}%
+}{}%
+\renewcommand*{\@captype}{#1}%
+\caption@settype{#1}%
+\LWR@startpars%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+
+=== begin #1 ===
+
+}{}%
}
\let\@float\LWR@floatbegin
\let\@dblfloat\LWR@floatbegin
\newcommand*{\LWR@floatend}{%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+
+=== end ===
+
+}{}%
\LWR@stoppars%
+\ifbool{FormatWP}{\endLWR@BlockClassWP}{}%
\LWR@htmlelementend{figure}%
\endgroup%
\boolfalse{LWR@freezethisfloat}%
\LWR@startpars%
-\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{%
-
-=== end
-
-}{}%
+\ifbool{FormatWP}{\newline}{}%
}
\let\end@float\LWR@floatend
\let\end@dblfloat\LWR@floatend
@@ -6317,6 +6537,19 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@latestautopage}
\setcounter{LWR@latestautopage}{1}
+\newenvironment*{LWR@figcaption}
+{%
+\LWR@htmlblocktag{figcaption}
+\ifbool{FormatWP}{%
+\begin{BlockClass}[font-style:italic]{italic}
+\LWR@origvspace*{\baselineskip}
+}{}%
+}
+{%
+\ifbool{FormatWP}{\end{BlockClass}}{}%
+\LWR@htmlblocktag{/figcaption}%
+}
+
\let\LWR@origcaption@begin\caption@begin
\let\LWR@origcaption@end\caption@end
\let\LWR@orig@@par\@@par
@@ -6328,7 +6561,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}%
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}%
-\LWR@htmlblocktag{figcaption}%
+\LWR@figcaption%
\LWR@origcaption@begin%
}
@@ -6336,7 +6569,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
{%
\LWR@origcaption@end%
\LWR@origvspace*{\baselineskip}%
-\LWR@htmlblocktag{/figcaption}%
+\endLWR@figcaption%
\endgroup%
\LWR@traceinfo{LWR@caption@end: done}%
}
@@ -6426,25 +6659,43 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@htmlelementclassend{nav}{#1}
}
\let\LWR@origtableofcontents\tableofcontents
-\let\LWR@origlistoffigures\listoffigures
-\let\LWR@origlistoftables\listoftables
\renewcommand*{\tableofcontents}{%
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkTOC}}{
+
+=== table of contents ===
+
+}
+{
\LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
\LWR@printpendingfootnotes
\LWR@origtableofcontents
}
}
+
+\let\LWR@origlistoffigures\listoffigures
+
\renewcommand*{\listoffigures}{
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+
+=== list of figures ===
+
+}
+{
\LWR@printpendingfootnotes
\LWR@origlistoffigures
}
}
+\let\LWR@origlistoftables\listoftables
+
\renewcommand*{\listoftables}{
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+
+=== list of tables ===
+
+}
+{
\LWR@printpendingfootnotes
\LWR@origlistoftables
}
@@ -6617,6 +6868,84 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\providecommand{\glo@name}{}
\end{warpall}
+\newcommand*{\LWR@restoreorigformatting}{%
+\LWR@traceinfo{LWR@restoreorigformatting}%
+\linespread{1}%
+\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
+\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
+\renewcommand{\BlockClassSingle}[2]{##2}%
+\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LetLtxMacro\rule\LWR@origrule%
+\let\,\LWR@origcomma% disable HTML short unbreakable space
+\let\textellipsis\LWR@origtextellipsis%
+\let\textless\LWR@origtextless%
+\let\textgreater\LWR@origtextgreater%
+\LetLtxMacro{\textrm}{\LWR@origtextrm}%
+\LetLtxMacro{\textsf}{\LWR@origtextsf}%
+\LetLtxMacro{\texttt}{\LWR@origtexttt}%
+\LetLtxMacro{\textbf}{\LWR@origtextbf}%
+\LetLtxMacro{\textmd}{\LWR@origtextmd}%
+\LetLtxMacro{\textit}{\LWR@origtextit}%
+\LetLtxMacro{\textsl}{\LWR@origtextsl}%
+\LetLtxMacro{\textsc}{\LWR@origtextsc}%
+\LetLtxMacro{\textup}{\LWR@origtextup}%
+\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
+\LetLtxMacro{\emph}{\LWR@origemph}%
+\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
+\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
+\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
+\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
+\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
+\LetLtxMacro{\upshape}{\LWR@origupshape}%
+\LetLtxMacro{\slshape}{\LWR@origslshape}%
+\LetLtxMacro{\scshape}{\LWR@origscshape}%
+\LetLtxMacro{\itshape}{\LWR@origitshape}%
+\LetLtxMacro{\em}{\LWR@origem}%
+\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
+\let\sp\LWR@origsp%
+\let\sb\LWR@origsb%
+\LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
+\LetLtxMacro\@textsuperscript\LWR@orig@textsuperscript%
+\LetLtxMacro\textsubscript\LWR@origtextsubscript%
+\LetLtxMacro\@textsubscript\LWR@orig@textsubscript%
+\LetLtxMacro\underline\LWR@origunderline%
+\let~\LWR@origtilde%
+\let\enskip\LWR@origenskip%
+\let\quad\LWR@origquad%
+\let\qquad\LWR@origqquad%
+\LetLtxMacro{\tabular}{\LWR@origtabular}%
+\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
+\LetLtxMacro\toprule\LWR@origtoprule%
+\LetLtxMacro\midrule\LWR@origmidrule%
+\LetLtxMacro\cmidrule\LWR@origcmidrule%
+\LetLtxMacro\bottomrule\LWR@origbottomrule%
+\LetLtxMacro\addlinespace\LWR@origaddlinespace%
+\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
+\LetLtxMacro\specialrule\LWR@origspecialrule%
+\let\newline\LWR@orignewline%
+\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
+\LetLtxMacro\includegraphics\LWR@origincludegraphics%
+\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
+\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
+\let\reflectbox\LWR@origreflectbox%
+\LetLtxMacro\resizebox\LWR@origresizebox%
+\let\framebox\LWR@origframebox%
+\let\makebox\LWR@origmakebox%
+\let\fbox\LWRprint@fbox%
+\let\fboxBlock\LWRprint@fbox%
+\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
+\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
+\LetLtxMacro{\minipage}{\LWR@origminipage}%
+\let\endminipage\LWR@endminipage%
+\LetLtxMacro{\parbox}{\LWR@origparbox}%
+\let\TeX\LWR@origTeX%
+\let\LaTeX\LWR@origLaTeX%
+\let\LaTeXe\LWR@origLaTeXe%
+\renewcommand*{\Xe}{X\textsubscript{E}}%
+\LetLtxMacro\@ensuredmath\LWR@origensuredmath%
+\LWR@restoreorigaccents%
+\LWR@FBcancel%
+}
\begin{warpHTML}
@@ -6630,7 +6959,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@externalfilecnt}
-
\LetLtxMacro\LWR@origdollar$
\LetLtxMacro\LWR@secondorigdollar$% balance for editor syntax highlighting
@@ -6644,26 +6972,33 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\protected\gdef${\@ifnextchar$\LWR@doubledollar\LWR@singledollar}%
\gdef\LWR@doubledollar$#1$${
-\ifbool{mathjax}%
-{\textbackslash[\LWR@HTMLsanitize{#1}\textbackslash]}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+
+ \textbackslash[%
+ \LWR@HTMLsanitize{#1}%
+ \textbackslash]
+
+}% mathjax
{% not mathjax
-\begin{lateximage}%
-[\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
-\LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
-\end{lateximage}
+ \begin{lateximage}%
+ [\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
+ \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
+ \end{lateximage}%
-}
+}% not mathjax
}%
-
\gdef\LWR@subsingledollar#1{%
-\ifbool{mathjax}%
-{\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
+ {\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}%
+}% mathjax
{% not mathjax
- \begin{lateximage}%
- [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
- \LWR@origdollar#1\LWR@origdollar%
- \end{lateximage}%
+ \begin{lateximage}%
+ [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
+ \LWR@origdollar#1\LWR@origdollar%
+ \end{lateximage}%
}%
}
@@ -6677,11 +7012,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\endgroup
-\let\LWR@orig@ensuredmath\@ensuredmath
+\LetLtxMacro\LWR@origensuredmath\@ensuredmath
-\newcommand*{\LWR@ensuredmath}[1]{%
-\LWR@traceinfo{@ensuredmath: page \thepage: \detokenize{#1}}%
-\LWR@subsingledollar{#1}%
+\renewcommand{\@ensuredmath}[1]{%
+\ifmmode%
+ \LWR@origensuredmath{#1}%
+\else%
+ \LWR@subsingledollar{\relax#1}%
+\fi%
}
\let\math\relax
@@ -6713,81 +7051,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
}{}% not eq > 0
}
-\newcommand*{\LWR@restoreorigformatting}{%
-\LWR@traceinfo{LWR@restoreorigformatting}%
-\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
-\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
-\renewcommand{\BlockClassSingle}[2]{##2}%
-\LetLtxMacro{\hspace}{\LWR@orighspace}%
-\LetLtxMacro\rule\LWR@origrule%
-\let\,\LWR@origcomma% disable HTML short unbreakable space
-\let\textellipsis\LWR@origtextellipsis%
-\let\textless\LWR@origtextless%
-\let\textgreater\LWR@origtextgreater%
-\LetLtxMacro{\textrm}{\LWR@origtextrm}%
-\LetLtxMacro{\textsf}{\LWR@origtextsf}%
-\LetLtxMacro{\texttt}{\LWR@origtexttt}%
-\LetLtxMacro{\textbf}{\LWR@origtextbf}%
-\LetLtxMacro{\textmd}{\LWR@origtextmd}%
-\LetLtxMacro{\textit}{\LWR@origtextit}%
-\LetLtxMacro{\textsl}{\LWR@origtextsl}%
-\LetLtxMacro{\textsc}{\LWR@origtextsc}%
-\LetLtxMacro{\textup}{\LWR@origtextup}%
-\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
-\LetLtxMacro{\emph}{\LWR@origemph}%
-\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
-\LetLtxMacro{\upshape}{\LWR@origupshape}%
-\LetLtxMacro{\slshape}{\LWR@origslshape}%
-\LetLtxMacro{\scshape}{\LWR@origscshape}%
-\LetLtxMacro{\itshape}{\LWR@origitshape}%
-\LetLtxMacro{\em}{\LWR@origem}%
-\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
-\let\sp\LWR@origsp%
-\let\sb\LWR@origsb%
-\let\textsuperscript\LWR@origtextsuperscript%
-\let\textsubscript\LWR@origtextsubscript%
-\LetLtxMacro\underline\LWR@origunderline%
-\let~\LWR@origtilde%
-\let\enskip\LWR@origenskip%
-\let\quad\LWR@origquad%
-\let\qquad\LWR@origqquad%
-\LetLtxMacro{\tabular}{\LWR@origtabular}%
-\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
-\LetLtxMacro\toprule\LWR@origtoprule%
-\LetLtxMacro\midrule\LWR@origmidrule%
-\LetLtxMacro\cmidrule\LWR@origcmidrule%
-\LetLtxMacro\bottomrule\LWR@origbottomrule%
-\LetLtxMacro\addlinespace\LWR@origaddlinespace%
-\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
-\LetLtxMacro\specialrule\LWR@origspecialrule%
-\let\newline\LWR@orignewline%
-\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
-\LetLtxMacro\includegraphics\LWR@origincludegraphics%
-\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
-\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
-\let\reflectbox\LWR@origreflectbox%
-\LetLtxMacro\resizebox\LWR@origresizebox%
-\let\framebox\LWR@origframebox%
-\let\makebox\LWR@origmakebox%
-\let\fbox\LWRprint@fbox%
-\let\fboxBlock\LWRprint@fbox%
-\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
-\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
-\LetLtxMacro{\minipage}{\LWR@origminipage}%
-\let\endminipage\LWR@endminipage%
-\LetLtxMacro{\parbox}{\LWR@origparbox}%
-\let\TeX\LWR@origTeX%
-\let\LaTeX\LWR@origLaTeX%
-\let\LaTeXe\LWR@origLaTeXe%
-\renewcommand*{\Xe}{X\textsubscript{E}}%
-\LWR@restoreorigaccents%
-\LWR@FBcancel%
-}
-
\NewDocumentCommand{\LWR@hidelatexequation}{m +m}{%
\LWR@stoppars
\LWR@htmlopencomment
@@ -6818,29 +7081,36 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\NewEnviron{equation}{%
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\LWR@hidelatexequation{equation}{\BODY}
}
{% not mathjax
- \begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
+ \begin{lateximage}[(\LWR@equationtag) \textbackslash{begin\{equation\}} %
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} %
\textbackslash{end\{equation\}}]% alt tag
\LWR@origequation
\BODY% contents collected by NewEnviron
\LWR@origendequation
\end{lateximage}%
-}
+}% not mathjax
-}[\ifbool{mathjax}{\LWR@addmathjax{equation}{\BODY}}{}]
+}[%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {%
+ \LWR@addmathjax{equation}{\BODY}%
+ }{}%
+
+]
\newbool{LWR@amsmultline}
\boolfalse{LWR@amsmultline}
\newcommand*{\LWR@htmlmathlabel}[1]{%
\LWR@traceinfo{LWR@htmlmathlabel #1}%
-\ifbool{mathjax}{%
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
\text{
\ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}
\LWR@htmlclosecomment%
@@ -6876,8 +7146,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newbool{LWR@numbereqnarray}
\booltrue{LWR@numbereqnarray}
\newcommand{\LWR@eqnarrayfactor}{%
-\ifbool{mathjax}
-{
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\ifbool{LWR@numbereqnarray}
@@ -6896,7 +7166,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
{% not mathjax
\ifbool{LWR@numbereqnarray}
{
- \begin{lateximage}[\LWR@addmathjax{eqnarray}{\BODY}]
+ \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
+ \LWR@addmathjax{eqnarray}{\BODY}]
\LWR@origeqnarray
\BODY
\LWR@origendeqnarray
@@ -6922,20 +7193,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\csgpreto{eqnarray*}{\boolfalse{LWR@numbereqnarray}}
\BeforeBeginEnvironment{multline}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\booltrue{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{multline}]
}
}
\AfterEndEnvironment{multline}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
@@ -6947,20 +7218,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{multline*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\booltrue{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{multline*}]
}
}
\AfterEndEnvironment{multline*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
@@ -6973,20 +7244,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{gather}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{gather}]
}
}
\AfterEndEnvironment{gather}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{gather}{\the\@envbody}
@@ -6997,20 +7268,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{gather*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{gather*}]
}
}
\AfterEndEnvironment{gather*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{gather*}{\the\@envbody}
@@ -7021,20 +7292,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{align}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{align}]
}
}
\AfterEndEnvironment{align}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{align}{\the\@envbody}
@@ -7045,20 +7316,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{align*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{align*}]
}
}
\AfterEndEnvironment{align*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{align*}{\the\@envbody}
@@ -7069,20 +7340,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{flalign}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{flalign}]
}
}
\AfterEndEnvironment{flalign}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{flalign}{\the\@envbody}
@@ -7093,20 +7364,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{flalign*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{flalign*}]
}
}
\AfterEndEnvironment{flalign*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{flalign*}{\the\@envbody}
@@ -7117,7 +7388,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\end{warpHTML}
-
\begin{warpHTML}
\newcounter{LWR@lateximagenumber}
\setcounter{LWR@lateximagenumber}{0}
@@ -7129,12 +7399,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@LIpage}
\end{warpHTML}
+
\begin{warpall}
\newcommand*{\LateximageFontSizeName}{large}
\end{warpall}
+
\begin{warpHTML}
\newcommand{\LWR@HTMLsanitize}[1]{%
@@ -7178,6 +7450,75 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\endgroup%
}
+
+\newcounter{LWR@startingequation}
+
+\@ifundefined{chapter}
+{
+\renewcommand{\theLWR@startingequation}{%
+\arabic{LWR@startingequation}%
+}
+}
+{% chapter defined
+\renewcommand{\theLWR@startingequation}{%
+\ifnumcomp{\value{chapter}}{>}{0}{\arabic{chapter}.}{}%
+\arabic{LWR@startingequation}%
+}
+}
+
+\newbool{LWR@isstartingequation}
+
+\let\LWR@startingequationtag\theLWR@startingequation
+
+\let\LWR@equationtag\theequation
+
+\AtBeginDocument{
+
+\ifbool{mathjax}{}{% not mathjax
+
+\NewDocumentCommand{\LWR@remembertag}{m}{%
+\ifbool{LWR@isstartingequation}%
+{%
+ \global\boolfalse{LWR@isstartingequation}%
+ \xdef\LWR@startingequationtag{#1}%
+}%
+{}%
+\xdef\LWR@equationtag{#1}%
+}%
+
+\LetLtxMacro\LWR@origmake@df@tag@@\make@df@tag@@
+\LetLtxMacro\LWR@origmake@df@tag@@@\make@df@tag@@@
+
+\renewcommand*{\make@df@tag@@}[1]{%
+\LWR@remembertag{#1}%
+\LWR@origmake@df@tag@@{#1}%
+}
+
+\renewcommand*{\make@df@tag@@@}[1]{%
+\LWR@remembertag{#1}%
+\LWR@origmake@df@tag@@@{#1}%
+}
+
+}% not mathjax
+}% AtBeginDocument
+
+
+\newcommand*{\LWR@amsmathbody}[1]
+{%
+\textbackslash\{begin\}\{#1\} %
+\LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+\textbackslash\{end\}\{#1\}%
+}
+
+\newcommand*{\LWR@amsmathbodynumbered}[1]
+{%
+\ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
+{(\LWR@equationtag)}%
+{(\LWR@startingequationtag--\LWR@equationtag)} %
+\LWR@amsmathbody{#1} %
+}
+
+
\catcode`\$=\active%
\NewDocumentEnvironment{lateximage}{O{image}}
@@ -7188,6 +7529,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\addtocounter{LWR@lateximagedepth}{1}%
}%
{% start of outer-most lateximage
+ \setcounter{LWR@startingequation}{\value{equation}}%
+ \addtocounter{LWR@startingequation}{1}%
+ \booltrue{LWR@isstartingequation}%
+ \let\LWR@startingequationtag\theLWR@startingequation%
+ \let\LWR@equationtag\theequation%
\addtocounter{LWR@lateximagenumber}{1}%
\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}%
\boolfalse{mathjax}
@@ -7203,7 +7549,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
\addtocounter{LWR@lateximagedepth}{1}%
- \LWR@traceinfo{lateximage: about to create new page}%
+ \LWR@traceinfo{lateximage: about to create a new page}%
\LWR@orignewpage%
\LWR@traceinfo{lateximage: about to create minipage}%
\LWR@origminipage{6in}%
@@ -7222,7 +7568,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro\)\LWR@origcloseparen%
\LetLtxMacro\[\LWR@origopenbracket%
\LetLtxMacro\]\LWR@origclosebracket%
- \let\@ensuredmath\LWR@orig@ensuredmath%
}% end of outer-most lateximage
\LWR@traceinfo{lateximage: finished start of environment}%
}% end of \begin{lateximage}
@@ -7236,20 +7581,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@origscriptsize%
\LWR@htmlclosecomment{}\LWR@orignewline%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
- \ifthenelse{\equal{#1}{LWRAMSMATHBODY}}%
- {%
- \LWR@subinlineimage[%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
- ]%
- {lateximage}%
- {lateximages\OSPathSymbol{}lateximage-\theLWR@externalfilecnt}%
- {svg}%
- {}%
- }%
- {%
\LWR@subinlineimage[#1]{lateximage}%
{lateximages\OSPathSymbol{}lateximage-\theLWR@externalfilecnt}{svg}{}%
- }%
\LWR@ensuredoingapar%
\LWR@htmltag{/span}%
\ifbool{HTMLDebugComments}{%
@@ -7272,21 +7605,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\renewenvironment*{center}
{
\LWR@forcenewpage
-\BlockClass{center}
+\ifbool{FormatWP}
+{\BlockClass[text-align:center]{center}}
+{\BlockClass{center}}
}
{\endBlockClass}
\renewenvironment*{flushright}
{
\LWR@forcenewpage
-\BlockClass{flushright}
+\ifbool{FormatWP}
+{\BlockClass[text-align:right]{flushright}}
+{\BlockClass{flushright}}
}
{\endBlockClass}
\renewenvironment*{flushleft}
{
\LWR@forcenewpage
-\BlockClass{flushleft}
+\ifbool{FormatWP}
+{\BlockClass[text-align:left]{flushleft}}
+{\BlockClass{flushleft}}
}
{\endBlockClass}
@@ -7309,6 +7648,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
+
\begin{warpHTML}
\PassOptionsToPackage{
@@ -7319,10 +7659,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\end{warpHTML}
-
-
\begin{warpprint}
\define@key{Gin}{class}{}
+\AtBeginDocument{
+\@ifpackageloaded{overpic}{
+\newcommand*{\overpicfontsize}{12}
+\newcommand*{\overpicfontskip}{14}
+}{}
+}
\end{warpprint}
\begin{warpall}
@@ -7530,7 +7874,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\boolfalse{LWR@minipagethispar}
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
{%
-\uselengthunit{in}%
+\uselengthunit{PT}%
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
\addtolength{\LWR@minipagewidth}{3em}% room for frames
@@ -7539,10 +7883,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\setlength{\textheight}{9in}%
}{}%
\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
-\addtocounter{LWR@minipagedepth}{1}%
\setlength{\LWR@minipageheight}{\textheight}% default unless specified
\IfValueT{#2}{\setlength{\LWR@minipageheight}{#2}}%
+\addtocounter{LWR@minipagedepth}{1}%
+\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars%
+\ifbool{FormatWP}{%
+
+\addtocounter{LWR@thisfloat}{1}%
+\booltrue{LWR@freezethisfloat}%
+\LWR@htmltag{div id="autofloat-\arabic{LWR@thisfloat}" class="wpminipage"}%
+
+}{}%
\LWR@traceinfo{minipage: creating div class}%
\LWR@orignewpage%
\LWR@htmltag{div class="minipage" style="%
@@ -7572,16 +7924,34 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\setlength{\textheight}{9in}%
\LWR@origraggedright%
\LWR@startpars%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
+
+=== begin minipage ===
+
+}{}%
\LWR@traceinfo{minipage: finished starting the minipage}%
}
{%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
+
+=== end minipage ===
+
+}{}%
\LWR@stoppars%
\LWR@endminipage% The following empty line is required:
+\ifbool{FormatWP}{%
+
+\LWR@htmlelementend{div}%
+\boolfalse{LWR@freezethisfloat}%
+
+}{}%
\LWR@htmldivclassend{minipage}%
+
\LWR@origvspace{1\baselineskip}% required for subcaption
\addtocounter{LWR@minipagedepth}{-1}%
\LWR@startpars%
+\ifbool{FormatWP}{\newline}{}%
\global\booltrue{LWR@minipagethispar}%
}
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
@@ -7717,23 +8087,38 @@ width:\rndprintlength{\LWR@tempwidth}%
\begin{warpHTML}
+\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{%
+\ifbool{FormatWP}%
+{\LWR@htmlspanclass[#1]{#2}{#3}}%
+{\LWR@htmlspanclass{#2}{#3}}%
+}
+
\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}}
\DeclareRobustCommand{\LWR@nullemph}[1]{#1}
\LetLtxMacro{\emph}{\LWR@HTMLemph}
-\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{\LWR@htmlspanclass{textmd}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{%
+\LWR@HTMLtextstyle{font-weight:normal}{textmd}{#1}%
+}
\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1}
+
\LetLtxMacro{\textmd}{\LWR@HTMLtextmd}
\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}}
\DeclareRobustCommand{\LWR@nulltextbf}[1]{#1}
\LetLtxMacro{\textbf}{\LWR@HTMLtextbf}
-\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{\LWR@htmlspanclass{textrm}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{%
+\LWR@HTMLtextstyle{font-family:serif}{textrm}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
+
\LetLtxMacro{\textrm}{\LWR@HTMLtextrm}
-\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{\LWR@htmlspanclass{textsf}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{%
+\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}%
+}
\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
\LetLtxMacro{\textsf}{\LWR@HTMLtextsf}
@@ -7741,20 +8126,32 @@ width:\rndprintlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1}
\LetLtxMacro{\texttt}{\LWR@HTMLtexttt}
-\DeclareRobustCommand{\LWR@HTMLtextup}[1]{\LWR@htmlspanclass{textup}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextup}[1]{%
+\LWR@HTMLtextstyle{font-variant:normal}{textup}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextup}[1]{#1}
+
\LetLtxMacro{\textup}{\LWR@HTMLtextup}
\DeclareRobustCommand{\LWR@HTMLtextit}[1]{\LWR@htmlspan{i}{#1}}
\DeclareRobustCommand{\LWR@nulltextit}[1]{#1}
\LetLtxMacro{\textit}{\LWR@HTMLtextit}
-\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{\LWR@htmlspanclass{textsc}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{%
+\LWR@HTMLtextstyle{font-variant:small-caps}{textsc}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
+
\LetLtxMacro{\textsc}{\LWR@HTMLtextsc}
-\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{\LWR@htmlspanclass{testsl}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{%
+\LWR@HTMLtextstyle{font-style:oblique}{textsl}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
+
\LetLtxMacro{\textsl}{\LWR@HTMLtextsl}
\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
@@ -7804,6 +8201,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\LetLtxMacro\underline\LWR@origunderline%
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
+\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
}
\renewcommand*{\mdseries}{}
@@ -7832,13 +8230,25 @@ width:\rndprintlength{\LWR@tempwidth}%
\renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
+\renewcommand{\@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
+
+\AtBeginDocument{
\renewcommand{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+}
+
+\AtBeginDocument{
+\renewcommand{\@textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+}
\AtBeginDocument{\let\up\textsuperscript}
\AtBeginDocument{\let\fup\textsuperscript}
-\renewcommand{\underline}[1]{\InlineClass{underline}{#1}}
+\renewcommand{\underline}[1]{%
+\LWR@HTMLtextstyle%
+ {text-decoration:underline;text-decoration-skip}%
+ {underline}{#1}%
+}
\renewcommand*{\hfill}{\qquad}
@@ -7940,14 +8350,22 @@ width:\rndprintlength{\LWR@tempwidth}%
\LWR@minipagestoppars%
\ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}}
{%
- \HTMLunicode{2009}% thin breakable space
+ \HTMLunicode{2009}% thin breakable space
}%
{%
- \uselengthunit{PT}%
- \LWR@htmltagc{%
- span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"%
- }%
- \LWR@htmltagc{/span}%
+ \uselengthunit{PT}%
+ \LWR@htmltagc{%
+ span style="width:\printlength{\LWR@tempwidth}; %
+ display:inline-block"%
+ }%
+ \ifbool{FormatWP}{%
+ \setlength{\LWR@templengthone}{\LWR@tempwidth}%
+ \whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+ \quad%
+ \addtolength{\LWR@templengthone}{-1em}%
+ }%
+ }{}%
+ \LWR@htmltagc{/span}%
}%
\LWR@minipagestartpars%
}% width not 0
@@ -7992,7 +8410,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\LWR@htmltagc{%
span
style="%
- background:\LWR@currenttextcolor; %
+ \ifbool{FormatWP}{}{background:\LWR@currenttextcolor; }%
width:\printlength{\LWR@tempwidth}; %
height:\printlength{\LWR@tempheight}; %
\IfValueT{#1}%
@@ -8009,6 +8427,13 @@ width:\rndprintlength{\LWR@tempwidth}%
}%
display:inline-block;"%
}%
+ \ifbool{FormatWP}{%
+ \setlength{\LWR@templengthone}{\LWR@tempwidth}%
+ \whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+ \_{}%
+ \addtolength{\LWR@templengthone}{-1em}%
+ }%
+ }{}%
\LWR@htmltagc{/span}%
\LWR@minipagestartpars%
}% non-zero width
@@ -8032,14 +8457,27 @@ width:\rndprintlength{\LWR@tempwidth}%
\let\LWR@origTeX\TeX
\newcommand*{\LWR@TeX}
-{\InlineClass{latexlogofont}%
-{\InlineClass{latexlogo}{T\textsubscript{e}X}}}
+{%
+ \InlineClass{latexlogofont}%
+ {%
+ \LWR@HTMLtextstyle%
+ {text-transform:uppercase}%
+ {latexlogo}%
+ {T\textsubscript{e}X}%
+ }%
+}
\let\LWR@origLaTeX\LaTeX
\newcommand*{\LWR@LaTeX}
-{\InlineClass{latexlogofont}%
-{\InlineClass{latexlogo}%
-{L\textsuperscript{a}T\textsubscript{e}X}}}
+{%
+ \InlineClass{latexlogofont}%
+ {%
+ \LWR@HTMLtextstyle%
+ {text-transform:uppercase}%
+ {latexlogo}%
+ {L\textsuperscript{a}T\textsubscript{e}X}%
+ }%
+}
\let\LWR@origLaTeXe\LaTeXe