diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-17 21:15:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-17 21:15:43 +0000 |
commit | 0f4a34d1fe6262bc72205b50adb2ae5ab576d427 (patch) | |
tree | 96d07059e14ae2c49b831c16e2cf0de025d41d5c /Master/texmf-dist/tex/latex/lwarp/lwarp.sty | |
parent | 0b34e84c6dde5d7877c9b07fc95374374aaba3c6 (diff) |
lwarp (17aug17)
git-svn-id: svn://tug.org/texlive/trunk@45054 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 1952 |
1 files changed, 1123 insertions, 829 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index c9116434ff9..83c2d6e275a 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/08/08 v0.35 Allows LaTeX to directly produce HTML5 output.] + [2017/08/17 v0.36 Allows LaTeX to directly produce HTML5 output.] @@ -277,8 +277,10 @@ For a possible alternative, see package(s) #2.} \LWR@loadafter{titlesec} \LWR@loadafter{titletoc} \LWR@loadafter{tocloft} +\LWR@loadafter{transparent} \LWR@loadafter{trivfloat} \LWR@loadafter{ulem} +\LWR@loadafter{upref} \LWR@loadafter{varioref} \LWR@loadafter{verse} \LWR@loadafter{wallpaper} @@ -317,11 +319,11 @@ For a possible alternative, see package(s) #2.} \RequirePackage {microtype} \microtypesetup{ -protrusion=false, -expansion=false, -tracking=false, -kerning=false, -spacing=false} + protrusion=false, + expansion=false, + tracking=false, + kerning=false, + spacing=false} \DisableLigatures[f,q,t,T,Q]{encoding = *,family = *} \fi @@ -428,10 +430,10 @@ top=1in,bottom=1in,% {% yes filename \IfFileExists{lwarp-\LWR@strresulttwo.sty}% {% lwarp-* file found -\StrSubstitute% -{\LWR@requirepackagenames}% -{\LWR@strresult}% -{lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]% + \StrSubstitute% + {\LWR@requirepackagenames}% + {\LWR@strresult}% + {lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]% }% {}% no lwarp-* file }% yes filename @@ -449,14 +451,14 @@ top=1in,bottom=1in,% \LWR@lookforpackagename{9} \IfValueTF{#1} {% options given -\IfValueTF{#3}% version given? -{\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}[#3]} -{\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}} + \IfValueTF{#3}% version given? + {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}[#3]} + {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}} } {% no options given -\IfValueTF{#3}% version given? -{\LWR@origRequirePackage{\LWR@requirepackagenames}[#3]} -{\LWR@origRequirePackage{\LWR@requirepackagenames}} + \IfValueTF{#3}% version given? + {\LWR@origRequirePackage{\LWR@requirepackagenames}[#3]} + {\LWR@origRequirePackage{\LWR@requirepackagenames}} } } \LetLtxMacro{\usepackage}{\RequirePackage} @@ -513,7 +515,8 @@ top=1in,bottom=1in,% \newcommand{\LWR@traceinfo}[1]{% \ifbool{LWR@tracinglwarp}% {% -\typeout{*** lwarp: #1}% + \typeout{*** lwarp: #1}% + % \PackageInfo{lwarp}{#1 : }% }% {}% } @@ -568,6 +571,8 @@ top=1in,bottom=1in,% \let\LWR@origraggedright\raggedright \let\LWR@origonecolumn\onecolumn +\let\LWR@origsp\sp +\let\LWR@origsb\sb \let\LWR@origtextsuperscript\textsuperscript \let\LWR@origtextsubscript\textsubscript @@ -607,6 +612,50 @@ top=1in,bottom=1in,% + +\begin{warpHTML} + +\AtBeginDocument{% in case textcomp was not loaded + +\providecommand*{\textdegree}{DEG} +\providecommand*{\textcelsius}{DEGC} +\providecommand*{\textohm}{OHM} +\providecommand*{\textmu}{MU} + +\let\LWR@origtextdegree\textdegree +\let\LWR@origtextcelsius\textcelsius +\let\LWR@origtextohm\textohm +\let\LWR@origtextmu\textmu + +\ifPDFTeX +\renewcommand*{\textdegree}{\HTMLentity{deg}} +\renewcommand*{\textcelsius}{\HTMLentity{deg}\,C} +\renewcommand*{\textohm}{\HTMLunicode{2126}} +\renewcommand*{\textmu}{\HTMLunicode{00B5}} +\else +\renewcommand*{\textdegree}{°} +\renewcommand*{\textcelsius}{°C} +\renewcommand*{\textohm}{Ω} +\renewcommand*{\textmu}{μ} +\fi + +\@ifpackageloaded{siunitx} +{ +\DeclareSIUnit\bohr{\textit{a}\textsubscript{0}} +\DeclareSIUnit\clight{\textit{c}\textsubscript{0}} +\DeclareSIUnit\elementarycharge{\textit{e}} +\DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}} +\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}} +\DeclareSIUnit\planckbar{\HTMLunicode{210F}} +}% siunitx loaded +{} + +}% AtBeginDocument + +\end{warpHTML} + + + \begin{warpprint} \typeout{lwarp: generating configuration files} \end{warpprint} @@ -783,8 +832,8 @@ span.poemtitle { } blockquote { -margin-left: 0px ; -margin-right: 0px ; + margin-left: 0px ; + margin-right: 0px ; } blockquote p { @@ -792,12 +841,12 @@ blockquote p { text-align: left ; font-size: .85em ; margin-left: 3em ; -margin-right: 3em ; + margin-right: 3em ; } blockquotation { -margin-left: 0px ; -margin-right: 0px ; + margin-left: 0px ; + margin-right: 0px ; } blockquotation p { @@ -805,7 +854,7 @@ blockquotation p { text-align: left ; font-size: .85em ; margin-left: 3em ; -margin-right: 3em ; + margin-right: 3em ; } div.epigraph { @@ -963,7 +1012,7 @@ div.titlepage { font-size: .85em ; margin: 3ex 1em 0ex 1em ; padding-bottom: 1ex ; -border-top: 1px solid silver ; + border-top: 1px solid silver ; } .marginpar { @@ -1137,7 +1186,7 @@ div.onehalfspace { line-height: 1.5 ; } div.doublespace { line-height: 2 ; } /* Minipage environments, vertically aligned to top, center, bottom: */ -.minipage { +.minipage, .fminipage, .fcolorminipage { /* display: inline-block ; */ /* Mini pages which follow each other will be tiled. */ margin: .25em .25em .25em .25em; @@ -1151,6 +1200,16 @@ div.doublespace { line-height: 2 ; } /* Have not yet researched this. */ .minipage p {margin: .75ex 0em .75ex 0em ;} +.fboxBlock .minipage, .colorbox .minipage, .colorboxBlock .minipage, +.fcolorbox .minipage, .fcolorboxBlock .minipage + {border: none ; background: none;} + +.fbox, .fboxBlock { border: 1px solid black ; } + +.fbox, .fboxBlock, .fcolorbox, .fcolorboxBlock, .colorbox, .colorboxBlock, +.fminipage, .fcolorminipage + {display: inline-block} + .shadowbox, .shabox { border: 1px solid black; box-shadow: 3px 3px 3px #808080 ; @@ -1223,7 +1282,7 @@ div.doublespace { line-height: 2 ; } } /* framed package */ -.framed, pre.boxedverbatim { +.framed, pre.boxedverbatim, fcolorbox { margin: 3ex 0em 3ex 0em ; border: 1px solid black; border-radius: 0px ; @@ -1247,8 +1306,8 @@ div.doublespace { line-height: 2 ; } } .framedtitle { -margin: 0em ; -padding: 0em ; + margin: 0em ; + padding: 0em ; font-size: 130% } @@ -1260,8 +1319,8 @@ dl { } dl dt { -margin-top: 1ex; -margin-left: 1em ; + margin-top: 1ex; + margin-left: 1em ; font-weight: bold; } @@ -1367,8 +1426,8 @@ figcaption , .lstlistingtitle { font-size: .85em ; text-align: center ; font-weight: bold ; -margin-top: 1ex ; -margin-bottom: 1ex ; + margin-top: 1ex ; + margin-bottom: 1ex ; } figure.subfigure figcaption, figure.subtable figcaption { @@ -1384,8 +1443,8 @@ div.nonfloatcaption { /* For a \RawCaption inside a minipage inside a figure's floatrow: */ figure div.floatrow div.minipage figcaption { -border: none ; -background: none ; + border: none ; + background: none ; } table { @@ -1483,13 +1542,13 @@ span.callout { background-color:black; color:white; padding:0px .25em 0px .25em; -margin: 0 ; + margin: 0 ; font-weight: bold; font-size:.72em ; } div.programlisting pre.verbatim span.callout{ -font-size: .85em ; + font-size: .85em ; } div.published @@ -1650,7 +1709,7 @@ span.theoremheaderchangebreak, span.theoremheaderchange, span.theoremheadermargin { -font-style:normal ; font-weight: bold ; margin-right: 1em ; + font-style:normal ; font-weight: bold ; margin-right: 1em ; } span.amsthmnameplain, @@ -1658,7 +1717,7 @@ span.amsthmnamedefinition, span.amsthmnumberplain, span.amsthmnumberdefinition { -font-style:normal ; font-weight: bold ; + font-style:normal ; font-weight: bold ; } span.amsthmnameremark, @@ -1676,10 +1735,10 @@ span.amsthmproofname span.theoremheadersc { -font-style:normal ; -font-variant: small-caps ; -font-weight: normal ; -margin-right: 1em ; + font-style:normal ; + font-variant: small-caps ; + font-weight: normal ; + margin-right: 1em ; } .theoremendmark {float:right} @@ -1691,8 +1750,8 @@ div.theorembodychangebreak, div.theorembodychange, div.theorembodymargin { -font-style:italic; -margin-top: 3ex ; margin-bottom: 3ex ; + font-style:italic; + margin-top: 3ex ; margin-bottom: 3ex ; } div.theorembodydefinition, div.theorembodyremark, div.theorembodyproof, @@ -1700,8 +1759,8 @@ div.theorembodyplainupright, nonumberplainuprightsc, div.amsthmbodydefinition, div.amsthmbodyremark, div.amsthmproof { -font-style: normal ; -margin-top: 3ex ; margin-bottom: 3ex ; + font-style: normal ; + margin-top: 3ex ; margin-bottom: 3ex ; } span.amsthmnoteremark {} @@ -1781,7 +1840,7 @@ http://nitens.org/taraborelli/texlogo .lyxlogo { font-family: "URW Classico", Optima, "Linux Biolinum O", "DejaVu Sans", "Bitstream Vera Sans", Geneva, -Verdana, sans-serif ; + Verdana, sans-serif ; } /* Only display top and bottom navigation if a small screen: */ @@ -1854,7 +1913,7 @@ h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph "Nimbus Roman No 9 L", "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-variant: small-caps ; -font-weight: normal ; + font-weight: normal ; color: #304070 ; text-shadow: 2px 2px 3px #808080; } @@ -1961,7 +2020,7 @@ div.sidebartitle{ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif; font-weight:bold; font-variant: small-caps ; -font-size: 1.5em ; + font-size: 1.5em ; color: #304070 ; text-align: center ; text-shadow: 1px 1px 2px #808080; @@ -1970,14 +2029,14 @@ font-size: 1.5em ; .minipage { background-color: #eeeee7 ; border: 1px solid silver ; -border-radius: 1ex ; + border-radius: 1ex ; } .framed .minipage , .framedleftbar .minipage { -border: none ; -background: none ; -padding: 0ex ; -margin: 0ex ; + border: none ; + background: none ; + padding: 0ex ; + margin: 0ex ; } figure.figure .minipage, figcaption .minipage { border: none; } @@ -1994,7 +2053,7 @@ figure , div.marginblock { figure figure { border: 1px solid silver ; margin: 0em ; -box-shadow: none ; + box-shadow: none ; } /* @@ -2397,7 +2456,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.35" +printversion = "v0.36" function printhelp () print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; @@ -2583,8 +2642,8 @@ function reruntoget (filesource) local fsource = io.open(filesource) for line in fsource:lines() do if ( string.find(line,"Rerun to get") ~= nil ) then -io.close(fsource) -return true + io.close(fsource) + return true end end io.close(fsource) @@ -3072,30 +3131,30 @@ end -- not --version \edef\LWR@tempone{#1}% \LWR@traceinfo{about to compare with ??}% \ifthenelse{\equal{\LWR@tempone}{??}}% -{% -\LWR@traceinfo{found ??}% -}{% -\LWR@traceinfo{not found ??}% -}% +{\LWR@traceinfo{found ??}}% +{\LWR@traceinfo{not found ??}}% \LWR@traceinfo{about to compare with zero or empty}% \ifthenelse{% -\equal{\LWR@tempone}{0}% -\OR \equal{\LWR@tempone}{}% -\OR \equal{\LWR@tempone}{??}% + \equal{\LWR@tempone}{0}% + \OR \equal{\LWR@tempone}{}% + \OR \equal{\LWR@tempone}{??}% }% {% -\LWR@traceinfo{LWR@htmlsectionfilename B \HomeHTMLFilename.html}% -\HomeHTMLFilename.html% + \LWR@traceinfo{LWR@htmlsectionfilename B \HomeHTMLFilename.html}% + \HomeHTMLFilename.html% }% {% -\LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% -\ifthenelse{% -\equal{\HTMLFilename}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}% -}% -{% -\LWR@traceinfo{prefixing the index name with an underscore.}% -\_#1.html}% -{\HTMLFilename#1.html}% + \LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}% + \ifthenelse{% + \equal{\HTMLFilename}{} \AND + \equal{\LWR@tempone}{Index} \OR + \equal{\LWR@tempone}{index}% + }% + {% + \LWR@traceinfo{prefixing the index name with an underscore.}% + \_#1.html% + }% + {\HTMLFilename#1.html}% }% \LWR@traceinfo{LWR@htmlsectionfilename Z}% } @@ -3193,20 +3252,53 @@ end -- not --version \newcommand*{\LWR@tagregularparagraph}{p} -\@ifpackagewith{babel}{french}{ -\renewcommand*{\FBcolonspace}{~} -\renewcommand*{\FBthinspace}{\,} -}{} +\providecommand*{\LWR@FBcancel}{} -\@ifpackagewith{babel}{french}{% -\newcommand{\LWR@FBcancel}{% -\csdef{FBcolonspace}{}% -\csdef{FBthinspace}{}% +\AtBeginDocument{ +\@ifundefined{frenchbsetup} +{} +{ + \frenchbsetup{FrenchFootnotes=false} + % OR: redefine \insertfootnotemarkFB? + \LetLtxMacro\LWR@FBcancel\NoAutoSpacing + \renewcommand*{\FBcolonspace}{% + \begingroup% + \LWR@FBcancel% + \LWR@origampersand{}nbsp;% + \endgroup% + } + \renewcommand*{\FBthinspace}{% + \begingroup% + \LWR@FBcancel% + \LWR@origampersand\#x202f;% \, + \endgroup% + } + \renewcommand*{\FBguillspace}{% + \begingroup% + \LWR@FBcancel% + \LWR@origampersand{}nbsp;% ~, for \og xyz \fg{} + \endgroup% + } + \DeclareDocumentCommand{\FBmedkern}{}{% + \begingroup% + \LWR@FBcancel% + \LWR@origampersand\#x202f;% \, + \endgroup% + } + \DeclareDocumentCommand{\FBthickkern}{}{% + \begingroup% + \LWR@FBcancel% + \LWR@origampersand{}nbsp;% ~ + \endgroup% + } + \ifFBunicode + \else + \DeclareTextSymbol{\FBtextellipsis}{LY1}{133} + \DeclareTextCommandDefault{\FBtextellipsis}{\textellipsis\xspace} + \fi } } -{% not french: -\newcommand{\LWR@FBcancel}{} -}% + \newcommand*{\LWR@htmltagc}[1]{% {% @@ -3228,27 +3320,27 @@ end -- not --version \LWR@traceinfo{LWR@nestspan}% \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% {% -\LWR@traceinfo{LWR@nestspan: inside a lateximage}% + \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% -}% -\renewcommand{\LWR@descriptionend}{}% + \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% + }% + \renewcommand{\LWR@descriptionend}{}% }% not in a lateximage }% {% @@ -3336,11 +3428,11 @@ end -- not --version \NewDocumentCommand{\LWR@subhtmlelementclass}{m o m}{% \IfValueTF{#2}% {% option -\ifthenelse{\equal{#2}{}}% -{\LWR@htmltag{#1 class="#3"}}% empty option -{\LWR@htmltag{#1 class="#3" style="#2"}}% 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="#3"}}% no option +{\LWR@htmltag{#1 class="#3" }}% no option } \NewDocumentCommand{\LWR@htmlelementclass}{m o m}{% @@ -3353,7 +3445,7 @@ end -- not --version \LWR@stoppars% \LWR@htmltag{/#1}% \ifbool{HTMLDebugComments}{% -\LWR@htmlcomment{End of #1 ``#2''}% + \LWR@htmlcomment{End of #1 ``#2''}% }{}% \LWR@startpars% } @@ -3475,20 +3567,21 @@ end -- not --version {% \ifbool{LWR@doingstartpars}% {% handling pars -\ifthenelse{% -\cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR% -\cnttest{\value{LWR@spandepth}}{>}{0}% -}% nested par tags? -{}% no nested par tags -{% yes nest par tags -\LWR@htmltagc{\LWR@tagregularparagraph}% -\ifnumcomp{\@listdepth}{>}{0}% -{% -\LWR@orighspace{1in}% -}{}% -\global\booltrue{LWR@doingapar}% -\let\par\LWR@closeparagraph% -}% end of yes nest par tags + \ifthenelse{% + \cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR% + \cnttest{\value{LWR@spandepth}}{>}{0}% + }% nested par tags? + {}% no nested par tags + {% yes nest par tags + \LWR@htmltagc{\LWR@tagregularparagraph}% + \ifnumcomp{\@listdepth}{>}{0}% + {% + \LWR@orighspace{1in}% + }% + {}% + \global\booltrue{LWR@doingapar}% + \let\par\LWR@closeparagraph% + }% end of yes nest par tags }% end of handling pars {}% not handling pars } @@ -3497,32 +3590,31 @@ end -- not --version {% \ifbool{LWR@doingapar}% {% handling pars -\ifthenelse{% -\cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR% -\cnttest{\value{LWR@spandepth}}{>}{0}% -}% -{% no nested par tags -\ifthenelse{% -\cnttest{\value{LWR@spandepth}}{>}{0}% -\AND% -\cnttest{\value{LWR@lateximagedepth}}{=}{0}% -}% -{% -\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}% -}% -{}% -}% no nested par tags -{% yes nest par tags -\unskip% -\LWR@htmltagc{/\LWR@tagregularparagraph}% -\global\boolfalse{LWR@doingapar}% -\global\boolfalse{LWR@minipagethispar}% -}% end of yes nest par tags + \ifthenelse{% + \cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR% + \cnttest{\value{LWR@spandepth}}{>}{0}% + }% + {% no nested par tags + \ifthenelse{% + \cnttest{\value{LWR@spandepth}}{>}{0}% + \AND% + \cnttest{\value{LWR@lateximagedepth}}{=}{0}% + }% + {\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}% + {}% + }% no nested par tags + {% yes nest par tags + \unskip% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \LWR@orignewline% + \global\boolfalse{LWR@doingapar}% + \global\boolfalse{LWR@minipagethispar}% + }% end of yes nest par tags }% end of handling pars {% not handling pars -\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}% -{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}% -{}% + \ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}% + {\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}% + {}% }% not handling pars \LWR@origpar% } @@ -3537,15 +3629,15 @@ end -- not --version \ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}% {}% {% -\ifbool{LWR@doingstartpars}% -{}% -{% -\PushPreHook{par}{\LWR@openparagraph}% -\let\par\LWR@closeparagraph - -}% an intentionally blank line -\global\setbool{LWR@doingstartpars}{true}% -\global\boolfalse{LWR@doingapar}% + \ifbool{LWR@doingstartpars}% + {}% + {% + \PushPreHook{par}{\LWR@openparagraph}% + \let\par\LWR@closeparagraph + + }% an intentionally blank line + \global\setbool{LWR@doingstartpars}{true}% + \global\boolfalse{LWR@doingapar}% }% nestspan } @@ -3554,22 +3646,21 @@ end -- not --version \ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}% {}% {% -\ifbool{LWR@doingapar}% -{% -\unskip% -\LWR@htmltagc{/\LWR@tagregularparagraph}% -\global\boolfalse{LWR@doingapar}% -\global\boolfalse{LWR@minipagethispar} - -}% an intentionally blank line -{}% -\ifbool{LWR@doingstartpars}% -{% -\ClearPreHook{par}% -}% -{}% -\global\setbool{LWR@doingstartpars}{false}% -\global\boolfalse{LWR@doingapar}% + \ifbool{LWR@doingapar}% + {% + \unskip% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \LWR@orignewline% + \global\boolfalse{LWR@doingapar}% + \global\boolfalse{LWR@minipagethispar} + + }% an intentionally blank line + {}% + \ifbool{LWR@doingstartpars}% + {\ClearPreHook{par}}% + {}% + \global\setbool{LWR@doingstartpars}{false}% + \global\boolfalse{LWR@doingapar}% }% nestspan } @@ -3654,46 +3745,65 @@ end -- not --version \newbox\LWR@footnotes \long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1} - \def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}} -\long\def\@footnotetext#1{% -\global\setbox\LWR@footnotes=\vbox{\unvbox\LWR@footnotes% -\protected@edef\@currentlabel{% -\csname p@footnote\endcsname\@thefnmark% -}% @currentlabel -\color@begingroup% -\ifbool{LWR@doingstartpars}{}{\LWR@htmltagc{\LWR@tagregularparagraph}}% -\@makefntext{#1}% -\ifbool{LWR@doingstartpars}{\par}{\LWR@htmltagc{/\LWR@tagregularparagraph}}% -\color@endgroup% +\long\def\LWR@footnotetext#1{% +\global\setbox\LWR@footnotes=\vbox{% + \unvbox\LWR@footnotes% + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark% + }% @currentlabel + \color@begingroup% + \renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}% + \ifthenelse{% + \boolean{LWR@doingstartpars} \AND% + \cnttest{\value{LWR@lateximagedepth}}{=}{0}% + }% + {}% + {\LWR@htmltagc{\LWR@tagregularparagraph}}% + \@makefntext{#1}% + \ifthenelse{% + \boolean{LWR@doingstartpars} \AND% + \cnttest{\value{LWR@lateximagedepth}}{=}{0}% + }% + {\par}% + {% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \LWR@orignewline% + }% + \color@endgroup% }% vbox }% +\let\@footnotetext\LWR@footnotetext \long\def\@mpfootnotetext#1{% \global\setbox\@mpfootins\vbox{% -\unvbox\@mpfootins -\reset@font\footnotesize -\hsize\columnwidth -\@parboxrestore -\protected@edef\@currentlabel -{\csname p@mpfootnote\endcsname\@thefnmark}% -\color@begingroup -\@makefntext{% -\ignorespaces#1% -}% -\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% -{}% -{\LWR@htmltagc{/\LWR@tagregularparagraph}}% -\color@endgroup}% + \unvbox\@mpfootins + \reset@font\footnotesize + \hsize\columnwidth + \@parboxrestore + \protected@edef\@currentlabel + {\csname p@mpfootnote\endcsname\@thefnmark}% + \color@begingroup + \@makefntext{% + \ignorespaces#1% + }% + \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% + {}% + {% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \LWR@orignewline% + }% + \color@endgroup% +}% vbox } \newcommand*{\LWR@printpendingfootnotes}{% \ifvoid\LWR@footnotes\else -\LWR@forcenewpage -\begin{BlockClass}{footnotes} -\LWR@origmedskip -\unvbox\LWR@footnotes -\setbox\LWR@footnotes=\vbox{} -\end{BlockClass} + \LWR@forcenewpage + \begin{BlockClass}{footnotes} + \LWR@origmedskip + \unvbox\LWR@footnotes + \setbox\LWR@footnotes=\vbox{} + \end{BlockClass} \fi } \newcommand*{\LWR@epubprintpendingfootnotes}{% @@ -3804,11 +3914,11 @@ end -- not --version \ifbool{FormatEPUB} {} { -\LWR@htmlelement{footer} + \LWR@htmlelement{footer} -\LWR@pagebottom + \LWR@pagebottom -\LWR@htmlelementend{footer} + \LWR@htmlelementend{footer} } \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} {} @@ -3841,11 +3951,11 @@ end -- not --version \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} {} { -\LWR@htmlelement{header} + \LWR@htmlelement{header} -\LWR@pagetop + \LWR@pagetop -\LWR@htmlelementend{header} + \LWR@htmlelementend{header} } \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} @@ -3880,7 +3990,7 @@ end -- not --version \boolfalse{LWR@mainmatter} } \newcommand*{\LWR@sectionnumber}[1]{% -\InlineClass{sectionnumber}{#1} % +\InlineClass{sectionnumber}{#1}% } \newcommand*{\LWR@createautosec}[1]{% @@ -3901,94 +4011,97 @@ end -- not --version \global\boolfalse{LWR@minipagethispar}% \LWR@traceinfo{LWR@section: testing whether to start a new HTML file}% \IfBooleanTF{#1}{% starred -\LWR@orignewpage% + \LWR@orignewpage% }{% not starred -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% -\AND% -\(% -\NOT\boolean{CombineHigherDepths}\OR% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}% -\)% -}% -{% new file -\LWR@traceinfo{LWR@section: new HTML file}% -\IfNoValueTF{#2}% -{\LWR@newhtmlfile{#3}}% -{\LWR@newhtmlfile{#2}}% -}% new file -{% not new file -\LWR@orignewpage% - -}% not new file + \ifthenelse{% + \cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}% + \AND% + \(% + \NOT\boolean{CombineHigherDepths}\OR% + \cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}% + \)% + }% + {% new file + \LWR@traceinfo{LWR@section: new HTML file}% + \IfNoValueTF{#2}% + {\LWR@newhtmlfile{#3}}% + {\LWR@newhtmlfile{#2}}% + }% new file + {% not new file + \LWR@orignewpage% + + }% not new file }% not starred \LWR@traceinfo{LWR@section: about to LWR@setlatestname}% \IfValueTF{#2}{\LWR@setlatestname{#2}}{\LWR@setlatestname{#3}}% \ifbool{HTMLDebugComments}{% -\LWR@htmlcomment{Opening #4 ``#3''{}} -}{} + \LWR@htmlcomment{Opening #4 ``#3''{}}% +}{}% \ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% + \cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% }% -{\LWR@startpars} -{} +{\LWR@startpars}% +{}% \LWR@createautosec{\csuse{LWR@tag#4}}% \IfBooleanTF{#1}% {}% starred {% not starred -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% -}% -{% if secnumdepth -\LWR@traceinfo{LWR@section: about to test main matter}% -\ifbool{LWR@mainmatter}% -{% -\LWR@traceinfo{LWR@section: yes mainmatter}% -\refstepcounter{#4}% -\LWR@traceinfo{LWR@section: about to addcontentsline}% -\addcontentsline{toc}{#4}% -{\protect\LWR@sectionnumber{\csuse{the#4}}% -\IfValueTF{#2}{#2}{#3}}% -\LWR@traceinfo{LWR@section: finished addcontentsline}% -}% end of if main matter -{% not main matter -\LWR@traceinfo{LWR@section: no main matter}% -\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}% -}% end of not main matter -}% end of secnumdepth -{% -\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}% -}% -\ifbool{LWR@mainmatter}% -{% -\ifthenelse{% -\(\cnttest{\csuse{LWR@depth#4}}{<=}% -{\value{secnumdepth}}\) \AND -\(\cnttest{\csuse{LWR@depth#4}}{<=}{\LWR@depthpart}\) -}% -{\csuse{#4name}~{}}% -{}% -\LWR@traceinfo{LWR@section: about to print section number}% -\ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% -}% -{\protect\LWR@sectionnumber{\csuse{the#4}}}% -{}% -\LWR@traceinfo{LWR@section: finished print section number}% -}{}% + \ifthenelse{% + \cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% + }% + {% if secnumdepth + \LWR@traceinfo{LWR@section: about to test main matter}% + \ifbool{LWR@mainmatter}% + {% + \LWR@traceinfo{LWR@section: yes mainmatter}% + \refstepcounter{#4}% + \LWR@traceinfo{LWR@section: about to addcontentsline}% + \addcontentsline{toc}{#4}% + {\protect\LWR@sectionnumber{\csuse{the#4}}% + \IfValueTF{#2}{ #2}{ #3}}% + \LWR@traceinfo{LWR@section: finished addcontentsline}% + }% end of if main matter + {% not main matter + \LWR@traceinfo{LWR@section: no main matter}% + \addcontentsline{toc}{#4}{\IfValueTF{#2}{ #2}{ #3}}% + }% end of not main matter + }% end of secnumdepth + {% + \addcontentsline{toc}{#4}{\IfValueTF{#2}{ #2}{ #3}}% + }% + \ifbool{LWR@mainmatter}% + {% + \ifthenelse{% + \(\cnttest{\csuse{LWR@depth#4}}{<=}% + {\value{secnumdepth}}\) \AND% + \(\cnttest{\csuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)% + }% + {\csuse{#4name}~{}}% + {}% + \LWR@traceinfo{LWR@section: about to print section number}% + \ifthenelse{% + \cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}% + }% + {\protect\LWR@sectionnumber{\csuse{the#4}}~}% + {}% + \LWR@traceinfo{LWR@section: finished print section number}% + }{}% }% end of not starred -#3 +#3% \LWR@htmltag{\csuse{LWR@tag#4end}}% \label{autopage-\thepage}% \ifthenelse{% -\cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}}% + \cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}% +}% {\LWR@startpars}% {}% -\IfBooleanTF{#1}{}{% not starred -\setcounter{LWR@prevFileDepth}{\csuse{LWR@depth#4}}% +\IfBooleanTF{#1}% +{}% +{% not starred + \setcounter{LWR@prevFileDepth}{\csuse{LWR@depth#4}}% }% not starred \LWR@traceinfo{LWR@section: done}% } @@ -4122,10 +4235,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@orignewline \ifbool{mathjax}% {% -\boolfalse{LWR@verbtags} -\verbatiminput{lwarp_mathjax.txt}% -\booltrue{LWR@verbtags} -\LWR@stoppars + \boolfalse{LWR@verbtags} + \verbatiminput{lwarp_mathjax.txt}% + \booltrue{LWR@verbtags} + \LWR@stoppars }% end of mathjax {}% \LWR@htmltag{/head}\LWR@orignewline @@ -4144,8 +4257,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {% \LWR@traceinfo{LWR@lwarpStart} \ifbool{FormatWordProcessor}{% -\setcounter{FileDepth}{-5}% -\boolfalse{HTMLDebugComments}% + \setcounter{FileDepth}{-5}% + \boolfalse{HTMLDebugComments}% }{} \edef\LWR@strresult{\HomeHTMLFilename} \edef\HomeHTMLFilename{\detokenize\expandafter{\LWR@strresult}} @@ -4218,8 +4331,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@requesttoc}[2]{% \ifbool{#1} { -\expandafter\newwrite\csuse{tf@#2} -\immediate\openout \csuse{tf@#2} \jobname.#2\relax + \expandafter\newwrite\csuse{tf@#2} + \immediate\openout \csuse{tf@#2} \jobname.#2\relax }{} } @@ -4239,7 +4352,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}} {} { -\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} + \ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{} } \LWR@stoppars% final stop of all paragraphs \LWR@htmltag{/body}\LWR@orignewline @@ -4376,9 +4489,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\equal{\thepublished}{}} {} { -\begin{BlockClass}{published} -\@published -\end{BlockClass} + \begin{BlockClass}{published} + \@published + \end{BlockClass} } } @@ -4403,9 +4516,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\equal{\thesubtitle}{}} {} { -\begin{BlockClass}{subtitle} -\@subtitle -\end{BlockClass} + \begin{BlockClass}{subtitle} + \@subtitle + \end{BlockClass} } } @@ -4450,12 +4563,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \vspace*{\droptitle} \maketitlehooka \ifcsempty{@published} -{} -{{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa} + {} + {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa} {\@bspretitle \@title \@bsposttitle} \ifcsempty{@subtitle} -{} -{\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}} + {} + {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}} \maketitlehookb {\@bspreauthor \@author \@bspostauthor} \maketitlehookc @@ -4499,12 +4612,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \vspace*{\droptitle} \maketitlehooka \ifcsempty{@published} -{} -{{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa} + {} + {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa} {\@bspretitle \@title \@bsposttitle} \ifcsempty{@subtitle} -{} -{\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}} + {} + {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}} \maketitlehookb {\@bspreauthor \@author \@bspostauthor} \maketitlehookc @@ -4573,19 +4686,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% } \DeclareDocumentCommand{\@maketitle}{}{% -\maketitlehooka -\ifcsempty{@published} -{} -{{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa} -{\@bspretitle \@title \@bsposttitle} -\ifcsempty{@subtitle} -{} -{\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}} -\maketitlehookb -{\@bspreauthor \@author \@bspostauthor} -\maketitlehookc -{\@bspredate \@date \@bspostdate} -\maketitlehookd + \maketitlehooka + \ifcsempty{@published} + {} + {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa} + {\@bspretitle \@title \@bsposttitle} + \ifcsempty{@subtitle} + {} + {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}} + \maketitlehookb + {\@bspreauthor \@author \@bspostauthor} + \maketitlehookc + {\@bspredate \@date \@bspostdate} + \maketitlehookd } \providecommand{\maketitlehookaa}{} @@ -4683,12 +4796,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \setlength{\parskip}{0ex}% \LWR@stoppars% \ifbool{LWR@verbtags}{% -\LWR@htmltag{pre class="#2" -\ifthenelse{\equal{#1}{}}{}{style="#1"}% + \LWR@htmltag{pre class="#2" + \ifthenelse{\equal{#1}{}}{}{style="#1"}% }% pre }{}% \begingroup% \LWR@origttfamily% +\LWR@FBcancel% \LetLtxMacro{\hspace}{\LWR@orighspace}% } @@ -4872,20 +4986,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \global\booltrue{LWR@intabularmetadata}% \ifbool{LWR@exitingtabular}{}% {% not exiting tabular -\ifbool{LWR@skippingmrowcell}{}% -{% not skippingmrowcell -\unskip% -\LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}% -\ifbool{LWR@tableparcell}{\LWR@stoppars}{}% -\global\boolfalse{LWR@tableparcell}% -\leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline% -\ifbool{LWR@skipatbang}% -{\boolfalse{LWR@skipatbang}}% -{% -\LWR@printatbang{at}{\theLWR@tablecolspos}% -\LWR@printatbang{bang}{\theLWR@tablecolspos}% -}% not skipping at or bang -}% not skipping mrowcell + \ifbool{LWR@skippingmrowcell}{}% + {% not skippingmrowcell + \unskip% + \LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}% + \ifbool{LWR@tableparcell}{\LWR@stoppars}{}% + \global\boolfalse{LWR@tableparcell}% + \leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline% + \ifbool{LWR@skipatbang}% + {\boolfalse{LWR@skipatbang}}% + {% + \LWR@printatbang{at}{\theLWR@tablecolspos}% + \LWR@printatbang{bang}{\theLWR@tablecolspos}% + }% not skipping at or bang + }% not skipping mrowcell }% not exiting tabular \global\boolfalse{LWR@skippingmrowcell}% } @@ -4911,10 +5025,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{LWR@tabularampersand}% \ifthenelse{\cnttest{\value{LWR@tabulardepth}}{>}{0}}% {% -\unskip% -\LWR@closetabledatacell% -\addtocounter{LWR@tablecolspos}{1}% -\LWR@getmynexttoken% + \unskip% + \LWR@closetabledatacell% + \addtocounter{LWR@tablecolspos}{1}% + \LWR@getmynexttoken% }% {\LWR@origampmacro}% } @@ -4966,16 +5080,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{have now read the next token}% \ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0} {% left edge of the table: -\LWR@traceinfo{at the left edge}% -\LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@colparameter}% -\LWR@traceinfo{at the left edge: % - \LWR@getexparray{LWR@colatspec}{leftedge}}% + \LWR@traceinfo{at the left edge}% + \LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@colparameter}% + \LWR@traceinfo{at the left edge: % + \LWR@getexparray{LWR@colatspec}{leftedge}}% }% {% not at the left edge: -\LWR@traceinfo{not at the left edge}% -\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% -\LWR@traceinfo{at \theLWR@tabletotalcols: % - \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols}}% + \LWR@traceinfo{not at the left edge}% + \LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% + \LWR@traceinfo{at \theLWR@tabletotalcols: % + \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols}}% }% \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% @@ -4990,13 +5104,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{have now read the next token}% \ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0} {% left edge of the table: -\LWR@traceinfo{at the left edge}% -\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}% + \LWR@traceinfo{at the left edge}% + \LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}% }% {% not at the left edge: -\LWR@traceinfo{not at the left edge}% -\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% -\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colparameter!}% + \LWR@traceinfo{not at the left edge}% + \LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% + \LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colparameter!}% }% \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% @@ -5101,8 +5215,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \IfStrEq{\LWR@strresult}{M}{\LWR@parsepcolumn{M}}{}% \IfStrEq{\LWR@strresult}{B}{\LWR@parsepcolumn{B}}{}% \ifbool{LWR@validtablecol}{}{% -\LWR@traceinfo{invalid column type: \LWR@strresult}% -\LWR@parsenormalcolumn{l}% + \LWR@traceinfo{invalid column type: \LWR@strresult}% + \LWR@parsenormalcolumn{l}% }% \addtocounter{LWR@tablecolspos}{1}% }% @@ -5114,15 +5228,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifbool{LWR@startedrow}% {}% started the row {% not started the row -\global\booltrue{LWR@startedrow}% -\global\booltrue{LWR@intabularmetadata}% -\ifbool{LWR@doinghline}% -{\LWR@htmltag{tr class="hline"{}}\LWR@orignewline}% -{% not doing hline -\ifbool{LWR@doingtbrule}% -{\LWR@htmltag{tr class="tbrule"{}}\LWR@orignewline}% -{\LWR@htmltag{tr}\LWR@orignewline}% -}% end of not doing hline + \global\booltrue{LWR@startedrow}% + \global\booltrue{LWR@intabularmetadata}% + \ifbool{LWR@doinghline}% + {\LWR@htmltag{tr class="hline"{}}\LWR@orignewline}% + {% not doing hline + \ifbool{LWR@doingtbrule}% + {\LWR@htmltag{tr class="tbrule"{}}\LWR@orignewline}% + {\LWR@htmltag{tr}\LWR@orignewline}% + }% end of not doing hline }% end of not started the row } @@ -5133,11 +5247,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifdefempty{\LWR@atbangspec}% {}% {% -\LWR@htmltag{td class="td#1% -\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% -"}% -\LWR@atbangspec% -\LWR@htmltag{/td}\LWR@orignewline% + \LWR@htmltag{td class="td#1% + \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% + "}% + \LWR@atbangspec% + \LWR@htmltag{/td}\LWR@orignewline% }% }% @@ -5145,37 +5259,40 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcommand*{\LWR@tabledatasinglecolumntag}% {% \LWR@maybenewtablerow% -\ifbool{LWR@intabularmetadata}{% -\ifbool{LWR@exitingtabular}{}% -{% not exiting tabular -\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}% +\ifbool{LWR@intabularmetadata}% {% -\LWR@printatbang{at}{leftedge}% -\LWR@printatbang{bang}{leftedge}% -}% left edge -{}% not left edge -\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]% -\LWR@htmltag{td class="td% -\LWR@strresult% -\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% -"{}}% -\ifthenelse{% -\equal{\LWR@strresult}{p}\OR% -\equal{\LWR@strresult}{m}\OR% -\equal{\LWR@strresult}{b}\OR% -\equal{\LWR@strresult}{P}\OR% -\equal{\LWR@strresult}{M}\OR% -\equal{\LWR@strresult}{B}\OR% -\equal{\LWR@strresult}{X}% -}% -{% allow pars -\LWR@startpars% -\global\booltrue{LWR@tableparcell}% -}% allow pars -{}% no pars -\LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}% -\global\boolfalse{LWR@intabularmetadata}% -}% not exiting tabular + \ifbool{LWR@exitingtabular}{}% + {% not exiting tabular + \ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}% + {% + \LWR@printatbang{at}{leftedge}% + \LWR@printatbang{bang}{leftedge}% + }% left edge + {}% not left edge + \StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]% + \LWR@htmltag{td class="td% + \LWR@strresult% + \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}% + {rule}% + {}% + "{}}% + \ifthenelse{% + \equal{\LWR@strresult}{p}\OR% + \equal{\LWR@strresult}{m}\OR% + \equal{\LWR@strresult}{b}\OR% + \equal{\LWR@strresult}{P}\OR% + \equal{\LWR@strresult}{M}\OR% + \equal{\LWR@strresult}{B}\OR% + \equal{\LWR@strresult}{X}% + }% + {% allow pars + \LWR@startpars% + \global\booltrue{LWR@tableparcell}% + }% allow pars + {}% no pars + \LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}% + \global\boolfalse{LWR@intabularmetadata}% + }% not exiting tabular }{}% in tabular metadata }% @@ -5313,58 +5430,58 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \NewDocumentCommand{\LWR@longtabledatacaptiontag}{s o +m} {% \IfValueTF{#2}{% optional given? -\ifthenelse{\equal{#2}{}}% optional empty? -{\LWR@setlatestname{#3}}% empty -{\LWR@setlatestname{#2}}% given and non-empty + \ifthenelse{\equal{#2}{}}% optional empty? + {\LWR@setlatestname{#3}}% empty + {\LWR@setlatestname{#2}}% given and non-empty }% optional given {\LWR@setlatestname{#3}}% no optional \LWR@tabularhtmlcolumns{1}{\theLWR@tabletotalcols} \LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{P}{% \LWR@domulticolumn \IfBooleanTF{#1}% star? {% yes star -\LWR@htmlblocktag{figcaption}% -#3% -\LWR@htmlblocktag{/figcaption}% + \LWR@htmlblocktag{figcaption}% + #3% + \LWR@htmlblocktag{/figcaption}% }% {% No star: -\ifbool{LWR@starredlongtable}% -{% -\ifthenelse{\equal{#2}{}}% TOC entry -{}% -{% -\refstepcounter{\LTcaptype}% -\protected@edef\@currentlabel{% -\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% -}% -}{}% -\LWR@htmlblocktag{figcaption}% -\csuse{fnum@\LTcaptype}\CaptionSeparator#3% -\LWR@htmlblocktag{/figcaption}% -\ifthenelse{\equal{#2}{}}% TOC entry empty -{}% -{% TOC entry not empty -\IfNoValueTF{#2}% No TOC entry? -{% No TOC entry -\addcontentsline% -{\csuse{ext@\LTcaptype}}% -{\LTcaptype}% -{% -\protect\numberline% -{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% -{\ignorespaces #3\protect\relax}% -}% -}% end of No TOC entry -{% yes TOC entry -\addcontentsline% -{\csuse{ext@\LTcaptype}}% -{\LTcaptype}% -{% -\protect\numberline% -{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% -{\ignorespaces #2\protect\relax}% -}% -}% end of yes TOC entry -}% end of TOC entry not empty + \ifbool{LWR@starredlongtable}% + {% + \ifthenelse{\equal{#2}{}}% TOC entry + {}% + {% + \refstepcounter{\LTcaptype}% + \protected@edef\@currentlabel{% + \csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% + }% + }{}% + \LWR@htmlblocktag{figcaption}% + \csuse{fnum@\LTcaptype}\CaptionSeparator#3% + \LWR@htmlblocktag{/figcaption}% + \ifthenelse{\equal{#2}{}}% TOC entry empty + {}% + {% TOC entry not empty + \IfNoValueTF{#2}% No TOC entry? + {% No TOC entry + \addcontentsline% + {\csuse{ext@\LTcaptype}}% + {\LTcaptype}% + {% + \protect\numberline% + {\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% + {\ignorespaces #3\protect\relax}% + }% + }% end of No TOC entry + {% yes TOC entry + \addcontentsline% + {\csuse{ext@\LTcaptype}}% + {\LTcaptype}% + {% + \protect\numberline% + {\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}% + {\ignorespaces #2\protect\relax}% + }% + }% end of yes TOC entry + }% end of TOC entry not empty }% end of no star \booltrue{LWR@skipatbang}% }% end of \LWR@domulticolumn @@ -5393,10 +5510,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \addtocounter{LWR@tabhtmlcolindex}{1}% }% \ifthenelse{\value{LWR@tablecolspos}=1}{% -\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}% -\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% -\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}% -\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% + \edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}% + \ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% + \edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}% + \ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% }{}% } @@ -5492,6 +5609,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \global\boolfalse{LWR@startedrow}% \global\boolfalse{LWR@doinghline}% \global\boolfalse{LWR@doingtbrule}% +\LWR@FBcancel% \boolfalse{LWR@exitingtabular}% \global\booltrue{LWR@intabularmetadata}% \LWR@forcenewpage @@ -5598,21 +5716,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% {}% {% not lateximage -\ifbool{LWR@doingstartpars}% -{% pars allowed -\ifbool{LWR@doingapar} -{% par started -\LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}% -}% par started -{% par not started -\LWR@stoppars% -\LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}% -\LWR@startpars% -}% par not started -}% pars allowed -{% pars not allowed -\LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}% -}% pars not allowed + \ifbool{LWR@doingstartpars}% + {% pars allowed + \ifbool{LWR@doingapar} + {% par started + \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}% + }% par started + {% par not started + \LWR@stoppars% + \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}% + \LWR@startpars% + }% par not started + }% pars allowed + {% pars not allowed + \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}% + }% pars not allowed }% not lateximage } \NewDocumentCommand{\LWR@newlabel}{m o}{% @@ -5640,19 +5758,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@traceinfo{LWR@startref D: !#1!}% \ifthenelse{\equal{\LWR@lidref}{??}}% {% -\LWR@traceinfo{LWR@startref D0: ??}% -??}% -{% -\LWR@traceinfo{LWR@startref D1: \LWR@lidref}% -\ifthenelse{\cnttest{\LWR@lidref}{>}{0}}% -{% -\LWR@traceinfo{LWR@startref D2: \LWR@lidref}% -lateximage\LWR@lateximagenumberref{#1}% + \LWR@traceinfo{LWR@startref D0: ??}% + ??% }% {% -\LWR@traceinfo{LWR@startref D3}% -#1% -}% + \LWR@traceinfo{LWR@startref D1: \LWR@lidref}% + \ifthenelse{\cnttest{\LWR@lidref}{>}{0}}% + {% + \LWR@traceinfo{LWR@startref D2: \LWR@lidref}% + lateximage\LWR@lateximagenumberref{#1}% + }% + {% + \LWR@traceinfo{LWR@startref D3}% + #1% + }% }% \LWR@traceinfo{LWR@startref E}% "{}}% @@ -5868,12 +5987,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \renewcommand*{\addcontentsline}[3]{% \ifthenelse{\equal{#1}{toc}}{}{% -\ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{} -\addtocontents{\@nameuse{ext@#2}}{% -\protect\LWRsetnextfloat% -{\arabic{LWR@latestautopage}}% -{\arabic{LWR@thisfloat}}% -}% addtocontents + \ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{} + \addtocontents{\@nameuse{ext@#2}}{% + \protect\LWRsetnextfloat% + {\arabic{LWR@latestautopage}}% + {\arabic{LWR@thisfloat}}% + }% addtocontents }% not toc \LWR@origaddcontentsline{#1}{#2}{#3}% } @@ -5931,22 +6050,22 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \renewcommand*{\tableofcontents}{% \ifbool{FormatWordProcessor}{}{ -\LWR@copyfile{\jobname.toc}{\jobname.sidetoc}% -\LWR@printpendingfootnotes -\LWR@origtableofcontents + \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}% + \LWR@printpendingfootnotes + \LWR@origtableofcontents } } \renewcommand*{\listoffigures}{ \ifbool{FormatWordProcessor}{}{ -\LWR@printpendingfootnotes -\LWR@origlistoffigures + \LWR@printpendingfootnotes + \LWR@origlistoffigures } } \renewcommand*{\listoftables}{ \ifbool{FormatWordProcessor}{}{ -\LWR@printpendingfootnotes -\LWR@origlistoftables + \LWR@printpendingfootnotes + \LWR@origlistoftables } } @@ -5999,10 +6118,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \NewDocumentCommand{\hypertoc}{m m +m m}{% \ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{% -\LWR@startpars% -\LWR@subhyperrefclass{% -\LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}% -\LWR@stoppars% + \LWR@startpars% + \LWR@subhyperrefclass{% + \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}% + \LWR@stoppars% } {} } @@ -6021,22 +6140,22 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% }{}% \LWR@traceinfo{hypertocfloat depth is #1 #3depth is \arabic{#3depth}}% \ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}{% -\LWR@startpars% -\LWR@subhyperrefclass{% -\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}% -\#autofloat-\arabic{LWR@nextautofloat}}% -{#4}{toc#2}% -\LWR@stoppars% + \LWR@startpars% + \LWR@subhyperrefclass{% + \LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}% + \#autofloat-\arabic{LWR@nextautofloat}}% + {#4}{toc#2}% + \LWR@stoppars% }{}% } \renewcommand{\l@part}[2]{\hypertoc{-1}{part}{#1}{#2}} \DeclareDocumentCommand{\l@chapter}{m m} -{\hypertoc{0}{chapter}{#1}{#2}} + {\hypertoc{0}{chapter}{#1}{#2}} \renewcommand{\l@section}[2]{\hypertoc{1}{section}{#1}{#2}} \renewcommand{\l@subsection}[2]{\hypertoc{2}{subsection}{#1}{#2}} \renewcommand{\l@subsubsection}[2] -{\hypertoc{3}{subsubsection}{#1}{#2}} + {\hypertoc{3}{subsubsection}{#1}{#2}} \renewcommand{\l@paragraph}[2]{\hypertoc{4}{paragraph}{#1}{#2}} \renewcommand{\l@subparagraph}[2]{\hypertoc{5}{subparagraph}{#1}{#2}} \renewcommand{\l@figure}[2]{\hypertocfloat{1}{figure}{lof}{#1}{#2}} @@ -6056,8 +6175,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \setcounter{LWR@autoglossary}{0} \@ifundefined{chapter} -{\newcommand*{\LWR@indexsection}{\section{\indexname}}} -{\newcommand*{\LWR@indexsection}{\chapter{\indexname}}} + {\newcommand*{\LWR@indexsection}{\section{\indexname}}} + {\newcommand*{\LWR@indexsection}{\chapter{\indexname}}} \let\LWR@origprintindex\printindex @@ -6160,10 +6279,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax}% {\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)} {% 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}% }% } @@ -6204,17 +6323,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% {}% not using chapters \ifthenelse{\cnttest{\value{equation}}>0} { -\setcounter{LWR@nextequation}{\value{equation}} -\addtocounter{LWR@nextequation}{1} -\InlineClass{hidden}{ -\textbackslash( -\textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\} -\textbackslash) -} -}{}% not eq > 1 + \setcounter{LWR@nextequation}{\value{equation}} + \addtocounter{LWR@nextequation}{1} + \InlineClass{hidden}{ + \textbackslash( + \textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\} + \textbackslash) + } +}{}% not eq > 0 } \newcommand*{\LWR@restoreorigformatting}{% +\LWR@traceinfo{LWR@restoreorigformatting}% \LetLtxMacro{\hspace}{\LWR@orighspace}% \LetLtxMacro\rule\LWR@origrule% \let\,\LWR@origcomma% disable HTML short unbreakable space @@ -6240,9 +6360,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \LetLtxMacro{\itshape}{\LWR@origitshape}% \LetLtxMacro{\em}{\LWR@origem}% \LetLtxMacro{\normalfont}{\LWR@orignormalfont}% -\renewcommand*{\thefootnote}{\fnsymbol{footnote}}% +\let\sp\LWR@origsp% +\let\sb\LWR@origsb% \let\textsuperscript\LWR@origtextsuperscript% \let\textsubscript\LWR@origtextsubscript% +\let\textdegree\LWR@origtextdegree% +\let\textcelsius\LWR@origtextcelsius% +\let\textohm\LWR@origtextohm% +\let\textmu\LWR@origtextmu% \let~\LWR@origtilde% \let\enskip\LWR@origenskip% \let\quad\LWR@origquad% @@ -6263,13 +6388,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \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}% +\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}% +\LWR@restoreorigxcolor% +\LWR@restoremoreorigxcolor% +\LWR@FBcancel% } \NewDocumentCommand{\LWR@hidelatexequation}{m +m}{% @@ -6304,17 +6432,17 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\LWR@hidelatexequation{equation}{\BODY} + \LWR@syncmathjax + \LWR@hidelatexequation{equation}{\BODY} } {% not mathjax -\begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}% - \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}% - \textbackslash{end\{equation\}}]% alt tag -\LWR@origequation -\BODY% contents collected by NewEnviron -\LWR@origendequation -\end{lateximage}% + \begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}% + \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}% + \textbackslash{end\{equation\}}]% alt tag + \LWR@origequation + \BODY% contents collected by NewEnviron + \LWR@origendequation + \end{lateximage}% } }[\ifbool{mathjax}{\LWR@addmathjax{equation}{\BODY}}{}] @@ -6325,15 +6453,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \newcommand*{\LWR@htmlmathlabel}[1]{% \LWR@traceinfo{LWR@htmlmathlabel #1}% \ifbool{mathjax}{% -\text{ -\ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}} -\LWR@htmlclosecomment% -\LWR@origltx@label{#1}% -\LWR@htmlopencomment% -}% text + \text{ + \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}} + \LWR@htmlclosecomment% + \LWR@origltx@label{#1}% + \LWR@htmlopencomment% + }% text }% mathjax {% -\LWR@origltx@label{#1}% + \LWR@origltx@label{#1}% }% } @@ -6362,36 +6490,38 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \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 + \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 + \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} } @@ -6406,12 +6536,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\booltrue{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \booltrue{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6419,9 +6549,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\boolfalse{LWR@amsmultline} -\LWR@addmathjax{multline}{\the\@envbody} + \LWR@endhideamsmath + \boolfalse{LWR@amsmultline} + \LWR@addmathjax{multline}{\the\@envbody} } {\endlateximage} @@ -6431,12 +6561,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\booltrue{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \booltrue{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6444,9 +6574,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\boolfalse{LWR@amsmultline} -\LWR@addmathjax{multline*}{\the\@envbody} + \LWR@endhideamsmath + \boolfalse{LWR@amsmultline} + \LWR@addmathjax{multline*}{\the\@envbody} } {\endlateximage} @@ -6457,12 +6587,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\boolfalse{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6470,8 +6600,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\LWR@addmathjax{gather}{\the\@envbody} + \LWR@endhideamsmath + \LWR@addmathjax{gather}{\the\@envbody} } {\endlateximage} @@ -6481,12 +6611,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\boolfalse{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6494,8 +6624,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\LWR@addmathjax{gather*}{\the\@envbody} + \LWR@endhideamsmath + \LWR@addmathjax{gather*}{\the\@envbody} } {\endlateximage} @@ -6505,12 +6635,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\boolfalse{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6518,8 +6648,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\LWR@addmathjax{align}{\the\@envbody} + \LWR@endhideamsmath + \LWR@addmathjax{align}{\the\@envbody} } {\endlateximage} @@ -6529,12 +6659,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\boolfalse{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6542,8 +6672,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\LWR@addmathjax{align*}{\the\@envbody} + \LWR@endhideamsmath + \LWR@addmathjax{align*}{\the\@envbody} } {\endlateximage} @@ -6553,12 +6683,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\boolfalse{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6566,8 +6696,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\LWR@addmathjax{flalign}{\the\@envbody} + \LWR@endhideamsmath + \LWR@addmathjax{flalign}{\the\@envbody} } {\endlateximage} @@ -6577,12 +6707,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@syncmathjax -\boolfalse{LWR@amsmultline} -\LWR@beginhideamsmath + \LWR@syncmathjax + \boolfalse{LWR@amsmultline} + \LWR@beginhideamsmath } { -\lateximage[LWRAMSMATHBODY] + \lateximage[LWRAMSMATHBODY] } } @@ -6590,8 +6720,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \ifbool{mathjax} { -\LWR@endhideamsmath -\LWR@addmathjax{flalign*}{\the\@envbody} + \LWR@endhideamsmath + \LWR@addmathjax{flalign*}{\the\@envbody} } {\endlateximage} @@ -6621,6 +6751,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \begin{warpHTML} \newcommand{\LWR@HTMLsanitize}[1]{% +\begingroup% +\LWR@FBcancel% \protect\StrSubstitute{\detokenize{#1}}% {\detokenize{&}}% {\detokenize{&}}[\LWR@strresult]% @@ -6637,9 +6769,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% {\#}% [\LWR@strresult]% \LWR@strresult% +\endgroup% } \newcommand{\LWR@HTMLsanitizeexpand}[1]{% +\begingroup% +\LWR@FBcancel% \protect\StrSubstitute{\detokenize\expandafter{#1}}% {\detokenize{&}}% {\detokenize{&}}% @@ -6653,84 +6788,87 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% {\detokenize{>}}% [\LWR@strresult]% \LWR@strresult% +\endgroup% } \catcode`\$=\active% -\NewDocumentEnvironment{lateximage}{O{image}}{% +\NewDocumentEnvironment{lateximage}{O{image}} +{% \LWR@traceinfo{lateximage: starting on page \arabic{page}}% \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}% {% -\addtocounter{LWR@lateximagedepth}{1}% + \addtocounter{LWR@lateximagedepth}{1}% }% {% start of outer-most lateximage -\addtocounter{LWR@lateximagenumber}{1}% -\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}% -\boolfalse{mathjax} -\LWR@ensuredoingapar% -\addtocounter{LWR@externalfilecnt}{1}% -\LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}% -\setcounterpageref{LWR@LIpage}{LWRlateximage\theLWR@lateximagenumber}% -\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}% -\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% + \addtocounter{LWR@lateximagenumber}{1}% + \LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}% + \boolfalse{mathjax} + \LWR@ensuredoingapar% + \addtocounter{LWR@externalfilecnt}{1}% + \LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}% + \setcounterpageref{LWR@LIpage}{LWRlateximage\theLWR@lateximagenumber}% + \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}% + \LWR@traceinfo{lateximage: about to temporarily restore formatting}% + \LWR@restoreorigformatting% + \def\@mpfn{footnote}% + \def\thempfn{\thefootnote}% + \let\@footnotetext\LWR@footnotetext% + \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}% -}% +{\addtocounter{LWR@lateximagedepth}{-1}}% {% end of outer-most lateximage -\LWR@origendminipage% -\LWR@orignewpage% -\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}{% -\LWR@htmlcomment{End of lateximage}% -}{}% -\addtocounter{LWR@lateximagedepth}{-1}% + \LWR@origendminipage% + \LWR@orignewpage% + \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}{% + \LWR@htmlcomment{End of lateximage}% + }{}% + \addtocounter{LWR@lateximagedepth}{-1}% }% end of outer-most lateximage \LWR@traceinfo{lateximage: done}% }% @@ -6772,12 +6910,11 @@ class="lateximagesource"{}} \LWR@orignewline \begin{warpHTML} \PassOptionsToPackage{ -detect-mode=true, -per-mode=symbol, % fraction is not seen by pdftotext -text-celsius = {\HTMLentity{deg}C}, -text-degree = {\HTMLentity{deg}}, + detect-mode=true, + per-mode=symbol, % fraction is not seen by pdftotext }{siunitx} + \end{warpHTML} @@ -6808,42 +6945,42 @@ text-degree = {\HTMLentity{deg}}, \setlength{\LWR@igwidth}{#1}% \ifthenelse{\lengthtest{\LWR@igwidth > 0pt}}% {% -\uselengthunit{PT}% -\renewcommand*{\LWR@igwidthstyle}{width:\rndprintlength{\LWR@igwidth}}% -\IfEndWith{#1}{ex}% -{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes ex -{}% not ex -\IfEndWith{#1}{em}% -{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes em -{}% not em -\IfEndWith{#1}{\%}% -{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes percent -{}% not percent -\IfEndWith{#1}{px}% -{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes px -{}% not px + \uselengthunit{PT}% + \renewcommand*{\LWR@igwidthstyle}{width:\rndprintlength{\LWR@igwidth}}% + \IfEndWith{#1}{ex}% + {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes ex + {}% not ex + \IfEndWith{#1}{em}% + {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes em + {}% not em + \IfEndWith{#1}{\%}% + {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes percent + {}% not percent + \IfEndWith{#1}{px}% + {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes px + {}% not px }{}% end of length > 0pt } \define@key{igraph}{height}{% \setlength{\LWR@igheight}{#1}% \ifthenelse{\lengthtest{\LWR@igheight > 0pt}}% {% -\uselengthunit{PT}% -\renewcommand*{\LWR@igheightstyle}{% -height:\rndprintlength{\LWR@igheight} % -}% -\IfEndWith{#1}{ex}% -{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes ex -{}% not ex -\IfEndWith{#1}{em}% -{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes em -{}% not em -\IfEndWith{#1}{\%}% -{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes percent -{}% not percent -\IfEndWith{#1}{px}% -{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes px -{}% not px + \uselengthunit{PT}% + \renewcommand*{\LWR@igheightstyle}{% + height:\rndprintlength{\LWR@igheight} % + }% + \IfEndWith{#1}{ex}% + {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes ex + {}% not ex + \IfEndWith{#1}{em}% + {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes em + {}% not em + \IfEndWith{#1}{\%}% + {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes percent + {}% not percent + \IfEndWith{#1}{px}% + {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes px + {}% not px }{}% end of length > 0pt } \define@key{igraph}{origin}{% @@ -6886,20 +7023,23 @@ height:\rndprintlength{\LWR@igheight} % \newbool{LWR@infloatrow} \boolfalse{LWR@infloatrow} +\def\LWR@opacity{1} + \newcommand*{\LWR@imageextension}{} \newcommand*{\LWR@expgraphicsfilename}{} \NewDocumentCommand{\LWR@includegraphicsb}{s o o m} {% \LWR@origtilde \LWR@orignewline% -\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{% -\ifbool{LWR@infloatrow}% -{} -{% not in a minipage or a floatrow: -\setlength{\linewidth}{6in}% -\setlength{\textwidth}{6in}% -\setlength{\textheight}{9in}% -}% +\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}% +{% + \ifbool{LWR@infloatrow}% + {} + {% not in a minipage or a floatrow: + \setlength{\linewidth}{6in}% + \setlength{\textwidth}{6in}% + \setlength{\textheight}{9in}% + }% }{}% \edef\LWR@expgraphicsfilename{#4} \renewcommand*{\LWR@imageextension}{}% @@ -6948,12 +7088,12 @@ height:\rndprintlength{\LWR@igheight} % img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LWR@origtilde{} alt="\LWR@strresult" \LWR@orignewline \ifthenelse{ -\NOT\equal{\LWR@igwidthstyle}{} \OR -\NOT\equal{\LWR@igheightstyle}{} \OR -\NOT\equal{\LWR@igorigin}{} \OR -\NOT\equal{\LWR@igangle}{} \OR -\NOT\equal{\LWR@igxscale}{1} \OR -\NOT\equal{\LWR@igyscale}{1} + \NOT\equal{\LWR@igwidthstyle}{} \OR + \NOT\equal{\LWR@igheightstyle}{} \OR + \NOT\equal{\LWR@igorigin}{} \OR + \NOT\equal{\LWR@igangle}{} \OR + \NOT\equal{\LWR@igxscale}{1} \OR + \NOT\equal{\LWR@igyscale}{1} }% {\LWR@origtilde{} style="% \ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}% @@ -6973,6 +7113,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline {\LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale}% \LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale}% \LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}}{}% +\ifthenelse{\NOT\equal{\LWR@opacity}{1}}% +{opacity:\LWR@opacity;}% +{}% " \LWR@orignewline}{}% \LWR@origtilde{} class="\LWR@igclass" \LWR@orignewline% }% end of image tags @@ -7067,6 +7210,116 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \end{warpHTML} +\begin{warpall} + +\newcommand*{\LWR@restoreorigxcolor}{} +\newcommand*{\LWR@restoremoreorigxcolor}{} + +\end{warpall} + +\begin{warpall} +\AtBeginDocument{ +\@ifpackageloaded{xcolor}{ +\LWR@traceinfo{patching xcolor} +\LetLtxMacro\colorboxBlock\colorbox +\warpprintonly{ +\LetLtxMacro\LWRprint@colorboxBlock\colorbox +\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox +\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox +} + +\newsavebox{\LWR@colorminipagebox} + +\DeclareDocumentCommand{\LWRprint@fcolorbox}{o m o m +m}{% +\LWR@traceinfo{LWRprint@fcolorbox #2 #4}% +\begin{lrbox}{\LWR@colorminipagebox}% +#5% +\end{lrbox}% +\ifthenelse{\equal{#4}{none}}% +{% #4 none + \LWR@traceinfo{background is none}% + {% scope the \colorlet + \colorlet{LWR@currentcolor}{.}% + \color{#2}% + \fbox{% + \color{LWR@currentcolor}% + \usebox{\LWR@colorminipagebox}% + }% fbox + }% colorlet +}% #4 none +{% #4 not none +\LWR@traceinfo{background not none}% +\IfValueTF{#1}% +{% + \IfValueTF{#3}% + {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% +}% +{% no value #1 + \IfValueTF{#3}% + {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% +}% no value #1 +}% #4 not none +\LWR@traceinfo{LWRprint@fcolorbox done}% +} +\LetLtxMacro\LWRprint@fcolorboxBlock\LWRprint@fcolorbox + +\NewDocumentEnvironment{LWRprint@fcolorminipage}{o m o m O{c} O{} o m} +{% +\LWR@traceinfo{*** fcolorminipage: #2 #4 #8}% +\begin{lrbox}{\LWR@colorminipagebox}% +\IfValueTF{#7}% +{\begin{minipage}[#5][#6][#7]{#8}}% +{\begin{minipage}[#5][#6][#5]{#8}}% +}% +{% +\end{minipage}% +\end{lrbox}% +\LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}% +\ifthenelse{\equal{#4}{none}}% +{% #4 none + {% scope the \colorlet + \colorlet{LWR@currentcolor}{.}% + \color{#2}% + \fbox{% + \color{LWR@currentcolor}% + \usebox{\LWR@colorminipagebox}% + }% fbox + }% colorlet +}% #4 none +{% #4 not none + \IfValueTF{#1}% + {% + \IfValueTF{#3}% + {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% + }% + {% no value #1 + \IfValueTF{#3}% + {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% + }% no value #1 +}% #4 not none +\LWR@traceinfo{*** finished end fcolorminipage}% +} + +\renewcommand*{\LWR@restoremoreorigxcolor}{% +\LWR@traceinfo{LWR@restoremoreorigxcolorformatting}% +\LetLtxMacro\colorboxBlock\LWRprint@colorboxBlock% +\LetLtxMacro\fcolorbox\LWRprint@fcolorbox% +\LetLtxMacro\fcolorboxBlock\LWRprint@fcolorboxBlock% +\LetLtxMacro\fcolorminipage\LWRprint@fcolorminipage% +\LetLtxMacro\endfcolorminipage\endLWRprint@fcolorminipage% +} +\warpprintonly{\LWR@restoremoreorigxcolor} + +\LWR@traceinfo{xcolor patches done} +}{}% xcolor +}% AtBeginDocument +\end{warpall} + + \begin{warpHTML} @@ -7130,10 +7383,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \ifvoid\@mpfootins\else \vskip\skip\@mpfootins \normalcolor -\LWR@htmldivclass{mpfootnotes} -\LWR@origmedskip + \LWR@htmldivclass{mpfootnotes} + \LWR@origmedskip \unvbox\@mpfootins -\LWR@htmldivclassend{mpfootnotes} + \LWR@htmldivclassend{mpfootnotes} \fi \@minipagefalse \color@endgroup @@ -7168,10 +7421,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \uselengthunit{in}% \setlength{\LWR@minipagewidth}{#4}% \ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{% -\addtolength{\LWR@minipagewidth}{3em}% room for frames -\setlength{\linewidth}{6in}% -\setlength{\textwidth}{6in}% -\setlength{\textheight}{9in}% + \addtolength{\LWR@minipagewidth}{3em}% room for frames + \setlength{\linewidth}{6in}% + \setlength{\textwidth}{6in}% + \setlength{\textheight}{9in}% }{}% \LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}} \addtocounter{LWR@minipagedepth}{1}% @@ -7181,21 +7434,21 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LWR@traceinfo{minipage: creating div class}% \LWR@orignewpage% \LWR@htmltag{div class="minipage" style="% -\ifthenelse{\equal{#1}{t}}{vertical-align: bottom ; }{}% -\ifthenelse{\equal{#1}{c}}{vertical-align: middle ; }{}% -\ifthenelse{\equal{#1}{b}}{vertical-align: top ; }{}% -\ifthenelse{\equal{#3}{t}}{justify-content: flex-start ; }{}% -\ifthenelse{\equal{#3}{c}}{justify-content: center ; }{}% -\ifthenelse{\equal{#3}{b}}{justify-content: flex-end ; }{}% -\ifthenelse{\equal{#3}{s}}{justify-content: space-between ; }{}% +\ifthenelse{\equal{#1}{t}}{vertical-align:bottom ; }{}% +\ifthenelse{\equal{#1}{c}}{vertical-align:middle ; }{}% +\ifthenelse{\equal{#1}{b}}{vertical-align:top ; }{}% +\ifthenelse{\equal{#3}{t}}{justify-content:flex-start ; }{}% +\ifthenelse{\equal{#3}{c}}{justify-content:center ; }{}% +\ifthenelse{\equal{#3}{b}}{justify-content:flex-end ; }{}% +\ifthenelse{\equal{#3}{s}}{justify-content:space-between ; }{}% \LWR@traceinfo{minipage: about to print the width of \rndprintlength{\LWR@minipagewidth}}% \uselengthunit{PT}% \ifbool{LWR@minipagefullwidth}% {\boolfalse{LWR@minipagefullwidth}}% {% -\ifthenelse{\lengthtest{#4}=\linewidth}% -{}% -{width:\rndprintlength{\LWR@minipagewidth} ; }% + \ifthenelse{\lengthtest{#4}=\linewidth}% + {}% + {width:\rndprintlength{\LWR@minipagewidth} ; }% }% \LWR@traceinfo{minipage: about to print the height}% \IfValueTF{#2}{height:\rndprintlength{\LWR@minipageheight} ; }{}% @@ -7229,35 +7482,84 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LetLtxMacro\LWR@origmakebox\makebox \RenewDocumentCommand{\makebox}{d() o o m}{% -\mbox{#4} +\IfValueTF{#2}% +{% + {% scope + \def\LWR@align{center}% + \ifstrequal{#3}{l}{\def\LWR@align{left}}{}% + \ifstrequal{#3}{r}{\def\LWR@align{right}}{}% + \ifstrequal{#3}{s}{\def\LWR@align{justify}}{}% + \setlength{\LWR@tempwidth}{#2}% + \uselengthunit{PT}% + \InlineClass[% + display:inline-block ; % + text-align:\LWR@align\ ; % + width:\rndprintlength{\LWR@tempwidth}% + ]% + {makebox}% + {\mbox{#4}}% + }% scope +}% +{\mbox{#4}}% } \LetLtxMacro\LWR@origframebox\framebox \RenewDocumentCommand{\framebox}{o o m}{% -\fbox{#3} +\fbox{\makebox[#1][#2]{#3}}% } -\let\LWR@origfbox\fbox +\newlength{\LWR@atleastonept} -\renewcommand{\fbox}[1]{% -\LWR@htmltagc{span class="framebox"}% -\begin{LWR@nestspan}% -#1 -\LWR@htmltagc{/span}% -\end{LWR@nestspan}% +\newcommand*{\LWR@forceminwidth}[1]{% +\setlength{\LWR@atleastonept}{#1}% +\ifthenelse{% + \lengthtest{\LWR@atleastonept>0pt}\AND% + \lengthtest{\LWR@atleastonept<1pt}% +}% +{\setlength{\LWR@atleastonept}{1pt}}% +{}% +} + +\newcommand*{\LWR@blackborderpadding}{% +\uselengthunit{PT}% +border:\rndprintlength{\LWR@atleastonept} solid black ; % +padding:\rndprintlength{\fboxsep}% +} +\let\LWRprint@fbox\fbox +\newcommand{\LWRhtml@fbox}[1]{% +\LWR@traceinfo{HTML fbox} +\LWR@forceminwidth{\fboxrule}% +\InlineClass[% +\LWR@blackborderpadding% +]{fbox}{#1} } +\AtBeginDocument{\let\fbox\LWRhtml@fbox} \newcommand{\fboxBlock}[1]{% -\begin{BlockClass}{framed} +\LWR@forceminwidth{\fboxrule}% +\begin{BlockClass}[% +\LWR@blackborderpadding% +]{fboxBlock} #1 \end{BlockClass} } \NewDocumentEnvironment{fminipage}{O{t} o O{t} m} {% -\setlength{\LWR@tempwidth}{#4} -\begin{BlockClass}[width:\rndprintlength{\LWR@tempwidth};]{framed}% +\LWR@traceinfo{fminipage #1 #2 #3 #4}% +\LWR@forceminwidth{\fboxrule}% +\setlength{\LWR@tempwidth}{#4}% +\IfValueTF{#2}{\setlength{\LWR@tempheight}{#2}}{}% +\begin{BlockClass}[% +\LWR@blackborderpadding ; % +\uselengthunit{PT}% +\IfValueTF{#2}{height:\rndprintlength{\LWR@tempheight} ; }{}% +width:\rndprintlength{\LWR@tempwidth}% +]{fminipage}% +} +{% +\end{BlockClass}% +\LWR@traceinfo{fminipage done}% } -{\end{BlockClass}} \LetLtxMacro{\LWR@origraisebox}{\raisebox} \RenewDocumentCommand{\raisebox}{m o o m}{% @@ -7267,18 +7569,20 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \end{warpHTML} \begin{warpall} - \newsavebox{\LWR@fminipagebox} -\NewDocumentEnvironment{LWR@fminipageprint}{O{t} o O{t} m} +\NewDocumentEnvironment{LWRprint@fminipage}{O{t} o O{t} m} {% +\IfValueTF{#3}% +{\def\LWR@thisalign{#3}} +{\def\LWR@thisalign{#1}}% \IfValueTF{#2}% -{\minipage[#1][#2][#3]{#4}}% -{\minipage[#3]{#4}}% +{\minipage[#1][#2+2\fboxsep+2\fboxrule][\LWR@thisalign]{#4+2\fboxsep+2\fboxrule}}% +{\minipage[#1]{#4+2\fboxsep+2\fboxrule}}% \begin{lrbox}{\LWR@fminipagebox}% \IfValueTF{#2}% -{\minipage[#1][#2][#3]{\linewidth-2\fboxsep-2\fboxrule}}% -{\minipage[#3]{\linewidth-2\fboxsep-2\fboxrule}}% +{\minipage[#1][#2][\LWR@thisalign]{#4}}% +{\minipage[#1]{#4}}% } {% \endminipage% @@ -7290,11 +7594,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \end{warpall} \begin{warpprint} - \let\fboxBlock\fbox -\LetLtxMacro{\fminipage}{\LWR@fminipageprint} -\LetLtxMacro{\endfminipage}{\endLWR@fminipageprint} +\LetLtxMacro{\fminipage}{\LWRprint@fminipage} +\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage} \end{warpprint} @@ -7346,26 +7649,17 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \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@nullrmfamily}{} +\DeclareRobustCommand{\LWR@nullsffamily}{} +\DeclareRobustCommand{\LWR@nullttfamily}{} +\DeclareRobustCommand{\LWR@nullbfseries}{} +\DeclareRobustCommand{\LWR@nullmdseries}{} +\DeclareRobustCommand{\LWR@nullupshape}{} +\DeclareRobustCommand{\LWR@nullslshape}{} +\DeclareRobustCommand{\LWR@nullscshape}{} +\DeclareRobustCommand{\LWR@nullitshape}{} \DeclareRobustCommand{\LWR@nullem}[1]{} +\DeclareRobustCommand{\LWR@nullnormalfont}{} \newcommand*{\LWR@nullfonts}{% \LetLtxMacro{\emph}{\LWR@nullemph}% @@ -7453,7 +7747,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\LWR@origmedskip\medskip \renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space + \renewcommand*{~}{\HTMLentity{nbsp}} + \renewcommand*{\textellipsis}{\HTMLunicode{2026}} \let\LWR@orignormalsize\normalsize \let\LWR@origsmall\small @@ -7494,17 +7790,11 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline } \newcommand*{\LWR@minipagestartpars}{% -\ifbool{LWR@minipagethispar}% -{% -\LWR@startpars% -}{}% +\ifbool{LWR@minipagethispar}{\LWR@startpars}{}% } \newcommand*{\LWR@minipagestoppars}{% -\ifbool{LWR@minipagethispar}% -{% -\LWR@stoppars% -}{}% +\ifbool{LWR@minipagethispar}{\LWR@stoppars}{}% } \renewcommand*{\quad}{% @@ -7531,20 +7821,20 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \setlength{\LWR@tempwidth}{2em}% \fi% \ifthenelse{\dimtest{\LWR@tempwidth}{=}{0pt}}{}{% -\LWR@minipagestoppars% -\ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}} -{% -\HTMLunicode{2009}% thin breakable space -}% -{% -\uselengthunit{PT}% -\LWR@htmltagc{% -span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"% -}% -\LWR@htmltagc{/span}% -}% -\LWR@minipagestartpars% -}% + \LWR@minipagestoppars% + \ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}} + {% + \HTMLunicode{2009}% thin breakable space + }% + {% + \uselengthunit{PT}% + \LWR@htmltagc{% + span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"% + }% + \LWR@htmltagc{/span}% + }% + \LWR@minipagestartpars% +}% width not 0 } \NewDocumentCommand{\LWR@nohspace}{s m}{} @@ -7564,43 +7854,47 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"% \renewcommand*{\nopagebreak}[1][]{} \RenewDocumentCommand{\enlargethispage}{s m}{} - +\newcommand*{\LWR@currenttextcolor}{black} \NewDocumentCommand{\LWR@rule}{o m m}{% \setlength{\LWR@tempwidth}{#2}% \ifthenelse{\lengthtest{\LWR@tempwidth=0pt}} {}% zero- width {% non-zero width -\ifthenelse{\lengthtest{\LWR@tempwidth>0pt}\AND% -\lengthtest{\LWR@tempwidth<1pt}}% -{\setlength{\LWR@tempwidth}{1pt}}{}% -\setlength{\LWR@tempheight}{#3}% -\ifthenelse{\lengthtest{\LWR@tempheight>0pt}\AND% -\lengthtest{\LWR@tempheight<1pt}}% -{\setlength{\LWR@tempheight}{1pt}}{}% -\LWR@minipagestoppars% -\uselengthunit{PT}% -\LWR@htmltagc{% -span -style=" % -background:\LWR@currenttextcolor; % -width:\printlength{\LWR@tempwidth}; % -height:\printlength{\LWR@tempheight}; % -\IfValueTF{#1}% -{% -\setlength{\LWR@tempraise}{0pt-#1}% -\setlength{\LWR@tempraise}{\LWR@tempraise*2}% -\LWR@orignewline% --ms-transform: translate(0pt,\printlength{\LWR@tempraise}); % -\LWR@orignewline% --webkit-transform: translate(0pt,\printlength{\LWR@tempraise}); % -\LWR@orignewline% -transform: translate(0pt,\printlength{\LWR@tempraise}); % -\LWR@orignewline% -}{}% -display:inline-block;"% -}% -\LWR@htmltagc{/span}% -\LWR@minipagestartpars% + \ifthenelse{% + \lengthtest{\LWR@tempwidth>0pt}\AND% + \lengthtest{\LWR@tempwidth<1pt}% + }% + {\setlength{\LWR@tempwidth}{1pt}}{}% + \setlength{\LWR@tempheight}{#3}% + \ifthenelse{% + \lengthtest{\LWR@tempheight>0pt}\AND% + \lengthtest{\LWR@tempheight<1pt}% + }% + {\setlength{\LWR@tempheight}{1pt}}{}% + \LWR@minipagestoppars% + \uselengthunit{PT}% + \LWR@htmltagc{% + span + style="% + background:\LWR@currenttextcolor; % + width:\printlength{\LWR@tempwidth}; % + height:\printlength{\LWR@tempheight}; % + \IfValueTF{#1}% + {% + \setlength{\LWR@tempraise}{0pt-#1}% + \setlength{\LWR@tempraise}{\LWR@tempraise*2}% + \LWR@orignewline% + -ms-transform: translate(0pt,\printlength{\LWR@tempraise}); % + \LWR@orignewline% + -webkit-transform: translate(0pt,\printlength{\LWR@tempraise}); % + \LWR@orignewline% + transform: translate(0pt,\printlength{\LWR@tempraise}); % + \LWR@orignewline% + }{}% + display:inline-block;"% + }% + \LWR@htmltagc{/span}% + \LWR@minipagestartpars% }% non-zero width } \renewcommand{\rule}{\LWR@rule} |