diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 446 |
1 files changed, 290 insertions, 156 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 3aa12bd1b4d..2d4d2adc6ee 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -6,7 +6,7 @@ %% %% lwarp.dtx (with options: `package') %% This is a generated file. -%% Copyright 2016-2022 Brian Dunn +%% Copyright 2016-2025 Brian Dunn %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -17,7 +17,8 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [2024/02/22 v0.916 Allows LaTeX to directly produce HTML5 output.] + [2025/01/28 v0.918 Allows LaTeX to directly produce HTML5 output.] +%% @@ -27,6 +28,17 @@ +\NeedsTeXFormat{LaTeX2e}[2021/06/01] +\IfPackageLoadedTF{tagpdf-base}% *88* + {% + \PackageError{lwarp} + {% + PDF tagging is not supported yet.\MessageBreak% + Comment out \string\DocumentMetadata\space for HTML% + } + {Still in development!} + } + {} \RequirePackage{iftex}[2019/11/07] \RequirePackage{ifpdf} \RequirePackage{ifptex}% in case TL2019 or earlier @@ -735,9 +747,6 @@ \LWR@loadafter{tablefootnote} \LWR@notmemoirloadafter{tabularx} \LWR@loadafter{tabulary} -\LWR@loadafter{tagpdf} -\LWR@loadafter{tagpdf-mc-code-generic} -\LWR@loadafter{tagpdf-mc-code-lua} \LWR@loadafter{tascmac} \LWR@loadafter{tcolorbox} \LWR@loadafter{tensor} @@ -1478,7 +1487,7 @@ \begin{warpall} -\RequirePackage{xparse} +\IfFormatAtLeastTF{2020-10-01}{}{\RequirePackage{xparse}} \RequirePackage{calc} @@ -1626,7 +1635,7 @@ }% }% }% - {% + {% lwarp-* file not found \ifdefvoid{\LWR@parsedrequirepackagenames}{% \edef\LWR@parsedrequirepackagenames{\LWR@strresulttwo}% }{% @@ -1848,11 +1857,11 @@ \newbool{LWR@tracinglwarp} \newcommand{\tracinglwarp}{\booltrue{LWR@tracinglwarp}} \newcommand{\LWR@traceinfo}[1]{% -\ifbool{LWR@tracinglwarp}% -{% - \typeout{*** lwarp: #1}% -}% -{}% + \ifbool{LWR@tracinglwarp}% + {% + \typeout{*** lwarp: #1}% + }% + {}% } \newbool{HTMLDebugComments} @@ -2026,7 +2035,9 @@ \renewcommand*{\LWR@tagsubsubsectionend}{/h5} \renewcommand*{\LWR@tagparagraph}{h6} \renewcommand*{\LWR@tagparagraphend}{/h6} -\renewcommand*{\LWR@tagsubparagraph}{span class=\textquotedbl{}subparagraph\textquotedbl} +\renewcommand*{\LWR@tagsubparagraph}{% + span class=\textquotedbl{}subparagraph\textquotedbl% +} \renewcommand*{\LWR@tagsubparagraphend}{/span} }% WPTitleHeading {% not WPTitleHeading, part and section starting at h1 @@ -2119,7 +2130,7 @@ \let\LWR@orignewline\newline -\AtBeginDocument{% in case packages change definition +\AtBeginDocument{% in case packages change definitions \let\LWR@orig@trivlist\@trivlist \let\LWR@origtrivlist\trivlist \let\LWR@origendtrivlist\endtrivlist @@ -2439,9 +2450,81 @@ \begin{filecontents*}[overwrite]{lwarp.css} /* CSS stylesheet for the LaTeX Lwarp package - Copyright 2016-2022 Brian Dunn — BD Tech Concepts LLC + Copyright 2016-2025 Brian Dunn — BD Tech Concepts LLC */ +/* Page layout */ + +div.sidetoccontainer { + font-family: "DejaVu Serif", "Bitstream Vera Serif", + "Lucida Bright", Georgia, serif; + float: left ; + width: 19%; /* room for border-right next to 80% main */ + margin: 0pt 0em 3ex 0pt ; + border-right: 1px solid silver; + border-bottom: 1px solid silver; + background: #FAF7F4 ; + font-size:.9em ; + border-radius: 0px 0px 20px 0px ; + max-height: 100vh ; + overflow-y: auto ; +} + +div.sidetoccontents { + overflow-y: auto ; + width: 100% ; + text-align: left ; +} + +nav.sidetoc p {line-height:1.2 ; margin: 1ex .5em 1ex .5em ; + text-indent: 0 ; } + +nav.sidetoc p a {color:black ; font-size: .7em ;} + +div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center; + border-bottom: 1px solid silver ; } + +nav.sidetoc a:hover {text-decoration: underline ; } + +nav.topnavigation{ + text-align: left ; + padding: 0.5ex 1em 0.5ex 1em ; +/* margin: 2ex 0em 3ex 0em ; */ + margin: 0 ; + border-bottom: 1px solid silver ; + border-top: 1px solid silver ; + clear:both ; +} + +nav.botnavigation{ + text-align: left ; + padding: 0.5ex 1em 0.5ex 1em ; +/* margin: 3ex 0em 2ex 0em ; */ + margin: 0 ; + border-top: 1px solid silver ; + border-bottom: 1px solid silver ; + clear:both ; +} + +header { + line-height: 1.2 ; + font-size: 1em ; + border-bottom: 1px solid silver ; + margin: 0px ; + padding: 2ex 1em 2ex 1em ; + text-align:left ; +} + +footer { + font-size: .85em ; + line-height: 1.2 ; + margin-top: 1ex ; + border-top: 1px solid silver ; + padding: 2ex 1em 2ex 1em ; + clear:both ; + text-align:left ; +} + /* a fix for older browsers: */ header, section, footer, aside, nav, main, article, figure { display: block; } @@ -3308,6 +3391,8 @@ dl { line-height: 1.3; } +li dl { margin-left: 2em } + dl dt { display: block ; float:left ; @@ -3708,45 +3793,6 @@ div.titledate { margin: 1ex 0em 1ex 0em ; } -nav.topnavigation{ - text-align: left ; - padding: 0.5ex 1em 0.5ex 1em ; -/* margin: 2ex 0em 3ex 0em ; */ - margin: 0 ; - border-bottom: 1px solid silver ; - border-top: 1px solid silver ; - clear:both ; -} - -nav.botnavigation{ - text-align: left ; - padding: 0.5ex 1em 0.5ex 1em ; -/* margin: 3ex 0em 2ex 0em ; */ - margin: 0 ; - border-top: 1px solid silver ; - border-bottom: 1px solid silver ; - clear:both ; -} - -header { - line-height: 1.2 ; - font-size: 1em ; - border-bottom: 1px solid silver ; - margin: 0px ; - padding: 2ex 1em 2ex 1em ; - text-align:left ; -} - -footer { - font-size: .85em ; - line-height: 1.2 ; - margin-top: 1ex ; - border-top: 1px solid silver ; - padding: 2ex 1em 2ex 1em ; - clear:both ; - text-align:left ; -} - /* for \LinkHome, \LinkPrevious, and \LinkNext: */ a.linkhome { font-weight:bold ; font-size: 1em ;} @@ -3763,35 +3809,6 @@ img.lateximage{ border: none ; } -div.sidetoccontainer { - font-family: "DejaVu Serif", "Bitstream Vera Serif", - "Lucida Bright", Georgia, serif; - float: left ; - width: 19%; /* room for border-right next to 80% main */ - margin: 0pt 0em 3ex 0pt ; - border-right: 1px solid silver; - border-bottom: 1px solid silver; - background: #FAF7F4 ; - font-size:.9em ; - border-radius: 0px 0px 20px 0px ; -} - -div.sidetoccontents { - overflow-y: auto ; - width: 100% ; - text-align: left ; -} - -nav.sidetoc p {line-height:1.2 ; margin: 1ex .5em 1ex .5em ; - text-indent: 0 ; } - -nav.sidetoc p a {color:black ; font-size: .7em ;} - -div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center; - border-bottom: 1px solid silver ; } - -nav.sidetoc a:hover {text-decoration: underline ; } - section.textbody { margin: 0ex 1em 0ex 1em ;} div.multicolsheading { -webkit-column-span: all; @@ -4893,9 +4910,9 @@ MathJax = { \begin{filecontents*}[overwrite]{lwarpmk.lua} #!/usr/bin/env texlua --- Copyright 2016-2024 Brian Dunn +-- Copyright 2016-2025 Brian Dunn -printversion = "v0.916" +printversion = "v0.918" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -6102,6 +6119,9 @@ end -- not --version \let\LWR@origtextgreater\textgreater \renewrobustcmd*{\textgreater}{\HTMLentity{gt}} +\let\LWR@origpercent\% +\renewrobustcmd*{\%}{\HTMLentity{percnt}} + \end{warpHTML} @@ -6463,9 +6483,12 @@ end -- not --version \LWR@hook@processingtags% \LWR@fontfortags{LWR@htmltagc}{\detokenize{#1}}% \protect\LWR@origtextless% + \LWR@traceinfo{LWR@htmltagc B}% \LWR@isolate{#1}% + \LWR@traceinfo{LWR@htmltagc C}% \protect\LWR@origtextgreater% \endgroup% + \LWR@traceinfo{LWR@htmltagc done}% } \newcommand*{\LWR@spanwarnformat}[1]{% @@ -7087,6 +7110,7 @@ end -- not --version \let\LWR@newautopagelabel\LWR@null@newautopagelabel% \global\setbox\csname #2\endcsname=\vbox{% \unvbox\csname #2\endcsname% + \def\@currentcounter{footnote}% \protected@edef\@currentlabel{% \csname p@footnote\endcsname\@thefnmark% }% @currentlabel @@ -7118,6 +7142,7 @@ end -- not --version \reset@font\footnotesize% \hsize\columnwidth% \@parboxrestore% + \def\@currentcounter{mpfootnote}% \protected@edef\@currentlabel% {\csname p@mpfootnote\endcsname\@thefnmark}% \color@begingroup% @@ -7485,9 +7510,11 @@ end -- not --version \expandafter\LWR@replacestrings\expandafter{\LWRbackslash"}{}% \LWR@replacestrings{"}{}% }% - {\LWR@replacestrings{"}{"}}% - }% enabled - {}% not enabled + {% + \LWR@replacestrings{"}{"}% + }% + }% sanitizing enabled + {}% sanitizing not enabled } \catcode`\&=4 @@ -7612,6 +7639,7 @@ end -- not --version \CustomizeMathJax{\newcommand{\footnotemark}[1][\LWRfootnote]{{}^{\mathrm{#1}}}} \CustomizeMathJax{\let\LWRorighspace\hspace} \CustomizeMathJax{\renewcommand{\hspace}{\ifstar\LWRorighspace\LWRorighspace}} +\CustomizeMathJax{\newcommand{\TextOrMath}[2]{#2}} \CustomizeMathJax{\newcommand{\mathnormal}[1]{{#1}}} \CustomizeMathJax{\newcommand\ensuremath[1]{#1}} \CustomizeMathJax{% absorb two optional arguments @@ -8231,20 +8259,25 @@ end -- not --version }\LWR@orignewline% \ifdefempty{\LWR@currentHTMLDescription}{}{% \LWR@htmltag{% - meta name=\LWR@orig@textquotedbl{}description\LWR@orig@textquotedbl\ % space - content=\LWR@orig@textquotedbl\LWR@currentHTMLDescription\LWR@orig@textquotedbl\ /% + meta name=% + \LWR@orig@textquotedbl{}description\LWR@orig@textquotedbl\ % space + content=% + \LWR@orig@textquotedbl\LWR@currentHTMLDescription\LWR@orig@textquotedbl\ /% }\LWR@orignewline }% \ifdefempty{\LWR@currentHTMLKeywords}{}{% \LWR@htmltag{% - meta name=\LWR@orig@textquotedbl{}keywords\LWR@orig@textquotedbl\ % space - content=\LWR@orig@textquotedbl\LWR@currentHTMLKeywords\LWR@orig@textquotedbl\ /% + meta name=% + \LWR@orig@textquotedbl{}keywords\LWR@orig@textquotedbl\ % space + content=% + \LWR@orig@textquotedbl\LWR@currentHTMLKeywords\LWR@orig@textquotedbl\ /% }\LWR@orignewline }% \LWR@htmltag{% meta % space name=\LWR@orig@textquotedbl{}viewport\LWR@orig@textquotedbl\ % space - content=\LWR@orig@textquotedbl{}width=device-width, initial-scale=1.0\LWR@orig@textquotedbl\ /% + content=% + \LWR@orig@textquotedbl{}width=device-width, initial-scale=1.0\LWR@orig@textquotedbl\ /% }\LWR@orignewline \LWR@HTMLmeta \ifthenelse{\equal{\theHTMLTitle}{}}% @@ -8928,19 +8961,25 @@ end -- not --version \begin{warpHTML} +\VerifyCommand[lwarp][latex]{\@thm}{C35B697D8E37A052BF513D51C8660A87} + +\def\@thm#1#2{% + \refstepcounter{#1}% lwarp + \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}% +} \renewcommand{\@begintheorem}[2]{% -\LWR@forcenewpage + \LWR@forcenewpage \LWR@printpendingfootnotes% lwarp -\BlockClass{theoremcontents} -\trivlist -\item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape + \BlockClass{theoremcontents} + \trivlist + \item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape% } \ifundef{\@opargbegintheorem}{}{ \renewcommand{\@opargbegintheorem}[3]{% \LWR@forcenewpage \BlockClass{theoremcontents} \trivlist - \item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape + \item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape% } } \renewcommand*{\@endtheorem}{% @@ -10859,7 +10898,7 @@ end -- not --version \LWR@htmlblocktag{table}% \LWR@parsetablecols{#3}% \LWR@stoppars% - \LWR@htmltag{tr style="display:none"}% + \LWR@htmltag{tr style=\textquotedbl{}display:none\textquotedbl}% \LWR@htmltag{th}.\LWR@htmltag{/th}% \LWR@htmltag{/tr}% \LWR@orignewline% @@ -11035,10 +11074,10 @@ end -- not --version \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@thirdoffive{#1}% } \newcommand*{\LWR@lateximagedepthref}[1]{% - \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@fourthoffive{#1}% + \expandafter\LWR@setref\csname r@#1@lwarp@image\endcsname\LWR@firstoffive{#1}% } \newcommand*{\LWR@lateximagenumberref}[1]{% - \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@fifthoffive{#1}% + \expandafter\LWR@setref\csname r@#1@lwarp@image\endcsname\LWR@secondoffive{#1}% } \newcommand*{\LWR@write@lwarplabel}[1]{% \LWR@traceinfo{LWR@write@lwarplabel !#1!}% @@ -11054,8 +11093,18 @@ end -- not --version {\LWR@thisfilename}% {\arabic{LWR@htmlfilenumber}}% }% + {}% + {}% + }% + }% + \protected@write\@auxout{}% + {% + \string\newlabel{#1@lwarp@image}{% {\arabic{LWR@lateximagedepth}}% {\arabic{LWR@lateximagenumber}}% + {}% + {}% + {}% }% }% \@esphack% @@ -11255,7 +11304,7 @@ end -- not --version \def\NR@gettitle#1{% \GetTitleString{#1}% - \let\@currentlabelname\GetTitleStringResult + \let\@currentlabelname\GetTitleStringResult% } @@ -11387,11 +11436,11 @@ end -- not --version \newcommand*{\LWR@subinlineimage}[6]{% \begingroup% \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}% - \ifblank{#6}% + \ifblank{#6}% ARIA role {\renewcommand*{\LWR@tempone}{}}% - {\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}% - \ifblank{#1}% - {% + {\renewcommand*{\LWR@tempone}{role=\textquotedbl#6\textquotedbl\LWR@indentHTML}}% + \ifblank{#1}% alt text + {% alt is file name \LWR@htmltag{img \LWR@indentHTML src=\textquotedbl#3.#4\textquotedbl \LWR@indentHTML alt=\textquotedbl#3\textquotedbl \LWR@indentHTML @@ -11400,10 +11449,12 @@ end -- not --version class=\textquotedbl#2\textquotedbl \LWR@orignewline }% }% - {% + {% alt is as given + \def\tmpb{#1}% + \LWR@HTMLsanitize@tmpb% \LWR@htmltag{img \LWR@indentHTML src=\textquotedbl#3.#4\textquotedbl \LWR@indentHTML - alt=\textquotedbl#1\textquotedbl \LWR@indentHTML + alt=\textquotedbl\tmpb\textquotedbl \LWR@indentHTML \LWR@tempone style=\textquotedbl#5\textquotedbl \LWR@indentHTML class=\textquotedbl#2\textquotedbl \LWR@orignewline @@ -12254,6 +12305,7 @@ end -- not --version \let\textless\LWR@origtextless% \let\textgreater\LWR@origtextgreater% \let\&\LWR@origampersand% + \let\%\LWR@origpercent% \LetLtxMacro\em\LWR@origem% \LetLtxMacro\normalfont\LWR@orignormalfont% \let\sp\LWR@origsp% @@ -12532,7 +12584,7 @@ end -- not --version \newcommand*{\LWR@singledollarmeasure}[1]{% \begingroup% \LWR@restoreorigformatting% - \RenewDocumentEnvironment{lateximage}{s o s o o d()}{}{}% inside group + \RenewDocumentEnvironment{lateximage}{s o s t? o o d()}{}{}% inside group \LWR@print@normalsize% \LWR@setcurrentfont% \global\advance\c@LWR@lateximagedepth 1\relax% @@ -12620,6 +12672,7 @@ end -- not --version \LWR@traceinfo{subsingledollarsvg: dynamic}% \begin{lateximage}% no hashing [\MathImageAltText]% alt tag + ?% Do not detokenize the alt tag []% no add'l hashing [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS (math)% ARIA @@ -12634,6 +12687,7 @@ end -- not --version \begin{lateximage}*% use hashing [#2]% alt *% do not add open/closing braces + ?% Do not detokenize the alt tag [% addl' hashing #3% FM\LWR@f@family% @@ -12649,6 +12703,7 @@ end -- not --version }{% #1 False \begin{lateximage}% no hashing [#2]% alt + ?% Do not detokenize the alt tag []% no add'l hashing [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS (math)% ARIA @@ -12689,7 +12744,7 @@ end -- not --version ) and ( not bool{LWR@dynamicmath} ) }% - {% + {% mathjax \LWR@traceinfo{LWR@subsingledollar: Mathjax}% {% \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}% @@ -12728,7 +12783,7 @@ end -- not --version \protected\gdef\LWR@doubledollar$#1$${% \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% - {% intentional blank line: + {% mathjax: intentional blank line: \begingroup% \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{% @@ -12760,12 +12815,13 @@ end -- not --version \LWR@newautoidanchor% \booltrue{LWR@indisplaymathimage}% \begin{lateximage}% - [% + [% alt text \textbackslash{[} % extra space \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space \textbackslash{]}% ]% *% do not add open/closing braces + ?% Do not detokenize the alt tag (math)% ARIA \LWR@applyxfakebold% \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar% @@ -12870,7 +12926,7 @@ end -- not --version \begin{BlockClass}{displaymath}% \LWR@newautoidanchor% \booltrue{LWR@indisplaymathimage}% - \begin{lateximage}[\MathImageAltText](math)% [alt](ARIA) + \begin{lateximage}[\MathImageAltText]?(math)% [alt](ARIA) \LWR@origdollar\LWR@origdollar% } {% @@ -12883,7 +12939,7 @@ end -- not --version \begin{BlockClass}{displaymathnumbered}% \LWR@newautoidanchor% \booltrue{LWR@indisplaymathimage}% - \begin{lateximage}[\MathImageAltText](math)% [alt](ARIA) + \begin{lateximage}[\MathImageAltText]?(math)% [alt](ARIA) \LWR@orig@equation% } {% @@ -13004,7 +13060,6 @@ end -- not --version \begin{lateximage}[% \ifstrequal{#2}{equation*}{% \ifdefequal{\LWR@equationtag}{\theequation}{% - % no tag was given }{% (\LWR@equationtag) % tag was given }% @@ -13014,7 +13069,7 @@ end -- not --version \textbackslash{begin\{#2\}} % extra space \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#1}} % extra space \textbackslash{end\{#2\}}% - ]*(math)% alt tag, ARIA + ]*?(math)% alt tag, ARIA \LWR@applyxfakebold% \@nameuse{LWR@orig@#2}% #1% contents collected by \collect@body @@ -13178,8 +13233,11 @@ end -- not --version \begin{BlockClass}{displaymathnumbered}% \LWR@newautoidanchor% \booltrue{LWR@indisplaymathimage}% - \begin{lateximage}[(\LWR@startingequationtag\textendash\LWR@equationtag)% - \LWR@addmathjax{eqnarray}{\BODY}]*(math)% + \begin{lateximage}[% + (\LWR@startingequationtag\textendash\LWR@equationtag)% + \LWR@addmathjax{eqnarray}{\BODY}% + ]% + *?(math)% \LWR@applyxfakebold% \LWR@origeqnarray% \BODY% @@ -13191,9 +13249,11 @@ end -- not --version \begin{BlockClass}{displaymath}% \LWR@newautoidanchor% \booltrue{LWR@indisplaymathimage}% - \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]*(math)% + \begin{lateximage}[% + \LWR@addmathjax{eqnarray*}{\BODY}% + ]*?(math)% \LWR@applyxfakebold% - \def\@eqncr{\nonumber\@seqncr} + \def\@eqncr{\nonumber\@seqncr}% \csuse{LWR@origeqnarray}% \BODY% \nonumber\csuse{LWR@origendeqnarray}% @@ -13318,7 +13378,7 @@ end -- not --version \catcode`\$=\active% -\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{} D(){}}% +\NewDocumentEnvironment{lateximage}{s o s t? O{} O{} D(){}}% {% \LWR@traceinfo{lateximage !#1!#2!#3!#4!#5!#6!}% \LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}% @@ -13337,8 +13397,6 @@ end -- not --version \addtocounter{LWR@lateximagenumber}{1}% \LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}% \boolfalse{mathjax}% - \boolfalse{LWR@verbtags}% - \boolfalse{LWR@HTMLsanitize@tmpb@enable}% \LWR@ensuredoingapar% \hbadness=10000\relax% \addtocounter{LWR@externalfilecnt}{1}% @@ -13357,18 +13415,34 @@ end -- not --version \IfBooleanTF{#1}% starred {% hash \ifdefvoid{\LWR@ThisAltText}{% - \IfBooleanTF{#3}{% - \edef\LWR@hashedname{% - \LWR@mdfive{\detokenize\expandafter{#2}-!-#4}% - }% + \IfBooleanTF{#3}{% no open/close tags? + \IfBooleanTF{#4}% '?': don't detokenize + {% don't detokenize + \edef\LWR@hashedname{% + \LWR@mdfive{#2-!-#5}% + }% + }% + {% do detokenize + \edef\LWR@hashedname{% + \LWR@mdfive{\detokenize\expandafter{#2}-!-#5}% + }% + }% }{% - \edef\LWR@hashedname{% - \LWR@mdfive{\detokenize\expandafter{\AltTextOpen#2\AltTextClose}-!-#4}% + \IfBooleanTF{#4}% '?': don't detokenize + {% don't detokenize + \edef\LWR@hashedname{% + \LWR@mdfive{\AltTextOpen#2\AltTextClose-!-#5}% + }% + }% + {% do detokenize + \edef\LWR@hashedname{% + \LWR@mdfive{\detokenize\expandafter{\AltTextOpen#2\AltTextClose}-!-#5}% + }% }% }% }{% \edef\LWR@hashedname{% - \LWR@mdfive{\detokenize\expandafter{\AltTextOpen\LWR@ThisAltText\AltTextClose}-!-#4}% + \LWR@mdfive{\detokenize\expandafter{\AltTextOpen\LWR@ThisAltText\AltTextClose}-!-#5}% }% }% \LWR@traceinfo{lateximage: hash is \LWR@hashedname}% @@ -13428,6 +13502,8 @@ end -- not --version }% not in display math \LetLtxMacro\LWR@newsingledollar$% \LetLtxMacro\LWR@newsingledollar$% syntax highlighting + \boolfalse{LWR@verbtags}% + \boolfalse{LWR@HTMLsanitize@tmpb@enable}% }% end of outer-most lateximage \LWR@traceinfo{lateximage: finished start of environment}% }% end of \begin{lateximage} @@ -13447,13 +13523,57 @@ end -- not --version \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}% - }% hash - {% no hash - \LWR@lateximage@oneimage{#2}{\LWR@ImagesName\theLWR@externalfilecnt}{#5}{#3}{#6}% - }% no hash + \IfBooleanTF{#1}% starred? + {% starred, hash + \IfValueTF{#2}% alt argument + {% alt argument given + \IfBooleanTF{#4}% '?': don't detokenize + {% don't detokenize + \LWR@lateximage@oneimage{#2}% + {\LWR@hashedname}{#6}{#3}{#7}% + }% don't detokenize + {% detokenize + \expandafter\LWR@lateximage@oneimage\expandafter{\detokenize{#2}}% + {\LWR@hashedname}{#6}{#3}{#7}% + }% detokenize + }% alt argument given + {% alt argument not given + \IfBooleanTF{#4}% '?': don't detokenize + {% don't detokenize + \LWR@lateximage@oneimage{\ImageAltText}% + {\LWR@hashedname}{#6}{#3}{#7}% + }% don't detokenize + {% detokenize + \expandafter\LWR@lateximage@oneimage\expandafter{\detokenize\expandafter{\ImageAltText}}% + {\LWR@hashedname}{#6}{#3}{#7}% + }% detokenize + }% alt argument not given + }% starred, hash + {% not starred, no hash + \IfValueTF{#2}% alt argument + {% alt argument given + \IfBooleanTF{#4}% '?': don't detokenize + {% don't detokenize + \LWR@lateximage@oneimage{#2}% + {\LWR@ImagesName\theLWR@externalfilecnt}{#6}{#3}{#7}% + }% don't detokenize + {% detokenize + \expandafter\LWR@lateximage@oneimage\expandafter{\detokenize{#2}}% + {\LWR@ImagesName\theLWR@externalfilecnt}{#6}{#3}{#7}% + }% detokenize + }% alt argument given + {% alt argument not given + \IfBooleanTF{#4}% '?': don't detokenize + {% don't detokenize + \LWR@lateximage@oneimage{\ImageAltText}% + {\LWR@ImagesName\theLWR@externalfilecnt}{#6}{#3}{#7}% + }% don't detokenize + {% detokenize + \expandafter\LWR@lateximage@oneimage\expandafter{\detokenize\expandafter{\ImageAltText}}% + {\LWR@ImagesName\theLWR@externalfilecnt}{#6}{#3}{#7}% + }% detokenize + }% alt argument not given + }% not starred, no hash \LWR@ensuredoingapar% \LWR@htmltag{/span}% \ifbool{HTMLDebugComments}{% @@ -13470,7 +13590,7 @@ end -- not --version \begin{warpprint} -\NewDocumentEnvironment{lateximage}{s o s o o d()} +\NewDocumentEnvironment{lateximage}{s o s t? o o d()} {}{} \end{warpprint} @@ -13758,6 +13878,10 @@ end -- not --version \end{warpHTML} \begin{warpHTML} + +\VerifyCommand[lwarp][latex]{\label} + {3FB4D89D15FDC24A8AA3A2C581E3C48D} + \LetLtxMacro\LWR@orig@label\label \LetLtxMacro\label\LWR@new@label @@ -13771,17 +13895,13 @@ end -- not --version {{\detokenize\expandafter{\@currentlabelname}}} {} { - \typeout{***} - \typeout{***} - \typeout{*** Package lwarp warning:} - \typeout{*** Could not patch \string\label.} - \typeout{*** This may cause an error with section names or float captions} - \typeout{*** containing math, for example.} - \typeout{*** (Recent updates in the LaTeX kernel may make things work again.)} - \typeout{***} - \typeout{***} + \PackageWarning{lwarp}{% + Could not patch \string\label:\string\@currentlabelname.\MessageBreak + This may cause an error with section names or float captions\MessageBreak + containing math, for example.\MessageBreak + (Recent updates in the LaTeX kernel may make things work again% + } } - \end{warpHTML} @@ -14017,10 +14137,10 @@ end -- not --version } \newcommand*{\LWR@fboxstyle}{% -\LWR@findcurrenttextcolor% -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@origpound\LWR@tempcolor ; % -padding:\LWR@printlength{\fboxsep} ; % -color:\LWR@origpound\LWR@tempcolor% + \LWR@findcurrenttextcolor% + border:\LWR@printlength{\LWR@atleastonept} solid \LWR@origpound\LWR@tempcolor ; % + padding:\LWR@printlength{\fboxsep} ; % + color:\LWR@origpound\LWR@tempcolor% } \newcommand{\LWR@HTML@fbox}[1]{% \LWR@traceinfo{HTML fbox}% @@ -14156,20 +14276,25 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textbf} +\AtBeginDocument{ \IfPackageLoadedTF{nfssext-cfr}{ +\providerobustcmd{\texteb}[1]{} \DeclareRobustCommand{\LWR@HTML@texteb}[1]{% {% \LWR@HTML@ebweight% \InlineClass{texteb}{#1}% }% } - \LWR@formatted{texteb} -}{% if not loaded +} +{% if not loaded \providerobustcmd{\texteb}[1]{} } +} +\AtBeginDocument{ \IfPackageLoadedTF{nfssext-cfr}{ +\providerobustcmd{\textlg}[1]{} \DeclareRobustCommand{\LWR@HTML@textlg}[1]{% {% \LWR@HTML@lgweight% @@ -14181,6 +14306,7 @@ color:\LWR@origpound\LWR@tempcolor% }{% if not loaded \providerobustcmd{\textlg}[1]{} } +} \DeclareRobustCommand{\LWR@HTML@textrm}[1]{% {% @@ -14245,6 +14371,7 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textulc} +\AtBeginDocument{ \@ifundefined{textsi}{ \LetLtxMacro\LWR@print@textsi\LWR@print@textsc }{} @@ -14257,6 +14384,7 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{textsi} +} \DeclareRobustCommand{\LWR@HTML@textsl}[1]{% {% @@ -14364,21 +14492,27 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{bfseries} +\AtBeginDocument{ \IfPackageLoadedTF{nfssext-cfr}{ +\providerobustcmd{\ebweight}{} \newrobustcmd*{\LWR@HTML@ebweight}{% \LWR@print@ebweight% \renewcommand*{\LWR@f@series}{eb}% } \LWR@formatted{ebweight} }{} +} +\AtBeginDocument{ \IfPackageLoadedTF{nfssext-cfr}{ +\providerobustcmd{\lgweight}{} \newrobustcmd*{\LWR@HTML@lgweight}{% \LWR@print@lgweight% \renewcommand*{\LWR@f@series}{lg}% } \LWR@formatted{lgweight} }{} +} \newrobustcmd*{\LWR@HTML@rmfamily}{% \LWR@print@rmfamily% @@ -14505,7 +14639,6 @@ color:\LWR@origpound\LWR@tempcolor% \newcommand*{\LWR@currenttextcolor}{black} \newcommand*{\LWR@tempcolor}{} \newcommand*{\LWR@tempcolortwo}{} -\newcommand*{\LWR@tempcolorthree}{} \newcommand*{\LWR@findcurrenttextcolor}{% \renewcommand{\LWR@tempcolor}{000000}% } @@ -15186,7 +15319,8 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@mathjaxwarn{mathtools} {See the Lwarp manual regarding the disallowspaces\MessageBreak and showonlyrefs options, the alignat environment,\MessageBreak - and \protect\DeclarePairedDelimiter\space and related% + \protect\DeclarePairedDelimiter\space and related,\MessageBreak + and \cs{MakeAboxedCommand}% } \LWR@mathjaxwarn{mathspec} {Double quotes are removed, even inside \protect\text} |