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 | |
parent | b941504fe43d8fec69f16cafaa5a0ddd8fc943d8 (diff) |
lwarp (1feb22)
git-svn-id: svn://tug.org/texlive/trunk@61842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
65 files changed, 3965 insertions, 2519 deletions
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt index d6e0d17d051..5b687de6c9f 100644 --- a/Master/texmf-dist/doc/latex/lwarp/README.txt +++ b/Master/texmf-dist/doc/latex/lwarp/README.txt @@ -1,5 +1,5 @@ -LaTeX lwarp package v0.902 README.txt +LaTeX lwarp package v0.903 README.txt Files included are: @@ -41,7 +41,7 @@ and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. -Copyright 2016-2021 Brian Dunn +Copyright 2016-2022 Brian Dunn Homepage: http://BDTechConcepts.com Email: bd@BDTechConcepts.com diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf Binary files differindex e6119bc4e80..a9286ae0f90 100644 --- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf +++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua index eddb459816f..b0d9a1c6f49 100755 --- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua +++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua @@ -1,8 +1,8 @@ #!/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 () @@ -383,8 +383,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 diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index 743e616dc11..98001980204 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx @@ -1,7 +1,7 @@ % % \iffalse meta-comment % -% Copyright 2016-2021 Brian Dunn +% Copyright 2016-2022 Brian Dunn % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -16,7 +16,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{lwarp} -%<package> [2021/10/01 v0.902 Allows LaTeX to directly produce HTML5 output.] +%<package> [2022/02/01 v0.903 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -197,7 +197,7 @@ % Indexing, logos, \Describexxxx, etc: -\usepackage{dtxdescribe}[2021/09/02] +\usepackage{dtxdescribe}[2021/12/18] \usepackage{splitidx} @@ -267,7 +267,7 @@ Keywords={LaTeX, HTML, conversion}% \newcommand*{\AV}{\acro{A}\Slash\acro{V}} \makeatletter -\@ifpackageloaded{erewhon}{\renewcommand*{\HTMLfive}{\acro{HTML}\textosf{5}}}{} +\IfPackageLoadedTF{erewhon}{\renewcommand*{\HTMLfive}{\acro{HTML}\textosf{5}}}{} \makeatother \newcommand{\credits}[1]{{\footnotesize(\textit{Emulates or patches code by} \textsc{#1}.)}} @@ -1837,6 +1837,7 @@ Do not use the \optn{scale} option, since it is not well supported by \HTML\ bro \margintag{options} \optn{origin}, \optn{rotate} and \optn{scale}, plus new \optn{class} and \optn{alt} keys. +(\optn{alt} has recently been incorportated into \pkg{graphicx} itself.) With \HTML\ output, \cs{includegraphics} accepts an optional \margintag{\HTML\ class} @@ -2929,6 +2930,10 @@ The result usually looks fine, and otherwise is enough to get the meaning across Document modifications required for \MathJax: \begin{itemize} +\item Place \cs{sisetup} in the preamble before \texttt{\cs{begin}\{document\}}. + \watchout[\cs{sisetup}] + Changes made later may be ignored, especially with \MathJax. + The \MathJax\ emulation also ignores most macro options. \item Custom units may be added with \cs{CustomizeMathJax}. \margintag{custom units} See the \pkg{lwarp-siunitx} code for examples. @@ -2942,6 +2947,8 @@ Document modifications required for \MathJax: \cs{cubic}\textred{\{}\cs{centi}\cs{meter}\textred{\}} \end{sourcedisplay} Single units do not require braces. +\item For \cs{numlist}, the argument is printed as text as-is, + so use space between semicolons for improved readability. \end{itemize} Also see \nameref{sec:limitsmathjax}, \cref{sec:limitsmathjax}. @@ -3083,6 +3090,14 @@ using \cmds{pdflatex filename.tex} or similar, after which \prog{lwarpmk} may then be used with the new configuration files. } +\newcommand*{\newimagechecksums}{ +Due to changes in how automatically-generated +\watchout[New images] +\SVG\ image file names are computed, +after \cmds{lwarpmk html} use \cmds{lwarpmk cleanlimages} a single time, +and then \cmds{lwarpmk limages} to generate the new images. +} + \newcommand*{\describehashing}{% If starred, a hashed filename is used.\margintag{image filename hashing} @@ -3097,7 +3112,7 @@ but also enough additional information to provide a unique hash. An example is when the expression is a complicated \TeX\ expression, which would not copy/paste well. A simplified tag may be used, while the complicated expression is -duplicated in the additional hashing argument. +used in the additional hashing argument to ensure a unique image. Another example is when the expression is simple, but the image depends on options. These options may be decoded into text form and @@ -3137,6 +3152,11 @@ This boolean may be tested by the user for later use. \setcounter{IndexColumns}{2} + +% To color the text of the listing, but this makes it harder to read: +% \apptocmd{\MacroFont}{\color{blue!40!black}}{}{} + + \DisableCrossrefs \CodelineIndex \RecordChanges @@ -3152,7 +3172,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{54254} +% \CheckSum{54471} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -3296,6 +3316,8 @@ This boolean may be tested by the user for later use. % \changes{v0.900}{2021/07/17}{\ 2021/07/17} % \changes{v0.901}{2021/08/27}{\ 2021/08/27} % \changes{v0.902}{2021/10/01}{\ 2021/10/01} +% \changes{v0.903}{2021/12/23}{Now uses \cs{IfPackageLoadedTF}, etc.} +% \changes{v0.903}{2022/02/01}{\ 2022/02/01} @@ -3328,7 +3350,7 @@ This boolean may be tested by the user for later use. % % \fileversion{} \Dash \filedate % -% {\small\textcopyright{} 2016--2021} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com} +% {\small\textcopyright{} 2016--2022} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com} % % \end{center} % @@ -3530,6 +3552,28 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.903:] Various updates and improvements. +% \begin{itemize} +% \item Error if \prog{pdftotext} not available. +% \margintag{\prog{lwarpmk}} +% Ensures that \brand{poppler} programs are installed. +% \item \prog{ps2pdf}: Allow transparency due to recent changes in \prog{ps2pdf}. +% \margintag{core} +% \item \newimagechecksums +% \item Improved back refs. +% \item Fixed \env{verbatim*}. +% \item Various internal updates for recent \LaTeX\ release. +% \item \pkg{cuted}: Updated to v2.0. +% \margintag{packages} +% \item \pkg{flushend}: Updated to v4.0. +% \item \pkg{mathalpha}: Updated for v1.14+. +% \item \pkg{minted}: Updated to v2.6. +% \item \pkg{cases}: Updated to v3.2. +% \item \pkg{siunitx} with \MathJax: Improved \cs{per}, \cs{numlist}, \cs{SIlist}, +% comma decimal points. +% \item Added \pkg{showlabels}, \pkg{wrapfig2}. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.902:] \pkg{beamerarticle}, footnotes, paragraph tags. % \begin{itemize} % \item Fixed footnotes inside descriptions, minipages, \pkg{amsthm}, \cs{nameref}. @@ -5931,7 +5975,7 @@ This boolean may be tested by the user for later use. % \epkg{nonfloat}, \mpkg{picinpar}, \ipkg{placeins}, \epkg{rotfloat}, \ipkg{stfloats}, % \mpkg{subcaption}, \mpkg{subfig}, \epkg{subfigure}, \spkg{subfloat}, % \epkg{swfigure}, -% \epkg{topcapt}, \epkg{trivfloat}, \epkg{wrapfig}. \\ +% \epkg{topcapt}, \epkg{trivfloat}, \epkg{wrapfig}, \epkg{wrapfig2}. \\ % % \midrule % @@ -6137,6 +6181,7 @@ This boolean may be tested by the user for later use. % % Debug: & \ipkg{chkfloat}, \ipkg{cmdtrack}, \ipkg{dprogress}, \mpkg{lipsum}, % \ipkg{lua-visual-debug}, \mpkg{mwe}, \ipkg{refcheck}, +% \ipkg{showlabels}, \ipkg{showkeys}, % \ipkg{srcltx}, \ipkg{srctex}, \ipkg{vpe}, \ipkg{xbmks}. \\ % % \midrule @@ -6655,6 +6700,13 @@ This boolean may be tested by the user for later use. % % \changes{v0.27}{2017/04/02}{Docs: Installing utilities for \brand{MacOS}.} % +% \trouble{poppler=\prog{poppler}>install} +% \trouble{perl=\prog{perl}} +% \trouble{pdfcrop=\prog{pdfcrop}} +% \trouble{pdftotext=\prog{pdftotex}} +% \trouble{pdfseparate=\prog{pdfseparate}} +% \trouble{pdftocairo=\prog{pdftocairo}} +% % \begin{description} % \item [To test for the existence of the additional utilities:] \ % @@ -7016,13 +7068,13 @@ This boolean may be tested by the user for later use. % % \qquad Open the file |tutorial.html| in a web browser. % -% Note that math is still displayed as its \attribute{alt} tag, which is -% \margintag{math} -% the plain-text \LaTeX\ source, -% until the -% images of the math expressions have been generated. Math may be -% displayed as \SVG\ images or by a \MathJax\ script, as seen in -% \cref{sec:tutorialsvgmath,sec:tutorialmathjax}. +% Note that math images have not yet been generated, +% \margintag{math images} +% \changes{v0.903}{2022/01/24}{Docs: Math images.} +% so math is still displayed as its \attribute{alt} tag, which is +% set to the plain-text \LaTeX\ source for that expression. +% Math may be displayed as \SVG\ images (\cref{sec:tutorialsvgmath}) +% or by a \MathJax\ script (\cref{sec:tutorialmathjax}). % % \item Force a recompile: % \userentry{lwarpmk again} @@ -8939,6 +8991,9 @@ This boolean may be tested by the user for later use. % Do not nest \env{warpsvg} inside itself. \watchout[nesting] % \env{warpsvg} may be used inside \env{warpHTML}. % +% To define macros or environments which behave differently depending +% \margintag{\cs{LWR@formatted}} +% on print or \HTML\ output, see \cref{sec:definingprinthtml}. % % % \subsection{Commands to be placed into the \env{warpprint} environment} @@ -11104,14 +11159,14 @@ This boolean may be tested by the user for later use. % { % latex tm \LWRopseq % dvips -o tm-pics.ps tm.dvi \LWRopseq -% ps2pdf tm-pics.ps \LWRopseq +% ps2pdf -dALLOWPSTRANSPARENCY tm-pics.ps \LWRopseq % pdflatex tm.tex % } , % HTMLLatexCmd= % { % latex tm_html \LWRopseq % dvips -o tm_html-pics.ps tm_html.dvi \LWRopseq -% ps2pdf tm_html-pics.ps \LWRopseq +% ps2pdf -dALLOWPSTRANSPARENCY tm_html-pics.ps \LWRopseq % pdflatex tm_html.tex % } % } @@ -12841,13 +12896,25 @@ This boolean may be tested by the user for later use. % % \section{Early package requirements} % -% \DescribePackage{etoolbox} -% Provides \cs{ifbool} and other functions. % -% \DescribePackage{xpatch} -% Patches macros with optional arguments. +% \DescribePackage{etoolbox} Provides \cs{ifbool} and other functions. +% % \begin{macrocode} \RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc. +% \end{macrocode} +% +% Patch to fix copy of environment with a \cs{par}: +% +% \href{https://github.com/josephwright/etoolbox/issues/35}{https://github.com/josephwright/etoolbox/issues/35} +% \changes{v0.903}{2021/12/21}{\pkg{etoolbox}: Patch for \cs{NewCommandCopy}.} +% \begin{macrocode} +\long\def\etb@carsquare#1#2#3\@nil{#1#2} +% \end{macrocode} +% +% +% \DescribePackage{xpatch} Patches macros with optional arguments. +% +% \begin{macrocode} \RequirePackage{xpatch} % \end{macrocode} @@ -12902,7 +12969,7 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \newcommand*{\LWR@loadafter}[1]{% -\@ifpackageloaded{#1} +\IfPackageLoadedTF{#1} { \PackageError{lwarp} {% @@ -12931,7 +12998,7 @@ This boolean may be tested by the user for later use. % % \changes{v0.45}{2017/12/03}{Added.} % \begin{macrocode} -\@ifclassloaded{memoir} +\IfClassLoadedTF{memoir} {\newcommand*{\LWR@notmemoirloadafter}[1]{}} {\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter} % \end{macrocode} @@ -12946,17 +13013,17 @@ This boolean may be tested by the user for later use. % \begin{macrocode} \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]{}}{} % \end{macrocode} % \end{macro} @@ -12968,7 +13035,7 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \newcommand*{\LWR@loadbefore}[1]{% -\@ifpackageloaded{#1} +\IfPackageLoadedTF{#1} {\relax} { \PackageError{lwarp} @@ -13065,7 +13132,7 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \newcommand*{\LWR@earlyloadnever}[2]{% - \@ifpackageloaded{#1}{% + \IfPackageLoadedTF{#1}{% \LWR@loadnever{#1}{#2}% }{}% } @@ -13083,7 +13150,7 @@ This boolean may be tested by the user for later use. % % \begin{macrocode} \newcommand*{\LWR@earlyclassloadnever}[2]{% -\@ifclassloaded{#1}{% +\IfClassLoadedTF{#1}{% \PackageError{lwarp} {% Class #1 is not supported\MessageBreak @@ -13164,7 +13231,7 @@ This boolean may be tested by the user for later use. \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} @@ -13187,7 +13254,12 @@ This boolean may be tested by the user for later use. \LWR@checkloadnever{arraycols}{} \LWR@checkloadnever{bidi}{} \LWR@checkloadnever{cals}{} -\LWR@checkloadnever{cellspace}{} +% \end{macrocode} +% \changes{v0.903}{2022/01/06}{Alternative for \pkg{cellspace}.} +% \begin{macrocode} +\LWR@checkloadnever{cellspace}{tabls} +% \end{macrocode} +% \begin{macrocode} \LWR@checkloadnever{cgloss4e}{} \LWR@checkloadnever{collcell}{} \LWR@checkloadnever{colophon}{} @@ -13285,7 +13357,7 @@ This boolean may be tested by the user for later use. % % The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}: % \begin{macrocode} -\@ifpackageloaded{xeCJK}{}{ +\IfPackageLoadedTF{xeCJK}{}{ \LWR@checkloadnever{CJK}{ctex, xeCJK} \LWR@checkloadnever{CJKutf8}{ctex, xeCJK} } @@ -13764,6 +13836,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{shadow} \LWR@loadafter{shapepar} \LWR@notmemoirloadafter{showidx} +\LWR@loadafter{showlabels} \LWR@loadafter{showkeys} \LWR@loadafter{showtags} \LWR@loadafter{shuffle} @@ -13881,6 +13954,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{widows-and-orphans} \LWR@loadafter{witharrows} \LWR@loadafter{wrapfig} +\LWR@loadafter{wrapfig2} \LWR@loadafter{xbmks} \LWR@loadafter{xcolor} \LWR@loadafter{xechangebar} @@ -13966,8 +14040,8 @@ This boolean may be tested by the user for later use. \newcommand*{\LWR@pdfencoding}{% \RequirePackage[T1]{fontenc} - \@ifpackageloaded{inputenc}{}{ - \@ifpackageloaded{inputenx}{}{ + \IfPackageLoadedTF{inputenc}{}{ + \IfPackageLoadedTF{inputenx}{}{ \RequirePackage[utf8]{inputenc} } } @@ -14093,7 +14167,7 @@ This boolean may be tested by the user for later use. % \begin{macrocode} \ifxetexorluatex \AtBeginDocument{ - \@ifpackageloaded{kpfonts}{ + \IfPackageLoadedTF{kpfonts}{ \PackageError{lwarp} {% When using XeLaTeX or LuaLaTeX,\MessageBreak @@ -14173,7 +14247,7 @@ This boolean may be tested by the user for later use. % \end{macro} -% \subsection{Patching} +% \subsection{Patching macros} % \begin{macro}{\LWR@patcherror} \marg{packagename} \marg{macroname} % @@ -14193,6 +14267,35 @@ This boolean may be tested by the user for later use. % \end{macro} % % +% \subsection{Copying macros} +% +% \begin{macro}{\csNewCommandCopycs} \marg{dest csname} \marg{source csname} +% +% Given a cs-name for each, copies a macro to a new definition. +% +% \changes{v0.903}{2021/12/21}{Added.} +% \begin{macrocode} +\providecommand*{\csNewCommandCopycs}[2]{% + \expandafter\NewCommandCopy\csname#1\expandafter\endcsname% + \csname#2\endcsname% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\NewEnvironmentCopy} \marg{dest} \marg{source} +% +% Copies an environment to a new definition. +% +% \changes{v0.903}{2021/12/21}{Added.} +% \begin{macrocode} +\providecommand*{\NewEnvironmentCopy}[2]{% + \csNewCommandCopycs{#1}{#2}% + \csNewCommandCopycs{end#1}{end#2}% +} +% \end{macrocode} +% \end{macro} +% +% % \subsection{Chinese text isolation} % % \begin{macro}{\LWR@isolate} \marg{text} @@ -14206,11 +14309,11 @@ This boolean may be tested by the user for later use. % \begin{macrocode} \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}% }{} % \end{macrocode} @@ -15384,7 +15487,7 @@ This boolean may be tested by the user for later use. % \changes{v0.50}{2018/02/24}{Fix: Load \pkg{fontspec} if necessary.} % \begin{macrocode} \ifxetexorluatex -\@ifpackageloaded{fontspec}{}{ +\IfPackageLoadedTF{fontspec}{}{ \usepackage[no-math]{fontspec} } % \end{macrocode} @@ -15459,7 +15562,7 @@ This boolean may be tested by the user for later use. % \LaTeX{} dash and quote ligatures, which may fail on older browers % but at least won't corrupt written words. % \begin{macrocode} -\RequirePackage {microtype} +\RequirePackage{microtype} \microtypesetup{ protrusion=false, @@ -15560,7 +15663,7 @@ This boolean may be tested by the user for later use. % These will be replaced by \pkg{lwarp} \cs{AtBeginDocument} % with a very large page size to reduce \HTML\ tag overflow off the page. % \begin{macrocode} -\@ifpackageloaded{geometry} +\IfPackageLoadedTF{geometry} {}{ \RequirePackage[ reset, @@ -15763,18 +15866,8 @@ This boolean may be tested by the user for later use. % Used to emulate \cs{nameref}. % \begin{macrocode} \RequirePackage{gettitlestring} -% \end{macrocode} -% \DescribePackage{everyhook} -% -% \pkg{everyhook} is used to patch paragraph handling. -% -% \changes{v0.63}{2018/11/29}{\pkg{everyhook}: Fix for \pkg{bxjs*} classes.} -% \begin{macrocode} -\@ifundefined{bxjs@everypar}{}{\let\everypar\bxjs@everypar} - -\RequirePackage{everyhook} \end{warpHTML} % \end{macrocode} @@ -15804,7 +15897,7 @@ This boolean may be tested by the user for later use. \LetLtxMacro\LWR@orig@filec@ntents\filec@ntents - \@ifpackagelater{filecontents}{2011/10/08} + \IfPackageAtLeastTF{filecontents}{2011/10/08} { % \end{macrocode} % For a newer version of the \pkg{filecontents} package, simply @@ -16288,7 +16381,7 @@ This boolean may be tested by the user for later use. % if a package has already been loaded, it is loaded again with its original options. % \changes{v0.79}{2019/12/31}{Fix: \pkg{catoptions}.} % \begin{macrocode} - \@ifpackageloaded{#1}{% + \IfPackageLoadedTF{#1}{% \edef\LWR@tempone{\csuse{opt@#1.sty}}% \IfValueTF{#2}% {% @@ -16624,11 +16717,17 @@ This boolean may be tested by the user for later use. % \section{Defining print and \HTML\ versions of macros and environments} % \label{sec:definingprinthtml} -% \gindex{print>selecting print/HTML definitions} -% \gindex{HTML>selecting print/HTML definitions} +% \gindex{print>defining print \Slash HTML macros \Slash envs} +% \gindex{HTML>defining print \Slash HTML macros \Slash envs} +% \gindex{LWR@formatted=\cs{LWR@formatted} print \Slash HTML} +% \gindex{defining print \Slash HTML macros \Slash envs} +% +% \changes{v0.903}{2021/12/19}{Docs: Now using \cs{NewCommandCopy}, \pkg{xparse} OK.} % -% The following refers to defining objects inside \pkg{lwarp}, and is not -% for the user's document. +% The following refers to defining objects inside \pkg{lwarp}, +% and may also be of some use for package authors to adapt their +% packages for \pkg{lwarp}. +% The following is not for the user's document. % % Many macros and environments must be provided as both print and \HTML\ versions. % @@ -16648,97 +16747,51 @@ This boolean may be tested by the user for later use. % % \begin{description} % -% \item[For a preexisting macro, not defined with \pkg{xparse}:] An \HTML\ version +% \item[For a preexisting macro:] An \HTML\ version % is provided with a special name, inside a \env{warpHTML} environment, % then \cs{LWR@formatted} is used to redefine and patch various macros: % \needspace{5\baselineskip} % \begin{sourceverb} % \begin{warpHTML} -% \newcommand{\LWR@HTML@name}{...}% may also use xparse +% \newcommand{\LWR@HTML@name}{...} % % \LWR@formatted{name} % \end{warpHTML} % \end{sourceverb} -% |\LWR@formatted{name}| copies the original print version, +% |\LWR@formatted{name}| copies the original print version to a new +% name \cs{LWR@print@<name>}, % then redefines \cs{name} to use either the print or \HTML\ version depending -% on which mode \pkg{lwarp} is using. \pkg{xparse} may be used to -% define the new \HTML\ version, even if the original did not use \pkg{xparse}. -% \pkg{expl3} syntax may be used as well. +% on which mode \pkg{lwarp} is using. -% \item[For a preexisiting environment, not defined with \pkg{xparse}:] The process +% \item[For a preexisiting environment:] The process % is similar. Note the use of \cs{LWR@formattedenv} instead of \cs{LWR@formatted}. % \needspace{5\baselineskip} % \begin{sourceverb} % \begin{warpHTML} -% \newenvironment{LWR@HTML@name}{...}% may also use xparse +% \newenvironment{LWR@HTML@name}{...}{..} % % \LWR@formattedenv{name} % \end{warpHTML} % \end{sourceverb} -% \item[If the original used \pkg{xparse}:] A copy must be made using a new name: -% \needspace{7\baselineskip} -% \begin{sourceverb} -% \begin{warpHTML} -% \NewDocumentCommand{\LWR@print@name}{..}{..}% copy the original -% -% \NewDocumentCommand{\LWR@HTML@name}{..}{..}% or use \newcommand -% -% \LWR@formatted{name} -% \end{warpHTML} -% \end{sourceverb} -% Similar for an environment, using \cs{LWR@formattedenv}. -% (\cs{LWR@formatted} and \cs{LWR@formattedenv} use \cs{LetLtxMacro} to -% copy the original print definiton, -% which may not work with macros and environments created by \pkg{xparse}, -% so the print version must be manually recreated in the \pkg{lwarp} source.) - -% \item[For a new macro or environment, not using \pkg{xparse} for the print version:] \ +% \item[For a new macro or environment:] The print version is defined inside +% \env{warpall}, so that it can also be seen and modified by during \HTML\ outut. % \needspace{9\baselineskip} % \begin{sourceverb} % \begin{warpall} -% \newcommand{\name}{...}% NOT xparse! +% \newcommand{\name}{...}% The print version. % \end{warpall} % % \begin{warpHTML} -% \newcommand{\LWR@HTML@name}{...}% may use xparse for HTML +% \newcommand{\LWR@HTML@name}{...} % % \LWR@formatted{name} % \end{warpHTML} % \end{sourceverb} -% Similar for an environment. -% The plain \cs{name} or environment \env{name} is used for the printed -% version, and is placed inside \env{warpall}. -% \pkg{xparse} may be used for the \cs{LWR@HTML@<name>} version. -% \pkg{expl3} syntax may be used for the print and \HTML\ versions. -% -% \item [For a new macro or environment, using \pkg{xparse}:] -% It is possible to use \pkg{xparse} for an entirely new macro or environment -% by defining the \cs{LWR@print@<name>} version with \pkg{xparse}, along with -% \cs{name} defined without \pkg{xparse} to refer directly to the \cs{LWR@print} -% version: -% \needspace{16\baselineskip} -% \begin{sourceverb} -% \begin{warpall} -% \NewDocumentCommand{\LWR@print@name}{...} {...}% -or- -% \NewDocumentEnvironment{\LWR@print@name}{...} {...} {...} -% -% % Simply a call to \LWR@print@name: -% \newcommand{\name}{\LWR@print@name}% -or- -% \newenvironment{name}{\LWR@print@name}{\endLWR@print@name} -% \end{warpall} -% -% \begin{warpHTML} -% \NewDocumentCommand{\LWR@HTML@name}{...} {...}% -or- -% \NewDocumentEnvironment{\LWR@HTML@name}{...} {...} {...} -% -% \LWR@formatted{name}% -or- -% \LWR@formattedenv{name} -% \end{warpHTML} -% \end{sourceverb} +% Similar for an environment, using \cs{formattedenv}. % % \end{description} -% + % In general, \cs{LWR@formatted} or \cs{LWR@formattedenv} are placed inside % a \env{warpHTML} environment, and while producing an \HTML\ document % they do the following: @@ -16755,16 +16808,16 @@ This boolean may be tested by the user for later use. % used, as well as any new definitions defined in \env{warpall} above. % \item When \pkg{lwarp} is generating \HTML\ output, \cs{LWR@formatting} is % set to ``|HTML|'', and \cs{name} is directed to \cs{LWR@HTML@<name>}. +% For an environment, \cs{endname} is directed to \cs{endLWR@HTML@<name>}. % \item When \pkg{lwarp} is generating \HTML\ output % but enters a \env{lateximage} environment, % or for some other reason needs to draw images using the original print % defintions, \cs{LWR@formatting} is changed to ``|print|'' and \cs{name} is % then redirected to \cs{LWR@print@<name>}, which was the original \cs{name}. +% \item Since the new \cs{name} does not process any arguments, +% they are processed by \cs{LWR@print@name} or \cs{LWR@HTML@name}. % \end{itemize} % -% Since arguments are not handled by the new \cs{name}, any star and other arguments -% are processed by the print or \HTML\ version. -% % Expandable versions are also provided as well. % These usually are necessary for anything which could appear inside a \env{tabular}, % without which a ``|Misplaced \omit|'' error may occur. @@ -16861,12 +16914,12 @@ This boolean may be tested by the user for later use. % where <format> is set by \cs{LWR@formatting}, and is |print| or |HTML|. % % \changes{v0.893}{2020/11/15}{Improved error handling.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \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{% @@ -16888,12 +16941,12 @@ This boolean may be tested by the user for later use. % An expandable version of \cs{LWR@formatted}. % % \changes{v0.893}{2020/11/15}{Improved error handling.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \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{% @@ -16917,14 +16970,13 @@ This boolean may be tested by the user for later use. % where <format> is set by \cs{LWR@formatting}, and is |print| or |HTML|. % % \changes{v0.893}{2020/11/15}{Improved error handling.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \newcommand*{\LWR@formattedenv}[1]{% \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}{}% {% @@ -16943,14 +16995,13 @@ This boolean may be tested by the user for later use. % An expandable version of \env{LWR@formattedenv}. % % \changes{v0.893}{2020/11/15}{Improved error handling.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} \newcommand*{\LWR@expandableformattedenv}[1]{% \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}{}% {% @@ -17236,7 +17287,7 @@ This boolean may be tested by the user for later use. \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 }{} @@ -17764,16 +17815,17 @@ This boolean may be tested by the user for later use. }{% dvips % \end{macrocode} % For \DVI\ \prog{latex} with \prog{dvips} and \prog{ps2pdf}: +% \changes{v0.903}{2021/10/04}{Allow transparency.} % \begin{macrocode} \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 } } } @@ -17785,12 +17837,12 @@ This boolean may be tested by the user for later use. % \changes{v0.63}{2018/11/25}{\pkg{ujarticle} and related: Compile options.} % \changes{v0.64}{2018/12/07}{\pkg{utarticle} and related: Added.} % \begin{macrocode} -\@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}{} % \end{macrocode} % Only make the setting permanent if the original was empty: % \changes{v0.61}{2018/09/20}{Added \optn{PrintLatexCmd} option.} @@ -17969,6 +18021,7 @@ This boolean may be tested by the user for later use. % \changes{v0.902}{2021/09/15}{\filenm{lwarp.css}: Centered \element{div} \attribute{author}.} % \changes{v0.902}{2021/09/15}{\filenm{lwarp.css}: Added \pkg{beamerarticle}.} % \changes{v0.902}{2021/09/28}{\filenm{lwarp.css}: Added \attribute{textnormal}.} +% \changes{v0.903}{2022/01/02}{\filenm{lwarp.css}: Improved pars in lists.} % % ^^A *lwarp.css % @@ -17978,7 +18031,7 @@ This boolean may be tested by the user for later use. \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 */ @@ -18490,7 +18543,7 @@ div.bodywithoutsidetoc main.bodycontainer { } section.textbody div.footnotes{ - margin: 3ex 2em .5ex 2em ; + margin: 1ex 2em 2ex 2em ; border-bottom: 2px solid silver ; } @@ -18527,6 +18580,8 @@ body dir, body menu { li { margin: 0ex 0em 1ex 0em; } +li.p { display: inline ; } + html { margin: 0; padding: 0; @@ -20807,6 +20862,7 @@ MathJax = { % \changes{v0.84}{2020/03/30}{\prog{lwarpmk}: \optn{clean} also removes \filenm{comment_*.cut}} % \changes{v0.89}{2020/08/29}{\prog{lwarpmk}: \optn{clean} also removes \filenm{*.bbl}} % \changes{v0.899}{2021/05/30}{\prog{lwarpmk}: Warn if \pkg{lwarp} package not detected.} +% \changes{v0.903}{2021/11/30}{\prog{lwarpmk}: Error if \prog{pdftotext} not available.} % % The following is only generated if the \optn{lwarpmk} option % was given to \pkg{lwarp}. @@ -20819,10 +20875,10 @@ 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 () @@ -21219,8 +21275,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 @@ -22079,15 +22142,40 @@ end -- not --version % \begin{macro}{\LWR@setexparray} \marg{name} \marg{index} \marg{contents} % \changes{v0.66}{2018/12/31}{Fix with \cs{par}.} % \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.} +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} +\newbool{LWR@setexparray@doingparhooks} + \NewDocumentCommand{\LWR@setexparray}{m m m}{% - \let\LWR@temp@par\par% +% \end{macrocode} +% +% Temporarily disable paragraph handling during the assignment. +% This is not done in a group with global assignments because +% a table may be nested. +% \begin{macrocode} + \let\ifLWR@setexparray@doingparhooks\ifLWR@doingparhooks% + \setbool{LWR@doingparhooks}{false}% + \let\LWR@setexparray@par\par% \let\par\relax% - \edef\LWR@thisexparrayname{#1#2}% +% \end{macrocode} +% +% The name of the control sequence is the given name with the +% index appended. +% \begin{macrocode} + \xdef\LWR@thisexparrayname{#1#2}% +% \end{macrocode} +% +% Locally assign the value to the control sequence: +% \begin{macrocode} \ifstrempty{#3}% {\csdef{\LWR@thisexparrayname}{}}% {\csedef{\LWR@thisexparrayname}{#3}}% - \let\par\LWR@temp@par% +% \end{macrocode} +% +% Restore the paragraph handling: +% \begin{macrocode} + \let\ifLWR@doingparhooks\ifLWR@setexparray@doingparhooks% + \let\par\LWR@setexparray@par% } % \end{macrocode} % \end{macro} @@ -23012,6 +23100,7 @@ end -- not --version % \subsection{Hook while processing tags} % +% \DescribeHook[lwarp]{\cs{LWR@hook@processingtags}} % This is used to disable special text processing while processing \HTML\ tags. % Special processing includes that done by % \pkg{babel-french}, \pkg{luavina}, \pkg{xevlna}. @@ -23197,60 +23286,60 @@ end -- not --version % \changes{v0.84}{2020/04/22}{Nullified \env{minipage}, \cs{parbox} inside a span.} % \changes{v0.84}{2020/04/22}{Issue warnings inside a span.} % \changes{v0.896}{2021/03/05}{Issue \env{BlockClassWP} warning inside a span.} +% \changes{v0.903}{2021/12/17}{Par handling.} % % \begin{macrocode} \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}% + \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}% % \end{macrocode} % Nullify several objects inside the span: % ^^A {\LWR@subhtmlelementclass{span}{inlineminipage}}% % ^^A {\LWR@htmltagc{/span}}% % \begin{macrocode} - \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}% + \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} % \end{macrocode} % \end{environment} @@ -23265,12 +23354,12 @@ end -- not --version % % \begin{macrocode} \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}% } % \end{macrocode} % \end{macro} @@ -23303,9 +23392,7 @@ end -- not --version % Print an \HTML\ tag: \textless{}tag\textgreater{} % \begin{macrocode} \newcommand*{\LWR@htmltag}[1]{% -% \LWR@traceinfo{LWR@htmltagb !\detokenize{#1}!}% -\LWR@htmltagc{#1}% -% \LWR@traceinfo{LWR@htmltagb: done}% + \LWR@htmltagc{#1}% } % \end{macrocode} % \end{macro} @@ -23321,25 +23408,21 @@ end -- not --version % \changes{v0.85}{2020/04/29}{Fix: Added print macros for \pkg{fontspec}.} % \begin{macrocode} \newcommand*{\LWR@htmlopencomment}{% -{% % \LWR@traceinfo{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}{% -{% % \LWR@traceinfo{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% } % \end{macrocode} % \end{macro} @@ -23352,16 +23435,16 @@ end -- not --version % \changes{v0.893}{2020/10/16}{Disabled in math mode.} % \begin{macrocode} \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% } % \end{macrocode} % \end{macro} @@ -23370,16 +23453,16 @@ end -- not --version % \begin{macro}{\LWR@htmlblockcomment} \marg{comment} % \begin{macrocode} \newcommand{\LWR@htmlblockcomment}[1] -{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars} + {\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars} % \end{macrocode} % \end{macro} % \begin{macro}{\LWR@htmlblocktag} \marg{tag} print a stand-alone \HTML\ tag % \begin{macrocode} \newcommand*{\LWR@htmlblocktag}[1]{% -\LWR@stoppars% -\LWR@htmltag{#1}% -\LWR@startpars% + \LWR@stoppars% + \LWR@htmltag{#1}% + \LWR@startpars% } % \end{macrocode} % \end{macro} @@ -23408,24 +23491,24 @@ end -- not --version % % \begin{macrocode} \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}% } % \end{macrocode} % \end{macro} @@ -23497,12 +23580,12 @@ end -- not --version % \changes{v0.73}{2019/06/26}{Vertical space.} % \begin{macrocode} \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 } % \end{macrocode} % \end{macro} @@ -23516,7 +23599,7 @@ end -- not --version % \begin{macro}{\LWR@htmlelement} \marg{element} % \begin{macrocode} \newcommand*{\LWR@htmlelement}[1]{% -\LWR@htmlblocktag{#1} + \LWR@htmlblocktag{#1} } % \end{macrocode} % \end{macro} @@ -23524,9 +23607,9 @@ end -- not --version % \begin{macro}{\LWR@htmlelementend} \marg{element} % \begin{macrocode} \newcommand*{\LWR@htmlelementend}[1]{% -\LWR@stoppars -\LWR@htmltag{/#1} -\LWR@startpars + \LWR@stoppars + \LWR@htmltag{/#1} + \LWR@startpars } \end{warpHTML} @@ -23558,12 +23641,13 @@ end -- not --version % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % -% \codeprint +% \codeall % \begin{macrocode} -\begin{warpprint} +\begin{warpall} \NewDocumentEnvironment{BlockClass}{o D(){} m}{}{} -\end{warpprint} +\end{warpall} % \end{macrocode} % \end{environment} % @@ -23571,8 +23655,6 @@ end -- not --version % \begin{macrocode} \begin{warpHTML} -\NewDocumentEnvironment{LWR@print@BlockClass}{o D(){} m}{}{}% - \NewDocumentEnvironment{LWR@HTML@BlockClass}{o D(){} m}% {\LWR@htmldivclass[#1](#2){#3}}% {\LWR@htmldivclassend{#3}} @@ -23623,30 +23705,29 @@ end -- not --version % \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} % \changes{v0.62}{2018/10/24}{Added optional word-processing style. Replaces \cs{LWR@HTMLtextstyle}.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % -% \codeprint +% \codeall % \begin{macrocode} -\begin{warpprint} +\begin{warpall} \NewDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{#4}% -\end{warpprint} +\end{warpall} % \end{macrocode} % \end{macro} % % \codehtml % \begin{macrocode} \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} @@ -23667,48 +23748,47 @@ end -- not --version % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} % \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.} % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % -% \codeprint +% \codeall % \begin{macrocode} -\begin{warpprint} +\begin{warpall} \NewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}{}{} -\end{warpprint} +\end{warpall} % \end{macrocode} % \end{environment} % % \codehtml % \begin{macrocode} \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@stoppars% + \ifbool{FormatWP}% + {% + \addtocounter{LWR@thisautoidWP}{1}% % \end{macrocode} % \changes{v0.65}{2018/12/21}{Fix space between class and id.} % \begin{macrocode} - \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@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} @@ -23775,14 +23855,16 @@ end -- not --version % Paragraph tags are or are not allowed depending on many conditions. % \Cref{sec:parstartstop} has high-level commands which allow % paragraph-tag generation to start/stop. -% Even when allowed (\cs{LWR@doingstartpars}), +% Even when allowed (\bool{LWR@doingstartpars}), % tags are not generated until a \LaTeX{} paragraph -% is being used (\cs{LWR@doingapar}). -% |LWR@lateximagedepth| is used to prevent nesting tags inside -% a |lateximage|. -% |LWR@spandepth| is used to prevent nesting paragraph tags inside +% is being used (\bool{LWR@doingapar}). +% \ctr{LWR@lateximagedepth} is used to prevent nesting tags inside +% a \env{lateximage}. +% \ctr{LWR@spandepth} is used to prevent nesting paragraph tags inside % a paragraph, which became important inside \cs{fbox} commands and other spans. - +% +% The \LaTeX\ paragraph hooks are used to manage tag creation. +% % \codehtml % \begin{macrocode} \begin{warpHTML} @@ -23797,6 +23879,31 @@ end -- not --version % \end{macrocode} +% \DescribeBoolean{LWR@doingparhooks} +% Tells whether the \pkg{lwarp} paragraph hooks are to be active. +% \begin{macrocode} +\newbool{LWR@doingparhooks} +\boolfalse{LWR@doingparhooks} +% \end{macrocode} + +% \DescribeBoolean{LWR@in@multirow@par} +% Tells whether to generate break instead of paragraph tags inside a \cs{multirow}. +% \changes{v0.903}{2021/12/17}{Par handling.} +% \begin{macrocode} +\newbool{LWR@in@multirow@par} +\boolfalse{LWR@in@multirow@par} +% \end{macrocode} + + +% \DescribeBoolean{LWR@starting@fancybox} +% Suppresses \element{br} if beginning a \pkg{fancybox} environment. +% \changes{v0.903}{2022/01/29}{Par handling.} +% \begin{macrocode} +\newbool{LWR@starting@fancybox} +\boolfalse{LWR@starting@fancybox} +% \end{macrocode} + + % \DescribeBoolean{LWR@doingstartpars} % Tells whether paragraphs may be generated. % \begin{macrocode} @@ -23843,17 +23950,20 @@ end -- not --version % % See if paragraph handling is enabled: % \begin{macrocode} -\ifbool{LWR@doingstartpars}% -{% handling pars + \ifboolexpr{ + bool{LWR@doingparhooks} and + bool{LWR@doingstartpars} + }% + {% handling pars % \end{macrocode} % % See if have already started a \env{lateximage} or a \element{span}. % If so, do not generate nested paragraph tags. % \begin{macrocode} - \ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} - }% nested par tags? + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} + }% nested par tags? % \end{macrocode} % % If so: Do nothing if already started a \env{lateximage} page. @@ -23861,14 +23971,14 @@ end -- not --version % Also do nothing if already inside a \element{span}. Do not nest paragraph tags % inside a \element{span}. % \begin{macrocode} - {}% no nested par tags + {}% no nested par tags % \end{macrocode} % % Else: No \env{lateximage} or \element{span} has been started yet, % so it's OK to generate paragraph tags. % \begin{macrocode} - {% yes nest par tags - \ifbool{LWR@doingapar}{}{% + {% yes nest par tags + \ifbool{LWR@doingapar}{}{% % \end{macrocode} % % If \pkg{parnotes} is used, paragraph notes are inserted @@ -23876,35 +23986,30 @@ end -- not --version % \changes{v0.56}{2018/05/09}{Added support for \pkg{parnotes}.} % \changes{v0.902}{2021/09/20}{Improved \pkg{parnotes}.} % \begin{macrocode} - \PN@parnotes@auto% + \PN@parnotes@auto% % \end{macrocode} % % Set flag before creating the tag, so that the tag itself does not trigger % a new paragraph: % \changes{v0.902}{2021/09/20}{Improved par tags.} % \begin{macrocode} - \global\booltrue{LWR@doingapar}% + \global\booltrue{LWR@doingapar}% % \end{macrocode} % % The opening paragraph tag. % Do not create tag if doing \pkg{algorithm2e} handling instead: % \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.} +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} - \ifbool{LWR@algocf@dopars}{}{% - \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline% + \ifbool{LWR@algocf@dopars}{}{% + \ifbool{LWR@in@multirow@par}% + {}% + {\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline}% + }% }% - }% -% \end{macrocode} -% -% At the endof each paragraph, -% generate closing tag and do regular |/par| stuff. -% (Attempting to use the \pkg{everyhook} |cr| hook -% for \cs{LWR@closeparagraph} does not work well.) -% \begin{macrocode} - \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 @@ -23919,17 +24024,18 @@ end -- not --version % and not in tabular metadata. Factored from \cs{LWR@closeparagraph}. % % \changes{v0.66}{2019/01/01}{Factored.} +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} \newcommand*{\LWR@closeparagraph@br} {% \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 /}}% {}% } % \end{macrocode} @@ -23948,36 +24054,39 @@ end -- not --version % % See if paragraph handling is enabled: % \begin{macrocode} -\ifbool{LWR@doingapar}% + \ifbool{LWR@doingparhooks}{% + \ifbool{LWR@doingapar}% % \end{macrocode} % % If currently in paragraph mode: % \begin{macrocode} -{% handling pars + {% handling pars % \end{macrocode} % % See if already started a \env{lateximage} or a \element{span}: +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} - \ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} - }% + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} or + bool{LWR@in@multirow@par} + }% % \end{macrocode} % % Add a parbreak if in a span, not in a lateximage, % and not in table metadata. % \begin{macrocode} - {% no nested par tags - \LWR@closeparagraph@br% - }% no nested par tags + {% no nested par tags + \LWR@closeparagraph@br% + }% no nested par tags % \end{macrocode} % % If have not already started a \env{lateximage} or a \element{span}: % \begin{macrocode} - {% yes nest par tags + {% yes nest par tags % \end{macrocode} % -% Print a closing tag and some extra vertical space. +% Print a closing tag. % % (The fill seems to be required to force the \pkg{caption} % package to create flush left caption text in the \HTML.) @@ -23985,20 +24094,20 @@ end -- not --version % \changes{v0.70}{2019/03/25}{Reduced underfull \cs{hbox} warnings.} % \changes{v0.71}{2019/04/08}{Flush left captions.} % \begin{macrocode} - \@hspacer{\fill}% \hspace*{\fill} - \leavevmode\LWR@orignewline% - \LWR@htmltagc{/\LWR@tagregularparagraph}% + \@hspacer{\fill}% \hspace*{\fill} + \leavevmode\LWR@orignewline% + \LWR@htmltagc{/\LWR@tagregularparagraph}% % \end{macrocode} % % No longer doing a paragraph: % \begin{macrocode} - \global\boolfalse{LWR@doingapar}% keep + \global\boolfalse{LWR@doingapar}% % \end{macrocode} % % Disable the special \env{minipage} \& \cs{hspace} interaction % until a new minipage is found: % \begin{macrocode} - \global\boolfalse{LWR@minipagethispar}% + \global\boolfalse{LWR@minipagethispar}% % \end{macrocode} % % If \pkg{parnotes} is used, paragraph notes are inserted @@ -24006,53 +24115,71 @@ end -- not --version % \changes{v0.56}{2018/05/09}{Added support for \pkg{parnotes}.} % \changes{v0.902}{2021/09/20}{Improved \pkg{parnotes}.} % \begin{macrocode} - \PN@parnotes@auto% + \PN@parnotes@auto% % \end{macrocode} % -% After creating par notes, not yet started a new paragraph: % \begin{macrocode} - \global\boolfalse{LWR@doingapar}% - }% end of yes nest par tags -}% end of handling pars + }% end of yes nest par tags + }% LWR@doingapar: end of handling pars % \end{macrocode} % % Add a parbreak if in a span, not in a lateximage, % and not in table metadata. % \changes{v0.66}{2019/01/01}{Fix: Combined span, \env{tabular}, and \env{lateximage}.} % \begin{macrocode} -{% not handling pars - \LWR@closeparagraph@br% -}% not handling pars + {% not LWR@doingapar: not handling pars + \LWR@closeparagraph@br% + }% not handling pars % \end{macrocode} % % In most cases, finish with a \LaTeX\ \cs{par}, but in the case -% of paragraphs between lines in a tabular fetch the next token instead: +% of paragraphs between lines in a tabular fetch the next token instead. +% Required for \cs{multicolumn}. % \changes{v0.46}{2018/01/19}{Fix: Tabular empty lines.} % \begin{macrocode} -\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% -}% + \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 +% Do not place anything here, due to the above \LWR@getmynexttoken. } % \end{macrocode} % \end{macro} + +% \subsection{Paragraph Hooks} +% +% \changes{v0.903}{2021/12/17}{Par handling.} +% +% \DescribeHook[LaTeX]{para/begin} +% \begin{macrocode} +\AddToHook{para/begin}[lwarp]{\LWR@openparagraph} +% \end{macrocode} +% +% \DescribeHook[LaTeX]{para/end} +% \begin{macrocode} +\AddToHook{para/end}[lwarp]{\LWR@closeparagraph} +% \end{macrocode} + + % \begin{macrocode} \end{warpHTML} % \end{macrocode} + + + % \section{Paragraph start/stop handling} % \label{sec:parstartstop} % These commands allow/disallow the generation of \HTML\ @@ -24061,8 +24188,8 @@ end -- not --version % \Cref{sec:parhanding} has the commands which actually generate % the tags. % -% The |everyhook| package is used to generate the opening -% paragraph tags. The closing tags are generated by \cs{par}. +% The \LaTeX\ paragraph hooks are used to generate the opening and closing +% paragraph tags. % \codehtml % \begin{macrocode} @@ -24074,62 +24201,49 @@ end -- not --version % Begin handling \HTML\ paragraphs. % This allows an \HTML\ paragraph to start, but one has not yet begun. % \changes{v0.84}{2020/04/14}{Ignore if in \env{lateximage}.} +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} \newcommand*{\LWR@startpars}% {% -% \LWR@traceinfo{LWR@startpars}% % \end{macrocode} % % Ignore if inside a \env{lateximage} or \element{span}: % \begin{macrocode} -\ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} -}% -{}% -{% + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} + }% + {}% nesting + {% not nesting % \end{macrocode} % +% The \LaTeX\ paragraph hook controls tag generation for +% the start and end of paragraphs. +% % See if currently handling \HTML\ paragraphs: % \begin{macrocode} - \ifbool{LWR@doingstartpars}% + \ifboolexpr {bool{LWR@doingparhooks} and bool{LWR@doingstartpars}}% % \end{macrocode} % % If already in paragraph mode, do nothing. % \begin{macrocode} - {}% + {}% % \end{macrocode} % % If not currently in paragraph mode: % \begin{macrocode} - {% -% \end{macrocode} -% -% At the start of each paragraph, generate an opening tag: -% \gindex{par=\cs{par}>hooks} -% \changes{v0.902}{2021/09/24}{Cleared hook before adding.} -% \begin{macrocode} - \ClearPreHook{par}% - \PushPreHook{par}{\LWR@openparagraph}% -% \end{macrocode} -% -% At the end of each paragraph, generate closing tag then do regular |/par| actions: -% \begin{macrocode} - \let\par\LWR@closeparagraph - - }% an intentionally blank line + {\par}% % \end{macrocode} % % Are now handling paragraphs, but have not yet actually started one: % \begin{macrocode} - \global\setbool{LWR@doingstartpars}{true}% + \global\booltrue{LWR@doingstartpars}% % \end{macrocode} % % No \element{par} tag yet to undo: % \begin{macrocode} - \global\boolfalse{LWR@doingapar}% -}% nestspan -% \LWR@traceinfo{LWR@startpars: done}% + \global\boolfalse{LWR@doingapar}% + }% not nesting } % \end{macrocode} % \end{macro} @@ -24141,6 +24255,7 @@ end -- not --version % % \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.} % \changes{v0.84}{2020/04/14}{Ignore if in \env{lateximage}.} +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} \newcommand*{\LWR@stoppars}% {% @@ -24148,74 +24263,59 @@ end -- not --version % % Ignore if inside a \env{lateximage} or \element{span}: % \begin{macrocode} -\ifboolexpr{ - test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or - test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} -}% -{}% -{% + \ifboolexpr{ + test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or + test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} + }% + {}% nesting + {% not nesting % \end{macrocode} % % See if currently handling \HTML\ paragraphs: % \begin{macrocode} - \ifbool{LWR@doingapar}% + \ifboolexpr{bool{LWR@doingparhooks} and bool{LWR@doingapar}}% % \end{macrocode} % % if currently in an \HTML\ paragraph: % \begin{macrocode} - {% + {% % \end{macrocode} % % Print a closing tag: % \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.} % \begin{macrocode} - \leavevmode\LWR@orignewline% - \LWR@htmltagc{/\LWR@tagregularparagraph}% - \LWR@orignewline% + \leavevmode\LWR@orignewline% + \LWR@htmltagc{/\LWR@tagregularparagraph}% + \LWR@orignewline% % \end{macrocode} % % No longer have an open \HTML\ paragraph: % \begin{macrocode} - \global\boolfalse{LWR@doingapar}% + \global\boolfalse{LWR@doingapar}% % \end{macrocode} % % Disable the special \env{minipage} \& \cs{hspace} interaction % until a new minipage is found: % \changes{v0.71}{2019/04/08}{Reduced underfull \cs{hbox} warnings.} % \begin{macrocode} - \global\boolfalse{LWR@minipagethispar} - }% + \global\boolfalse{LWR@minipagethispar}% + }% % \end{macrocode} % % If was not in an \HTML\ paragraph: % \begin{macrocode} - {}% -% \end{macrocode} -% -% See if currently allowing \HTML\ paragraphs: -% \begin{macrocode} - \ifbool{LWR@doingstartpars}% -% \end{macrocode} -% -% If so: clear the |par| hook to no longer catch paragraphs: -% \begin{macrocode} - {\ClearPreHook{par}}% -% \end{macrocode} -% -% Else: Do nothing: -% \begin{macrocode} - {}% + {}% % \end{macrocode} % % No longer in paragraph mode: % \begin{macrocode} - \global\setbool{LWR@doingstartpars}{false}% + \global\setbool{LWR@doingstartpars}{false}% % \end{macrocode} % % No \element{p} tag to undo: % \begin{macrocode} - \global\boolfalse{LWR@doingapar}% -}% nestspan + \global\boolfalse{LWR@doingapar}% + }% not nesting } % \end{macrocode} % \end{macro} @@ -24352,8 +24452,8 @@ end -- not --version % % \begin{macrocode} \newcommand*{\CSSFilename}[1]{% -\renewcommand*{\LWR@currentcss}{#1}% -\@onelevel@sanitize\LWR@currentcss% + \renewcommand*{\LWR@currentcss}{#1}% + \@onelevel@sanitize\LWR@currentcss% } \end{warpHTML} @@ -24930,6 +25030,18 @@ end -- not --version % \end{macro} % +% \begin{macro}{\LWR@nullifyfootnotes} +% +% Cancels footnotes, such as inside an \HTML\ comment or a \cs{nameref}. +% \changes{v0.903}{2021/12/28}{Added.} +% \begin{macrocode} +\newcommand*{\LWR@nullifyfootnotes}{% + \renewcommand{\footnote}[2][]{}% + \renewcommand{\footnotemark}[1][]{}% +} +% \end{macrocode} +% \end{macro} + % \begin{macrocode} \end{warpHTML} @@ -24957,9 +25069,10 @@ 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}% @@ -24982,18 +25095,22 @@ end -- not --version % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} \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% } % \end{macrocode} % \end{macro} @@ -25605,30 +25722,33 @@ end -- not --version % \end{macro} -% \begin{macro}{\LWR@HTMLsanitize} \marg{text} +% \begin{macro}{\LWR@HTMLsanitizedetokenized} \marg{detokenized text} % -% Prints the sanitized text. +% Prints the sanitized text, already detokenized. % +% \changes{v0.903}{2021/12/17}{Added.} % \begin{macrocode} -\newrobustcmd{\LWR@HTMLsanitize}[1]{% +\newrobustcmd{\LWR@HTMLsanitizedetokenized}[1]{% + \LWR@traceinfo{LWR@HTMLsanitizedetokenized !#1!}% % \end{macrocode} % Cancel French \pkg{babel} character handling, % and fully expand the strings: % \begin{macrocode} \begingroup% \LWR@hook@processingtags% - \edef\LWR@strresult{\detokenize{#1}}% + \edef\LWR@strresult{#1}% \LWR@subHTMLsanitize% \LWR@strresult% \endgroup% + \LWR@traceinfo{LWR@HTMLsanitize done}% } % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@HTMLsanitizeexpand} \marg{text} +% \begin{macro}{\LWR@HTMLsanitizeexpanded} \marg{text}% % -% This version expands the argument before sanitizing it. +% This version must be given the detokenized and expanded text. % This is only used for adding math to \MathJax\ expressions or % \env{lateximage} \attribute{alt} tags. % @@ -25636,7 +25756,6 @@ end -- not --version % \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.} % ^^A \changes{v0.79}{2020/01/27}{Fix: \cs{\&}.} % \changes{v0.89}{2020/08/08}{Fix: Nested \MathJax\ environments.} -% ^^A *88* % \begin{macrocode} \edef\LWR@beginspaceleftbrace{begin \LWRleftbrace} \edef\LWR@beginspaceleftbrace{\detokenize\expandafter{\LWR@beginspaceleftbrace}} @@ -25648,7 +25767,7 @@ end -- not --version \edef\LWR@endrightbrace{end\LWRrightbrace} \edef\LWR@endrightbrace{\detokenize\expandafter{\LWR@endrightbrace}} -\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{% +\newrobustcmd{\LWR@HTMLsanitizeexpanded}[1]{% % \end{macrocode} % Cancel French \pkg{babel} character handling, % and fully expand the strings: @@ -25656,11 +25775,10 @@ end -- not --version \begingroup% \LWR@hook@processingtags% % \end{macrocode} -% The difference between this and \cs{LWR@HTMLsanitize} (without ``expand'') -% is the following \cs{expandafter}: % \begin{macrocode} - \edef\LWR@strresult{\detokenize\expandafter{#1}}% + \edef\LWR@strresult{#1}% % \end{macrocode} +% % The math expression may includes spaces between tokens, % but \MathJax\ does not want a space between \cs{begin} or \cs{end} % and the following brace. @@ -25734,7 +25852,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 @@ -26714,19 +26832,31 @@ end -- not --version % \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Limited \HTML\ comment if starred.} % \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Use short \TOC\ entry % for HTMLDebug comments.} +% \changes{v0.903}{2021/12/28}{Add: Sectioning \HTML\ comment divider.} +% \changes{v0.903}{2021/12/28}{Fix: Nullfiy footnotes in \HTML\ comment.} % \begin{macrocode} -\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% % \end{macrocode} % % For inline sections paragraph and subparagraph, start a new paragraph now: @@ -27286,10 +27416,14 @@ end -- not --version % \changes{v0.84}{2020/04/12}{Improved \HTML\ title.} % \begin{macrocode} \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]% % \end{macrocode} % % If starts with a dash, remove the leading dash: @@ -27574,9 +27708,18 @@ end -- not --version % % Not yet started any paragraph handling: % \begin{macrocode} +\global\booltrue{LWR@doingparhooks} \global\boolfalse{LWR@doingapar} \global\boolfalse{LWR@doingstartpars} % \end{macrocode} +% +% \cs{color@endgroup}'s \cs{endgraf} was conflicting with \pkg{lwarp}'s +% paragraph handling. +% \changes{v0.903}{2021/12/13}{Par handling.} +% \begin{macrocode} +\let\color@endgroup\endgroup +% \end{macrocode} +% % Document and page settings: % \changes{v0.45}{2017/12/08}{Fix: Lateximages on incorrect pages with \brand{Mathjax}.} % \begin{macrocode} @@ -27804,13 +27947,15 @@ end -- not --version % \end{macro} +% \DescribeHook[LaTeX]{enddocument/info} Used to close the \filenm{*-images.txt} file. % \begin{macro}{\enddocument} % If labels have not changed, mark successful completion % of the \filenm{lateximages.txt} file. % Executed as everything is being shut down. % -% For the newer kernel hooks, see \cmds{texdoc lthooks-doc} and \cmds{texdoc ltshipout-doc}. +% For the newer kernel hooks, see \cmds{texdoc lthooks-doc} +% and \cmds{texdoc ltshipout-doc}. % \changes{v0.70}{2019/03/26}{If labels changed, require recompile before making limages.} % \changes{v0.89}{2020/07/28}{Adapt to \LaTeX\ core changes.} % \begin{macrocode} @@ -27876,6 +28021,10 @@ end -- not --version % % See \cmds{texdoc lthooks-doc} and \cmds{textdoc ltshipout-doc}. % +% \DescribeHook[LaTeX]{shipoout/background} Nullified. +% +% \DescribeHook[LaTeX]{shipoout/foreground} Nullified. +% % \changes{v0.89}{2020/07/28}{Foreground/background hooks: Adapt to \LaTeX\ core changes.} % \begin{macrocode} \ifdef{\RemoveFromHook}{ @@ -28078,7 +28227,7 @@ end -- not --version } \AtBeginDocument{ -\@ifpackageloaded{titling}{ +\IfPackageLoadedTF{titling}{ \AtBeginEnvironment{titlingpage}{ \renewrobustcmd{\affiliation}[1]{\\ \textsc{\small#1}} } @@ -28297,7 +28446,7 @@ end -- not --version % % % \begin{macrocode} -\@ifclassloaded{memoir} +\IfClassLoadedTF{memoir} { \newcommand{\LWR@setfootnoteseries}{% \renewcommand\thefootnote{\@arabic\c@footnote}% @@ -28562,7 +28711,7 @@ end -- not --version % % \begin{macrocode} \newcommand*{\AddSubtitlePublished}{% -\@ifpackageloaded{titling}{% yes titling package +\IfPackageLoadedTF{titling}{% yes titling package \newcommand{\@published}{}% \newcommand{\published}[1]{\gdef\@published{##1}}% \renewcommand*{\maketitlehooka}{\printpublished}% @@ -28999,6 +29148,7 @@ end -- not --version % % \changes{v0.20}{2016/12/24}{Added.} % \changes{v0.84}{2020/04/16}{Added print mode.} +% \changes{v0.903}{2022/01/02}{Added \env{verbatim*}.} % % \begin{macrocode} \AfterEndPreamble{ @@ -29018,6 +29168,22 @@ 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% + }% +} } % \end{macrocode} % \end{environment} @@ -29031,8 +29197,10 @@ end -- not --version % \changes{v0.52}{2018/03/27}{Fix to allow inside \env{lateximage}.} % \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.} % \changes{v0.84}{2020/04/17}{Restore spacing.} +% \changes{v0.903}{2021/12/20}{Converted to env.} % \begin{macrocode} -\newcommand*{\LWR@HTML@tabbing}{% +\newenvironment*{LWR@HTML@tabbing} +{% \LWR@forcenewpage% \LWR@atbeginverbatim{tabbing}% \let\enskip\LWR@origenskip% @@ -29044,14 +29212,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{macrocode} % % \end{environment} @@ -29260,11 +29426,9 @@ end -- not --version \else % \if@inlabel % \indent - \par % \fi \ifhmode % \unskip\unskip - \par \fi \if@newlist \if@nobreak @@ -29361,12 +29525,15 @@ end -- not --version % leave room for the label while inside a list during paragraph construction. % % \changes{v0.44}{2017/11/15}{Added \env{list} and \env{trivlist}.} +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} \newcommand*{\LWR@listitem}{% \LWR@stoppars% \LWR@startnewdepth{listitem}% \LWR@htmltag{li}% + \LWR@orignewline% \LWR@startpars% + \LWR@ensuredoingapar% \LWR@origitem% } % \end{macrocode} @@ -29432,12 +29599,15 @@ end -- not --version % % See \cs{LWR@openparagraph} where extra \cs{hspace} is used to % leave room for the label while inside a list during paragraph construction. +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} \newcommand*{\LWR@itemizeitem}{% \LWR@stoppars% \LWR@startnewdepth{listitem}% \LWR@htmltag{li}% + \LWR@orignewline% \LWR@startpars% + \LWR@ensuredoingapar% \LWR@origitem% } % \end{macrocode} @@ -29654,13 +29824,17 @@ end -- not --version % \end{macrocode} % \end{macro} -% \cs{futurelet} copies the next token then executes a function to analyze it. - -% \cs{LWR@futurenonspacelet} does the same, but ignores intervening white space - -% Based on the \pkg{booktabs} style: % \begin{macro}{\LWR@futurenonspacelet} +% +% \cs{futurelet} copies the next token then executes a function to analyze it. +% +% \cs{LWR@futurenonspacelet} does the same, but ignores intervening spaces +% and paragraphs. +% +% Based on the \pkg{booktabs} style: +% +% \changes{v0.903}{2021/10/13}{Now ignores \cs{par}.} % \begin{macrocode} \def\LWR@futurenonspacelet#1{\def\LWR@cs{#1}% \afterassignment\LWR@fnslone\let\nexttoken= } @@ -29668,19 +29842,30 @@ end -- not --version \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= } % \end{macrocode} % \end{macro} + % \begin{macro}{\LWR@getmynexttoken} % Looks ahead and copies the next token into \cs{LWR@mynexttoken}. % \begin{macrocode} \newcommand*{\LWR@getmynexttoken}{% \LWR@traceinfo{LWR@getmynexttoken}% -% nothing must follow this next line +% \end{macrocode} +% +% Nothing must follow this next line:\watchout +% \begin{macrocode} \LWR@futurenonspacelet\LWR@mynexttoken\LWR@tabledatacolumntag } % \end{macrocode} @@ -31776,11 +31961,10 @@ end -- not --version % left to right columns. % % \begin{macrocode} -\NewDocumentCommand{\LWR@docdashline} - {>{\SplitArgument{1}{-}}m}% - {% - \LWR@subcdashline#1% - } +\NewDocumentCommand{\LWR@docdashline}{>{\SplitArgument{1}{-}}m}% +{% + \LWR@subcdashline#1% +} % \end{macrocode} % \end{macro} @@ -31831,7 +32015,7 @@ end -- not --version % \begin{macrocode} \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}% {% @@ -32995,13 +33179,13 @@ end -- not --version {% \@xmultirow defined, so some version of multirow was loaded % \end{macrocode} % -% |\@ifpackageloaded{multirow}| determines if v2.0 or later of +% |\IfPackageLoadedTF{multirow}| determines if v2.0 or later of % \pkg{multirow} was used, which included the \cs{ProvidesPackage} macro. % % The print version: % \begin{macrocode} -\@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}% @@ -33015,7 +33199,7 @@ end -- not --version }% packageloaded{multirow} % \end{macrocode} % -% If not |\@ifpackageloaded{multirow}| but \cs{@xmultirow} is defined, +% If not |\IfPackageLoadedTF{multirow}| but \cs{@xmultirow} is defined, % then this must be v1.6 or earlier, which did not |\ProvidesPackage{multirow}|, % and did not have the \optn{vposn} option. % @@ -33166,23 +33350,28 @@ end -- not --version {% \LWR@traceinfo{LWR@tabledatacolumntag}% % \end{macrocode} +% % \hspace*{.5in} |\show\LWR@mynexttoken| to see what tokens to look for % \begin{macrocode} % \end{macrocode} +% % If not any of the below, start a new table cell: % \begin{macrocode} \global\let\LWR@mynextaction\LWR@tabledatasinglecolumntag% % \end{macrocode} +% % If exiting the tabular: % \begin{macrocode} \ifdefequal{\LWR@mynexttoken}{\end}% {\booltrue{LWR@exitingtabular}}{}% % \end{macrocode} +% % \env{longtable} can have a caption in a cell % \begin{macrocode} \ifdefequal{\LWR@mynexttoken}{\caption}% {\global\let\LWR@mynextaction\LWR@donothing}{}% % \end{macrocode} +% % Look for other things which would not start a table cell: % \begin{macrocode} \ifdefequal{\LWR@mynexttoken}{\multicolumn}% @@ -33194,11 +33383,13 @@ end -- not --version \ifdefequal{\LWR@mynexttoken}{\noalign}% {\global\let\LWR@mynextaction\LWR@donothing}{}% % \end{macrocode} +% % If an \cs{mrowcell}, this is a cell to be skipped over: % \begin{macrocode} \ifdefequal{\LWR@mynexttoken}{\mrowcell}% {\global\let\LWR@mynextaction\LWR@donothing}{}% % \end{macrocode} +% % If an \cs{mcolrowcell}, this is a cell to be skipped over: % \begin{macrocode} \ifdefequal{\LWR@mynexttoken}{\mcolrowcell}% @@ -33298,11 +33489,14 @@ end -- not --version \ifdefequal{\LWR@mynexttoken}{\lasthdashline}% {\global\let\LWR@mynextaction\LWR@donothing}{}% % \end{macrocode} +% % Ignore an empty line between rows: % \changes{v0.45}{2017/12/06}{Fix: Empty line between rows.} % \begin{macrocode} \ifdefequal{\LWR@mynexttoken}{\par}% - {\global\let\LWR@mynextaction\LWR@donothing}{}% + {% + \global\let\LWR@mynextaction\LWR@donothing% + }{}% % \end{macrocode} % % No action for an \cs{end} token. @@ -33312,9 +33506,8 @@ end -- not --version % % Start the new table cell if was not any of the above: % \begin{macrocode} - \LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}% + \LWR@traceinfo{LWR@tabledatacolumntag: done, about to do LWR@mynextaction}% \LWR@mynextaction% - \LWR@traceinfo{LWR@tabledatacolumntag: done}% } % \end{macrocode} % \end{macro} @@ -33423,7 +33616,7 @@ end -- not --version % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{lwarp-tabls} +\IfPackageLoadedTF{lwarp-tabls} { \newcommand*{\LWR@HTMLhline}[1][]{% \ifbool{FormatWP}% @@ -33563,16 +33756,28 @@ end -- not --version \boolfalse{LWR@foundmrowcell}% % \end{macrocode} % -% +% In case of nesting: % \begin{macrocode} \renewcommand*{\LWR@multicoltext}{}% + \booltrue{LWR@intabularmetadata}% +% \end{macrocode} +% +% New \PDF\ page, unless in a \cs{multirow}: +% \changes{v0.903}{2021/12/17}{Par handling.} +% \begin{macrocode} + \ifbool{LWR@in@multirow@par}% + {\leavevmode\LWR@orignewline}% + {\LWR@forcenewpage}% +% \end{macrocode} +% +% In case of nesting, locally no longer in a \cs{multirow}: +% \changes{v0.903}{2021/12/17}{Par handling.} +% \begin{macrocode} + \boolfalse{LWR@in@multirow@par}% % \end{macrocode} % % Create the |table| tag: % \begin{macrocode} - \booltrue{LWR@intabularmetadata}% - \LWR@traceinfo{LWR@@tabular: About to LWR@forecenewpage.}% - \LWR@forcenewpage \LWR@htmlblocktag{table}% % \end{macrocode} % Parse the table columns: @@ -34018,12 +34223,11 @@ end -- not --version % \begin{macro}{\LWR@nameref} \marg{label} % Returns the section name for this label: % \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.} -% \changes{v0.902}{2021/09/24}{Disable footnotes in \cs{nameref}.} +% \changes{v0.902}{2021/09/24}{Nullify footnotes in \cs{nameref}.} % \begin{macrocode} \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% } @@ -34369,7 +34573,8 @@ end -- not --version % \end{macrocode} % \end{macro} -% \begin{macro}{\ref} * \marg{label} \quad +% \begin{macro}{\ref} * \marg{label} +% % \cs{ref} is redefined to \cs{LWR@HTML@ref}, % except inside the text part of a \cs{hyperref}, % where it is redefined to \cs{LWR@ref@ignorestar}. @@ -34400,16 +34605,76 @@ end -- not --version % \end{macrocode} % % -% \begin{macro}{\LWR@refwithsection} +% \begin{macro}{\LWR@refwithsection} * \marg{label} +% +% Creates a reference, using the section number as the text. +% Used for back references. +% % \changes{v0.896}{2021/04/21}{Added.} +% \changes{v0.903}{2021/12/13}{Fixed: Ref undefined or w/o label.} % \begin{macrocode} \NewDocumentCommand{\LWR@refwithsection}{s m}{% \LWR@traceinfo{LWR@refwithsection !#2!}% +% \end{macrocode} +% +% If starred, just use the text without a hyperlink: +% \begin{macrocode} \IfBooleanTF{#1}% {\LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}}% {% +% \end{macrocode} +% +% Open the reference: +% \begin{macrocode} \LWR@startref{#2}% - \LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}% +% \end{macrocode} +% +% Add the text of the link. +% +% Check for and handle an undefined reference: +% \begin{macrocode} + \edef\@tempa{\LWR@currentautosecpageref{#2}}% + \ifdefstring{\@tempa}{??}% + {??}% +% \end{macrocode} +% +% For a defined reference: +% \begin{macrocode} + {% +% \end{macrocode} +% +% Set \cs{@tempa} to \cs{r@<label>}, which is |{section number}{page number}|. +% \begin{macrocode} + \edef\@tempa{% + \csname + r@\BaseJobname-autopage-\LWR@currentautosecpageref{#2}% + \endcsname% + }% +% \end{macrocode} +% +% Check the section number alone: +% \begin{macrocode} + \edef\@tempa{\expandafter\@firstoftwo\@tempa}% +% \end{macrocode} +% +% If the reference has no section number print an asterisk: +% \begin{macrocode} + \expandafter\ifblank\expandafter{\@tempa}% + {*} +% \end{macrocode} +% +% If there is a section number, print it: +% \begin{macrocode} + {% + \LWR@print@ref{% + \BaseJobname-autopage-\LWR@currentautosecpageref{#2}% + }% + }% + }% +% \end{macrocode} +% +% Close the reference: +% \begin{macrocode} \LWR@htmltag{/a}% }% } @@ -34712,8 +34977,8 @@ end -- not --version % \begin{macrocode} \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 @@ -34871,7 +35136,7 @@ end -- not --version % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{tocbasic}{ +\IfPackageLoadedTF{tocbasic}{ \appto\figure@atbegin{% \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% @@ -35098,7 +35363,7 @@ end -- not --version % \changes{v0.84}{2020/04/20}{\pkg{caption} now optional.} % \begin{macrocode} \AtBeginDocument{ - \@ifpackageloaded{caption}{}{ + \IfPackageLoadedTF{caption}{}{ \let\LWR@orig@caption\@caption% \long\def\@caption#1[#2]{% % \end{macrocode} @@ -35286,7 +35551,7 @@ end -- not --version % \changes{v0.84}{2020/04/20}{\pkg{caption} now optional.} % \begin{macrocode} \AtBeginDocument{% -\@ifpackageloaded{caption}{ +\IfPackageLoadedTF{caption}{ \let\LWR@origcaptionlistentry\captionlistentry \renewcommand*{\captionlistentry}{% @@ -35805,7 +36070,7 @@ end -- not --version % \DescribeCounter{lofdepth} \TOC\ depth for figures. % \begin{macrocode} -\@ifclassloaded{memoir}{}{ +\IfClassLoadedTF{memoir}{}{ \newcounter{lofdepth} \setcounter{lofdepth}{1} } @@ -35813,7 +36078,7 @@ end -- not --version % \DescribeCounter{lotdepth} \TOC\ depth for tables. % \begin{macrocode} -\@ifclassloaded{memoir}{}{ +\IfClassLoadedTF{memoir}{}{ \newcounter{lotdepth} \setcounter{lotdepth}{1} } @@ -36681,14 +36946,20 @@ end -- not --version \linespread{1}% % \end{macrocode} % +% \changes{v0.903}{2021/12/17}{Par handling.} % \begin{macrocode} - \let\par\LWR@origpar% + \setbool{LWR@doingparhooks}{false}% % \end{macrocode} % % \begin{macrocode} \LWR@select@print@hspace% % \end{macrocode} % +% \changes{v0.903}{2021/12/13}{Par handling.} +% \begin{macrocode} + \def\color@endgroup{\endgraf\endgroup}% +% \end{macrocode} +% % \changes{v0.48}{2018/02/04}{Fix: Spacing in \SVG\ math, \env{lateximage}, \tikz.} % \begin{macrocode} \LetLtxMacro\hfil\LWR@orighfil% @@ -37264,12 +37535,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}% } @@ -37279,7 +37550,7 @@ end -- not --version } \AtEndDocument{ \ifbool{LWR@warnbaselinemarker}{ - \PackageWarningNoLine{lwarp}{% + \PackageNoteNoLine{lwarp}{% Load graphicx or graphics for improved\MessageBreak SVG math sizing and baselines% } @@ -37462,6 +37733,7 @@ end -- not --version % \changes{v0.79}{2019/12/14}{Factored.} % \begin{macrocode} \newcommand*{\LWR@subsingledollarsvg}[4]{% + \LWR@traceinfo{LWR@subsingledollartsvg}% % \end{macrocode} % Measure the depth, width, and height of the math image: % \changes{v0.51}{2018/03/04}{Fix: \SVG\ math with enclosed \env{lateximage}.} @@ -37541,14 +37813,14 @@ end -- not --version % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} \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 % \end{macrocode} @@ -37560,6 +37832,7 @@ end -- not --version {\def\LWR@tempone{N}}% % \end{macrocode} % \begin{macrocode} + \LWR@traceinfo{subsingledollarsvg about to lateximage}% \begin{lateximage}*% use hashing [#2]% alt *% do not add open/closing braces @@ -37574,6 +37847,7 @@ end -- not --version ]% [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS (math)% ARIA + \LWR@traceinfo{subsingledollar did lateximage}% }{% #1 False \begin{lateximage}% no hashing [#2]% alt @@ -37649,7 +37923,7 @@ end -- not --version \newsavebox{\LWR@singledollarbox} \NewDocumentCommand{\LWR@subsingledollar}{s m m m}{% - \LWR@traceinfo{LWR@subsingledollar}% + \LWR@traceinfo{LWR@subsingledollar !#2!}% % \end{macrocode} % \begin{macrocode} \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% @@ -37701,9 +37975,10 @@ end -- not --version % \end{macrocode} % \cs{ifmmode} to avoid error about \cs{ttfamily} inside math mode % in the case of nested math, ex. equation with tcolorbox with math. +% \changes{v0.903}{2021/12/18}{Improved math sanitization.} % \begin{macrocode} \ifmmode\else\LWR@print@ttfamily\fi% - \LWR@HTMLsanitize{#4}% + \LWR@HTMLsanitizedetokenized{\detokenize{#4}}% }% \textbackslash)% }% @@ -37764,24 +38039,30 @@ end -- not --version % % \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.} % -% Redefine the double dollar sign to place math inside a \env{lateximage}, or use \MathJax: +% Redefine the double dollar sign to place math inside a \env{lateximage}, +% or use \MathJax: % \begin{macrocode} \protected\gdef\LWR@doubledollar$#1$${% % \end{macrocode} +% % If \MathJax\ or formatting for a word processor, print the \LaTeX\ expression: % \changes{v0.19}{2016/05/25}{\MathJax\ support.} % \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} print LaTeX expression.} % \begin{macrocode} -\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% + \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }% % \end{macrocode} -% For \MathJax, print the math between |\[| and |\]|: +% +% For \MathJax, print the math between |\[| and |\]|. +% If there is a footnote, endnote, or other kind of note (`|note|' is present), +% sync the note numbers. +% % \changes{v0.42}{2017/10/16}{Improved line spacing with mathjax.} % \changes{v0.89}{2020/08/01}{TT font for \MathJax.} % \changes{v0.896}{2021/04/07}{Fix: Displaymath notes with \MathJax.} % \begin{macrocode} -{ + {% intentional blank line: - \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{% + \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{% % \end{macrocode} % % The equation is printed to the \PDF\ output inside \HTML\ comment tags. @@ -37789,91 +38070,105 @@ end -- not --version % The \env{math} environment is selected here, and \cs{LWR@hidelatexequation} % will use the original print-mode meaning of \env{math}. % \begin{macrocode} - \LWR@hidelatexequation{math}{#1}% + \LWR@hidelatexequation{math}{#1}% % \end{macrocode} +% +% \changes{v0.903}{2021/12/18}{Improved math sanitization.} % \begin{macrocode} - \InlineClass{hidden}{\LWR@syncnotenumbers}% - \textbackslash[% - {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}% - \textbackslash] - \InlineClass{hidden}{\LWR@syncnotenames}% - }{% - \textbackslash[% - {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}% - \textbackslash] - }% + \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 + }% mathjax % \end{macrocode} +% % For \SVG, print the math inside a \env{lateximage}, % with an \element{alt} tag of the \LaTeX\ code: % \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.} % \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.} % \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.} % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} +% \changes{v0.903}{2021/12/18}{Improved alt tag sanitization.} % \begin{macrocode} -{% 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 + {% 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 % \end{macrocode} +% % Support for \pkg{xfakebold}: % \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.} % \begin{macrocode} - \LWR@applyxfakebold% + \LWR@applyxfakebold% % \end{macrocode} % \begin{macrocode} - \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar% - \end{lateximage}% - \end{BlockClass}% -}% not mathjax + \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar% + \end{lateximage}% + \end{BlockClass}% + }% not mathjax % \end{macrocode} % Clear the single-use \attribute{alt} text: % \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.} % \begin{macrocode} -\gdef\LWR@ThisAltText{}% + \gdef\LWR@ThisAltText{}% }% % \end{macrocode} % \end{macro} % % % -% \begin{macro}{\LWR@singledollar} \marg{alt text} \marg{math expression} +% \begin{macro}{\LWR@singledollar} \marg{math expression} % \changes{v0.89}{2020/08/01}{TT font for \MathJax.} +% \changes{v0.903}{2021/12/18}{Improved alt tag sanitization.} % \begin{macrocode} \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 + \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 % \end{macrocode} +% % Clear the single-use \attribute{alt} text: % \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.} % \begin{macrocode} -\gdef\LWR@ThisAltText{}% + \gdef\LWR@ThisAltText{}% } % \end{macrocode} % \end{macro} @@ -37913,6 +38208,7 @@ end -- not --version % \changes{v0.50}{2018/02/23}{Fix: Use \env{lateximage} even if \MathJax.} % \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.} % \changes{v0.52}{2018/03/25}{Improved hashing expansion.} +% \changes{v0.903}{2021/12/18}{Improved math sanitization.} % \begin{macrocode} \LetLtxMacro\LWR@origensuredmath\@ensuredmath @@ -37920,7 +38216,7 @@ end -- not --version \ifbool{mathjax}{% \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}% {% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }% {% \relax% @@ -37942,7 +38238,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% @@ -38239,7 +38539,7 @@ end -- not --version % The environment contents and \cs{end}: % \begin{macrocode} \LWR@orignewline% - \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}% + \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#2}}% \LWR@orignewline% \textbackslash{}end\{#1\} }% @@ -38335,7 +38635,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 % \end{macrocode} @@ -39027,7 +39327,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\}% } % \end{macrocode} @@ -39088,6 +39388,7 @@ end -- not --version % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} \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}% @@ -39157,6 +39458,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}}% % \end{macrocode} @@ -39436,6 +39738,7 @@ end -- not --version % \changes{v0.74}{2019/08/20}{New syntax for \cs{LWR@subinlineimage}.} % \changes{v0.896}{2021/03/05}{Added \ARIA\ role.} % \begin{macrocode} + \LWR@traceinfo{about to LWR@lateximage@oneimage !#2!}% \IfBooleanTF{#1}% starred {% hash \LWR@lateximage@oneimage{#2}{\LWR@hashedname}{#5}{#3}{#6}% @@ -39656,7 +39959,7 @@ end -- not --version % \changes{v0.65}{2018/12/21}{\cs{AtBeginDocument} to avoid option clashes.} % \begin{macrocode} \newcommand*{\LWR@PreloadedPackage}[1]{% - \@ifpackageloaded{#1}% + \IfPackageLoadedTF{#1}% {% \AtBeginDocument{ \LWR@origRequirePackage{lwarp-#1}% @@ -39834,17 +40137,17 @@ end -- not --version % % For print output, accept and then discard the new |class| key: % \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.} +% \changes{v0.903}{2021/12/23}{\pkg{graphics}: \attribute{alt} now in \pkg{graphicx} core.} % \begin{macrocode} \begin{warpprint} \define@key{Gin}{class}{} -\define@key{Gin}{alt}{} % \end{macrocode} % % Print-mode additions for the \pkg{overpic} package. % See \cref{sec:overpic} for the \HTML\ version. % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{overpic}{ +\IfPackageLoadedTF{overpic}{ \newcommand*{\overpicfontsize}{12} \newcommand*{\overpicfontskip}{14} }{} @@ -39884,7 +40187,7 @@ end -- not --version % \end{macrocode} % \textred{\dots\ and \emph{only} if \pkg{xcolor} was loaded:} % \begin{macrocode} -\@ifpackageloaded{xcolor}{ +\IfPackageLoadedTF{xcolor}{ \LWR@traceinfo{patching xcolor} % \end{macrocode} % @@ -39915,14 +40218,14 @@ end -- not --version \newsavebox{\LWR@colorminipagebox} \NewDocumentCommand{\LWR@print@fcolorbox}{o m o m +m}{% -\LWR@traceinfo{LWR@print@fcolorbox #2 #4}% + \LWR@traceinfo{LWR@print@fcolorbox #2 #4}% % \end{macrocode} % Pre-load the contents into an LR box so that they can % be used inside a \cs{fcolorbox}: % \begin{macrocode} -\begin{lrbox}{\LWR@colorminipagebox}% -#5% -\end{lrbox}% + \begin{lrbox}{\LWR@colorminipagebox}% + #5% + \end{lrbox}% % \end{macrocode} % Sort out the various optional arguments and the background color of |none|. % In each case, the LRbox is placed inside a \cs{fcolorbox}. @@ -39931,33 +40234,33 @@ end -- not --version % color is used for the contents. % \changes{v0.62}{2018/10/18}{Fix: No longer requires \pkg{xifthen}.} % \begin{macrocode} -\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}% + \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}% } % \end{macrocode} % @@ -39988,26 +40291,27 @@ end -- not --version % \oarg{5:align} \oarg{6:height} \oarg{7:inner-align} \marg{8:width} % % In print mode, becomes a \cs{fcolorbox} containing a \env{minipage}: +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % \begin{macrocode} -\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}% + \LWR@traceinfo{*** fcolorminipage: #2 #4 #8}% % \end{macrocode} % Pre-load the contents into an LR box so that they can % be used inside a \cs{fcolorbox}: % \begin{macrocode} -\begin{lrbox}{\LWR@colorminipagebox}% + \begin{lrbox}{\LWR@colorminipagebox}% % \end{macrocode} % If inner alignment is not given, use the outer alignment instead: % \begin{macrocode} -\IfValueTF{#7}% -{\begin{minipage}[#5][#6][#7]{#8}}% -{\begin{minipage}[#5][#6][#5]{#8}}% + \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}% + \end{minipage}% + \end{lrbox}% + \LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}% % \end{macrocode} % Sort out the various optional arguments and the background color of |none|. % In each case, the LRbox is placed inside a \cs{fcolorbox}. @@ -40016,43 +40320,35 @@ end -- not --version % color is used for the contents. % \changes{v0.62}{2018/10/18}{Fix: No longer requires \pkg{xifthen}.} % \begin{macrocode} -\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}% + \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{macrocode} - -% \changes{v0.80}{2020/02/03}{Made robust.} -% \begin{macrocode} -\NewDocumentEnvironment{fcolorminipage}{} - {\LWR@print@fcolorminipage} - {\endLWR@print@fcolorminipage} -% \end{macrocode} % \end{environment} - % \pkg{xcolor} is known to have been loaded, and provided % \HTML\ versions of the following, and the print versions are provide above, % so now they may be \cs{LW@formatted}. @@ -40094,7 +40390,7 @@ end -- not --version % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{chemmacros}{ +\IfPackageLoadedTF{chemmacros}{ % \end{macrocode} % % \begin{noindenvironment}{polymerdelims} @@ -40803,14 +41099,14 @@ color:\LWR@origpound\LWR@tempcolor% % may have loaded: % \begin{macrocode} \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}% } % \end{macrocode} % \pkg{xcolor} \cs{let}s things to \cs{fbox} when it is loaded, @@ -40831,6 +41127,7 @@ color:\LWR@origpound\LWR@tempcolor% % \codeall % \begin{macrocode} \end{warpHTML} + \begin{warpall} \let\fboxBlock\fbox \end{warpall} @@ -40848,9 +41145,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% @@ -40868,6 +41163,7 @@ color:\LWR@origpound\LWR@tempcolor% % Creates a framed \HTML\ \element{div} around its contents. % \changes{v0.34}{2017/07/31}{Added.} % \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.} +% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.} % % Print version: % \codeall \\ @@ -40877,7 +41173,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} {% % \end{macrocode} % An outer minipage will be used for vertical alignment. @@ -40921,11 +41217,6 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macrocode} \endminipage% } - -\LetLtxMacro\fminipage\LWR@print@fminipage -\LetLtxMacro\endfminipage\endLWR@print@fminipage -% \newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage} - \end{warpall} % \end{macrocode} % @@ -41098,7 +41389,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\texteb} \marg{text} \qquad From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@texteb}[1]{% {% \LWR@HTML@ebweight% @@ -41117,7 +41408,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\textlg} \marg{text} \qquad From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@textlg}[1]{% {% \LWR@HTML@lgweight% @@ -41415,7 +41706,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\ebweight} From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@ebweight}{% \LWR@print@ebweight% \renewcommand*{\LWR@f@series}{eb}% @@ -41428,7 +41719,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\lgweight} From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} -\@ifpackageloaded{nfssext-cfr}{ +\IfPackageLoadedTF{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@lgweight}{% \LWR@print@lgweight% \renewcommand*{\LWR@f@series}{lg}% @@ -42460,8 +42751,8 @@ color:\LWR@origpound\LWR@tempcolor% } \AtBeginDocument{ - \@ifpackageloaded{graphics}{ - \@ifpackageloaded{metalogo}{}{ + \IfPackageLoadedTF{graphics}{ + \IfPackageLoadedTF{metalogo}{}{ \renewrobustcmd*{\Xe} {X\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}} } @@ -42470,7 +42761,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} }{} } @@ -42741,7 +43032,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macrocode} \begin{warpHTML} \AtBeginDocument{ - \@ifpackageloaded{everyshi}{ + \IfPackageLoadedTF{everyshi}{ \RequirePackage{lwarp-everyshi} }{} } @@ -42775,13 +43066,13 @@ color:\LWR@origpound\LWR@tempcolor% % \changes{v0.89}{2020/08/12}{Allow preload of \pkg{amsmath}, \pkg{amsthm}, \pkg{centernot}.} % \begin{macrocode} \begin{warpHTML} -\@ifpackageloaded{amsthm}{ +\IfPackageLoadedTF{amsthm}{ \RequirePackage{lwarp-amsthm} }{} % \end{macrocode} % % \begin{macrocode} -\@ifpackageloaded{amsmath}{ +\IfPackageLoadedTF{amsmath}{ \RequirePackage{lwarp-amsmath} }{} % \end{macrocode} @@ -42789,7 +43080,7 @@ color:\LWR@origpound\LWR@tempcolor% % % \pkg{amsthm} may load \pkg{centernot}, so \pkg{centernot} must be checked second. % \begin{macrocode} -\@ifpackageloaded{centernot}{ +\IfPackageLoadedTF{centernot}{ \RequirePackage{lwarp-centernot} }{} \end{warpHTML} @@ -42806,9 +43097,9 @@ color:\LWR@origpound\LWR@tempcolor% % \end{macrocode} % % \begin{macrocode} -\@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{macrocode} % % \begin{macrocode} @@ -42826,14 +43117,14 @@ color:\LWR@origpound\LWR@tempcolor% % \codeprint % \begin{macrocode} \begin{warpprint} -\@ifclassloaded{memoir}{\LWR@origRequirePackage{xcolor}}{} +\IfClassLoadedTF{memoir}{\LWR@origRequirePackage{xcolor}}{} \end{warpprint} % \end{macrocode} % \codehtml % \begin{macrocode} \begin{warpHTML} -\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{} +\IfClassLoadedTF{memoir}{\RequirePackage{lwarp-patch-memoir}}{} \end{warpHTML} % \end{macrocode} @@ -42905,23 +43196,23 @@ 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{macrocode} % % \begin{macrocode} @@ -42950,7 +43241,7 @@ color:\LWR@origpound\LWR@tempcolor% % % \begin{macrocode} \AtBeginDocument{ - \@ifpackageloaded{ctexpatch}{% + \IfPackageLoadedTF{ctexpatch}{% \def\@partcntformat#1{% \LWR@isolate{\CTEX@partname}~% \CTEX@part@aftername% @@ -42993,7 +43284,7 @@ color:\LWR@origpound\LWR@tempcolor% % it is reverted to the original. % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{kotexutf}{% +\IfPackageLoadedTF{kotexutf}{% \def\LWR@kotexutf@setref#1#2#3{% \@setref@dhucs@orig{#1}{#2}{#3}% \ifx#1\relax\else @@ -43034,24 +43325,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 @@ -43071,12 +43360,13 @@ color:\LWR@origpound\LWR@tempcolor% % % \begin{macro}{\LWR@mathjaxwarn} \marg{packagename} \marg{More text.} % +% Issue a warning that \MathJax\ is emulated. % To be done \cs{AtBeginDocument}. % % \changes{v0.79}{2020/01/18}{Warn if using packages partially supported by \MathJax.} % \begin{macrocode} \newcommand*{\LWR@mathjaxwarn}[2]{% - \@ifpackageloaded{lwarp-#1}{% + \IfPackageLoadedTF{lwarp-#1}{% \ifblank{#2}{% \PackageWarningNoLine{lwarp} {% @@ -43096,13 +43386,14 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\LWR@nomathjaxwarn} \marg{packagename} \marg{More text.} % +% Issue a warning that \MathJax\ is not supported. % To be done \cs{AtBeginDocument}. % % \changes{v0.894}{2020/12/22}{Warn if using packages not supported by \MathJax.} % \changes{v0.895}{2021/01/08}{Improved \MathJax\ warning.} % \begin{macrocode} \newcommand*{\LWR@nomathjaxwarn}[2]{% - \@ifpackageloaded{lwarp-#1}{% + \IfPackageLoadedTF{lwarp-#1}{% \ifblank{#2}{% \PackageWarningNoLine{lwarp} {% @@ -43153,8 +43444,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 @@ -43177,10 +43467,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} @@ -43188,8 +43476,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 @@ -43214,12 +43501,14 @@ 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{physics} % % {The third-party extension is not used.\MessageBreak % {The MathJax v3 extension is used.\MessageBreak % See the Lwarp manual for details} + \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 @@ -43495,7 +43784,7 @@ color:\LWR@origpound\LWR@tempcolor% % % \changes{v0.84}{2020/03/28}{\pkg{abstract}: Updated for \pkg{memoir}.} % \begin{macrocode} -\@ifclassloaded{memoir} +\IfClassLoadedTF{memoir} { \renewenvironment{abstract}{% % % \titlepage @@ -43871,10 +44160,10 @@ color:\LWR@origpound\LWR@tempcolor% % \changes{v0.76}{2019/10/07}{\pkg{acro}: Updated for v2.10.} % \begin{macrocode} \ExplSyntaxOn -\@ifpackagelater{acro}{2020/04/29}% +\IfPackageAtLeastTF{acro}{2020/04/29}% {}% v3 or later {% before v3 -\@ifpackagelater{acro}{2019/09/23}% +\IfPackageAtLeastTF{acro}{2019/09/23}% {% v2.10 or later \cs_gset_protected:Npn \__acro_typeset:nn #1#2 { @@ -44026,11 +44315,11 @@ color:\LWR@origpound\LWR@tempcolor% % Fix for acronym labels in the captions of floats. % \changes{v0.66}{2019/01/28}{\pkg{acronym}: Fix for acronym in caption.} % \begin{macrocode} -\renewcommand{\@starttoc}[1]{ -\LWR@htmlelementclass{nav}{#1} -\LetLtxMacro\@verridelabel\@gobble -\LWR@orig@starttoc{#1} -\LWR@htmlelementclassend{nav}{#1} +\renewcommand{\@starttoc}[1]{% + \LWR@htmlelementclass{nav}{#1} + \LetLtxMacro\@verridelabel\@gobble + \LWR@orig@starttoc{#1} + \LWR@htmlelementclassend{nav}{#1} } % \end{macrocode} @@ -44257,22 +44546,22 @@ color:\LWR@origpound\LWR@tempcolor% % Paragraph handling to allow line numbers under certain conditions: % \begin{macrocode} \renewcommand{\algocf@everypar}{% -\ifbool{LWR@algocf@dopars}{% - \ifbool{LWR@doingstartpars}{% - \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% - {}% - {% + \ifbool{LWR@algocf@dopars}{% + \ifbool{LWR@doingstartpars}{% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {% % \end{macrocode} % \pkg{algorthm2e} uses \cs{everypar}, so the open paragraph tag % is generated here instead of \cs{LWR@openparagraph}: % \begin{macrocode} - \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline% + \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline% % \end{macrocode} % \begin{macrocode} - \algocf@everyparnl\algocf@everyparhanging% - }% + \algocf@everyparnl\algocf@everyparhanging% + }% + }{}% }{}% -}{}% } % \end{macrocode} % @@ -44280,9 +44569,9 @@ color:\LWR@origpound\LWR@tempcolor% % \pkg{lwarp} caption handling: % \begin{macrocode} \renewcommand{\algocf@makecaption}[2]{% -\LWR@HTML@caption@begin{algocf}% -\LWR@isolate{\algocf@captiontext{#1}{#2}}% -\LWR@HTML@caption@end% + \LWR@HTML@caption@begin{algocf}% + \LWR@isolate{\algocf@captiontext{#1}{#2}}% + \LWR@HTML@caption@end% } % \end{macrocode} % @@ -44312,7 +44601,7 @@ color:\LWR@origpound\LWR@tempcolor% % Turn off line numbering while making the caption: % \begin{macrocode} \long\def\algocf@latexcaption#1[#2]#3{% original definition of caption -\boolfalse{LWR@algocf@dopars}% lwarp +\boolfalse{LWR@algocf@dopars}% lwarp \par% \addcontentsline{\csname ext@#1\endcsname}{#1}% {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \LWR@isolate{#2}}}% @@ -44324,7 +44613,7 @@ color:\LWR@origpound\LWR@tempcolor% \normalsize% \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par% \endgroup% -\booltrue{LWR@algocf@dopars}% lwarp +\booltrue{LWR@algocf@dopars}% lwarp } % \end{macrocode} % @@ -45003,7 +45292,7 @@ color:\LWR@origpound\LWR@tempcolor% % \pkg{amsthm} must be loaded before \pkg{mdframed}: % \changes{v0.63}{2018/12/01}{\pkg{amsthm}, \pkg{mdframed}: Fix for enforced load order.} % \begin{macrocode} -\@ifpackageloaded{mdframed}{ +\IfPackageLoadedTF{mdframed}{ \PackageError{lwarp} {% Package mdframed must be loaded after package amsthm.\MessageBreak @@ -45111,7 +45400,7 @@ color:\LWR@origpound\LWR@tempcolor% % \end{macrocode} % \changes{v0.896}{2021/04/05}{\pkg{amsthm}: Improved back refs.} % \begin{macrocode} - \LWR@newautopagelabel{page}% + \LWR@newautopagelabel{page}\LWR@orignewline% % \end{macrocode} % \begin{macrocode} % \deferred@thm@head{ @@ -45582,7 +45871,7 @@ color:\LWR@origpound\LWR@tempcolor% % If \pkg{array} is not yet loaded, remove the default nullfied macros: % \changes{v0.901}{2021/08/20}{\pkg{array}: Fixed if \pkg{array} already loaed.} % \begin{macrocode} -\@ifpackageloaded{array}{}{% +\IfPackageLoadedTF{array}{}{% \let\firsthline\relax \let\lasthline\relax } @@ -46117,7 +46406,7 @@ color:\LWR@origpound\LWR@tempcolor% % % Require that \pkg{authblk} be loaded before \pkg{titling}: % \begin{macrocode} -\@ifpackageloaded{titling}{ +\IfPackageLoadedTF{titling}{ \PackageError{lwarp-authblk} {Package authblk must be loaded before titling} {% @@ -46526,8 +46815,8 @@ color:\LWR@origpound\LWR@tempcolor% % ^^A % \LWR@stoppars% % ^^A % } % ^^A % -% ^^A % \@ifpackagewith{backnaur}{perp}{\renewcommand{\bnfes}{\HTMLunicode{27c2}}}{}% \perp -% ^^A % \@ifpackagewith{backnaur}{epsilon}{\renewcommand{\bnfes}{\HTMLunicode{3f5}}}{}% \epsilon +% ^^A % \IfPackageLoadedWithOptionsTF{backnaur}{perp}{\renewcommand{\bnfes}{\HTMLunicode{27c2}}}{}% \perp +% ^^A % \IfPackageLoadedWithOptionsTF{backnaur}{epsilon}{\renewcommand{\bnfes}{\HTMLunicode{3f5}}}{}% \epsilon % ^^A % \end{macrocode} % % @@ -46537,23 +46826,23 @@ color:\LWR@origpound\LWR@tempcolor% \CustomizeMathJax{\newcommand{\bnfpn}[1]{\langle \text{\textrm{#1}} \rangle}} \CustomizeMathJax{\newcommand{\bnfor}{\; \mid \;}} \CustomizeMathJax{\newcommand{\bnfsp}{\;}} -\@ifpackagewith{backnaur}{perp}{ +\IfPackageLoadedWithOptionsTF{backnaur}{perp}{ \CustomizeMathJax{\newcommand{\bnfes}{\perp}} }{ - \@ifpackagewith{backnaur}{epsilon}{ + \IfPackageLoadedWithOptionsTF{backnaur}{epsilon}{ \CustomizeMathJax{\newcommand{\bnfes}{\epsilon}} }{ \CustomizeMathJax{\newcommand{\bnfes}{\lambda}} } } -\@ifpackagewith{backnaur}{tsrm}{ +\IfPackageLoadedWithOptionsTF{backnaur}{tsrm}{ \CustomizeMathJax{\newcommand{\bnfts}[1]{\text{#1}}} }{ \CustomizeMathJax{\newcommand{\bnfts}[1]{\text{\texttt{#1}}}} } \CustomizeMathJax{\newcommand{\bnftd}[1]{\text{\textit{#1}}}} \CustomizeMathJax{\newcommand{\bnfsk}{\dots}} -\@ifpackagewith{backnaur}{altpo}{ +\IfPackageLoadedWithOptionsTF{backnaur}{altpo}{ \CustomizeMathJax{\newcommand{\bnfpo}{::=}} }{ \CustomizeMathJax{\newcommand{\bnfpo}{\models}} @@ -47202,7 +47491,7 @@ color:\LWR@origpound\LWR@tempcolor% \xpatchcmd{\blx@addbackref@i} {\c@page} - {\c@LWR@previousautopagelabel}% refto the most recent object + {\c@LWR@previousautopagelabel}% ref to the most recent object {} {\LWR@patcherror{biblatex}{blx@addbackref@i B}} % \end{macrocode} @@ -47785,7 +48074,7 @@ color:\LWR@origpound\LWR@tempcolor% % be removed before loading the actual \pkg{booktabs} definitions. % \changes{v0.79}{2019/12/09}{\pkg{booktabs}: Fix for \pkg{memoir} with \env{lateximage}.} % \begin{macrocode} -\@ifpackageloaded{booktabs}{}{ +\IfPackageLoadedTF{booktabs}{}{ \LetLtxMacro\toprule\relax \LetLtxMacro\midrule\relax \LetLtxMacro\cmidrule\cline @@ -48438,7 +48727,7 @@ color:\LWR@origpound\LWR@tempcolor% % For \MathJax: % \begin{macrocode} \begin{warpMathJax} -\PackageWarningNoLine{lwarp, cancel}{The MathJax v3 extension will be used} +\PackageNoteNoLine{lwarp, cancel}{The MathJax v3 extension will be used} \CustomizeMathJax{\require{cancel}} \end{warpMathJax} % \end{macrocode} @@ -48613,7 +48902,7 @@ s% % \changes{v0.88}{2020/07/15}{\pkg{caption}, \pkg{scrextend}: Fixed \cs{caption*}.} % \begin{macrocode} \caption@AtBeginDocument{ -\@ifpackageloaded{lwarp-scrextend}{ +\IfPackageLoadedTF{lwarp-scrextend}{ \LetLtxMacro\captionbelow\caption \LetLtxMacro\captionabove\caption \LetLtxMacro\captionofbelow\captionof @@ -48656,7 +48945,7 @@ s% % \begin{noindmacro}{\caption@@@make} % \marg{caption label} \marg{caption text} % \begin{macrocode} -\@ifpackagelater{caption3}{2020/08/23}{ +\IfPackageAtLeastTF{caption3}{2020/08/23}{ \renewcommand\caption@@@make[2]{% \LWR@traceinfo{caption@@@make}% % \end{macrocode} @@ -48865,7 +49154,7 @@ s% % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackagePass{cases}[2002/05/02] +\LWR@ProvidesPackagePass{cases}[2020/03/29] % \end{macrocode} % % \begin{macrocode} @@ -48891,6 +49180,36 @@ s% \end{lateximage}\end{BlockClass} } % \end{macrocode} + +% Patch to fix bug for \pkg{cases} when used with \pkg{microtype}: +% \changes{v0.903}{2022/01/30}{\pkg{cases}: Updated to v3.2.} +% ^^A *88* Remove the following if microtype is fixed: +% \begin{macrocode} +\makeatletter +\begin{warpHTML} +\AtBeginDocument{ + \@ifpackageloaded{amsmath} + { + \xpatchcmd{\tagform@}{\leftprotrusion{(}}{(} + {} + {\LWR@patcherror{cases}{tagform@ A}}% + \xpatchcmd{\tagform@}{\rightprotrusion{)}}{)} + {} + {\LWR@patcherror{cases}{tagform@ B}}% + } + { + \xpatchcmd{\@eqnnum}{\leftprotrusion{(}}{(} + {} + {\LWR@patcherror{cases}{@eqnnum A}}% + \xpatchcmd{\@eqnnum}{\rightprotrusion{)}}{)} + {} + {\LWR@patcherror{cases}{@eqnnum A}}% + }% +} +\end{warpHTML} +\makeatother +% \end{macrocode} + % % \iffalse %</cases> @@ -49553,7 +49872,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % \begin{macrocode} \catcode`\_=11 -\@ifpackagelater{chemfig}{2020/03/05} +\IfPackageAtLeastTF{chemfig}{2020/03/05} { \xpretocmd\charge{\begin{lateximage}[-chemfig-~\PackageDiagramAltText]} {}{\LWR@patcherror{chemfig}{charge}} @@ -49563,7 +49882,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% {}{\LWR@patcherror{chemfig}{charge_c}} }{} -\@ifpackagelater{chemfig}{2019/04/18}% +\IfPackageAtLeastTF{chemfig}{2019/04/18}% {% 2019/04/18 or newer % \end{macrocode} % \changes{v0.896}{2021/03/04}{\pkg{chemfig}: Updated to v1.6a.} @@ -49702,11 +50021,18 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% \boolfalse{mathjax}% % \end{macrocode} % An inline image is used, adjusted for the baseline: +% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.} % \begin{macrocode} \LWR@subsingledollar*{% lwarp - \textbackslash{}ch\{\LWR@HTMLsanitize{#2}\}% alt text + \textbackslash{}% + ch% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#2}}% + \}% alt text }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% add'l hashing + \protect\LWR@HTMLsanitizedetokenized{% + \detokenize\expandafter{#1}% + }% add'l hashing }% {% \chemformula_ch:nn {#1} {#2}% original @@ -49720,16 +50046,21 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % \begin{noindmacro}{\chcpd} % Similar to \cs{ch}. % \changes{v0.77}{2019/10/15}{\pkg{chemformula}: Updated to v4.15.} +% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.} % \begin{macrocode} -\@ifpackagelater{chemformula}{2019/10/13}{ +\IfPackageAtLeastTF{chemformula}{2019/10/13}{ \cs_gset_protected:Npn \chemformula_chcpd:nn #1#2 { \begingroup% \boolfalse{mathjax}% \LWR@subsingledollar*{% lwarp - \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}% + \textbackslash{}% + chcpd% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#2}}% + \}% }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{% original \group_begin: \tl_if_blank:nF {#2} @@ -49753,14 +50084,19 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% } }% later than 2019/10/13 {% earlier than 2019/10/13 +% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.} \cs_gset_protected:Npn \chemformula_chcpd:nn #1#2 { \begingroup% \boolfalse{mathjax}% \LWR@subsingledollar*{% lwarp - \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}% + \textbackslash{}% + chcpd% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#2}}% + \}% }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{% original \group_begin: \tl_if_blank:nF {#2} @@ -49800,11 +50136,15 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % % \begin{noindmacro}{\chname} % If standalone, appears in a regular \env{lateximage}, hashed according to contents. +% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.} % \begin{macrocode} \RenewDocumentCommand \chname { R(){}R(){} } { \begin{lateximage}*[% - \textbackslash{}chname(\LWR@HTMLsanitize{#1})(\LWR@HTMLsanitize{#2}) + \textbackslash{}% + chname% + (\LWR@HTMLsanitizedetokenized{\detokenize{#1}})% + (\LWR@HTMLsanitizedetokenized{\detokenize{#2}})% ]*% \chemformula_chwritebelow:nn {#1} {#2} \end{lateximage} @@ -49814,6 +50154,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % % \begin{noindmacro}{\chlewis} % Placed inline, hashed according to contents and options. +% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.} % \begin{macrocode} \RenewDocumentCommand \chlewis { O{}mm } { @@ -49821,7 +50162,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% \boolfalse{mathjax}% \LWR@subsingledollar*{\textbackslash{}chlewis\{#2\}\{#3\}}% { - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{ \chemformula_lewis:nnn {#1} {#2} {#3} } @@ -50150,6 +50491,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % % \subsection{Acid-base} % +% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.} % \begin{macrocode} \AtBeginDocument{ \@ifchemmacrosmoduleloaded{acid-base}{ @@ -50160,9 +50502,14 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% \begingroup \boolfalse{mathjax} \LWR@subsingledollar*{ - \textbackslash{}p\{\LWR@HTMLsanitize{#1}\} + \textbackslash{}% + p% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#1}}% + \} }{ - chemmacrosp\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + chemmacrosp% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{ \group_begin: \mbox @@ -50628,6 +50975,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % % \subsection{Orbital} % +% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.} % \begin{macrocode} \AtBeginDocument{ \@ifchemmacrosmoduleloaded{orbital}{ @@ -50638,7 +50986,10 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% \IfValueTF{#1} { \begin{lateximage}[% - \textbackslash{}orbital{[}\LWR@HTMLsanitize{#1}{]}\{#2\}% + \textbackslash{}% + orbital{[}% + \LWR@HTMLsanitizedetokenized{\detokenize{#1}}% + {]}\{#2\}% ]*[][margin-left: 1em ; margin-right: 1em] } { @@ -50701,6 +51052,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% % % \subsection{Redox} % +% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.} % \begin{macrocode} \AtBeginDocument{ \@ifchemmacrosmoduleloaded{redox}{ @@ -50720,18 +51072,26 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% \IfBooleanTF {#1} { \LWR@subsingledollar*{% yes hash - \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt + \textbackslash{}% + ox*% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#3}}% + \}% alt }{% - star \protect\LWR@HTMLsanitize{\detokenize\expandafter{#2}}% + star \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#2}}% }{% \LWR@chemmacros@ox* {#2} {#3}% contents }% } { \LWR@subsingledollar*{% yes hash - \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt + \textbackslash{}% + ox*% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#3}}% + \}% alt }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#2}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#2}}% }{% \LWR@chemmacros@ox {#2} {#3}% contents }% @@ -50999,6 +51359,7 @@ name = \chemmacros_translate:n {scheme-name} % % \subsection{Thermodynamics} % +% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.} % \begin{macrocode} \AtBeginDocument{ \@ifchemmacrosmoduleloaded{thermodynamics}{ @@ -51010,7 +51371,8 @@ name = \chemmacros_translate:n {scheme-name} \boolfalse{mathjax} \chemmacros_set_keys:nn {thermodynamics} {#1} \LWR@subsingledollar*{% yes hashing - \textbackslash{}state\{\LWR@HTMLsanitize{#2}\}% alt + \textbackslash{}state% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% alt }{% chemmacros_state% add'l hashing #1% options @@ -51343,7 +51705,7 @@ name = \chemmacros_translate:n {scheme-name} % % \codehtml % \begin{macrocode} -\@ifpackageloaded{xeCJK}{}{ +\IfPackageLoadedTF{xeCJK}{}{ \LWR@loadnever{CJK}{ctex, xeCJK} } @@ -51372,7 +51734,7 @@ name = \chemmacros_translate:n {scheme-name} % % \codehtml % \begin{macrocode} -\@ifpackageloaded{xeCJK}{}{ +\IfPackageLoadedTF{xeCJK}{}{ \LWR@loadnever{CJKutf8}{ctex, xeCJK} } @@ -51629,7 +51991,7 @@ name = \chemmacros_translate:n {scheme-name} % If \pkg{hyperref} is loaded, \pkg{cleveref} also defines starred versions % of \pkg{varioref} macros, so they are defined here. % \begin{macrocode} -\@ifpackageloaded{varioref}{ +\IfPackageLoadedTF{varioref}{ \LWR@absorbstar{vref} \LWR@absorbstar{Vref} \LWR@absorbstar{vrefrange} @@ -51642,7 +52004,7 @@ name = \chemmacros_translate:n {scheme-name} % % \changes{v0.896}{2021/04/07}{\pkg{cleveref}: Undo \pkg{memoir} changes.} % \begin{macrocode} -\@ifclassloaded{memoir}{ +\IfClassLoadedTF{memoir}{ \AtBeginDocument{ \def\sf@memsub@label(#1)#2{% \protected@edef\mem@currentlabelname{#1}% @@ -51653,7 +52015,7 @@ name = \chemmacros_translate:n {scheme-name} % % \changes{v0.896}{2021/04/07}{\pkg{cleveref}: Undo \pkg{subfig} changes.} % \begin{macrocode} -\@ifpackageloaded{subfig}{ +\IfPackageLoadedTF{subfig}{ \def\sf@sub@label(#1)#2{% \ifhyperrefloaded \protected@edef\@currentlabelname{% @@ -51773,7 +52135,7 @@ name = \chemmacros_translate:n {scheme-name} \begin{warpMathJax} -\@ifpackagewith{cmbright}{slantedGreek} +\IfPackageLoadedWithOptionsTF{cmbright}{slantedGreek} { \LWR@mathjax@addgreek@u@it*{}{} } @@ -51906,6 +52268,13 @@ name = \chemmacros_translate:n {scheme-name} \RequirePackage{xcolor} % \end{macrocode} % +% \cs{color@endgroup}'s \cs{endgraf} was conflicting with \pkg{lwarp}'s +% paragraph handling. +% \changes{v0.903}{2021/12/13}{\pkg{color}: Par handling.} +% \begin{macrocode} +\let\color@endgroup\endgroup +% \end{macrocode} +% % \iffalse %</color> % \fi @@ -52385,16 +52754,19 @@ name = \chemmacros_translate:n {scheme-name} % \pkg{cuted} is ignored. % % \changes{v0.40}{2017/09/07}{\pkg{cuted}: Added.} +% \changes{v0.903}{2021/10/12}{\pkg{cuted}: Updated to v2.0.} % % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackageDrop{cuted}[2012/10/04] +\LWR@ProvidesPackageDrop{cuted}[2021/10/04] % \end{macrocode} % % \begin{macrocode} \newenvironment{strip}{}{} \newskip\stripsep +\newtoks\preCutedStrip \preCutedStrip{} +\newtoks\postCutedStrip \postCutedStrip{} \def\oldcolsbreak#1{} % \end{macrocode} % @@ -53714,6 +54086,14 @@ name = \chemmacros_translate:n {scheme-name} \def\makeenmark{\@makeenmark} % \end{macrocode} % +% To nullify the endnotes: +% \changes{v0.903}{2021/12/28}{\pkg{endnotes}: Nullify endnotes.} +% \begin{macrocode} +\apptocmd{\LWR@nullifyfootnotes}{% + \renewcommand{\endnote}[2][]{}% + \renewcommand{\endnotemark}[1]{}% +}{}{} +% \end{macrocode} % % For \MathJax: % \changes{v0.82}{2020/03/14}{\pkg{endnotes}: Added \MathJax\ emulation.} @@ -55335,9 +55715,9 @@ name = \chemmacros_translate:n {scheme-name} % % \begin{macrocode} \renewcommand{\GenericCaption}[1]{% -\LWR@figcaption% -\LWR@isolate{#1}% -\endLWR@figcaption% + \LWR@figcaption% + \LWR@isolate{#1}% + \endLWR@figcaption% } % \end{macrocode} % @@ -55365,7 +55745,7 @@ name = \chemmacros_translate:n {scheme-name} % % \begin{macrocode} \AtBeginEnvironment{LWR@nestspan}{% -\RenewDocumentEnvironment{Btrivlist}{m o}{}{}% + \RenewDocumentEnvironment{Btrivlist}{m o}{}{}% } % \end{macrocode} % @@ -55396,17 +55776,45 @@ name = \chemmacros_translate:n {scheme-name} % \changes{v0.51}{2018/03/17}{\pkg{fancybox}: Fix: Optional tag for \cs{item} in a span.} % \begin{macrocode} \RenewDocumentCommand{\LWR@nestspanitem}{d()}{% -\if@newlist\else{\LWR@htmltagc{br /}}\fi% -\LWR@origitem% + \if@newlist\else{ + \LWR@htmltagc{br /}% + \LWR@orignewline% + }\fi% + \LWR@origitem% } % \end{macrocode} % % The various boxed lists become regular lists: % +% \changes{v0.903}{2022/01/29}{\pkg{fancybox}: Par handling.} +% \changes{v0.903}{2022/01/29}{\pkg{fancybox}: Warn if span.} % \begin{macrocode} -\renewenvironment{Bitemize}[1][]{\begin{itemize}}{\end{itemize}} -\renewenvironment{Benumerate}[1][]{\begin{enumerate}}{\end{enumerate}} -\renewenvironment{Bdescription}[1][]{\begin{description}}{\end{description}} +\renewenvironment{Bitemize}[1][] + {% + \LWR@spanwarnformat{Bitemize}% + \booltrue{LWR@starting@fancybox}% + \begin{itemize}% + \boolfalse{LWR@starting@fancybox}% + } + {\end{itemize}} + +\renewenvironment{Benumerate}[1][] + {% + \LWR@spanwarnformat{Benumerate}% + \booltrue{LWR@starting@fancybox}% + \begin{enumerate}% + \boolfalse{LWR@starting@fancybox}% + } + {\end{enumerate}} + +\renewenvironment{Bdescription}[1][] + {% + \LWR@spanwarnformat{Bdescription}% + \booltrue{LWR@starting@fancybox}% + \begin{description}% + \boolfalse{LWR@starting@fancybox}% + } + {\end{description}} % \end{macrocode} % % \cs{boxput} simply prints one then the other argument, @@ -55414,7 +55822,7 @@ name = \chemmacros_translate:n {scheme-name} % % \begin{macrocode} \RenewDocumentCommand{\boxput}{s d() m m}{% -\IfBooleanTF{#1}{#3\quad#4}{#4\quad#3}% + \IfBooleanTF{#1}{#3\quad#4}{#4\quad#3}% } % \end{macrocode} % @@ -55438,24 +55846,24 @@ name = \chemmacros_translate:n {scheme-name} % \begin{macrocode} \let\LWRFB@UseVerbatim\UseVerbatim \renewcommand*{\UseVerbatim}[1]{% -\LWR@atbeginverbatim{Verbatim}% -\LWRFB@UseVerbatim{#1}% -\LWR@afterendverbatim% + \LWR@atbeginverbatim{Verbatim}% + \LWRFB@UseVerbatim{#1}% + \LWR@afterendverbatim% } \let\LWRFB@LUseVerbatim\LUseVerbatim \renewcommand*{\LUseVerbatim}[1]{% -\LWR@atbeginverbatim{LVerbatim}% -\noindent% -\LWRFB@LUseVerbatim{#1}% -\LWR@afterendverbatim% + \LWR@atbeginverbatim{LVerbatim}% + \noindent% + \LWRFB@LUseVerbatim{#1}% + \LWR@afterendverbatim% } \def\@BUseVerbatim[#1]#2{% -\LWR@atbeginverbatim{BVerbatim}% -\LWRFB@UseVerbatim{#2}% -\LWR@afterendverbatim% + \LWR@atbeginverbatim{BVerbatim}% + \LWRFB@UseVerbatim{#2}% + \LWR@afterendverbatim% } % \end{macrocode} % @@ -55653,6 +56061,7 @@ name = \chemmacros_translate:n {scheme-name} \LWR@ProvidesPackagePass{fancyref}[1999/02/03] % \end{macrocode} % +% \DescribeHook[fancyref]{\cs{fancyrefhook}} % To remove the \optn{margin} option, if \cs{fancyrefhook} is anything % other than the \optn{paren} option, then force it to the default instead. % (Comparing to the \optn{margin} option was not possible since \pkg{lwarp} has @@ -57053,7 +57462,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \newbool{LWR@subcaptionloaded} \AtBeginDocument{ -\@ifpackageloaded{subcaption} +\IfPackageLoadedTF{subcaption} {\booltrue{LWR@subcaptionloaded}} {\boolfalse{LWR@subcaptionloaded}} } @@ -57411,12 +57820,13 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % \DescribePackage{flushend} \pkg{flushend} is ignored. % % \changes{v0.34}{2017/07/27}{\pkg{flushend}: Added.} +% \changes{v0.903}{2021/10/12}{\pkg{flushend}: Updated to v4.0.} % % \codehtml % % Discard all options for \pkg{lwarp-flushend}: % \begin{macrocode} -\LWR@ProvidesPackageDrop{flushend}[2017/03/27] +\LWR@ProvidesPackageDrop{flushend}[2021/10/04] % \end{macrocode} % % \begin{macrocode} @@ -57424,8 +57834,8 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \newcommand*{\raggedend}{} \newcommand*{\flushcolsend}{} \newcommand*{\raggedcolsend}{} -\newcommand*{\atColsBreak}[1]{} -\newcommand*{\atColsEnd}[1]{} +\newtoks\atColsBreak \atColsBreak={} +\newtoks\atColsEnd \atColsEnd={} \newcommand*{\showcolsendrule}{} % \end{macrocode} % @@ -58035,7 +58445,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \begingroup% \let\@makefntext\@empty% \let\@finalstrut\@gobble% - \LetLtxMacro\rule\@gobbletwo% *8* also the optional argument? +% \end{macrocode} +% ^^A *8* In the following line, also the optional argument? +% \begin{macrocode} + \LetLtxMacro\rule\@gobbletwo% \booltrue{LWR@spewingnotes}% lwarp \@footnotetext{\unvbox\z@}% \endgroup% @@ -58339,13 +58752,13 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \begin{warpMathJax} -\@ifpackagewith{fourier}{sloped} +\IfPackageLoadedWithOptionsTF{fourier}{sloped} { \LWR@mathjax@addgreek@l@up{other}{} \LWR@mathjax@addgreek@u@it*{other}{} }% sloped {% not sloped - \@ifpackagewith{fourier}{upright} + \IfPackageLoadedWithOptionsTF{fourier}{upright} {% upright option \LWR@mathjax@addgreek@l@up{}{} \LWR@mathjax@addgreek@u@up*{}{} @@ -58431,60 +58844,66 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % Accept all options for \pkg{lwarp-framed}: % \begin{macrocode} \LWR@ProvidesPackagePass{framed}[2011/10/22] + \AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec % \end{macrocode} % \begin{macrocode} - -\renewenvironment{framed}{% -\LWR@forcenewpage -\BlockClass{framed}% +\renewenvironment{framed} +{% + \LWR@forcenewpage + \BlockClass{framed}% } {\endBlockClass} -\renewenvironment{oframed}{% -\LWR@forcenewpage -\BlockClass{framed}% +\renewenvironment{oframed} +{% + \LWR@forcenewpage + \BlockClass{framed}% } {\endBlockClass} -\renewenvironment{shaded}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% +\renewenvironment{shaded} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% } {\endBlockClass} -\renewenvironment{shaded*}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% +\renewenvironment{shaded*} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% } {\endBlockClass} \renewenvironment{leftbar}{% -\LWR@forcenewpage + \LWR@forcenewpage \BlockClass{framedleftbar} - \def\FrameCommand{}% - \MakeFramed {} + \def\FrameCommand{}% + \MakeFramed {} }% - {\endMakeFramed\endBlockClass} +{\endMakeFramed\endBlockClass} -\renewenvironment{snugshade}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% +\renewenvironment{snugshade} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% } {\endBlockClass} -\renewenvironment{snugshade*}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% +\renewenvironment{snugshade*} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% } {\endBlockClass} @@ -58493,47 +58912,49 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \RenewEnviron{titled-frame}[1]{% -\CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY} + \CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY} } % \end{macrocode} -% \cs{CustomFBox} \marg{toptitle} \marg{bottitle} +% \begin{noindmacro}{\CustomFBox} \marg{toptitle} \marg{bottitle} % \marg{thicknesstop} \marg{bottom} \marg{left} \marg{right} % \marg{text contents} % \begin{macrocode} \renewcommand{\CustomFBox}[7]{% -\convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}% -\ifthenelse{\isempty{#1}}{}{% not empty - \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% - \textcolor{TFTitleColor}{\textbf{#1}}% - \end{BlockClass} -}% not empty + \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}% + \ifthenelse{\isempty{#1}}{}{% not empty + \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% + \textcolor{TFTitleColor}{\textbf{#1}}% + \end{BlockClass}% + }% not empty -#7 + #7 -\ifthenelse{\isempty{#2}}{}{% not empty - \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% - \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% - \textcolor{TFTitleColor}{\textbf{#2}}% - \end{BlockClass} -}% not empty -\end{BlockClass} + \ifthenelse{\isempty{#2}}{}{% not empty + \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% + \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% + \textcolor{TFTitleColor}{\textbf{#2}}% + \end{BlockClass}% + }% not empty + \end{BlockClass}% } % \end{macrocode} +% \end{noindmacro} -% \cs{TitleBarFrame} \oarg{marker} \marg{title} \marg{contents} +% \begin{noindmacro}{\TitleBarFrame} \oarg{marker} \marg{title} \marg{contents} % \begin{macrocode} -\renewcommand\TitleBarFrame[3][]{ -\CustomFBox - {#2}{}% - \fboxrule\fboxrule\fboxrule\fboxrule - {#3}% +\renewcommand\TitleBarFrame[3][]{% + \CustomFBox% + {#2}{}% + \fboxrule\fboxrule\fboxrule\fboxrule% + {#3}% } % \end{macrocode} +% \end{noindmacro} % \begin{macrocode} @@ -58541,24 +58962,26 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % \end{macrocode} -% \env{MakeFramed} \marg{settings} +% \begin{noindenvironment}{MakeFramed} \marg{settings} % \begin{macrocode} \let\MakeFramed\relax \let\endMakeFramed\relax \NewEnviron{MakeFramed}[1]{% -\FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}% + \FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}% } % \end{macrocode} +% \end{noindenvironment} -% \cs{fb@put@frame} \marg{frame cmd no split} \marg{frame cmd split} +% \begin{noindmacro}{\fb@put@frame} \marg{frame cmd no split} \marg{frame cmd split} % \begin{macrocode} \renewcommand*{\fb@put@frame}[2]{% -\relax% -\@tempboxa% + \relax% + \@tempboxa% } % \end{macrocode} +% \end{noindmacro} % \iffalse %</framed> @@ -59637,7 +60060,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % \begin{macrocode} \define@key{igraph}{scale}{% \ifthenelse{\equal{#1}{1}}{}{% must expand #1 - \PackageWarning{lwarp}{% + \PackageNote{lwarp}{% It is recommended to use ``[width=xx\protect\linewidth]''\MessageBreak instead of ``[scale=yy]'',% }% @@ -59755,10 +60178,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % which is enabled inside a \env{lateximage}. % \changes{v0.42}{2017/10/24}{\pkg{graphics}: Fix: Class key.} % \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.} +% \changes{v0.903}{2021/12/23}{\pkg{graphics}: \attribute{alt} now in \pkg{graphicx} core.} % \begin{macrocode} \AtBeginDocument{ \define@key{Gin}{class}{} -\define@key{Gin}{alt}{} } % \end{macrocode} @@ -59770,7 +60193,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % converts \EPS\ to \PDF, and the following must NOT be done. % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{epstopdf} +\IfPackageLoadedTF{epstopdf} { \newcommand*{\LWR@replaceEPSSVG}{} }{% @@ -60650,7 +61073,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % % % \begin{macrocode} -\@ifclassloaded{memoir}{ +\IfClassLoadedTF{memoir}{ \let\hangpara\relax \let\hangparas\relax \let\endhangparas\relax @@ -62908,7 +63331,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \begin{macrocode} \LWR@ProvidesPackagePass{keyfloat}[2019/09/23] -\@ifpackagelater{keyfloat}{2019/09/23}{\relax}{ +\IfPackageAtLeastTF{keyfloat}{2019/09/23}{\relax}{ \PackageError{lwarp-keyfloat} {% The keyfloat package is out of date.\MessageBreak @@ -62925,10 +63348,13 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \begin{macrocode} \AtBeginDocument{ % \end{macrocode} + +% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@boxouter}} Integration for \pkg{keyfloat}. % % \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.} % \begin{macrocode} \providecommand*{\KFLT@LWR@hook@boxouter}{} + \renewcommand*{\KFLT@LWR@hook@boxouter}{% \ifbool{KFLT@keywrap}{% }{% @@ -62942,15 +63368,21 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} } % \end{macrocode} % +% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@keysubfloats}} Integration for \pkg{keyfloat}. +% % \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.} % \begin{macrocode} \LetLtxMacro\KFLT@LWR@hook@keysubfloats\KFLT@LWR@hook@boxouter - +% \end{macrocode} +% +% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@keyfloatsminipage}} Integration for \pkg{keyfloat}. +% \begin{macrocode} \let\KFLT@LWR@hook@keyfloatsminipage\relax \let\endKFLT@LWR@hook@keyfloatsminipage\relax \newenvironment*{KFLT@LWR@hook@keyfloatsminipage}[1]{}{} % \end{macrocode} % +% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@keyfloats}} Integration for \pkg{keyfloat}. % \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.} % \begin{macrocode} \LetLtxMacro\KFLT@LWR@hook@keyfloats\KFLT@LWR@hook@boxouter @@ -63131,7 +63563,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} }% text to add } -\@ifpackageloaded{tocdata} +\IfPackageLoadedTF{tocdata} {} {% tocdata not loaded @@ -63518,17 +63950,49 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \CustomizeMathJax{\let\variiiint\iiiint} \CustomizeMathJax{\let\varidotsint\idotsint} -\CustomizeMathJax{\newcommand{\varointctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222E}}}} -\CustomizeMathJax{\newcommand{\oiintclockwise}{\mathop{\unicode{x0222F}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\oiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222F}}}} -\CustomizeMathJax{\newcommand{\varoiintclockwise}{\mathop{\unicode{x0222F}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\varoiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222F}}}} -\CustomizeMathJax{\newcommand{\oiiintclockwise}{\mathop{\unicode{x02230}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\oiiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x02230}}}} -\CustomizeMathJax{\newcommand{\varoiiintclockwise}{\mathop{\unicode{x02230}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\varoiiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x02230}}}} -\CustomizeMathJax{\newcommand{\sqiint}{\mathop{\unicode{x2A16}\!\!\unicode{x2A16}}}} -\CustomizeMathJax{\newcommand{\sqiiint}{\mathop{\unicode{x2A16}\!\!\unicode{x2A16}\!\!\unicode{x2A16}}}} +\CustomizeMathJax{\newcommand{\varointctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x0222E}}% +}} + +\CustomizeMathJax{\newcommand{\oiintclockwise}{% + \mathop{\unicode{x0222F}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\oiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x0222F}}% +}} + +\CustomizeMathJax{\newcommand{\varoiintclockwise}{% + \mathop{\unicode{x0222F}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\varoiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x0222F}}% +}} + +\CustomizeMathJax{\newcommand{\oiiintclockwise}{% + \mathop{\unicode{x02230}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\oiiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x02230}}% +}} + +\CustomizeMathJax{\newcommand{\varoiiintclockwise}{% + \mathop{\unicode{x02230}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\varoiiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x02230}}% +}} + +\CustomizeMathJax{\newcommand{\sqiint}{% + \mathop{\unicode{x2A16}\!\!\unicode{x2A16}}% +}} + +\CustomizeMathJax{\newcommand{\sqiiint}{% + \mathop{\unicode{x2A16}\!\!\unicode{x2A16}\!\!\unicode{x2A16}}% +}} \CustomizeMathJax{\let\widearc\overparen} \CustomizeMathJax{\let\widearcarrow\overrightarrow} @@ -64535,7 +64999,15 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \end{macrocode} % % \begin{macrocode} -\SetLipsumParListItemEnd{\LWR@closeparagraph} +\SetLipsumParListItemEnd{% + \LWR@closeparagraph% +% \end{macrocode} +% \changes{v0.903}{2021/12/13}{\pkg{lipsum}: Par handling.} +% \begin{macrocode} + \leavevmode\LWR@orignewline% +% \end{macrocode} +% \begin{macrocode} +} % \end{macrocode} % % \iffalse @@ -66572,17 +67044,26 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % and some bold fonts may not be not supported by \MathJax. % % \changes{v0.89}{2020/08/31}{\pkg{mathalpha}: Added.} +% \changes{v0.903}{2021/12/23}{\pkg{mathalpha}: Updated for v1.14+.} % % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackagePass{mathalpha}[2019/10/05] +\LWR@ProvidesPackagePass{mathalpha}[2021/11/18] \begin{warpMathJax} +\CustomizeMathJax{\newcommand{\mathbfbb}[1]{\boldsymbol{\mathbb{#1}}}}% not bold +\CustomizeMathJax{\newcommand{\mathbfcal}[1]{\boldsymbol{\mathcal{#1}}}} +\CustomizeMathJax{\newcommand{\mathbffrak}[1]{\boldsymbol{\mathfrak{#1}}}} +\CustomizeMathJax{\newcommand{\mathbfscr}[1]{\boldsymbol{\mathscr{#1}}}}% not bold + +\IfPackageLoadedWithOptionsTF{mathalpha}{oldbold} +{ \CustomizeMathJax{\newcommand{\mathbbb}[1]{\boldsymbol{\mathbb{#1}}}}% not bold \CustomizeMathJax{\newcommand{\mathbcal}[1]{\boldsymbol{\mathcal{#1}}}} \CustomizeMathJax{\newcommand{\mathbfrak}[1]{\boldsymbol{\mathfrak{#1}}}} \CustomizeMathJax{\newcommand{\mathbscr}[1]{\boldsymbol{\mathscr{#1}}}}% not bold +}{} \end{warpMathJax} % \end{macrocode} % @@ -67009,7 +67490,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \begin{warpMathJax} \LWR@infoprocessingmathjax{mathptmx} -\@ifpackagewith{mathptmx}{slantedGreek} +\IfPackageLoadedWithOptionsTF{mathptmx}{slantedGreek} {\LWR@mathjax@addgreek@u@it*{}{}} {} @@ -68587,26 +69068,34 @@ background: % The new definition, called from the new \cs{ce} after math shift is set. % The starred \env{lateximage} uses a hashed filename for the \SVG\ image. % The \attribute{alt} tag is set to the \pkg{mhchem} expression. +% \changes{v0.903}{2021/12/18}{\pkg{mhchem}: Improved alt tag sanitization.} % \begin{macrocode} \newcommand{\LWR@mhchem@HTML@ce}[1]{% -\LWR@findcurrenttextcolor% sets \LWR@tempcolor -\ifbool{LWR@xfakebold}% - {\def\LWR@tempone{Y}}% - {\def\LWR@tempone{N}}% -\begin{lateximage}*[\textbackslash{}ce\{\LWR@HTMLsanitize{#1}\}]*% - [% - FM\LWR@f@family% - SR\LWR@f@series% - SH\LWR@f@shape% - SHC\LWR@f@shapecaps% - CL\LWR@tempcolor% - FB\LWR@tempone% xfakebold - ]% -\LWR@setcurrentfont% -\LWR@mhchem@origce{#1}% -\end{lateximage}% -\endgroup% -\addtocounter{LWR@mhchem@cedepth}{-1}% + \LWR@findcurrenttextcolor% sets \LWR@tempcolor + \ifbool{LWR@xfakebold}% + {\def\LWR@tempone{Y}}% + {\def\LWR@tempone{N}}% + \begin{lateximage}% + *% + [% + \textbackslash{}% + ce% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}% + ]% + *% + [% + FM\LWR@f@family% + SR\LWR@f@series% + SH\LWR@f@shape% + SHC\LWR@f@shapecaps% + CL\LWR@tempcolor% + FB\LWR@tempone% xfakebold + ]% + \LWR@setcurrentfont% + \LWR@mhchem@origce{#1}% + \end{lateximage}% + \endgroup% + \addtocounter{LWR@mhchem@cedepth}{-1}% } % \end{macrocode} @@ -68619,12 +69108,12 @@ background: % The new \cs{ce}. Sets math shift then continues. % \begin{macrocode} \renewcommand{\ce}{% -\begingroup% -\ifnumequal{\value{LWR@mhchem@cedepth}}{0}{% - \catcode`\$=3% math shift -}{}% -\addtocounter{LWR@mhchem@cedepth}{1}% -\LWR@mhchem@HTML@ce% + \begingroup% + \ifnumequal{\value{LWR@mhchem@cedepth}}{0}{% + \catcode`\$=3% math shift + }{}% + \addtocounter{LWR@mhchem@cedepth}{1}% + \LWR@mhchem@HTML@ce% } % \end{macrocode} @@ -68636,26 +69125,34 @@ background: % The new definition, called from the new \cs{cesplit} after math shift is set. % The starred \env{lateximage} uses a hashed filename for the \SVG\ image. % The \attribute{alt} tag is set to the \pkg{mhchem} expression. +% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.} % \begin{macrocode} \newcommand*{\LWR@mhchem@HTML@cesplit}[2] {% -\LWR@findcurrenttextcolor% sets \LWR@tempcolor -\ifbool{LWR@xfakebold}% - {\def\LWR@tempone{Y}}% - {\def\LWR@tempone{N}}% -\begin{lateximage}*[\textbackslash{}cesplit\{\LWR@HTMLsanitize{#2}\}]*% - [% - FM\LWR@f@family% - SR\LWR@f@series% - SH\LWR@f@shape% - SHC\LWR@f@shapecaps% - CL\LWR@tempcolor% - FB\LWR@tempone% xfakebold - ]% -\LWR@setcurrentfont% -\LWR@mhchem@origcesplit{#1}{#2}% -\end{lateximage}% -\endgroup% + \LWR@findcurrenttextcolor% sets \LWR@tempcolor + \ifbool{LWR@xfakebold}% + {\def\LWR@tempone{Y}}% + {\def\LWR@tempone{N}}% + \begin{lateximage}% + *% + [% + \textbackslash{}% + cesplit% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% + ]% + *% + [% + FM\LWR@f@family% + SR\LWR@f@series% + SH\LWR@f@shape% + SHC\LWR@f@shapecaps% + CL\LWR@tempcolor% + FB\LWR@tempone% xfakebold + ]% + \LWR@setcurrentfont% + \LWR@mhchem@origcesplit{#1}{#2}% + \end{lateximage}% + \endgroup% } % \end{macrocode} @@ -68668,12 +69165,12 @@ background: % The new \cs{cesplit}. Sets math shift then continues. % \begin{macrocode} \renewcommand{\cesplit}{% -\begingroup% -\ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{% - \catcode`\$=3% math shift -}{}% -\addtocounter{LWR@mhchem@cesplitdepth}{1}% -\LWR@mhchem@HTML@cesplit% + \begingroup% + \ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{% + \catcode`\$=3% math shift + }{}% + \addtocounter{LWR@mhchem@cesplitdepth}{1}% + \LWR@mhchem@HTML@cesplit% } % \end{macrocode} @@ -68740,7 +69237,7 @@ background: \DeclareDocumentCommand{\microtypesetup}{m}{} \DeclareDocumentCommand{\microtypecontext}{m}{} \DeclareDocumentCommand{\textmicrotypecontext}{m m}{#2} -\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{% +\IfPackageLoadedTF{letterspace}{\let\MT@textls\relax}{% \DeclareDocumentCommand{\lsstyle}{}{} \DeclareDocumentCommand{\textls}{o +m}{} \DeclareDocumentCommand{\lslig}{m}{#1} @@ -68946,11 +69443,12 @@ background: % if other formatting is included. % % \changes{v0.892}{2020/10/07}{\pkg{minted}: Added.} +% \changes{v0.903}{2022/01/02}{\pkg{minted}: Updated to v2.6.} % % \codehtml % % \begin{macrocode} -\LWR@ProvidesPackagePass{minted}[2017/07/19] +\LWR@ProvidesPackagePass{minted}[2021/12/24] % \end{macrocode} % % \begin{macrocode} @@ -68995,6 +69493,15 @@ background: } {} {\LWR@patcherror{minted}{inputminted}} + +\renewenvironment{minted@snugshade*}[1]% +{% + \colorlet{shadecolor}{#1}% + \begin{snugshade*}% +} +{% + \end{snugshade*}% +} % \end{macrocode} % % \iffalse @@ -69820,7 +70327,7 @@ background: % \end{macrocode} % % \begin{macrocode} -\LWR@ProvidesPackagePass{multirow}[2021/01/29] +\LWR@ProvidesPackagePass{multirow}[2021/03/15] % \end{macrocode} % % @@ -69837,12 +70344,15 @@ background: % % \begin{noindmacro}{\LWR@multirow@par} \cs{par} inside a \cs{multirow}. % \begin{macrocode} -\newcommand*{\LWR@multirow@par}{\LWR@htmltag{br /}\LWR@origpar}% +\newcommand*{\LWR@multirow@par}{% + \LWR@htmltag{br /}% +}% % \end{macrocode} % \end{noindmacro} % % \DescribeMacro{\multirow} -% \oarg{vpos} \marg{numrows} \oarg{bigstruts} \marg{width} \oarg{fixup} \marg{text} +% \oarg{1: vpos} \marg{2: numrows} \oarg{3:bigstruts} +% \marg{4: width} \oarg{5: vmove} \marg{6: text} % \changes{v0.19}{2015/05/28}{\pkg{multirow}: Added optional args.} % \changes{v0.39}{2017/08/30}{\pkg{multirow}: Add: New optional \optn{vpos} argument.} % \changes{v0.39}{2017/08/30}{\pkg{multirow}: Add: Supports left/right border for \pkg{bigdelim}.} @@ -69854,73 +70364,80 @@ background: % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@multirow}{O{c} m o m o +m}% {% -\LWR@traceinfo{*** LWR@HTML@multirow #1 #2 #4}% + \LWR@traceinfo{LWR@HTML@multirow #1 #2 #4}% % \end{macrocode} % \changes{v0.69}{2019/03/07}{\pkg{multirow}: Error if \cs{multirow} without \cs{mrowcell}.} % \begin{macrocode} -\booltrue{LWR@usedmultirow}% + \booltrue{LWR@usedmultirow}% % \end{macrocode} % \begin{macrocode} -\LWR@maybenewtablerow% -\LWR@tabularleftedge% + \LWR@maybenewtablerow% + \LWR@tabularleftedge% % \end{macrocode} +% % Print the start of a new table data cell: -% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} +% \changes{v0.895}{2021/01/14}{\pkg{multirow}: Improved \HTML\ quotes.} % \begin{macrocode} -\LWR@htmltag{td rowspan=\textquotedbl#2\textquotedbl\ % + \LWR@htmltag{% + td rowspan=\textquotedbl#2\textquotedbl\ % % \end{macrocode} +% % A class adds the column spec and the rule: % \begin{macrocode} -class=\textquotedbl{}td% + class=\textquotedbl{}td% % \end{macrocode} +% % Append this column's spec: -% \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.} +% \changes{v0.60}{2018/09/17}{\pkg{multirow}: \env{tabular}: Improved memory management: Not using \pkg{xstring}.} % \begin{macrocode} -\LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}% + \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}% % \end{macrocode} +% % If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag. % Also add the vertical bar class. -% \changes{v0.41}{2017/10/07}{Added vertical rules.} +% \changes{v0.41}{2017/10/07}{\pkg{multirow}: Added vertical rules.} % \begin{macrocode} -\LWR@addcmidruletrim% -\LWR@addleftmostbartag% -\LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% -\textquotedbl% + \LWR@addcmidruletrim% + \LWR@addleftmostbartag% + \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% + \textquotedbl% % \end{macrocode} % \changes{v0.42}{2017/10/26}{\pkg{multirow}: If \progcode{FormatWP} add cell alignment.} % \begin{macrocode} -\LWR@tdstartstyles% + \LWR@tdstartstyles% % \end{macrocode} +% % The vertical alignment, if given: % \changes{v0.79}{2020/01/17}{\pkg{multirow}: Fix: Centered vertical alignment.} -% \changes{v0.84}{2020/04/16}{Fix: Multirow style.} +% \changes{v0.84}{2020/04/16}{\pkg{multirow}: Fix: Multirow style.} % \begin{macrocode} -\ifstrequal{#1}{c}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:middle}}{}% -\ifstrequal{#1}{b}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:bottom}}{}% -\ifstrequal{#1}{t}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:top}}{}% + \ifstrequal{#1}{c}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:middle}}{}% + \ifstrequal{#1}{b}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:bottom}}{}% + \ifstrequal{#1}{t}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:top}}{}% % \end{macrocode} +% % The left/right border, if given: -% \changes{v0.84}{2020/04/16}{Fix: Multirow style.} +% \changes{v0.84}{2020/04/16}{\pkg{multirow}: Fix: Multirow style.} % \begin{macrocode} -\ifdefvoid{\LWR@multirowborder}{}{% - \LWR@tdaddstyle% - \LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; % - \LWR@print@mbox{padding-\LWR@multirowborder:} 2px% -}% + \ifdefvoid{\LWR@multirowborder}{}{% + \LWR@tdaddstyle% + \LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; % + \LWR@print@mbox{padding-\LWR@multirowborder:} 2px% + }% % \end{macrocode} % % Additional style elements: % \begin{macrocode} -\LWR@addcmidrulewidth% -\LWR@addcdashline% -\LWR@addtabularrulecolors% -\LWR@tdendstyles% -}% + \LWR@addcmidrulewidth% + \LWR@addcdashline% + \LWR@addtabularrulecolors% + \LWR@tdendstyles% + }% % \end{macrocode} -% \changes{v0.41}{2017/10/05}{Fix: \protect\textless\ spec.} +% \changes{v0.41}{2017/10/05}{\pkg{multirow}: Fix: \protect\textless\ spec.} % The column's |<| spec: % \begin{macrocode} -\LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}% + \LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}% % \end{macrocode} % % While printing the text, redefine |\\| to generate a new line. @@ -69931,17 +70448,18 @@ class=\textquotedbl{}td% % % \cs{par} is redefined to insert an \HTML\ break, and if \env{tabular} % is nested, it is redefined at the start of \env{tabular}. -% \changes{v0.895}{2021/01/31}{Allow \cs{par}.} +% \changes{v0.895}{2021/01/31}{\pkg{multirow}: Allow \cs{par}.} +% \changes{v0.903}{2021/12/17}{\pkg{multirow}: Par handling.} % \begin{macrocode} -\begingroup% - \LetLtxMacro{\\}{\LWR@endofline}% - \let\par\LWR@multirow@par% - #6% -\endgroup% -\LWR@stoppars% -\boolfalse{LWR@intabularmetadata}% -\renewcommand{\LWR@multirowborder}{}% -\LWR@traceinfo{*** LWR@HTML@multirow done}% + \begingroup% + \LetLtxMacro{\\}{\LWR@endofline}% + \booltrue{LWR@in@multirow@par}% + #6% + \endgroup% + \LWR@stoppars% + \boolfalse{LWR@intabularmetadata}% + \renewcommand{\LWR@multirowborder}{}% + \LWR@traceinfo{LWR@HTML@multirow done}% }% \LWR@formatted{multirow} @@ -69956,10 +70474,10 @@ class=\textquotedbl{}td% % \oarg{3:vpos} \marg{4:numrows} \oarg{5:bigstruts} % \marg{6:width} \oarg{7:fixup} \marg{8:text} % -% \changes{v0.39}{2017/08/30}{Added.} +% \changes{v0.39}{2017/08/30}{\pkg{multirow}: Added.} % \changes{v0.57}{2018/05/28}{\pkg{multirow}: Improved print/\HTML\ output selection.} % -% |\@ifpackageloaded{multirow}| determines if v2.0 or later of +% |\IfPackageLoadedTF{multirow}| determines if v2.0 or later of % \pkg{multirow} was used, which included the \cs{ProvidesPackage} macro. % % @@ -70313,7 +70831,8 @@ class=\textquotedbl{}td% \LWR@ProvidesPackagePass{nameauth}[2017/03/22] % \end{macrocode} % -% \pkg{lwarp} formatting is inserted in the following. +% \DescribeHook[nameauth]{\cs{@nameauth@Hook}} +% \pkg{lwarp} formatting is inserted. % \begin{macrocode} \renewcommand*\@nameauth@Hook[1] {% @@ -70570,6 +71089,15 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak \LWR@ProvidesPackagePass{nccfoots}[2005/02/03] % \end{macrocode} % +% To nullify the footnotes where necessary: +% \changes{v0.903}{2021/12/28}{\pkg{nccfoots}: Nullify footnotes.} +% \begin{macrocode} +\apptocmd{\LWR@nullifyfootnotes}{% + \renewcommand*{\Footnote}[1]{}% + \renewcommand*{\Footnotemark}[1]{}% +}{}{} +% \end{macrocode} +% % For \MathJax. % There is no way to test for an empty argument, \watchout % so the mark is not automatically duplicated. @@ -72092,7 +72620,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak % % \begin{macrocode} \AtBeginDocument{ -\@ifpackageloaded{cleveref}{ +\IfPackageLoadedTF{cleveref}{ \gdef\@thm#1#2#3{% \if@thmmarks \stepcounter{end\InTheoType ctr}% @@ -72272,7 +72800,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak \LWR@htmltag{% a id=\textquotedbl\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}\textquotedbl% }% -\LWR@htmltag{/a}% +\LWR@htmltag{/a}\LWR@orignewline% \LWR@startpars% } % \end{macrocode} @@ -73345,31 +73873,109 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak } \def\PN@parnotes@real{% +% \end{macrocode} +% +% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.} +% \begin{macrocode} +\ifPN@inparnotes +\else +% \end{macrocode} +% +% \begin{macrocode} + \LWR@stoppars% +% \end{macrocode} +% +% Avoid nested paragraphs: +% \begin{macrocode} + \addtocounter{LWR@spandepth}{1}% +% \end{macrocode} +% +% \begin{macrocode} % We call \par later, so this avoids recursion with \PN@parnotes@auto \PN@inparnotestrue - \unless\ifvmode\par\fi +% \unless\ifvmode\par\fi % Avoid page breaks between a paragraph and its parnotes - \nopagebreak\addvspace{\parnotevskip}% - \LWR@forcenewpage% lwarp +% \nopagebreak\addvspace{\parnotevskip}% \begin{BlockClass}(note){footnotes}% lwarp - {\parnotefmt{\PN@text}\par}% + \leavevmode\LWR@orignewline% +% \end{macrocode} +% +% Typeset the parnote inside its own group to avoid global changes: +% \begin{macrocode} + {% + \parnotefmt{\PN@text}% + }% + \leavevmode\LWR@orignewline% \end{BlockClass}% lwarp +% \end{macrocode} +% +% \begin{macrocode} + \leavevmode\LWR@orignewline% \global\def\PN@text{}% - \addvspace{\parnotevskip}% % % These can be enabled or disabled by package options % \PN@disable@indent \PN@reset@optional \PN@inparnotesfalse +% \end{macrocode} +% +% Reenable normal paragraph handling: +% \begin{macrocode} + \addtocounter{LWR@spandepth}{-1}% +\fi } +% \end{macrocode} +% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.} +% \begin{macrocode} +\newbool{LWR@parnotes@doingauto} +\boolfalse{LWR@parnotes@doingauto} +% \end{macrocode} + +% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.} +% \begin{macrocode} +\def\PN@parnotes@auto{% + \ifbool{LWR@parnotes@doingauto}{ + \ifx\@currenvir\@PN@autopn + \unless\ifPN@inparnotes + \unless\ifx\PN@text\@empty + \expandafter\PN@parnotes@real + \fi + \fi + \fi + }{}% +} +% \end{macrocode} +% +% Replace original logic due to the use of new \LaTeX paragraph hook handling: +% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.} +% \begin{macrocode} +\renewenvironment{autopn}% + {\booltrue{LWR@parnotes@doingauto}} + {\PN@parnotes@auto}% +% \end{macrocode} +% +% If \pkg{cleveref} is in use, name the new notes: +% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Fixed if no \pkg{cleveref}.} +% \begin{macrocode} \AtBeginDocument{ - \crefname{parnotemark}{paragraph note}{paragraph notes} - \Crefname{parnotemark}{Paragraph note}{Paragraph notes} + \ifdef{\crefname}{ + \crefname{parnotemark}{paragraph note}{paragraph notes} + \Crefname{parnotemark}{Paragraph note}{Paragraph notes} + }{} } % \end{macrocode} % +% To nullify the footnotes where necessary: +% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Nullify footnotes.} +% \begin{macrocode} +\apptocmd{\LWR@nullifyfootnotes}{% + \renewcommand{\parnote}[2][]{}% + \renewcommand\parnotemark[1]{}% +}{}{} +% \end{macrocode} +% % % For \MathJax: % \changes{v0.82}{2020/03/15}{\pkg{parnotes}: Added \MathJax\ emulation.} @@ -74140,7 +74746,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak % an error about a missing file will occur. % Warn the user to convert the images. % \begin{macrocode} -\PackageWarning{lwarp-pdftricks}{ +\PackageWarning{lwarp-pdftricks}{% When the pdftricks images change, remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', } @@ -74365,7 +74971,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % \begin{macrocode} \begin{warpMathJax} -\PackageWarningNoLine{lwarp, physics}{The MathJax v3 extension will be used} +\PackageNoteNoLine{lwarp, physics}{The MathJax v3 extension will be used} \CustomizeMathJax{\require{physics}} \end{warpMathJax} % \end{macrocode} @@ -77831,6 +78437,36 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % +% \iffalse +%<*showlabels> +% \fi +% +% \part{lwarp-showlabels.sty} +% +% \section{showlabels} +% +% \DescribePackage{showlabels} +% \pkg{showlabels} is ignored. +% +% \changes{v0.903}{2021/12/18}{\pkg{showlabels}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{showlabels}[2021/10/27] +% \end{macrocode} +% +% \begin{macrocode} +\providecommand{\showlabelfont}{} +\providecommand{\showlabelsetlabel}[1]{} +\newcommand*{\showlabels}[2][]{} +\newcommand*{\showlabelrefline}{} +\newcommand*{\showlabelsinline}{} +% \end{macrocode} +% +% \iffalse +%</showlabels> +% \fi % % % @@ -78247,13 +78883,15 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \end{macrocode} % % Patched for copy/paste with the \HTML\ \attribute{alt} tag: +% \changes{v0.903}{2021/12/18}{\pkg{SIunits}: Improved alt tag sanitization.} % \begin{macrocode} \ifbool{mathjax}{ \DeclareRobustCommand{\LWR@HTML@unit}[2]{% \LWR@subsingledollar*% lwarp {% alt tag - \textbackslash{}unit\{\LWR@HTMLsanitize{#1}\}% - \{ \LWR@HTMLsanitize{#2}\}% extra space + \textbackslash{}unit% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}% + \{ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% extra space }% {SIunits}% add'l hashing {% @@ -78265,8 +78903,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \@inunitcommandtrue% original \LWR@subsingledollar*% lwarp {% alt tag - \textbackslash{}unit\{\LWR@HTMLsanitize{#1}\}% - \{ \LWR@HTMLsanitize{#2}\}% extra space + \textbackslash{}unit\{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}% + \{ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% extra space }% {SIunits}% add'l hashing {% @@ -78716,12 +79354,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \DescribePackage{siunitx} % \pkg{siunitx-v2} is patched for use by \pkg{lwarp}, % and is emulated for \MathJax. +% % Use as: % \begin{sourceverb} % \usepackage{siunitx}[=v2] % \end{sourceverb} % % \pkg{siunitx} v3 is not yet supported. +% \watchout % % ^^A \limitssiunitx % @@ -78833,12 +79473,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', { \__siunitx_ensure_ltr:n { -% \end{macrocode} -% \cs{color@endgroup} was adding a paragraph break, so use a regular group instead. -% \changes{v0.897}{2021/05/23}{\pkg{siunitx-v2}: Regular group instead of color group.} -% \begin{macrocode} -% \color@begingroup - \begingroup% lwarp + \color@begingroup % \__siunitx_print_color: \__siunitx_font_shape: @@ -78865,8 +79500,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', }% lwarp }% lwarp } -% \color@endgroup - \endgroup% lwarp + \color@endgroup % } } @@ -78906,19 +79540,23 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Improved \SVG\ math.} % \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved \SVG\ math \attribute{alt} tags.} % \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \MathJax.} +% \changes{v0.903}{2021/12/18}{\pkg{siunitx}: Improved alt tag sanitization.} % \begin{macrocode} \__siunitx_unit_output_pre_print: - \begingroup% lwarp - \boolfalse{mathjax}% lwarp + \begingroup% lwarp + \boolfalse{mathjax}% lwarp % \__siunitx_print:nn { number } { \ensuremath {#1} } - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp }{siunitx}{% \__siunitx_print:nn { number } {% \LWR@origensuredmath{#1}% }% - }% lwarp - \endgroup% lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } \group_end:% lwarp @@ -78929,6 +79567,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % For |parse-numbers=false|: % \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \MathJax.} +% \changes{v0.903}{2021/12/18}{\pkg{siunitx}: Improved alt tag sanitization.} % \begin{macrocode} \cs_set_protected:Npn \__siunitx_range_numbers_aux:n #1 { @@ -78944,16 +79583,19 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', { \__siunitx_unit_output_pre_print: \begingroup% lwarp - \boolfalse{mathjax}% lwarp + \boolfalse{mathjax}% lwarp % \__siunitx_print:nn { number } {#1} - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp }{siunitx}{% \__siunitx_print:nn { number } {% \LWR@origensuredmath{#1}% - } % lwarp - }% lwarp - \endgroup% lwarp + } % lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } } @@ -78961,22 +79603,26 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % For |parse-numbers=false|: % \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \MathJax.} +% \changes{v0.903}{2021/12/18}{\pkg{siunitx}: Improved alt tag sanitization.} % \begin{macrocode} \cs_set_protected:Npn \__siunitx_angle_print_direct_aux:nn #1#2 { \tl_if_empty:nF {#1} { \tl_set:Nn \l__siunitx_unit_tl {#2} - \begingroup% lwarp - \boolfalse{mathjax}% lwarp + \begingroup% lwarp + \boolfalse{mathjax}% lwarp % \__siunitx_print:nn { number } {#1} - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp }{siunitx}{% \__siunitx_print:nn { number } { \LWR@origensuredmath{#1}% - }% lwarp - }% lwarp - \endgroup% lwarp + }% lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } } @@ -79153,8 +79799,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % For \MathJax. -% (The following runs much faster as separate \cs{CusomizeMathJax} calls instead -% of one single call.) +% \margintag{\MathJax} +% +% The following runs much faster as separate \cs{CusomizeMathJax} calls instead +% of one single call. % \begin{macrocode} \begin{warpMathJax} \LWR@infoprocessingmathjax{siunitx} @@ -79183,68 +79831,91 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \end{macrocode} % \end{noindmacro} % -% Processes scientific notation. -% Special handling for a mantissa which is either empty or only a minus sign. -% \changes{v0.895}{2021/01/14}{\pkg{siunitx}, \MathJax: Scientific notation.} -% \begin{macrocode} -\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{% - \ifblank{#1}% - {}% - {% - \ifstrequal{#1}{-}% - {-}% - {\LWRsiunitxprintdecimal{#1}\times}% - }% - 10^{\LWRsiunitxprintdecimal{#2}} -}} -% \end{macrocode} +% \begin{noindmacro}{\num} \oarg{options} \marg{value} % % \cs{num} handles optional powers (|e|, |E|, |d|, |D|), % multiples (|x|), plus and minus, and period or comma decimal output. % % To split the string, \cs{def} is used with parameter delimiters. -% When each of the following macro is used, extra delimiters are padded to the end +% When each of the following macros is used, extra delimiters are padded to the end % of the arguments of each macro when used, and % the final argument of each collects any extra unused delimiters. % +% The number is split by powers (|E|, |e|, |D|, |d|), then by dimensions (|x|), +% then by plus and minus (|+|, |-|, |+-|), then into pieces before and after the decimal +% point. +% % \changes{v0.895}{2021/01/14}{\pkg{siunitx}, \MathJax: % \cs{num} sci notation, multiples, +-, decimals, comma.} +% +% Determine if the number is output with a decimal period or a decimal comma. +% The enclosing braces tell \MathJax\ to not add extra space after the punctuation. +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.} % \begin{macrocode} \ExplSyntaxOn \AtBeginDocument{ \ifdefstring{\l__siunitx_output_decimal_tl}{{,}} - {% Use decimal comma - \CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{% - \mathrm{#1}% - \ifblank{#2} - {}% - {,\mathrm{#2}} - }} - - \CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% - \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND% - }} - } - {% Use decimal point - \CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1,#2,#3\LWRsiunitxEND{% - \mathrm{#1}% - \ifblank{#2} - {}% - {.\mathrm{#2}} - }} - - \CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% - \LWRsiunitxprintdecimalsub#1,,,\LWRsiunitxEND% - }} - } + {\CustomizeMathJax{\def\LWRsiunitxdecimal{,}}} + {\CustomizeMathJax{\def\LWRsiunitxdecimal{.}}} } \ExplSyntaxOff % \end{macrocode} % -% \begin{noindmacro}{\num} \oarg{options} \marg{value} +% \pkg{siunitx} accepts either commas or periods as decimal points. +% \cs{LWRsiunitxprintdecimal} splits its input by periods then commas, +% parsing out before and after sections to print on either side of the decimal point. +% +% \cs{LWRsiunitxENDTWO} is used only by \cs{LWRsiunitxprintdecimalsubtwo}, +% to avoid a parsing conflict with the more widely-used \cs{LWRsiunitxEND}. +% +% The following splits by decimal commas: +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.} +% \begin{macrocode} +\CustomizeMathJax{\newcommand{\LWRsiunitxENDTWO}{}} + +\CustomizeMathJax{\def\LWRsiunitxprintdecimalsubtwo#1,#2,#3\LWRsiunitxENDTWO{% +% \end{macrocode} +% +% If nothing is ahead of the decimal comma, add a leading zero: +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Leading zero.} +% \begin{macrocode} + \ifblank{#1}{0}{\mathrm{#1}}% +% \end{macrocode} +% +% If something is after the decimal comma, print the decimal comma and the fraction: +% \begin{macrocode} + \ifblank{#2}% + {}% + {% + {\LWRsiunitxdecimal}% + \mathrm{#2}% + }% +}} +% \end{macrocode} +% +% The following splits by decimal periods: +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.} +% \begin{macrocode} +\CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{% + \LWRsiunitxprintdecimalsubtwo#1,,\LWRsiunitxENDTWO% + \ifblank{#2}% + {}% + {% +% {.}% + {\LWRsiunitxdecimal}% + \LWRsiunitxprintdecimalsubtwo#2,,\LWRsiunitxENDTWO% + }% +}} + +\CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% + \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND% +}} +% \end{macrocode} +% +% The following splits by |+| % \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumplus#1+#2+#3\LWRsiunitxEND{% - \ifblank{#2} + \ifblank{#2}% {\LWRsiunitxprintdecimal{#1}}% no plus {% \ifblank{#1}% @@ -79256,17 +79927,23 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', }% }% }} - +% \end{macrocode} +% +% The following splits by |-| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumminus#1-#2-#3\LWRsiunitxEND{% - \ifblank{#2} + \ifblank{#2}% {\LWRsiunitxnumplus#1+++\LWRsiunitxEND}% {% - \LWRsiunitxprintdecimal{#1}% + \ifblank{#1}{}{\LWRsiunitxprintdecimal{#1}}% \unicode{x02212}% mathematical minus sign \LWRsiunitxprintdecimal{#2}% }% }} - +% \end{macrocode} +% +% The following splits by |+-| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumpm#1+-#2+-#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumminus#1---\LWRsiunitxEND}% @@ -79276,7 +79953,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \LWRsiunitxprintdecimal{#2}% }% }} - +% \end{macrocode} +% +% The following splits by |x| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumx#1x#2x#3x#4\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumpm#1+-+-\LWRsiunitxEND}% @@ -79296,41 +79976,69 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', }% }% }} - +% \end{macrocode} +% +% +% Processes scientific notation. +% Special handling for a mantissa which is either empty or only a minus sign. +% \changes{v0.895}{2021/01/14}{\pkg{siunitx}, \MathJax: Scientific notation.} +% \begin{macrocode} +\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{% + \ifblank{#1}% + {}% + {% + \ifstrequal{#1}{-}% + {-}% + {\LWRsiunitxprintdecimal{#1}\times}% + }% + 10^{\LWRsiunitxprintdecimal{#2}} +}} +% \end{macrocode} +% +% +% The following splits by |D| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumD#1D#2D#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumx#1xxxxx\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - +% \end{macrocode} +% +% The following splits by |d| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumd#1d#2d#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumD#1DDD\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - +% \end{macrocode} +% +% The following splits by |E| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnumE#1E#2E#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumd#1ddd\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - +% \end{macrocode} +% +% The following splits by |e| +% \begin{macrocode} \CustomizeMathJax{\def\LWRsiunitxnume#1e#2e#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumE#1EEE\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - -\CustomizeMathJax{\def\LWRsiunitxnumcomma#1,#2,#3\LWRsiunitxEND{% - \ifblank{#2} - {\LWRsiunitxnume#1eee\LWRsiunitxEND} - {\LWRsiunitxnume#1.#2eee\LWRsiunitxEND} -}} - -\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnumcomma#2,,,\LWRsiunitxEND}} +% \end{macrocode} +% +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.} +% \begin{macrocode} +\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnume#2eee\LWRsiunitxEND}} % \end{macrocode} % \end{noindmacro} % +% % \begin{noindmacro}{\si} \oarg{options} \marg{unit} % \begin{macrocode} \CustomizeMathJax{\newcommand{\si}[2][]{\mathrm{#2}}} @@ -79363,16 +80071,17 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \begin{noindmacro}{\numlist} \oarg{options} \marg{list} % % \cs{numlist} should only be used in text mode. -% If used in \MathJax, it is merely printed as input. +% If used in \MathJax, it is merely printed as text, so add space around the semicolons. +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}: \MathJax: Improved \cs{numlist}.} % \begin{macrocode} -\CustomizeMathJax{\newcommand{\numlist}[2][]{\mathrm{#2}}} +\CustomizeMathJax{\newcommand{\numlist}[2][]{\text{#2}}} % \end{macrocode} % \end{noindmacro} % % \begin{noindmacro}{\numrange} \oarg{options} \marg{value1} \marg{value2} % % \cs{numrange} should only be used in text mode. -% If used in \MathJax\ math, an en-dash is used instead of the \optn{range-phase}. +% If used in \MathJax\ math, an en-dash is used instead of the \optn{range-phrase}. % \changes{v0.89}{2020/08/02}{\pkg{siunitx}: Unicode for endash.} % \begin{macrocode} \CustomizeMathJax{\newcommand{\numrange}[3][]{\num{#2}\,\unicode{x2013}\,\num{#3}}} @@ -79383,8 +80092,9 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % \cs{SIlist} and \cs{SIrange} should only be used in text mode. % If used in \MathJax, a simple emulation is provided. +% \changes{v0.903}{2021/12/10}{\pkg{siunitx}: \MathJax: Improved \cs{SIlist}.} % \begin{macrocode} -\CustomizeMathJax{\newcommand{\SIlist}[3][]{\mathrm{#2\,#3}}} +\CustomizeMathJax{\newcommand{\SIlist}[3][]{\text{#2}\,#3}} % \end{macrocode} % \end{noindmacro} % @@ -79495,7 +80205,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \CustomizeMathJax{\newcommand{\square}[1]{\mathrm{#1}^2}} \CustomizeMathJax{\newcommand{\cubed}{^3}} \CustomizeMathJax{\newcommand{\cubic}[1]{\mathrm{#1}^3}} -\CustomizeMathJax{\newcommand{\per}{/}} +% \end{macrocode} +% \changes{v0.903}{2021/12/09}{\pkg{siunitx}: Improved \cs{per}.} +% \begin{macrocode} +\CustomizeMathJax{\newcommand{\per}{\,\mathrm{/}}} +% \end{macrocode} +% \begin{macrocode} \CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}} % \CustomizeMathJax{\newcommand{\fg}{\femto\gram}} @@ -84087,7 +84802,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % Other \pkg{thm-*} package may be loaded by \pkg{thm-listof}. % \begin{macrocode} -\@ifpackagelater{thm-listof}{2020/08/01}{% v0.72 +\IfPackageAtLeastTF{thm-listof}{2020/08/01}{% v0.72 \def\thmtlo@newentry{% \csdef{l@\thmt@envname}##1##2{\hypertocfloat{1}{figure}{lof}{##1}{##2}}% } @@ -84556,7 +85271,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \begin{macrocode} \newbool{LWR@tikzbabel} -\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0 +\IfPackageAtLeastTF{tikz}{2013/12/20}% Test for Tikz version v3.0.0 {\usetikzlibrary{babel}\booltrue{LWR@tikzbabel}} {\boolfalse{LWR@tikzbabel}} % \end{macrocode} @@ -85553,7 +86268,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % Set default titlepage thanks footnote marks. See \cref{sec:titlehtml}. % \begin{macrocode} -\@ifclassloaded{memoir}{ +\IfClassLoadedTF{memoir}{ \thanksmarkseries{arabic} }{% not memoir \if@titlepage @@ -86323,7 +87038,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', ] \@nameuse{@done\the\c@todo}: {\todoformat\ifx#1\todomark\else\textbf{#1} \fi}#2% } - +% \end{macrocode} +% +% The following are not errors because the code will still compile and +% be usable if the patch is not possible. +% \begin{macrocode} \xpatchcmd{\@displaytodo} {\todoformat #1}{\todoformat \textbf{#1}}{} {\PackageWarning{lwarp-todo}{Unable to patch @displaytodo.}} @@ -86337,10 +87056,16 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \patchcmd{\astodos}{\todoformat #1}{\todoformat \textbf{#1}}{} {\PackageWarning{lwarp-todo}{Unable to patch astodos.}} - +% \end{macrocode} +% +% If \pkg{cleveref} is in use, name the new todo notes: +% \changes{v0.903}{2021/12/23}{\pkg{todo}: Fix if no \pkg{cleveref}.} +% \begin{macrocode} \AtBeginDocument{ +\ifdef{\crefname}{ \crefname{todo}{todo}{todos} \Crefname{todo}{Todo}{Todos} +}{} } % \end{macrocode} @@ -88293,8 +89018,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % When the environment ends: % \begin{macrocode} { -\endBlockClass -\LWR@startpars + \endBlockClass + \LWR@startpars } % \end{macrocode} % \end{noindenvironment} @@ -88578,13 +89303,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \changes{v0.75}{2019/09/22}{\pkg{wrapfig}: Fix for width.} % \changes{v0.896}{2021/03/05}{\pkg{wrapfig}: Added \ARIA\ role.} % \changes{v0.898}{2021/05/26}{\pkg{wrapfig}: Improved integration with \pkg{keyfloat}.} +% \changes{v0.903}{2022/01/01}{\pkg{wrapfig}: Fix: \optn{width} style.} % \begin{macrocode} \newcommand*{\LWR@wrapposition}{} -\newcommand{\LWR@wrapfig@printHTMLwidth}{width:\LWR@printlength{\LWR@templengthone}} +\newcommand{\LWR@wrapfig@printHTMLwidth}{\LWR@printlength{\LWR@templengthone}} \AtBeginDocument{ - \@ifpackageloaded{keyfloat}{ + \IfPackageLoadedTF{keyfloat}{ \renewcommand{\LWR@wrapfig@printHTMLwidth}{% \ifboolexpr{ test {\ifnumgreater{\value{KFLT@keyfloatdepth}}{0}} or @@ -88666,6 +89392,72 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % % +% +% \iffalse +%<*wrapfig2> +% \fi + +% \part{lwarp-wrapfig2.sty} + +% \section{wrapfig2} +% \label{sec:wrapfig2} +% +% \credits{Donald Arseneau, Claudio Beccari} +% +% \changes{v0.903}{2022/01/01}{\pkg{wrapfig2}: Added.} +% +% \DescribePackage{wrapfig2} +% \pkg{wrapfig2} is emulated via a modified version +% of the \pkg{wrapfig} emulation. + +% \codehtml +% \begin{macrocode} +\LWR@ProvidesPackageDrop{wrapfig2}[2021-12-21] + +\LWR@origRequirePackage{lwarp-wrapfig} +% \end{macrocode} +% +% \begin{macrocode} +\RenewDocumentEnvironment{wrapfigure}{o m o G{0pt} s}% original + {\wrapfloat{figure}[#1]{#2}[#3]{#4}}% + {\endwrapfloat} + +\RenewDocumentEnvironment{wraptable}{o m o G{0pt} s}% original + {\wrapfloat{table}[#1]{#2}[#3]{#4}}% + {\endwrapfloat} + +\RenewDocumentEnvironment{wrapfloat}{m o m o G{0pt}}% lwarp +{% + \begin{LWR@setvirtualpage}*% + \LWR@subwrapfigure{#3}{#5}% + \renewcommand*{\@captype}{#1}% +} +{% + \endLWR@BlockClassWP% + \end{LWR@setvirtualpage}% +} + +\NewDocumentEnvironment{wraptext}% + {O{l} D||{0.5\columnwidth} D<>{0} D(){figure}}% +{% + \wrapfloat{#4}[]{#1}[]{#2}% + \tcolorbox% +} +{% + \endtcolorbox% + \endwrapfloat% + \ignorespaces% +} +% \end{macrocode} + +% \iffalse +%</wrapfig2> +% \fi +% +% +% +% +% % \iffalse %<*xbmks> % \fi @@ -88852,6 +89644,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \LWR@ProvidesPackagePass{xcolor}[2016/05/11] % \end{macrocode} + +% \cs{color@endgroup}'s \cs{endgraf} was conflicting with \pkg{lwarp}'s +% paragraph handling. +% \changes{v0.903}{2021/12/13}{\pkg{xcolor}: Par handling.} +% \begin{macrocode} +\let\color@endgroup\endgroup +% \end{macrocode} + % % % \subsection{Remembering and restoring original definitions} @@ -88867,8 +89667,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \margintag{\small\cs{LWR@restoreorigformatting}} % \begin{macrocode} \appto\LWR@restoreorigformatting{% -\LetLtxMacro\pagecolor\LWR@print@pagecolor% -\LetLtxMacro\nopagecolor\LWR@print@nopagecolor% + \LetLtxMacro\pagecolor\LWR@print@pagecolor% + \LetLtxMacro\nopagecolor\LWR@print@nopagecolor% } % \end{macrocode} % @@ -88892,11 +89692,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % Sets \cs{LWR@tempcolor} to the current color. % \begin{macrocode} \renewcommand*{\LWR@findcurrenttextcolor}{% -\LWR@traceinfo{LWR@findcurrenttextcolor}% -\protect\colorlet{LWR@current@color}{.}% -\LWR@traceinfo{LWR@findcurrenttextcolor B}% -\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% -\LWR@traceinfo{LWR@findcurrenttextcolor: done}% + \LWR@traceinfo{LWR@findcurrenttextcolor}% + \protect\colorlet{LWR@current@color}{.}% + \LWR@traceinfo{LWR@findcurrenttextcolor B}% + \protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% + \LWR@traceinfo{LWR@findcurrenttextcolor: done}% } % \end{macrocode} % \end{noindmacro} @@ -88906,10 +89706,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \changes{v0.44}{2017/11/10}{\pkg{xcolor}: Added \cs{LWR@currenttextcolorstyle}.} % \begin{macrocode} \newcommand*{\LWR@currenttextcolorstyle}{% -\LWR@findcurrenttextcolor% -\ifdefstring{\LWR@tempcolor}{000000}% -{}% -{color: \LWR@origpound\LWR@tempcolor ; }% + \LWR@findcurrenttextcolor% + \ifdefstring{\LWR@tempcolor}{000000}% + {}% + {color: \LWR@origpound\LWR@tempcolor ; }% } % \end{macrocode} % \end{noindmacro} @@ -88920,14 +89720,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \changes{v0.44}{2017/11/10}{\pkg{xcolor}: Added \cs{LWR@textcurrentcolor}.} % \begin{macrocode} \DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{% -\begingroup% -\LWR@hook@processingtags% -\LWR@findcurrenttextcolor% -\InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% - \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% - #1% -}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \LWR@findcurrenttextcolor% + \InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% + \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% + #1% + }% + \endgroup% } % \end{macrocode} % \end{macro} @@ -88942,17 +89742,17 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % \begin{macrocode} \NewDocumentCommand{\LWR@colorstyle}{m m}{% -\begingroup% -\LWR@hook@processingtags% + \begingroup% + \LWR@hook@processingtags% % \end{macrocode} % Use the \pkg{xcolor} package to convert to an \HTML\ color space: % \begin{macrocode} -\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% % \end{macrocode} % Print the converted color: % \begin{macrocode} -\LWR@origpound\LWR@tempcolor% -\endgroup% + \LWR@origpound\LWR@tempcolor% + \endgroup% } % \end{macrocode} % \end{noindmacro} @@ -88967,12 +89767,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \changes{v0.44}{2017/11/10}{\pkg{xcolor}: Added \cs{LWR@backgroundcolor}.} % \begin{macrocode} \NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{% -\begingroup% -\LWR@hook@processingtags% -\InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{% -#3% -}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{% + #3% + }% + \endgroup% } % \end{macrocode} % \end{macro} @@ -88987,8 +89787,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % \begin{macrocode} \newcommand*{\LWR@borderpadding}[2]{% -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% + border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% } % \end{macrocode} % \end{noindmacro} @@ -89008,14 +89808,14 @@ padding:\LWR@printlength{\fboxsep}% % \changes{v0.73}{2019/06/14}{\pkg{xcolor}: Added \HTML\ support.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@color}{o m}{% -\IfValueTF{#1}{% - \LWR@print@color[#1]{#2}% - \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -}{% - \LWR@print@color{#2}% - \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor% -}% -\edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}% + \IfValueTF{#1}{% + \LWR@print@color[#1]{#2}% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + }{% + \LWR@print@color{#2}% + \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor% + }% + \edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}% } \LWR@formatted{color} @@ -89034,15 +89834,15 @@ padding:\LWR@printlength{\fboxsep}% % \changes{v0.86}{2020/05/12}{\pkg{xcolor}: \cs{textcolor}: Fixed for \pkg{babel-french}.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{% -\begingroup% -\LWR@hook@processingtags% -\IfValueTF{#1}{% - \color[#1]{#2}% -}{% - \color{#2}% -}% -\InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \IfValueTF{#1}{% + \color[#1]{#2}% + }{% + \color{#2}% + }% + \InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}% + \endgroup% }% \LWR@formatted{textcolor} @@ -89078,13 +89878,13 @@ padding:\LWR@printlength{\fboxsep}% % \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@colorbox}{O{named} m +m}{% -\begingroup% -\LWR@hook@processingtags% -\InlineClass[% -background:\LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% -]{colorbox}{#3}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \InlineClass[% + background:\LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% + ]{colorbox}{#3}% + \endgroup% } % \end{macrocode} % \end{macro} @@ -89097,27 +89897,27 @@ padding:\LWR@printlength{\fboxsep}% % \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and \HTML\ outputs.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{% -\begingroup% -\LWR@hook@processingtags% + \begingroup% + \LWR@hook@processingtags% % \end{macrocode} % \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.} % \begin{macrocode} -\LWR@stoppars% + \LWR@stoppars% % \end{macrocode} % \begin{macrocode} -\begin{BlockClass}[% -background:\LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% -]{colorboxBlock} -#3 -\end{BlockClass}% -\endgroup% + \begin{BlockClass}[% + background:\LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% + ]{colorboxBlock} + #3 + \end{BlockClass}% + \endgroup% % \end{macrocode} % Prevent paragraph tags around horizontal white space % until the start of the next paragraph: % \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.} % \begin{macrocode} -\global\booltrue{LWR@minipagethispar}% + \global\booltrue{LWR@minipagethispar}% } % \end{macrocode} % \end{macro} @@ -89134,23 +89934,23 @@ padding:\LWR@printlength{\fboxsep}% % \changes{v0.892}{2020/10/05}{\pkg{xcolor}: Fixed second optional arg.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{#1} m +m}{% -\LWR@traceinfo{HTML fcolorbox #2 #4}% -\begingroup% -\LWR@hook@processingtags% -\LWR@forceminwidth{\fboxrule}% -\ifthenelse{\equal{#4}{none}}% - {% no background color - \InlineClass[% - \LWR@borderpadding{#1}{#2}% - ]{fcolorbox}{#5}% - }% - {% yes background color - \InlineClass[% - \LWR@borderpadding{#1}{#2} ; % - background:\LWR@colorstyle{#3}{#4}% - ]{fcolorbox}{#5}% - }% -\endgroup% + \LWR@traceinfo{HTML fcolorbox #2 #4}% + \begingroup% + \LWR@hook@processingtags% + \LWR@forceminwidth{\fboxrule}% + \ifthenelse{\equal{#4}{none}}% + {% no background color + \InlineClass[% + \LWR@borderpadding{#1}{#2}% + ]{fcolorbox}{#5}% + }% + {% yes background color + \InlineClass[% + \LWR@borderpadding{#1}{#2} ; % + background:\LWR@colorstyle{#3}{#4}% + ]{fcolorbox}{#5}% + }% + \endgroup% } % \end{macrocode} % \end{macro} @@ -89166,41 +89966,41 @@ padding:\LWR@printlength{\fboxsep}% % \changes{v0.892}{2020/10/05}{\pkg{xcolor}: Fixed second optional arg.} % \begin{macrocode} \NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{#1} m +m}{% -\LWR@traceinfo{HTML fcolorboxBlock #2 #4}% -\begingroup% -\LWR@hook@processingtags% -\LWR@forceminwidth{\fboxrule}% + \LWR@traceinfo{HTML fcolorboxBlock #2 #4}% + \begingroup% + \LWR@hook@processingtags% + \LWR@forceminwidth{\fboxrule}% % \end{macrocode} % \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.} % \begin{macrocode} -\LWR@stoppars% + \LWR@stoppars% % \end{macrocode} % \begin{macrocode} -\ifthenelse{\equal{#4}{none}}% - {% no background color - \begin{BlockClass}[% - \LWR@borderpadding{#1}{#2}% - ]{fcolorboxBlock} - #5 - \end{BlockClass}% - }% - {% yes background color - \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \begin{BlockClass}[% - background:\LWR@origpound\LWR@tempcolortwo\ ; % - \LWR@borderpadding{#1}{#2}% - ]{fcolorboxBlock} - #5 - \end{BlockClass}% - }% -\endgroup% + \ifthenelse{\equal{#4}{none}}% + {% no background color + \begin{BlockClass}[% + \LWR@borderpadding{#1}{#2}% + ]{fcolorboxBlock} + #5 + \end{BlockClass}% + }% + {% yes background color + \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% + \begin{BlockClass}[% + background:\LWR@origpound\LWR@tempcolortwo\ ; % + \LWR@borderpadding{#1}{#2}% + ]{fcolorboxBlock} + #5 + \end{BlockClass}% + }% + \endgroup% % \end{macrocode} % Prevent paragraph tags around horizontal white space % until the start of the next paragraph: % \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.} % \begin{macrocode} -\global\booltrue{LWR@minipagethispar}% -\LWR@traceinfo{HTML fcolorboxBlock done}% + \global\booltrue{LWR@minipagethispar}% + \LWR@traceinfo{HTML fcolorboxBlock done}% } % \end{macrocode} % \end{macro} @@ -89220,15 +90020,15 @@ padding:\LWR@printlength{\fboxsep}% % \end{macrocode} % \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.} % \begin{macrocode} -\LWR@stoppars% + \LWR@stoppars% % \end{macrocode} % \begin{macrocode} -\begin{BlockClass}[% -#3% -\LWR@borderpadding{#1}{#2} ; % -\IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% -width:\LWR@printlength{\LWR@tempwidth}% -]{fcolorminipage}% + \begin{BlockClass}[% + #3% + \LWR@borderpadding{#1}{#2} ; % + \IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% + width:\LWR@printlength{\LWR@tempwidth}% + ]{fcolorminipage}% } % \end{macrocode} % \end{noindmacro} @@ -89242,19 +90042,19 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macrocode} \NewDocumentEnvironment{LWR@HTML@fcolorminipage}{O{named} m O{#1} m O{c} o o m} {% -\LWR@hook@processingtags% -\setlength{\LWR@tempwidth}{#8}% -\IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% -\LWR@forceminwidth{\fboxrule}% -\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -\ifthenelse{\equal{#4}{none}}% - {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% - {% - \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \LWR@subfcolorminipage{#1}{#2}% - {background:\LWR@origpound\LWR@tempcolortwo\ ; }% - {#6}% - }% + \LWR@hook@processingtags% + \setlength{\LWR@tempwidth}{#8}% + \IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% + \LWR@forceminwidth{\fboxrule}% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + \ifthenelse{\equal{#4}{none}}% + {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% + {% + \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% + \LWR@subfcolorminipage{#1}{#2}% + {background:\LWR@origpound\LWR@tempcolortwo\ ; }% + {#6}% + }% }% {% \end{BlockClass}% @@ -89279,19 +90079,22 @@ width:\LWR@printlength{\LWR@tempwidth}% % \changes{v0.57}{2018/06/02}{\pkg{xcolor}: Fix: Colored \cs{boxframe}.} % \begin{macrocode} \newcommand*{\LWR@HTML@boxframe}[3]{% -{% -\setlength{\LWR@tempwidth}{#1}% -\setlength{\LWR@tempheight}{#2}% -\addtolength{\LWR@tempheight}{#3}% -\LWR@forceminwidth{\fboxrule}% -\LWR@findcurrenttextcolor% -\InlineClass[% -display:inline-block ; % -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; % -width:\LWR@printlength{\LWR@tempwidth} ; % -height:\LWR@printlength{\LWR@tempheight}% -]{boxframe}{}% -}% + {% + \setlength{\LWR@tempwidth}{#1}% + \setlength{\LWR@tempheight}{#2}% + \addtolength{\LWR@tempheight}{#3}% + \LWR@forceminwidth{\fboxrule}% + \LWR@findcurrenttextcolor% + \InlineClass[% + display:inline-block ; % + border:% + \LWR@printlength{\LWR@atleastonept} % space + solid % space + \LWR@currenttextcolor{} ; % space + width:\LWR@printlength{\LWR@tempwidth} ; % + height:\LWR@printlength{\LWR@tempheight}% + ]{boxframe}{}% + }% } \LWR@formatted{boxframe} @@ -89308,8 +90111,8 @@ height:\LWR@printlength{\LWR@tempheight}% \newcommand*{\LWR@xcolortempcolor}{} \def\rowc@l@rs[#1]#2#3#4% -{ -\rownum=1% +{% + \rownum=1% \@rowcolorstrue% \@ifxempty{#3}% {\def\@oddrowcolor{\@norowcolor}}% @@ -89363,7 +90166,7 @@ height:\LWR@printlength{\LWR@tempheight}% % \begin{noindmacro}{\@norowcolor} Turns off color for this row. % \begin{macrocode} \def\@norowcolor{% -\renewcommand{\LWR@xcolorrowHTMLcolor}{}% + \renewcommand{\LWR@xcolorrowHTMLcolor}{}% } % \end{macrocode} % \end{noindmacro} @@ -93322,7 +94125,9 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\let\overgroupra\overrightarrow} \CustomizeMathJax{\let\undergroup\underparen} \CustomizeMathJax{\let\undergroupla\underleftarrow} -\CustomizeMathJax{\newcommand{\widering}[1]{\stackrel{\unicode{x2218}}{\overgroup{#1}}}} +\CustomizeMathJax{\newcommand{\widering}[1]{% + \stackrel{\unicode{x2218}}{\overgroup{#1}}% +}} \CustomizeMathJax{\let\widearc\overparen} \CustomizeMathJax{\let\wideOarc\overrightarrow} \CustomizeMathJax{\newcommand{\LWRvvstar}[2]{{\overrightarrow{#1}_{#2}}}} @@ -93335,8 +94140,12 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\smallointsl}{\mathop{\unicode{x222E}}\limits}} \CustomizeMathJax{\newcommand{\smalloiintsl}{\mathop{\unicode{x222F}}\limits}} \CustomizeMathJax{\newcommand{\smalloiiintsl}{\mathop{\unicode{x2230}}\limits}} -\CustomizeMathJax{\newcommand{\smallvarointclockwisesl}{\mathop{\unicode{x2232}}\limits}} -\CustomizeMathJax{\newcommand{\smallointctrclockwisesl}{\mathop{\unicode{x2233}}\limits}} +\CustomizeMathJax{\newcommand{\smallvarointclockwisesl}{% + \mathop{\unicode{x2232}}\limits% +}} +\CustomizeMathJax{\newcommand{\smallointctrclockwisesl}{% + \mathop{\unicode{x2233}}\limits% +}} \CustomizeMathJax{\newcommand{\smallsumintsl}{\mathop{\unicode{x2A0B}}\limits}} \CustomizeMathJax{\newcommand{\smallfintsl}{\mathop{\unicode{x2A0F}}\limits}} \CustomizeMathJax{\newcommand{\smallsqintsl}{\mathop{\unicode{x2A16}}\limits}} @@ -93348,8 +94157,12 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\smallointup}{\mathop{\unicode{x222E}}\limits}} \CustomizeMathJax{\newcommand{\smalloiintup}{\mathop{\unicode{x222F}}\limits}} \CustomizeMathJax{\newcommand{\smalloiiintup}{\mathop{\unicode{x2230}}\limits}} -\CustomizeMathJax{\newcommand{\smallvarointclockwiseup}{\mathop{\unicode{x2232}}\limits}} -\CustomizeMathJax{\newcommand{\smallointctrclockwiseup}{\mathop{\unicode{x2233}}\limits}} +\CustomizeMathJax{\newcommand{\smallvarointclockwiseup}{% + \mathop{\unicode{x2232}}\limits% +}} +\CustomizeMathJax{\newcommand{\smallointctrclockwiseup}{% + \mathop{\unicode{x2233}}\limits% +}} \CustomizeMathJax{\newcommand{\smallsumintup}{\mathop{\unicode{x2A0B}}\limits}} \CustomizeMathJax{\newcommand{\smallfintup}{\mathop{\unicode{x2A0F}}\limits}} \CustomizeMathJax{\newcommand{\smallsqintup}{\mathop{\unicode{x2A16}}\limits}} @@ -93385,8 +94198,12 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\let\ointup\oint} \CustomizeMathJax{\newcommand{\oiintup}{\mathop{\unicode{x222F}}\limits}} \CustomizeMathJax{\newcommand{\oiiintup}{\mathop{\unicode{x2230}}\limits}} -\CustomizeMathJax{\newcommand{\varointclockwiseup}{\mathop{\unicode{x2232}}\limits}} -\CustomizeMathJax{\newcommand{\ointctrclockwiseup}{\mathop{\unicode{x2233}}\limits}} +\CustomizeMathJax{\newcommand{\varointclockwiseup}{% + \mathop{\unicode{x2232}}\limits% +}} +\CustomizeMathJax{\newcommand{\ointctrclockwiseup}{% + \mathop{\unicode{x2233}}\limits% +}} \CustomizeMathJax{\newcommand{\sumintup}{\mathop{\unicode{x2A0B}}\limits}} \CustomizeMathJax{\newcommand{\fintup}{\mathop{\unicode{x2A0F}}\limits}} \CustomizeMathJax{\newcommand{\sqintup}{\mathop{\unicode{x2A16}}\limits}} @@ -93425,8 +94242,12 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\medbullet}{\mathbin{\unicode{x025CF}}}} \CustomizeMathJax{\newcommand{\varparallel}{\mathrel{\unicode{x02AFD}}}} \CustomizeMathJax{\newcommand{\varparallelinv}{\mathrel{\unicode{x244A}}}} -\CustomizeMathJax{\newcommand{\nvarparallel}{\mathrel{\LWRoverlaysymbols{-}{\unicode{x02AFD}}}}} -\CustomizeMathJax{\newcommand{\nvarparallelinv}{\mathrel{\LWRoverlaysymbols{-}{\unicode{x244A}}}}} +\CustomizeMathJax{\newcommand{\nvarparallel}{% + \mathrel{\LWRoverlaysymbols{-}{\unicode{x02AFD}}}% +}} +\CustomizeMathJax{\newcommand{\nvarparallelinv}{% + \mathrel{\LWRoverlaysymbols{-}{\unicode{x244A}}}% +}} % % \end{macrocode} % \changes{v0.891}{2020/09/19}{\pkg{lwarp-common-mathjax-newpxtxmath}: Expanded for \pkg{kpfonts}.} @@ -93443,8 +94264,12 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\succeqq}{\mathrel{\unicode{x02AB4}}}} % -\CustomizeMathJax{\newcommand{\nprecsim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227E}}}}} -\CustomizeMathJax{\newcommand{\nsuccsim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227F}}}}} +\CustomizeMathJax{\newcommand{\nprecsim}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227E}}}% +}} +\CustomizeMathJax{\newcommand{\nsuccsim}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227F}}}% +}} \CustomizeMathJax{\newcommand{\nlesssim}{\mathrel{\unicode{x02274}}}} \CustomizeMathJax{\newcommand{\ngtrsim}{\mathrel{\unicode{x02275}}}} % @@ -93456,36 +94281,70 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\notni}{\mathrel{\unicode{x220C}}}} \CustomizeMathJax{\let\notowns\notni} % -\CustomizeMathJax{\newcommand{\nlessapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02A85}}}}} -\CustomizeMathJax{\newcommand{\ngtrapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02A86}}}}} +\CustomizeMathJax{\newcommand{\nlessapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02A85}}}% +}} +\CustomizeMathJax{\newcommand{\ngtrapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02A86}}}% +}} % -\CustomizeMathJax{\newcommand{\npreccurlyeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227C}}}}} -\CustomizeMathJax{\newcommand{\nsucccurlyeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227D}}}}} +\CustomizeMathJax{\newcommand{\npreccurlyeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227C}}}% +}} +\CustomizeMathJax{\newcommand{\nsucccurlyeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227D}}}% +}} \CustomizeMathJax{\newcommand{\ngtrless}{\mathrel{\unicode{x02279}}}} \CustomizeMathJax{\newcommand{\nlessgtr}{\mathrel{\unicode{x2278}}}} -\CustomizeMathJax{\newcommand{\nbumpeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224F}}}}} -\CustomizeMathJax{\newcommand{\nBumpeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224E}}}}} +\CustomizeMathJax{\newcommand{\nbumpeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224F}}}% +}} +\CustomizeMathJax{\newcommand{\nBumpeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224E}}}% +}} % -\CustomizeMathJax{\newcommand{\nbacksim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0223D}}}}} -\CustomizeMathJax{\newcommand{\nbacksimeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022CD}}}}} +\CustomizeMathJax{\newcommand{\nbacksim}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0223D}}}% +}} +\CustomizeMathJax{\newcommand{\nbacksimeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x022CD}}}% +}} \CustomizeMathJax{\newcommand{\nasymp}{\mathrel{\unicode{x226D}}}} \CustomizeMathJax{\newcommand{\nequiv}{\mathrel{\unicode{x2262}}}} \CustomizeMathJax{\newcommand{\napprox}{\mathrel{\unicode{x2249}}}} % -\CustomizeMathJax{\newcommand{\nll}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0226A}}}}} -\CustomizeMathJax{\newcommand{\ngg}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0226B}}}}} +\CustomizeMathJax{\newcommand{\nll}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0226A}}}% +}} +\CustomizeMathJax{\newcommand{\ngg}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0226B}}}% +}} \CustomizeMathJax{\newcommand{\nthickapprox}{% \mathrel{\LWRoverlaysymbols{/}{{\mathbf{\unicode{x02248}}}}}% }} -\CustomizeMathJax{\newcommand{\napproxeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224A}}}}} -\CustomizeMathJax{\newcommand{\nprecapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB7}}}}} -\CustomizeMathJax{\newcommand{\nsuccapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB8}}}}} -\CustomizeMathJax{\newcommand{\npreceqq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB3}}}}} -\CustomizeMathJax{\newcommand{\nsucceqq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB4}}}}} +\CustomizeMathJax{\newcommand{\napproxeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224A}}}% +}} +\CustomizeMathJax{\newcommand{\nprecapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB7}}}% +}} +\CustomizeMathJax{\newcommand{\nsuccapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB8}}}% +}} +\CustomizeMathJax{\newcommand{\npreceqq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB3}}}% +}} +\CustomizeMathJax{\newcommand{\nsucceqq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB4}}}% +}} \CustomizeMathJax{\newcommand{\nsimeq}{\mathrel{\unicode{x02244}}}} % -\CustomizeMathJax{\newcommand{\nSubset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022D0}}}}} -\CustomizeMathJax{\newcommand{\nSupset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022D1}}}}} +\CustomizeMathJax{\newcommand{\nSubset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x022D0}}}% +}} +\CustomizeMathJax{\newcommand{\nSupset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x022D1}}}% +}} \CustomizeMathJax{\newcommand{\nsqsubseteq}{\mathrel{\unicode{x022E2}}}} \CustomizeMathJax{\newcommand{\nsqsupseteq}{\mathrel{\unicode{x022E3}}}} % @@ -93495,11 +94354,21 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\Coloneq}{\mathrel{\unicode{x2237}-}}} \CustomizeMathJax{\newcommand{\Eqcolon}{\mathrel{-\unicode{x2237}}}} % -\CustomizeMathJax{\newcommand{\lvec}[1]{\mathord{\overset{\unicode{x02190}}{#1}}}} -\CustomizeMathJax{\newcommand{\lrvec}[1]{\mathord{\overset{\unicode{x2194}}{#1}}}} -\CustomizeMathJax{\newcommand{\harpoonacc}[1]{\mathord{\overset{\unicode{x021C0}}{#1}}}} -\CustomizeMathJax{\newcommand{\lharpoonacc}[1]{\mathord{\overset{\unicode{x021BC}}{#1}}}} -\CustomizeMathJax{\newcommand{\lrharpoonacc}[1]{\mathord{\overset{\unicode{x0294E}}{#1}}}} +\CustomizeMathJax{\newcommand{\lvec}[1]{% + \mathord{\overset{\unicode{x02190}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\lrvec}[1]{% + \mathord{\overset{\unicode{x2194}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\harpoonacc}[1]{% + \mathord{\overset{\unicode{x021C0}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\lharpoonacc}[1]{% + \mathord{\overset{\unicode{x021BC}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\lrharpoonacc}[1]{% + \mathord{\overset{\unicode{x0294E}}{#1}}% +}} \CustomizeMathJax{\newcommand{\barbar}[1]{\mathord{\overset{=}{#1}}}} \CustomizeMathJax{\newcommand{\bartilde}[1]{\mathord{\overset{\simeq}{#1}}}} \CustomizeMathJax{\newcommand{\barhat}[1]{\mathord{\hat{\bar{#1}}}}} @@ -93539,9 +94408,15 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\lrtimes}{\mathrel{\unicode{x2A1D}}}} \CustomizeMathJax{\newcommand{\Diamondblack}{\mathord{\unicode{x025C6}}}} -\CustomizeMathJax{\newcommand{\nplus}{\mathrel{\LWRoverlaysymbols{+}{\unicode{x02229}}}}} -\CustomizeMathJax{\newcommand{\nsqsubset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0228F}}}}} -\CustomizeMathJax{\newcommand{\nsqsupset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02290}}}}} +\CustomizeMathJax{\newcommand{\nplus}{% + \mathrel{\LWRoverlaysymbols{+}{\unicode{x02229}}}% +}} +\CustomizeMathJax{\newcommand{\nsqsubset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0228F}}}% +}} +\CustomizeMathJax{\newcommand{\nsqsupset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02290}}}% +}} \CustomizeMathJax{\newcommand{\dasharrow}{\mathrel{\unicode{x021E2}}}} \CustomizeMathJax{\newcommand{\leftsquigarrow}{\mathrel{\unicode{x021DC}}}} \CustomizeMathJax{\newcommand{\ntwoheadrightarrow}{\mathrel{\unicode{x02900}}}} @@ -93565,8 +94440,12 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\leadstoext}{\mathrel{\unicode{xFF5E}}}} -\CustomizeMathJax{\newcommand{\sqcupplus}{\mathbin{\LWRoverlaysymbols{+}{\unicode{x02294}}}}} -\CustomizeMathJax{\newcommand{\sqcapplus}{\mathbin{\LWRoverlaysymbols{+}{\unicode{x02293}}}}} +\CustomizeMathJax{\newcommand{\sqcupplus}{% + \mathbin{\LWRoverlaysymbols{+}{\unicode{x02294}}}% +}} +\CustomizeMathJax{\newcommand{\sqcapplus}{% + \mathbin{\LWRoverlaysymbols{+}{\unicode{x02293}}}% +}} \CustomizeMathJax{\newcommand{\dlb}{\mathopen{\unicode{x027E6}}}} \CustomizeMathJax{\newcommand{\drb}{\mathopen{\unicode{x027E7}}}} @@ -93581,7 +94460,9 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\forallAlt}{\mathord{\unicode{x02200}}}} \CustomizeMathJax{\newcommand{\emptysetAlt}{\mathord{\unicode{x02205}}}} -\CustomizeMathJax{\newcommand{\uppartial}{\mathord{\unicode{x02202}}}}% not upright +\CustomizeMathJax{\newcommand{\uppartial}{% + \mathord{\unicode{x02202}}% +}}% not upright \CustomizeMathJax{\let\varmathbb\mathbb} \CustomizeMathJax{\let\vmathbb\mathbb} @@ -93664,31 +94545,71 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\let\Mmapsfrom\Mmappedfrom}% from kpfonts-otf \CustomizeMathJax{\let\Longmmapsfrom\Longmmappedfrom}% from kpfonts-otf % -\CustomizeMathJax{\newcommand{\boxright}{\mathrel{\unicode{x025A1}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\boxleft}{\mathrel{\unicode{x02190}\!\unicode{x025A1}}}} -\CustomizeMathJax{\newcommand{\boxdotright}{\mathrel{\unicode{x022A1}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\boxdotleft}{\mathrel{\unicode{x02190}\!\unicode{x022A1}}}} - -\CustomizeMathJax{\newcommand{\Diamondright}{\mathrel{\unicode{x025C7}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\Diamondleft}{\mathrel{\unicode{x02190}\!\unicode{x025C7}}}} -\CustomizeMathJax{\newcommand{\Diamonddotright}{\mathrel{\unicode{x027D0}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\Diamonddotleft}{\mathrel{\unicode{x02190}\!\unicode{x027D0}}}} - -\CustomizeMathJax{\newcommand{\boxRight}{\mathrel{\unicode{x025A1}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\boxLeft}{\mathrel{\unicode{x021D0}\!\unicode{x025A1}}}} -\CustomizeMathJax{\newcommand{\boxdotRight}{\mathrel{\unicode{x022A1}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\boxdotLeft}{\mathrel{\unicode{x021D0}\!\unicode{x022A1}}}} - -\CustomizeMathJax{\newcommand{\DiamondRight}{\mathrel{\unicode{x025C7}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\DiamondLeft}{\mathrel{\unicode{x021D0}\!\unicode{x025C7}}}} -\CustomizeMathJax{\newcommand{\DiamonddotRight}{\mathrel{\unicode{x027D0}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\DiamonddotLeft}{\mathrel{\unicode{x021D0}\!\unicode{x027D0}}}} +\CustomizeMathJax{\newcommand{\boxright}{% + \mathrel{\unicode{x025A1}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\boxleft}{% + \mathrel{\unicode{x02190}\!\unicode{x025A1}}% +}} +\CustomizeMathJax{\newcommand{\boxdotright}{% + \mathrel{\unicode{x022A1}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\boxdotleft}{% + \mathrel{\unicode{x02190}\!\unicode{x022A1}}% +}} + +\CustomizeMathJax{\newcommand{\Diamondright}{% + \mathrel{\unicode{x025C7}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\Diamondleft}{% + \mathrel{\unicode{x02190}\!\unicode{x025C7}}% +}} +\CustomizeMathJax{\newcommand{\Diamonddotright}{% + \mathrel{\unicode{x027D0}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\Diamonddotleft}{% + \mathrel{\unicode{x02190}\!\unicode{x027D0}}% +}} + +\CustomizeMathJax{\newcommand{\boxRight}{% + \mathrel{\unicode{x025A1}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\boxLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x025A1}}% +}} +\CustomizeMathJax{\newcommand{\boxdotRight}{% + \mathrel{\unicode{x022A1}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\boxdotLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x022A1}}% +}} + +\CustomizeMathJax{\newcommand{\DiamondRight}{% + \mathrel{\unicode{x025C7}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\DiamondLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x025C7}}% +}} +\CustomizeMathJax{\newcommand{\DiamonddotRight}{% + \mathrel{\unicode{x027D0}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\DiamonddotLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x027D0}}% +}} \CustomizeMathJax{\newcommand{\Diamonddot}{\mathrel{\unicode{x027D0}}}} -\CustomizeMathJax{\newcommand{\circleright}{\mathrel{\unicode{x025CB}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\circleleft}{\mathrel{\unicode{x02190}\!\unicode{x025CB}}}} -\CustomizeMathJax{\newcommand{\circledotright}{\mathrel{\unicode{x02299}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\circledotleft}{\mathrel{\unicode{x02190}\!\unicode{x02299}}}} +\CustomizeMathJax{\newcommand{\circleright}{% + \mathrel{\unicode{x025CB}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\circleleft}{% + \mathrel{\unicode{x02190}\!\unicode{x025CB}}% +}} +\CustomizeMathJax{\newcommand{\circledotright}{% + \mathrel{\unicode{x02299}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\circledotleft}{% + \mathrel{\unicode{x02190}\!\unicode{x02299}}% +}} \CustomizeMathJax{\let\circleddotright\circledotright} \CustomizeMathJax{\let\circleddotleft\circledotleft} @@ -93696,7 +94617,9 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\multimapboth}{\mathrel{\unicode{x029DF}}}} \CustomizeMathJax{\newcommand{\multimapdot}{{\mathrel{-\!\bullet}}}} \CustomizeMathJax{\newcommand{\multimapdotinv}{\mathrel{\bullet\!-}}} -\CustomizeMathJax{\newcommand{\multimapdotboth}{\mathrel{{\bullet\!\!-\!\!\bullet}}}} +\CustomizeMathJax{\newcommand{\multimapdotboth}{% + \mathrel{{\bullet\!\!-\!\!\bullet}}% +}} \CustomizeMathJax{\newcommand{\multimapdotbothA}{\mathrel{\unicode{x022B6}}}} \CustomizeMathJax{\newcommand{\multimapdotbothB}{\mathrel{\unicode{x22B7}}}} @@ -93741,11 +94664,17 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\colonapprox}{\mathrel{:\approx}}} \CustomizeMathJax{\newcommand{\colonsim}{\mathrel{:\sim}}} -\CustomizeMathJax{\newcommand{\Colonapprox}{\mathrel{\unicode{x2237}\!\approx}}} +\CustomizeMathJax{\newcommand{\Colonapprox}{% + \mathrel{\unicode{x2237}\!\approx}% +}} \CustomizeMathJax{\newcommand{\Colonsim}{\mathrel{\unicode{x2237}\!\sim}}} -\CustomizeMathJax{\newcommand{\strictif}{\mathrel{\unicode{x0297D}}}}% right fish tail -\CustomizeMathJax{\newcommand{\strictfi}{\mathrel{\unicode{x0297C}}}}% left fish tail +\CustomizeMathJax{\newcommand{\strictif}{% + \mathrel{\unicode{x0297D}}% +}}% right fish tail +\CustomizeMathJax{\newcommand{\strictfi}{% + \mathrel{\unicode{x0297C}}% +}}% left fish tail \CustomizeMathJax{\newcommand{\strictiff}{% \mathrel{\unicode{x0297C}\!\!\unicode{x0297D}}% }}% left/right fish tails @@ -93758,8 +94687,12 @@ height:\LWR@printlength{\LWR@tempheight}% }} \CustomizeMathJax{\newcommand{\circledbar}{\mathbin{\unicode{x029B6}}}} -\CustomizeMathJax{\newcommand{\openJoin}{\mathrel{\unicode{x2AA4}}}}% overlapping >< -\CustomizeMathJax{\newcommand{\opentimes}{\mathrel{\unicode{x2AA4}}}}% overlapping >< +\CustomizeMathJax{\newcommand{\openJoin}{% + \mathrel{\unicode{x2AA4}}% +}}% overlapping >< +\CustomizeMathJax{\newcommand{\opentimes}{% + \mathrel{\unicode{x2AA4}}% +}}% overlapping >< \CustomizeMathJax{\newcommand{\VvDash}{\mathrel{\unicode{x22AA}}}} @@ -93769,7 +94702,9 @@ height:\LWR@printlength{\LWR@tempheight}% \CustomizeMathJax{\newcommand{\lambdaslash}{\mathord{\unicode{x019B}}}} -\CustomizeMathJax{\newcommand{\Wr}{\mathbin{\unicode{x02240}\!\unicode{x02240}}}} +\CustomizeMathJax{\newcommand{\Wr}{% + \mathbin{\unicode{x02240}\!\unicode{x02240}}% +}} \CustomizeMathJax{\newcommand{\dashleftrightarrow}{% \mathrel{\unicode{x021E0}\!\unicode{x021E2}}% diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins index b78c0027ad2..936ebf198b8 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins @@ -474,6 +474,7 @@ version 2005/12/01 or later. \file{lwarp-shapepar.sty}{\from{lwarp.dtx}{shapepar}} \file{lwarp-showidx.sty}{\from{lwarp.dtx}{idx}} \file{lwarp-showkeys.sty}{\from{lwarp.dtx}{showkeys}} +\file{lwarp-showlabels.sty}{\from{lwarp.dtx}{showlabels}} \file{lwarp-showtags.sty}{\from{lwarp.dtx}{showtags}} \file{lwarp-shuffle.sty}{\from{lwarp.dtx}{shuffle}} \file{lwarp-sidecap.sty}{\from{lwarp.dtx}{sidecap}} @@ -587,6 +588,7 @@ version 2005/12/01 or later. \file{lwarp-widows-and-orphans.sty}{\from{lwarp.dtx}{widows-and-orphans}} \file{lwarp-witharrows.sty}{\from{lwarp.dtx}{witharrows}} \file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}} +\file{lwarp-wrapfig2.sty}{\from{lwarp.dtx}{wrapfig2}} \file{lwarp-xbmks.sty}{\from{lwarp.dtx}{xbmks}} \file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}} \file{lwarp-xechangebar.sty}{\from{lwarp.dtx}{xechangebar}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-CJK.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-CJK.sty index 8c1c2340eac..8903a05daba 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-CJK.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-CJK.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\@ifpackageloaded{xeCJK}{}{ +\IfPackageLoadedTF{xeCJK}{}{ \LWR@loadnever{CJK}{ctex, xeCJK} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-CJKutf8.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-CJKutf8.sty index 8e7f93be9d6..6624af06008 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-CJKutf8.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-CJKutf8.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\@ifpackageloaded{xeCJK}{}{ +\IfPackageLoadedTF{xeCJK}{}{ \LWR@loadnever{CJKutf8}{ctex, xeCJK} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty index 7265a223b12..325ab3544f9 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty @@ -20,8 +20,9 @@ \DeclareRobustCommand{\LWR@HTML@unit}[2]{% \LWR@subsingledollar*% lwarp {% alt tag - \textbackslash{}unit\{\LWR@HTMLsanitize{#1}\}% - \{ \LWR@HTMLsanitize{#2}\}% extra space + \textbackslash{}unit% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}% + \{ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% extra space }% {SIunits}% add'l hashing {% @@ -33,8 +34,8 @@ \@inunitcommandtrue% original \LWR@subsingledollar*% lwarp {% alt tag - \textbackslash{}unit\{\LWR@HTMLsanitize{#1}\}% - \{ \LWR@HTMLsanitize{#2}\}% extra space + \textbackslash{}unit\{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}% + \{ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% extra space }% {SIunits}% add'l hashing {% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty index 30f5a02459d..ccfef32c6a1 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty @@ -32,7 +32,7 @@ \InlineClass{abstractrunintitle}{\abstractname}% \@bslabeldelim}% } -\@ifclassloaded{memoir} +\IfClassLoadedTF{memoir} { \renewenvironment{abstract}{% \setup@bstract diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-acro.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-acro.sty index 0763785c648..c6776726207 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-acro.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-acro.sty @@ -35,10 +35,10 @@ \LWR@formatted{acro_dot_fill:} \ExplSyntaxOff \ExplSyntaxOn -\@ifpackagelater{acro}{2020/04/29}% +\IfPackageAtLeastTF{acro}{2020/04/29}% {}% v3 or later {% before v3 -\@ifpackagelater{acro}{2019/09/23}% +\IfPackageAtLeastTF{acro}{2019/09/23}% {% v2.10 or later \cs_gset_protected:Npn \__acro_typeset:nn #1#2 { diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-acronym.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-acronym.sty index e4d8a30fbf7..8c41238b2c3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-acronym.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-acronym.sty @@ -24,11 +24,11 @@ \renewcommand*\AC@acs[1]{% \expandafter\AC@get\csname fn@#1\endcsname\@firstoftwo{#1}} -\renewcommand{\@starttoc}[1]{ -\LWR@htmlelementclass{nav}{#1} -\LetLtxMacro\@verridelabel\@gobble -\LWR@orig@starttoc{#1} -\LWR@htmlelementclassend{nav}{#1} +\renewcommand{\@starttoc}[1]{% + \LWR@htmlelementclass{nav}{#1} + \LetLtxMacro\@verridelabel\@gobble + \LWR@orig@starttoc{#1} + \LWR@htmlelementclassend{nav}{#1} } \renewcommand*\AC@und@newl@bel[3]{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty index 5b6cda0091a..90eb953941f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty @@ -33,21 +33,21 @@ \renewcommand*{\LWR@floatstyle@algocf}{plain} }{} \renewcommand{\algocf@everypar}{% -\ifbool{LWR@algocf@dopars}{% - \ifbool{LWR@doingstartpars}{% - \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% - {}% - {% - \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline% - \algocf@everyparnl\algocf@everyparhanging% - }% + \ifbool{LWR@algocf@dopars}{% + \ifbool{LWR@doingstartpars}{% + \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% + {}% + {% + \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline% + \algocf@everyparnl\algocf@everyparhanging% + }% + }{}% }{}% -}{}% } \renewcommand{\algocf@makecaption}[2]{% -\LWR@HTML@caption@begin{algocf}% -\LWR@isolate{\algocf@captiontext{#1}{#2}}% -\LWR@HTML@caption@end% + \LWR@HTML@caption@begin{algocf}% + \LWR@isolate{\algocf@captiontext{#1}{#2}}% + \LWR@HTML@caption@end% } \renewcommand{\algocf@makecaption@plain}[2]{% \LWR@HTML@caption@begin{algocf}% @@ -67,7 +67,7 @@ \LWR@HTML@caption@end% } \long\def\algocf@latexcaption#1[#2]#3{% original definition of caption -\boolfalse{LWR@algocf@dopars}% lwarp +\boolfalse{LWR@algocf@dopars}% lwarp \par% \addcontentsline{\csname ext@#1\endcsname}{#1}% {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \LWR@isolate{#2}}}% @@ -79,7 +79,7 @@ \normalsize% \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par% \endgroup% -\booltrue{LWR@algocf@dopars}% lwarp +\booltrue{LWR@algocf@dopars}% lwarp } \renewcommand{\algocf@printnl}[1]{% \InlineClass{alg2elinenumber}{\NlSty{#1}}~% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty index e9acd1f1b6b..892ed4fc9f3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. -\@ifpackageloaded{mdframed}{ +\IfPackageLoadedTF{mdframed}{ \PackageError{lwarp} {% Package mdframed must be loaded after package amsthm.\MessageBreak @@ -91,7 +91,7 @@ \GetTitleString{#3}% lwarp \let\@currentlabelname\GetTitleStringResult% lwarp \item[% - \LWR@newautopagelabel{page}% + \LWR@newautopagelabel{page}\LWR@orignewline% \@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% lwarp \@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% lwarp \@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% lwarp diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty index c13e5e3f1b6..b820e491172 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\@ifpackageloaded{array}{}{% +\IfPackageLoadedTF{array}{}{% \let\firsthline\relax \let\lasthline\relax } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-authblk.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-authblk.sty index 67fc8067a9b..8d48303d176 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-authblk.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-authblk.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\@ifpackageloaded{titling}{ +\IfPackageLoadedTF{titling}{ \PackageError{lwarp-authblk} {Package authblk must be loaded before titling} {% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty index a9e0e08eb9d..fe96c69ad91 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-backnaur.sty @@ -22,23 +22,23 @@ \CustomizeMathJax{\newcommand{\bnfpn}[1]{\langle \text{\textrm{#1}} \rangle}} \CustomizeMathJax{\newcommand{\bnfor}{\; \mid \;}} \CustomizeMathJax{\newcommand{\bnfsp}{\;}} -\@ifpackagewith{backnaur}{perp}{ +\IfPackageLoadedWithOptionsTF{backnaur}{perp}{ \CustomizeMathJax{\newcommand{\bnfes}{\perp}} }{ - \@ifpackagewith{backnaur}{epsilon}{ + \IfPackageLoadedWithOptionsTF{backnaur}{epsilon}{ \CustomizeMathJax{\newcommand{\bnfes}{\epsilon}} }{ \CustomizeMathJax{\newcommand{\bnfes}{\lambda}} } } -\@ifpackagewith{backnaur}{tsrm}{ +\IfPackageLoadedWithOptionsTF{backnaur}{tsrm}{ \CustomizeMathJax{\newcommand{\bnfts}[1]{\text{#1}}} }{ \CustomizeMathJax{\newcommand{\bnfts}[1]{\text{\texttt{#1}}}} } \CustomizeMathJax{\newcommand{\bnftd}[1]{\text{\textit{#1}}}} \CustomizeMathJax{\newcommand{\bnfsk}{\dots}} -\@ifpackagewith{backnaur}{altpo}{ +\IfPackageLoadedWithOptionsTF{backnaur}{altpo}{ \CustomizeMathJax{\newcommand{\bnfpo}{::=}} }{ \CustomizeMathJax{\newcommand{\bnfpo}{\models}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-biblatex.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-biblatex.sty index 1559610660a..48e191cf6a1 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-biblatex.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-biblatex.sty @@ -66,7 +66,7 @@ \xpatchcmd{\blx@addbackref@i} {\c@page} - {\c@LWR@previousautopagelabel}% refto the most recent object + {\c@LWR@previousautopagelabel}% ref to the most recent object {} {\LWR@patcherror{biblatex}{blx@addbackref@i B}} \DeclareListFormat{pageref}{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty index ded005a30b8..7a14726b6e6 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\@ifpackageloaded{booktabs}{}{ +\IfPackageLoadedTF{booktabs}{}{ \LetLtxMacro\toprule\relax \LetLtxMacro\midrule\relax \LetLtxMacro\cmidrule\cline diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty index 27617226181..5fdd7cb174c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty @@ -46,7 +46,7 @@ \LetLtxMacro\bcancel\cancel \LetLtxMacro\xcancel\cancel \begin{warpMathJax} -\PackageWarningNoLine{lwarp, cancel}{The MathJax v3 extension will be used} +\PackageNoteNoLine{lwarp, cancel}{The MathJax v3 extension will be used} \CustomizeMathJax{\require{cancel}} \end{warpMathJax} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty index 9b6059c84b6..5ed75c1419d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty @@ -76,7 +76,7 @@ } \caption@AtBeginDocument{ -\@ifpackageloaded{lwarp-scrextend}{ +\IfPackageLoadedTF{lwarp-scrextend}{ \LetLtxMacro\captionbelow\caption \LetLtxMacro\captionabove\caption \LetLtxMacro\captionofbelow\captionof diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty index 57bbd7dc5e6..1bd2fd32d2c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{caption3}[2020/10/21] -\@ifpackagelater{caption3}{2020/08/23}{ +\IfPackageAtLeastTF{caption3}{2020/08/23}{ \renewcommand\caption@@@make[2]{% \LWR@traceinfo{caption@@@make}% \LWR@stoppars% lwarp diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty index c337b064ee0..b4985b5c6cf 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackagePass{cases}[2002/05/02] +\LWR@ProvidesPackagePass{cases}[2020/03/29] \BeforeBeginEnvironment{numcases}{ \begin{BlockClass}{displaymathnumbered} \LWR@newautoidanchor% @@ -37,6 +37,31 @@ \AfterEndEnvironment{subnumcases}{ \end{lateximage}\end{BlockClass} } + +\makeatletter +\begin{warpHTML} +\AtBeginDocument{ + \@ifpackageloaded{amsmath} + { + \xpatchcmd{\tagform@}{\leftprotrusion{(}}{(} + {} + {\LWR@patcherror{cases}{tagform@ A}}% + \xpatchcmd{\tagform@}{\rightprotrusion{)}}{)} + {} + {\LWR@patcherror{cases}{tagform@ B}}% + } + { + \xpatchcmd{\@eqnnum}{\leftprotrusion{(}}{(} + {} + {\LWR@patcherror{cases}{@eqnnum A}}% + \xpatchcmd{\@eqnnum}{\rightprotrusion{)}}{)} + {} + {\LWR@patcherror{cases}{@eqnnum A}}% + }% +} +\end{warpHTML} +\makeatother + \endinput %% %% End of file `lwarp-cases.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty index 03505e42403..39faeb474c3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty @@ -20,7 +20,7 @@ \catcode`\_=11 -\@ifpackagelater{chemfig}{2020/03/05} +\IfPackageAtLeastTF{chemfig}{2020/03/05} { \xpretocmd\charge{\begin{lateximage}[-chemfig-~\PackageDiagramAltText]} {}{\LWR@patcherror{chemfig}{charge}} @@ -30,7 +30,7 @@ {}{\LWR@patcherror{chemfig}{charge_c}} }{} -\@ifpackagelater{chemfig}{2019/04/18}% +\IfPackageAtLeastTF{chemfig}{2019/04/18}% {% 2019/04/18 or newer \xpretocmd{\CF_chemfiga} {\begin{lateximage}[-chemfig-~\PackageDiagramAltText]} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty index 47e3eafc9e8..a3a5b4cd00b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty @@ -29,9 +29,15 @@ \begingroup% \boolfalse{mathjax}% \LWR@subsingledollar*{% lwarp - \textbackslash{}ch\{\LWR@HTMLsanitize{#2}\}% alt text + \textbackslash{}% + ch% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#2}}% + \}% alt text }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% add'l hashing + \protect\LWR@HTMLsanitizedetokenized{% + \detokenize\expandafter{#1}% + }% add'l hashing }% {% \chemformula_ch:nn {#1} {#2}% original @@ -39,15 +45,19 @@ \endgroup% } } -\@ifpackagelater{chemformula}{2019/10/13}{ +\IfPackageAtLeastTF{chemformula}{2019/10/13}{ \cs_gset_protected:Npn \chemformula_chcpd:nn #1#2 { \begingroup% \boolfalse{mathjax}% \LWR@subsingledollar*{% lwarp - \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}% + \textbackslash{}% + chcpd% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#2}}% + \}% }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{% original \group_begin: \tl_if_blank:nF {#2} @@ -76,9 +86,13 @@ \begingroup% \boolfalse{mathjax}% \LWR@subsingledollar*{% lwarp - \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}% + \textbackslash{}% + chcpd% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#2}}% + \}% }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{% original \group_begin: \tl_if_blank:nF {#2} @@ -110,7 +124,10 @@ \RenewDocumentCommand \chname { R(){}R(){} } { \begin{lateximage}*[% - \textbackslash{}chname(\LWR@HTMLsanitize{#1})(\LWR@HTMLsanitize{#2}) + \textbackslash{}% + chname% + (\LWR@HTMLsanitizedetokenized{\detokenize{#1}})% + (\LWR@HTMLsanitizedetokenized{\detokenize{#2}})% ]*% \chemformula_chwritebelow:nn {#1} {#2} \end{lateximage} @@ -121,7 +138,7 @@ \boolfalse{mathjax}% \LWR@subsingledollar*{\textbackslash{}chlewis\{#2\}\{#3\}}% { - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{ \chemformula_lewis:nnn {#1} {#2} {#3} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty index 964176492db..e4ea9d2845d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty @@ -41,9 +41,14 @@ \begingroup \boolfalse{mathjax} \LWR@subsingledollar*{ - \textbackslash{}p\{\LWR@HTMLsanitize{#1}\} + \textbackslash{}% + p% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#1}}% + \} }{ - chemmacrosp\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% + chemmacrosp% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}% }{ \group_begin: \mbox @@ -463,7 +468,10 @@ \IfValueTF{#1} { \begin{lateximage}[% - \textbackslash{}orbital{[}\LWR@HTMLsanitize{#1}{]}\{#2\}% + \textbackslash{}% + orbital{[}% + \LWR@HTMLsanitizedetokenized{\detokenize{#1}}% + {]}\{#2\}% ]*[][margin-left: 1em ; margin-right: 1em] } { @@ -530,18 +538,26 @@ \IfBooleanTF {#1} { \LWR@subsingledollar*{% yes hash - \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt + \textbackslash{}% + ox*% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#3}}% + \}% alt }{% - star \protect\LWR@HTMLsanitize{\detokenize\expandafter{#2}}% + star \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#2}}% }{% \LWR@chemmacros@ox* {#2} {#3}% contents }% } { \LWR@subsingledollar*{% yes hash - \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt + \textbackslash{}% + ox*% + \{% + \LWR@HTMLsanitizedetokenized{\detokenize{#3}}% + \}% alt }{% - \protect\LWR@HTMLsanitize{\detokenize\expandafter{#2}}% + \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#2}}% }{% \LWR@chemmacros@ox {#2} {#3}% contents }% @@ -785,7 +801,8 @@ name = \chemmacros_translate:n {scheme-name} \boolfalse{mathjax} \chemmacros_set_keys:nn {thermodynamics} {#1} \LWR@subsingledollar*{% yes hashing - \textbackslash{}state\{\LWR@HTMLsanitize{#2}\}% alt + \textbackslash{}state% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% alt }{% chemmacros_state% add'l hashing #1% options diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cleveref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cleveref.sty index dad79523ff0..c32e2d0c748 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cleveref.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cleveref.sty @@ -119,7 +119,7 @@ \LWR@absorbstar{Cpagerefrange} \LWR@absorbstar{labelcref} \LWR@absorbstar{labelcpageref} -\@ifpackageloaded{varioref}{ +\IfPackageLoadedTF{varioref}{ \LWR@absorbstar{vref} \LWR@absorbstar{Vref} \LWR@absorbstar{vrefrange} @@ -127,14 +127,14 @@ \LWR@absorbstar{fullref} \LWR@absorbstar{Fullref} }{}% varioref -\@ifclassloaded{memoir}{ +\IfClassLoadedTF{memoir}{ \AtBeginDocument{ \def\sf@memsub@label(#1)#2{% \protected@edef\mem@currentlabelname{#1}% \sf@@memsub@label{#2}} } }{} -\@ifpackageloaded{subfig}{ +\IfPackageLoadedTF{subfig}{ \def\sf@sub@label(#1)#2{% \ifhyperrefloaded \protected@edef\@currentlabelname{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cmbright.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cmbright.sty index a90525a017a..bc680cdf250 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cmbright.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cmbright.sty @@ -22,7 +22,7 @@ \begin{warpMathJax} -\@ifpackagewith{cmbright}{slantedGreek} +\IfPackageLoadedWithOptionsTF{cmbright}{slantedGreek} { \LWR@mathjax@addgreek@u@it*{}{} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-color.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-color.sty index 1c6938a0cee..4d601fc2bdf 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-color.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-color.sty @@ -17,6 +17,7 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackageDrop{color}[2016/07/10] \RequirePackage{xcolor} +\let\color@endgroup\endgroup \endinput %% %% End of file `lwarp-color.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-newpxtxmath.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-newpxtxmath.sty index 245f4efea93..1d8a6b4d48b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-newpxtxmath.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-newpxtxmath.sty @@ -47,7 +47,9 @@ \CustomizeMathJax{\let\overgroupra\overrightarrow} \CustomizeMathJax{\let\undergroup\underparen} \CustomizeMathJax{\let\undergroupla\underleftarrow} -\CustomizeMathJax{\newcommand{\widering}[1]{\stackrel{\unicode{x2218}}{\overgroup{#1}}}} +\CustomizeMathJax{\newcommand{\widering}[1]{% + \stackrel{\unicode{x2218}}{\overgroup{#1}}% +}} \CustomizeMathJax{\let\widearc\overparen} \CustomizeMathJax{\let\wideOarc\overrightarrow} \CustomizeMathJax{\newcommand{\LWRvvstar}[2]{{\overrightarrow{#1}_{#2}}}} @@ -59,8 +61,12 @@ \CustomizeMathJax{\newcommand{\smallointsl}{\mathop{\unicode{x222E}}\limits}} \CustomizeMathJax{\newcommand{\smalloiintsl}{\mathop{\unicode{x222F}}\limits}} \CustomizeMathJax{\newcommand{\smalloiiintsl}{\mathop{\unicode{x2230}}\limits}} -\CustomizeMathJax{\newcommand{\smallvarointclockwisesl}{\mathop{\unicode{x2232}}\limits}} -\CustomizeMathJax{\newcommand{\smallointctrclockwisesl}{\mathop{\unicode{x2233}}\limits}} +\CustomizeMathJax{\newcommand{\smallvarointclockwisesl}{% + \mathop{\unicode{x2232}}\limits% +}} +\CustomizeMathJax{\newcommand{\smallointctrclockwisesl}{% + \mathop{\unicode{x2233}}\limits% +}} \CustomizeMathJax{\newcommand{\smallsumintsl}{\mathop{\unicode{x2A0B}}\limits}} \CustomizeMathJax{\newcommand{\smallfintsl}{\mathop{\unicode{x2A0F}}\limits}} \CustomizeMathJax{\newcommand{\smallsqintsl}{\mathop{\unicode{x2A16}}\limits}} @@ -71,8 +77,12 @@ \CustomizeMathJax{\newcommand{\smallointup}{\mathop{\unicode{x222E}}\limits}} \CustomizeMathJax{\newcommand{\smalloiintup}{\mathop{\unicode{x222F}}\limits}} \CustomizeMathJax{\newcommand{\smalloiiintup}{\mathop{\unicode{x2230}}\limits}} -\CustomizeMathJax{\newcommand{\smallvarointclockwiseup}{\mathop{\unicode{x2232}}\limits}} -\CustomizeMathJax{\newcommand{\smallointctrclockwiseup}{\mathop{\unicode{x2233}}\limits}} +\CustomizeMathJax{\newcommand{\smallvarointclockwiseup}{% + \mathop{\unicode{x2232}}\limits% +}} +\CustomizeMathJax{\newcommand{\smallointctrclockwiseup}{% + \mathop{\unicode{x2233}}\limits% +}} \CustomizeMathJax{\newcommand{\smallsumintup}{\mathop{\unicode{x2A0B}}\limits}} \CustomizeMathJax{\newcommand{\smallfintup}{\mathop{\unicode{x2A0F}}\limits}} \CustomizeMathJax{\newcommand{\smallsqintup}{\mathop{\unicode{x2A16}}\limits}} @@ -105,8 +115,12 @@ \CustomizeMathJax{\let\ointup\oint} \CustomizeMathJax{\newcommand{\oiintup}{\mathop{\unicode{x222F}}\limits}} \CustomizeMathJax{\newcommand{\oiiintup}{\mathop{\unicode{x2230}}\limits}} -\CustomizeMathJax{\newcommand{\varointclockwiseup}{\mathop{\unicode{x2232}}\limits}} -\CustomizeMathJax{\newcommand{\ointctrclockwiseup}{\mathop{\unicode{x2233}}\limits}} +\CustomizeMathJax{\newcommand{\varointclockwiseup}{% + \mathop{\unicode{x2232}}\limits% +}} +\CustomizeMathJax{\newcommand{\ointctrclockwiseup}{% + \mathop{\unicode{x2233}}\limits% +}} \CustomizeMathJax{\newcommand{\sumintup}{\mathop{\unicode{x2A0B}}\limits}} \CustomizeMathJax{\newcommand{\fintup}{\mathop{\unicode{x2A0F}}\limits}} \CustomizeMathJax{\newcommand{\sqintup}{\mathop{\unicode{x2A16}}\limits}} @@ -130,48 +144,90 @@ \CustomizeMathJax{\newcommand{\medbullet}{\mathbin{\unicode{x025CF}}}} \CustomizeMathJax{\newcommand{\varparallel}{\mathrel{\unicode{x02AFD}}}} \CustomizeMathJax{\newcommand{\varparallelinv}{\mathrel{\unicode{x244A}}}} -\CustomizeMathJax{\newcommand{\nvarparallel}{\mathrel{\LWRoverlaysymbols{-}{\unicode{x02AFD}}}}} -\CustomizeMathJax{\newcommand{\nvarparallelinv}{\mathrel{\LWRoverlaysymbols{-}{\unicode{x244A}}}}} +\CustomizeMathJax{\newcommand{\nvarparallel}{% + \mathrel{\LWRoverlaysymbols{-}{\unicode{x02AFD}}}% +}} +\CustomizeMathJax{\newcommand{\nvarparallelinv}{% + \mathrel{\LWRoverlaysymbols{-}{\unicode{x244A}}}% +}} \CustomizeMathJax{\newcommand{\coloneq}{\mathrel{\unicode{x02254}}}} \CustomizeMathJax{\newcommand{\eqcolon}{\mathrel{\unicode{x02255}}}} \CustomizeMathJax{\newcommand{\VDash}{\mathrel{\unicode{x22AB}}}} \CustomizeMathJax{\newcommand{\preceqq}{\mathrel{\unicode{x02AB3}}}} \CustomizeMathJax{\newcommand{\succeqq}{\mathrel{\unicode{x02AB4}}}} -\CustomizeMathJax{\newcommand{\nprecsim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227E}}}}} -\CustomizeMathJax{\newcommand{\nsuccsim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227F}}}}} +\CustomizeMathJax{\newcommand{\nprecsim}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227E}}}% +}} +\CustomizeMathJax{\newcommand{\nsuccsim}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227F}}}% +}} \CustomizeMathJax{\newcommand{\nlesssim}{\mathrel{\unicode{x02274}}}} \CustomizeMathJax{\newcommand{\ngtrsim}{\mathrel{\unicode{x02275}}}} \CustomizeMathJax{\newcommand{\nsubset}{\mathrel{\unicode{x02284}}}} \CustomizeMathJax{\newcommand{\nsupset}{\mathrel{\unicode{x02285}}}} \CustomizeMathJax{\newcommand{\notni}{\mathrel{\unicode{x220C}}}} \CustomizeMathJax{\let\notowns\notni} -\CustomizeMathJax{\newcommand{\nlessapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02A85}}}}} -\CustomizeMathJax{\newcommand{\ngtrapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02A86}}}}} -\CustomizeMathJax{\newcommand{\npreccurlyeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227C}}}}} -\CustomizeMathJax{\newcommand{\nsucccurlyeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227D}}}}} +\CustomizeMathJax{\newcommand{\nlessapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02A85}}}% +}} +\CustomizeMathJax{\newcommand{\ngtrapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02A86}}}% +}} +\CustomizeMathJax{\newcommand{\npreccurlyeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227C}}}% +}} +\CustomizeMathJax{\newcommand{\nsucccurlyeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227D}}}% +}} \CustomizeMathJax{\newcommand{\ngtrless}{\mathrel{\unicode{x02279}}}} \CustomizeMathJax{\newcommand{\nlessgtr}{\mathrel{\unicode{x2278}}}} -\CustomizeMathJax{\newcommand{\nbumpeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224F}}}}} -\CustomizeMathJax{\newcommand{\nBumpeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224E}}}}} -\CustomizeMathJax{\newcommand{\nbacksim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0223D}}}}} -\CustomizeMathJax{\newcommand{\nbacksimeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022CD}}}}} +\CustomizeMathJax{\newcommand{\nbumpeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224F}}}% +}} +\CustomizeMathJax{\newcommand{\nBumpeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224E}}}% +}} +\CustomizeMathJax{\newcommand{\nbacksim}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0223D}}}% +}} +\CustomizeMathJax{\newcommand{\nbacksimeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x022CD}}}% +}} \CustomizeMathJax{\newcommand{\nasymp}{\mathrel{\unicode{x226D}}}} \CustomizeMathJax{\newcommand{\nequiv}{\mathrel{\unicode{x2262}}}} \CustomizeMathJax{\newcommand{\napprox}{\mathrel{\unicode{x2249}}}} -\CustomizeMathJax{\newcommand{\nll}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0226A}}}}} -\CustomizeMathJax{\newcommand{\ngg}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0226B}}}}} +\CustomizeMathJax{\newcommand{\nll}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0226A}}}% +}} +\CustomizeMathJax{\newcommand{\ngg}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0226B}}}% +}} \CustomizeMathJax{\newcommand{\nthickapprox}{% \mathrel{\LWRoverlaysymbols{/}{{\mathbf{\unicode{x02248}}}}}% }} -\CustomizeMathJax{\newcommand{\napproxeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224A}}}}} -\CustomizeMathJax{\newcommand{\nprecapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB7}}}}} -\CustomizeMathJax{\newcommand{\nsuccapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB8}}}}} -\CustomizeMathJax{\newcommand{\npreceqq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB3}}}}} -\CustomizeMathJax{\newcommand{\nsucceqq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB4}}}}} +\CustomizeMathJax{\newcommand{\napproxeq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224A}}}% +}} +\CustomizeMathJax{\newcommand{\nprecapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB7}}}% +}} +\CustomizeMathJax{\newcommand{\nsuccapprox}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB8}}}% +}} +\CustomizeMathJax{\newcommand{\npreceqq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB3}}}% +}} +\CustomizeMathJax{\newcommand{\nsucceqq}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB4}}}% +}} \CustomizeMathJax{\newcommand{\nsimeq}{\mathrel{\unicode{x02244}}}} -\CustomizeMathJax{\newcommand{\nSubset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022D0}}}}} -\CustomizeMathJax{\newcommand{\nSupset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022D1}}}}} +\CustomizeMathJax{\newcommand{\nSubset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x022D0}}}% +}} +\CustomizeMathJax{\newcommand{\nSupset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x022D1}}}% +}} \CustomizeMathJax{\newcommand{\nsqsubseteq}{\mathrel{\unicode{x022E2}}}} \CustomizeMathJax{\newcommand{\nsqsupseteq}{\mathrel{\unicode{x022E3}}}} \CustomizeMathJax{\newcommand{\coloneqq}{\mathrel{\unicode{x02254}}}} @@ -179,11 +235,21 @@ \CustomizeMathJax{\newcommand{\Coloneqq}{\mathrel{\unicode{x02A74}}}} \CustomizeMathJax{\newcommand{\Coloneq}{\mathrel{\unicode{x2237}-}}} \CustomizeMathJax{\newcommand{\Eqcolon}{\mathrel{-\unicode{x2237}}}} -\CustomizeMathJax{\newcommand{\lvec}[1]{\mathord{\overset{\unicode{x02190}}{#1}}}} -\CustomizeMathJax{\newcommand{\lrvec}[1]{\mathord{\overset{\unicode{x2194}}{#1}}}} -\CustomizeMathJax{\newcommand{\harpoonacc}[1]{\mathord{\overset{\unicode{x021C0}}{#1}}}} -\CustomizeMathJax{\newcommand{\lharpoonacc}[1]{\mathord{\overset{\unicode{x021BC}}{#1}}}} -\CustomizeMathJax{\newcommand{\lrharpoonacc}[1]{\mathord{\overset{\unicode{x0294E}}{#1}}}} +\CustomizeMathJax{\newcommand{\lvec}[1]{% + \mathord{\overset{\unicode{x02190}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\lrvec}[1]{% + \mathord{\overset{\unicode{x2194}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\harpoonacc}[1]{% + \mathord{\overset{\unicode{x021C0}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\lharpoonacc}[1]{% + \mathord{\overset{\unicode{x021BC}}{#1}}% +}} +\CustomizeMathJax{\newcommand{\lrharpoonacc}[1]{% + \mathord{\overset{\unicode{x0294E}}{#1}}% +}} \CustomizeMathJax{\newcommand{\barbar}[1]{\mathord{\overset{=}{#1}}}} \CustomizeMathJax{\newcommand{\bartilde}[1]{\mathord{\overset{\simeq}{#1}}}} \CustomizeMathJax{\newcommand{\barhat}[1]{\mathord{\hat{\bar{#1}}}}} @@ -214,9 +280,15 @@ \CustomizeMathJax{\newcommand{\lrtimes}{\mathrel{\unicode{x2A1D}}}} \CustomizeMathJax{\newcommand{\Diamondblack}{\mathord{\unicode{x025C6}}}} -\CustomizeMathJax{\newcommand{\nplus}{\mathrel{\LWRoverlaysymbols{+}{\unicode{x02229}}}}} -\CustomizeMathJax{\newcommand{\nsqsubset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0228F}}}}} -\CustomizeMathJax{\newcommand{\nsqsupset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02290}}}}} +\CustomizeMathJax{\newcommand{\nplus}{% + \mathrel{\LWRoverlaysymbols{+}{\unicode{x02229}}}% +}} +\CustomizeMathJax{\newcommand{\nsqsubset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x0228F}}}% +}} +\CustomizeMathJax{\newcommand{\nsqsupset}{% + \mathrel{\LWRoverlaysymbols{/}{\unicode{x02290}}}% +}} \CustomizeMathJax{\newcommand{\dasharrow}{\mathrel{\unicode{x021E2}}}} \CustomizeMathJax{\newcommand{\leftsquigarrow}{\mathrel{\unicode{x021DC}}}} \CustomizeMathJax{\newcommand{\ntwoheadrightarrow}{\mathrel{\unicode{x02900}}}} @@ -240,8 +312,12 @@ \CustomizeMathJax{\newcommand{\leadstoext}{\mathrel{\unicode{xFF5E}}}} -\CustomizeMathJax{\newcommand{\sqcupplus}{\mathbin{\LWRoverlaysymbols{+}{\unicode{x02294}}}}} -\CustomizeMathJax{\newcommand{\sqcapplus}{\mathbin{\LWRoverlaysymbols{+}{\unicode{x02293}}}}} +\CustomizeMathJax{\newcommand{\sqcupplus}{% + \mathbin{\LWRoverlaysymbols{+}{\unicode{x02294}}}% +}} +\CustomizeMathJax{\newcommand{\sqcapplus}{% + \mathbin{\LWRoverlaysymbols{+}{\unicode{x02293}}}% +}} \CustomizeMathJax{\newcommand{\dlb}{\mathopen{\unicode{x027E6}}}} \CustomizeMathJax{\newcommand{\drb}{\mathopen{\unicode{x027E7}}}} @@ -256,7 +332,9 @@ \CustomizeMathJax{\newcommand{\forallAlt}{\mathord{\unicode{x02200}}}} \CustomizeMathJax{\newcommand{\emptysetAlt}{\mathord{\unicode{x02205}}}} -\CustomizeMathJax{\newcommand{\uppartial}{\mathord{\unicode{x02202}}}}% not upright +\CustomizeMathJax{\newcommand{\uppartial}{% + \mathord{\unicode{x02202}}% +}}% not upright \CustomizeMathJax{\let\varmathbb\mathbb} \CustomizeMathJax{\let\vmathbb\mathbb} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-nonunicode.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-nonunicode.sty index 299b3e86a53..801f1fdc5d5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-nonunicode.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-common-mathjax-nonunicode.sty @@ -36,31 +36,71 @@ \CustomizeMathJax{\newcommand{\Longmmappedfrom}{\mathrel{\unicode{x027FD}}}} \CustomizeMathJax{\let\Mmapsfrom\Mmappedfrom}% from kpfonts-otf \CustomizeMathJax{\let\Longmmapsfrom\Longmmappedfrom}% from kpfonts-otf -\CustomizeMathJax{\newcommand{\boxright}{\mathrel{\unicode{x025A1}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\boxleft}{\mathrel{\unicode{x02190}\!\unicode{x025A1}}}} -\CustomizeMathJax{\newcommand{\boxdotright}{\mathrel{\unicode{x022A1}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\boxdotleft}{\mathrel{\unicode{x02190}\!\unicode{x022A1}}}} - -\CustomizeMathJax{\newcommand{\Diamondright}{\mathrel{\unicode{x025C7}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\Diamondleft}{\mathrel{\unicode{x02190}\!\unicode{x025C7}}}} -\CustomizeMathJax{\newcommand{\Diamonddotright}{\mathrel{\unicode{x027D0}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\Diamonddotleft}{\mathrel{\unicode{x02190}\!\unicode{x027D0}}}} - -\CustomizeMathJax{\newcommand{\boxRight}{\mathrel{\unicode{x025A1}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\boxLeft}{\mathrel{\unicode{x021D0}\!\unicode{x025A1}}}} -\CustomizeMathJax{\newcommand{\boxdotRight}{\mathrel{\unicode{x022A1}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\boxdotLeft}{\mathrel{\unicode{x021D0}\!\unicode{x022A1}}}} - -\CustomizeMathJax{\newcommand{\DiamondRight}{\mathrel{\unicode{x025C7}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\DiamondLeft}{\mathrel{\unicode{x021D0}\!\unicode{x025C7}}}} -\CustomizeMathJax{\newcommand{\DiamonddotRight}{\mathrel{\unicode{x027D0}\!\unicode{x021D2}}}} -\CustomizeMathJax{\newcommand{\DiamonddotLeft}{\mathrel{\unicode{x021D0}\!\unicode{x027D0}}}} +\CustomizeMathJax{\newcommand{\boxright}{% + \mathrel{\unicode{x025A1}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\boxleft}{% + \mathrel{\unicode{x02190}\!\unicode{x025A1}}% +}} +\CustomizeMathJax{\newcommand{\boxdotright}{% + \mathrel{\unicode{x022A1}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\boxdotleft}{% + \mathrel{\unicode{x02190}\!\unicode{x022A1}}% +}} + +\CustomizeMathJax{\newcommand{\Diamondright}{% + \mathrel{\unicode{x025C7}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\Diamondleft}{% + \mathrel{\unicode{x02190}\!\unicode{x025C7}}% +}} +\CustomizeMathJax{\newcommand{\Diamonddotright}{% + \mathrel{\unicode{x027D0}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\Diamonddotleft}{% + \mathrel{\unicode{x02190}\!\unicode{x027D0}}% +}} + +\CustomizeMathJax{\newcommand{\boxRight}{% + \mathrel{\unicode{x025A1}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\boxLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x025A1}}% +}} +\CustomizeMathJax{\newcommand{\boxdotRight}{% + \mathrel{\unicode{x022A1}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\boxdotLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x022A1}}% +}} + +\CustomizeMathJax{\newcommand{\DiamondRight}{% + \mathrel{\unicode{x025C7}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\DiamondLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x025C7}}% +}} +\CustomizeMathJax{\newcommand{\DiamonddotRight}{% + \mathrel{\unicode{x027D0}\!\unicode{x021D2}}% +}} +\CustomizeMathJax{\newcommand{\DiamonddotLeft}{% + \mathrel{\unicode{x021D0}\!\unicode{x027D0}}% +}} \CustomizeMathJax{\newcommand{\Diamonddot}{\mathrel{\unicode{x027D0}}}} -\CustomizeMathJax{\newcommand{\circleright}{\mathrel{\unicode{x025CB}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\circleleft}{\mathrel{\unicode{x02190}\!\unicode{x025CB}}}} -\CustomizeMathJax{\newcommand{\circledotright}{\mathrel{\unicode{x02299}\!\unicode{x02192}}}} -\CustomizeMathJax{\newcommand{\circledotleft}{\mathrel{\unicode{x02190}\!\unicode{x02299}}}} +\CustomizeMathJax{\newcommand{\circleright}{% + \mathrel{\unicode{x025CB}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\circleleft}{% + \mathrel{\unicode{x02190}\!\unicode{x025CB}}% +}} +\CustomizeMathJax{\newcommand{\circledotright}{% + \mathrel{\unicode{x02299}\!\unicode{x02192}}% +}} +\CustomizeMathJax{\newcommand{\circledotleft}{% + \mathrel{\unicode{x02190}\!\unicode{x02299}}% +}} \CustomizeMathJax{\let\circleddotright\circledotright} \CustomizeMathJax{\let\circleddotleft\circledotleft} @@ -68,7 +108,9 @@ \CustomizeMathJax{\newcommand{\multimapboth}{\mathrel{\unicode{x029DF}}}} \CustomizeMathJax{\newcommand{\multimapdot}{{\mathrel{-\!\bullet}}}} \CustomizeMathJax{\newcommand{\multimapdotinv}{\mathrel{\bullet\!-}}} -\CustomizeMathJax{\newcommand{\multimapdotboth}{\mathrel{{\bullet\!\!-\!\!\bullet}}}} +\CustomizeMathJax{\newcommand{\multimapdotboth}{% + \mathrel{{\bullet\!\!-\!\!\bullet}}% +}} \CustomizeMathJax{\newcommand{\multimapdotbothA}{\mathrel{\unicode{x022B6}}}} \CustomizeMathJax{\newcommand{\multimapdotbothB}{\mathrel{\unicode{x22B7}}}} @@ -113,11 +155,17 @@ \CustomizeMathJax{\newcommand{\colonapprox}{\mathrel{:\approx}}} \CustomizeMathJax{\newcommand{\colonsim}{\mathrel{:\sim}}} -\CustomizeMathJax{\newcommand{\Colonapprox}{\mathrel{\unicode{x2237}\!\approx}}} +\CustomizeMathJax{\newcommand{\Colonapprox}{% + \mathrel{\unicode{x2237}\!\approx}% +}} \CustomizeMathJax{\newcommand{\Colonsim}{\mathrel{\unicode{x2237}\!\sim}}} -\CustomizeMathJax{\newcommand{\strictif}{\mathrel{\unicode{x0297D}}}}% right fish tail -\CustomizeMathJax{\newcommand{\strictfi}{\mathrel{\unicode{x0297C}}}}% left fish tail +\CustomizeMathJax{\newcommand{\strictif}{% + \mathrel{\unicode{x0297D}}% +}}% right fish tail +\CustomizeMathJax{\newcommand{\strictfi}{% + \mathrel{\unicode{x0297C}}% +}}% left fish tail \CustomizeMathJax{\newcommand{\strictiff}{% \mathrel{\unicode{x0297C}\!\!\unicode{x0297D}}% }}% left/right fish tails @@ -130,8 +178,12 @@ }} \CustomizeMathJax{\newcommand{\circledbar}{\mathbin{\unicode{x029B6}}}} -\CustomizeMathJax{\newcommand{\openJoin}{\mathrel{\unicode{x2AA4}}}}% overlapping >< -\CustomizeMathJax{\newcommand{\opentimes}{\mathrel{\unicode{x2AA4}}}}% overlapping >< +\CustomizeMathJax{\newcommand{\openJoin}{% + \mathrel{\unicode{x2AA4}}% +}}% overlapping >< +\CustomizeMathJax{\newcommand{\opentimes}{% + \mathrel{\unicode{x2AA4}}% +}}% overlapping >< \CustomizeMathJax{\newcommand{\VvDash}{\mathrel{\unicode{x22AA}}}} @@ -141,7 +193,9 @@ \CustomizeMathJax{\newcommand{\lambdaslash}{\mathord{\unicode{x019B}}}} -\CustomizeMathJax{\newcommand{\Wr}{\mathbin{\unicode{x02240}\!\unicode{x02240}}}} +\CustomizeMathJax{\newcommand{\Wr}{% + \mathbin{\unicode{x02240}\!\unicode{x02240}}% +}} \CustomizeMathJax{\newcommand{\dashleftrightarrow}{% \mathrel{\unicode{x021E0}\!\unicode{x021E2}}% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cuted.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cuted.sty index eef7b71ca10..f33aa3fb5c4 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cuted.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cuted.sty @@ -15,9 +15,11 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackageDrop{cuted}[2012/10/04] +\LWR@ProvidesPackageDrop{cuted}[2021/10/04] \newenvironment{strip}{}{} \newskip\stripsep +\newtoks\preCutedStrip \preCutedStrip{} +\newtoks\postCutedStrip \postCutedStrip{} \def\oldcolsbreak#1{} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-endnotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-endnotes.sty index 5124b8bf8a6..767b4bc48a1 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-endnotes.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-endnotes.sty @@ -25,6 +25,10 @@ \LWR@formatted{@makeenmark} \def\makeenmark{\@makeenmark} +\apptocmd{\LWR@nullifyfootnotes}{% + \renewcommand{\endnote}[2][]{}% + \renewcommand{\endnotemark}[1]{}% +}{}{} \begin{warpMathJax} \def\endnotename{endnote} \appto\LWR@syncnotenumbers{\LWR@synconenotenumber{LWRendnote}{\theendnote}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty index 203d04dc6a0..6583d40db0f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty @@ -77,9 +77,9 @@ \csgpreto{Beqnarray*}{\boolfalse{LWR@numbereqnarray}} \renewcommand{\GenericCaption}[1]{% -\LWR@figcaption% -\LWR@isolate{#1}% -\endLWR@figcaption% + \LWR@figcaption% + \LWR@isolate{#1}% + \endLWR@figcaption% } \RenewDocumentEnvironment{Btrivlist}{m o} {% @@ -93,7 +93,7 @@ \LWR@startpars% } \AtBeginEnvironment{LWR@nestspan}{% -\RenewDocumentEnvironment{Btrivlist}{m o}{}{}% + \RenewDocumentEnvironment{Btrivlist}{m o}{}{}% } \let\LWRFB@origitemizeitem\LWR@itemizeitem \let\LWRFB@origdescitem\LWR@descitem @@ -114,14 +114,40 @@ }% } \RenewDocumentCommand{\LWR@nestspanitem}{d()}{% -\if@newlist\else{\LWR@htmltagc{br /}}\fi% -\LWR@origitem% -} -\renewenvironment{Bitemize}[1][]{\begin{itemize}}{\end{itemize}} -\renewenvironment{Benumerate}[1][]{\begin{enumerate}}{\end{enumerate}} -\renewenvironment{Bdescription}[1][]{\begin{description}}{\end{description}} + \if@newlist\else{ + \LWR@htmltagc{br /}% + \LWR@orignewline% + }\fi% + \LWR@origitem% +} +\renewenvironment{Bitemize}[1][] + {% + \LWR@spanwarnformat{Bitemize}% + \booltrue{LWR@starting@fancybox}% + \begin{itemize}% + \boolfalse{LWR@starting@fancybox}% + } + {\end{itemize}} + +\renewenvironment{Benumerate}[1][] + {% + \LWR@spanwarnformat{Benumerate}% + \booltrue{LWR@starting@fancybox}% + \begin{enumerate}% + \boolfalse{LWR@starting@fancybox}% + } + {\end{enumerate}} + +\renewenvironment{Bdescription}[1][] + {% + \LWR@spanwarnformat{Bdescription}% + \booltrue{LWR@starting@fancybox}% + \begin{description}% + \boolfalse{LWR@starting@fancybox}% + } + {\end{description}} \RenewDocumentCommand{\boxput}{s d() m m}{% -\IfBooleanTF{#1}{#3\quad#4}{#4\quad#3}% + \IfBooleanTF{#1}{#3\quad#4}{#4\quad#3}% } \RenewDocumentCommand{\fancyput}{s d() m}{} \RenewDocumentCommand{\thisfancyput}{s d() m}{} @@ -135,24 +161,24 @@ \def\endLandscape{} \let\LWRFB@UseVerbatim\UseVerbatim \renewcommand*{\UseVerbatim}[1]{% -\LWR@atbeginverbatim{Verbatim}% -\LWRFB@UseVerbatim{#1}% -\LWR@afterendverbatim% + \LWR@atbeginverbatim{Verbatim}% + \LWRFB@UseVerbatim{#1}% + \LWR@afterendverbatim% } \let\LWRFB@LUseVerbatim\LUseVerbatim \renewcommand*{\LUseVerbatim}[1]{% -\LWR@atbeginverbatim{LVerbatim}% -\noindent% -\LWRFB@LUseVerbatim{#1}% -\LWR@afterendverbatim% + \LWR@atbeginverbatim{LVerbatim}% + \noindent% + \LWRFB@LUseVerbatim{#1}% + \LWR@afterendverbatim% } \def\@BUseVerbatim[#1]#2{% -\LWR@atbeginverbatim{BVerbatim}% -\LWRFB@UseVerbatim{#2}% -\LWR@afterendverbatim% + \LWR@atbeginverbatim{BVerbatim}% + \LWRFB@UseVerbatim{#2}% + \LWR@afterendverbatim% } \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty index c5ee4554ab9..d25998c13c4 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty @@ -25,7 +25,7 @@ \newbool{LWR@subcaptionloaded} \AtBeginDocument{ -\@ifpackageloaded{subcaption} +\IfPackageLoadedTF{subcaption} {\booltrue{LWR@subcaptionloaded}} {\boolfalse{LWR@subcaptionloaded}} } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-flushend.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-flushend.sty index 7ac45f39c73..29adaec65c2 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-flushend.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-flushend.sty @@ -15,13 +15,13 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackageDrop{flushend}[2017/03/27] +\LWR@ProvidesPackageDrop{flushend}[2021/10/04] \newcommand*{\flushend}{} \newcommand*{\raggedend}{} \newcommand*{\flushcolsend}{} \newcommand*{\raggedcolsend}{} -\newcommand*{\atColsBreak}[1]{} -\newcommand*{\atColsEnd}[1]{} +\newtoks\atColsBreak \atColsBreak={} +\newtoks\atColsEnd \atColsEnd={} \newcommand*{\showcolsendrule}{} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty index 676e0700ace..44895081ad4 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty @@ -81,7 +81,7 @@ \begingroup% \let\@makefntext\@empty% \let\@finalstrut\@gobble% - \LetLtxMacro\rule\@gobbletwo% *8* also the optional argument? + \LetLtxMacro\rule\@gobbletwo% \booltrue{LWR@spewingnotes}% lwarp \@footnotetext{\unvbox\z@}% \endgroup% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fourier.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fourier.sty index 6d0ff9446a5..7b61fb32e2e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fourier.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fourier.sty @@ -24,13 +24,13 @@ \begin{warpMathJax} -\@ifpackagewith{fourier}{sloped} +\IfPackageLoadedWithOptionsTF{fourier}{sloped} { \LWR@mathjax@addgreek@l@up{other}{} \LWR@mathjax@addgreek@u@it*{other}{} }% sloped {% not sloped - \@ifpackagewith{fourier}{upright} + \IfPackageLoadedWithOptionsTF{fourier}{upright} {% upright option \LWR@mathjax@addgreek@l@up{}{} \LWR@mathjax@addgreek@u@up*{}{} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty index ef338125feb..1b44e7875b1 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty @@ -17,54 +17,60 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{framed}[2011/10/22] -\AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec +\AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec -\renewenvironment{framed}{% -\LWR@forcenewpage -\BlockClass{framed}% +\renewenvironment{framed} +{% + \LWR@forcenewpage + \BlockClass{framed}% } {\endBlockClass} -\renewenvironment{oframed}{% -\LWR@forcenewpage -\BlockClass{framed}% +\renewenvironment{oframed} +{% + \LWR@forcenewpage + \BlockClass{framed}% } {\endBlockClass} -\renewenvironment{shaded}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% +\renewenvironment{shaded} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% } {\endBlockClass} -\renewenvironment{shaded*}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% +\renewenvironment{shaded*} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}% } {\endBlockClass} \renewenvironment{leftbar}{% -\LWR@forcenewpage + \LWR@forcenewpage \BlockClass{framedleftbar} - \def\FrameCommand{}% - \MakeFramed {} + \def\FrameCommand{}% + \MakeFramed {} }% - {\endMakeFramed\endBlockClass} +{\endMakeFramed\endBlockClass} -\renewenvironment{snugshade}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% +\renewenvironment{snugshade} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% } {\endBlockClass} -\renewenvironment{snugshade*}{% -\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% +\renewenvironment{snugshade*} +{% + \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor% + \LWR@forcenewpage + \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}% } {\endBlockClass} @@ -72,35 +78,35 @@ \let\endoframed\endframed \RenewEnviron{titled-frame}[1]{% -\CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY} + \CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY} } \renewcommand{\CustomFBox}[7]{% -\convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% -\LWR@forcenewpage -\begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}% -\ifthenelse{\isempty{#1}}{}{% not empty - \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% - \textcolor{TFTitleColor}{\textbf{#1}}% - \end{BlockClass} -}% not empty - -#7 - -\ifthenelse{\isempty{#2}}{}{% not empty \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% - \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% - \textcolor{TFTitleColor}{\textbf{#2}}% - \end{BlockClass} -}% not empty -\end{BlockClass} + \LWR@forcenewpage + \begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}% + \ifthenelse{\isempty{#1}}{}{% not empty + \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% + \textcolor{TFTitleColor}{\textbf{#1}}% + \end{BlockClass}% + }% not empty + + #7 + + \ifthenelse{\isempty{#2}}{}{% not empty + \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor% + \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}% + \textcolor{TFTitleColor}{\textbf{#2}}% + \end{BlockClass}% + }% not empty + \end{BlockClass}% } -\renewcommand\TitleBarFrame[3][]{ -\CustomFBox - {#2}{}% - \fboxrule\fboxrule\fboxrule\fboxrule - {#3}% +\renewcommand\TitleBarFrame[3][]{% + \CustomFBox% + {#2}{}% + \fboxrule\fboxrule\fboxrule\fboxrule% + {#3}% } \renewcommand{\TF@Title}[1]{#1} @@ -109,12 +115,12 @@ \let\endMakeFramed\relax \NewEnviron{MakeFramed}[1]{% -\FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}% + \FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}% } \renewcommand*{\fb@put@frame}[2]{% -\relax% -\@tempboxa% + \relax% + \@tempboxa% } \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty index f80b6cb9502..a5be245f732 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty @@ -108,7 +108,7 @@ \define@key{igraph}{alt}{\renewcommand*{\LWR@igalt}{#1}} \define@key{igraph}{scale}{% \ifthenelse{\equal{#1}{1}}{}{% must expand #1 - \PackageWarning{lwarp}{% + \PackageNote{lwarp}{% It is recommended to use ``[width=xx\protect\linewidth]''\MessageBreak instead of ``[scale=yy]'',% }% @@ -161,11 +161,10 @@ \AtBeginDocument{ \define@key{Gin}{class}{} -\define@key{Gin}{alt}{} } \AtBeginDocument{ -\@ifpackageloaded{epstopdf} +\IfPackageLoadedTF{epstopdf} { \newcommand*{\LWR@replaceEPSSVG}{} }{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty index 7b798d8eb70..9163eb17db9 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty @@ -16,7 +16,7 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackageDrop{hanging}[2009/09/02] -\@ifclassloaded{memoir}{ +\IfClassLoadedTF{memoir}{ \let\hangpara\relax \let\hangparas\relax \let\endhangparas\relax diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty index e9877b4b347..a1e05c89510 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty @@ -19,7 +19,7 @@ \LWR@ProvidesPackagePass{keyfloat}[2019/09/23] -\@ifpackagelater{keyfloat}{2019/09/23}{\relax}{ +\IfPackageAtLeastTF{keyfloat}{2019/09/23}{\relax}{ \PackageError{lwarp-keyfloat} {% The keyfloat package is out of date.\MessageBreak @@ -31,7 +31,9 @@ } \AtBeginDocument{ + \providecommand*{\KFLT@LWR@hook@boxouter}{} + \renewcommand*{\KFLT@LWR@hook@boxouter}{% \ifbool{KFLT@keywrap}{% }{% @@ -44,7 +46,6 @@ \normalcolor% } \LetLtxMacro\KFLT@LWR@hook@keysubfloats\KFLT@LWR@hook@boxouter - \let\KFLT@LWR@hook@keyfloatsminipage\relax \let\endKFLT@LWR@hook@keyfloatsminipage\relax \newenvironment*{KFLT@LWR@hook@keyfloatsminipage}[1]{}{} @@ -177,7 +178,7 @@ }% text to add } -\@ifpackageloaded{tocdata} +\IfPackageLoadedTF{tocdata} {} {% tocdata not loaded diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-kpfonts-otf.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-kpfonts-otf.sty index 2f62205bd10..0702a7ef430 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-kpfonts-otf.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-kpfonts-otf.sty @@ -54,17 +54,49 @@ \CustomizeMathJax{\let\variiiint\iiiint} \CustomizeMathJax{\let\varidotsint\idotsint} -\CustomizeMathJax{\newcommand{\varointctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222E}}}} -\CustomizeMathJax{\newcommand{\oiintclockwise}{\mathop{\unicode{x0222F}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\oiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222F}}}} -\CustomizeMathJax{\newcommand{\varoiintclockwise}{\mathop{\unicode{x0222F}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\varoiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222F}}}} -\CustomizeMathJax{\newcommand{\oiiintclockwise}{\mathop{\unicode{x02230}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\oiiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x02230}}}} -\CustomizeMathJax{\newcommand{\varoiiintclockwise}{\mathop{\unicode{x02230}\!\!\unicode{x2938}}}} -\CustomizeMathJax{\newcommand{\varoiiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x02230}}}} -\CustomizeMathJax{\newcommand{\sqiint}{\mathop{\unicode{x2A16}\!\!\unicode{x2A16}}}} -\CustomizeMathJax{\newcommand{\sqiiint}{\mathop{\unicode{x2A16}\!\!\unicode{x2A16}\!\!\unicode{x2A16}}}} +\CustomizeMathJax{\newcommand{\varointctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x0222E}}% +}} + +\CustomizeMathJax{\newcommand{\oiintclockwise}{% + \mathop{\unicode{x0222F}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\oiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x0222F}}% +}} + +\CustomizeMathJax{\newcommand{\varoiintclockwise}{% + \mathop{\unicode{x0222F}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\varoiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x0222F}}% +}} + +\CustomizeMathJax{\newcommand{\oiiintclockwise}{% + \mathop{\unicode{x02230}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\oiiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x02230}}% +}} + +\CustomizeMathJax{\newcommand{\varoiiintclockwise}{% + \mathop{\unicode{x02230}\!\!\unicode{x2938}}% +}} + +\CustomizeMathJax{\newcommand{\varoiiintctrclockwise}{% + \mathop{\unicode{x2939}\!\!\unicode{x02230}}% +}} + +\CustomizeMathJax{\newcommand{\sqiint}{% + \mathop{\unicode{x2A16}\!\!\unicode{x2A16}}% +}} + +\CustomizeMathJax{\newcommand{\sqiiint}{% + \mathop{\unicode{x2A16}\!\!\unicode{x2A16}\!\!\unicode{x2A16}}% +}} \CustomizeMathJax{\let\widearc\overparen} \CustomizeMathJax{\let\widearcarrow\overrightarrow} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-lipsum.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-lipsum.sty index 3c449f854df..6ad72bee986 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-lipsum.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-lipsum.sty @@ -16,7 +16,10 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{lipsum}[2021-03-03] -\SetLipsumParListItemEnd{\LWR@closeparagraph} +\SetLipsumParListItemEnd{% + \LWR@closeparagraph% + \leavevmode\LWR@orignewline% +} \endinput %% %% End of file `lwarp-lipsum.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathalpha.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathalpha.sty index 59e534e4d84..c37d6bb3ea6 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathalpha.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathalpha.sty @@ -15,13 +15,21 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackagePass{mathalpha}[2019/10/05] +\LWR@ProvidesPackagePass{mathalpha}[2021/11/18] \begin{warpMathJax} +\CustomizeMathJax{\newcommand{\mathbfbb}[1]{\boldsymbol{\mathbb{#1}}}}% not bold +\CustomizeMathJax{\newcommand{\mathbfcal}[1]{\boldsymbol{\mathcal{#1}}}} +\CustomizeMathJax{\newcommand{\mathbffrak}[1]{\boldsymbol{\mathfrak{#1}}}} +\CustomizeMathJax{\newcommand{\mathbfscr}[1]{\boldsymbol{\mathscr{#1}}}}% not bold + +\IfPackageLoadedWithOptionsTF{mathalpha}{oldbold} +{ \CustomizeMathJax{\newcommand{\mathbbb}[1]{\boldsymbol{\mathbb{#1}}}}% not bold \CustomizeMathJax{\newcommand{\mathbcal}[1]{\boldsymbol{\mathcal{#1}}}} \CustomizeMathJax{\newcommand{\mathbfrak}[1]{\boldsymbol{\mathfrak{#1}}}} \CustomizeMathJax{\newcommand{\mathbscr}[1]{\boldsymbol{\mathscr{#1}}}}% not bold +}{} \end{warpMathJax} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathptmx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathptmx.sty index 403e04ba503..cbccd17b3c3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathptmx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathptmx.sty @@ -21,7 +21,7 @@ \begin{warpMathJax} \LWR@infoprocessingmathjax{mathptmx} -\@ifpackagewith{mathptmx}{slantedGreek} +\IfPackageLoadedWithOptionsTF{mathptmx}{slantedGreek} {\LWR@mathjax@addgreek@u@it*{}{}} {} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty index 58b9be68356..9d7059c5960 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty @@ -21,71 +21,85 @@ \LetLtxMacro\LWR@mhchem@origce\ce \newcommand{\LWR@mhchem@HTML@ce}[1]{% -\LWR@findcurrenttextcolor% sets \LWR@tempcolor -\ifbool{LWR@xfakebold}% - {\def\LWR@tempone{Y}}% - {\def\LWR@tempone{N}}% -\begin{lateximage}*[\textbackslash{}ce\{\LWR@HTMLsanitize{#1}\}]*% - [% - FM\LWR@f@family% - SR\LWR@f@series% - SH\LWR@f@shape% - SHC\LWR@f@shapecaps% - CL\LWR@tempcolor% - FB\LWR@tempone% xfakebold - ]% -\LWR@setcurrentfont% -\LWR@mhchem@origce{#1}% -\end{lateximage}% -\endgroup% -\addtocounter{LWR@mhchem@cedepth}{-1}% + \LWR@findcurrenttextcolor% sets \LWR@tempcolor + \ifbool{LWR@xfakebold}% + {\def\LWR@tempone{Y}}% + {\def\LWR@tempone{N}}% + \begin{lateximage}% + *% + [% + \textbackslash{}% + ce% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}% + ]% + *% + [% + FM\LWR@f@family% + SR\LWR@f@series% + SH\LWR@f@shape% + SHC\LWR@f@shapecaps% + CL\LWR@tempcolor% + FB\LWR@tempone% xfakebold + ]% + \LWR@setcurrentfont% + \LWR@mhchem@origce{#1}% + \end{lateximage}% + \endgroup% + \addtocounter{LWR@mhchem@cedepth}{-1}% } \newcounter{LWR@mhchem@cedepth} \setcounter{LWR@mhchem@cedepth}{0} \renewcommand{\ce}{% -\begingroup% -\ifnumequal{\value{LWR@mhchem@cedepth}}{0}{% - \catcode`\$=3% math shift -}{}% -\addtocounter{LWR@mhchem@cedepth}{1}% -\LWR@mhchem@HTML@ce% + \begingroup% + \ifnumequal{\value{LWR@mhchem@cedepth}}{0}{% + \catcode`\$=3% math shift + }{}% + \addtocounter{LWR@mhchem@cedepth}{1}% + \LWR@mhchem@HTML@ce% } \LetLtxMacro\LWR@mhchem@origcesplit\cesplit \newcommand*{\LWR@mhchem@HTML@cesplit}[2] {% -\LWR@findcurrenttextcolor% sets \LWR@tempcolor -\ifbool{LWR@xfakebold}% - {\def\LWR@tempone{Y}}% - {\def\LWR@tempone{N}}% -\begin{lateximage}*[\textbackslash{}cesplit\{\LWR@HTMLsanitize{#2}\}]*% - [% - FM\LWR@f@family% - SR\LWR@f@series% - SH\LWR@f@shape% - SHC\LWR@f@shapecaps% - CL\LWR@tempcolor% - FB\LWR@tempone% xfakebold - ]% -\LWR@setcurrentfont% -\LWR@mhchem@origcesplit{#1}{#2}% -\end{lateximage}% -\endgroup% + \LWR@findcurrenttextcolor% sets \LWR@tempcolor + \ifbool{LWR@xfakebold}% + {\def\LWR@tempone{Y}}% + {\def\LWR@tempone{N}}% + \begin{lateximage}% + *% + [% + \textbackslash{}% + cesplit% + \{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% + ]% + *% + [% + FM\LWR@f@family% + SR\LWR@f@series% + SH\LWR@f@shape% + SHC\LWR@f@shapecaps% + CL\LWR@tempcolor% + FB\LWR@tempone% xfakebold + ]% + \LWR@setcurrentfont% + \LWR@mhchem@origcesplit{#1}{#2}% + \end{lateximage}% + \endgroup% } \newcounter{LWR@mhchem@cesplitdepth} \setcounter{LWR@mhchem@cesplitdepth}{0} \renewcommand{\cesplit}{% -\begingroup% -\ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{% - \catcode`\$=3% math shift -}{}% -\addtocounter{LWR@mhchem@cesplitdepth}{1}% -\LWR@mhchem@HTML@cesplit% + \begingroup% + \ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{% + \catcode`\$=3% math shift + }{}% + \addtocounter{LWR@mhchem@cesplitdepth}{1}% + \LWR@mhchem@HTML@cesplit% } \appto\LWR@restoreorigformatting{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty index 4d8c642c94b..77111cd48d3 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty @@ -37,7 +37,7 @@ \DeclareDocumentCommand{\microtypesetup}{m}{} \DeclareDocumentCommand{\microtypecontext}{m}{} \DeclareDocumentCommand{\textmicrotypecontext}{m m}{#2} -\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{% +\IfPackageLoadedTF{letterspace}{\let\MT@textls\relax}{% \DeclareDocumentCommand{\lsstyle}{}{} \DeclareDocumentCommand{\textls}{o +m}{} \DeclareDocumentCommand{\lslig}{m}{#1} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty index 00cb4b0881f..ae65fed6d4c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty @@ -15,7 +15,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackagePass{minted}[2017/07/19] +\LWR@ProvidesPackagePass{minted}[2021/12/24] \xpatchcmd{\minted} {\setkeys{minted@opt@cmd}{#1}} {% @@ -57,6 +57,15 @@ } {} {\LWR@patcherror{minted}{inputminted}} + +\renewenvironment{minted@snugshade*}[1]% +{% + \colorlet{shadecolor}{#1}% + \begin{snugshade*}% +} +{% + \end{snugshade*}% +} \endinput %% %% End of file `lwarp-minted.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty index 45963f2ddbe..956db127e34 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty @@ -18,46 +18,49 @@ \LetLtxMacro\multirow\relax -\LWR@ProvidesPackagePass{multirow}[2021/01/29] +\LWR@ProvidesPackagePass{multirow}[2021/03/15] \newcommand{\LWR@multirowborder}{} -\newcommand*{\LWR@multirow@par}{\LWR@htmltag{br /}\LWR@origpar}% +\newcommand*{\LWR@multirow@par}{% + \LWR@htmltag{br /}% +}% \NewDocumentCommand{\LWR@HTML@multirow}{O{c} m o m o +m}% {% -\LWR@traceinfo{*** LWR@HTML@multirow #1 #2 #4}% -\booltrue{LWR@usedmultirow}% -\LWR@maybenewtablerow% -\LWR@tabularleftedge% -\LWR@htmltag{td rowspan=\textquotedbl#2\textquotedbl\ % -class=\textquotedbl{}td% -\LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}% -\LWR@addcmidruletrim% -\LWR@addleftmostbartag% -\LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% -\textquotedbl% -\LWR@tdstartstyles% -\ifstrequal{#1}{c}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:middle}}{}% -\ifstrequal{#1}{b}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:bottom}}{}% -\ifstrequal{#1}{t}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:top}}{}% -\ifdefvoid{\LWR@multirowborder}{}{% - \LWR@tdaddstyle% - \LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; % - \LWR@print@mbox{padding-\LWR@multirowborder:} 2px% -}% -\LWR@addcmidrulewidth% -\LWR@addcdashline% -\LWR@addtabularrulecolors% -\LWR@tdendstyles% -}% -\LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}% -\begingroup% - \LetLtxMacro{\\}{\LWR@endofline}% - \let\par\LWR@multirow@par% - #6% -\endgroup% -\LWR@stoppars% -\boolfalse{LWR@intabularmetadata}% -\renewcommand{\LWR@multirowborder}{}% -\LWR@traceinfo{*** LWR@HTML@multirow done}% + \LWR@traceinfo{LWR@HTML@multirow #1 #2 #4}% + \booltrue{LWR@usedmultirow}% + \LWR@maybenewtablerow% + \LWR@tabularleftedge% + \LWR@htmltag{% + td rowspan=\textquotedbl#2\textquotedbl\ % + class=\textquotedbl{}td% + \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}% + \LWR@addcmidruletrim% + \LWR@addleftmostbartag% + \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% + \textquotedbl% + \LWR@tdstartstyles% + \ifstrequal{#1}{c}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:middle}}{}% + \ifstrequal{#1}{b}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:bottom}}{}% + \ifstrequal{#1}{t}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:top}}{}% + \ifdefvoid{\LWR@multirowborder}{}{% + \LWR@tdaddstyle% + \LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; % + \LWR@print@mbox{padding-\LWR@multirowborder:} 2px% + }% + \LWR@addcmidrulewidth% + \LWR@addcdashline% + \LWR@addtabularrulecolors% + \LWR@tdendstyles% + }% + \LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}% + \begingroup% + \LetLtxMacro{\\}{\LWR@endofline}% + \booltrue{LWR@in@multirow@par}% + #6% + \endgroup% + \LWR@stoppars% + \boolfalse{LWR@intabularmetadata}% + \renewcommand{\LWR@multirowborder}{}% + \LWR@traceinfo{LWR@HTML@multirow done}% }% \LWR@formatted{multirow} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-nccfoots.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-nccfoots.sty index 3dd306947d6..09a86224e80 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-nccfoots.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-nccfoots.sty @@ -16,6 +16,10 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{nccfoots}[2005/02/03] +\apptocmd{\LWR@nullifyfootnotes}{% + \renewcommand*{\Footnote}[1]{}% + \renewcommand*{\Footnotemark}[1]{}% +}{}{} \begin{warpMathJax} \CustomizeMathJax{\newcommand{\Footnotemark}[1]{{}^{\mathrm{#1}}}} \CustomizeMathJax{\newcommand{\Footnote}[2]{\Footnotemark{#1}}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty index 7febe5f1619..b85daa39599 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty @@ -50,7 +50,7 @@ \LWR@ProvidesPackagePass{ntheorem}[2011/08/15] \newcommand{\LWR@newtheoremstyle}{plain} \AtBeginDocument{ -\@ifpackageloaded{cleveref}{ +\IfPackageLoadedTF{cleveref}{ \gdef\@thm#1#2#3{% \if@thmmarks \stepcounter{end\InTheoType ctr}% @@ -198,7 +198,7 @@ \LWR@htmltag{% a id=\textquotedbl\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}\textquotedbl% }% -\LWR@htmltag{/a}% +\LWR@htmltag{/a}\LWR@orignewline% \LWR@startpars% } \gdef\newtheoremstyle#1#2#3{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-parnotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-parnotes.sty index 02bf57768d4..0712c18e14f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-parnotes.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-parnotes.sty @@ -35,29 +35,59 @@ } \def\PN@parnotes@real{% +\ifPN@inparnotes +\else + \LWR@stoppars% + \addtocounter{LWR@spandepth}{1}% % We call \par later, so this avoids recursion with \PN@parnotes@auto \PN@inparnotestrue - \unless\ifvmode\par\fi % Avoid page breaks between a paragraph and its parnotes - \nopagebreak\addvspace{\parnotevskip}% - \LWR@forcenewpage% lwarp \begin{BlockClass}(note){footnotes}% lwarp - {\parnotefmt{\PN@text}\par}% + \leavevmode\LWR@orignewline% + {% + \parnotefmt{\PN@text}% + }% + \leavevmode\LWR@orignewline% \end{BlockClass}% lwarp + \leavevmode\LWR@orignewline% \global\def\PN@text{}% - \addvspace{\parnotevskip}% % % These can be enabled or disabled by package options % \PN@disable@indent \PN@reset@optional \PN@inparnotesfalse + \addtocounter{LWR@spandepth}{-1}% +\fi } +\newbool{LWR@parnotes@doingauto} +\boolfalse{LWR@parnotes@doingauto} + +\def\PN@parnotes@auto{% + \ifbool{LWR@parnotes@doingauto}{ + \ifx\@currenvir\@PN@autopn + \unless\ifPN@inparnotes + \unless\ifx\PN@text\@empty + \expandafter\PN@parnotes@real + \fi + \fi + \fi + }{}% +} +\renewenvironment{autopn}% + {\booltrue{LWR@parnotes@doingauto}} + {\PN@parnotes@auto}% \AtBeginDocument{ - \crefname{parnotemark}{paragraph note}{paragraph notes} - \Crefname{parnotemark}{Paragraph note}{Paragraph notes} + \ifdef{\crefname}{ + \crefname{parnotemark}{paragraph note}{paragraph notes} + \Crefname{parnotemark}{Paragraph note}{Paragraph notes} + }{} } +\apptocmd{\LWR@nullifyfootnotes}{% + \renewcommand{\parnote}[2][]{}% + \renewcommand\parnotemark[1]{}% +}{}{} \begin{warpMathJax} \providecommand{\parnotename}{parnote} \appto\LWR@syncnotenumbers{% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-pdftricks.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-pdftricks.sty index b58cfa49057..57796c34341 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-pdftricks.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-pdftricks.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{pdftricks}[2003/08/10] \def\PDFTfigname{\BaseJobname-fig\thepsfig} -\PackageWarning{lwarp-pdftricks}{ +\PackageWarning{lwarp-pdftricks}{% When the pdftricks images change, remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty index 4ec05659310..b13a1c35c6f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{physics}% No date is provided by the package. \begin{warpMathJax} -\PackageWarningNoLine{lwarp, physics}{The MathJax v3 extension will be used} +\PackageNoteNoLine{lwarp, physics}{The MathJax v3 extension will be used} \CustomizeMathJax{\require{physics}} \end{warpMathJax} \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-showlabels.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-showlabels.sty new file mode 100644 index 00000000000..af4ac783ac9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-showlabels.sty @@ -0,0 +1,26 @@ +%% +%% This is file `lwarp-showlabels.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `showlabels') +%% This is a generated file. +%% Copyright 2016-2020 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{showlabels}[2021/10/27] +\providecommand{\showlabelfont}{} +\providecommand{\showlabelsetlabel}[1]{} +\newcommand*{\showlabels}[2][]{} +\newcommand*{\showlabelrefline}{} +\newcommand*{\showlabelsinline}{} +\endinput +%% +%% End of file `lwarp-showlabels.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty index f7ac9e0342a..edcbd9e259d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty @@ -42,7 +42,7 @@ { \__siunitx_ensure_ltr:n { - \begingroup% lwarp + \color@begingroup \__siunitx_print_color: \__siunitx_font_shape: \__siunitx_font_weight: @@ -61,7 +61,7 @@ }% lwarp }% lwarp } - \endgroup% lwarp + \color@endgroup } } } @@ -95,16 +95,19 @@ } { \__siunitx_unit_output_pre_print: - \begingroup% lwarp - \boolfalse{mathjax}% lwarp - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + \begingroup% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp }{siunitx}{% \__siunitx_print:nn { number } {% \LWR@origensuredmath{#1}% }% - }% lwarp - \endgroup% lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } \group_end:% lwarp @@ -123,15 +126,18 @@ { \__siunitx_unit_output_pre_print: \begingroup% lwarp - \boolfalse{mathjax}% lwarp - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp }{siunitx}{% \__siunitx_print:nn { number } {% \LWR@origensuredmath{#1}% - } % lwarp - }% lwarp - \endgroup% lwarp + } % lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } } @@ -139,16 +145,19 @@ \tl_if_empty:nF {#1} { \tl_set:Nn \l__siunitx_unit_tl {#2} - \begingroup% lwarp - \boolfalse{mathjax}% lwarp - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + \begingroup% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp }{siunitx}{% \__siunitx_print:nn { number } { \LWR@origensuredmath{#1}% - }% lwarp - }% lwarp - \endgroup% lwarp + }% lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } } @@ -285,47 +294,39 @@ \ifblank{#3}{}{\num{#3}^{\unicode{x2033}}}% \dblprime }} \CustomizeMathJax{\newcommand{\ang}[2][]{\LWRsiunitxang#2;;;\LWRsiunitxEND}} -\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{% - \ifblank{#1}% - {}% - {% - \ifstrequal{#1}{-}% - {-}% - {\LWRsiunitxprintdecimal{#1}\times}% - }% - 10^{\LWRsiunitxprintdecimal{#2}} -}} \ExplSyntaxOn \AtBeginDocument{ \ifdefstring{\l__siunitx_output_decimal_tl}{{,}} - {% Use decimal comma - \CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{% - \mathrm{#1}% - \ifblank{#2} - {}% - {,\mathrm{#2}} - }} - - \CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% - \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND% - }} - } - {% Use decimal point - \CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1,#2,#3\LWRsiunitxEND{% - \mathrm{#1}% - \ifblank{#2} - {}% - {.\mathrm{#2}} - }} - - \CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% - \LWRsiunitxprintdecimalsub#1,,,\LWRsiunitxEND% - }} - } + {\CustomizeMathJax{\def\LWRsiunitxdecimal{,}}} + {\CustomizeMathJax{\def\LWRsiunitxdecimal{.}}} } \ExplSyntaxOff +\CustomizeMathJax{\newcommand{\LWRsiunitxENDTWO}{}} + +\CustomizeMathJax{\def\LWRsiunitxprintdecimalsubtwo#1,#2,#3\LWRsiunitxENDTWO{% + \ifblank{#1}{0}{\mathrm{#1}}% + \ifblank{#2}% + {}% + {% + {\LWRsiunitxdecimal}% + \mathrm{#2}% + }% +}} +\CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{% + \LWRsiunitxprintdecimalsubtwo#1,,\LWRsiunitxENDTWO% + \ifblank{#2}% + {}% + {% + {\LWRsiunitxdecimal}% + \LWRsiunitxprintdecimalsubtwo#2,,\LWRsiunitxENDTWO% + }% +}} + +\CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% + \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND% +}} \CustomizeMathJax{\def\LWRsiunitxnumplus#1+#2+#3\LWRsiunitxEND{% - \ifblank{#2} + \ifblank{#2}% {\LWRsiunitxprintdecimal{#1}}% no plus {% \ifblank{#1}% @@ -337,17 +338,15 @@ }% }% }} - \CustomizeMathJax{\def\LWRsiunitxnumminus#1-#2-#3\LWRsiunitxEND{% - \ifblank{#2} + \ifblank{#2}% {\LWRsiunitxnumplus#1+++\LWRsiunitxEND}% {% - \LWRsiunitxprintdecimal{#1}% + \ifblank{#1}{}{\LWRsiunitxprintdecimal{#1}}% \unicode{x02212}% mathematical minus sign \LWRsiunitxprintdecimal{#2}% }% }} - \CustomizeMathJax{\def\LWRsiunitxnumpm#1+-#2+-#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumminus#1---\LWRsiunitxEND}% @@ -357,7 +356,6 @@ \LWRsiunitxprintdecimal{#2}% }% }} - \CustomizeMathJax{\def\LWRsiunitxnumx#1x#2x#3x#4\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumpm#1+-+-\LWRsiunitxEND}% @@ -377,38 +375,37 @@ }% }% }} - +\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{% + \ifblank{#1}% + {}% + {% + \ifstrequal{#1}{-}% + {-}% + {\LWRsiunitxprintdecimal{#1}\times}% + }% + 10^{\LWRsiunitxprintdecimal{#2}} +}} \CustomizeMathJax{\def\LWRsiunitxnumD#1D#2D#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumx#1xxxxx\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - \CustomizeMathJax{\def\LWRsiunitxnumd#1d#2d#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumD#1DDD\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - \CustomizeMathJax{\def\LWRsiunitxnumE#1E#2E#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumd#1ddd\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - \CustomizeMathJax{\def\LWRsiunitxnume#1e#2e#3\LWRsiunitxEND{% \ifblank{#2}% {\LWRsiunitxnumE#1EEE\LWRsiunitxEND}% {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% }} - -\CustomizeMathJax{\def\LWRsiunitxnumcomma#1,#2,#3\LWRsiunitxEND{% - \ifblank{#2} - {\LWRsiunitxnume#1eee\LWRsiunitxEND} - {\LWRsiunitxnume#1.#2eee\LWRsiunitxEND} -}} - -\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnumcomma#2,,,\LWRsiunitxEND}} +\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnume#2eee\LWRsiunitxEND}} \CustomizeMathJax{\newcommand{\si}[2][]{\mathrm{#2}}} \CustomizeMathJax{\def\LWRsiunitxSIopt#1[#2]#3{% {#2}\num{#1}{#3}% @@ -422,9 +419,9 @@ {\LWRsiunitxSIopt{#2}}% {\LWRsiunitxSI{#2}}% }} -\CustomizeMathJax{\newcommand{\numlist}[2][]{\mathrm{#2}}} +\CustomizeMathJax{\newcommand{\numlist}[2][]{\text{#2}}} \CustomizeMathJax{\newcommand{\numrange}[3][]{\num{#2}\,\unicode{x2013}\,\num{#3}}} -\CustomizeMathJax{\newcommand{\SIlist}[3][]{\mathrm{#2\,#3}}} +\CustomizeMathJax{\newcommand{\SIlist}[3][]{\text{#2}\,#3}} \CustomizeMathJax{\newcommand{\SIrange}[4][]{\num{#2}\,#4\,\unicode{x2013}\,\num{#3}\,#4}} \CustomizeMathJax{\newcommand{\tablenum}[2][]{\mathrm{#2}}} \CustomizeMathJax{\newcommand{\ampere}{\mathrm{A}}} @@ -516,7 +513,7 @@ \CustomizeMathJax{\newcommand{\square}[1]{\mathrm{#1}^2}} \CustomizeMathJax{\newcommand{\cubed}{^3}} \CustomizeMathJax{\newcommand{\cubic}[1]{\mathrm{#1}^3}} -\CustomizeMathJax{\newcommand{\per}{/}} +\CustomizeMathJax{\newcommand{\per}{\,\mathrm{/}}} \CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}} \CustomizeMathJax{\newcommand{\fg}{\femto\gram}} \CustomizeMathJax{\newcommand{\pg}{\pico\gram}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-thm-listof.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-thm-listof.sty index 2a66e72c96f..aa5a7976dcb 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-thm-listof.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-thm-listof.sty @@ -16,7 +16,7 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{thm-listof}[2019/12/22] -\@ifpackagelater{thm-listof}{2020/08/01}{% v0.72 +\IfPackageAtLeastTF{thm-listof}{2020/08/01}{% v0.72 \def\thmtlo@newentry{% \csdef{l@\thmt@envname}##1##2{\hypertocfloat{1}{figure}{lof}{##1}{##2}}% } diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty index a859df3535e..5a3744689fe 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty @@ -21,7 +21,7 @@ \newbool{LWR@tikzbabel} -\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0 +\IfPackageAtLeastTF{tikz}{2013/12/20}% Test for Tikz version v3.0.0 {\usetikzlibrary{babel}\booltrue{LWR@tikzbabel}} {\boolfalse{LWR@tikzbabel}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty index 18b9724d20c..60d53a2df03 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty @@ -111,7 +111,7 @@ \renewcommand{\thanksmarkseries}[1]{% \def\@bsmarkseries{\renewcommand{\thefootnote}{\@nameuse{#1}{footnote}}}% } -\@ifclassloaded{memoir}{ +\IfClassLoadedTF{memoir}{ \thanksmarkseries{arabic} }{% not memoir \if@titlepage diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-todo.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-todo.sty index 6dcc3520d29..b7a2c92aad5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-todo.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-todo.sty @@ -35,7 +35,6 @@ ] \@nameuse{@done\the\c@todo}: {\todoformat\ifx#1\todomark\else\textbf{#1} \fi}#2% } - \xpatchcmd{\@displaytodo} {\todoformat #1}{\todoformat \textbf{#1}}{} {\PackageWarning{lwarp-todo}{Unable to patch @displaytodo.}} @@ -49,10 +48,11 @@ \patchcmd{\astodos}{\todoformat #1}{\todoformat \textbf{#1}}{} {\PackageWarning{lwarp-todo}{Unable to patch astodos.}} - \AtBeginDocument{ +\ifdef{\crefname}{ \crefname{todo}{todo}{todos} \Crefname{todo}{Todo}{Todos} +}{} } \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty index eb48f578a75..fde92cdc296 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty @@ -80,8 +80,8 @@ \BlockClass[\LWR@vwcolstyle]{multicols} } { -\endBlockClass -\LWR@startpars + \endBlockClass + \LWR@startpars } \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty index e4213c168d6..7ace689afff 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty @@ -21,10 +21,10 @@ \LWR@ProvidesPackageDrop{wrapfig}[2003/01/31] \newcommand*{\LWR@wrapposition}{} -\newcommand{\LWR@wrapfig@printHTMLwidth}{width:\LWR@printlength{\LWR@templengthone}} +\newcommand{\LWR@wrapfig@printHTMLwidth}{\LWR@printlength{\LWR@templengthone}} \AtBeginDocument{ - \@ifpackageloaded{keyfloat}{ + \IfPackageLoadedTF{keyfloat}{ \renewcommand{\LWR@wrapfig@printHTMLwidth}{% \ifboolexpr{ test {\ifnumgreater{\value{KFLT@keyfloatdepth}}{0}} or diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig2.sty new file mode 100644 index 00000000000..4a1f1f193d7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig2.sty @@ -0,0 +1,57 @@ +%% +%% This is file `lwarp-wrapfig2.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `wrapfig2') +%% This is a generated file. +%% Copyright 2016-2020 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + + + +\LWR@ProvidesPackageDrop{wrapfig2}[2021-12-21] + +\LWR@origRequirePackage{lwarp-wrapfig} +\RenewDocumentEnvironment{wrapfigure}{o m o G{0pt} s}% original + {\wrapfloat{figure}[#1]{#2}[#3]{#4}}% + {\endwrapfloat} + +\RenewDocumentEnvironment{wraptable}{o m o G{0pt} s}% original + {\wrapfloat{table}[#1]{#2}[#3]{#4}}% + {\endwrapfloat} + +\RenewDocumentEnvironment{wrapfloat}{m o m o G{0pt}}% lwarp +{% + \begin{LWR@setvirtualpage}*% + \LWR@subwrapfigure{#3}{#5}% + \renewcommand*{\@captype}{#1}% +} +{% + \endLWR@BlockClassWP% + \end{LWR@setvirtualpage}% +} + +\NewDocumentEnvironment{wraptext}% + {O{l} D||{0.5\columnwidth} D<>{0} D(){figure}}% +{% + \wrapfloat{#4}[]{#1}[]{#2}% + \tcolorbox% +} +{% + \endtcolorbox% + \endwrapfloat% + \ignorespaces% +} + +\endinput +%% +%% End of file `lwarp-wrapfig2.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty index 83dd68dfd44..0cf6d141cdd 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty @@ -19,80 +19,82 @@ \LWR@ProvidesPackagePass{xcolor}[2016/05/11] +\let\color@endgroup\endgroup + \LetLtxMacro\LWR@print@pagecolor\pagecolor \LetLtxMacro\LWR@print@nopagecolor\nopagecolor \appto\LWR@restoreorigformatting{% -\LetLtxMacro\pagecolor\LWR@print@pagecolor% -\LetLtxMacro\nopagecolor\LWR@print@nopagecolor% + \LetLtxMacro\pagecolor\LWR@print@pagecolor% + \LetLtxMacro\nopagecolor\LWR@print@nopagecolor% } \DeclareRobustCommand{\LWR@HTML@normalcolor}{\color{black}}% \LWR@formatted{normalcolor} \renewcommand*{\LWR@findcurrenttextcolor}{% -\LWR@traceinfo{LWR@findcurrenttextcolor}% -\protect\colorlet{LWR@current@color}{.}% -\LWR@traceinfo{LWR@findcurrenttextcolor B}% -\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% -\LWR@traceinfo{LWR@findcurrenttextcolor: done}% + \LWR@traceinfo{LWR@findcurrenttextcolor}% + \protect\colorlet{LWR@current@color}{.}% + \LWR@traceinfo{LWR@findcurrenttextcolor B}% + \protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor% + \LWR@traceinfo{LWR@findcurrenttextcolor: done}% } \newcommand*{\LWR@currenttextcolorstyle}{% -\LWR@findcurrenttextcolor% -\ifdefstring{\LWR@tempcolor}{000000}% -{}% -{color: \LWR@origpound\LWR@tempcolor ; }% + \LWR@findcurrenttextcolor% + \ifdefstring{\LWR@tempcolor}{000000}% + {}% + {color: \LWR@origpound\LWR@tempcolor ; }% } \DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{% -\begingroup% -\LWR@hook@processingtags% -\LWR@findcurrenttextcolor% -\InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% - \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% - #1% -}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \LWR@findcurrenttextcolor% + \InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{% + \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}% + #1% + }% + \endgroup% } \NewDocumentCommand{\LWR@colorstyle}{m m}{% -\begingroup% -\LWR@hook@processingtags% -\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -\LWR@origpound\LWR@tempcolor% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + \LWR@origpound\LWR@tempcolor% + \endgroup% } \NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{% -\begingroup% -\LWR@hook@processingtags% -\InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{% -#3% -}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{% + #3% + }% + \endgroup% } \newcommand*{\LWR@borderpadding}[2]{% -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% + border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% } \NewDocumentCommand{\LWR@HTML@color}{o m}{% -\IfValueTF{#1}{% - \LWR@print@color[#1]{#2}% - \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -}{% - \LWR@print@color{#2}% - \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor% -}% -\edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}% + \IfValueTF{#1}{% + \LWR@print@color[#1]{#2}% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + }{% + \LWR@print@color{#2}% + \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor% + }% + \edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}% } \LWR@formatted{color} \NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{% -\begingroup% -\LWR@hook@processingtags% -\IfValueTF{#1}{% - \color[#1]{#2}% -}{% - \color{#2}% -}% -\InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \IfValueTF{#1}{% + \color[#1]{#2}% + }{% + \color{#2}% + }% + \InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}% + \endgroup% }% \LWR@formatted{textcolor} @@ -102,128 +104,131 @@ padding:\LWR@printlength{\fboxsep}% \renewcommand*{\nopagecolor}{} \NewDocumentCommand{\LWR@HTML@colorbox}{O{named} m +m}{% -\begingroup% -\LWR@hook@processingtags% -\InlineClass[% -background:\LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% -]{colorbox}{#3}% -\endgroup% + \begingroup% + \LWR@hook@processingtags% + \InlineClass[% + background:\LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% + ]{colorbox}{#3}% + \endgroup% } \NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{% -\begingroup% -\LWR@hook@processingtags% -\LWR@stoppars% -\begin{BlockClass}[% -background:\LWR@colorstyle{#1}{#2} ; % -padding:\LWR@printlength{\fboxsep}% -]{colorboxBlock} -#3 -\end{BlockClass}% -\endgroup% -\global\booltrue{LWR@minipagethispar}% + \begingroup% + \LWR@hook@processingtags% + \LWR@stoppars% + \begin{BlockClass}[% + background:\LWR@colorstyle{#1}{#2} ; % + padding:\LWR@printlength{\fboxsep}% + ]{colorboxBlock} + #3 + \end{BlockClass}% + \endgroup% + \global\booltrue{LWR@minipagethispar}% } \NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{#1} m +m}{% -\LWR@traceinfo{HTML fcolorbox #2 #4}% -\begingroup% -\LWR@hook@processingtags% -\LWR@forceminwidth{\fboxrule}% -\ifthenelse{\equal{#4}{none}}% - {% no background color - \InlineClass[% - \LWR@borderpadding{#1}{#2}% - ]{fcolorbox}{#5}% - }% - {% yes background color - \InlineClass[% - \LWR@borderpadding{#1}{#2} ; % - background:\LWR@colorstyle{#3}{#4}% - ]{fcolorbox}{#5}% - }% -\endgroup% + \LWR@traceinfo{HTML fcolorbox #2 #4}% + \begingroup% + \LWR@hook@processingtags% + \LWR@forceminwidth{\fboxrule}% + \ifthenelse{\equal{#4}{none}}% + {% no background color + \InlineClass[% + \LWR@borderpadding{#1}{#2}% + ]{fcolorbox}{#5}% + }% + {% yes background color + \InlineClass[% + \LWR@borderpadding{#1}{#2} ; % + background:\LWR@colorstyle{#3}{#4}% + ]{fcolorbox}{#5}% + }% + \endgroup% } \NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{#1} m +m}{% -\LWR@traceinfo{HTML fcolorboxBlock #2 #4}% -\begingroup% -\LWR@hook@processingtags% -\LWR@forceminwidth{\fboxrule}% -\LWR@stoppars% -\ifthenelse{\equal{#4}{none}}% - {% no background color - \begin{BlockClass}[% - \LWR@borderpadding{#1}{#2}% - ]{fcolorboxBlock} - #5 - \end{BlockClass}% - }% - {% yes background color - \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \begin{BlockClass}[% - background:\LWR@origpound\LWR@tempcolortwo\ ; % - \LWR@borderpadding{#1}{#2}% - ]{fcolorboxBlock} - #5 - \end{BlockClass}% - }% -\endgroup% -\global\booltrue{LWR@minipagethispar}% -\LWR@traceinfo{HTML fcolorboxBlock done}% + \LWR@traceinfo{HTML fcolorboxBlock #2 #4}% + \begingroup% + \LWR@hook@processingtags% + \LWR@forceminwidth{\fboxrule}% + \LWR@stoppars% + \ifthenelse{\equal{#4}{none}}% + {% no background color + \begin{BlockClass}[% + \LWR@borderpadding{#1}{#2}% + ]{fcolorboxBlock} + #5 + \end{BlockClass}% + }% + {% yes background color + \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% + \begin{BlockClass}[% + background:\LWR@origpound\LWR@tempcolortwo\ ; % + \LWR@borderpadding{#1}{#2}% + ]{fcolorboxBlock} + #5 + \end{BlockClass}% + }% + \endgroup% + \global\booltrue{LWR@minipagethispar}% + \LWR@traceinfo{HTML fcolorboxBlock done}% } \NewDocumentCommand{\LWR@subfcolorminipage}{m m m m}{% -\LWR@stoppars% -\begin{BlockClass}[% -#3% -\LWR@borderpadding{#1}{#2} ; % -\IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% -width:\LWR@printlength{\LWR@tempwidth}% -]{fcolorminipage}% + \LWR@stoppars% + \begin{BlockClass}[% + #3% + \LWR@borderpadding{#1}{#2} ; % + \IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }% + width:\LWR@printlength{\LWR@tempwidth}% + ]{fcolorminipage}% } \NewDocumentEnvironment{LWR@HTML@fcolorminipage}{O{named} m O{#1} m O{c} o o m} {% -\LWR@hook@processingtags% -\setlength{\LWR@tempwidth}{#8}% -\IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% -\LWR@forceminwidth{\fboxrule}% -\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% -\ifthenelse{\equal{#4}{none}}% - {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% - {% - \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% - \LWR@subfcolorminipage{#1}{#2}% - {background:\LWR@origpound\LWR@tempcolortwo\ ; }% - {#6}% - }% + \LWR@hook@processingtags% + \setlength{\LWR@tempwidth}{#8}% + \IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}% + \LWR@forceminwidth{\fboxrule}% + \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor% + \ifthenelse{\equal{#4}{none}}% + {\LWR@subfcolorminipage{#1}{#2}{}{#6}}% + {% + \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo% + \LWR@subfcolorminipage{#1}{#2}% + {background:\LWR@origpound\LWR@tempcolortwo\ ; }% + {#6}% + }% }% {% \end{BlockClass}% \global\booltrue{LWR@minipagethispar}% } \newcommand*{\LWR@HTML@boxframe}[3]{% -{% -\setlength{\LWR@tempwidth}{#1}% -\setlength{\LWR@tempheight}{#2}% -\addtolength{\LWR@tempheight}{#3}% -\LWR@forceminwidth{\fboxrule}% -\LWR@findcurrenttextcolor% -\InlineClass[% -display:inline-block ; % -border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; % -width:\LWR@printlength{\LWR@tempwidth} ; % -height:\LWR@printlength{\LWR@tempheight}% -]{boxframe}{}% -}% + {% + \setlength{\LWR@tempwidth}{#1}% + \setlength{\LWR@tempheight}{#2}% + \addtolength{\LWR@tempheight}{#3}% + \LWR@forceminwidth{\fboxrule}% + \LWR@findcurrenttextcolor% + \InlineClass[% + display:inline-block ; % + border:% + \LWR@printlength{\LWR@atleastonept} % space + solid % space + \LWR@currenttextcolor{} ; % space + width:\LWR@printlength{\LWR@tempwidth} ; % + height:\LWR@printlength{\LWR@tempheight}% + ]{boxframe}{}% + }% } \LWR@formatted{boxframe} \newcommand*{\LWR@xcolortempcolor}{} \def\rowc@l@rs[#1]#2#3#4% -{ -\rownum=1% +{% + \rownum=1% \@rowcolorstrue% \@ifxempty{#3}% {\def\@oddrowcolor{\@norowcolor}}% @@ -264,7 +269,7 @@ height:\LWR@printlength{\LWR@tempheight}% \ignorespaces% } \def\@norowcolor{% -\renewcommand{\LWR@xcolorrowHTMLcolor}{}% + \renewcommand{\LWR@xcolorrowHTMLcolor}{}% } \def\@rowc@lors{% 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 |