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.sty1078
1 files changed, 672 insertions, 406 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index e50befca6dd..b9e455d5421 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/07/10 v0.33 Allows LaTeX to directly produce HTML5 output.]
+ [2017/08/08 v0.34 Allows LaTeX to directly produce HTML5 output.]
@@ -51,6 +51,8 @@
\RequirePackage{comment}
\excludecomment{testing}
+\RequirePackage{letltxmacro}
+
\newbool{usingOSWindows}
\boolfalse{usingOSWindows}
@@ -172,9 +174,11 @@ after lwarp.}
\newcommand*{\LWR@loadnever}[2]{%
\PackageError{lwarp}
-{Package #1 does not work with lwarp's HTML conversion.
-Please use the #2 package instead}
-{Package #1 conflicts with lwarp in some way, but package #2 probably will work instead.}
+{Package #1 is not supported by lwarp's HTML conversion.
+Package(s) #2 may be useful instead}
+{Package #1 might conflict with lwarp in some way,
+or is superceded by another package.
+For a possible alternative, see package(s) #2.}
}
\LWR@loadafter{abstract}
@@ -182,28 +186,43 @@ Please use the #2 package instead}
\LWR@loadafter{algorithmicx}
\LWR@loadafter{alltt}
\LWR@loadafter{amsthm}
+\LWR@loadafter{array}
+\LWR@loadafter{balance}
\LWR@loadafter{bookmark}
\LWR@loadafter{booktabs}
+\LWR@loadafter{boxedminipage}
+\LWR@loadafter{boxedminipage2e}
\LWR@loadafter{ccaption}
\LWR@loadafter{changepage}
+\LWR@loadafter{crop}
\LWR@loadafter{cutwin}
\LWR@loadafter{dcolumn}
\LWR@loadafter{draftwatermark}
\LWR@loadafter{ellipsis}
\LWR@loadafter{emptypage}
\LWR@loadafter{enumerate}
+\LWR@loadafter{enumitem}
\LWR@loadafter{epigraph}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
+\LWR@loadafter{everyshi}
\LWR@loadafter{extramarks}
+\LWR@loadafter{fancybox}
\LWR@loadafter{fancyhdr}
-\LWR@loadafter{floatrow}
+\LWR@loadafter{fancyvrb}
+\LWR@loadafter{figcaps}
\LWR@loadafter{float}
\LWR@loadafter{floatflt}
+\LWR@loadafter{floatpag}
+\LWR@loadafter{floatrow}
+\LWR@loadafter{flushend}
\LWR@loadafter{ftnright}
+\LWR@loadafter{fullpage}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
\LWR@loadafter{hyperref}
+\LWR@loadafter{hyperxmp}
+\LWR@loadafter{idxlayout}
\LWR@loadafter{indentfirst}
\LWR@loadafter{keyfloat}
\LWR@loadafter{layout}
@@ -214,11 +233,13 @@ Please use the #2 package instead}
\LWR@loadafter{longtable}
\LWR@loadafter{lscape}
\LWR@loadafter{ltcaption}
+\LWR@loadafter{marginfit}
\LWR@loadafter{marginfix}
\LWR@loadafter{marginnote}
\LWR@loadafter{mcaption}
\LWR@loadafter{mdframed}
\LWR@loadafter{microtype}
+\LWR@loadafter{moreverb}
\LWR@loadafter{mparhack}
\LWR@loadafter{multirow}
\LWR@loadafter{nameref}
@@ -228,11 +249,18 @@ Please use the #2 package instead}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
\LWR@loadafter{pagenote}
+\LWR@loadafter{paralist}
\LWR@loadafter{parskip}
+\LWR@loadafter{pdflscape}
+\LWR@loadafter{pdfsync}
\LWR@loadafter{placeins}
+\LWR@loadafter{prelim2e}
\LWR@loadafter{ragged2e}
\LWR@loadafter{rotating}
+\LWR@loadafter{rotfloat}
+\LWR@loadafter{savetrees}
\LWR@loadafter{setspace}
+\LWR@loadafter{shadow}
\LWR@loadafter{showidx}
\LWR@loadafter{showkeys}
\LWR@loadafter{sidecap}
@@ -257,6 +285,7 @@ Please use the #2 package instead}
\LWR@loadafter{wrapfig}
\LWR@loadafter{xcolor}
\LWR@loadafter{xfrac}
+\LWR@loadafter{xmpincl}
@@ -326,7 +355,15 @@ top=1in,bottom=1in,%
\begin{warpall}
-\RequirePackage{fancyvrb}
+\RequirePackage{filecontents}
+
+\@ifpackagelater{filecontents}{2011/10/09}%
+{}
+{
+\newwrite\fcwrite
+\let\LWR@origfilec@ntents\filec@ntents
+\def\filec@ntents{\def\chardef##1\write{\let\reserved@c\fcwrite}\LWR@origfilec@ntents}
+}
\end{warpall}
@@ -336,6 +373,8 @@ top=1in,bottom=1in,%
\RequirePackage{xstring}
+\RequirePackage{verbatim}
+
\RequirePackage{makeidx}
\makeindex
@@ -348,17 +387,14 @@ top=1in,bottom=1in,%
\RequirePackage{caption}
-\RequirePackage{enumitem}
-\setlist[itemize]{leftmargin=0em}
-\setlist[enumerate]{leftmargin=0em}
-\setlist[description]{leftmargin=0em}
-
\end{warpHTML}
\begin{warpall}
\RequirePackage{titling}
+\RequirePackage{environ}
+
\end{warpall}
\begin{warpHTML}
@@ -368,16 +404,6 @@ top=1in,bottom=1in,%
\PassOptionsToPackage{leqno}{amsmath}
\RequirePackage{amsmath}
-\RequirePackage{environ}
-
-\RequirePackage[nopatches]{titleps}
-\let\LWR@origpagestyle\pagestyle
-\renewcommand*{\pagestyle}[1]{}
-\let\LWR@origthispagestyle\thispagestyle
-\renewcommand*{\thispagestyle}[1]{}
-\let\LWR@origpagenumbering\pagenumbering
-\renewcommand*{\pagenumbering}[1]{}
-
\RequirePackage{xfrac}
@@ -387,7 +413,7 @@ top=1in,bottom=1in,%
\begin{warpHTML}
-\let\LWR@origRequirePackage\RequirePackage
+\LetLtxMacro{\LWR@origRequirePackage}{\RequirePackage}
\newcommand*{\LWR@requirepackagenames}{}
@@ -433,7 +459,7 @@ top=1in,bottom=1in,%
{\LWR@origRequirePackage{\LWR@requirepackagenames}}
}
}
-\let\usepackage\RequirePackage
+\LetLtxMacro{\usepackage}{\RequirePackage}
\NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{
\PackageInfo{lwarp}{Using package `#1' and adding lwarp modifications, including options,}%
@@ -495,6 +521,14 @@ top=1in,bottom=1in,%
\newbool{HTMLDebugComments}
\boolfalse{HTMLDebugComments}
+\AfterEndPreamble{
+\LWR@traceinfo{AfterEndPreamble}
+}
+
+\AtBeginDocument{
+\LWR@traceinfo{AtBeginDocument}
+}
+
\newbool{FormatEPUB}
\boolfalse{FormatEPUB}
\newbool{FormatWordProcessor}
@@ -507,16 +541,29 @@ top=1in,bottom=1in,%
\begin{warpHTML}
-\let\LWR@origtextit\textit
-\let\LWR@origtextbf\textbf
-\let\LWR@origtexttt\texttt
-\let\LWR@origtextsc\textsc
-\let\LWR@origtextsf\textsf
-\let\LWR@origtextrm\textrm
-\let\LWR@origbfseries\bfseries
-\let\LWR@origrmfamily\rmfamily
-\let\LWR@origttfamily\ttfamily
-\let\LWR@orignormalfont\normalfont
+\LetLtxMacro{\LWR@origtextrm}{\textrm}
+\LetLtxMacro{\LWR@origtextsf}{\textsf}
+\LetLtxMacro{\LWR@origtexttt}{\texttt}
+\LetLtxMacro{\LWR@origtextnormal}{\textnormal}
+\LetLtxMacro{\LWR@origtextbf}{\textbf}
+\LetLtxMacro{\LWR@origtextmd}{\textmd}
+\LetLtxMacro{\LWR@origtextit}{\textit}
+\LetLtxMacro{\LWR@origtextsl}{\textsl}
+\LetLtxMacro{\LWR@origtextsc}{\textsc}
+\LetLtxMacro{\LWR@origtextup}{\textup}
+\LetLtxMacro{\LWR@origemph}{\emph}
+
+\LetLtxMacro{\LWR@origrmfamily}{\rmfamily}
+\LetLtxMacro{\LWR@origsffamily}{\sffamily}
+\LetLtxMacro{\LWR@origttfamily}{\ttfamily}
+\LetLtxMacro{\LWR@origbfseries}{\bfseries}
+\LetLtxMacro{\LWR@origmdseries}{\mdseries}
+\LetLtxMacro{\LWR@origupshape}{\upshape}
+\LetLtxMacro{\LWR@origslshape}{\slshape}
+\LetLtxMacro{\LWR@origscshape}{\scshape}
+\LetLtxMacro{\LWR@origitshape}{\itshape}
+\LetLtxMacro{\LWR@origem}{\em}
+\LetLtxMacro{\LWR@orignormalfont}{\normalfont}
\let\LWR@origraggedright\raggedright
\let\LWR@origonecolumn\onecolumn
@@ -528,16 +575,28 @@ top=1in,bottom=1in,%
\let\LWR@orignewpage\newpage
-\let\LWR@origminipage\minipage
+\let\LWR@origpagestyle\pagestyle
+\let\LWR@origthispagestyle\thispagestyle
+\let\LWR@origpagenumbering\pagenumbering
+
+\LetLtxMacro{\LWR@origminipage}{\minipage}
\let\LWR@origendminipage\endminipage
+\LetLtxMacro{\LWR@origparbox}{\parbox}
\let\LWR@orignewline\newline
-\let\LWR@origitem\item
+\LetLtxMacro{\LWR@origitem}{\item}
+
+\LetLtxMacro{\LWR@origitemize}{\itemize}
+\LetLtxMacro{\LWR@endorigitemize}{\enditemize}
+\LetLtxMacro{\LWR@origenumerate}{\enumerate}
+\LetLtxMacro{\LWR@endorigenumerate}{\endenumerate}
+\LetLtxMacro{\LWR@origdescription}{\description}
+\LetLtxMacro{\LWR@endorigdescription}{\enddescription}
\let\LWR@origpar\par
-\let\LWR@origfootnote\footnote
+\LetLtxMacro{\LWR@origfootnote}{\footnote}
\let\LWR@orig@mpfootnotetext\@mpfootnotetext
\let\LWR@origclearpage\clearpage
@@ -623,7 +682,7 @@ homehtmlfilename = "\HomeHTMLFilename"%
\begin{warpprint}
-\begin{VerbatimOut}{lwarp.css}
+\begin{filecontents*}{lwarp.css}
/*
CSS stylesheet for the LaTeX lwarp package
Copyright 2016-2017 Brian Dunn — BD Tech Concepts LLC
@@ -680,7 +739,7 @@ span.indexitem {margin-left: 0em}
span.indexsubitem {margin-left: 2em}
span.indexsubsubitem {margin-left: 4em}
-div.hidden { display: none ; }
+div.hidden, span.hidden { display: none ; }
kbd {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
@@ -689,12 +748,16 @@ kbd {
font-size: 100% ;
}
+pre { padding: 3pt ; }
+
span.strong { font-weight: bold; }
span.textmd { font-weight: normal; }
span.textsc { font-variant: small-caps; }
+span.textsl { font-style: oblique; }
+
span.textup { font-variant: normal; }
span.textrm {
@@ -997,6 +1060,14 @@ border-bottom: 1px solid silver ;
overflow-x: auto;
}
+span.listinglabel {
+ display: inline-block ;
+ font-size: 70% ;
+ width: 4em ;
+ text-align: right ;
+ margin-right: 2em ;
+}
+
div.abstract {
margin: 2em 5% 2em 5% ;
padding: 1ex 1em 1ex 1em ;
@@ -1080,13 +1151,38 @@ div.doublespace { line-height: 2 ; }
/* Have not yet researched this. */
.minipage p {margin: .75ex 0em .75ex 0em ;}
+.shadowbox, .shabox {
+ border: 1px solid black;
+ box-shadow: 3px 3px 3px #808080 ;
+ border-radius: 0px ;
+ padding: .4ex .3em .4ex .3em ;
+ margin: 0pt .3ex 0pt .3ex ;
+ display: inline-block ;
+}
+
+.doublebox {
+ border: 3px double black;
+ border-radius: 0px ;
+ padding: .4ex .3em .4ex .3em ;
+ margin: 0pt .3ex 0pt .3ex ;
+ display: inline-block ;
+}
+
+.ovalbox, .Ovalbox {
+ border: 1px solid black;
+ border-radius: 1ex ;
+ padding: .4ex .3em .4ex .3em ;
+ margin: 0pt .3ex 0pt .3ex ;
+ display: inline-block ;
+}
+
+.Ovalbox { border-width: 2px ; }
+
.framebox {
- margin: 0ex ;
- padding: 0ex ;
border: 1px solid black;
border-radius: 0px ;
padding: .3ex .2em 0ex .2em ;
- margin: .1ex ;
+ margin: 0pt .1ex 0pt .1ex ;
display: inline-block ;
}
@@ -1127,7 +1223,7 @@ div.doublespace { line-height: 2 ; }
}
/* framed package */
-.framed {
+.framed, pre.boxedverbatim {
margin: 3ex 0em 3ex 0em ;
border: 1px solid black;
border-radius: 0px ;
@@ -1164,7 +1260,8 @@ dl {
}
dl dt {
- margin-top: 1ex;
+margin-top: 1ex;
+margin-left: 1em ;
font-weight: bold;
}
@@ -1375,6 +1472,9 @@ div.flushleft table {margin-left:0em ; margin-right:auto;}
div.flushright{text-align:right;}
div.flushright table {margin-left:auto ; margin-right: 0em ;}
+/* Fancybox */
+div.Btrivlist table tr td { padding: .2ex 0em ; }
+
/* program listing callouts: */
span.callout {
font-family: "DejaVu Sans", "Bitstream Vera Sans",
@@ -1734,12 +1834,12 @@ nav.botnavigation { display:none; }
nav.topnavigation { display:block }
nav.botnavigation { display:block }
}
-\end{VerbatimOut}
+\end{filecontents*}
\end{warpprint}
\begin{warpprint}
-\begin{VerbatimOut}{lwarp_sagebrush.css}
+\begin{filecontents*}{lwarp_sagebrush.css}
@import url("lwarp.css") ;
A:link {color:#105030 ; text-decoration: none ; }
@@ -1955,12 +2055,12 @@ nav.sidetoc a:hover {
nav.sidetoc { border-radius: 0 ; }
}
-\end{VerbatimOut}
+\end{filecontents*}
\end{warpprint}
\begin{warpprint}
-\begin{VerbatimOut}{lwarp_formal.css}
+\begin{filecontents*}{lwarp_formal.css}
@import url("lwarp.css") ;
A:link {color:#802020 ; text-decoration:none; }
@@ -2155,12 +2255,12 @@ nav.botnavigation {
background: #dedcd5 ;
border-top: 1px solid black ;
}
-\end{VerbatimOut}
+\end{filecontents*}
\end{warpprint}
\begin{warpprint}
-\begin{VerbatimOut}{sample_project.css}
+\begin{filecontents*}{sample_project.css}
/* ( --- Start of project.css --- ) */
/* A sample project-specific CSS file for lwarp --- ) */
@@ -2172,24 +2272,24 @@ nav.botnavigation {
/* . . . */
/* ( --- End of project.css --- ) */
-\end{VerbatimOut}
+\end{filecontents*}
\end{warpprint}
\begin{warpprint}
-\begin{VerbatimOut}{lwarp.xdy}
+\begin{filecontents*}{lwarp.xdy}
(require "tex/inputenc/latin.xdy")
(merge-rule "\\PS *" "Postscript")
(require "texindy.xdy")
(require "page-ranges.xdy")
(require "book-order.xdy")
(markup-locref :open "\hyperindexref{" :close "}")
-\end{VerbatimOut}
+\end{filecontents*}
\end{warpprint}
\begin{warpprint}
-\begin{VerbatimOut}{lwarp_mathjax.txt}
+\begin{filecontents*}{lwarp_mathjax.txt}
<!-- https://groups.google.com/forum/#!topic/
mathjax-users/jUtewUcE2bY -->
<script type="text/x-mathjax-config">
@@ -2274,7 +2374,7 @@ MathJax.Hub.Config({
<!-- Alternative CDN provider: -->
<script type="text/javascript" async
-src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full">
+src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML-full">
</script>
<!-- No longer supported after April 30, 2017: -->
@@ -2284,20 +2384,20 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-
</script>
-->
-\end{VerbatimOut}
+\end{filecontents*}
\end{warpprint}
\begin{LWR@createlwarpmk}
-\begin{VerbatimOut}{lwarpmk.lua}
+\begin{filecontents*}{lwarpmk.lua}
#!/usr/bin/env texlua
-- Copyright 2016-2017 Brian Dunn
-- Print the usage of the lwarpmk command:
-printversion = "v0.33"
+printversion = "v0.34"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -2597,7 +2697,7 @@ function compilelatexmk ( fsuffix )
err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
.. "-e "
.. opquote
- .. "$makeindex = q/"
+ .. "$makeindex = q/" -- $
.. xindycmd
.. " -M " .. xdyfile
.. " -L " .. language .. " /"
@@ -2802,7 +2902,7 @@ printhelp ()
end
end -- not --version
-\end{VerbatimOut}
+\end{filecontents*}
\end{LWR@createlwarpmk}
@@ -2925,7 +3025,12 @@ end -- not --version
\begin{warpHTML}
\let\LWR@origampersand\&
-\newcommand*{\HTMLentity}[1]{\LWR@origampersand#1;}
+\newcommand*{\HTMLentity}[1]{%
+\begingroup%
+\LWR@FBcancel%
+\LWR@origampersand#1;%
+\endgroup
+}
\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}}
\renewcommand*{\&}{\HTMLentity{amp}}
@@ -3059,6 +3164,11 @@ end -- not --version
\newcommand{\LWR@forcenewpage}{%
\LWR@stoppars\LWR@orignewpage\LWR@startpars%
}
+
+\renewcommand*{\pagestyle}[1]{}
+\renewcommand*{\thispagestyle}[1]{}
+\renewcommand*{\pagenumbering}[1]{}
+
\end{warpHTML}
@@ -3083,20 +3193,72 @@ end -- not --version
\newcommand*{\LWR@tagregularparagraph}{p}
+\@ifpackagewith{babel}{french}{
+\renewcommand*{\FBcolonspace}{~}
+\renewcommand*{\FBthinspace}{\,}
+}{}
+
+\@ifpackagewith{babel}{french}{%
+\newcommand{\LWR@FBcancel}{%
+\csdef{FBcolonspace}{}%
+\csdef{FBthinspace}{}%
+}
+}
+{% not french:
+\newcommand{\LWR@FBcancel}{}
+}%
\newcommand*{\LWR@htmltagc}[1]{%
{%
-\protect\LWR@origttfamily%
+\begingroup%
+\LWR@FBcancel%
+\ifmmode\else\protect\LWR@origttfamily\fi%
\protect\LWR@origtextless#1\protect\LWR@origtextgreater%
+\endgroup%
}%
}
+\newcommand*{\LWR@nestspanitem}{%
+\if@newlist\else{\LWR@htmltagc{br /}}\fi%
+\LWR@origitem%
+}
+
\newenvironment*{LWR@nestspan}
{%
+\LWR@traceinfo{LWR@nestspan}%
+\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+{%
+\LWR@traceinfo{LWR@nestspan: inside a lateximage}%
+}%
+{% not in a lateximage
+\LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}%
\addtocounter{LWR@spandepth}{1}%
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
+\renewcommand{\BlockClassSingle}[2]{##2}%
+\renewcommand{\LWR@forcenewpage}{}%
+\renewcommand{\LWR@itemizestart}{%
+\let\item\LWR@nestspanitem%
+}%
+\renewcommand{\LWR@itemizeend}{}%
+\renewcommand{\LWR@enumeratestart}{%
+\let\item\LWR@nestspanitem%
+}%
+\renewcommand{\LWR@enumerateend}{}%
+\renewcommand{\LWR@descriptionstart}{%
+\let\item\LWR@nestspanitem%
}%
-{\addtocounter{LWR@spandepth}{-1}}
+\renewcommand{\LWR@descriptionend}{}%
+}% not in a lateximage
+}%
+{%
+\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+{}%
+{\addtocounter{LWR@spandepth}{-1}}%
+\LWR@traceinfo{LWR@nestspan: done}%
+}
+
+\AfterEndEnvironment{LWR@nestspan}{\global\let\par\LWR@closeparagraph}
\NewDocumentCommand{\LWR@htmlspan}{m +m}{%
\LWR@ensuredoingapar%
@@ -3107,9 +3269,9 @@ end -- not --version
\end{LWR@nestspan}%
}
-\NewDocumentCommand{\LWR@htmlspanclass}{m o +m}{%
+\NewDocumentCommand{\LWR@htmlspanclass}{o m +m}{%
\LWR@ensuredoingapar%
-\LWR@subhtmlelementclass{span}{#1}[#2]%
+\LWR@subhtmlelementclass{span}[#1]{#2}%
\begin{LWR@nestspan}%
#3%
\LWR@htmltagc{/span}%
@@ -3129,11 +3291,23 @@ end -- not --version
\newcommand*{\LWR@htmlopencomment}{%
-{\LWR@origttfamily\LWR@origtextless{}!{-}{-}}%
+{%
+\begingroup%
+\LWR@FBcancel%
+\ifmmode\else\protect\LWR@origttfamily\fi%
+\LWR@origtextless{}!{-}{-}%
+\endgroup%
+}%
}
\newcommand*{\LWR@htmlclosecomment}{%
-{\LWR@origttfamily{-}{-}\LWR@origtextgreater{}}%
+{%
+\begingroup%
+\LWR@FBcancel%
+\ifmmode\else\protect\LWR@origttfamily\fi%
+{-}{-}\LWR@origtextgreater{}%
+\endgroup%
+}%
}
\newcommand{\LWR@htmlcomment}[1]{%
@@ -3159,19 +3333,19 @@ end -- not --version
}
-\NewDocumentCommand{\LWR@subhtmlelementclass}{m m o}{%
-\IfValueTF{#3}%
+\NewDocumentCommand{\LWR@subhtmlelementclass}{m o m}{%
+\IfValueTF{#2}%
{% option
-\ifthenelse{\equal{#3}{}}%
-{\LWR@htmltag{#1 class="#2"}}% empty option
-{\LWR@htmltag{#1 class="#2" style="#3"}}% non-empty option
+\ifthenelse{\equal{#2}{}}%
+{\LWR@htmltag{#1 class="#3"}}% empty option
+{\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option
}% option
-{\LWR@htmltag{#1 class="#2"}}% no option
+{\LWR@htmltag{#1 class="#3"}}% no option
}
-\NewDocumentCommand{\LWR@htmlelementclass}{m m o}{%
+\NewDocumentCommand{\LWR@htmlelementclass}{m o m}{%
\LWR@stoppars%
-\LWR@subhtmlelementclass{#1}{#2}[#3]%
+\LWR@subhtmlelementclass{#1}[#2]{#3}%
\LWR@startpars%
}
@@ -3184,8 +3358,8 @@ end -- not --version
\LWR@startpars%
}
-\NewDocumentCommand{\LWR@htmldivclass}{m o}{%
-\LWR@htmlelementclass{div}{#1}[#2]%
+\NewDocumentCommand{\LWR@htmldivclass}{o m}{%
+\LWR@htmlelementclass{div}[#1]{#2}%
}
\newcommand*{\LWR@htmldivclassend}[1]{%
@@ -3194,9 +3368,9 @@ end -- not --version
-\NewDocumentCommand{\LWR@htmlelementclassline}{m m o +m}{%
+\NewDocumentCommand{\LWR@htmlelementclassline}{m o m +m}{%
\LWR@stoppars
-\LWR@subhtmlelementclass{#1}{#2}[#3]%
+\LWR@subhtmlelementclass{#1}[#2]{#3}%
#4%
\LWR@htmltag{/#1}
\LWR@startpars
@@ -3219,16 +3393,16 @@ end -- not --version
\begin{warpHTML}
-\NewDocumentEnvironment{BlockClass}{m o}
+\NewDocumentEnvironment{BlockClass}{o m}%
{
-\LWR@htmldivclass{#1}[#2]
+\LWR@htmldivclass[#1]{#2}
}
{
-\LWR@htmldivclassend{#1}
+\LWR@htmldivclassend{#2}
}
\end{warpHTML}
\begin{warpprint}
-\NewDocumentEnvironment{BlockClass}{m o}{}{}
+\NewDocumentEnvironment{BlockClass}{o m}{}{}%
\end{warpprint}
\begin{warpHTML}
\newcommand{\BlockClassSingle}[2]{%
@@ -3240,12 +3414,12 @@ end -- not --version
\end{warpprint}
\begin{warpHTML}
-\NewDocumentCommand{\InlineClass}{m o +m}{%
-\LWR@htmlspanclass{#1}[#2]{#3}%
+\NewDocumentCommand{\InlineClass}{o m +m}{%
+\LWR@htmlspanclass[#1]{#2}{#3}%
}
\end{warpHTML}
\begin{warpprint}
-\NewDocumentCommand{\InlineClass}{m o +m}{#3}
+\NewDocumentCommand{\InlineClass}{o m +m}{#3}%
\end{warpprint}
@@ -3360,6 +3534,9 @@ end -- not --version
\newcommand*{\LWR@startpars}%
{%
+\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
+{}%
+{%
\ifbool{LWR@doingstartpars}%
{}%
{%
@@ -3369,10 +3546,14 @@ end -- not --version
}% an intentionally blank line
\global\setbool{LWR@doingstartpars}{true}%
\global\boolfalse{LWR@doingapar}%
+}% nestspan
}
\newcommand*{\LWR@stoppars}%
{%
+\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
+{}%
+{%
\ifbool{LWR@doingapar}%
{%
\unskip%
@@ -3389,6 +3570,7 @@ end -- not --version
{}%
\global\setbool{LWR@doingstartpars}{false}%
\global\boolfalse{LWR@doingapar}%
+}% nestspan
}
\end{warpHTML}
@@ -3550,20 +3732,8 @@ end -- not --version
\newcommand*{\LWR@filenamenoblanks}[1]{%
\begingroup
-\renewcommand*{\HTMLunicode}[1]{}
-\renewcommand*{\HTMLentity}[1]{##1}
-\renewcommand*{\LWR@htmltagc}[1]{}
-\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3}
-\renewcommand*{\&}{and}
-\renewcommand{\textit}[1]{##1}
-\renewcommand{\textsc}[1]{##1}
-\renewcommand{\textsl}[1]{##1}
-\renewcommand{\textbf}[1]{##1}
-\renewcommand{\texttt}[1]{##1}
-\renewcommand{\textsf}[1]{##1}
-\renewcommand{\textrm}[1]{##1}
-\renewcommand{\textsuperscript}[1]{##1}
-\renewcommand{\textsubscript}[1]{##1}
+\LWR@nullfonts
+\renewcommand*{\LWR@htmltagc}[1]{}%
\edef\LWR@thisnewfilename{#1}
\fullexpandarg
\StrSubstitute{\LWR@thisnewfilename}{ }{-}[\LWR@thisnewfilename]
@@ -3916,21 +4086,13 @@ end -- not --version
\newcommand*{\LWR@filestart}[1]{
+\LWR@traceinfo{LWR@filestart}
\begingroup
-\renewcommand{\textit}[1]{##1}% not used in filenames
-\renewcommand{\textsc}[1]{##1}
-\renewcommand{\textsl}[1]{##1}
-\renewcommand{\textbf}[1]{##1}
-\renewcommand{\texttt}[1]{##1}
-\renewcommand{\textsf}[1]{##1}
-\renewcommand{\textrm}[1]{##1}
-\renewcommand{\textsuperscript}[1]{##1}
-\renewcommand{\textsubscript}[1]{##1}
-\renewcommand*{\HTMLunicode}[1]{}
-\renewcommand*{\HTMLentity}[1]{}
-\RenewDocumentCommand{\LWR@htmlspanclass}{m o +m}{##3}
-\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3}
+\LWR@traceinfo{LWR@filestart: A}
+\LWR@nullfonts
+\LWR@traceinfo{LWR@filestart: B}
\LWR@htmltag{!DOCTYPE html}\LWR@orignewline
+\LWR@traceinfo{LWR@filestart: C}
\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"{}}\LWR@orignewline
\LWR@htmltag{head}\LWR@orignewline
\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline
@@ -3961,7 +4123,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifbool{mathjax}%
{%
\boolfalse{LWR@verbtags}
-\VerbatimInput{lwarp_mathjax.txt}%
+\verbatiminput{lwarp_mathjax.txt}%
\booltrue{LWR@verbtags}
\LWR@stoppars
}% end of mathjax
@@ -3969,6 +4131,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@htmltag{/head}\LWR@orignewline
\LWR@htmltag{body}\LWR@orignewline
\endgroup
+\LWR@traceinfo{LWR@filestart: done}
}
\end{warpHTML}
@@ -3976,8 +4139,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\begin{warpHTML}
+\catcode`\$=\active
\newcommand*{\LWR@LwarpStart}
{%
+\LWR@traceinfo{LWR@lwarpStart}
\ifbool{FormatWordProcessor}{%
\setcounter{FileDepth}{-5}%
\boolfalse{HTMLDebugComments}%
@@ -3987,9 +4152,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\edef\LWR@strresult{\HTMLFilename}
\edef\HTMLFilename{\detokenize\expandafter{\LWR@strresult}}
\LWR@origonecolumn%
+\LWR@origpagestyle{empty}
\LWR@origscriptsize%
\LWR@origraggedright%
-\let\\\LWR@endofline%
+\LetLtxMacro{\\}{\LWR@endofline}%
\linespread{1.3}%
\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex}
@@ -3999,10 +4165,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand*{\centering}{}
\renewcommand*{\raggedleft}{}
\renewcommand*{\raggedright}{}
-\let\LWR@origtabular\tabular
-\let\LWR@origendtabular\endtabular
-\let\tabular\LWR@tabular
-\let\endtabular\endLWR@tabular
+\LetLtxMacro{\LWR@origtabular}{\tabular}
+\LetLtxMacro{\LWR@origendtabular}{\endtabular}
+\LetLtxMacro{\tabular}{\LWR@tabular}
+\LetLtxMacro{\endtabular}{\endLWR@tabular}
\let\LWR@origcaption\caption
\let\LWR@origltx@label\ltx@label
\let\ltx@label\LWR@htmlmathlabel
@@ -4013,19 +4179,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\XeTeX\LWR@XeTeX
\let\XeLaTeX\LWR@XeLaTeX
\let\ConTeXt\LWR@ConTeXt
-\let\rotatebox\LWR@rotatebox
-\let\scalebox\LWR@scalebox
+\LetLtxMacro{\rotatebox}{\LWR@rotatebox}
+\LetLtxMacro{\scalebox}{\LWR@scalebox}
\let\reflectbox\LWR@reflectbox
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
+\LWR@traceinfo{LWR@lwarpStart: Starting new file.}
\LWR@filestart{}
+\LWR@traceinfo{LWR@lwarpStart: Generating first header.}
\LWR@htmltag{header}\LWR@orignewline
\LWR@startpars
\LWR@firstpagetop
\LWR@stoppars
\LWR@htmltag{/header}\LWR@orignewline
+\LWR@traceinfo{LWR@lwarpStart: Generating textbody.}
\LWR@htmltag{section class="textbody"{}}
-\LWR@origpagestyle{empty}
\mainmatter
\LWR@origpagenumbering{arabic}
\if@titlepage
@@ -4033,9 +4201,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\else
\thanksmarkseries{fnsymbol}
\fi
-\fvset{frame=none}%
+\LWR@patchlists
+\catcode`\$=\active
\LWR@startpars
+\LWR@traceinfo{LWR@lwarpStart: done}
}
+\catcode`\$=3% math shift until lwarp starts
+
\end{warpHTML}
@@ -4268,7 +4440,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand{\maketitle}{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
- \let \footnote \thanks
+ \LetLtxMacro{\footnote}{\thanks}
\@bsmarkseries
\def\@makefnmark{\rlap{\@textsuperscript{%
\normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
@@ -4387,9 +4559,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}%
}
-\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
- \mathsection\or \mathparagraph\or \text{\HTMLunicode{2016}}\or
- **\or \dagger\dagger \or \ddagger\ddagger \else\@ctrerr\fi}}
+\def\@fnsymbol#1{\ifcase#1\or *\or \HTMLentity{dagger}\or \HTMLentity{Dagger}\or
+ \HTMLentity{sect}\or \HTMLentity{para}\or \text{\HTMLunicode{2016}}\or
+ **\or \HTMLentity{dagger}\HTMLentity{dagger} \or
+ \HTMLentity{Dagger}\HTMLentity{Dagger} \else\@ctrerr\fi}
\renewcommand*{\maketitle}{%
\begin{titlepage}
\LWR@maketitlesetup
@@ -4494,18 +4667,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\end{warpall}
-\begin{warpHTML}
-
-\AfterEndPreamble{
-\AtBeginEnvironment{verbatim}{%
-\LWR@forcenewpage
-\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
-}
-\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim}
-}
-
-\end{warpHTML}
-
\begin{warpall}
\newlength{\VerbatimHTMLWidth}
@@ -4513,184 +4674,51 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\end{warpall}
\begin{warpHTML}
+
\newbool{LWR@verbtags}
\booltrue{LWR@verbtags}
-\renewcommand{\VerbatimFootnotes}{
-\PackageError{lwarp}
-{Verbatim footnotes are not yet supported by lwarp.}
-{This may be improved some day.}
-}
-
-\newcommand*{\LWR@atbeginverbatim}[1]
+\newcommand*{\LWR@atbeginverbatim}[2][]
{%
\setlength{\parskip}{0ex}%
\LWR@stoppars%
-\ifbool{LWR@verbtags}{\LWR@htmltag{pre class="#1"{}}}{}%
+\ifbool{LWR@verbtags}{%
+\LWR@htmltag{pre class="#2"
+\ifthenelse{\equal{#1}{}}{}{style="#1"}%
+}% pre
+}{}%
+\begingroup%
\LWR@origttfamily%
-\let\hspace\LWR@orighspace%
+\LetLtxMacro{\hspace}{\LWR@orighspace}%
}
\newcommand*{\LWR@afterendverbatim}{%
+\endgroup%
\unskip%
\ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/pre}
}{}%
\LWR@startpars%
}
-\newcommand*{\LWR@Verbatimclass}{fancyvrb}
-\NewDocumentEnvironment{VerbatimClass}{m O{}}
-{%
-\renewcommand*{\LWR@Verbatimclass}{#1}%
-\LWR@origVerbatim[#2]%
-}
-{\endVerbatim}
-\AfterEndPreamble{
-\let\LWR@origVerbatim\Verbatim
-\renewcommand*{\Verbatim}{%
-\LWR@forcenewpage
-\renewcommand*{\LWR@Verbatimclass}{fancyvrb}%
-\LWR@origVerbatim%
-}
-\newcommand*{\LWR@fvstartnone}{%
-\LWR@traceinfo{fvstartnone}%
-\ifbool{LWR@verbtags}{\hbox to\z@{\LWR@htmltagc{div class="\LWR@Verbatimclass"}}}{}%
-\hbox to\z@{\LWR@atbeginverbatim{verbatim}}%
-}
-
-\newcommand*{\LWR@fvendnone}{%
-\LWR@traceinfo{fvendnone}%
-\hbox to\z@{\LWR@afterendverbatim}%
-\ifbool{LWR@verbtags}{\hbox to\z@{\LWR@htmltagc{/div}}}{}%
-}
-
-\newcommand*{\LWR@fvstartsingle}{%
-\LWR@traceinfo{fvstartsingle}%
-\LWR@fvstartnone%
-\FV@BeginListFrame@Single%
-}
-
-\newcommand*{\LWR@fvendsingle}{%
-\LWR@traceinfo{fvendsingle}%
-\FV@EndListFrame@Single%
-\LWR@fvendnone%
-}
-
-\newcommand*{\LWR@fvstartline}{%
-\LWR@traceinfo{fvstartline}%
-\LWR@fvstartnone%
-\FV@BeginListFrame@Lines%
-}
-
-\newcommand*{\LWR@fvendline}{%
-\LWR@traceinfo{fvendline}%
-\FV@EndListFrame@Lines%
-\LWR@fvendnone%
-}
-\def\FV@Frame@none{%
-\let\FV@BeginListFrame\LWR@fvstartnone%
-\let\FV@LeftListFrame\relax%
-\let\FV@RightListFrame\relax%
-\let\FV@EndListFrame\LWR@fvendnone}
-
-\def\FV@Frame@single{%
-\let\FV@BeginListFrame\LWR@fvstartsingle%
-\let\FV@LeftListFrame\FV@LeftListFrame@Single%
-\let\FV@RightListFrame\FV@RightListFrame@Single%
-\let\FV@EndListFrame\LWR@fvendsingle}
-
-\def\FV@Frame@lines{%
-\let\FV@BeginListFrame\LWR@fvstartline%
-\let\FV@LeftListFrame\relax%
-\let\FV@RightListFrame\relax%
-\let\FV@EndListFrame\LWR@fvendline}
-
-\def\FV@Frame@topline{%
-\let\FV@BeginListFrame\LWR@fvstartline%
-\let\FV@LeftListFrame\relax%
-\let\FV@RightListFrame\relax%
-\let\FV@EndListFrame\LWR@fvendnone}
-
-\def\FV@Frame@bottomline{%
-\let\FV@BeginListFrame\LWR@fvstartnone%
-\let\FV@LeftListFrame\relax%
-\let\FV@RightListFrame\relax%
-\let\FV@EndListFrame\LWR@fvendline}
-
-\def\FV@Frame@leftline{%
-\ifx\FancyVerbFillColor\relax%
-\let\FV@FrameFillLine\relax%
-\else%
-\@tempdima\FV@FrameRule\relax%
-\multiply\@tempdima-\tw@%
-\edef\FV@FrameFillLine{%
-{\noexpand\FancyVerbFillColor{\vrule\@width\number\@tempdima sp}%
-\kern-\number\@tempdima sp}}%
-\fi%
-\let\FV@BeginListFrame\LWR@fvstartnone%
-\let\FV@LeftListFrame\FV@LeftListFrame@Single%
-\let\FV@RightListFrame\relax%
-\let\FV@EndListFrame\LWR@fvendnone}
-\def\FV@SingleFrameLine#1{%
- \hbox to\z@{%
- \ifnum#1=\z@\relax
- \let\FV@Label\FV@LabelBegin
- \else
- \let\FV@Label\FV@LabelEnd
- \fi
- \ifx\FV@Label\relax
- \else
- \ifnum#1=\z@
- \ifx\FV@LabelPositionTopLine\relax
-\else
- \LWR@htmltagc{div class="fancyvrblabel"}
-\LWR@origtextrm{\FV@LabelBegin}% \textrm preserves emdash
-\LWR@htmltagc{/div}
-\fi
- \else
- \ifx\FV@LabelPositionBottomLine\relax
-\else
- \LWR@htmltagc{div class="fancyvrblabel"}
-\LWR@origtextrm{\FV@LabelEnd}
-\LWR@htmltagc{/div}
-\fi
- \fi
- \fi
- \hss
-}
-}
-\def\FV@ListProcessLine#1{%
- \hbox to \hsize{%
- \hbox to \VerbatimHTMLWidth {%
- \ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
-\FV@LeftListNumber%
- \FancyVerbFormatLine{#1}%
- \hss%
- \FV@RightListNumber%
-}%
- \hss% required to avoid underfull hboxes
-}
+\let\LWRV@origverbatim@input\verbatim@input
+
+\renewcommand{\verbatim@input}[2]{%
+\ifbool{LWR@verbtags}{\LWR@forcenewpage}{}%
+\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-\baselineskip}%%
+\LWRV@origverbatim@input{#1}{#2}%
+\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
}
-\AtBeginEnvironment{BVerbatim}
-{
+\AfterEndPreamble{
+\LWR@traceinfo{Patching verbatim.}
+\AtBeginEnvironment{verbatim}{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{bverbatim}
-
+\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
}
-
-\AfterEndEnvironment{BVerbatim}
-{
-\leavevmode\par\LWR@origvspace{-\baselineskip}
-\LWR@afterendverbatim
+\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim}
}
-
-
-} % \AfterEndPreamble
-
-
\end{warpHTML}
@@ -4713,11 +4741,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\end{warpHTML}
-
\begin{warpHTML}
-\let\LWR@origitem\item
-
\newcommand*{\LWR@itemizeitem}{%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printcloselistitem{}}%
@@ -4726,9 +4751,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@origitem%
}
-
-\AtBeginEnvironment{itemize}{\LWR@itemizestart}
-
\newcommand*{\LWR@itemizestart}{%
\LWR@stoppars%
\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloseitemize{}}%
@@ -4737,8 +4759,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\item\LWR@itemizeitem%
}
-\AtEndEnvironment{itemize}{\LWR@itemizeend}
-
\newcommand*{\LWR@itemizeend}{%
\LWR@stoppars%
\LWR@closeprevious{\LWR@depthlistitem}%
@@ -4748,8 +4768,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
-\AtBeginEnvironment{enumerate}{\LWR@enumeratestart}
-
\newcommand*{\LWR@enumeratestart}{%
\LWR@stoppars%
\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloseitemize{}}%
@@ -4758,8 +4776,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\item\LWR@itemizeitem%
}
-\AtEndEnvironment{enumerate}{\LWR@enumerateend}
-
\newcommand*{\LWR@enumerateend}{%
\LWR@stoppars%
\LWR@closeprevious{\LWR@depthlistitem}%
@@ -4773,7 +4789,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@stoppars%
\LWR@setlatestname{#1}%
\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printclosedescitem{}}%
+\LetLtxMacro{\hspace}{\LWR@nohspace}%
\LWR@origitem[]%
+\LetLtxMacro{\hspace}{\LWR@hspace}%
\LWR@orighspace{1in}
\LWR@htmltag{dt}#1\LWR@htmltag{/dt}%
\LWR@orignewline%
@@ -4781,8 +4799,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@startpars%
}
-\AtBeginEnvironment{description}{\LWR@descriptionstart}
-
\newcommand*{\LWR@descriptionstart}{%
\LWR@stoppars%
\LWR@pushoneclose{\LWR@depthlist}{\LWR@printclosedescription{}}%
@@ -4791,8 +4807,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\item\LWR@descitem%
}
-\AtEndEnvironment{description}{\LWR@descriptionend}
-
\newcommand*{\LWR@descriptionend}{%
\LWR@stoppars%
\LWR@closeprevious{\LWR@depthlistitem}%
@@ -4800,12 +4814,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@startpars%
}
-\let\LWR@orignewlist\newlist
-
-\renewcommand*{\newlist}[3]{%
-\LWR@orignewlist{#1}{#2}{#3}%
-\AtBeginEnvironment{#1}{\csuse{LWR@#2start}}%
-\AtEndEnvironment{#1}{\csuse{LWR@#2end}}%
+\newcommand*{\LWR@patchlists}{%
+\LetLtxMacro{\LWR@origitem}{\item}
+\AtBeginEnvironment{itemize}{\LWR@itemizestart}
+\AtEndEnvironment{itemize}{\LWR@itemizeend}
+\AtBeginEnvironment{enumerate}{\LWR@enumeratestart}
+\AtEndEnvironment{enumerate}{\LWR@enumerateend}
+\AtBeginEnvironment{description}{\LWR@descriptionstart}
+\AtEndEnvironment{description}{\LWR@descriptionend}
}
\end{warpHTML}
@@ -4823,11 +4839,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\afterassignment\LWR@fnslone\let\nexttoken= }
\def\LWR@fnslone{\expandafter\futurelet\LWR@cs\LWR@fnsltwo}
\def\LWR@fnsltwo{%
-\expandafter\ifx\LWR@cs\@sptoken\let\next=\@BTfnslthree%
+\expandafter\ifx\LWR@cs\@sptoken\let\next=\LWR@fnslthree%
\else\let\next=\nexttoken\fi\next}
-\def\@BTfnslthree{\afterassignment\LWR@fnslone\let\next= }
+\def\LWR@fnslthree{\afterassignment\LWR@fnslone\let\next= }
\newcommand*{\LWR@getmynexttoken}{%
+\LWR@traceinfo{LWR@getmynexttoken}%
\LWR@futurenonspacelet\LWR@mynexttoken\LWR@tabledatacolumntag
}
@@ -5402,7 +5419,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}%
\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
"{}}
-\begingroup \let\\\LWR@endofline #5 \endgroup
+\begingroup \LetLtxMacro{\\}{\LWR@endofline} #5 \endgroup
\LWR@stoppars%
\global\boolfalse{LWR@intabularmetadata}%
}%
@@ -5413,8 +5430,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newbool{LWR@exitingtabular}
+
\newcommand*{\LWR@tabledatacolumntag}%
{%
+\LWR@traceinfo{LWR@tabledatacolumntag}%
\let\mynext\LWR@tabledatasinglecolumntag%
\ifthenelse{\isequivalentto{\LWR@mynexttoken}{\end}}%
{\booltrue{LWR@exitingtabular}}{}%
@@ -5434,6 +5453,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{\let\mynext\LWR@donothing}{}%
\ifthenelse{\isequivalentto{\LWR@mynexttoken}{\cmidrule}}%
{\let\mynext\LWR@donothing}{}%
+\ifthenelse{\isequivalentto{\LWR@mynexttoken}{\specialrule}}%
+{\let\mynext\LWR@donothing}{}%
\ifthenelse{\isequivalentto{\LWR@mynexttoken}{\cline}}%
{\let\mynext\LWR@donothing}{}%
\ifthenelse{\isequivalentto{\LWR@mynexttoken}{\bottomrule}}%
@@ -5455,7 +5476,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\begin{warpHTML}
-
+\newcommand*{\LWR@origtoprule}[1]{\hline}
+\newcommand*{\LWR@origmidrule}[1]{\hline}
+\LetLtxMacro\LWR@origcmidrule\cline
+\newcommand*{\LWR@origbottomrule}[1]{\hline}
+\newcommand*{\LWR@origaddlinespace}[1][]{}
+\newcommand*{\LWR@origmorecmidrules}{}
+\newcommand*{\LWR@origspecialrule}[3]{\hline}
\StartDefiningTabulars
\newenvironment*{LWR@tabular}[2][]
@@ -5473,29 +5500,34 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@stoppars%
\setcounter{LWR@tablecolspos}{1}%
\LWR@clearmidrules%
-\let\\\LWR@tabularendofline%
+\LetLtxMacro{\\}{\LWR@tabularendofline}%
+\LWR@traceinfo{LWR@tabular: redefining macros}%
\renewcommand*{\hline}{\LWR@domidrule\LWR@getmynexttoken}%
-\newcommand*{\midrule}{\LWR@domidrule\LWR@getmynexttoken}%
-
-\NewDocumentCommand{\cmidrule}{o d() m}%
-{\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}%
-
\RenewDocumentCommand{\cline}{m}%
{\LWR@docmidrule{##1}\LWR@getmynexttoken}%
-\newcommand*{\toprule}{\LWR@dotbrule\LWR@getmynexttoken}%
+\DeclareDocumentCommand{\toprule}{o}{\LWR@dotbrule\LWR@getmynexttoken}%
+
+\DeclareDocumentCommand{\midrule}{o}{\LWR@domidrule\LWR@getmynexttoken}%
-\newcommand*{\bottomrule}{\LWR@dotbrule\LWR@getmynexttoken}%
-\let\multicolumn\LWR@tabledatamulticolumntag%
-\let\multirow\LWR@tabledatamultirowtag%
+\DeclareDocumentCommand{\cmidrule}{o d() m}%
+{\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}%
+
+\DeclareDocumentCommand{\bottomrule}{o}{\LWR@dotbrule\LWR@getmynexttoken}%
+\DeclareDocumentCommand{\addlinespace}{o}{}
+\DeclareDocumentCommand{\morecmidrules}{}{}
+\DeclareDocumentCommand{\specialrule}{m m m}{\LWR@domidrule\LWR@getmynexttoken}
+\LetLtxMacro{\multicolumn}{\LWR@tabledatamulticolumntag}%
+\LetLtxMacro{\multirow}{\LWR@tabledatamultirowtag}%
\renewcommand*{\mrowcell}{\global\booltrue{LWR@skippingmrowcell}}%
-\let\caption\LWR@longtabledatacaptiontag%
+\LetLtxMacro{\caption}{\LWR@longtabledatacaptiontag}%
\global\boolfalse{LWR@tableparcell}%
\global\boolfalse{LWR@skippingmrowcell}%
\global\boolfalse{LWR@skipatbang}%
\StartDefiningTabulars%
\protected\gdef&{\LWR@tabularampersand}%
+\LWR@traceinfo{LWR@tabular: about to LWR@getmynexttoken}%
\LWR@getmynexttoken%
}%
{%
@@ -5702,12 +5734,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
-\newcommand{\url}{%
+\newcommand{\LWR@urla}{%
\LWR@ensuredoingapar%
\begingroup\catcode`\_=12
\LWR@urlb%
}
+\let\url\LWR@urla
+
\newcommand*{\LWR@subinlineimage}[5][]{%
\ifthenelse{\equal{#1}{}}%
{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"{}}}%
@@ -6097,13 +6131,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@externalfilecnt}
-\let\LWR@origdollar=$
-\let\LWR@secondorigdollar=$% balance for editor syntax highlighting
+\LetLtxMacro\LWR@origdollar$
+\LetLtxMacro\LWR@secondorigdollar$% balance for editor syntax highlighting
-\let\LWR@origopenparen\(
-\let\LWR@origcloseparen\)
-\let\LWR@origopenbracket\[
-\let\LWR@origclosebracket\]
+\LetLtxMacro\LWR@origopenparen\(
+\LetLtxMacro\LWR@origcloseparen\)
+\LetLtxMacro\LWR@origopenbracket\[
+\LetLtxMacro\LWR@origclosebracket\]
\begingroup
\catcode`\$=\active%
@@ -6122,7 +6156,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
}%
-\gdef\LWR@singledollar#1${%
+\gdef\LWR@subsingledollar#1{%
\ifbool{mathjax}%
{\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}
{% not mathjax
@@ -6131,13 +6165,25 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@origdollar#1\LWR@origdollar%
\end{lateximage}%
}%
-}%
+}
+
+\gdef\LWR@singledollar#1${%
+\LWR@subsingledollar{#1}%
+}
\gdef\(#1\){$#1$}
\gdef\[#1\]{$$#1$$}
\endgroup
+
+\let\LWR@orig@ensuredmath\@ensuredmath
+
+\newcommand*{\LWR@ensuredmath}[1]{%
+\LWR@traceinfo{@ensuredmath: page \thepage: \detokenize{#1}}%
+\LWR@subsingledollar{#1}%
+}
+
\let\math\relax
\let\endmath\relax
\let\displaymath\relax
@@ -6146,24 +6192,21 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\NewEnviron{math}{\expandafter\(\BODY\)}
\NewEnviron{displaymath}{\expandafter\[\BODY\]\@ignoretrue}
-\AtBeginDocument{\catcode`\$=\active}
-
\newcounter{LWR@nextequation}
\newcommand*{\LWR@syncmathjax}{%
\ifcsdef{thechapter}{
-\BlockClassSingle{hidden}{
+\InlineClass{hidden}{
\textbackslash(
\textbackslash{}seteqsection \{\thechapter\}
\textbackslash)
}
}
{}% not using chapters
-
\ifthenelse{\cnttest{\value{equation}}>0}
{
\setcounter{LWR@nextequation}{\value{equation}}
\addtocounter{LWR@nextequation}{1}
-\BlockClassSingle{hidden}{
+\InlineClass{hidden}{
\textbackslash(
\textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
\textbackslash)
@@ -6171,16 +6214,32 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}{}% not eq > 1
}
-\newcommand*{\LWR@restoremathlatexformatting}{%
-\let\hspace\LWR@orighspace%
-\let\rule\LWR@origrule%
+\newcommand*{\LWR@restoreorigformatting}{%
+\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LetLtxMacro\rule\LWR@origrule%
\let\,\LWR@origcomma% disable HTML short unbreakable space
-\let\textit\LWR@origtextit%
-\let\textbf\LWR@origtextbf%
-\let\texttt\LWR@origtexttt%
-\let\textsc\LWR@origtextsc%
-\let\textsf\LWR@origtextsf%
-\let\textrm\LWR@origtextrm%
+\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}%
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
\let\textsuperscript\LWR@origtextsuperscript%
\let\textsubscript\LWR@origtextsubscript%
@@ -6188,6 +6247,29 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\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{\scalebox}{\LWR@origscalebox}%
+\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
+\let\reflectbox\LWR@origreflectbox%
+\let\framebox\LWR@origframebox%
+\let\makebox\LWR@origmakebox%
+\let\fbox\LWR@origfbox%
+\let\fboxBlock\LWR@origfbox%
+\LetLtxMacro{\fminipage}{\LWR@fminipageprint}%
+\LetLtxMacro{\endfminipage}{\endLWR@fminipageprint}%
+\LetLtxMacro{\minipage}{\LWR@origminipage}%
+\let\endminipage\LWR@endminipage%
+\LetLtxMacro{\parbox}{\LWR@origparbox}%
}
\NewDocumentCommand{\LWR@hidelatexequation}{m +m}{%
@@ -6196,7 +6278,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begingroup
\csuse{LWR@orig#1}
-\LWR@restoremathlatexformatting
+\LWR@restoreorigformatting
#2
\csuse{LWR@origend#1}
\endgroup
@@ -6206,11 +6288,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
\NewDocumentCommand{\LWR@addmathjax}{m +m}{%
-
+\LWR@origtilde\LWR@orignewline
\textbackslash{}begin\{#1\}
\LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}
\textbackslash{}end\{#1\}
-
+\LWR@orignewline
}
\let\LWR@origequation\equation
@@ -6257,22 +6339,69 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcommand*{\LWR@beginhideamsmath}{
\LWR@stoppars
-
+\LWR@origtilde\LWR@orignewline
\LWR@htmlopencomment
\begingroup
-\LWR@restoremathlatexformatting
+\LWR@restoreorigformatting
}
\newcommand*{\LWR@endhideamsmath}{
\endgroup
\LWR@htmlclosecomment
-
+\LWR@orignewline
\LWR@startpars
}
+\let\LWR@origeqnarray\eqnarray
+\let\LWR@origendeqnarray\endeqnarray
+\newbool{LWR@numbereqnarray}
+\booltrue{LWR@numbereqnarray}
+\newcommand{\LWR@eqnarrayfactor}{%
+\ifbool{mathjax}
+{
+\LWR@syncmathjax
+\boolfalse{LWR@amsmultline}
+\ifbool{LWR@numbereqnarray}
+{
+\LWR@beginhideamsmath
+\LWR@origeqnarray
+\BODY
+\LWR@origendeqnarray
+\LWR@endhideamsmath
+\LWR@addmathjax{eqnarray}{\BODY}
+}{% not LWR@numbereqnarray
+\LWR@addmathjax{eqnarray*}{\BODY}
+}% LWR@numbereqnarray
+}% mathjax
+{% not mathjax
+\ifbool{LWR@numbereqnarray}
+{
+\begin{lateximage}[\LWR@addmathjax{eqnarray}{\BODY}]
+\LWR@origeqnarray
+\BODY
+\LWR@origendeqnarray
+\end{lateximage}
+}{% not LWR@numbereqnarray
+\begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]
+\LWR@origeqnarray
+\BODY
+\nonumber
+\LWR@origendeqnarray
+\end{lateximage}
+}% LWR@numbereqnarray
+}% not mathjax
+\booltrue{LWR@numbereqnarray}
+}
+\RenewEnviron{eqnarray}
+{%
+
+\LWR@eqnarrayfactor
+
+}
+\csgpreto{eqnarray*}{\boolfalse{LWR@numbereqnarray}}
\BeforeBeginEnvironment{multline}{
\ifbool{mathjax}
@@ -6526,6 +6655,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@strresult%
}
+\catcode`\$=\active%
+
\NewDocumentEnvironment{lateximage}{O{image}}{%
\LWR@traceinfo{lateximage: starting on page \arabic{page}}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
@@ -6543,35 +6674,33 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
class="lateximagesource"{}} \LWR@orignewline
+\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
\immediate\write\LWR@file{|\theLWR@LIpage|\theLWR@externalfilecnt|}%
+\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
\addtocounter{LWR@lateximagedepth}{1}%
+\LWR@traceinfo{lateximage: about to create new page}%
\LWR@orignewpage%
+\LWR@traceinfo{lateximage: about to create minipage}%
\LWR@origminipage{6in}%
\csuse{LWR@orig\LateximageFontSizeName}%
-\let\hspace\LWR@orighspace%
-\let\rule\LWR@origrule%
-\let\,\LWR@origcomma% disable HTML short unbreakable space
-\let\textit\LWR@origtextit%
-\let\textbf\LWR@origtextbf%
-\let\texttt\LWR@origtexttt%
-\let\textsc\LWR@origtextsc%
-\let\textsf\LWR@origtextsf%
-\let\textrm\LWR@origtextrm%
-\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
-\let\textsuperscript\LWR@origtextsuperscript%
-\let\textsubscript\LWR@origtextsubscript%
-\let~\LWR@origtilde%
-\let\enskip\LWR@origenskip%
-\let\quad\LWR@origquad%
-\let\qquad\LWR@origqquad%
-\let\tabular\LWR@origtabular%
-\let\endtabular\LWR@origendtabular%
-\let\newline\LWR@orignewline%
+\LWR@traceinfo{lateximage: about to temporarily restore formatting}%
+\LWR@restoreorigformatting%
+\LWR@traceinfo{lateximage: about to create label}%
\LWR@origlabel{LWRlateximage\arabic{LWR@lateximagenumber}}%
+\LWR@traceinfo{lateximage: finished creating the label}%
+\LetLtxMacro$\LWR@origdollar%
+\catcode`\$=3% math shift
+\LetLtxMacro\(\LWR@origopenparen%
+\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}
{% start of \end{lateximage}
+\LWR@traceinfo{lateximage: starting end of environment}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{1}}%
{%
\addtocounter{LWR@lateximagedepth}{-1}%
@@ -6603,11 +6732,13 @@ class="lateximagesource"{}} \LWR@orignewline
}{}%
\addtocounter{LWR@lateximagedepth}{-1}%
}% end of outer-most lateximage
-\LWR@traceinfo{lateximage: done}
+\LWR@traceinfo{lateximage: done}%
}%
+\catcode`\$=3% math shift
\end{warpHTML}
+
\begin{warpprint}
-\newenvironment{lateximage}[1][]{\minipage{\linewidth}}{\endminipage}
+\newenvironment{lateximage}[1][]{}{}
\end{warpprint}
@@ -6890,6 +7021,8 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\define@key{krotbox}{x}{}
\define@key{krotbox}{y}{}
\define@key{krotbox}{units}{}
+\LetLtxMacro\LWR@origrotatebox\rotatebox
+
\NewDocumentCommand{\LWR@rotatebox}{O{} m +m}{%
\renewcommand*{\LWR@rotboxorigin}{}
\setkeys{krotbox}{#1}%
@@ -6906,6 +7039,8 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\end{LWR@nestspan}%
}
+\LetLtxMacro\LWR@origscalebox\scalebox
+
\NewDocumentCommand{\LWR@scalebox}{m o m}{%
\LWR@htmltagc{span style="display: inline-block; %
\LWR@scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
@@ -6918,6 +7053,8 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\end{LWR@nestspan}%
}
+\let\LWR@origreflectbox\reflectbox
+
\newcommand{\LWR@reflectbox}[1]{\LWR@scalebox{-1}[1]{#1}}
\end{warpHTML}
@@ -6937,6 +7074,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\RequirePackage{cleveref}
}
\AfterEndPreamble{
+\LWR@traceinfo{Patching cleveref.}
@@ -6971,10 +7109,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\begin{warpHTML}
-\BeforeBeginEnvironment{picture}{%
-\lateximage%
-\let\makebox\LWR@origmakebox%
-}
+\BeforeBeginEnvironment{picture}{\lateximage}
\AfterEndEnvironment{picture}{\endlateximage}
@@ -6989,8 +7124,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\newlength{\LWR@minipagewidth}
\newlength{\LWR@minipageheight}
-\let\LWR@origminipage\minipage
-\let\LWR@origendminipage\endminipage
\def\LWR@endminipage{%
\par
\unskip
@@ -7032,7 +7165,6 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\boolfalse{LWR@minipagethispar}
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
{%
-\LWR@traceinfo{starting minipage of width #4}%
\uselengthunit{in}%
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
@@ -7094,46 +7226,178 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
#5
\end{minipage}
}
-\let\LWR@origmakebox\makebox
+\LetLtxMacro\LWR@origmakebox\makebox
-\RenewDocumentCommand{\makebox}{o o m}{%
-\mbox{#3}
+\RenewDocumentCommand{\makebox}{d() o o m}{%
+\mbox{#4}
}
+\LetLtxMacro\LWR@origframebox\framebox
+
\RenewDocumentCommand{\framebox}{o o m}{%
\fbox{#3}
}
\let\LWR@origfbox\fbox
-\renewcommand*{\fbox}[1]{%
-\InlineClass{framebox}{#1}%
+
+\renewcommand{\fbox}[1]{%
+\LWR@htmltagc{span class="framebox"}%
+\begin{LWR@nestspan}%
+#1
+\LWR@htmltagc{/span}%
+\end{LWR@nestspan}%
+}
+
+\newcommand{\fboxBlock}[1]{%
+\begin{BlockClass}{framed}
+#1
+\end{BlockClass}
}
+
+\NewDocumentEnvironment{fminipage}{O{t} o O{t} m}
+{%
+\setlength{\LWR@tempwidth}{#4}
+\begin{BlockClass}[width:\rndprintlength{\LWR@tempwidth};]{framed}%
+}
+{\end{BlockClass}}
+\LetLtxMacro{\LWR@origraisebox}{\raisebox}
+
\RenewDocumentCommand{\raisebox}{m o o m}{%
#4%
}
\end{warpHTML}
+\begin{warpall}
-\begin{warpHTML}
+\newsavebox{\LWR@fminipagebox}
-\renewcommand{\emph}[1]{\LWR@htmlspan{em}{#1}}
+\NewDocumentEnvironment{LWR@fminipageprint}{O{t} o O{t} m}
+{%
+\IfValueTF{#2}%
+{\minipage[#1][#2][#3]{#4}}%
+{\minipage[#3]{#4}}%
+\begin{lrbox}{\LWR@fminipagebox}%
+\IfValueTF{#2}%
+{\minipage[#1][#2][#3]{\linewidth-2\fboxsep-2\fboxrule}}%
+{\minipage[#3]{\linewidth-2\fboxsep-2\fboxrule}}%
+}
+{%
+\endminipage%
+\end{lrbox}%
+\fbox{\usebox{\LWR@fminipagebox}}%
+\endminipage%
+}
-\renewcommand{\textmd}[1]{\LWR@htmlspan{textmd}{#1}}
+\end{warpall}
-\renewcommand{\textbf}[1]{\LWR@htmlspan{b}{#1}}
+\begin{warpprint}
-\renewcommand{\textrm}[1]{\InlineClass{textrm}{#1}}
+\let\fboxBlock\fbox
-\renewcommand{\textsf}[1]{\InlineClass{textsf}{#1}}
+\LetLtxMacro{\fminipage}{\LWR@fminipageprint}
+\LetLtxMacro{\endfminipage}{\endLWR@fminipageprint}
-\renewcommand{\texttt}[1]{\LWR@htmlspan{kbd}{#1}}
+\end{warpprint}
-\renewcommand{\textup}[1]{\InlineClass{textup}{#1}}
-\renewcommand{\textit}[1]{\LWR@htmlspan{i}{#1}}
+\begin{warpHTML}
-\renewcommand{\textsc}[1]{\InlineClass{textsc}{#1}}
-\renewcommand{\textnormal}[1]{\textmd{\textrm{\textup{#1}}}}
+\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}}
+\DeclareRobustCommand{\LWR@nullemph}[1]{#1}
+\LetLtxMacro{\emph}{\LWR@HTMLemph}
+
+\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{\LWR@htmlspan{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@htmlspan{textrm}{#1}}
+\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
+\LetLtxMacro{\textrm}{\LWR@HTMLtextrm}
+
+\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{\LWR@htmlspan{textsf}{#1}}
+\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
+\LetLtxMacro{\textsf}{\LWR@HTMLtextsf}
+
+\DeclareRobustCommand{\LWR@HTMLtexttt}[1]{\LWR@htmlspan{kbd}{#1}}
+\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1}
+\LetLtxMacro{\texttt}{\LWR@HTMLtexttt}
+
+\DeclareRobustCommand{\LWR@HTMLtextup}[1]{\LWR@htmlspan{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@htmlspan{textsc}{#1}}
+\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
+\LetLtxMacro{\textsc}{\LWR@HTMLtextsc}
+
+\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{\LWR@htmlspan{testsl}{#1}}
+\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
+\LetLtxMacro{\textsl}{\LWR@HTMLtextsl}
+
+\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
+\DeclareRobustCommand{\LWR@nulltextnormal}[1]{#1}
+\LetLtxMacro{\textnormal}{\LWR@HTMLtextnormal}
+
+\DeclareRobustCommand{\LWR@HTMLrmfamily}[1]{}
+\DeclareRobustCommand{\LWR@HTMLsffamily}[1]{}
+\DeclareRobustCommand{\LWR@HTMLttfamily}[1]{}
+\DeclareRobustCommand{\LWR@HTMLbfseries}[1]{}
+\DeclareRobustCommand{\LWR@HTMLmdseries}[1]{}
+\DeclareRobustCommand{\LWR@HTMLupshape}[1]{}
+\DeclareRobustCommand{\LWR@HTMLslshape}[1]{}
+\DeclareRobustCommand{\LWR@HTMLscshape}[1]{}
+\DeclareRobustCommand{\LWR@HTMLitshape}[1]{}
+\DeclareRobustCommand{\LWR@HTMLem}[1]{}
+\DeclareRobustCommand{\LWR@nullrmfamily}[1]{}
+\DeclareRobustCommand{\LWR@nullsffamily}[1]{}
+\DeclareRobustCommand{\LWR@nullttfamily}[1]{}
+\DeclareRobustCommand{\LWR@nullbfseries}[1]{}
+\DeclareRobustCommand{\LWR@nullmdseries}[1]{}
+\DeclareRobustCommand{\LWR@nullupshape}[1]{}
+\DeclareRobustCommand{\LWR@nullslshape}[1]{}
+\DeclareRobustCommand{\LWR@nullscshape}[1]{}
+\DeclareRobustCommand{\LWR@nullitshape}[1]{}
+\DeclareRobustCommand{\LWR@nullem}[1]{}
+
+\newcommand*{\LWR@nullfonts}{%
+\LetLtxMacro{\emph}{\LWR@nullemph}%
+\LetLtxMacro{\textmd}{\LWR@nulltextmd}%
+\LetLtxMacro{\textbf}{\LWR@nulltextbf}%
+\LetLtxMacro{\textrm}{\LWR@nulltextrm}%
+\LetLtxMacro{\textsf}{\LWR@nulltextsf}%
+\LetLtxMacro{\texttt}{\LWR@nulltexttt}%
+\LetLtxMacro{\textup}{\LWR@nulltextup}%
+\LetLtxMacro{\textit}{\LWR@nulltextit}%
+\LetLtxMacro{\textsc}{\LWR@nulltextsc}%
+\LetLtxMacro{\textsl}{\LWR@nulltextsl}%
+\LetLtxMacro{\textnormal}{\LWR@nulltextnormal}%
+\LetLtxMacro{\rmfamily}{\LWR@nullrmfamily}%
+\LetLtxMacro{\sffamily}{\LWR@nullsffamily}%
+\LetLtxMacro{\ttfamily}{\LWR@nullttfamily}%
+\LetLtxMacro{\bfseries}{\LWR@nullbfseries}%
+\LetLtxMacro{\mdseries}{\LWR@nullmdseries}%
+\LetLtxMacro{\upshape}{\LWR@nullupshape}%
+\LetLtxMacro{\slshape}{\LWR@nullslshape}%
+\LetLtxMacro{\scshape}{\LWR@nullscshape}%
+\LetLtxMacro{\itshape}{\LWR@nullitshape}%
+\LetLtxMacro{\em}{\LWR@nullem}%
+\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
+\renewcommand*{\HTMLunicode}[1]{}%
+\renewcommand*{\HTMLentity}[1]{}%
+\renewcommand*{\&}{and}%
+\renewcommand{\textsuperscript}[1]{##1}%
+\renewcommand{\textsubscript}[1]{##1}%
+\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
+\DeclareExpandableDocumentCommand{\InlineClass}{o m +m}{##3}%
+}
\renewcommand*{\mdseries}{}
@@ -7223,7 +7487,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}%
\let\newline\LWR@newlinebr
-\let\LWR@origendofline\\
+\LetLtxMacro\LWR@origendofline\\
\NewDocumentCommand{\LWR@endofline}{s o}
{%
\newline%
@@ -7282,7 +7546,9 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"%
\LWR@minipagestartpars%
}%
}
-\let\hspace\LWR@hspace
+\NewDocumentCommand{\LWR@nohspace}{s m}{}
+
+\LetLtxMacro{\hspace}{\LWR@hspace}
\NewDocumentCommand{\LWR@vspace}{s m}{}
\let\vspace\LWR@vspace
@@ -7337,7 +7603,7 @@ display:inline-block;"%
\LWR@minipagestartpars%
}% non-zero width
}
-\let\rule\LWR@rule
+\renewcommand{\rule}{\LWR@rule}
\end{warpHTML}