diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-01 22:09:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-01 22:09:57 +0000 |
commit | c64b76557cb363f0c2990ee6a72dd2f8cf231af4 (patch) | |
tree | 3f1e103ce71ec9e768c990949d6edbeceb34f963 /Master/texmf-dist/tex/latex/lwarp/lwarp.sty | |
parent | b941504fe43d8fec69f16cafaa5a0ddd8fc943d8 (diff) |
lwarp (1feb22)
git-svn-id: svn://tug.org/texlive/trunk@61842 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 | 1269 |
1 files changed, 676 insertions, 593 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index b04b62b8cba..66aaf534644 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} - [2021/10/01 v0.902 Allows LaTeX to directly produce HTML5 output.] + [2022/02/01 v0.903 Allows LaTeX to directly produce HTML5 output.] @@ -43,12 +43,13 @@ \fi \fi \RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc. +\long\def\etb@carsquare#1#2#3\@nil{#1#2} \RequirePackage{xpatch} \RequirePackage{ifplatform}% sense op-system platform \RequirePackage{letltxmacro} \newcommand*{\LWR@loadafter}[1]{% -\@ifpackageloaded{#1} +\IfPackageLoadedTF{#1} { \PackageError{lwarp} {% @@ -67,26 +68,26 @@ {\relax} } -\@ifclassloaded{memoir} +\IfClassLoadedTF{memoir} {\newcommand*{\LWR@notmemoirloadafter}[1]{}} {\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter} \LetLtxMacro\LWR@notltjloadafter\LWR@loadafter -\@ifclassloaded{ltjarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjsarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjsbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjsreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjspf}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjskiyou}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjtarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjtbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} -\@ifclassloaded{ltjtreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjsarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjsbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjsreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjspf}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjskiyou}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjtarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjtbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} +\IfClassLoadedTF{ltjtreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{} \newcommand*{\LWR@loadbefore}[1]{% -\@ifpackageloaded{#1} +\IfPackageLoadedTF{#1} {\relax} { \PackageError{lwarp} @@ -131,12 +132,12 @@ }{}% } \newcommand*{\LWR@earlyloadnever}[2]{% - \@ifpackageloaded{#1}{% + \IfPackageLoadedTF{#1}{% \LWR@loadnever{#1}{#2}% }{}% } \newcommand*{\LWR@earlyclassloadnever}[2]{% -\@ifclassloaded{#1}{% +\IfClassLoadedTF{#1}{% \PackageError{lwarp} {% Class #1 is not supported\MessageBreak @@ -177,7 +178,7 @@ \LWR@checkloadnever{libgreek}{libertinust1math, newtx} \LWR@checkloadnever{newthm}{ntheorem} \LWR@checkloadnever{pdfcprot}{microtype} -\LWR@checkloadnever{picins}{floatflt, wrapfig} +\LWR@checkloadnever{picins}{floatflt, wrapfig, wrapfig2} \LWR@checkloadnever{rplain}{fancyhdr} \LWR@checkloadnever{si}{siunitx} \LWR@checkloadnever{sistyle}{siunitx} @@ -193,7 +194,7 @@ \LWR@checkloadnever{arraycols}{} \LWR@checkloadnever{bidi}{} \LWR@checkloadnever{cals}{} -\LWR@checkloadnever{cellspace}{} +\LWR@checkloadnever{cellspace}{tabls} \LWR@checkloadnever{cgloss4e}{} \LWR@checkloadnever{collcell}{} \LWR@checkloadnever{colophon}{} @@ -264,7 +265,7 @@ } \LetLtxMacro\LWR@checkloadnever\LWR@earlyloadnever \LWR@checkloadnevers -\@ifpackageloaded{xeCJK}{}{ +\IfPackageLoadedTF{xeCJK}{}{ \LWR@checkloadnever{CJK}{ctex, xeCJK} \LWR@checkloadnever{CJKutf8}{ctex, xeCJK} } @@ -685,6 +686,7 @@ \LWR@loadafter{shadow} \LWR@loadafter{shapepar} \LWR@notmemoirloadafter{showidx} +\LWR@loadafter{showlabels} \LWR@loadafter{showkeys} \LWR@loadafter{showtags} \LWR@loadafter{shuffle} @@ -792,6 +794,7 @@ \LWR@loadafter{widows-and-orphans} \LWR@loadafter{witharrows} \LWR@loadafter{wrapfig} +\LWR@loadafter{wrapfig2} \LWR@loadafter{xbmks} \LWR@loadafter{xcolor} \LWR@loadafter{xechangebar} @@ -832,8 +835,8 @@ \newcommand*{\LWR@pdfencoding}{% \RequirePackage[T1]{fontenc} - \@ifpackageloaded{inputenc}{}{ - \@ifpackageloaded{inputenx}{}{ + \IfPackageLoadedTF{inputenc}{}{ + \IfPackageLoadedTF{inputenx}{}{ \RequirePackage[utf8]{inputenc} } } @@ -898,7 +901,7 @@ \fi \ifxetexorluatex \AtBeginDocument{ - \@ifpackageloaded{kpfonts}{ + \IfPackageLoadedTF{kpfonts}{ \PackageError{lwarp} {% When using XeLaTeX or LuaLaTeX,\MessageBreak @@ -940,13 +943,21 @@ }% {Please contact the maintainer of the Lwarp package.}% } +\providecommand*{\csNewCommandCopycs}[2]{% + \expandafter\NewCommandCopy\csname#1\expandafter\endcsname% + \csname#2\endcsname% +} +\providecommand*{\NewEnvironmentCopy}[2]{% + \csNewCommandCopycs{#1}{#2}% + \csNewCommandCopycs{end#1}{end#2}% +} \newcommand{\LWR@isolate}[1]{#1}% -\@ifpackageloaded{ctexpatch}{ +\IfPackageLoadedTF{ctexpatch}{ \renewcommand{\LWR@isolate}[1]{\null#1\null}% }{} -\@ifpackageloaded{xeCJK}{ +\IfPackageLoadedTF{xeCJK}{ \renewcommand{\LWR@isolate}[1]{\null#1\null}% }{} \newcommand*{\LWR@disablepinyin}{} @@ -1353,7 +1364,7 @@ \begin{warpHTML} \ifxetexorluatex -\@ifpackageloaded{fontspec}{}{ +\IfPackageLoadedTF{fontspec}{}{ \usepackage[no-math]{fontspec} } \defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}} @@ -1362,7 +1373,7 @@ \else -\RequirePackage {microtype} +\RequirePackage{microtype} \microtypesetup{ protrusion=false, @@ -1375,7 +1386,7 @@ \end{warpHTML} \begin{warpHTML} -\@ifpackageloaded{geometry} +\IfPackageLoadedTF{geometry} {}{ \RequirePackage[ reset, @@ -1451,9 +1462,6 @@ \RequirePackage{gettitlestring} -\@ifundefined{bxjs@everypar}{}{\let\everypar\bxjs@everypar} - -\RequirePackage{everyhook} \end{warpHTML} \begin{warpall} @@ -1464,7 +1472,7 @@ \LetLtxMacro\LWR@orig@filec@ntents\filec@ntents - \@ifpackagelater{filecontents}{2011/10/08} + \IfPackageAtLeastTF{filecontents}{2011/10/08} { \renewcommand*{\filec@ntents}[1][]{\LWR@orig@filec@ntents} } @@ -1672,7 +1680,7 @@ \PassOptionsToPackage{\CurrentOption}{#1}% }% \ProcessOptions\relax% - \@ifpackageloaded{#1}{% + \IfPackageLoadedTF{#1}{% \edef\LWR@tempone{\csuse{opt@#1.sty}}% \IfValueTF{#2}% {% @@ -1868,8 +1876,7 @@ \newcommand*{\LWR@formatted}[1]{% \LWR@formatted@checkname{#1}% \ifcsundef{LWR@print@#1}{% - \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% - \csname#1\endcsname% + \csNewCommandCopycs{LWR@print@#1}{#1}% }{}% \ifcsundef{#1}{% \expandafter\newrobustcmd\csname #1\endcsname{% @@ -1884,8 +1891,7 @@ \newcommand*{\LWR@expandableformatted}[1]{% \LWR@formatted@checkname{#1}% \ifcsundef{LWR@print@#1}{% - \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% - \csname#1\endcsname% + \csNewCommandCopycs{LWR@print@#1}{#1}% }{}% \ifcsundef{#1}{% \expandafter\newcommand\csname #1\endcsname{% @@ -1901,9 +1907,7 @@ \LWR@formatted@checkname{#1}% \LWR@formatted@checkendname{#1}% \ifcsundef{LWR@print@#1}{% - \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% - \csname#1\endcsname% - \csletcs{endLWR@print@#1}{end#1}% + \NewEnvironmentCopy{LWR@print@#1}{#1}% }{}% \DeclareDocumentEnvironment{#1}{}% {% @@ -1917,9 +1921,7 @@ \LWR@formatted@checkname{#1}% \LWR@formatted@checkendname{#1}% \ifcsundef{LWR@print@#1}{% - \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname% - \csname#1\endcsname% - \csletcs{endLWR@print@#1}{end#1}% + \NewEnvironmentCopy{LWR@print@#1}{#1}% }{}% \DeclareExpandableDocumentEnvironment{#1}{}% {% @@ -2057,7 +2059,7 @@ \LetLtxMacro\LWR@orig@textquotedbl\LWR@orig@@textquotedbl \AtEndPreamble{ -\@ifpackageloaded{libertinus-otf}{ +\IfPackageLoadedTF{libertinus-otf}{ \renewcommand{\LWR@orig@textquotedbl}{\LWR@orig@@textquotedbl\kern-.15em} \LetLtxMacro\textquotedbl\LWR@orig@textquotedbl }{} @@ -2333,24 +2335,24 @@ \def\LWR@tempprintlatexcmd{% \LWR@compilecmd{latex}{} \LWR@addcompilecmd{dvips}{} - \LWR@addcompilecmd{ps2pdf}{}.ps + \LWR@addcompilecmd{ps2pdf -dALLOWPSTRANSPARENCY}{}.ps } \def\LWR@tempHTMLlatexcmd{% \LWR@compilecmd{latex}{_html} \LWR@addcompilecmd{dvips}{_html} - \LWR@addcompilecmd{ps2pdf}{_html}.ps + \LWR@addcompilecmd{ps2pdf -dALLOWPSTRANSPARENCY}{_html}.ps } } } \fi% \ifXeTeX \fi% \ifpdf }% latexmk -\@ifclassloaded{ujarticle}{\LWR@compileuplatex}{} -\@ifclassloaded{ujbook}{\LWR@compileuplatex}{} -\@ifclassloaded{ujreport}{\LWR@compileuplatex}{} -\@ifclassloaded{utarticle}{\LWR@compileuplatex}{} -\@ifclassloaded{utbook}{\LWR@compileuplatex}{} -\@ifclassloaded{utreport}{\LWR@compileuplatex}{} +\IfClassLoadedTF{ujarticle}{\LWR@compileuplatex}{} +\IfClassLoadedTF{ujbook}{\LWR@compileuplatex}{} +\IfClassLoadedTF{ujreport}{\LWR@compileuplatex}{} +\IfClassLoadedTF{utarticle}{\LWR@compileuplatex}{} +\IfClassLoadedTF{utbook}{\LWR@compileuplatex}{} +\IfClassLoadedTF{utreport}{\LWR@compileuplatex}{} \ifdefempty{\LWR@PrintLatexCmd}{ \def\LWR@PrintLatexCmd{\LWR@tempprintlatexcmd} }{} @@ -2402,7 +2404,7 @@ \begin{filecontents*}[overwrite]{lwarp.css} /* CSS stylesheet for the LaTeX Lwarp package - Copyright 2016-2021 Brian Dunn — BD Tech Concepts LLC + Copyright 2016-2022 Brian Dunn — BD Tech Concepts LLC */ /* a fix for older browsers: */ @@ -2899,7 +2901,7 @@ div.bodywithoutsidetoc main.bodycontainer { } section.textbody div.footnotes{ - margin: 3ex 2em .5ex 2em ; + margin: 1ex 2em 2ex 2em ; border-bottom: 2px solid silver ; } @@ -2934,6 +2936,8 @@ body dir, body menu { li { margin: 0ex 0em 1ex 0em; } +li.p { display: inline ; } + html { margin: 0; padding: 0; @@ -4837,9 +4841,9 @@ MathJax = { \begin{filecontents*}[overwrite]{lwarpmk.lua} #!/usr/bin/env texlua --- Copyright 2016-2021 Brian Dunn +-- Copyright 2016-2022 Brian Dunn -printversion = "v0.902" +printversion = "v0.903" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -5220,8 +5224,15 @@ function pdftohtml () -- Convert to text: print ("lwarpmk: Converting " .. sourcename .."_html.pdf to " .. sourcename .. "_html.html") -os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout " +err = os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html") +if ( err ~= 0 ) then + print ("lwarpmk: ===") + print ("lwarpmk: Ensure that the Poppler utilities are installed." ) + print ("lwarpmk: See the Lwarp manual: `Installing additional utilities'." ) + print ("lwarpmk: ===") + os.exit(1) +end -- Split the result into individual HTML files: splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html") end @@ -5921,14 +5932,19 @@ end -- not --version \end{warpHTML} \begin{warpHTML} +\newbool{LWR@setexparray@doingparhooks} + \NewDocumentCommand{\LWR@setexparray}{m m m}{% - \let\LWR@temp@par\par% + \let\ifLWR@setexparray@doingparhooks\ifLWR@doingparhooks% + \setbool{LWR@doingparhooks}{false}% + \let\LWR@setexparray@par\par% \let\par\relax% - \edef\LWR@thisexparrayname{#1#2}% + \xdef\LWR@thisexparrayname{#1#2}% \ifstrempty{#3}% {\csdef{\LWR@thisexparrayname}{}}% {\csedef{\LWR@thisexparrayname}{#3}}% - \let\par\LWR@temp@par% + \let\ifLWR@doingparhooks\ifLWR@setexparray@doingparhooks% + \let\par\LWR@setexparray@par% } \newcommand*{\LWR@getexparray}[2]{% \@nameuse{#1#2}% @@ -6378,60 +6394,59 @@ end -- not --version } \newcommand*{\LWR@nestspanitem}{% - \if@newlist\else{\LWR@htmltagc{br /}}\fi% + \if@newlist\else{ + \LWR@htmltagc{br /}% + \LWR@orignewline% + }\fi% \LWR@origitem% } \newenvironment*{LWR@nestspan} {% -\LWR@traceinfo{LWR@nestspan starting}% -\ifnumcomp{\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}% - {\LWR@spanwarnformat{minipage or \protect\parbox}}% - {}% - \RenewDocumentEnvironment{BlockClass}{o m}% - {\LWR@spanwarnformat{multi-paragraph object}}% - {}% - \RenewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}% - {\LWR@spanwarnformat{multi-paragraph object}}% - {}% - \renewcommand{\BlockClassSingle}[2]{% - {\LWR@spanwarnformat{multi-paragraph object}}% - ##2% - }% - \renewcommand{\LWR@forcenewpage}{}% - \renewcommand{\LWR@liststart}{% - \LetLtxMacro\item\LWR@nestspanitem% - }% - \renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}% - \renewenvironment{quote}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}% - \renewenvironment{quotation}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}% -}% not in a lateximage -\LWR@traceinfo{LWR@nestspan starting: done}% + \LWR@traceinfo{LWR@nestspan starting}% + \ifnumcomp{\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}% + {\LWR@spanwarnformat{minipage or \protect\parbox}}% + {}% + \RenewDocumentEnvironment{BlockClass}{o m}% + {\LWR@spanwarnformat{multi-paragraph object}}% + {}% + \RenewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}% + {\LWR@spanwarnformat{multi-paragraph object}}% + {}% + \renewcommand{\BlockClassSingle}[2]{% + {\LWR@spanwarnformat{multi-paragraph object}}% + ##2% + }% + \renewcommand{\LWR@forcenewpage}{}% + \renewcommand{\LWR@liststart}{\LetLtxMacro\item\LWR@nestspanitem}% + \renewcommand{\LWR@listend}{\leavevmode}% + \renewenvironment{quote}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}% + \renewenvironment{quotation}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}% + }% not in a lateximage + \LWR@traceinfo{LWR@nestspan starting: done}% }% starting env {% ending env -\LWR@traceinfo{LWR@nestspan ending}% -\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% -{}% -{\addtocounter{LWR@spandepth}{-1}}% -\LWR@traceinfo{LWR@nestspan ending: done}% + \LWR@traceinfo{LWR@nestspan ending}% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {\addtocounter{LWR@spandepth}{-1}}% + \LWR@traceinfo{LWR@nestspan ending: done}% } -\AfterEndEnvironment{LWR@nestspan}{\global\let\par\LWR@closeparagraph} - \NewDocumentCommand{\LWR@htmlspan}{m +m}{% -\LWR@ensuredoingapar% -\LWR@htmltagc{#1}% -\begin{LWR@nestspan}% -#2% -\LWR@htmltagc{/#1}% -\end{LWR@nestspan}% + \LWR@ensuredoingapar% + \LWR@htmltagc{#1}% + \begin{LWR@nestspan}% + #2% + \LWR@htmltagc{/#1}% + \end{LWR@nestspan}% } \NewDocumentCommand{\LWR@htmlspanclass}{o D(){} m +m}{% @@ -6449,71 +6464,67 @@ end -- not --version \newcommand*{\LWR@htmltag}[1]{% -\LWR@htmltagc{#1}% + \LWR@htmltagc{#1}% } \newcommand*{\LWR@htmlopencomment}{% -{% -\begingroup% -\LWR@hook@processingtags% -\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% -\LWR@print@mbox{\LWR@origtextless{}!-\/-}% -\endgroup% -}% + \begingroup% + \LWR@hook@processingtags% + \ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% + \LWR@print@mbox{\LWR@origtextless{}!-\/-}% + \endgroup% } \newcommand*{\LWR@htmlclosecomment}{% -{% -\begingroup% -\LWR@hook@processingtags% -\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% -\LWR@print@mbox{-\/-\LWR@origtextgreater}% -\endgroup% -}% + \begingroup% + \LWR@hook@processingtags% + \ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi% + \LWR@print@mbox{-\/-\LWR@origtextgreater}% + \endgroup% } \newcommand{\LWR@htmlcomment}[1]{% -\ifmmode% -\else% - \LWR@htmlopencomment{}% - {% - \LWR@print@normalfont% - \LWR@origttfamily% break ligatures - #1% - }% - \LWR@htmlclosecomment{}% -\fi% + \ifmmode% + \else% + \LWR@htmlopencomment{}% + {% + \LWR@print@normalfont% + \LWR@origttfamily% break ligatures + #1% + }% + \LWR@htmlclosecomment{}% + \fi% } \newcommand{\LWR@htmlblockcomment}[1] -{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars} + {\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars} \newcommand*{\LWR@htmlblocktag}[1]{% -\LWR@stoppars% -\LWR@htmltag{#1}% -\LWR@startpars% + \LWR@stoppars% + \LWR@htmltag{#1}% + \LWR@startpars% } \NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} D(){} m}{% -\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}% -\ifblank{#2}% -{% empty style - \LWR@htmltag{% - #1% - \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% spaces - \ifblank{#4}{}{ class=\textquotedbl#4\textquotedbl}% spaces + \LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}% + \ifblank{#2}% + {% empty style + \LWR@htmltag{% + #1% + \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% spaces + \ifblank{#4}{}{ class=\textquotedbl#4\textquotedbl}% spaces + }% }% -}% -{% non-empty style - \LWR@htmltag{% - #1\LWR@indentHTML% - \ifblank{#3}{}{role=\textquotedbl#3\textquotedbl\LWR@indentHTML}% - \ifblank{#4}{}{class=\textquotedbl#4\textquotedbl\LWR@indentHTML}% - style=\textquotedbl#2\textquotedbl\LWR@orignewline% + {% non-empty style + \LWR@htmltag{% + #1\LWR@indentHTML% + \ifblank{#3}{}{role=\textquotedbl#3\textquotedbl\LWR@indentHTML}% + \ifblank{#4}{}{class=\textquotedbl#4\textquotedbl\LWR@indentHTML}% + style=\textquotedbl#2\textquotedbl\LWR@orignewline% + }% }% -}% -\LWR@traceinfo{LWR@subhtmlelementclass done}% + \LWR@traceinfo{LWR@subhtmlelementclass done}% } \NewDocumentCommand{\LWR@htmlelementclass}{m o D(){} m}{% @@ -6547,35 +6558,33 @@ end -- not --version \NewDocumentCommand{\LWR@htmlelementclassline}{m o m +m}{% -\LWR@stoppars -\LWR@forceemptyline% -\LWR@subhtmlelementclass{#1}[#2]{#3}% -#4% -\LWR@htmltag{/#1} -\LWR@startpars + \LWR@stoppars + \LWR@forceemptyline% + \LWR@subhtmlelementclass{#1}[#2]{#3}% + #4% + \LWR@htmltag{/#1} + \LWR@startpars } \newcommand*{\LWR@htmlelement}[1]{% -\LWR@htmlblocktag{#1} + \LWR@htmlblocktag{#1} } \newcommand*{\LWR@htmlelementend}[1]{% -\LWR@stoppars -\LWR@htmltag{/#1} -\LWR@startpars + \LWR@stoppars + \LWR@htmltag{/#1} + \LWR@startpars } \end{warpHTML} -\begin{warpprint} +\begin{warpall} \NewDocumentEnvironment{BlockClass}{o D(){} m}{}{} -\end{warpprint} +\end{warpall} \begin{warpHTML} -\NewDocumentEnvironment{LWR@print@BlockClass}{o D(){} m}{}{}% - \NewDocumentEnvironment{LWR@HTML@BlockClass}{o D(){} m}% {\LWR@htmldivclass[#1](#2){#3}}% {\LWR@htmldivclassend{#3}} @@ -6593,58 +6602,54 @@ end -- not --version \LWR@formatted{BlockClassSingle} \end{warpHTML} -\begin{warpprint} +\begin{warpall} \NewDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{#4}% -\end{warpprint} +\end{warpall} \begin{warpHTML} -\NewDocumentCommand{\LWR@print@InlineClass}{D{(}{)}{} o m +m}{#4}% - \NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{% -\LWR@traceinfo{LWR@HTML@InlineClass #3}% -\ifbool{FormatWP}{% - \LWR@traceinfo{LWR@HTML@InlineClass: FormatWP}% - \LWR@htmlspanclass[#1]{#3}{#4}% -}{% - \LWR@traceinfo{LWR@HTML@InlineClass: not FormatWP}% - \LWR@htmlspanclass[#2]{#3}{#4}% -}% -\LWR@traceinfo{LWR@HTML@InlineClass: done}% + \LWR@traceinfo{LWR@HTML@InlineClass #3}% + \ifbool{FormatWP}{% + \LWR@traceinfo{LWR@HTML@InlineClass: FormatWP}% + \LWR@htmlspanclass[#1]{#3}{#4}% + }{% + \LWR@traceinfo{LWR@HTML@InlineClass: not FormatWP}% + \LWR@htmlspanclass[#2]{#3}{#4}% + }% + \LWR@traceinfo{LWR@HTML@InlineClass: done}% } \LWR@formatted{InlineClass} \end{warpHTML} -\begin{warpprint} +\begin{warpall} \NewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}{}{} -\end{warpprint} +\end{warpall} \begin{warpHTML} -\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m D(){} m}{}{}% - \NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m D(){} m}% -{% -\LWR@stoppars% -\ifbool{FormatWP}% -{% - \addtocounter{LWR@thisautoidWP}{1}% - \LWR@htmltag{% - div class=\textquotedbl#4\textquotedbl\ % space - id=\textquotedbl% - \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}% - \textquotedbl% - \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% - \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}% - }% -}% FormatWP -{% not FormatWP - \LWR@htmltag{% - div class=\textquotedbl#4\textquotedbl% - \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% - \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}% - }% -}% not FormatWP -\LWR@startpars% -} -{\LWR@htmldivclassend{#4}} + {% + \LWR@stoppars% + \ifbool{FormatWP}% + {% + \addtocounter{LWR@thisautoidWP}{1}% + \LWR@htmltag{% + div class=\textquotedbl#4\textquotedbl\ % space + id=\textquotedbl% + \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}% + \textquotedbl% + \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% + \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}% + }% + }% FormatWP + {% not FormatWP + \LWR@htmltag{% + div class=\textquotedbl#4\textquotedbl% + \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% + \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}% + }% + }% not FormatWP + \LWR@startpars% + } + {\LWR@htmldivclassend{#4}} \LWR@formattedenv{LWR@BlockClassWP} \end{warpHTML} @@ -6682,12 +6687,20 @@ end -- not --version \end{warpHTML} - \begin{warpHTML} \newcounter{LWR@spandepth} \setcounter{LWR@spandepth}{0} +\newbool{LWR@doingparhooks} +\boolfalse{LWR@doingparhooks} + +\newbool{LWR@in@multirow@par} +\boolfalse{LWR@in@multirow@par} + +\newbool{LWR@starting@fancybox} +\boolfalse{LWR@starting@fancybox} + \newbool{LWR@doingstartpars} \boolfalse{LWR@doingstartpars} @@ -6701,25 +6714,29 @@ end -- not --version \newcommand*{\LWR@openparagraph} {% -\ifbool{LWR@doingstartpars}% -{% handling pars \ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} - }% nested par tags? - {}% no nested par tags - {% yes nest par tags - \ifbool{LWR@doingapar}{}{% - \PN@parnotes@auto% - \global\booltrue{LWR@doingapar}% - \ifbool{LWR@algocf@dopars}{}{% - \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline% + bool{LWR@doingparhooks} and + bool{LWR@doingstartpars} + }% + {% handling pars + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} + }% nested par tags? + {}% no nested par tags + {% yes nest par tags + \ifbool{LWR@doingapar}{}{% + \PN@parnotes@auto% + \global\booltrue{LWR@doingapar}% + \ifbool{LWR@algocf@dopars}{}{% + \ifbool{LWR@in@multirow@par}% + {}% + {\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline}% + }% }% - }% - \let\par\LWR@closeparagraph% - }% end of yes nest par tags -}% end of handling pars -{}% not handling pars + }% end of yes nest par tags + }% end of handling pars + {}% not handling pars } \let\LWR@ensuredoingapar\LWR@openparagraph @@ -6729,55 +6746,58 @@ end -- not --version \ifboolexpr{ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} and test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}} and - not bool {LWR@intabularmetadata} + not bool {LWR@starting@fancybox} and + not bool {LWR@intabularmetadata} or + bool {LWR@in@multirow@par} }% - {% - \unskip\LWR@htmltagc{br /}% - }% + {\unskip\LWR@htmltagc{br /}}% {}% } \newcommand*{\LWR@closeparagraph} {% -\ifbool{LWR@doingapar}% -{% handling pars - \ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} - }% - {% no nested par tags - \LWR@closeparagraph@br% - }% no nested par tags - {% yes nest par tags - \@hspacer{\fill}% \hspace*{\fill} - \leavevmode\LWR@orignewline% - \LWR@htmltagc{/\LWR@tagregularparagraph}% - \global\boolfalse{LWR@doingapar}% keep - \global\boolfalse{LWR@minipagethispar}% - \PN@parnotes@auto% - \global\boolfalse{LWR@doingapar}% - }% end of yes nest par tags -}% end of handling pars -{% not handling pars - \LWR@closeparagraph@br% -}% not handling pars -\ifboolexpr{% - not bool {LWR@doingapar} and - test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and - test { - \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}} - } and - bool {LWR@intabularmetadata} and - not bool {LWR@tableparcell} and - test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}} -}% -{% - \LWR@getmynexttoken% -}{% - \LWR@origpar% -}% + \ifbool{LWR@doingparhooks}{% + \ifbool{LWR@doingapar}% + {% handling pars + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} or + bool{LWR@in@multirow@par} + }% + {% no nested par tags + \LWR@closeparagraph@br% + }% no nested par tags + {% yes nest par tags + \@hspacer{\fill}% \hspace*{\fill} + \leavevmode\LWR@orignewline% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \global\boolfalse{LWR@doingapar}% + \global\boolfalse{LWR@minipagethispar}% + \PN@parnotes@auto% + }% end of yes nest par tags + }% LWR@doingapar: end of handling pars + {% not LWR@doingapar: not handling pars + \LWR@closeparagraph@br% + }% not handling pars + \ifboolexpr{% + not bool {LWR@doingapar} and + test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and + test { + \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}} + } and + bool {LWR@intabularmetadata} and + not bool {LWR@tableparcell} and + test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}} + }% + {\LWR@getmynexttoken}% + {}% + }% LWR@doingparhooks + {}% not LWR@doingparhooks } +\AddToHook{para/begin}[lwarp]{\LWR@openparagraph} +\AddToHook{para/end}[lwarp]{\LWR@closeparagraph} + \end{warpHTML} @@ -6785,48 +6805,40 @@ end -- not --version \newcommand*{\LWR@startpars}% {% -\ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} -}% -{}% -{% - \ifbool{LWR@doingstartpars}% - {}% - {% - \ClearPreHook{par}% - \PushPreHook{par}{\LWR@openparagraph}% - \let\par\LWR@closeparagraph - - }% an intentionally blank line - \global\setbool{LWR@doingstartpars}{true}% - \global\boolfalse{LWR@doingapar}% -}% nestspan + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} + }% + {}% nesting + {% not nesting + \ifboolexpr {bool{LWR@doingparhooks} and bool{LWR@doingstartpars}}% + {}% + {\par}% + \global\booltrue{LWR@doingstartpars}% + \global\boolfalse{LWR@doingapar}% + }% not nesting } \newcommand*{\LWR@stoppars}% {% -\ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} -}% -{}% -{% - \ifbool{LWR@doingapar}% - {% - \leavevmode\LWR@orignewline% - \LWR@htmltagc{/\LWR@tagregularparagraph}% - \LWR@orignewline% - \global\boolfalse{LWR@doingapar}% - \global\boolfalse{LWR@minipagethispar} + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} }% - {}% - \ifbool{LWR@doingstartpars}% - {\ClearPreHook{par}}% - {}% - \global\setbool{LWR@doingstartpars}{false}% - \global\boolfalse{LWR@doingapar}% -}% nestspan + {}% nesting + {% not nesting + \ifboolexpr{bool{LWR@doingparhooks} and bool{LWR@doingapar}}% + {% + \leavevmode\LWR@orignewline% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \LWR@orignewline% + \global\boolfalse{LWR@doingapar}% + \global\boolfalse{LWR@minipagethispar}% + }% + {}% + \global\setbool{LWR@doingstartpars}{false}% + \global\boolfalse{LWR@doingapar}% + }% not nesting } \end{warpHTML} @@ -6870,8 +6882,8 @@ end -- not --version \newcommand*{\LWR@currentcss}{lwarp.css} \newcommand*{\CSSFilename}[1]{% -\renewcommand*{\LWR@currentcss}{#1}% -\@onelevel@sanitize\LWR@currentcss% + \renewcommand*{\LWR@currentcss}{#1}% + \@onelevel@sanitize\LWR@currentcss% } \end{warpHTML} @@ -7044,6 +7056,11 @@ end -- not --version \fi } +\newcommand*{\LWR@nullifyfootnotes}{% + \renewcommand{\footnote}[2][]{}% + \renewcommand{\footnotemark}[1][]{}% +} + \end{warpHTML} \begin{warpHTML} @@ -7051,27 +7068,32 @@ end -- not --version \renewcommand{\marginpar}[2][]{% \ifbool{FormatWP}% {% -\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}% -#2 -\end{LWR@BlockClassWP}% + \begin{LWR@BlockClassWP}% + {width:2in; float:right; margin:10pt}{}(note){marginblock}% + #2 + \end{LWR@BlockClassWP}% }% {% \LWR@htmlspanclass(note){marginpar}{#2}% }% } \newcommand{\marginparBlock}[2][]{% -\LWR@stoppars% -\ifbool{FormatWP}% -{% - \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}% - #2 - \end{LWR@BlockClassWP} -}{% - \begin{BlockClass}[width:2in; float:right; margin:10pt](note){marginparblock}% - #2 - \end{BlockClass} -}% -\LWR@startpars% + \LWR@stoppars% + \ifbool{FormatWP}% + {% + \begin{LWR@BlockClassWP}% + {width:2in; float:right; margin:10pt}{}% + (note){marginblock}% + #2 + \end{LWR@BlockClassWP} + }% + {% + \begin{BlockClass}[width:2in; float:right; margin:10pt]% + (note){marginparblock}% + #2 + \end{BlockClass} + }% + \LWR@startpars% } \renewcommand*{\reversemarginpar}{} \renewcommand*{\normalmarginpar}{} @@ -7323,13 +7345,15 @@ end -- not --version \catcode`\#=6 \catcode`\&=4 -\newrobustcmd{\LWR@HTMLsanitize}[1]{% +\newrobustcmd{\LWR@HTMLsanitizedetokenized}[1]{% + \LWR@traceinfo{LWR@HTMLsanitizedetokenized !#1!}% \begingroup% \LWR@hook@processingtags% - \edef\LWR@strresult{\detokenize{#1}}% + \edef\LWR@strresult{#1}% \LWR@subHTMLsanitize% \LWR@strresult% \endgroup% + \LWR@traceinfo{LWR@HTMLsanitize done}% } \edef\LWR@beginspaceleftbrace{begin \LWRleftbrace} @@ -7342,10 +7366,10 @@ end -- not --version \edef\LWR@endrightbrace{end\LWRrightbrace} \edef\LWR@endrightbrace{\detokenize\expandafter{\LWR@endrightbrace}} -\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{% +\newrobustcmd{\LWR@HTMLsanitizeexpanded}[1]{% \begingroup% \LWR@hook@processingtags% - \edef\LWR@strresult{\detokenize\expandafter{#1}}% + \edef\LWR@strresult{#1}% \protect\StrSubstitute{\LWR@strresult}% {\LWR@beginspaceleftbrace}{\LWR@beginleftbrace}[\LWR@strresult]% \protect\StrSubstitute{\LWR@strresult}% @@ -7379,7 +7403,7 @@ end -- not --version \StrLen{\detokenize{#1}}[\LWR@tempone]% \ifnumgreater{\LWR@tempone}{350}{% \AtEndDocument{% - \PackageWarningNoLine{lwarp}{% + \PackageNoteNoLine{lwarp}{% To ensure faster MathJax compilation, place each\MessageBreak custom macro in its own \protect\CustomizeMathJax.\MessageBreak See the Lwarp documentation regarding customizing\MessageBreak @@ -7732,18 +7756,28 @@ end -- not --version \LWR@traceinfo{LWR@section: about to LWR@setlatestname}% \IfValueTF{#2}{\LWR@setlatestname{#2}}{\LWR@setlatestname{#3}}% }% -\ifbool{HTMLDebugComments}{% - \begingroup% - \LWR@nullfonts% - \IfBooleanTF{#1}% starred - {\LWR@htmlcomment{Opening #4*}}% +\begingroup% +\LWR@nullfonts% +\LWR@nullifyfootnotes% +\LWR@htmlcomment{................................}% +\LWR@orignewline% +\ifbool{HTMLDebugComments}% {% - \IfNoValueTF{#2}% short TOC - {\LWR@htmlcomment{Opening #4 ``#3''}}% - {\LWR@htmlcomment{Opening #4 ``#2''}}% - }\LWR@orignewline% - \endgroup% -}{} + \IfBooleanTF{#1}% starred + {% + \IfNoValueTF{#2}% short TOC + {\LWR@htmlcomment{Opening #4* ``#3''}}% + {\LWR@htmlcomment{Opening #4* ``#2''}}% + }% + {% + \IfNoValueTF{#2}% short TOC + {\LWR@htmlcomment{Opening #4 ``#3''}}% + {\LWR@htmlcomment{Opening #4 ``#2''}}% + }% + \LWR@orignewline% + }% + {}% +\endgroup% \ifthenelse{% \cnttest{\@nameuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}% }% @@ -7986,10 +8020,14 @@ end -- not --version \LWR@nullfonts% \edef\theHTMLSection{#1}% \StrSubstitute{\theHTMLSection}{\protect}{\detokenize{-}}[\theHTMLSection]% -\StrSubstitute{\theHTMLSection}{\detokenize{-----}}{\detokenize{-}}[\theHTMLSection]% -\StrSubstitute{\theHTMLSection}{\detokenize{----}}{\detokenize{-}}[\theHTMLSection]% -\StrSubstitute{\theHTMLSection}{\detokenize{---}}{\detokenize{-}}[\theHTMLSection]% -\StrSubstitute{\theHTMLSection}{\detokenize{--}}{\detokenize{-}}[\theHTMLSection]% +\StrSubstitute{\theHTMLSection}% + {\detokenize{-----}}{\detokenize{-}}[\theHTMLSection]% +\StrSubstitute{\theHTMLSection}% + {\detokenize{----}}{\detokenize{-}}[\theHTMLSection]% +\StrSubstitute{\theHTMLSection}% + {\detokenize{---}}{\detokenize{-}}[\theHTMLSection]% +\StrSubstitute{\theHTMLSection}% + {\detokenize{--}}{\detokenize{-}}[\theHTMLSection]% \IfBeginWith{\theHTMLSection}{\detokenize{-}}{% \StrGobbleLeft{\theHTMLSection}{1}[\theHTMLSection]% }{}% @@ -8108,8 +8146,10 @@ end -- not --version \setlength{\abovecaptionskip}{0ex} \renewcommand{\ps@plain}{} \let\LWR@origcaption\caption +\global\booltrue{LWR@doingparhooks} \global\boolfalse{LWR@doingapar} \global\boolfalse{LWR@doingstartpars} +\let\color@endgroup\endgroup \mainmatter \LWR@origpagenumbering{arabic} \LWR@traceinfo{LWR@lwarpStart: Starting new file.} @@ -8196,6 +8236,7 @@ end -- not --version \LWR@maybe@orignewpage } + \ifdef{\AddToHook}{% newer kernel \AddToHook{enddocument/info}{% \if@filesw @@ -8272,7 +8313,7 @@ end -- not --version } \AtBeginDocument{ -\@ifpackageloaded{titling}{ +\IfPackageLoadedTF{titling}{ \AtBeginEnvironment{titlingpage}{ \renewrobustcmd{\affiliation}[1]{\\ \textsc{\small#1}} } @@ -8349,7 +8390,7 @@ end -- not --version \newcommand*{\printdate}{{\small\textit{\@date}}} \end{warpprint} \begin{warpHTML} -\@ifclassloaded{memoir} +\IfClassLoadedTF{memoir} { \newcommand{\LWR@setfootnoteseries}{% \renewcommand\thefootnote{\@arabic\c@footnote}% @@ -8444,7 +8485,7 @@ end -- not --version \begin{warpall} \newcommand*{\AddSubtitlePublished}{% -\@ifpackageloaded{titling}{% yes titling package +\IfPackageLoadedTF{titling}{% yes titling package \newcommand{\@published}{}% \newcommand{\published}[1]{\gdef\@published{##1}}% \renewcommand*{\maketitlehooka}{\printpublished}% @@ -8645,9 +8686,25 @@ end -- not --version \LWR@afterendverbatim% }% } +\AtBeginEnvironment{verbatim*}{% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {% + \LWR@forcenewpage% + \LWR@atbeginverbatim{verbatim}% + }% +} +\AfterEndEnvironment{verbatim*}{% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {% + \LWR@afterendverbatim% + }% +} } -\newcommand*{\LWR@HTML@tabbing}{% +\newenvironment*{LWR@HTML@tabbing} +{% \LWR@forcenewpage% \LWR@atbeginverbatim{tabbing}% \let\enskip\LWR@origenskip% @@ -8659,14 +8716,12 @@ end -- not --version \let\negthinspace\LWR@orignegthinspace% \LWR@print@tabbing% } - -\newcommand*{\LWR@HTML@endtabbing}{% - \LWR@print@endtabbing% +{% + \endLWR@print@tabbing% \LWR@afterendverbatim% } -\LWR@formatted{tabbing} -\LWR@formatted{endtabbing} +\LWR@formattedenv{tabbing} \end{warpHTML} @@ -8717,9 +8772,7 @@ end -- not --version \if@noparitem \@donoparitem \else - \par \ifhmode - \par \fi \if@newlist \if@nobreak @@ -8749,7 +8802,9 @@ end -- not --version \LWR@stoppars% \LWR@startnewdepth{listitem}% \LWR@htmltag{li}% + \LWR@orignewline% \LWR@startpars% + \LWR@ensuredoingapar% \LWR@origitem% } @@ -8791,7 +8846,9 @@ end -- not --version \LWR@stoppars% \LWR@startnewdepth{listitem}% \LWR@htmltag{li}% + \LWR@orignewline% \LWR@startpars% + \LWR@ensuredoingapar% \LWR@origitem% } @@ -8902,17 +8959,21 @@ end -- not --version \newcommand\LWR@mynexttoken\relax - - - \def\LWR@futurenonspacelet#1{\def\LWR@cs{#1}% \afterassignment\LWR@fnslone\let\nexttoken= } \def\LWR@fnslone{\expandafter\futurelet\LWR@cs\LWR@fnsltwo} \def\LWR@fnsltwo{% -\expandafter\ifx\LWR@cs\@sptoken\let\next=\LWR@fnslthree% -\else\let\next=\nexttoken\fi\next} + \expandafter\ifx\LWR@cs\@sptoken% + \let\next=\LWR@fnslthree% + \else% + \expandafter\ifx\LWR@cs\par% + \let\next=\LWR@fnslthree% + \else% + \let\next=\nexttoken% + \fi% + \fi\next} \def\LWR@fnslthree{\afterassignment\LWR@fnslone\let\next= } @@ -9735,11 +9796,10 @@ end -- not --version \booltrue{LWR@doingcmidrule}% } -\NewDocumentCommand{\LWR@docdashline} - {>{\SplitArgument{1}{-}}m}% - {% - \LWR@subcdashline#1% - } +\NewDocumentCommand{\LWR@docdashline}{>{\SplitArgument{1}{-}}m}% +{% + \LWR@subcdashline#1% +} \newcommand*{\LWR@tdstartstyles}{\boolfalse{LWR@tdhavecellstyle}} @@ -9760,7 +9820,7 @@ end -- not --version \newcommand*{\LWR@subaddcmidruletrim}[2]{% \setlength{\LWR@templengthone}{% - \LWR@getexparray{LWR@midrules}{\arabic{LWR@tableLaTeXcolindex}}% + \LWR@getexparray{LWR@midrules}{\arabic{LWR@tableLaTeXcolindex}}% }% \ifdimcomp{\LWR@templengthone}{>}{0pt}% {% @@ -10302,8 +10362,8 @@ end -- not --version {}% }% no version of multirow was loaded {% \@xmultirow defined, so some version of multirow was loaded -\@ifpackageloaded{multirow}{% v2.0 or newer -\@ifpackagelater{multirow}{2016/09/01}% 2016/09/27 for v2.0 +\IfPackageLoadedTF{multirow}{% v2.0 or newer +\IfPackageAtLeastTF{multirow}{2016/09/01}% 2016/09/27 for v2.0 {% v2.0+: \DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}% {+m +m +O{c} +m +O{0} +m +O{0pt} +m}% @@ -10430,10 +10490,11 @@ end -- not --version \ifdefequal{\LWR@mynexttoken}{\lasthdashline}% {\global\let\LWR@mynextaction\LWR@donothing}{}% \ifdefequal{\LWR@mynexttoken}{\par}% - {\global\let\LWR@mynextaction\LWR@donothing}{}% - \LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}% + {% + \global\let\LWR@mynextaction\LWR@donothing% + }{}% + \LWR@traceinfo{LWR@tabledatacolumntag: done, about to do LWR@mynextaction}% \LWR@mynextaction% - \LWR@traceinfo{LWR@tabledatacolumntag: done}% } \end{warpHTML} @@ -10474,7 +10535,7 @@ end -- not --version } \AtBeginDocument{ -\@ifpackageloaded{lwarp-tabls} +\IfPackageLoadedTF{lwarp-tabls} { \newcommand*{\LWR@HTMLhline}[1][]{% \ifbool{FormatWP}% @@ -10533,8 +10594,10 @@ end -- not --version \boolfalse{LWR@foundmrowcell}% \renewcommand*{\LWR@multicoltext}{}% \booltrue{LWR@intabularmetadata}% - \LWR@traceinfo{LWR@@tabular: About to LWR@forecenewpage.}% - \LWR@forcenewpage + \ifbool{LWR@in@multirow@par}% + {\leavevmode\LWR@orignewline}% + {\LWR@forcenewpage}% + \boolfalse{LWR@in@multirow@par}% \LWR@htmlblocktag{table}% \LWR@parsetablecols{#3}% \LWR@stoppars% @@ -10694,8 +10757,7 @@ end -- not --version \fi} \newcommand*{\LWR@nameref}[1]{% \begingroup% - \renewcommand{\footnote}[2][]{}% - \renewcommand{\footnotemark}[1][]{}% + \LWR@nullifyfootnotes% \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@firstoffive{#1}% \endgroup% } @@ -10864,7 +10926,24 @@ end -- not --version {\LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}}% {% \LWR@startref{#2}% - \LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}% + \edef\@tempa{\LWR@currentautosecpageref{#2}}% + \ifdefstring{\@tempa}{??}% + {??}% + {% + \edef\@tempa{% + \csname + r@\BaseJobname-autopage-\LWR@currentautosecpageref{#2}% + \endcsname% + }% + \edef\@tempa{\expandafter\@firstoftwo\@tempa}% + \expandafter\ifblank\expandafter{\@tempa}% + {*} + {% + \LWR@print@ref{% + \BaseJobname-autopage-\LWR@currentautosecpageref{#2}% + }% + }% + }% \LWR@htmltag{/a}% }% } @@ -10984,8 +11063,8 @@ end -- not --version \newcommand*{\LWR@subinlineimage}[6]{% \ifblank{#6}% - {\renewcommand*{\LWR@tempone}{}} - {\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}} + {\renewcommand*{\LWR@tempone}{}}% + {\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}% \ifblank{#1}% {% \LWR@htmltag{img \LWR@indentHTML @@ -11044,7 +11123,7 @@ end -- not --version } \AtBeginDocument{ -\@ifpackageloaded{tocbasic}{ +\IfPackageLoadedTF{tocbasic}{ \appto\figure@atbegin{% \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% @@ -11145,7 +11224,7 @@ end -- not --version \AtBeginDocument{\providecommand*{\CaptionSeparator}{:~}} \AtBeginDocument{ - \@ifpackageloaded{caption}{}{ + \IfPackageLoadedTF{caption}{}{ \let\LWR@orig@caption\@caption% \long\def\@caption#1[#2]{% \LWR@spanwarnformat{caption}% @@ -11215,7 +11294,7 @@ end -- not --version } \AtBeginDocument{% -\@ifpackageloaded{caption}{ +\IfPackageLoadedTF{caption}{ \let\LWR@origcaptionlistentry\captionlistentry \renewcommand*{\captionlistentry}{% @@ -11440,12 +11519,12 @@ end -- not --version \LWR@traceinfo{hypertoc done}% } -\@ifclassloaded{memoir}{}{ +\IfClassLoadedTF{memoir}{}{ \newcounter{lofdepth} \setcounter{lofdepth}{1} } -\@ifclassloaded{memoir}{}{ +\IfClassLoadedTF{memoir}{}{ \newcounter{lotdepth} \setcounter{lotdepth}{1} } @@ -11826,8 +11905,9 @@ end -- not --version \LWR@traceinfo{LWR@restoreorigformatting}% \renewcommand*{\LWR@formatting}{print}% \linespread{1}% - \let\par\LWR@origpar% + \setbool{LWR@doingparhooks}{false}% \LWR@select@print@hspace% + \def\color@endgroup{\endgraf\endgroup}% \LetLtxMacro\hfil\LWR@orighfil% \let\hss\LWR@orighss% \let\llap\LWR@origllap% @@ -12074,12 +12154,12 @@ end -- not --version \IfFileExists{\LWR@baselinename}% { - \@ifpackageloaded{graphicx}{ + \IfPackageLoadedTF{graphicx}{ \newcommand*{\LWR@addbaselinemarker}{% \LWR@origincludegraphics{\LWR@baselinename}% } }{ - \@ifpackageloaded{graphics}{ + \IfPackageLoadedTF{graphics}{ \newcommand*{\LWR@addbaselinemarker}{% \LWR@origincludegraphics{\LWR@baselinename}% } @@ -12089,7 +12169,7 @@ end -- not --version } \AtEndDocument{ \ifbool{LWR@warnbaselinemarker}{ - \PackageWarningNoLine{lwarp}{% + \PackageNoteNoLine{lwarp}{% Load graphicx or graphics for improved\MessageBreak SVG math sizing and baselines% } @@ -12166,6 +12246,7 @@ end -- not --version } \newcommand*{\LWR@subsingledollarsvg}[4]{% + \LWR@traceinfo{LWR@subsingledollartsvg}% \LWR@singledollarmeasure{#4}% \ifdimgreater{\LWR@singledollarwidth}{.7\LWR@singledollarheight}{% \def\LWR@singledollarstyle{% @@ -12205,19 +12286,20 @@ end -- not --version \def\LWR@singledollardepthstyle{}% }{}% \ifbool{LWR@dynamicmath}{% - \LWR@traceinfo{subsingledollar: dynamic}% + \LWR@traceinfo{subsingledollarsvg: dynamic}% \begin{lateximage}% no hashing [\MathImageAltText]% alt tag []% no add'l hashing [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS (math)% ARIA }{% not dynamic math - \LWR@traceinfo{subsingledollar: static}% + \LWR@traceinfo{subsingledollarsvg: static}% \IfValueTF{#1}{% #1 True \LWR@findcurrenttextcolor% sets \LWR@tempcolor \ifbool{LWR@xfakebold}% {\def\LWR@tempone{Y}}% {\def\LWR@tempone{N}}% + \LWR@traceinfo{subsingledollarsvg about to lateximage}% \begin{lateximage}*% use hashing [#2]% alt *% do not add open/closing braces @@ -12232,6 +12314,7 @@ end -- not --version ]% [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS (math)% ARIA + \LWR@traceinfo{subsingledollar did lateximage}% }{% #1 False \begin{lateximage}% no hashing [#2]% alt @@ -12254,7 +12337,7 @@ end -- not --version \newsavebox{\LWR@singledollarbox} \NewDocumentCommand{\LWR@subsingledollar}{s m m m}{% - \LWR@traceinfo{LWR@subsingledollar}% + \LWR@traceinfo{LWR@subsingledollar !#2!}% \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% {% \LWR@traceinfo{LWR@subsingledollar: already in a lateximage}% @@ -12281,7 +12364,7 @@ end -- not --version \textbackslash(% {% \ifmmode\else\LWR@print@ttfamily\fi% - \LWR@HTMLsanitize{#4}% + \LWR@HTMLsanitizedetokenized{\detokenize{#4}}% }% \textbackslash)% }% @@ -12312,63 +12395,70 @@ end -- not --version \protected\gdef\LWR@newsingledollar{\@ifnextchar$\LWR@doubledollar\LWR@singledollar}% \protected\gdef\LWR@doubledollar$#1$${% -\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% -{ + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + {% intentional blank line: - \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{% - \LWR@hidelatexequation{math}{#1}% - \InlineClass{hidden}{\LWR@syncnotenumbers}% - \textbackslash[% - {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}% - \textbackslash] - \InlineClass{hidden}{\LWR@syncnotenames}% - }{% - \textbackslash[% - {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}% - \textbackslash] - }% + \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{% + \LWR@hidelatexequation{math}{#1}% + \InlineClass{hidden}{\LWR@syncnotenumbers}% + \textbackslash[% + {% + \LWR@print@ttfamily% + \LWR@HTMLsanitizedetokenized{\detokenize{#1}}% + }% + \textbackslash] + \InlineClass{hidden}{\LWR@syncnotenames}% + }{% + \textbackslash[% + {% + \LWR@print@ttfamily% + \LWR@HTMLsanitizedetokenized{\detokenize{#1}}% + }% + \textbackslash] + }% -}% mathjax -{% not mathjax - \begin{BlockClass}{displaymath}% - \LWR@newautoidanchor% - \booltrue{LWR@indisplaymathimage}% - \begin{lateximage}% - [% - \textbackslash{[} % extra space - \LWR@HTMLsanitize{#1} % extra space - \textbackslash{]}% - ]% - *% do not add open/closing braces - (math)% ARIA - \LWR@applyxfakebold% - \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar% - \end{lateximage}% - \end{BlockClass}% -}% not mathjax -\gdef\LWR@ThisAltText{}% + }% mathjax + {% not mathjax + \begin{BlockClass}{displaymath}% + \LWR@newautoidanchor% + \booltrue{LWR@indisplaymathimage}% + \begin{lateximage}% + [% + \textbackslash{[} % extra space + \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space + \textbackslash{]}% + ]% + *% do not add open/closing braces + (math)% ARIA + \LWR@applyxfakebold% + \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar% + \end{lateximage}% + \end{BlockClass}% + }% not mathjax + \gdef\LWR@ThisAltText{}% }% \protected\gdef\LWR@singledollar#1${% -\ifbool{mathjax}{% - \LWR@subsingledollar*% - {% alt tag - \textbackslash( % - \LWR@HTMLsanitize{#1} % extra space - \textbackslash)% - }% - {singledollar}% add'l hashing - {#1}% contents -}{% not mathjax - \LWR@subsingledollar*% - {% alt tag - \textbackslash( % - \LWR@HTMLsanitize{#1} % extra space - \textbackslash)% - }% - {singledollar}% add'l hashing - {\LWR@origensuredmath{#1}}% contents -}% not mathjax -\gdef\LWR@ThisAltText{}% + \LWR@traceinfo{LWR@singledollar}% + \ifbool{mathjax}{% + \LWR@subsingledollar*% + {% alt tag + \textbackslash( % + \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space + \textbackslash)% + }% + {singledollar}% add'l hashing + {#1}% contents + }{% not mathjax + \LWR@subsingledollar*% + {% alt tag + \textbackslash( % + \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space + \textbackslash)% + }% + {singledollar}% add'l hashing + {\LWR@origensuredmath{#1}}% contents + }% not mathjax + \gdef\LWR@ThisAltText{}% } \AtBeginDocument{ @@ -12388,7 +12478,7 @@ end -- not --version \ifbool{mathjax}{% \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}% {% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }% {% \relax% @@ -12403,7 +12493,11 @@ end -- not --version {% \LWR@subsingledollar*% {\AltTextOpen\MathImageAltText\AltTextClose}% - {\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}}% + {% + \protect\LWR@HTMLsanitizedetokenized{% + \detokenize\expandafter{#1}% + }% + }% {\LWR@origensuredmath{#1}}% }% \fi% @@ -12535,7 +12629,7 @@ end -- not --version {\{\arabic{LWR@maxfields@}\}}% {}% \LWR@orignewline% - \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}% + \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#2}}% \LWR@orignewline% \textbackslash{}end\{#1\} }% @@ -12574,7 +12668,7 @@ end -- not --version (\LWR@equationtag) % automatic numbering }% \textbackslash{begin\{#2\}} % extra space - \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space + \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#1}} % extra space \textbackslash{end\{#2\}}% ]*(math)% alt tag, ARIA \LWR@applyxfakebold% @@ -12834,7 +12928,7 @@ end -- not --version \newcommand*{\LWR@amsmathbody}[1] {% \textbackslash\{begin\}\{#1\} % extra space - \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}% + \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{\the\@envbody}}% \textbackslash\{end\}\{#1\}% } @@ -12858,6 +12952,7 @@ end -- not --version } \newcommand{\LWR@lateximage@oneimage}[5]{% + \LWR@traceinfo{LWR@lateximage@oneimage !#1!#2!#3!#4!#5!}% \ifdefvoid{\LWR@ThisAltText}{% \IfBooleanTF{#4}{% \LWR@lateximage@oneimageb{#1}{#2}{#3}{#5}% @@ -12877,6 +12972,7 @@ end -- not --version \NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{} D(){}}% {% +\LWR@traceinfo{lateximage !#1!#2!#3!#4!#5!#6!}% \LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}% \LWR@traceinfo{lateximage: entering depth is \arabic{LWR@lateximagedepth}}% \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% @@ -12999,6 +13095,7 @@ end -- not --version \LWR@print@vspace*{.5\baselineskip}% \LWR@htmlclosecomment% \LWR@traceinfo{lateximage: The page after the image is \arabic{page}}% + \LWR@traceinfo{about to LWR@lateximage@oneimage !#2!}% \IfBooleanTF{#1}% starred {% hash \LWR@lateximage@oneimage{#2}{\LWR@hashedname}{#5}{#3}{#6}% @@ -13095,7 +13192,7 @@ end -- not --version \begin{warpHTML} \newcommand*{\LWR@PreloadedPackage}[1]{% - \@ifpackageloaded{#1}% + \IfPackageLoadedTF{#1}% {% \AtBeginDocument{ \LWR@origRequirePackage{lwarp-#1}% @@ -13181,9 +13278,8 @@ end -- not --version \begin{warpprint} \define@key{Gin}{class}{} -\define@key{Gin}{alt}{} \AtBeginDocument{ -\@ifpackageloaded{overpic}{ +\IfPackageLoadedTF{overpic}{ \newcommand*{\overpicfontsize}{12} \newcommand*{\overpicfontskip}{14} }{} @@ -13192,7 +13288,7 @@ end -- not --version \begin{warpall} \AtBeginDocument{ -\@ifpackageloaded{xcolor}{ +\IfPackageLoadedTF{xcolor}{ \LWR@traceinfo{patching xcolor} \LetLtxMacro\colorboxBlock\colorbox \LetLtxMacro\LWR@orig@print@fcolorbox\fcolorbox @@ -13200,86 +13296,82 @@ end -- not --version \newsavebox{\LWR@colorminipagebox} \NewDocumentCommand{\LWR@print@fcolorbox}{o m o m +m}{% -\LWR@traceinfo{LWR@print@fcolorbox #2 #4}% -\begin{lrbox}{\LWR@colorminipagebox}% -#5% -\end{lrbox}% -\ifstrequal{#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}% - {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% - {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% -}% -{% no value #1 - \IfValueTF{#3}% - {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% - {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% -}% no value #1 -}% #4 not none -\LWR@traceinfo{LWR@print@fcolorbox done}% + \LWR@traceinfo{LWR@print@fcolorbox #2 #4}% + \begin{lrbox}{\LWR@colorminipagebox}% + #5% + \end{lrbox}% + \ifstrequal{#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}% + {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% + }% + {% no value #1 + \IfValueTF{#3}% + {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% + }% no value #1 + }% #4 not none + \LWR@traceinfo{LWR@print@fcolorbox done}% } \renewrobustcmd*{\fcolorbox}{\LWR@print@fcolorbox}% \newcommand*{\LWR@print@fcolorboxBlock}{\LWR@print@fcolorbox} \newrobustcmd*{\fcolorboxBlock}{\LWR@print@fcolorboxBlock} -\NewDocumentEnvironment{LWR@print@fcolorminipage}{o m o m O{c} O{} o m} +\NewDocumentEnvironment{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}}% + \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}% -\ifstrequal{#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}% - {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% - {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% - }% - {% no value #1 - \IfValueTF{#3}% - {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% - {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% - }% no value #1 -}% #4 not none -\LWR@traceinfo{*** finished end fcolorminipage}% + \end{minipage}% + \end{lrbox}% + \LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}% + \ifstrequal{#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}% + {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% + }% + {% no value #1 + \IfValueTF{#3}% + {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}% + {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}% + }% no value #1 + }% #4 not none + \LWR@traceinfo{*** finished end fcolorminipage}% } -\NewDocumentEnvironment{fcolorminipage}{} - {\LWR@print@fcolorminipage} - {\endLWR@print@fcolorminipage} - \LWR@formatted{colorbox} \LWR@formatted{colorboxBlock} \LWR@formatted{fcolorbox} @@ -13294,7 +13386,7 @@ end -- not --version \begin{warpprint} \AtBeginDocument{ -\@ifpackageloaded{chemmacros}{ +\IfPackageLoadedTF{chemmacros}{ \DeclareDocumentEnvironment{polymerdelims}{} {}{} @@ -13562,17 +13654,18 @@ padding:\LWR@printlength{\fboxsep} ; % color:\LWR@origpound\LWR@tempcolor% } \newcommand{\LWR@HTML@fbox}[1]{% -\LWR@traceinfo{HTML fbox}% -\LWR@forceminwidth{\fboxrule}% -\LWR@traceinfo{HTML fbox B}% -\InlineClass[% - \LWR@print@mbox{display:inline-block} ; % - \LWR@fboxstyle% -]{fbox}{#1}% -\LWR@traceinfo{HTML fbox: done}% + \LWR@traceinfo{HTML fbox}% + \LWR@forceminwidth{\fboxrule}% + \LWR@traceinfo{HTML fbox B}% + \InlineClass[% + \LWR@print@mbox{display:inline-block} ; % + \LWR@fboxstyle% + ]{fbox}{#1}% + \LWR@traceinfo{HTML fbox: done}% } \AtBeginDocument{\LWR@formatted{fbox}} \end{warpHTML} + \begin{warpall} \let\fboxBlock\fbox \end{warpall} @@ -13581,9 +13674,7 @@ color:\LWR@origpound\LWR@tempcolor% \newcommand{\LWR@HTML@fboxBlock}[1]{% \LWR@forceminwidth{\fboxrule}% \LWR@stoppars% -\begin{BlockClass}[% -\LWR@fboxstyle% -]{fboxBlock} +\begin{BlockClass}[\LWR@fboxstyle]{fboxBlock} #1 \end{BlockClass} \LWR@startpars% @@ -13596,7 +13687,7 @@ color:\LWR@origpound\LWR@tempcolor% \newsavebox{\LWR@fminipagebox} -\NewDocumentEnvironment{LWR@print@fminipage}{O{t} o O{t} m} +\NewDocumentEnvironment{fminipage}{O{t} o O{t} m} {% \IfValueTF{#3}% {\def\LWR@thisalign{#3}} @@ -13615,10 +13706,6 @@ color:\LWR@origpound\LWR@tempcolor% \fbox{\usebox{\LWR@fminipagebox}}% \endminipage% } - -\LetLtxMacro\fminipage\LWR@print@fminipage -\LetLtxMacro\endfminipage\endLWR@print@fminipage - \end{warpall} \begin{warpHTML} @@ -13700,7 +13787,7 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textbf} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@texteb}[1]{% {% \LWR@HTML@ebweight% @@ -13713,7 +13800,7 @@ color:\LWR@origpound\LWR@tempcolor% \providerobustcmd{\texteb}[1]{} } -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@textlg}[1]{% {% \LWR@HTML@lgweight% @@ -13894,7 +13981,7 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{bfseries} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@ebweight}{% \LWR@print@ebweight% \renewcommand*{\LWR@f@series}{eb}% @@ -13902,7 +13989,7 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{ebweight} }{} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@lgweight}{% \LWR@print@lgweight% \renewcommand*{\LWR@f@series}{lg}% @@ -14310,8 +14397,8 @@ color:\LWR@origpound\LWR@tempcolor% } \AtBeginDocument{ - \@ifpackageloaded{graphics}{ - \@ifpackageloaded{metalogo}{}{ + \IfPackageLoadedTF{graphics}{ + \IfPackageLoadedTF{metalogo}{}{ \renewrobustcmd*{\Xe} {X\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}} } @@ -14320,7 +14407,7 @@ color:\LWR@origpound\LWR@tempcolor% \AtEndDocument{ \ifbool{LWR@warnXe}{ - \PackageWarningNoLine{lwarp}{Load graphicx or graphics + \PackageNoteNoLine{lwarp}{Load graphicx or graphics for improved XeTeX logo} }{} } @@ -14449,7 +14536,7 @@ color:\LWR@origpound\LWR@tempcolor% \begin{warpHTML} \AtBeginDocument{ - \@ifpackageloaded{everyshi}{ + \IfPackageLoadedTF{everyshi}{ \RequirePackage{lwarp-everyshi} }{} } @@ -14460,29 +14547,29 @@ color:\LWR@origpound\LWR@tempcolor% \end{warpHTML} \begin{warpHTML} -\@ifpackageloaded{amsthm}{ +\IfPackageLoadedTF{amsthm}{ \RequirePackage{lwarp-amsthm} }{} -\@ifpackageloaded{amsmath}{ +\IfPackageLoadedTF{amsmath}{ \RequirePackage{lwarp-amsmath} }{} -\@ifpackageloaded{centernot}{ +\IfPackageLoadedTF{centernot}{ \RequirePackage{lwarp-centernot} }{} \end{warpHTML} \begin{warpHTML} -\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{} -\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{} -\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{} +\IfClassLoadedTF{scrbook}{\RequirePackage{lwarp-patch-komascript}}{} +\IfClassLoadedTF{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{} +\IfClassLoadedTF{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{} \end{warpHTML} \begin{warpprint} -\@ifclassloaded{memoir}{\LWR@origRequirePackage{xcolor}}{} +\IfClassLoadedTF{memoir}{\LWR@origRequirePackage{xcolor}}{} \end{warpprint} \begin{warpHTML} -\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{} +\IfClassLoadedTF{memoir}{\RequirePackage{lwarp-patch-memoir}}{} \end{warpHTML} \begin{warpHTML} @@ -14528,28 +14615,28 @@ color:\LWR@origpound\LWR@tempcolor% } } -\@ifclassloaded{ujarticle}{\LWR@patchujtclasses}{} -\@ifclassloaded{ujbook}{\LWR@patchujtclasses}{} -\@ifclassloaded{ujreport}{\LWR@patchujtclasses}{} -\@ifclassloaded{utarticle}{\LWR@patchujtclasses}{} -\@ifclassloaded{utbook}{\LWR@patchujtclasses}{} -\@ifclassloaded{utreport}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjarticle}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjbook}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjreport}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjsarticle}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjsbook}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjsreport}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjskiyou}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjspf}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjtarticle}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjtbook}{\LWR@patchujtclasses}{} -\@ifclassloaded{ltjtreport}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ujarticle}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ujbook}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ujreport}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{utarticle}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{utbook}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{utreport}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjarticle}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjbook}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjreport}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjsarticle}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjsbook}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjsreport}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjskiyou}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjspf}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjtarticle}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjtbook}{\LWR@patchujtclasses}{} +\IfClassLoadedTF{ltjtreport}{\LWR@patchujtclasses}{} \end{warpHTML} \begin{warpHTML} \AtBeginDocument{ - \@ifpackageloaded{ctexpatch}{% + \IfPackageLoadedTF{ctexpatch}{% \def\@partcntformat#1{% \LWR@isolate{\CTEX@partname}~% \CTEX@part@aftername% @@ -14568,7 +14655,7 @@ color:\LWR@origpound\LWR@tempcolor% \end{warpHTML} \begin{warpHTML} \AtBeginDocument{ -\@ifpackageloaded{kotexutf}{% +\IfPackageLoadedTF{kotexutf}{% \def\LWR@kotexutf@setref#1#2#3{% \@setref@dhucs@orig{#1}{#2}{#3}% \ifx#1\relax\else @@ -14589,24 +14676,22 @@ color:\LWR@origpound\LWR@tempcolor% \begin{warpHTML} \AtBeginDocument{ -\@ifpackageloaded{polyglossia}{ - \PackageWarningNoLine{lwarp} +\IfPackageLoadedTF{polyglossia}{ + \PackageNoteNoLine{lwarp} {% Polyglossia has been loaded. Lwarp also uses cleveref.\MessageBreak See the cleveref documentation regarding\MessageBreak - polyglossia support. Some languages are not supported% + polyglossia support. Some languages are not supported.\MessageBreak + --- \MessageBreak + If the error\MessageBreak + \space\space Undefined control sequence ... + \protect\__hook begindocument\MessageBreak + occurs here, use the polyglossia macro:\MessageBreak + \space\space\protect\setmainlanguage\protect{...\protect} } - \typeout{---} - \typeout{Package lwarp:} - \typeout{If the error} - \typeout{\space\space``! Undefined control sequence. - \space ... \space \protect\__hook begindocument''} - \typeout{occurs here, use the polyglossia macro:} - \typeout{\space\space\protect\setmainlanguage\protect{...\protect}} - \typeout{---} }{ - \@ifpackageloaded{babel}{ - \PackageWarningNoLine{lwarp} + \IfPackageLoadedTF{babel}{ + \PackageNoteNoLine{lwarp} {% Babel has been loaded. Lwarp also uses cleveref.\MessageBreak See the cleveref documentation regarding\MessageBreak @@ -14618,7 +14703,7 @@ color:\LWR@origpound\LWR@tempcolor% } \end{warpHTML} \newcommand*{\LWR@mathjaxwarn}[2]{% - \@ifpackageloaded{lwarp-#1}{% + \IfPackageLoadedTF{lwarp-#1}{% \ifblank{#2}{% \PackageWarningNoLine{lwarp} {% @@ -14637,7 +14722,7 @@ color:\LWR@origpound\LWR@tempcolor% } \newcommand*{\LWR@nomathjaxwarn}[2]{% - \@ifpackageloaded{lwarp-#1}{% + \IfPackageLoadedTF{lwarp-#1}{% \ifblank{#2}{% \PackageWarningNoLine{lwarp} {% @@ -14669,8 +14754,7 @@ color:\LWR@origpound\LWR@tempcolor% \AtBeginDocument{ \ifbool{mathjax}{ \LWR@nomathjaxwarn{aligned-overset}{} - \LWR@nomathjaxwarn{amscdx} - {\LWR@forceSVGmessage{amscdx}} + \LWR@nomathjaxwarn{amscdx}{\LWR@forceSVGmessage{amscdx}} \LWR@mathjaxwarn{arydshln} {In a math array, do not use the optional argument\MessageBreak for \protect\cdashline.\space\space @@ -14693,10 +14777,8 @@ color:\LWR@origpound\LWR@tempcolor% {Colors are ignored in MathJax.\MessageBreak (Text mode tabular does support colortbl.)\MessageBreak \LWR@forceSVGmessage{colortbl}} - \LWR@mathjaxwarn{delarray} - {\LWR@forceSVGmessage{delarray}} - \LWR@nomathjaxwarn{gauss} - {\LWR@forceSVGmessage{gauss}} + \LWR@mathjaxwarn{delarray}{\LWR@forceSVGmessage{delarray}} + \LWR@nomathjaxwarn{gauss}{\LWR@forceSVGmessage{gauss}} \LWR@mathjaxwarn{hhline} {A simple \protect\hline\space is used} \LWR@mathjaxwarn{isomath} @@ -14704,8 +14786,7 @@ color:\LWR@origpound\LWR@tempcolor% do not use a sans font because MathJax does not yet\MessageBreak have sans Greek. Tensors may look like vectors% } - \LWR@nomathjaxwarn{jkmath} - {\LWR@forceSVGmessage{jkmath}} + \LWR@nomathjaxwarn{jkmath}{\LWR@forceSVGmessage{jkmath}} \LWR@mathjaxwarn{libertinust1math} {Some of the symbol font macros such as \protect\mathsfbfit\MessageBreak do not use a sans font because MathJax does not yet\MessageBreak @@ -14730,8 +14811,10 @@ color:\LWR@origpound\LWR@tempcolor% \protect\CodeBefore\space cannot be done with MathJax.\MessageBreak \LWR@forceSVGmessage{nicematrix}% } - \LWR@nomathjaxwarn{pb-diagram} - {\LWR@forceSVGmessage{pb-diagram}} + \LWR@nomathjaxwarn{pb-diagram}{\LWR@forceSVGmessage{pb-diagram}} + \LWR@mathjaxwarn{siunitx} + {Place \protect\sisetup\space before \protect\begin{document}.\MessageBreak + Many optional arguments are ignored} \LWR@nomathjaxwarn{tensind}{} \LWR@mathjaxwarn{unicode-math} {Do not use embedded Unicode characters.\MessageBreak |