summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-05 21:42:36 +0000
committerKarl Berry <karl@freefriends.org>2024-01-05 21:42:36 +0000
commit7e7d846832cfc0229d189eaa73eb7e131cbfd1d6 (patch)
tree9211db17036808b3a6bdccb4dff538f4a919667d
parent12ac83f490d6410efcbb4f9cda35be26d7479e8d (diff)
lwarp (5jan24)
git-svn-id: svn://tug.org/texlive/trunk@69305 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua4
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/README.txt7
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/lwarp.pdfbin3405893 -> 3442544 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/lwarp/lwarpmk.lua4
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx2175
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.ins1
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty3
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-apxproof.sty27
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bussproofs.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty53
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty34
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty315
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fvextra.sty189
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty33
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-simplebnf.sty90
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty112
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty56
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty264
30 files changed, 2546 insertions, 863 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
index 1d47893217b..2c1709a5b97 100755
--- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
+++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
@@ -1,8 +1,8 @@
#!/usr/bin/env texlua
--- Copyright 2016-2023 Brian Dunn
+-- Copyright 2016-2024 Brian Dunn
-printversion = "v0.912"
+printversion = "v0.913"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt
index 3918deb3e51..5d406220282 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.912 README.txt
+LaTeX lwarp package v0.913 README.txt
Files included are:
@@ -41,7 +41,6 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-Copyright 2016-2023 Brian Dunn
+Copyright 2016-2024 Brian Dunn
-Homepage: http://BDTechConcepts.com
-Email: bd@BDTechConcepts.com
+GitHub: https://github.com/bdtc/lwarp
diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
index 550c9096d74..1b5170fb920 100644
--- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
+++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
index 1d47893217b..2c1709a5b97 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-2023 Brian Dunn
+-- Copyright 2016-2024 Brian Dunn
-printversion = "v0.912"
+printversion = "v0.913"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index d7f79fc3cf9..efd097b79c4 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-2023 Brian Dunn
+% Copyright 2016-2024 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> [2023/08/28 v0.912 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2024/01/05 v0.913 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -88,7 +88,7 @@
% \usepackage[log-declarations=false]{xparse}
\usepackage{xparse}
-\usepackage{ifptex}% *8* remove later
+\usepackage{ifptex}% in case TL2019 or earlier
\usepackage[lwarpmk, warpdisable]{lwarp}
@@ -534,23 +534,6 @@ used when converting \LaTeX\ \PDF\ output with \HTML\ tags into
a plain-text file with \HTML\ tags.
}
-\newcommand{\limitsbibtex}{%
-When enough authors are cited for a source,
-\watchout[Modify *.bib]
-\trouble{Improper \cs{prevdepth}>bibtex=\pkg{bibtex}}
-\trouble{bibtex=\pkg{bibtex}>Improper \cs{prevdepth}}
-\trouble{bibtex=\pkg{bibtex}>\cs{etalchar}}
-\trouble{etalchar=\cs{etalchar}}
-\BibTeX\ may use the \cs{etalchar} command
-to display a math superscript with a $+$ character to indicate ``and others''.
-Without modification, this will result in an ``Improper \cs{prevdepth}'' error.
-At present, \pkg{lwarp} requires that \cs{etalchar} be replaced by a text superscript.
-To do so, add to the start of the \filenm{.bib} file the following:
-\begin{sourcedisplay}
-\hspace*{-6em}@PREAMBLE\{"\cs{let}\cs{etalchar}\cs{relax}
-\cs{newcommand}\{\cs{etalchar}\}[1]\{\cs{textsuperscript}\{\#1\}\}"\}
-\end{sourcedisplay}
-}
\newcommand{\limitsgloss}{%
To process the \HTML\ glossary:
@@ -798,23 +781,39 @@ but \cs{bfseries}, etc.\ work only in some situations.
\trouble[HTML special chars]{HTML>entities}
\trouble{HTML>\&, \textless, \textgreater}
\trouble{text>\&, \textless, \textgreater}
+\trouble{HTML>sanitization}
have special meanings in \HTML.
If \cs{\&}, \cs{textless}, and \cs{textgreater} are used, proper
\HTML\ entities will be used, but there may be \HTML\ parsing problems
if these special characters occur unescaped in program listings
or other verbatim text.
+\trouble{listings>HTML sanitization}
+\trouble{program listings>HTML sanitization}
+\trouble{HTML>sanitization}
+\trouble{verbatim=\pkg{verbatim}}
+\gindex{listings>HTML sanitization}
+\gindex{program listings>HTML sanitization}
+\gindex{HTML>sanitization}
For program listings, the \pkg{listings} package is supported,
\margintag{program listings}
-and its \optn{literate} option is used to convert
+and its \optn{literate} option is used to automatically convert
\texttt{\&}, \texttt{\textless}, and \texttt{\textgreater}
to proper \HTML\ entities.
-The various \env{verbatim}-related environments do not convert
-\texttt{\&}, \texttt{\textless}, and \texttt{\textgreater},
-\margintag{verbatim}
+\pkg{minted} sanitizes \HTML\ automatically by its colorizing,
+which splits the special characters from the rest of the tag.
+
+The \pkg{fancyvrb} and \pkg{fvextra} packages automatically sanitize \HTML\ entities,
+\trouble[verbatim]{verbatim>HTML sanitization}
+but the core \LaTeX\ \env{verbatim}-related environments do not,
+nor does the \pkg{verbatim} package,
so care must be taken to avoid accidentally including valid \HTML\ code inside
-these environments. Adding a space on either side may be sufficient.
+these environments. It may be sufficient to add a space on either side of
+\texttt{\&}, \texttt{\textless}, and \texttt{\textgreater}.
+
+\pkg{fancyvrb} does not sanitize \HTML\ when using the \optn{gobble} option.
+\watchout[\optn{gobble}]
}
\newcommand{\limitstextcomp}{%
@@ -985,9 +984,6 @@ use \cs{footnotemark} and \cs{footnotetext}:
\textred{\cs{footnotetext}}\{A footnote with \cs{verb}+verbtim+.\} \\
\end{sourcedisplay}
and likewise for equations or display math.
-
-At present there is a bug such that paragraph closing tags are not present in
-footnotes when \cs{VerbatimFootnotes} are selected. The browser usually compensates.
}
\newcommand{\limitsmanyfootbigfoot}{%
@@ -1369,8 +1365,8 @@ Limitations when using \MathJax\ include:
\item Math appearing inside a lateximage,
\margintag{lateximage}
and therefore also inside a \TikZ\ or \env{picture}
- environment, is rendered as \SVG\ math even if \MathJax
- is used in the rest of the document.
+ environment, is rendered as \SVG\ math even if \MathJax\ is
+ used in the rest of the document.
\item For \pkg{siunitx},
\margintag{\pkg{siunitx}}
@@ -1461,9 +1457,8 @@ Yet another problem is math packages which are only partially emulated
in \MathJax.
The macro \cs{inlinemathother} may be used before a sequence of dynamic or complicated
math expressions, and \cs{inlinemathnormal} after. Doing so tells \pkg{lwarp} to
-use unhashed \SVG\ math images for those particular expressins, even if \MathJax
-is otherwise in use.
-See \cref{sec:localizingdynamicmath}.
+use unhashed \SVG\ math images for those particular expressins, even if \MathJax\ is
+otherwise in use. See \cref{sec:localizingdynamicmath}.
}
\newcommand*{\limitsmathdisplay}{
@@ -2037,9 +2032,6 @@ Color definitions, models, and mixing are fully supported
\margintag{color support}
without any changes required.
-\cs{rowcolors} is supported, except that the optional argument is ignored so far.
-\margintag{colored tables}
-
\cs{textcolor}, \cs{colorbox}, and \cs{fcolorbox} are supported.
\margintag{colored text and boxes}
@@ -2576,6 +2568,9 @@ in that order.
\trouble[row/cell color]{colortbl=\pkg{colortbl}}
\pkg{colortbl} ignores the overhang arguments.
+
+\cs{rowcolors} is supported, except that the optional argument is ignored so far.
+\margintag{colored tables}
}
\newcommand{\limitsctable}{%
@@ -2768,6 +2763,9 @@ may be defined as:
\margintag{indented alignment}
space which may not line up exactly with what \prog{pdftotext} detects.
Some lines may be off slightly in their left edge.
+
+\pkg{lwarp} sanitizes \HTML\ for \pkg{fancybox} verbatims, except for
+the contents of \cs{VerbBox} and any \cs{verb} inside.
}
\newcommand{\limitsmdframed}{%
@@ -3211,6 +3209,12 @@ after \cmds{lwarpmk html} use \cmds{lwarpmk cleanlimages} a single time,
and then \cmds{lwarpmk limages} to generate the new images.
}
+\newcommand*{\newlabelsystem}{
+Due to changes in cross referencing, \watchout[New labels]
+\textred{execute \cmds{lwarpmk clean} before recompiling.}
+}
+
+
\newcommand*{\describehashing}{%
If starred, a hashed filename is used.\margintag{image filename hashing}
@@ -3424,6 +3428,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.910}{2023/01/03}{\ 2023/01/03}
% \changes{v0.911}{2023/02/28}{\ 2023/02/28}
% \changes{v0.912}{2023/08/28}{\ 2023/08/28}
+% \changes{v0.913}{2024/01/05}{\ 2024/01/05}
@@ -3456,7 +3461,9 @@ This boolean may be tested by the user for later use.
%
% \fileversion{} \Dash \filedate
%
-% {\small\textcopyright{} 2016--2023} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
+% {\small\textcopyright{} 2016--2024} Brian Dunn
+%
+% GitHub: \url{https://github.com/bdtc/lwarp}
%
% \end{center}
%
@@ -3542,6 +3549,8 @@ This boolean may be tested by the user for later use.
%
% To update existing projects, see \cref{sec:updates}: \nameref{sec:updates}.
%
+% Need help? See the \nameref{sec:indexgen} or the \nameref{sec:indextrb}.
+%
% \color{red!30!black}\bfseries
% \pkg{Lwarp} is still in development. Changes are likely.
%
@@ -3657,8 +3666,22 @@ This boolean may be tested by the user for later use.
% see the end of the Change History on page \pageref{sec:changesend}.
%
% \begin{description}
+% \item[v0.913:] \HTML\ sanitization for verbatims.
+% \begin{itemize}
+% \item Now at GitHub: \url{https://github.com/bdtc/lwarp}
+% \item Added bibliography usage info to docs and tutorial.
+% \item \cs{verb} now uses a \CSS\ class of \attribute{verb}
+% instead of \attribute{texttt}.
+% \item Improved \HTML\ sanitization for hyperlinks,
+% \pkg{fancybox}, \pkg{fancyvrb}, \pkg{fvextra}, \pkg{minted}.
+% \item Updated \pkg{fancyvrb}, \pkg{fvextra}, \pkg{simplebnf}.
+% \item \pkg{siunitx}: Updated, and improved complex i,j.
+% \item Added \pkg{doipubmed}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.912:] Updated for new \LaTeX\ label system.
% \begin{itemize}
+% \item \newlabelsystem
% \item Fixed for updated kernel label system, name and back references.
% \item Updated \pkg{memoir}, \pkg{tcolorbox}.
% \item \pkg{nameref}: Now allowed to load before \pkg{lwarp}, such as by \pkg{memoir}.
@@ -3815,8 +3838,7 @@ This boolean may be tested by the user for later use.
% \needspace{2\baselineskip}
% \item[v0.896:] Back references, accessibility.
% \begin{itemize}
-% \item \textred{Due to changes in cross referencing, \watchout
-% execute \cmds{lwarpmk clean} before recompiling.}
+% \item \newlabelsystem
% \item Increased sectioning nesting stack depth. Error if overflow stack.
% \item Fixed footnotes at the end of the document,
% or inside a \env{description} label.
@@ -6080,7 +6102,7 @@ This boolean may be tested by the user for later use.
% due to native \LaTeX\ processing.\\
%
% Theorems: & Native \LaTeX\ theorems,
-% \mpkg{amsthm}, \spkg{apxproof}, \mpkg{ntheorem}, \mpkg{shadethm},
+% \mpkg{amsthm}, \mpkg{apxproof}, \mpkg{ntheorem}, \mpkg{shadethm},
% \mpkg{theorem}, \mpkg{thmbox}, \mpkg{thmtools}. \\
%
% Additional math: & Math fonts via \SVG\ images,
@@ -6294,8 +6316,8 @@ This boolean may be tested by the user for later use.
% \mpkg{axodraw2}, \mpkg{bitpattern}, \spkg{blochsphere}, \spkg{bodegraph},
% \spkg{bohr}, \mpkg{bytefield},
% \mpkg{chemfig}, \mpkg{chemformula}, \mpkg{chemgreek},
-% \mpkg{chemmacros}, \mpkg{chemnum},
-% \spkg{circuitikz}, \spkg{econometrics}\ejax, \spkg{elements},
+% \mpkg{chemmacros}, \mpkg{chemnum}, \spkg{circuitikz},
+% \mpkg{doipubmed}, \spkg{econometrics}\ejax, \spkg{elements},
% \mpkg{engtlc}\ejax, \spkg{fast-diagram}, \mpkg{ghsystem},
% \spkg{hepnicenames}, \spkg{heppennames}, \spkg{hepunits}\ejax,
% \mpkg{isotope}\ejax,
@@ -6971,6 +6993,7 @@ This boolean may be tested by the user for later use.
%
% \section{Tutorial}
% \label{sec:tutorial}
+% ^^A *tutorial
%
% This section shows an example of how to create an \pkg{lwarp} document.
%
@@ -7447,6 +7470,20 @@ This boolean may be tested by the user for later use.
%
% \clearpage
%
+% \subsection{Using a bibliography}
+%
+% \changes{v0.913}{2023/10/01}{Docs: Update a bibliography.}
+%
+% To process the bibliography for the \HTML\ version:
+% \userentry{bibtex <filename>\_html}
+% or
+% \userentry{biber <filename>\_html}
+%
+% To see the bibliography in the \HTML\ version:
+% \userentry{lwarpmk html1}
+% as many times as neccesary.
+%
+%
% \subsection{Using a glossary}
%
% \changes{v0.29}{2017/04/15}{Docs: Using a glossary}
@@ -7889,7 +7926,7 @@ This boolean may be tested by the user for later use.
% \DescribePackage{lmodern}
% To use Latin Modern instead, add
% \begin{sourcedisplay}
-% |usepackage{lmodern}|
+% |\usepackage{lmodern}|
% \end{sourcedisplay}
% to the preamble.
%
@@ -7908,7 +7945,7 @@ This boolean may be tested by the user for later use.
% \margintag{\prog{latex}, \prog{pdflatex}, T1, UTF8}
% \pkg{lwarp} automatically loads \pkg{fontenc} with T1 encoding.
% \pkg{fontenc} may be loaded with an additional encoding after \pkg{lwarp}.
-% \pkg{inputenc} is automatically loaded with UTF8 encoding if if has not yet been loaded,
+% \pkg{inputenc} is automatically loaded with UTF8 encoding if it has not yet been loaded,
% but may also be specified with another encoding such as |latin1|.
% See the next section regarding index encoding.
%
@@ -8273,7 +8310,7 @@ This boolean may be tested by the user for later use.
% \margintag{automatic setting}
% to sensible values for each of those programs while compiling a single index.
% \pkg{lwarp}'s \optn{makeindexStyle}, \optn{xindyStyle},
-% \optn{xindyLanuage}, and \optn{xindyCodepage} options will be used if specified.
+% \optn{xindyLanguage}, and \optn{xindyCodepage} options will be used if specified.
%
% If specifying \optn{PrintIndexCmd} manually,
% \trouble{PrintIndexCmd}
@@ -8313,7 +8350,7 @@ This boolean may be tested by the user for later use.
% \margintag{automatic setting}
% to sensible values for each of those programs while compiling a single index.
% \pkg{lwarp}'s \optn{makeindexStyle}, \optn{xindyStyle},
-% \optn{xindyLanuage}, and \optn{xindyCodepage} options will be used if specified.
+% \optn{xindyLanguage}, and \optn{xindyCodepage} options will be used if specified.
%
% If specifying \optn{HTMLIndexCmd} manually,
% \trouble[xindy]{xindy=\prog{xindy}>options>HTMLIndexCmd=\optn{HTMLIndexCmd}}
@@ -8344,7 +8381,7 @@ This boolean may be tested by the user for later use.
% \margintag{automatic setting}
% to either of the two settings show above.
% \pkg{lwarp}'s \optn{makeindexStyle}, \optn{xindyStyle},
-% \optn{xindyLanuage}, and \optn{xindyCodepage} options will be used if specified.
+% \optn{xindyLanguage}, and \optn{xindyCodepage} options will be used if specified.
% Unlike \optn{PrintIndexCmd} and \optn{HTMLIndexCmd},
% \prog{latexmk} uses either of the single-line settings of \optn{LatexmkIndexCmd}
% shown above to compile each of multiple indexes if necessary.
@@ -8677,7 +8714,7 @@ This boolean may be tested by the user for later use.
% of the section names. If false, web pages are numbered.
% Either way, the \optn{HTMLFilename} option is used as a prefix.
% See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files.
-% The user must ensure that filenames are unique after begin sanitized.
+% The user must ensure that filenames are unique after being sanitized.
% \trouble[Unique filename!]{HTML>missing pages>filename not unique}
% For example, math in the section name is removed before creating the filename,
% so the rest of the filename must be sufficiently unique to avoid name collisions.
@@ -8728,7 +8765,7 @@ This boolean may be tested by the user for later use.
% \begin{description}
% \ItemDescribeMacro{\CSSFilename} \marg{filename.css} \DescribeDefault{lwarp.css} \quad
% Sets the \CSS\ file to use for the following
-% files. May be changed before each each sectioning command which would
+% files. May be changed before each sectioning command which would
% cause a file split.
%
% The \CSS\ styles of the web pages are set by the \cs{CSSFilename} command.
@@ -8737,12 +8774,12 @@ This boolean may be tested by the user for later use.
% in this tutorial. Change it to |lwarp_formal.css| for a more formal look,
% or comment out the \cs{CSSFilename} command to see the default.
% \cs{CSSFilename} may be used before each file break to set the \CSS\ for
-% individual pagess of the website.
+% individual pages of the website.
%
% \ItemDescribeMacro{\MathJaxFilename} \marg{filename}
% \DescribeDefault{\filenm{lwarp_mathjax.txt}} \quad
% Sets the \MathJax\ script file to use for the following
-% files. May be changed before each each sectioning command which would
+% files. May be changed before each sectioning command which would
% cause a file split.
%
% The \MathJax\ script file is copied into the head of each \HTML\ file.
@@ -8792,7 +8829,7 @@ This boolean may be tested by the user for later use.
%
% \ItemDescribeMacro{\HTMLDescription} \marg{description} \DescribeDefault{<empty>} \quad
% Sets the \HTML\ \attribute{description} tag for
-% the following files. May be changed before each each sectioning command which would
+% the following files. May be changed before each sectioning command which would
% cause a file split.
%
% \ItemDescribeMacro{\HTMLPageTop} \marg{contents} \DescribeDefault{<empty>} \quad
@@ -9144,8 +9181,8 @@ This boolean may be tested by the user for later use.
% Performs the given actions only when \HTML\ output is being generated.
%
% \DescribeEnv{warpMathJax}
-% Anything which is to be done only while using \HTML\ output with \MathJax
-% is surrounded by a \env{warpMathJax} environment.
+% Anything which is to be done only while using \HTML\ output with \MathJax\ is
+% surrounded by a \env{warpMathJax} environment.
% Usually, this is \cs{CustomizeMathJax}, used to add emulation macros.
% |\end{warpMathJax}| must appear on its own line.
% \trouble[\texttt{\cs{end}\{warpMathJax\}}]{warpMathJax}
@@ -9943,10 +9980,44 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\prog{BibTeX}}
% \label{sec:limitsbibtex}
+%
+% \trouble{bibtex=\pkg{bibtex}>Update bibliography}
+% \trouble{bibliography>update}
+% \gindex{bibtex=\pkg{bibtex}>Update bibliography}
+% \gindex{bibliography>update}
+% To update the \HTML\ version of the bibliography:
+% \userentry{bibtex <filename>\_html}
+% \changes{v0.913}{2023/10/01}{Docs: Update a bibliography.}
+%
% \DescribeMacro{\etalchar} Displays a superscript ``+'' to indicate ``and others''.
% \changes{v0.54}{2018/03/09}{Docs: BibTeX.}
%
-% \limitsbibtex
+% When enough authors are cited for a source,
+% \watchout[Modify *.bib]
+% \trouble{Improper \cs{prevdepth}>bibtex=\pkg{bibtex}}
+% \trouble{bibtex=\pkg{bibtex}>Improper \cs{prevdepth}}
+% \trouble{bibtex=\pkg{bibtex}>\cs{etalchar}}
+% \trouble{etalchar=\cs{etalchar}}
+% \BibTeX\ may use the \cs{etalchar} command
+% to display a math superscript with a $+$ character to indicate ``and others''.
+% Without modification, this will result in an ``Improper \cs{prevdepth}'' error.
+% At present, \pkg{lwarp} requires that \cs{etalchar} be replaced by a text superscript.
+% To do so, add to the start of the \filenm{.bib} file the following:
+% \begin{sourcedisplay}
+% \hspace*{-6em}@PREAMBLE\{"\cs{let}\cs{etalchar}\cs{relax}
+% \cs{newcommand}\{\cs{etalchar}\}[1]\{\cs{textsuperscript}\{\#1\}\}"\}
+% \end{sourcedisplay}
+%
+%
+% \subsubsection{\prog{biber}}
+%
+%\trouble{biber=\pkg{biber}>Update bibliography}
+%\trouble{bibliography>update}
+%\gindex{biber=\pkg{biber}>Update bibliography}
+%\gindex{bibliography>update}
+% To update the \HTML\ version of the bibliography:
+% \userentry{biber <filename>\_html}
+% \changes{v0.913}{2023/10/01}{Docs: Update a bibliography.}
%
%
% \subsubsection{\pkg{xcite} package}
@@ -12258,7 +12329,6 @@ This boolean may be tested by the user for later use.
% \begin{enumerate}
% \item Change the source in \filenm{lwarp.dtx}.
% \item |pdflatex lwarp.ins| -or- |pdflatex core.ins|
-% \item |pdflatex lwarp.dtx|
% \item If modifying \prog{lwarpmk} the new version should now be active.
% \item If modifying \CSS\ files or other files generated by \pkg{lwarp}:
% \begin{enumerate}
@@ -12266,6 +12336,7 @@ This boolean may be tested by the user for later use.
% in the project.
% \item Reload the \HTML\ document to see the effect of the new \CSS\ files.
% \end{enumerate}
+% \item If done testing, |pdflatex lwarp.dtx| to update the \pkg{lwarp} documentation.
% \end{enumerate}
%
% Sometimes it is worth checking the |<project>_html.pdf| file, which is the
@@ -13073,7 +13144,7 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\RequirePackage{iftex}[2019/11/07]
\RequirePackage{ifpdf}
-\RequirePackage{ifptex}
+\RequirePackage{ifptex}% in case TL2019 or earlier
\newif\ifxetexorluatex
@@ -13615,6 +13686,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
\LWR@notmemoirloadafter{appendix}
+\LWR@loadafter{apxproof}
\LWR@loadafter{ar}
\LWR@loadafter{arabicfront}
\LWR@notmemoirloadafter{array}
@@ -13702,6 +13774,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{decorule}
\LWR@loadafter{diagbox}
\LWR@loadafter{dingbat}
+\LWR@loadafter{doipubmed}
\LWR@loadafter{DotArrow}
\LWR@loadafter{dotlessi}
\LWR@loadafter{dprogress}
@@ -14194,8 +14267,11 @@ This boolean may be tested by the user for later use.
%
% The default for \pdfLaTeX, \dviLaTeX, up\LaTeX, etc:
% \changes{v0.63}{2018/11/30}{Fix: Default \cs{LWR@mdfive}.}
+% \changes{v0.913}{2023/12/09}{Fix: Default \cs{LWR@mdfive}.}
% \begin{macrocode}
-\let\LWR@mdfive\pdfmdfivesum
+\ifdef{\pdfmdfivesum}
+ {\let\LWR@mdfive\pdfmdfivesum}
+ {}
% \end{macrocode}
%
% For \LuaLaTeX:
@@ -14601,11 +14677,12 @@ This boolean may be tested by the user for later use.
%
% \begin{macro}{\LWR@maybe@orignewpage}
% Only do \cs{LWR@orignewpage} if not inside a \TeX\ box.
+% Avoids nested paragraph tags.
% \changes{v0.88}{2020/06/06}{Added.}
% \begin{macrocode}
\newcommand*{\LWR@maybe@orignewpage}{%
\LWR@traceinfo{LWR@maybe@orignewpage}%
- \ifnumgreater{\value{LWR@texboxdepth}}{0}
+ \ifnumgreater{\value{LWR@texboxdepth}}{0}%
{}%
{\LWR@orignewpage}%
\LWR@traceinfo{LWR@maybe@orignewpage done}%
@@ -17128,6 +17205,8 @@ This boolean may be tested by the user for later use.
%
%
% \begin{macro}{\LWR@formatted@checkname} \marg{name}
+%
+% Verify that a print and \HTML\ version exist.
% \changes{v0.893}{2020/11/15}{Added.}
% \changes{v0.901}{2021/08/18}{Improved error handling.}
% \begin{macrocode}
@@ -17506,12 +17585,14 @@ This boolean may be tested by the user for later use.
% be remembered here.
% \changes{v0.51}{2018/03/12}{Fix: Remember original \cs{\#} in case is redefined.}
% \changes{v0.72}{2019/05/24}{Use \cs{LWR@formatted} for \cs{bfseries}, etc.}
+% \changes{v0.913}{2023/12/09}{Added \cs{nobreakspace}.}
% \begin{macrocode}
\chardef\LWR@origpound=`\#
% \end{macrocode}
% \begin{macrocode}
\let\LWR@origcomma\,
-\let\LWR@origtilde~
+\LetLtxMacro\LWR@origtilde~
+\LetLtxMacro\LWR@orignobreakspace\nobreakspace
\let\LWR@orighfil\hfil
\let\LWR@orighss\hss
\let\LWR@origllap\llap
@@ -18268,6 +18349,8 @@ This boolean may be tested by the user for later use.
% \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.}
+% \changes{v0.913}{2023/09/27}{\filenm{lwarp.css}: Improved \pkg{fancyvrb}.}
+% \changes{v0.913}{2023/09/27}{\filenm{lwarp.css}: Added complex number i,j format.}
%
% ^^A *lwarp.css
%
@@ -18371,6 +18454,12 @@ span.textup, div.textup {
font-variant-numeric: normal ;
}
+
+/* For complex number i,j symbols */
+span.ijit {font-style: italic; font-variant: normal}
+span.ijup {font-style: normal; font-variant: normal}
+
+
span.textsc, div.textsc {
font-variant: small-caps;
font-variant-numeric: oldstyle-nums ;
@@ -18944,8 +19033,10 @@ span.abstractrunintitle{
}
.fancyvrb {
- font-size:.85em ;
- margin: 3ex 0pt 3ex 0pt
+ margin: 3ex 0pt 3ex 0pt ;
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
}
.fancyvrblabel {
@@ -19511,7 +19602,7 @@ div.programlisting pre.verbatim span.callout{
font-size: .85em ;
}
-span.verbatim {
+span.verbatim, span.verb {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
"Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
"Courier New", monospace;
@@ -21137,10 +21228,10 @@ MathJax = {
\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2023 Brian Dunn
+-- Copyright 2016-2024 Brian Dunn
-printversion = "v0.912"
+printversion = "v0.913"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -25188,7 +25279,7 @@ end -- not --version
% \changes{v0.902}{2021/09/20}{Improved \pkg{footnote} par tags.}
% \begin{macrocode}
\ifbool{LWR@spewingnotes}{}{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
\LWR@orignewline%
}%
@@ -25999,6 +26090,33 @@ end -- not --version
% \end{macrocode}
% \end{macro}
+
+% \DescribeBoolean{LWR@HTMLsanitize@tmpb@enable}
+% Allow to disable sanitization while inside a \env{lateximage},
+% or while using \pkg{minted}.
+% \watchout
+% \HTML\ sanitizaiton was occurring too early,
+% and \pkg{minted} would then colorize the sanitized results,
+% breaking the \HTML\ entities in \pkg{lwarp}'s \HTML\ output.
+% \changes{v0.913}{2023/11/17}{\bool{LWR@HTMLsanitize@tmpb@enable} added.}
+% \begin{macrocode}
+\newbool{LWR@HTMLsanitize@tmpb@enable}
+\booltrue{LWR@HTMLsanitize@tmpb@enable}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR@HTMLsanitize@tmpb@removebackslash}
+%
+% Allow to enable \Slash disable sanitization of the
+% macros \cs{\%}, \cs{\#}, \cs{\%}.
+% This is usually enabled to allow the user to enter these macros in
+% \URL{}s, for example, but is disabled for ALT tags and
+% \MathJax\ output where the literal \LaTeX\ source must be preserved.
+% \changes{v0.913}{2023/11/25}{\bool{LWR@HTMLsanitize@tmpb@removebackslash} added.}
+% \begin{macrocode}
+\newbool{LWR@HTMLsanitize@tmpb@removebackslash}
+\booltrue{LWR@HTMLsanitize@tmpb@removebackslash}
+% \end{macrocode}
+
% \DescribeBoolean{LWR@MathJax@silentquotes}
% If true, double quotes (\cs{"} and |"|) are removed (used for \pkg{mathspec}).
% This unfortunately includes double quotes used inside \cs{text} with \MathJax.
@@ -26009,11 +26127,94 @@ end -- not --version
% \end{macrocode}
+% \begin{macro}{\LWR@HTMLsanitize@tmpb} Sanitizes \HTML\ for \cs{tmpb}.
+% These characters may be interpreted by the browser.
+% \changes{v0.913}{2023/10/01}{Added.}
+% \begin{macrocode}
+\catcode`\&=12
+\newcommand*{\LWR@HTMLsanitize@tmpb}{%
+ \ifbool{LWR@HTMLsanitize@tmpb@enable}%
+ {%
+% \end{macrocode}
+%
+% \HTML\ entities:
+% \begin{macrocode}
+ \LWR@replacestrings{&}{&amp;}% must be first because & is used for lt, gt, etc.
+ \LWR@replacestrings{<}{&lt;}%
+ \LWR@replacestrings{>}{&gt;}%
+ \LWR@replacestrings{'}{&apos;}%
+ \LWR@replacestrings{`}{&grave;}%
+ \LWR@replacestrings{_}{\detokenize{_}}%
+% \end{macrocode}
+% ^^A \StrSubstitute[100]{\tmpb}{\LWRpercent}{&percnt;}[\tmpb]%
+%
+% Neutralize \cs{\%}, \cs{\#}, \cs{\&} in case used by the author.
+%
+% \cs{@tempa} is built to be
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \LWR@replacestrings{\#}{#}
+% \end{Verbatim}
+% and similar for |%| and |&|.
+% \changes{v0.913}{2023/11/25}{Neutralize \cs{\%}, \cs{\#}, \cs{\&} in \URL.}
+% \begin{macrocode}
+ \ifbool{LWR@HTMLsanitize@tmpb@removebackslash}%
+ {%
+ \def\@tempa{\LWR@replacestrings}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\detokenize{\#}}}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\LWRhash}}%
+ \@tempa%
+ \def\@tempa{\LWR@replacestrings}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\detokenize{\%}}}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\LWRpercent}}%
+ \@tempa%
+ \def\@tempa{\LWR@replacestrings}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\detokenize{\&}}}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\LWRamp}}%
+ \@tempa%
+ }%
+ {}%
+% \end{macrocode}
+%
+% The quotes occasionally causes problems.
+% For \pkg{MathJax}, also allow neutralization of \cs{"} and the |"| character.
+% \changes{v0.891}{2020/09/09}{Neutralized quotes.}
+% \changes{v0.893}{2020/11/22}{Optionally neutralized quotes.}
+% \begin{macrocode}
+ \ifbool{LWR@MathJax@silentquotes}
+ {%
+ \expandafter\LWR@replacestrings\expandafter{\LWRbackslash"}{}%
+ \LWR@replacestrings{"}{}%
+ }%
+ {\LWR@replacestrings{"}{&quot;}}%
+ }% enabled
+ {}% not enabled
+}
+\catcode`\&=4
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@HTMLsanitize@use@tmpb} \marg{text}
+%
+% Sanitizes via \cs{LWR@HTMLsanitize@tmpb} and then immediately uses the result.
+% \begin{macrocode}
+\newcommand{\LWR@HTMLsanitize@use@tmpb}[1]{%
+ \ifbool{LWR@HTMLsanitize@tmpb@enable}%
+ {%
+ \def\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
+ \tmpb%
+ }%
+ {#1}%
+}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\LWR@subHTMLsanitize}
%
-% \cs{LWR@strresult} must first be set by \cs{LWR@HTMLsanitize},
-% \cs{LWR@HTMLsanitizeexpand}, or \cs{CustomizeMathJax}.
+% \cs{LWR@strresult} must first be set by \cs{LWR@HTMLsanitizedetokenized},
+% \cs{LWR@HTMLsanitizeexpanded}, or \cs{CustomizeMathJax}.
%
% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
% \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.}
@@ -26021,30 +26222,9 @@ end -- not --version
% \changes{v0.81}{2020/02/24}{Faster.}
% \begin{macrocode}
\catcode`\#=12
-\catcode`\&=12
\newcommand{\LWR@subHTMLsanitize}{%
-% \end{macrocode}
-% The |&|, |<|, and |>| may be interpreted by the browser:
-%
-% \begin{macrocode}
\edef\tmpb{\detokenize\expandafter{\LWR@strresult}}%
- \LWR@replacestrings{&}{&amp;}%
- \LWR@replacestrings{<}{&lt;}%
- \LWR@replacestrings{>}{&gt;}%
-% \end{macrocode}
-% The quotes occasionally causes problems.
-% For \pkg{mathspec}, also allow neutralization of \cs{"} and the |"| character.
-% \changes{v0.891}{2020/09/09}{Neutralized single quotes.}
-% \changes{v0.893}{2020/11/22}{Optionally neutralized single quotes.}
-% \begin{macrocode}
- \ifbool{LWR@MathJax@silentquotes}
- {%
- \expandafter\LWR@replacestrings\expandafter{\LWRbackslash"}{}%
- \LWR@replacestrings{"}{}%
- }%
- {\LWR@replacestrings{"}{&quot;}}%
- \LWR@replacestrings{'}{&apos;}%
- \LWR@replacestrings{`}{&grave;}%
+ \LWR@HTMLsanitize@tmpb%
% \end{macrocode}
% \MathJax\ allows expressions to be defined with \cs{newcommand}.
% These expressions would appear with |##| for each argument,
@@ -26056,7 +26236,6 @@ end -- not --version
\edef\LWR@strresult{\detokenize\expandafter{\tmpb}}%
}
\catcode`\#=6
-\catcode`\&=4
% \end{macrocode}
% \end{macro}
@@ -26163,6 +26342,7 @@ end -- not --version
\newcommand*{\LWR@subcustomizedmathjax}[1]{%
\begingroup%
\LWR@hook@processingtags%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\edef\LWR@strresult{\detokenize{#1}}%
\LWR@subHTMLsanitize%
\xdef\LWR@customizedMathJax{%
@@ -27892,6 +28072,7 @@ end -- not --version
\begingroup%
\LWR@restoreoriglists%
\boolfalse{LWR@verbtags}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
% \end{macrocode}
% ^^A \ifbool{mathKaTeX}{%
% ^^A \verbatiminput{lwarp_KaTeX.txt}%
@@ -27912,7 +28093,6 @@ end -- not --version
% \end{macrocode}
% ^^A }%
% \begin{macrocode}
- \booltrue{LWR@verbtags}%
\endgroup%
\LWR@stoppars%
}% end of mathjax
@@ -28234,11 +28414,11 @@ end -- not --version
% \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.}
% \changes{v0.84}{2020/04/24}{Added prev/next links.}
%
-% (The \cs{LWR@origtilde} is in case no autopage is required for the label,
+% (The \cs{LWR@orignobreakspace} is in case no autopage is required for the label,
% which would not print anything, and something must be printed before the newline.)
%
% \begin{macrocode}
-\label{\BaseJobname-autofile-last}\LWR@origtilde\LWR@orignewline
+\label{\BaseJobname-autofile-last}\LWR@orignobreakspace\LWR@orignewline
% \end{macrocode}
%
% \changes{v0.896}{2021/03/04}{Added \element{main}.}
@@ -29321,8 +29501,26 @@ end -- not --version
\begin{warpHTML}
% \end{macrocode}
+
+% \begin{macro}{\@setupverbvisiblespace}
+% For \XeTeX\ or \LuaTeX, the default visible space was drawn in \PDF,
+% but not a text character which could be copied to \HTML.
+% \changes{v0.913}{2023/11/27}{Fixed \XeTeX, \LuaTeX\ visible space.}
+% \begin{macrocode}
+\ifxetexorluatex
+
+\newcommand*{\LWR@HTML@@setupverbvisiblespace}{\let\@xobeysp\textvisiblespace}
+
+\LWR@formatted{@setupverbvisiblespace}
+
+\fi
+% \end{macrocode}
+% \end{macro}
+
+
% \DescribeBoolean{LWR@verbtags} Used to temporarily turn off verbatim tags
-% while doing \cs{verbatiminput} in the \HTML\ head.
+% while doing \cs{verbatiminput} in the \HTML\ head, or during \MathJax.
+% Verbatim tags are also disabled separately inside an \HTML\ span.
% \begin{macrocode}
\newbool{LWR@verbtags}
\booltrue{LWR@verbtags}
@@ -29332,25 +29530,31 @@ end -- not --version
% \begin{macro}{\verb}
%
% Patched to encapsulate the verbatim text inside span
-% with a class of \attribute{texttt}.
+% with a class of \attribute{verb}.
%
-% \changes{v0.891}{2020/09/12}{\cs{verb} as \cs{texttt}.}
% \begin{macrocode}
\LetLtxMacro\LWR@orig@verb@egroup\verb@egroup
\def\LWR@verb@egroup@endspan{%
\LWR@orig@verb@egroup%
- \LWR@htmltag{/span}%
+ \ifbool{LWR@verbtags}%
+ {\LWR@htmltag{/span}}%
+ {}%
\endgroup%
}
% \end{macrocode}
%
+% \changes{v0.891}{2020/09/12}{\cs{verb} as class \attribute{texttt}.}
% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
+% \changes{v0.913}{2023/12/07}{\cs{verb} as class \attribute{verb}.}
+% \changes{v0.913}{2023/12/09}{\cs{verb} in a \env{lateximage}.}
% \begin{macrocode}
\xpretocmd{\verb}
{%
\begingroup%
- \LWR@htmltag{span class=\textquotedbl{}texttt\textquotedbl}%
+ \ifbool{LWR@verbtags}%
+ {\LWR@htmltag{span class=\textquotedbl{}verb\textquotedbl}}%
+ {}%
\let\verb@egroup\LWR@verb@egroup@endspan%
}
{}
@@ -29393,13 +29597,20 @@ end -- not --version
%
% Create a new |pre| of the given class.
% The tags may temporarily be turned off for internal use, such
-% as loading the \MathJax\ script.
+% as loading the \MathJax\ script, or inside a \element{span}.
+% \changes{v0.913}{2023/11/07}{Fix: No \element{pre} tags if inside a \element{span}.}
% \begin{macrocode}
-\ifbool{LWR@verbtags}{%
- \LWR@htmltag{pre class=\textquotedbl#2\textquotedbl%
- \ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}%
+\ifbool{LWR@verbtags}%
+{%
+ \ifnumcomp{\value{LWR@spandepth}}{=}{0}{%
+ \LWR@htmltag{pre class=\textquotedbl#2\textquotedbl%
+ \ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}%
+ }%
+ \par%
+ }%
+ {% in a span
+ \LWR@spanwarnformat{verbatim}%
}%
- \par%
}{}%
% \end{macrocode}
%
@@ -29416,20 +29627,36 @@ end -- not --version
% \begin{macrocode}
\LWR@print@normalfont%
\LWR@origttfamily%
-\LWR@print@scriptsize%
% \end{macrocode}
+%
+% If not inside a \env{lateximage},
+% use a small font to avoid line overflow.
+% \changes{v0.913}{2023/12/11}{Fix: Verbatim font size in a \env{lateximage}.}
+% \begin{macrocode}
+\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}%
+ {\LWR@print@scriptsize}%
+ {}%
+% \end{macrocode}
+%
% Since inside a \element{pre}, restore the original list processing:
% \begin{macrocode}
\LWR@restoreoriglists%
% \end{macrocode}
+%
% Turn off \pkg{babel-french} extra space before punctuation:
% \begin{macrocode}
\LWR@hook@processingtags%
% \end{macrocode}
+%
% Do not produce \HTML\ tags for \cs{hspace} inside a verse |par|.
% Restore plain \LaTeX{} \cs{hspace} functionality:
% \begin{macrocode}
\let\hspace\LWR@print@hspace%
+% \end{macrocode}
+%
+% Do not produce \HTML\ tags for \cs{nbsp}.
+% \begin{macrocode}
+\boolfalse{LWR@HTMLsanitize@nobreakspace}%
}
% \end{macrocode}
% \end{macro}
@@ -29446,7 +29673,11 @@ end -- not --version
% \end{macrocode}
% At the end of the environment, close the |pre|:
% \begin{macrocode}
-\ifbool{LWR@verbtags}{%
+\ifboolexpr{
+ bool{LWR@verbtags} and
+ test {\ifnumcomp{\value{LWR@spandepth}}{=}{0}}
+}%
+{%
\noindent\LWR@htmltag{/pre}\par% pre
}{}%
% \end{macrocode}
@@ -29533,6 +29764,7 @@ end -- not --version
% \changes{v0.84}{2020/04/17}{Restore spacing.}
% \changes{v0.903}{2021/12/20}{Converted to env.}
% \changes{v0.906}{2022/06/10}{Used \cs{LWR@formatted} for more items.}
+% \changes{v0.913}{2023/12/09}{Added \cs{nobreakspace}.}
% \begin{macrocode}
\newenvironment*{LWR@HTML@tabbing}
{%
@@ -29541,7 +29773,8 @@ end -- not --version
\let\enskip\LWR@print@enskip%
\let\quad\LWR@print@quad%
\let\qquad\LWR@print@qquad%
- \let~\LWR@origtilde%
+ \LetLtxMacro~\LWR@origtilde%
+ \LetLtxMacro\nobreakspace\LWR@orignobreakspace%
\let\,\LWR@origcomma%
\let\thinspace\LWR@print@thinspace%
\let\negthinspace\LWR@print@negthinspace%
@@ -32444,7 +32677,7 @@ end -- not --version
% \end{macrocode}
% Print the class with left and right trim letters appended:
% \begin{macrocode}
- \LWR@origtilde tdrule#1#2%
+ \space tdrule#1#2%
% \end{macrocode}
% Remember the width of the rule:
% \begin{macrocode}
@@ -35241,6 +35474,17 @@ end -- not --version
% \end{macro}
+% \begin{macro}{\NR@gettitle} \marg{text}
+% From \pkg{nameref}, used by \pkg{caption}.
+% \changes{v0.913}{2023/11/22}{Fix for recent changes in \pkg{caption} with \cs{nameref}.}
+% \begin{macrocode}
+\def\NR@gettitle#1{%
+ \GetTitleString{#1}%
+ \let\@currentlabelname\GetTitleStringResult
+}
+% \end{macrocode}
+% \end{macro}
+
% \subsection{Hyper-references}
%
@@ -35329,12 +35573,14 @@ end -- not --version
% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
+% \changes{v0.913}{2023/10/01}{Improved \HTML\ sanitization.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@subhyperref}{m}{%
\LWR@traceinfo{LWR@subhyperref !#1!}%
- \LWR@sanitize{#1}%
+ \edef\tmpb{\detokenize\expandafter{#1}}%
+ \LWR@HTMLsanitize@tmpb%
\LWR@htmltag{%
- a href=\textquotedbl\LWR@sanitized\textquotedbl\ % space
+ a href=\textquotedbl\tmpb\textquotedbl\ % space
\LWR@addlinktitle % space
target=\textquotedbl\_{}blank\textquotedbl\ % space
}%
@@ -35342,14 +35588,33 @@ end -- not --version
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\LWR@subhyperreftext} \marg{text}
+% \begin{macro}{\LWR@subhyperreftext@sanizited} \marg{text}
%
% Finishes the hyperref for \cs{LWR@hrefb}. Catcodes must have been restored already.
% To be used after \cs{LWR@subhyperref}, and after its group has been closed.
%
% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
+% \changes{v0.913}{2023/10/01}{Improved \HTML\ sanitization.}
% \begin{macrocode}
-\newcommand{\LWR@subhyperreftext}[1]{%
+\newcommand{\LWR@subhyperreftext@sanitized}[1]{%
+ \edef\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
+ \tmpb%
+ \LWR@htmltag{/a}%
+ \LWR@ensuredoingapar%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@subhyperreftext@unsanitized} \marg{text}
+%
+% Finishes the hyperref for \cs{LWR@hrefb}. Catcodes must have been restored already.
+% To be used after \cs{LWR@subhyperref}, and after its group has been closed.
+%
+% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
+% \begin{macrocode}
+\newcommand{\LWR@subhyperreftext@unsanitized}[1]{%
#1%
\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
@@ -35358,6 +35623,8 @@ end -- not --version
% \end{macro}
+
+
% \begin{macro}{\LWR@subhyperrefclass} \marg{URL} \marg{text} \marg{htmlclass}
% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.}
% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
@@ -35383,7 +35650,8 @@ end -- not --version
% \begin{macro}{\LWR@href} \oarg{options} \marg{URL} \marg{text}
%
-% Create a link with accompanying text:
+% Create a link with accompanying text.
+% The accompanyting text is sanitized for \HTML.
%
% \changes{v0.43}{2017/10/31}{Made robust.}
% \changes{v0.49}{2018/02/18}{Fix: Adapt to classes.}
@@ -35395,7 +35663,12 @@ end -- not --version
\LWR@ensuredoingapar%
\LWR@subhyperref{#2}%
\endgroup% restore catcodes
- \LWR@subhyperreftext%
+% \end{macrocode}
+% If use \cs{LWR@subhyperreftext@sanitized} here,
+% some forms of text may not expand correctly, and thus break.
+% ^^A \LWR@subhyperreftext@sanitized% takes the following text as an argument
+% \begin{macrocode}
+ \LWR@subhyperreftext@unsanitized% takes the following text as an argument
}
\newrobustcmd*{\LWR@href}{%
@@ -35404,6 +35677,54 @@ end -- not --version
\LWR@hrefb%
}
% \end{macrocode}
+
+% A version which sanitizes both the \acro{URL} and the text.
+% Used by \cs{LWR@url}.
+% \changes{v0.913}{2023/10/04}{Improved \HTML\ sanitization.}
+% \begin{macrocode}
+\DeclareDocumentCommand{\LWR@hrefb@sanitized}{O{} m}{%
+ \LWR@ensuredoingapar%
+ \LWR@subhyperref{#2}%
+ \endgroup% restore catcodes
+% \end{macrocode}
+% Used by \cs{LWR@url} to sanitize the text argument before printing.
+% \begin{macrocode}
+ \LWR@subhyperreftext@sanitized% takes the following text as an argument
+}
+
+\newrobustcmd*{\LWR@href@sanitized}{%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@hrefb@sanitized%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@href@partsanitized} \oarg{options} \marg{URL} \marg{text}
+%
+% Create a link with accompanying text.
+% The accompanyting text is not sanitized,
+% for use internally with algorithmically derived tags.
+%
+% \changes{v0.43}{2017/10/31}{Made robust.}
+% \changes{v0.49}{2018/02/18}{Fix: Adapt to classes.}
+% \changes{v0.52}{2018/03/26}{Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
+% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
+% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
+% \begin{macrocode}
+\DeclareDocumentCommand{\LWR@hrefb@partsanitized}{O{} m}{%
+ \LWR@ensuredoingapar%
+ \LWR@subhyperref{#2}%
+ \endgroup% restore catcodes
+ \LWR@subhyperreftext@unsanitized% takes the following text as an argument
+}
+
+\newrobustcmd*{\LWR@href@partsanitized}{%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@hrefb@partsanitized%
+}
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\LWR@nolinkurl} \marg{URL}
@@ -35413,12 +35734,13 @@ end -- not --version
% \changes{v0.45}{2017/12/29}{Fix: Underscore in \URL.}
% \changes{v0.52}{2018/03/26}{Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
+% \changes{v0.913}{2023/10/01}{Improved \HTML\ sanitization.}
% \begin{macrocode}
\newcommand*{\LWR@nolinkurlb}[1]{%
\LWR@ensuredoingapar%
- \def\LWR@templink{#1}%
- \@onelevel@sanitize\LWR@templink%
- \LWR@templink%
+ \edef\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
+ \tmpb%
\endgroup%
}
@@ -35446,9 +35768,7 @@ end -- not --version
% \begin{macrocode}
\DeclareDocumentCommand{\LWR@urlb}{m}{%
\LWR@ensuredoingapar%
- \def\LWR@templink{#1}%
- \@onelevel@sanitize\LWR@templink%
- \LWR@href{\LWR@templink}{\LWR@templink}%
+ \LWR@href@sanitized{#1}{#1}%
\endgroup%
}
@@ -35471,8 +35791,11 @@ end -- not --version
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.913}{2023/11/25}{\bool{LWR@HTMLsanitize@tmpb@removebackslash} added.}
% \begin{macrocode}
\newcommand*{\LWR@subinlineimage}[6]{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\ifblank{#6}%
{\renewcommand*{\LWR@tempone}{}}%
{\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}%
@@ -35495,6 +35818,7 @@ end -- not --version
class=\textquotedbl#2\textquotedbl \LWR@orignewline
}%
}%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -37511,13 +37835,15 @@ end -- not --version
\let\&\LWR@origampersand%
% \end{macrocode}
% \changes{v0.72}{2019/05/24}{Use \cs{LWR@formatted} for \cs{bfseries}, etc.}
+% \changes{v0.013}{2023/12/09}{Added \cs{nobreakspace}.}
% \begin{macrocode}
\LetLtxMacro\em\LWR@origem%
\LetLtxMacro\normalfont\LWR@orignormalfont%
\let\sp\LWR@origsp%
\let\sb\LWR@origsb%
\LetLtxMacro\underline\LWR@origunderline%
- \let~\LWR@origtilde%
+ \LetLtxMacro~\LWR@origtilde%
+ \LetLtxMacro\nobreakspace\LWR@orignobreakspace%
% \end{macrocode}
%
% \cs{endtabular} must be restored to its original,
@@ -38491,6 +38817,7 @@ end -- not --version
{%
\LWR@traceinfo{LWR@subsingledollar: Mathjax}%
{%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\textbackslash(%
{%
% \end{macrocode}
@@ -38583,6 +38910,7 @@ end -- not --version
% \begin{macrocode}
{% intentional blank line:
+ \begingroup%
\IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{%
% \end{macrocode}
%
@@ -38597,6 +38925,7 @@ end -- not --version
% \changes{v0.903}{2021/12/18}{Improved math sanitization.}
% \begin{macrocode}
\InlineClass{hidden}{\LWR@syncnotenumbers}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\textbackslash[%
{%
\LWR@print@ttfamily%
@@ -38604,14 +38933,17 @@ end -- not --version
}%
\textbackslash]
\InlineClass{hidden}{\LWR@syncnotenames}%
- }{%
+ }% yes note
+ {% no note
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\textbackslash[%
{%
\LWR@print@ttfamily%
\LWR@HTMLsanitizedetokenized{\detokenize{#1}}%
}%
\textbackslash]
- }%
+ }% no note
+ \endgroup%
}% mathjax
% \end{macrocode}
@@ -38666,6 +38998,8 @@ end -- not --version
\protected\gdef\LWR@singledollar#1${%
\LWR@traceinfo{LWR@singledollar}%
\ifbool{mathjax}{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@subsingledollar*%
{% alt tag
\textbackslash( %
@@ -38674,6 +39008,7 @@ end -- not --version
}%
{singledollar}% add'l hashing
{#1}% contents
+ \endgroup%
}{% not mathjax
\LWR@subsingledollar*%
{% alt tag
@@ -38735,6 +39070,8 @@ end -- not --version
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}%
{%
\protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
@@ -38743,6 +39080,7 @@ end -- not --version
\relax%
\LWR@origensuredmath{#1}%
}%
+ \endgroup%
}{% SVG math
% \end{macrocode}
% If already inside a \env{lateximage} in math mode, continue as-is.
@@ -39034,7 +39372,7 @@ end -- not --version
\NewDocumentCommand{\LWR@addmathjax}{m +m}{%
% \end{macrocode}
% \begin{macrocode}
- \LWR@origtilde\LWR@orignewline
+ \LWR@orignobreakspace\LWR@orignewline
% \end{macrocode}
% Enclose the \MathJax\ environment inside printed ``\cs{(}'' and ``\cs{)}'' characters.
% Print the environment name and contents, sanitizing for \HTML\ special characters.
@@ -39060,6 +39398,7 @@ end -- not --version
% The environment contents and \cs{end}:
% \begin{macrocode}
\LWR@orignewline%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#2}}%
\LWR@orignewline%
\textbackslash{}end\{#1\}
@@ -39299,8 +39638,8 @@ end -- not --version
% \end{environment}
-% Remember the ``less'' version of \env{equation}, which uses \MathJax
-% and \attribute{alt} tags, but does not support complicated contents such as
+% Remember the ``less'' version of \env{equation}, which uses \MathJax\ and
+% \attribute{alt} tags, but does not support complicated contents such as
% some \TikZ\ expressions.
% \begin{macrocode}
\AtBeginDocument{
@@ -39410,7 +39749,7 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@beginhideamsmath}{
\LWR@stoppars
- \LWR@origtilde\LWR@orignewline
+ \LWR@orignobreakspace\LWR@orignewline
\LWR@htmlopencomment
\begingroup
@@ -39503,6 +39842,7 @@ end -- not --version
% \begin{macrocode}
\LWR@syncmathjax%
\boolfalse{LWR@amsmultline}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\ifbool{LWR@numbereqnarray}%
{%
% \end{macrocode}
@@ -40028,6 +40368,14 @@ end -- not --version
% \begin{macrocode}
\boolfalse{mathjax}%
% \end{macrocode}
+%
+% While inside a lateximage, do not use \HTML\ tags for verbatim content,
+% and do not sanitize \HTML\ tags for |<|, |>|, |&|, etc.
+% \begin{macrocode}
+ \boolfalse{LWR@verbtags}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@enable}%
+% \end{macrocode}
+%
% Be sure that are doing a paragraph:
% \begin{macrocode}
\LWR@ensuredoingapar%
@@ -42233,9 +42581,9 @@ color:\LWR@origpound\LWR@tempcolor%
{\InlineClass{textnormal}{#1}}%
{%
\InlineClass{%
- text\LWR@f@family\LWR@origtilde{}%
- text\LWR@f@series\LWR@origtilde{}%
- text\LWR@f@shape\LWR@origtilde{}%
+ text\LWR@f@family\LWR@orignobreakspace{}%
+ text\LWR@f@series\LWR@orignobreakspace{}%
+ text\LWR@f@shape\LWR@orignobreakspace{}%
text\LWR@f@shapecaps%
}%
{#1}%
@@ -42256,9 +42604,9 @@ color:\LWR@origpound\LWR@tempcolor%
\newenvironment*{LWR@blocktextcurrentfont}{%
\LWR@stoppars%
\BlockClass{%
- text\LWR@f@family\LWR@origtilde{}%
- text\LWR@f@series\LWR@origtilde{}%
- text\LWR@f@shape\LWR@origtilde{}%
+ text\LWR@f@family\LWR@orignobreakspace{}%
+ text\LWR@f@series\LWR@orignobreakspace{}%
+ text\LWR@f@shape\LWR@orignobreakspace{}%
text\LWR@f@shapecaps%
}%
}{\endBlockClass\LWR@startpars}
@@ -42675,6 +43023,19 @@ color:\LWR@origpound\LWR@tempcolor%
\begin{warpHTML}
% \end{macrocode}
%
+%
+% \DescribeBoolean{LWR@HTMLsanitize@nobreakspace}
+% Used to disable the |nbsp| entity inside verbatims \element{pre} sections,
+% but not inside inline verbatims where spacing must be preserved by \element{nbsp}.
+%
+% (\pkg{fvextra} used |~| which showed as \element{nbsp}.)
+% \changes{v0.913}{2023/12/16}{Disable \element{nbsp} inside verbatims.}
+% \begin{macrocode}
+\newbool{LWR@HTMLsanitize@nobreakspace}
+\booltrue{LWR@HTMLsanitize@nobreakspace}
+% \end{macrocode}
+%
+%
% \cs{,} and \cs{thinspace} may be redefined by other packages, so
% are redefined \cs{AtBeginDocument} here.
%
@@ -42685,19 +43046,44 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.61}{2018/09/23}{Spaces redefined \cs{AtBeginDocument}.}
% \changes{v0.88}{2020/07/03}{Added \cs{vdots}.}
% \changes{v0.906}{2022/06/10}{Used \cs{LWR@formatted} for more items.}
+% \changes{v0.913}{2023/12/09}{Added \cs{nobreakspace}.}
% \begin{macrocode}
\AtBeginDocument{%
+%
\renewrobustcmd*{\,}{\HTMLunicode{202f}}% HTML thin non-breakable space, not using LWR@formatted
+%
\newrobustcmd*{\LWR@HTML@thinspace}{\HTMLunicode{202f}}% HTML thin non-breakable space
\LWR@formatted{thinspace}
+%
\newrobustcmd*{\LWR@HTML@negthinspace}{\HTMLunicode{202f}} % HTML thin non-breakable space
\LWR@formatted{negthinspace}
-\renewrobustcmd*{~}{\HTMLentity{nbsp}}% cannot use \LWR@formatted
+% \end{macrocode}
+%
+% Cannot use \cs{LWR@formatted} for |~| or \cs{nobreakspace}.
+% \begin{macrocode}
+\renewrobustcmd*{~}{%
+ \ifbool{LWR@HTMLsanitize@nobreakspace}%
+ {\leavevmode\nobreak\HTMLentity{nbsp}}%
+ {\LWR@orignobreakspace}%
+}
+
+\LetLtxMacro\nobreakspace~
+% \end{macrocode}
+%
+% \cs{?-\string\nobreakspace} seems to be necessary for packages such as \pkg{ctexbook},
+% where this is used at the end of the document.
+% \begin{macrocode}
+\expandafter\LetLtxMacro\csname ?-\string\nobreakspace\endcsname~
+% \end{macrocode}
+%
+% \begin{macrocode}
\newrobustcmd*{\LWR@HTML@textellipsis}{\HTMLunicode{2026}}
\LWR@formatted{textellipsis}
+%
\newrobustcmd*{\LWR@HTML@vdots}{\HTMLunicode{22EE}}
\LWR@formatted{vdots}
-}
+%
+}% AtBeginDocument
% \end{macrocode}
%
% Direct-formatting font sizes are remembered for future use:
@@ -45787,7 +46173,7 @@ color:\LWR@origpound\LWR@tempcolor%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
- \LWR@addmathjax{#2}{\the\@envbody}
+ \LWR@addmathjax{#2}{\the\@envbody}%
}
{\LWR@amsmathenv@@after}
% \end{macrocode}
@@ -46384,6 +46770,42 @@ color:\LWR@origpound\LWR@tempcolor%
%
%
%
+% \iffalse
+%<*apxproof>
+% \fi
+%
+% \part{lwarp-apxproof.sty}
+%
+% \section{apxproof}
+%
+% \credits{Pierre Senellart}
+%
+% \DescribePackage{apxproof}
+% \pkg{apxproof} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.913}{2024/01/02}{\pkg{apxproof}: Added for \pkg{fancyvrb} changes.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{apxproof}[2022/10/14]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\xpatchcmd{\FVB@axp@VerbatimOut}
+ {\FV@Scan}
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
+ {}
+ {\LWR@patcherror{apxproof}{FVB@axp@VerbatimOut}}
+% \end{macrocode}
+%
+% \iffalse
+%</apxproof>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*ar>
@@ -46917,7 +47339,7 @@ color:\LWR@origpound\LWR@tempcolor%
% A file annotation becomes a reference:
% \begin{macrocode}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
- \LWR@href{#1}{\LWR@attachfile@appearance}%
+ \LWR@href@partsanitized{#1}{\LWR@attachfile@appearance}%
}
% \end{macrocode}
@@ -47015,7 +47437,7 @@ color:\LWR@origpound\LWR@tempcolor%
% A file annotation becomes a reference:
% \begin{macrocode}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
- \LWR@href{#1}{\LWR@attachfile@appearance}%
+ \LWR@href@partsanitized{#1}{\LWR@attachfile@appearance}%
}
% \end{macrocode}
%
@@ -49082,7 +49504,12 @@ color:\LWR@origpound\LWR@tempcolor%
\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
\LWR@ensuredoingapar%
\LWR@subhyperref{#2}%
- \LWR@subhyperreftext{#3}%
+% \end{macrocode}
+% If use \cs{LWR@subhyperreftext@sanitized} here,
+% some forms of text may not expand correctly, and thus break.
+% ^^A \LWR@subhyperreftext@sanitized% takes the following text as an argument
+% \begin{macrocode}
+ \LWR@subhyperreftext@unsanitized{#3}%
\endgroup% restore catcodes
}
@@ -49268,7 +49695,10 @@ color:\LWR@origpound\LWR@tempcolor%
\CustomizeMathJax{\require{bussproofs}}
\NewEnviron{LWR@HTML@prooftree}%
- {\LWR@doequation{\BODY}{prooftree}}%
+ {%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
+ \LWR@doequation{\BODY}{prooftree}%
+ }%
[\LWR@doendequation{prooftree}]
\LWR@formattedenv{prooftree}
}{% SVG HTML
@@ -49478,6 +49908,7 @@ s%
% \changes{v0.84}{2020/04/20}{\pkg{caption}: Non-width \cs{parbox}es.}
% \changes{v0.89}{2020/08/25}{\pkg{caption}: Adapt to v3.5.}
% \changes{v0.893}{2020/11/26}{\pkg{caption}: Updated date to v3.5g.}
+% \changes{v0.913}{2023/11/24}{\pkg{caption}: Updated to v3.6o.}
%
% \codehtml
%
@@ -49490,7 +49921,7 @@ s%
\typeout{instead of: \protect\usepackage[options]\protect{caption\protect}.}
\typeout{---}
-\LWR@ProvidesPackagePass{caption}[2020/10/26]
+\LWR@ProvidesPackagePass{caption}[2023/08/05]
% \end{macrocode}
%
% ^^A This could be given a permanent standardized name, then redefined by lwarp.
@@ -49500,7 +49931,7 @@ s%
\caption@iiibox{#1}{#2}{#3}%
% [\wd\@tempboxa]%
[]% lwarp
- [\captionbox@hj@default]%
+ [\captionbox@innerpos@default]%
% {\unhbox\@tempboxa}%
{{#4}}% lwarp
}
@@ -49524,7 +49955,7 @@ s%
% #2%
{\caption#4{#5}}%
% \captionbox@hrule
-% \csname caption@hj@#7\endcsname
+% \csname caption@justification@#7\endcsname
#8%
}%
}{%
@@ -49539,7 +49970,7 @@ s%
\parbox[b]{\linewidth}{% lwarp
#1\relax
\caption@setposition b%
-% \csname caption@hj@#7\endcsname
+% \csname caption@justification@#7\endcsname
#8%
% \captionbox@hrule
% #3
@@ -49633,11 +50064,12 @@ s%
%
% \changes{v0.89}{2020/08/25}{\pkg{caption3}: Split from \pkg{lwarp-caption}.}
% \changes{v0.893}{2020/11/26}{\pkg{caption3}: Updated date to v2.2e.}
+% \changes{v0.913}{2023/11/24}{\pkg{caption3}: Updated to v2.4d.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{caption3}[2020/10/21]
+\LWR@ProvidesPackagePass{caption3}[2023/07/31]
% \end{macrocode}
%
%
@@ -49659,10 +50091,25 @@ s%
% ^^A This could be factored out into a macro with a standard name
% ^^A which lwarp could nullify:
% \begin{macrocode}
-% \sbox\@tempboxa{#1}%
-% \ifdim\wd\@tempboxa=\z@
-% \caption@set{labelseparator}{none}%
-% \fi
+% \ifx\caption@fmt\@undefined\caption@format\fi
+% \let\caption@lfmt\caption@labelformat
+% \global\def\caption@tempa{gobbletwo}%
+% \global\def\caption@tempb{}%
+% \sbox\@tempboxa{%
+% \let\caption@ignorespaces\ignorespaces
+% \def\ignorespaces{%
+% \global\def\caption@tempb{two}% "gobble" -> "gobbletwo"
+% % if \ignorespaces is used addtionally
+% \caption@ignorespaces}%
+% #1%
+% {\global\let\caption@tempa\@undefined\aftergroup\@gobble}%
+% {\global\def\caption@tempa{gobble\caption@tempb}}}%
+% \ifdim\wd\@tempboxa=\z@
+% \gdef\caption@tempa{none}%
+% \fi
+% \ifx\caption@tempa\@undefined \else
+% \@expandtwoargs\caption@set{labelseparator}{\caption@tempa}%
+% \fi
\caption@ifempty{#2}{%
\caption@set{labelseparator}{none}%
\caption@set{textformat}{simple}%
@@ -53286,6 +53733,89 @@ name = \chemmacros_translate:n {scheme-name}
% \end{macrocode}
% \end{noindmacro}
+
+
+% \begin{noindmacro}{\rowc@l@rs} \oarg{cmds} \marg{startrow} \marg{odd color} \marg{even color}
+% \changes{v0.913}{2024/01/03}{\pkg{colortbl}: Moved row colors code from \pkg{xcolor}.}
+% \begin{macrocode}
+\newcommand*{\LWR@xcolortempcolor}{}
+
+\def\rowc@l@rs[#1]#2#3#4%
+{%
+ \rownum=1%
+ \@rowcolorstrue%
+ \@ifxempty{#3}%
+ {\def\@oddrowcolor{\@norowcolor}}%
+ {%
+ \convertcolorspec{named}{#3}{HTML}\LWR@xcolortempcolor%
+ \edef\@oddrowcolor{%
+ \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
+ }%
+ }%
+ \@ifxempty{#4}%
+ {\def\@evenrowcolor{\@norowcolor}}%
+ {%
+ \convertcolorspec{named}{#4}{HTML}\LWR@xcolortempcolor%
+ \edef\@evenrowcolor{%
+ \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
+ }%
+ }%
+ \if@rowcmd
+ \def\@rowcolors
+ {%
+% #1%
+ \if@rowcolors
+% \noalign{%
+ \relax\ifnum\rownum<#2\@norowcolor\else
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi%
+% }%
+ \fi%
+ }%
+ \else
+ \def\@rowcolors
+ {%
+ \if@rowcolors
+ \ifnum\rownum<#2%
+% \noalign{%
+ \@norowcolor
+% }
+ \else
+% #1%
+% \noalign{%
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi%
+% }%
+ \fi
+ \fi%
+ }%
+ \fi
+ \ignorespaces%
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
+% \begin{noindmacro}{\@norowcolor} Turns off color for this row.
+% \begin{macrocode}
+\def\@norowcolor{%
+ \renewcommand{\LWR@xcolorrowHTMLcolor}{}%
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
+
+% \begin{noindmacro}{\@rowc@lors} Executed at the end of each row.
+% \changes{v0.79}{2020/01/18}{\pkg{xcolor}: Fix: Nested \env{tabular}s.}
+% \begin{macrocode}
+\def\@rowc@lors{%
+% \noalign{%
+ \advance\rownum\@ne%
+% }%
+ \@rowcolors%
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+
+
% For \MathJax, use the \MathJax\ package.
% The unused macro options are ignored.
% \changes{v0.894}{2020/12/22}{\pkg{colortbl}: Added \MathJax\ emulation.}
@@ -54082,6 +54612,62 @@ name = \chemmacros_translate:n {scheme-name}
%
%
%
+%
+% \iffalse
+%<*doipubmed>
+% \fi
+%
+% \part{lwarp-doipubmed.sty}
+%
+% \section{doipubmed}
+%
+% \credits{Nicola Talbot}
+%
+% \DescribePackage{doipubmed}
+% \pkg{doipubmed} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.913}{2023/11/23}{\pkg{doipubmed}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{doipubmed}[2007/08/20]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\doi}[1]{%
+\def\@doi@code{}%
+\@doi@linksubs#1\#\@@\@doi@code
+\@onelevel@sanitize{\@doi@code}%
+\def\@doi@text{}%
+\@doi@textsubs#1\@nil\@@\@doi@text
+\xpretocmd{\@doi@code}{http://dx.doi.org/}%
+\href\expandafter{\@doi@code}{\doitext{\@doi@text}}}
+% \end{macrocode}
+%
+% Must not modify catcodes before using \cs{url}:
+% \begin{macrocode}
+\DeclareDocumentCommand{\LWR@citeurlb}{m}{%
+ \LWR@ensuredoingapar%
+ \textless%
+ \LWR@href@sanitized{#1}{#1}%
+ \textgreater%
+ \endgroup%
+}
+
+\renewrobustcmd*{\citeurl}{%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@citeurlb%
+}
+% \end{macrocode}
+%
+% \iffalse
+%</doipubmed>
+% \fi
+%
+%
+%
% \iffalse
%<*DotArrow>
% \fi
@@ -56525,7 +57111,7 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.902}{2021/09/29}{\pkg{fancybox}: Improved footnote par tags.}
% \begin{macrocode}
\def\V@@@footnotetext{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}\LWR@orignewline%
\strut\egroup%
}
@@ -56598,7 +57184,7 @@ name = \chemmacros_translate:n {scheme-name}
% This is a tabular, and does not use \cs{item}.
%
% \begin{noindmacro}{Btrivlist} \marg{l/c/r} \oarg{t/c/b}
-% \changes{v0.73}{2019/06/24}{\pkg{fancyvrb}: \env{Btrivlist}: Fixed paragraph tags.}
+% \changes{v0.73}{2019/06/24}{\pkg{fancybox}: \env{Btrivlist}: Fixed paragraph tags.}
% \begin{macrocode}
\RenewDocumentEnvironment{Btrivlist}{m o}
{%
@@ -56716,7 +57302,44 @@ name = \chemmacros_translate:n {scheme-name}
%
% Low-level patches for \env{UseVerbatim} and friends:
%
-% \begin{macrocode}
+% \changes{v0.903}{2024/01/03}{\pkg{fancybox}: Sanitize verbatim.}
+% \begin{macrocode}
+\def\Verbatim@List#1{%
+ \if@minipage\else\vskip\parskip\fi
+ \leftskip\@totalleftmargin
+ \@rightskip\@flushglue \rightskip\@rightskip
+ \parindent\z@
+ \parskip\z@
+ \parfillskip\@flushglue
+ \hfuzz\VerbatimFuzz\relax
+ \@@par
+ \global\@inlabelfalse %Prevents vspace from being inserted when
+ \Verbatim@Prep %first line exceeds \hsize.
+% #1%
+ \expandafter\def\expandafter\tmpb\expandafter{#1}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \tmpb% lwarp
+ \Verbatim@Par}%
+
+\def\Verbatim@@Input{%
+ \let\protect\noexpand
+ \LetLtxMacro\tmpb\The@Verbatim% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \edef\The@Verbatim{%
+ \noexpand\Every@VerbatimLine
+% \The@Verbatim
+ \tmpb% lwarp
+ \ifeof\Verbatim@Infile\else\noexpand\Verbatim@Par\fi}%
+ \let\protect\relax
+ \The@Verbatim
+ \ifeof\Verbatim@Infile\else
+ \let\The@Verbatim\The@GVerbatim
+ \def\The@GVerbatim{}\Verbatim@NextLine
+ \expandafter\Verbatim@@Input
+ \fi}%
+
+
+
\let\LWRFB@UseVerbatim\UseVerbatim
\renewcommand*{\UseVerbatim}[1]{%
\LWR@atbeginverbatim{Verbatim}%
@@ -57020,17 +57643,21 @@ name = \chemmacros_translate:n {scheme-name}
% The label is placed inside a \element{div} of class \attribute{fancyvrblabel}.
% The verbatim text itself is placed inside a \element{div} of class \attribute{verbatim}.
%
+% For an inline \cs{Verb}, the verbatim is placee inside a \element{span}
+% of class \attribute{fancyvrb}.
+%
% \limitsverbatimfootnotes
%
% \changes{v0.34}{2017/07/27}{\pkg{fancyvrb}: Added, no longer required.}
% \changes{v0.45}{2018/01/07}{\pkg{fancyvrb}: Improvements.}
% \changes{v0.52}{2018/03/29}{\pkg{fancyvrb}: Initial support for \cs{VerbatimFootnotes}.}
+% \changes{v0.913}{2023/12/04}{\pkg{fancyvrb}: Updated to v4.5b.}
%
%
% \begin{macrocode}
\AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec
-\LWR@ProvidesPackagePass{fancyvrb}[2008/02/07]
+\LWR@ProvidesPackagePass{fancyvrb}[2023/11/06]
% \end{macrocode}
%
% Initial default patch for fancyvrb:
@@ -57038,13 +57665,303 @@ name = \chemmacros_translate:n {scheme-name}
\fvset{frame=none}%
% \end{macrocode}
%
-% After the preamble is loaded, after any patches to \env{Verbatim}:
+
+% Gobble does not work with \HTML\ sanitization,
+% so if gobbling is non-zero then turn off \HTML\ sanitization.
% \begin{macrocode}
-\AfterEndPreamble{
-\LWR@traceinfo{Patching fancyvrb.}
+\define@key{FV}{gobble}{%
+ \@tempcnta=#1\relax
+ \ifnum\@tempcnta<\@ne
+ \let\FV@Gobble\relax
+ \else
+ \ifnum\@tempcnta>9
+ \FV@Error{gobble parameter must be less than 10}\FV@eha
+ \else
+ \renewcommand{\FV@@@@Gobble}[\@tempcnta]{}%
+ \let\FV@Gobble\FV@@Gobble%
+ \boolfalse{LWR@HTMLsanitize@tmpb@enable}% lwarp
+ \fi
+ \fi}
+% \end{macrocode}
+
+
+
+% \begin{noindmacro}{\FancyVerbSpace}
+% Force the use of a vibible space instead of an empty box.
+% \changes{v0.913}{2023/12/04}{\pkg{fancyvrb}: Fixed visible space from kernel change.}
+% \begin{macrocode}
+\ifxetexorluatex
+\def\LWR@HTML@FancyVerbSpace{\textvisiblespace}
+\else
+\@ifundefined{verbvisiblespace}%
+ {%
+ \@ifundefined{textvisiblespace}%
+ {\begingroup\catcode`\ =12 \gdef\LWR@HTML@FancyVerbSpace{\tt }\endgroup}
+ {\def\LWR@HTML@FancyVerbSpace{\textvisiblespace}}
+ }%
+ {\def\LWR@HTML@FancyVerbSpace{\verbvisiblespace}}
+\fi
+\LWR@formatted{FancyVerbSpace}
+% \end{macrocode}
+% \end{noindmacro}
+
+
+% \begin{noindmacro}{\FancyVerbTab}
+% Set the visible tab.
+% Unicode |240B| (SYMBOL FOR HORIZONTAL TABULATION)
+% and |21E5| (RIGHTWARDS ARROW TO BAR)
+% both gave unindended new lines at each tab,
+% so a simple pipe character is used instead.
+%
+% For the print mode, the \pkg{fancyvrb} definition does not copy,
+% so a simplified version is used.
+% \changes{v0.913}{2023/12/04}{\pkg{fancyvrb}: Set visible tab character.}
+% \begin{macrocode}
+\def\LWR@print@FancyVerbTab{|}
+\def\LWR@HTML@FancyVerbTab{|}%
+\LWR@formatted{FancyVerbTab}
+% \end{macrocode}
+% \end{noindmacro}
+
+
+% \begin{macrocode}
+\fvset{tabsize=8,showtabs=false}
+% \end{macrocode}
+
+
+%
+% \begin{noindmacro}{\FV@CatCodes}
+% \begin{macrocode}
+\def\FV@CatCodes{%
+ \let\do\@makeother\dospecials % The usual stuff.
+ \FV@ActiveWhiteSpace % See below.
+ \FV@FontScanPrep % See below.
+ \FV@CatCodesHook % A style hook.
+ \FancyVerbCodes % A user-defined hook.
+ \catcode`\>=12% % lwarp
+ \catcode`\<=12% % lwarp
+}
% \end{macrocode}
+% \end{noindmacro}
+%
%
+% \begin{noindmacro}{\FV@GetLine}
+% Added the catcode changes for |<| and|>| to avoid
+% the effect of \cs{@noligs} for these characters.
+% They were being made active and thus would not be sensed by the
+% search/replace to sanitize.
%
+% This code is sensitive to the use of |%|, and for some reason does not work
+% \watchout
+% if \cs{expandafter} immediately follows the |<| catcode change.
+% \changes{v0.913}{2023/10/04}{\pkg{fancyvrb}: Sanitize \HTML.}
+% \begin{macrocode}
+\def\FV@GetLine{%
+ \@noligs%
+ \catcode`\>=12% lwarp, and the next line as well
+% for some reason, there must not be a % after the following 12:
+ \catcode`\<=12
+%
+ \expandafter\FV@CheckScan\FancyVerbGetLine%
+}
+% \end{macrocode}
+
+% Modified to sanitize \HTML.
+% \cs{LWR@HTMLsanitize@tmpb} is included in \cs{FV@Line},
+% so it will adjust if used inside an \env{lateximage}.
+% \changes{v0.913}{2023/10/11}{\pkg{fancyvrb}: Sanitize \HTML.}
+% \begin{macrocode}
+\begingroup
+\catcode`\^^M=\active%
+\gdef\FancyVerbGetLine#1^^M{%
+ \@nil%
+ \FV@CheckEnd{#1}%
+ \ifx\@tempa\FV@EnvironName% % True if end is found
+ \ifx\@tempb\FV@@@CheckEnd\else\FV@BadEndError\fi%
+ \let\next\FV@EndScanning%
+ \else%
+ \ifbool{LWR@HTMLsanitize@tmpb@enable}% lwarp
+ {\def\FV@Line{\LWR@HTMLsanitize@use@tmpb{#1}}}% lwarp
+ {\def\FV@Line{#1}}% lwarp
+ \def\next{\FV@PreProcessLine\FV@GetLine}%
+ \fi%
+ \next}%
+\endgroup
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+%
+% \begin{noindmacro}{\FV@List} \marg{R/L margin 0/1}
+%
+% Modified to always allow line wrapping because added \HTML\ tags may
+% make run off the end of the line in the \PDF\ output file before conversion to \HTML.
+% \begin{macrocode}
+\def\FV@List#1{%
+ \begingroup
+ \FV@UseKeyValues
+ \FV@LeaveVMode
+ \if@inlabel\else\setbox\@labels=\box\voidb@x\fi
+ \FV@ListNesting{#1}%
+ \FV@ListParameterHook
+ \FV@ListVSpace
+ \FV@SetLineWidth
+ \FV@InterLinePenalty
+% \let\FV@ProcessLine\FV@ListProcessLine@i
+ \let\FV@ProcessLine\FV@ListProcessLine% lwarp
+ \FV@CatCodes
+ \FV@FormattingPrep
+ \FV@ObeyTabsInit
+ \FV@BeginListFrame}
+% \end{macrocode}
+% \end{noindmacro}
+%
+% \begin{noindmacro}{\FV@ListProcessLine} \marg{text}
+%
+% Processes each line, adding optional line numbers.
+% Modified to always allow line wrapping because added \HTML\ tags may
+% make run off the end of the line in the \PDF\ output file before conversion to \HTML.
+% \begin{macrocode}
+\def\FV@ListProcessLine#1{%
+ \hbox to \hsize{%
+% \kern\leftmargin
+ \hbox to \VerbatimHTMLWidth {%
+ \ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
+ \FV@LeftListNumber%
+% \FV@LeftListFrame
+ \FancyVerbFormatLine{#1}%
+ \hss%
+% \FV@RightListFrame
+ \FV@RightListNumber%
+ }%
+ \hss% required to avoid underfull hboxes
+}
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FVC@SaveVerb} \marg{name} \marg{character}
+%
+% Modified to sanitize \HTML\ when stored.
+% Sanitizing on use would be too late to adjust catcodes.
+% \cs{LWR@HTMLsanitize@tmpb} is included in the saved macro, so
+% if inside a \env{lateximage}, \cs{LWR@HTMLsanitize@tmp} does nothing.
+% \changes{v0.913}{2023/10/11}{\pkg{fancyvrb}: Sanitize \HTML.}
+% \begin{macrocode}
+\begingroup
+\catcode`\^^M=\active%
+\gdef\FVC@SaveVerb#1#2{%
+ \@namedef{FV@SV@#1}{}%
+ \begingroup%
+ \FV@UseKeyValues%
+ \FV@CatCodes%
+ \outer\def^^M{\FV@EOL}%
+ \global\let\@tempg\FancyVerbAfterSave%
+ \catcode`#2=12%
+ \def\@tempa{\def\FancyVerbGetVerb####1####2}%
+% \expandafter\@tempa\string#2{\endgroup\@namedef{FV@SV@#1}{##2}\@tempg}%
+ \expandafter\@tempa\string#2{%
+ \endgroup%
+ \@namedef{FV@SV@#1}{%
+% ##2%
+ \LWR@HTMLsanitize@use@tmpb{##2}% lwarp
+ }\@tempg%
+ }%
+ \FancyVerbGetVerb\FV@EOL}%
+\endgroup
+% \end{macrocode}
+% \end{noindmacro}
+
+
+% \begin{noindmacro}{\FV@UseVerb} \marg{macro}
+%
+% Adds a \element{span}.
+% \begin{macrocode}
+\def\FV@UseVerb#1{%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \mbox{\FV@UseKeyValues\FV@FormattingPrep#1}%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+
+
+%
+%
+% \begin{noindmacro}{\FVC@Verb} \marg{character}
+%
+% Modified to sanitize \HTML.
+% \changes{v0.913}{2023/10/04}{\pkg{fancyvrb}: Sanitize \HTML.}
+% \begin{macrocode}
+\begingroup
+\catcode`\^^M=\active%
+\gdef\FVC@Verb#1{%
+ \begingroup%
+ \FV@UseKeyValues%
+ \FV@FormattingPrep%
+ \FV@CatCodes%
+ \outer\def^^M{}%
+ \catcode`#1=12%
+ \def\@tempa{\def\FancyVerbGetVerb####1####2}%
+ \expandafter\@tempa\string#1{%
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}% lwarp
+ \def\tmpb{##2}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \mbox{\tmpb}% lwarp
+ \LWR@htmltag{/span}% lwarp
+ }% lwarp
+ {\mbox{##2}}%
+ \endgroup%
+ }%
+ \FancyVerbGetVerb\FV@EOL%
+}%
+\endgroup
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+%
+% \begin{noindmacro}{\FV@ReadLine}
+% Modified to sanitize \HTML.
+% \changes{v0.913}{2023/10/08}{\pkg{fancyvrb}: Sanitize \HTML.}
+% \begin{macrocode}
+\begingroup
+\catcode`\^^M=\active
+\gdef\FV@ReadLine{%
+ \ifeof\FV@InFile\else
+% \immediate\read\FV@InFile to\@tempa%
+% \expandafter\FV@@ReadLine\@tempa^^M\relax^^M\@nil%
+ \immediate\read\FV@InFile to\tmpb%
+ \LWR@HTMLsanitize@tmpb%
+ \expandafter\FV@@ReadLine\tmpb^^M\relax^^M\@nil%
+ \fi}
+\endgroup
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+% \begin{noindmacro}{\LWR@FVstyle} Holds the style of the verbatim.
+% \begin{macrocode}
+\newcommand*{\LWR@FVstyle}{}
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+% After the preamble is loaded, after any patches to \env{Verbatim},
+% such as by \pkg{fvextra}:
+% \begin{macrocode}
+\AfterEndPreamble{
+
+\LWR@traceinfo{Patching fancyvrb.}
+% \end{macrocode}
+
% \begin{noindmacro}{\VerbatimFootnotes}
% Patched to use the new version.
% \begin{macrocode}
@@ -57090,8 +58007,19 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{macrocode}
\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
% \end{macrocode}
+%
+% Verbatim tags and \HTML\ sanitization will have been turned off
+% inside a \env{lateximage}, such as in \SVG\ math,
+% so turn them on here so they will be active in the \HTML\ footnotes.
+% \changes{v0.913}{2023/12/09}{\pkg{fancyvrb}: Improved \HTML\ sanitization.}
+% \begin{macrocode}
+ \booltrue{LWR@verbtags}%
+ \booltrue{LWR@HTMLsanitize@tmpb@enable}%
+% \end{macrocode}
+
+
% Use paragraph tags if in a tabular data cell or a \env{lateximage}:
-% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
+% \changes{v0.66}{2019/02/02}{\pkg{fancyvrb}: Improved \HTML\ formatting.}
% \changes{v0.902}{2021/09/29}{\pkg{fancyvrb}: Improved footnote par tags.}
% \begin{macrocode}
\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline%
@@ -57118,10 +58046,11 @@ name = \chemmacros_translate:n {scheme-name}
% \end{noindmacro}
%
% \begin{noindmacro}{\V@@@footnotetext}
+% Improves \element{par}.
% \changes{v0.902}{2021/09/29}{\pkg{fancyvrb}: Improved footnote par tags.}
% \begin{macrocode}
\def\V@@@footnotetext{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}\LWR@orignewline%
\strut\egroup%
}
@@ -57129,76 +58058,116 @@ name = \chemmacros_translate:n {scheme-name}
% \end{noindmacro}
%
%
+% \begin{noindmacro}{\FVB@Verbatim}
+% \begin{noindmacro}{\FVB@LVerbatim}
+% Prevents unexpected page break in the \PDF\ output before \HTML\ conversion.
% \changes{v0.45}{2018/01/07}{\pkg{fancyvrb}: Improvements.}
% \begin{macrocode}
\preto\FVB@Verbatim{\LWR@forcenewpage}
\preto\FVB@LVerbatim{\LWR@forcenewpage}
% \preto\FVB@BVerbatim{\LWR@forcenewpage}% Fails, so done below.
% \end{macrocode}
+% \end{noindmacro}
+% \end{noindmacro}
+%
%
% Simplified to remove \PDF\ formatting:
% \changes{v0.45}{2018/01/07}{\pkg{fancyvrb}: Improvements.}
% \begin{macrocode}
-\def\FV@BeginListFrame@Single{%
+\def\LWR@HTML@FV@BeginListFrame@Single{%
\FV@SingleFrameLine{\z@}%
}
+\LWR@formatted{FV@BeginListFrame@Single}
-\def\FV@EndListFrame@Single{%
+\def\LWR@HTML@FV@EndListFrame@Single{%
\FV@SingleFrameLine{\@ne}%
}
+\LWR@formatted{FV@EndListFrame@Single}
-\def\FV@BeginListFrame@Lines{%
+\def\LWR@HTML@FV@BeginListFrame@Lines{%
\FV@SingleFrameLine{\z@}%
}
+\LWR@formatted{FV@BeginListFrame@Lines}
-\def\FV@EndListFrame@Lines{%
+\def\LWR@HTML@FV@EndListFrame@Lines{%
\FV@SingleFrameLine{\@ne}%
}
+\LWR@formatted{FV@EndListFrame@Lines}
-\renewcommand*{\FV@SingleFrameSep}{}
+\newcommand*{\LWR@HTML@FV@SingleFrameSep}{}%
+\LWR@formatted{FV@SingleFrameSep}
% \end{macrocode}
%
-% Adds \HTML\ formatting:
-% \changes{v0.891}{2020/09/12}{\pkg{fancyvrb}: Fix: \env{BVerbatim} with labels.}
-% \begin{macrocode}
-\def\FV@BUseVerbatim#1{%
- \FV@BVerbatimBegin#1\FV@BVerbatimEnd%
-}
-% \end{macrocode}
-% \begin{macro}{\LWR@FVstyle} Holds the style of the verbatim.
-% \begin{macrocode}
-\newcommand*{\LWR@FVstyle}{}
-% \end{macrocode}
-% \end{macro}
%
% The following patches to \env{Verbatim} are executed at the
% start and end of the environment, depending on the choice of |frame|.
-% Original code is from the \pkg{fancyvrb} package.
+%
+% \begin{noindmacro}{\LWR@fvstartnone}
+% Wraps label in a \element{div} of class \attribute{fancyvrblabel}.
% \changes{v0.73}{2019/06/26}{\pkg{fancyvrb}: Fix: Nested \element{div}/\element{pre}.}
-% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
+% \changes{v0.895}{2021/01/14}{\pkg{fancyvrb}: Improved \HTML\ quotes.}
% \begin{macrocode}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
% \hbox to\z@{
-\BlockClass[\LWR@FVstyle]{fancyvrb}
+% \end{macrocode}
+%
+% If the current text sytle is empty, do not print an \HTML\ style.
+% \changes{v0.913}{2023/12/04}{\pkg{fancyvrb}: No style if empty.}
+% \begin{macrocode}
+ \ifdefstring{\LWR@FVstyle}{\LWR@currenttextcolorstyle}%
+ {%
+ \LWR@findcurrenttextcolor%
+ \ifdefstring{\LWR@tempcolor}{000000}%
+ {\BlockClass{fancyvrb}}%
+ {\BlockClass[\LWR@FVstyle]{fancyvrb}}%
+ }%
+ {%
+ \BlockClass[\LWR@FVstyle]{fancyvrb}%
+ }%
+% \BlockClass[\LWR@FVstyle]{fancyvrb}%
+% \end{macrocode}
+%
+% \changes{v0.913}{2023/12/04}{\pkg{fancyvrb}: Color style.}
+% \begin{macrocode}
\LWR@stoppars
\ifx\FV@LabelPositionTopLine\relax\else
\ifx\FV@LabelBegin\relax\else
\FancyVerbRuleColor{\LWR@FVfindbordercolor}
- \LWR@htmltagc{%
- div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
- style=\textquotedbl{}color: \LWR@origpound\LWR@tempcolor\textquotedbl%
- }
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@findcurrenttextcolor%
+ \LWR@htmltagc{% lwarp
+ div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
+ style=\textquotedbl{}%
+ color: \LWR@origpound\LWR@tempcolor%
+ \textquotedbl%
+ }%
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
\LWR@print@textrm{\FV@LabelBegin}% \textrm preserves emdash
- \LWR@htmltagc{/div}\LWR@orignewline%
+ \LWR@orignewline% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@htmltagc{/div}% lwarp
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
\fi
\fi
\LWR@atbeginverbatim{verbatim}%
-% }%
+% }% hbox
}
+% \end{macrocode}
+% \end{noindmacro}
+% \begin{noindmacro}{\LWR@fvendnone}
+% Wraps label in a \element{div} of class \attribute{fancyvrblabel}.
+% \changes{v0.913}{2023/12/04}{\pkg{fancyvrb}: Color style.}
+% \begin{macrocode}
\newcommand*{\LWR@fvendnone}{%
\LWR@traceinfo{fvendnone}%
% \hbox to\z@{
@@ -57206,18 +58175,36 @@ name = \chemmacros_translate:n {scheme-name}
\LWR@stoppars%
\ifx\FV@LabelPositionBottomLine\relax\else
\ifx\FV@LabelEnd\relax\else
- \FancyVerbRuleColor{\LWR@FVfindbordercolor}
- \LWR@htmltagc{%
- div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
- style=\textquotedbl{}color: \LWR@origpound\LWR@tempcolor\textquotedbl%
- }
- \LWR@print@textrm{\FV@LabelEnd}
- \LWR@htmltagc{/div}\LWR@orignewline%
+ \FancyVerbRuleColor{\LWR@FVfindbordercolor}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@findcurrenttextcolor%
+ \LWR@htmltagc{% lwarp
+ div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
+ style=\textquotedbl{}%
+ color: \LWR@origpound\LWR@tempcolor%
+ \textquotedbl%
+ }%
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
+ \LWR@print@textrm{\FV@LabelEnd}% lwarp
+ \LWR@orignewline% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@htmltagc{/div}% lwarp
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
\fi
\fi
-\endBlockClass
+\endBlockClass% lwarp
+% }% hbox
}
+% \end{macrocode}
+% \end{noindmacro}
+% \begin{macrocode}
\newcommand*{\LWR@fvstartsingle}{%
\LWR@traceinfo{fvstartsingle}%
\LWR@fvstartnone%
@@ -57248,7 +58235,6 @@ name = \chemmacros_translate:n {scheme-name}
%
% The following patches select the start/left/right/end
% behaviors depending on |frame|.
-% Original code is from the \pkg{fancyvrb} package.
% \begin{macrocode}
\newcommand*{\LWR@FVfindbordercolor}{%
\FancyVerbRuleColor%
@@ -57264,16 +58250,17 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt % space
solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
}
-\def\FV@Frame@none{%
+\def\LWR@HTML@FV@Frame@none{%
\renewcommand*{\LWR@FVstyle}{\LWR@currenttextcolorstyle}%
\let\FV@BeginListFrame\LWR@fvstartnone%
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
+\LWR@formatted{FV@Frame@none}
\FV@Frame@none% default values
-\def\FV@Frame@single{%
+\def\LWR@HTML@FV@Frame@single{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{}%
@@ -57282,8 +58269,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\FV@LeftListFrame@Single%
\let\FV@RightListFrame\FV@RightListFrame@Single%
\let\FV@EndListFrame\LWR@fvendsingle}
+\LWR@formatted{FV@Frame@single}
-\def\FV@Frame@lines{%
+\def\LWR@HTML@FV@Frame@lines{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-top}%
@@ -57294,8 +58282,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendline}
+\LWR@formatted{FV@Frame@lines}
-\def\FV@Frame@topline{%
+\def\LWR@HTML@FV@Frame@topline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-top}%
@@ -57304,8 +58293,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
+\LWR@formatted{FV@Frame@topline}
-\def\FV@Frame@bottomline{%
+\def\LWR@HTML@FV@Frame@bottomline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-bottom}%
@@ -57314,20 +58304,26 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendline}
+\LWR@formatted{FV@Frame@bottomline}
% \end{macrocode}
%
-% Seems to be required in some situations:
+% Seems to be required in some situations.
+% Is not \cs{LWR@formatted} because it is defined as needed.
% \changes{v0.892}{2020/10/06}{\pkg{fancyvrb}: Provided \cs{FV@FrameFillLine}.}
% \begin{macrocode}
-\def\FV@FrameFillLine{}%
+\def\FV@FrameFillLine{}
% \end{macrocode}
+%
% \begin{macrocode}
-\def\FV@Frame@leftline{%
+\def\LWR@HTML@FV@Frame@leftline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-left}%
}%
-% To define the \FV@FrameFillLine macro (from \FV@BeginListFrame)
+% \end{macrocode}
+%
+% To define the \cs{FV@FrameFillLine} macro (from \cs{FV@BeginListFrame})
+% \begin{macrocode}
\ifx\FancyVerbFillColor\relax%
\let\FV@FrameFillLine\relax%
\else%
@@ -57341,13 +58337,14 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\FV@LeftListFrame@Single%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
+\LWR@formatted{FV@Frame@leftline}
% \end{macrocode}
%
+% \begin{noindmacro}{\FV@SingleFrameLine}
% Adds the optional label to the top and bottom edges.
-% Original code is from the \pkg{fancyvrb} package.
% \changes{v0.73}{2019/06/26}{\pkg{fancyvrb}: Fix: Nested \element{div}/\element{pre}.}
% \begin{macrocode}
-\def\FV@SingleFrameLine#1{%
+\def\LWR@HTML@FV@SingleFrameLine#1{%
% \hbox to\z@{%
% \kern\leftmargin
\ifnum#1=\z@\relax
@@ -57373,54 +58370,19 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \hss
% }
}
+\LWR@formatted{FV@SingleFrameLine}
% \end{macrocode}
+% \end{noindmacro}
%
-% Processes each line, adding optional line numbers.
-% Original code is from the \pkg{fancyvrb} package.
-% \begin{macrocode}
-\def\FV@ListProcessLine#1{%
- \hbox to \hsize{%
-% \kern\leftmargin
- \hbox to \VerbatimHTMLWidth {%
- \ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
- \FV@LeftListNumber%
-% \FV@LeftListFrame
- \FancyVerbFormatLine{#1}%
- \hss%
-% \FV@RightListFrame
- \FV@RightListNumber%
- }%
- \hss% required to avoid underfull hboxes
-}
-}
-% \end{macrocode}
-% \changes{v0.892}{2020/10/05}{\pkg{fancyvrb}: Adapted to \pkg{fvextra}.}
-% \begin{macrocode}
-\def\FV@ListProcessLine@i#1{%
-% \hbox{%
- \ifvoid\@labels\else
- \hbox to \z@{\kern\@totalleftmargin\box\@labels\hss}%
- \fi
- \FV@ListProcessLine{#1}%
-% }%
-% \let\FV@ProcessLine\FV@ListProcessLine@ii%
-}
-% \end{macrocode}
-
-% \changes{v0.892}{2020/10/05}{\pkg{fancyvrb}: Adapted to \pkg{fvextra}.}
-% \begin{macrocode}
-\def\FV@ListProcessLastLine{}
-% \end{macrocode}
-
-% \begin{environment}{BVerbatim}
+% \begin{noindenvironment}{BVerbatim}
+% Adds \pkg{lwarp} verbatim patches.
% \changes{v0.891}{2020/09/12}{\pkg{fancyvrb}: Fix: \env{BVerbatim} with labels.}
% \begin{macrocode}
-
\xpretocmd{\FV@BeginVBox}
{%
- \LWR@forcenewpage% instead of \preto
+ \LWR@forcenewpage%
\LWR@atbeginverbatim{bverbatim}%
}
{}
@@ -57433,13 +58395,34 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
{}
{\LWR@patcherror{fancyvrb}{FV@EndVBox}}
% \end{macrocode}
-% \end{environment}
+% \end{noindenvironment}
% End of the modifications to make at the end of the preamble:
% \begin{macrocode}
} % \AfterEndPreamble
% \end{macrocode}
+
+
+% \begin{macrocode}
+\def\FVB@VerbatimOut#1{%
+ \@bsphack
+ \begingroup
+ \FV@UseKeyValues
+ \FV@DefineWhiteSpace
+ \def\FV@Space{\space}%
+ \FV@DefineTabOut
+ \def\FV@ProcessLine{\immediate\write\FV@OutFile}%
+ \immediate\openout\FV@OutFile #1\relax
+ \let\FV@FontScanPrep\relax
+%% DG/SR modification begin - May. 18, 1998 (to avoid problems with ligatures)
+ \let\@noligs\relax
+%% DG/SR modification end
+ \boolfalse{LWR@HTMLsanitize@tmpb@enable}% lwarp
+ \FV@Scan}
+% \end{macrocode}
+
+
% \iffalse
%</fancyvrb>
% \fi
@@ -59292,9 +60275,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \let\fn@endnote\color@endgroup% *** conflicts with lwarp
\def\fn@endnote{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}\LWR@orignewline%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
}
% \end{macrocode}
%
@@ -59319,7 +60302,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{macrocode}
\def\fn@endfntext{%
\fn@postfntext%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
\LWR@orignewline%
\egroup%
@@ -60106,46 +61089,44 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
% \changes{v0.892}{2020/10/05}{\pkg{fvextra}: Added.}
% \changes{v0.910}{2022/12/15}{\pkg{fvextra}: Updated to v1.5.}
+% \changes{v0.913}{2023/12/05}{\pkg{fvextra}: Updated to v1.6.1.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{fvextra}[2022/11/30]
+\LWR@ProvidesPackagePass{fvextra}[2023/11/28]
% \end{macrocode}
%
-% Ignored are \optn{highlight},
-% \optn{showtabs}, \optn{obeytabs}, \optn{tab}, \optn{tabcolor}.
-% Also ignored are all options regarding line breaking
-% except \optn{breaklines}, which is emulated as true.
-%
-% \optn{tabsize} is honored.
-%
% If line numbers on the right side are used along with \optn{breaklines},
% the line numbers will not be aligned.
% \begin{macrocode}
\define@booleankey{FV}{obeytabs}%
% {\let\FV@ObeyTabsInit\FV@@ObeyTabsInit}%
+ {\let\FV@ObeyTabsInit\relax}% lwarp
{\let\FV@ObeyTabsInit\relax}
- {\let\FV@ObeyTabsInit\relax}
-
-\define@key{FV}{tabcolor}%
- {}
+% \end{macrocode}
-\define@key{FV}{tab}{}
+% \optn{tabcolor} causes extra \HTML\ tags, destroying the verbatim text alignment,
+% so \optn{tabcolor} is ignored.
+% \begin{macrocode}
+\define@key{FV}{tabcolor}{}%
+% \end{macrocode}
+% \changes{v0.910}{2023/12/04}{\pkg{fvextra}: Improved tabs.}
+% \begin{macrocode}
\define@booleankey{FV}{showtabs}%
-% {\def\FV@TabChar{\FV@TabColor{\FancyVerbTab}}}%
- {\let\FV@TabChar\relax}
+ {\def\FV@TabChar{\FV@TabColor{\FancyVerbTab}}}%
{\let\FV@TabChar\relax}
\newbool{LWR@FV@breaklines}
\define@booleankey{FV}{breaklines}%
- {\boolfalse{FV@breaklines}
- \booltrue{LWR@FV@breaklines}
- \let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}
- {\boolfalse{FV@breaklines}
- \boolfalse{LWR@FV@breaklines}
+ {\boolfalse{FV@breaklines}%
+ \booltrue{LWR@FV@breaklines}% lwarp
+% \let\FV@ListProcessLine\FV@ListProcessLine@Break}%
+ \let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}% lwarp
+ {\boolfalse{FV@breaklines}%
+ \boolfalse{LWR@FV@breaklines}% lwarp
\let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}
% \fvset{breaklines}
@@ -60175,7 +61156,52 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\define@key{FV}{breaksymbolright}{\def\FancyVerbBreakSymbolRight{}}
\fvset{breaksymbolright={}}
+% \end{macrocode}
+
+
+% Modified to insert a fixed-width space (\cs{nobreakspace}) to indent the
+% left margin on indented code, but also allow a line break if needed (\cs{allowbreaK}),
+% to allow for break lines.
+% \changes{v0.913}{2023/11/26}{\pkg{fvextra}: Improved indentation.}
+% \begin{macrocode}
+\def\FV@DefFVSpace{%
+ \ifbool{FV@showspaces}%
+ {%
+ \def\FV@Space{%
+ \FV@SpaceColor{\FancyVerbSpace}%
+ \allowbreak%
+ }%
+ }%
+ {\def\FV@Space{\nobreakspace\allowbreak}}%
+}
+% \end{macrocode}
+
+
+% \begin{noindmacro}{\FancyVerbSpace}
+% Force the use of a vibible space instead of an empty box.
+% From \pkg{fancyvrb}.
+% \changes{v0.913}{2023/11/25}{\pkg{fvextra}: Fixed visible space from kernel change.}
+% \begin{macrocode}
+\ifxetexorluatex
+\def\FancyVerbSpace{\textvisiblespace}
+\else
+\@ifundefined{verbvisiblespace}%
+ {%
+ \@ifundefined{textvisiblespace}%
+ {\begingroup\catcode`\ =12 \gdef\FancyVerbSpace{\tt }\endgroup}
+ {\def\FancyVerbSpace{\textvisiblespace}}
+ }%
+ {\def\FancyVerbSpace{\verbvisiblespace}}
+\fi
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FV@ListProcessLine@NoBreak} \marg{text}
+%
+% Modified to always allow line wrapping because added \HTML\ tags may
+% make run off the end of the line in the \PDF\ output file before conversion to \HTML.
+% \begin{macrocode}
\def\FV@ListProcessLine@NoBreak#1{%
% \hbox to \hsize{%
% \kern\leftmargin
@@ -60191,8 +61217,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \hss}%
\null\par% lwarp
}
-
-
+% \end{macrocode}
+% \end{noindmacro}
+%
+% \begin{macrocode}
\newcommand*{\LWR@FV@linethensep}{%
\ifbool{LWR@FV@breaklines}%
{\theFancyVerbLine\kern\FV@NumberSep}%
@@ -60205,79 +61233,249 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}%
}
-\xpatchcmd{\FV@Numbers@left}
+\xpatchcmd{\FV@Numbers@left}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@left A}}
-\xpatchcmd{\FV@Numbers@left}
+\xpatchcmd{\FV@Numbers@left}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@left B}}
-\xpatchcmd{\FV@Numbers@left}
+\xpatchcmd{\FV@Numbers@left}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@left C}}
-\xpatchcmd{\FV@Numbers@right}
+\xpatchcmd{\FV@Numbers@right}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@right A}}
-\xpatchcmd{\FV@Numbers@right}
+\xpatchcmd{\FV@Numbers@right}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@right B}}
-\xpatchcmd{\FV@Numbers@right}
+\xpatchcmd{\FV@Numbers@right}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@right C}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both A}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both B}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both C}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both D}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both E}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both F}}
% \end{macrocode}
+
+% \begin{noindmacro}{\FVC@SaveVerb@Extra@ii} \marg{name} \marg{raw text} \marg{text}
%
+% Modified to add \cs{LWR@HTMLsanitize@use@tmb} to the stored macro.
+% This is used on recall to sanitize for \HTML\ unless in a \env{lateximage}.
+% \changes{v0.913}{2023/10/01}{\pkg{fvextra}: Improved \HTML\ sanitization.}
+% \begin{macrocode}
+\def\FVC@SaveVerb@Extra@ii#1#2#3{%
+ \global\let\FV@AfterSave\FancyVerbAfterSave
+ \endgroup
+% \@namedef{FV@SV@#1}{#3}%
+ \@namedef{FV@SV@#1}{\LWR@HTMLsanitize@use@tmpb{#3}}% lwarp
+% \@namedef{FV@SVRaw@#1}{#2}%
+ \@namedef{FV@SVRaw@#1}{\LWR@HTMLsanitize@use@tmpb{#2}}% lwarp
+ \FV@AfterSave}%
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FV@UseVerb@Extra} \marg{text}
+%
+% Adds the opening and closing tags.
+% \begin{macrocode}
+\def\FV@UseVerb@Extra#1{%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \ifFV@breaklines
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
+ {\mbox{#1}}%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+ \endgroup}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FVC@Verb@Extra@ii} \marg{text}
+%
+% Sanitize \HTML.
+% \begin{macrocode}
+\def\FVC@Verb@Extra@ii#1{%
+ \def\tmpb{#1}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \ifFV@breaklines
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{\tmpb}}% lwarp
+ {\mbox{\tmpb}}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+ \endgroup}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FVC@EscVerb@ii} \marg{text}
+%
+% Santize \HTML.
+% \changes{v0.913}{2023/12/07}{\pkg{fvextra}: Updated to v1.6.1.}
+% \begin{macrocode}
+\def\FVC@EscVerb@ii#1{%
+ \def\tmpb{#1}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \ifFV@breaklines
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+% {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
+% {\mbox{#1}}%
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{\tmpb}}% lwarp
+ {\mbox{\tmpb}}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+ \endgroup}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FVB@VerbatimWrite}
+% Disable santizing \HTML\ while writing the file.
+% \HTML\ will be sanitized on \cs{VerbatimInput}.
+% \changes{v0.913}{2023/12/07}{\pkg{fvextra}: Updated to v1.6.1.}
+% \begin{macrocode}
+\xpatchcmd{\FVB@VerbatimWrite}
+ {\FV@Scan}
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
+ {}
+ {\LWR@patcherror{fvextra}{FVB@VerbatimWrite}}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\FVB@VerbatimBuffer}
+% Disable santizing \HTML\ while writing the buffer.
+% \HTML\ will be sanitized on \cs{VerbatimInsertBuffer}.
+% \changes{v0.913}{2023/12/07}{\pkg{fvextra}: Updated to v1.6.1.}
+% \begin{macrocode}
+\xpatchcmd{\FVB@VerbatimBuffer}
+ {\FV@Scan}
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
+ {}
+ {\LWR@patcherror{fvextra}{FVB@VerbatimBuffer}}
+% \end{macrocode}
+% \end{noindmacro}
+
+
+% \begin{noindmacro}{\VerbatimInsertBuffer}
+% \changes{v0.913}{2023/12/28}{\pkg{fvextra}: Updated to v1.6.1.}
+% \begin{macrocode}
+\renewcommand{\VerbatimInsertBuffer}[1][]{%
+ \begingroup
+ \def\FV@KeyValues{#1}%
+ \def\FV@Scan{%
+ \FV@CatCodes
+ \xdef\FV@EnvironName{Verbatim}%
+ \ifnum\expandafter\value\expandafter{\FV@bufferlengthname}=\z@\relax
+ \PackageError{fvextra}%
+ {Buffer length counter \FV@bufferlengthname\space is invalid or zero}%
+ {}%
+ \let\FV@GetLine\relax
+ \fi
+ \FV@GetLine}%
+ \let\FV@CheckScan\relax
+ \setcounter{FancyVerbBufferIndex}{1}%
+ \def\VerbatimInsertBuffer@def@FV@Line##1{%
+ \FVExtraRetokenizeVArg{\def\FV@Line}{}{##1}%
+ \LetLtxMacro\tmpb\FV@Line% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \LetLtxMacro\FV@Line\tmpb% lwarp
+ }%
+ \def\FancyVerbGetLine{%
+ \ifnum\value{FancyVerbBufferIndex}>%
+ \expandafter\value\expandafter{\FV@bufferlengthname}\relax
+ \global\let\FV@EnvironName\relax
+ \let\next\relax
+ \else
+ \ifcsname \FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
+ \expandafter\let\expandafter\FV@Line@Buffer
+ \csname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
+ \expandafter\VerbatimInsertBuffer@def@FV@Line\expandafter{\FV@Line@Buffer}%
+ \def\next{\FV@PreProcessLine\FV@GetLine}%
+ \stepcounter{FancyVerbBufferIndex}%
+ \else
+ \def\next{%
+ \PackageError{fvextra}%
+ {Buffer with line macro named
+ "\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}" does not exist}%
+ {Check bufferlinename, bufferlengthname, and globalbuffer settings}%
+ }%
+ \fi
+ \fi
+ \next}%
+ \FVB@Verbatim
+ \FVE@Verbatim
+ \setcounter{FancyVerbBufferIndex}{0}%
+ \endgroup}
+% \end{macrocode}
+% \end{noindmacro}
+
% \iffalse
%</fvextra>
% \fi
@@ -61292,7 +62490,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
% Start the image tag on a new line, allow \PDF\ output word wrap:
% \begin{macrocode}
- \LWR@origtilde \LWR@orignewline%
+ \LWR@orignobreakspace \LWR@orignewline%
% \end{macrocode}
% Temporarily compute \cs{linewidth}, \cs{textwidth}, \cs{textheight} arguments with a 6x9 inch size
% until the next \cs{endgroup}.
@@ -61397,9 +62595,11 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
% Create the \HTML\ reference with the graphicspath, filename, extension,
% alt tag, style, and class:
+% \changes{v0.913}{2023/11/25}{\pkg{graphics}: \bool{LWR@HTMLsanitize@tmpb@removebackslash} added.}
% \begin{macrocode}
\LWR@traceinfo{LWR@includegraphicsb: about to create href}%
- \LWR@href{\LWR@parsedfilename}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
+ \LWR@href@partsanitized{\LWR@parsedfilename}%
{% start of href
\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
\LWR@htmltag{\LWR@ig@htmltag}%
@@ -62641,13 +63841,14 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \changes{v0.45}{2017/12/29}{\pkg{hyperref}: Fix: Underscore in \URL.}
% \changes{v0.52}{2018/03/26}{\pkg{hyperref}: Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
+% \changes{v0.913}{2023/10/01}{Improved \HTML\ sanitization.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@hyperimageb}{m +m}{%
\LWR@ensuredoingapar%
- \def\LWR@templink{#1}%
- \@onelevel@sanitize\LWR@templink%
+ \edef\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
\LWR@htmltag{%
- img src=\textquotedbl\LWR@templink\textquotedbl\ %
+ img src=\textquotedbl\tmpb\textquotedbl\ %
alt=\textquotedbl#2\textquotedbl\ %
class=\textquotedbl{}hyperimage\textquotedbl%
}%
@@ -70440,13 +71641,16 @@ background:
% \changes{v0.892}{2020/10/07}{\pkg{minted}: Added.}
% \changes{v0.903}{2022/01/02}{\pkg{minted}: Updated to v2.6.}
% \changes{v0.910}{2022/12/15}{\pkg{minted}: Updated to v2.7.}
+% \changes{v0.913}{2023/11/17}{\pkg{minted}: Updated to v2.8.}
+% \changes{v0.913}{2023/11/17}{\pkg{minted}: Added \HTML\ sanitization.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{minted}[2022/12/12]
+\LWR@ProvidesPackagePass{minted}[2023/09/12]
% \end{macrocode}
%
+% Several options are forced, since they are unsupported by \pkg{lwarp}.
% \begin{macrocode}
\renewcommand{\setminted}[2][]{%
\ifthenelse{\equal{#1}{}}%
@@ -70471,7 +71675,14 @@ background:
#2,
mathescape=false,breaklines,texcomments=false,highlightlines={}% lwarp
}}}
-
+% \end{macrocode}
+%
+% \bool{LWR@HTMLsanitize@tmpb@enable} is used to turn off
+% \HTML\ sanitization early in the verbatim conversion,
+% otherwise \pkg{minted} would then colorize the sanitized results,
+% breaking the \HTML\ entities in \pkg{lwarp}'s \HTML\ output.
+%
+% \begin{macrocode}
\xpatchcmd{\RobustMintInlineProcess}
{\setkeys{minted@opt@cmd}{#1}}
{%
@@ -70479,6 +71690,9 @@ background:
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -70490,6 +71704,9 @@ background:
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -70501,6 +71718,9 @@ background:
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -70511,33 +71731,16 @@ background:
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{inputminted}}
+% \end{macrocode}
-
-%\xpatchcmd{\mintinline}
-% {\setkeys{minted@opt@cmd}{#1}}
-% {\setkeys{minted@opt@cmd}{%
-% #1,%
-% mathescape=false,breaklines,texcomments=false,highlightlines={}%
-% }%
-% }
-% {}
-% {\LWR@patcherror{minted}{mintinline}}
-
-%\xpatchcmd{\mint}
-% {\setkeys{minted@opt@cmd}{#1}}
-% {%
-% \setkeys{minted@opt@cmd}{%
-% #1,%
-% mathescape=false,breaklines,texcomments=false,highlightlines={}%
-% }%
-% }
-% {}
-% {\LWR@patcherror{minted}{mint}}
-
+% \begin{macrocode}
\renewenvironment{minted@snugshade*}[1]%
{%
\colorlet{shadecolor}{#1}%
@@ -70547,6 +71750,34 @@ background:
\end{snugshade*}%
}
% \end{macrocode}
+
+
+% To add sanitization during the final output,
+% adjust several characters to use \HTML\ entities
+% when loading the pygmentized results,
+% \begin{macrocode}
+\xpatchcmd{\minted@input}
+ {\input{#1}}
+ {%
+ \LWR@minted@overrides%
+ \input{#1}%
+ }
+ {}
+ {\LWR@patcherror{minted}{minted@input}}
+% \end{macrocode}
+
+% These macros are used inside the \filenm{*.pygtex} files
+% to format several individual characters.
+% These are revised to use \HTML\ entities.
+% The backquote |grave| is not supported by \pkg{pygments}.
+% \begin{macrocode}
+\newcommand*{\LWR@minted@overrides}{
+\def\PYGZam{\char`\&amp;}
+\def\PYGZlt{\char`\&lt;}
+\def\PYGZgt{\char`\&gt;}
+\def\PYGZsq{\char`\&apos;}
+}
+% \end{macrocode}
%
% \iffalse
%</minted>
@@ -71664,6 +72895,7 @@ background:
% \changes{v0.62}{2017/11/12}{\pkg{musicography}: Added.}
% \changes{v0.73}{2019/06/09}{\pkg{musicography}: Updated to 2019/05/28.
% Now supports \env{lateximage}s.}
+% \changes{v0.913}{2023/11/24}{\pkg{musicography}: Fix for \cs{musMeter}.}
%
% \codehtml
%
@@ -71706,7 +72938,7 @@ background:
\LWR@formatted{musDottedNote}
\NewDocumentCommand{\LWR@HTML@musMeter}{ m m }{%
-\begin{lateximage}*[#1/#2][#1#2]*%
+\begin{lateximage}*[#1/#2]*[#1#2]%
\musStack{#1 #2}\kern0.05em%
\end{lateximage}%
}
@@ -79766,11 +80998,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \pkg{simplebnf} is patched for use by \pkg{lwarp}.
%
% \changes{v0.893}{2020/10/29}{\pkg{simplebnf}: Added.}
+% \changes{v0.913}{2023/12/08}{\pkg{simplebnf}: Updated to v1.0.0.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{simplebnf}[2022/05/08]
+\LWR@ProvidesPackagePass{simplebnf}[2023-11-25]
% \end{macrocode}
%
% The entire object is placed inside a \env{lateximage} whose
@@ -79778,78 +81011,32 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \begin{macrocode}
\ExplSyntaxOn
-\RenewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b }
+\RenewDocumentEnvironment { bnf } { d() O{llcll} +b }
{
- \regex_gset:Nn \g_simplebnf_rhs_newline_r { #2 }
- \regex_gset:Nn \g_simplebnf_rhs_nb_r { #3 }
+ \begin{lateximage}[bnf:\space\detokenize{#3}]% lwarp
- %% \l__input_seq is a list of term definitions.
- \regex_split:nnN { ;; } { #4 } \l__input_seq
- \begin{center}
- \begin{lateximage}[#4]% lwarp
- \tl_set:Nn \l__table_tl
- {
- \begin{tabular}{#1}
- }
+ \IfNoValueF { #1 }
+ { \keys_set:nn { simplebnf } { #1 } }
- \bool_set_true:N \l_tmp_first_term % Is this the first term in this grammar?
- \seq_map_inline:Nn \l__input_seq
- {
- %% If not-first, add newline
- \bool_if:NTF \l_tmp_first_term
- {
- \bool_set_false:N \l_tmp_first_term
- }
- {
- \tl_put_right:Nn \l__table_tl { \\ }
- }
-
- \regex_split:nnNTF { ::= } { ##1 } \l__term_seq
- % Parse a ::= definition
- {
- %% \l__term_seq - (lhs, rhses)...
- %% \l__term_tl - lhs
- %% \l__keypairs_tl - rhses
- \seq_pop_left:NN \l__term_seq \l__term_tl
- \seq_pop_left:NN \l__term_seq \l__keypairs_tl
-
- \simplebnf_typeset_lhs:n{\l__term_tl}
- \tl_put_right:Nn \l__table_tl
- {
- & \SimpleBNFDefEq &
- }
- %% \l__keypairs_seq - (rhs:annot | rhs)...
- \regex_split:NVN \g_simplebnf_rhs_newline_r \l__keypairs_tl \l__keypairs_seq
+ \__simplebnf_build_grammar:n { #3 }
- \bool_set_true:N \l__first_rhs
- \seq_map_function:NN \l__keypairs_seq \simplebnf_typeset_rhs:n
- }
- {
- % Else, parse a \in declaration
- \regex_split:nnNTF { \c{in} } { ##1 } \l__term_seq
- {
- %% \l__term_seq - (lhs, rhs)
- \seq_pop_left:NN \l__term_seq \l_tmpa_tl
-
- \simplebnf_typeset_lhs:n{\l_tmpa_tl}
- \tl_put_right:Nn \l__table_tl
- {
- & $\in$ & $
- }
- \seq_pop_left:NN \l__term_seq \l_tmpa_tl
- \tl_put_right:NV \l__table_tl \l_tmpa_tl
- \tl_put_right:Nn \l__table_tl
- {
- $ &
- }
- }
- { \msg_error:nn {simplebnf} { Could not parser ##1 } }
- }
- }
+ \begin{@simplebnf_tblr_env}[expand=\l__simplebnf_table_tl]{#2}
+ \tl_use:N \l__simplebnf_table_tl
+ \end{@simplebnf_tblr_env}
+ \end{lateximage}% lwarp
+ }
+ { }
- \tl_put_right:Nn \l__table_tl { \end{tabular} }
- \tl_use:N \l__table_tl
- \end{lateximage}% lwarp
+\RenewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b }
+ {
+ \msg_warning:nn { simplebnf } { dep }
+ \begin{center}
+ \begin{lateximage}[bnf:\space\detokenize{#4}]% lwarp
+ \begin{tabular}{#1}
+ \@dep__simplebnf_typeset_grammar:nnn { #2 } { #3 } { #4 }
+ \tl_use:N \l__simplebnf_table_tl
+ \end{tabular}
+ \end{lateximage}% lwarp
\end{center}
}
{ }
@@ -79888,8 +81075,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% since \cs{ensuremath} is used in the original defintions,
% and \cs{ensuremath} often has expressions which do not work well in \MathJax,
% so it is always forced to an \SVG\ image.
-% If, however, \cs{unit} is used, the result is expressed with \MathJax
-% instead of an \SVG\ image.
+% If, however, \cs{unit} is used, the result is expressed with \MathJax\ instead
+% of an \SVG\ image.
%
% \changes{v0.59}{2018/07/11}{\pkg{SIunits}: Added.}
% \changes{v0.81}{2020/02/23}{\pkg{SIunits}: Improved \cs{unit}. Fixed in math mode.
@@ -79906,6 +81093,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \begin{macrocode}
\ifbool{mathjax}{
\DeclareRobustCommand{\LWR@HTML@unit}[2]{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@subsingledollar*% lwarp
{% alt tag
\textbackslash{}unit%
@@ -79916,6 +81105,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{%
#1\,{#2}%
}% contents
+ \endgroup%
}
}{% not MathJax
\DeclareRobustCommand{\LWR@HTML@unit}[2]{%
@@ -80378,6 +81568,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% \changes{v0.897}{2021/05/23}{\pkg{siunitx}: Rollback for v2.}
% \changes{v0.904}{2022/02/19}{\pkg{siunitx}: Added v3.}
+% \changes{v0.913}{2023/11/24}{\pkg{siunitx}: Updated to v3.3.9.}
%
% \codehtml
%
@@ -80391,7 +81582,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\RequirePackage{xcolor}% for \convertcolorspec
-\LWR@ProvidesPackagePass{siunitx}[2022-02-15]
+\LWR@ProvidesPackagePass{siunitx}[2023-11-14]
\ExplSyntaxOn
% \end{macrocode}
@@ -80441,13 +81632,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{
\tl_set:Nn \l__siunitx_number_outputted_tl
{
+ \boolfalse{mathjax}% lwarp
\LWR@subsingledollar{% lwarp
- \textbackslash( % space
+ \textbackslash( % space lwarp ALT text
\LWR@HTMLsanitizedetokenized{%
\detokenize{#1}%
} \textbackslash)% lwarp
}%
- {siunitx unparsed}%
+ {siunitx unparsed}% lwarp add'l hashing
{\ensuremath{#1}}% lwarp
}
}
@@ -80463,13 +81655,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\tl_if_blank:nF {#1}
{ \seq_put_right:Nn \l__siunitx_compound_tmp_seq
{
+ \boolfalse{mathjax}% lwarp
\LWR@subsingledollar{% lwarp
- \textbackslash( % space
+ \textbackslash( % space lwarp ALT tag
\LWR@HTMLsanitizedetokenized{%
\detokenize{#1}%
} \textbackslash)% lwarp
}%
- {siunitx unparsed}%
+ {siunitx unparsed}% lwarp add'l hashing
{\ensuremath{#1}}% lwarp
}
}
@@ -80477,60 +81670,79 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
%
%
+% \begin{noindmacro}{\LWR@siunitx@mathrm} \marg{text}
+%
+% If in text mode, use \cs{textrm} instead.
+% Avoids crashing while using \cs{mathrm} in text mode.
+% \begin{macrocode}
+\LetLtxMacro\LWR@siunitx@orig@mathrm\mathrm
+
+\newcommand*{\LWR@siunitx@mathrm}[1]{%
+ \ifmmode{\LWR@siunitx@orig@mathrm{#1}}\else{#1}\fi%
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
% If not in a \env{lateximage}, always use text mode.
% Ignore current text font if resetting text family, series, and shape.
% \begin{macrocode}
\cs_set_protected:Npn \__siunitx_print_aux:nn #1#2
{
- \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
- { \use:n }
- { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
- {
- \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp
- {
- \use:c
- {
- siunitx_print_
- \tl_use:c { l__siunitx_print_ #1 _mode_tl } :n
- }
- {#2}
- }
+ \LetLtxMacro\mathrm\LWR@siunitx@mathrm% lwarp
+ \tl_if_empty:oF {#2}
+ {
+ \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
+ { \use:n }
+ { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
{
- \bool_lazy_all:nTF% lwarp
- {
- {\l__siunitx_print_text_family_bool}
- {\l__siunitx_print_text_series_bool}
- {\l__siunitx_print_text_shape_bool}
- }
- {% No font control if reset-text-family/series/shape
- \use:c
- {
- siunitx_print_% lwarp
- text% lwarp
- :n% lwarp
- }% lwarp
- {#2}% lwarp
- }
- {
- \LWR@textcurrentfont{% lwarp
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp
+ {
+ \use:c
+ {
+ siunitx_print_
+ \tl_use:c { l__siunitx_print_ #1 _mode_tl } :n
+ }
+ {#2}
+ }
+ {
+ \bool_lazy_all:nTF% lwarp
+ {
+ {\l__siunitx_print_text_family_bool}
+ {\l__siunitx_print_text_series_bool}
+ {\l__siunitx_print_text_shape_bool}
+ }
+ {% No font control if reset-text-family/series/shape
\use:c
{
- siunitx_print_% lwarp
- text% lwarp
- :n% lwarp
- }% lwarp
- {#2}% lwarp
+ siunitx_print_% lwarp
+ text% lwarp
+ :n% lwarp
+ }% lwarp
+ {#2}% lwarp
}
- }
+ {
+ \LWR@textcurrentfont{% lwarp
+ \use:c
+ {
+ siunitx_print_% lwarp
+ text% lwarp
+ :n% lwarp
+ }% lwarp
+ {#2}% lwarp
+ }
+ }
+ }
}
- }
- }
+ }
+}
% \end{macrocode}
%
%
% To determine whether to make a complex root be italic or upright,
% \cs{l\_\_siunitx\_complex\_output\_root\_tl} is compared to
-% \cs{LWR@siunitx@complexrm<i/j>}, and the \CSS\ style is set appropriately.
+% \cs{LWR@siunitx@complexrm<i/j>}, and the \CSS\ style for i,j is set
+% to |ijit| or |ijup|.
+% \changes{v0.913}{2023/11/24}{\pkg{siunitx}: \CSS\ for complex number i,j.}
% \begin{macrocode}
\newcommand*{\LWR@siunitx@complexrootstyle}{textrm}
@@ -80538,21 +81750,21 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\newcommand*{\LWR@siunitx@complexrmj}{\mathrm{j}}
\newcommand*{\LWR@siunitx@setcomplexroot}{%
- \renewcommand*{\LWR@siunitx@complexrootstyle}{textit}%
+ \renewcommand*{\LWR@siunitx@complexrootstyle}{ijit}%
\ifdefequal{\l__siunitx_complex_output_root_tl}{\LWR@siunitx@complexrmi}%
- {\renewcommand*{\LWR@siunitx@complexrootstyle}{textrm}}%
+ {\renewcommand*{\LWR@siunitx@complexrootstyle}{ijup}}%
{}%
\ifdefequal{\l__siunitx_complex_output_root_tl}{\LWR@siunitx@complexrmj}%
- {\renewcommand*{\LWR@siunitx@complexrootstyle}{textrm}}%
+ {\renewcommand*{\LWR@siunitx@complexrootstyle}{ijup}}%
{}%
}
% \end{macrocode}
%
% \begin{macrocode}
-\cs_set_protected:Npn \__siunitx_complex_format_auxii:n #1
+\cs_set_protected:Npn \__siunitx_complex_format_cartesian_auxii:n #1
{
\LWR@siunitx@setcomplexroot% lwarp
- \__siunitx_complex_format_units:n {#1}
+ \__siunitx_complex_format_cartesian_units:n {#1}
\tl_if_empty:NF \l__siunitx_complex_real_tl
{ \exp_after:wN \__siunitx_complex_drop_exponent:nnnnnnn \l__siunitx_complex_real_tl }
\exp_after:wN \__siunitx_complex_format_sign:nnnnnnn \l__siunitx_complex_img_tl
@@ -80763,13 +81975,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{ \__siunitx_quantity_parsed:nn {#1} {#2} }
{
\tl_set:Nn \l__siunitx_quantity_number_tl {
+ \boolfalse{mathjax}% lwarp
\LWR@subsingledollar{% lwarp
- \textbackslash( % space
+ \textbackslash( % space lwaro ALT tag
\LWR@HTMLsanitizedetokenized{%
\detokenize{#1}%
} \textbackslash)% lwarp
}%
- {siunitx unparsed}%
+ {siunitx unparsed}% lwarp add'l hashing
{\ensuremath{#1}}% lwarp
}
\siunitx_unit_format:nN {#2} \l__siunitx_quantity_unit_tl
@@ -85536,7 +86749,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{tcolorbox}[2023/02/12]
+\LWR@ProvidesPackagePass{tcolorbox}[2023/06/19]
% \end{macrocode}
%
% \begin{macrocode}
@@ -91741,8 +92954,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\newcommand*{\LWR@currenttextcolorstyle}{%
\LWR@findcurrenttextcolor%
\ifdefstring{\LWR@tempcolor}{000000}%
- {}%
- {color: \LWR@origpound\LWR@tempcolor ; }%
+ {}%
+ {color: \LWR@origpound\LWR@tempcolor ; }%
}
% \end{macrocode}
% \end{noindmacro}
@@ -92138,90 +93351,6 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
% \end{macro}
%
-%
-% \subsection{Row colors}
-% \changes{v0.49}{2018/02/17}{\pkg{xcolor}: Added tabular row colors.}
-% \changes{v0.79}{2020/01/18}{\pkg{xcolor}: Fix: Nested \env{tabular}s.}
-%
-% \begin{noindmacro}{\rowc@l@rs} \oarg{cmds} \marg{startrow} \marg{odd color} \marg{even color}
-% \begin{macrocode}
-\newcommand*{\LWR@xcolortempcolor}{}
-
-\def\rowc@l@rs[#1]#2#3#4%
-{%
- \rownum=1%
- \@rowcolorstrue%
- \@ifxempty{#3}%
- {\def\@oddrowcolor{\@norowcolor}}%
- {%
- \convertcolorspec{named}{#3}{HTML}\LWR@xcolortempcolor%
- \edef\@oddrowcolor{%
- \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
- }%
- }%
- \@ifxempty{#4}%
- {\def\@evenrowcolor{\@norowcolor}}%
- {%
- \convertcolorspec{named}{#4}{HTML}\LWR@xcolortempcolor%
- \edef\@evenrowcolor{%
- \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
- }%
- }%
- \if@rowcmd
- \def\@rowcolors
- {%
-% #1%
- \if@rowcolors
-% \noalign{%
- \relax\ifnum\rownum<#2\@norowcolor\else
- \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi%
-% }%
- \fi%
- }%
- \else
- \def\@rowcolors
- {%
- \if@rowcolors
- \ifnum\rownum<#2%
-% \noalign{%
- \@norowcolor
-% }
- \else
-% #1%
-% \noalign{%
- \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi%
-% }%
- \fi
- \fi%
- }%
- \fi
- \ignorespaces%
-}
-% \end{macrocode}
-% \end{noindmacro}
-%
-% \begin{noindmacro}{\@norowcolor} Turns off color for this row.
-% \begin{macrocode}
-\def\@norowcolor{%
- \renewcommand{\LWR@xcolorrowHTMLcolor}{}%
-}
-% \end{macrocode}
-% \end{noindmacro}
-%
-
-% \begin{noindmacro}{\@rowc@lors} Executed at the end of each row.
-% \changes{v0.79}{2020/01/18}{\pkg{xcolor}: Fix: Nested \env{tabular}s.}
-% \begin{macrocode}
-\def\@rowc@lors{%
-% \noalign{%
- \advance\rownum\@ne%
-% }%
- \@rowcolors%
-}
-% \end{macrocode}
-% \end{noindmacro}
-%
-%
% \iffalse
%</xcolor>
% \fi
@@ -94628,13 +95757,19 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\renewcommand*{\hangsubcaption}{}
\renewcommand*{\shortsubcaption}{}
\renewcommand*{\normalsubcaption}{}
+% \end{macrocode}
+% \cs{AfterEndPreamble} now required for \env{sidecaption}.
+% \changes{v0.913}{2023/11/23}{\pkg{lwarp-patch-memoir}: Fixed change in \env{sidecaption}.}
+% \begin{macrocode}
+\AfterEndPreamble{%
\RenewDocumentEnvironment{sidecaption}{o m o}
{}
{%
\IfValueTF{#1}{\caption[#1]{#2}}{\caption{#2}}%
\IfValueT{#3}{\label{#3}}%
}
+}
% \newlength{\sidecapwidth}
% \newlength{\sidecapsep}
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
index fde9f9f9768..a16143215b0 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
@@ -57,6 +57,7 @@ version 2005/12/01 or later.
\file{lwarp-anonchap.sty}{\from{lwarp.dtx}{anonchap}}
\file{lwarp-anysize.sty}{\from{lwarp.dtx}{anysize}}
\file{lwarp-appendix.sty}{\from{lwarp.dtx}{appendix}}
+\file{lwarp-apxproof.sty}{\from{lwarp.dtx}{apxproof}}
\file{lwarp-ar.sty}{\from{lwarp.dtx}{ar}}
\file{lwarp-arabicfront.sty}{\from{lwarp.dtx}{arabicfront}}
\file{lwarp-array.sty}{\from{lwarp.dtx}{array}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty
index bedab9b7f17..e09ac024345 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-SIunits.sty
@@ -18,6 +18,8 @@
\LWR@ProvidesPackagePass{SIunits}[2007/12/02]
\ifbool{mathjax}{
\DeclareRobustCommand{\LWR@HTML@unit}[2]{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@subsingledollar*% lwarp
{% alt tag
\textbackslash{}unit%
@@ -28,6 +30,7 @@
{%
#1\,{#2}%
}% contents
+ \endgroup%
}
}{% not MathJax
\DeclareRobustCommand{\LWR@HTML@unit}[2]{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
index 06793e4e1c1..3aa70a0e706 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
@@ -90,7 +90,7 @@
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
- \LWR@addmathjax{#2}{\the\@envbody}
+ \LWR@addmathjax{#2}{\the\@envbody}%
}
{\LWR@amsmathenv@@after}
\gdef\LWR@ThisAltText{}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-apxproof.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-apxproof.sty
new file mode 100644
index 00000000000..8db2a57f23f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-apxproof.sty
@@ -0,0 +1,27 @@
+%%
+%% This is file `lwarp-apxproof.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `apxproof')
+%% This is a generated file.
+%% 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
+%% 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@ProvidesPackagePass{apxproof}[2022/10/14]
+\xpatchcmd{\FVB@axp@VerbatimOut}
+ {\FV@Scan}
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
+ {}
+ {\LWR@patcherror{apxproof}{FVB@axp@VerbatimOut}}
+
+\endinput
+%%
+%% End of file `lwarp-apxproof.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
index b9015551411..27be0cfa2cc 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
@@ -47,7 +47,7 @@
\def\LWR@attachfile@appearance{#1}%
}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
- \LWR@href{#1}{\LWR@attachfile@appearance}%
+ \LWR@href@partsanitized{#1}{\LWR@attachfile@appearance}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
index b2781e3cb50..060fbdb6c90 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
@@ -59,7 +59,7 @@
\def\LWR@attachfile@appearance{#1}%
}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
- \LWR@href{#1}{\LWR@attachfile@appearance}%
+ \LWR@href@partsanitized{#1}{\LWR@attachfile@appearance}%
}
\DeclareRobustCommand{\notextattachfile}[2][]{%
\begingroup
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
index 733aca182ee..f8f2a28a68a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
@@ -21,7 +21,7 @@
\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
\LWR@ensuredoingapar%
\LWR@subhyperref{#2}%
- \LWR@subhyperreftext{#3}%
+ \LWR@subhyperreftext@unsanitized{#3}%
\endgroup% restore catcodes
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bussproofs.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bussproofs.sty
index 9873734d071..367db4592ee 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bussproofs.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bussproofs.sty
@@ -20,7 +20,10 @@
\CustomizeMathJax{\require{bussproofs}}
\NewEnviron{LWR@HTML@prooftree}%
- {\LWR@doequation{\BODY}{prooftree}}%
+ {%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
+ \LWR@doequation{\BODY}{prooftree}%
+ }%
[\LWR@doendequation{prooftree}]
\LWR@formattedenv{prooftree}
}{% SVG HTML
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty
index 971c252bc3c..8136279f7b5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty
@@ -24,11 +24,11 @@
\typeout{instead of: \protect\usepackage[options]\protect{caption\protect}.}
\typeout{---}
-\LWR@ProvidesPackagePass{caption}[2020/10/26]
+\LWR@ProvidesPackagePass{caption}[2023/08/05]
\long\def\caption@iibox@#1#2#3#4{%
\caption@iiibox{#1}{#2}{#3}%
[]% lwarp
- [\captionbox@hj@default]%
+ [\captionbox@innerpos@default]%
{{#4}}% lwarp
}
\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty
index 40833a0c9a9..89635694e32 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption3.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{caption3}[2020/10/21]
+\LWR@ProvidesPackagePass{caption3}[2023/07/31]
\IfPackageAtLeastTF{caption3}{2020/08/23}{
\renewcommand\caption@@@make[2]{%
\LWR@traceinfo{caption@@@make}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
index 7f159fbd275..1905556a27a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
@@ -60,6 +60,59 @@
\AtBeginDocument{\LWR@expandableformatted{doublerulesepcolornexttoken}}
+\newcommand*{\LWR@xcolortempcolor}{}
+
+\def\rowc@l@rs[#1]#2#3#4%
+{%
+ \rownum=1%
+ \@rowcolorstrue%
+ \@ifxempty{#3}%
+ {\def\@oddrowcolor{\@norowcolor}}%
+ {%
+ \convertcolorspec{named}{#3}{HTML}\LWR@xcolortempcolor%
+ \edef\@oddrowcolor{%
+ \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
+ }%
+ }%
+ \@ifxempty{#4}%
+ {\def\@evenrowcolor{\@norowcolor}}%
+ {%
+ \convertcolorspec{named}{#4}{HTML}\LWR@xcolortempcolor%
+ \edef\@evenrowcolor{%
+ \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
+ }%
+ }%
+ \if@rowcmd
+ \def\@rowcolors
+ {%
+ \if@rowcolors
+ \relax\ifnum\rownum<#2\@norowcolor\else
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi%
+ \fi%
+ }%
+ \else
+ \def\@rowcolors
+ {%
+ \if@rowcolors
+ \ifnum\rownum<#2%
+ \@norowcolor
+ \else
+ \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi%
+ \fi
+ \fi%
+ }%
+ \fi
+ \ignorespaces%
+}
+\def\@norowcolor{%
+ \renewcommand{\LWR@xcolorrowHTMLcolor}{}%
+}
+
+\def\@rowc@lors{%
+ \advance\rownum\@ne%
+ \@rowcolors%
+}
+
\begin{warpMathJax}
\CustomizeMathJax{\require{colortbl}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
index 805383e72cc..4db9e79a29f 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
@@ -39,7 +39,7 @@
\ignorespaces%
}%
\def\V@@@footnotetext{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}\LWR@orignewline%
\strut\egroup%
}
@@ -159,6 +159,38 @@
\def\endLandScape{}
\def\@Landscape#1#2#3{}
\def\endLandscape{}
+\def\Verbatim@List#1{%
+ \if@minipage\else\vskip\parskip\fi
+ \leftskip\@totalleftmargin
+ \@rightskip\@flushglue \rightskip\@rightskip
+ \parindent\z@
+ \parskip\z@
+ \parfillskip\@flushglue
+ \hfuzz\VerbatimFuzz\relax
+ \@@par
+ \global\@inlabelfalse %Prevents vspace from being inserted when
+ \Verbatim@Prep %first line exceeds \hsize.
+ \expandafter\def\expandafter\tmpb\expandafter{#1}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \tmpb% lwarp
+ \Verbatim@Par}%
+
+\def\Verbatim@@Input{%
+ \let\protect\noexpand
+ \LetLtxMacro\tmpb\The@Verbatim% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \edef\The@Verbatim{%
+ \noexpand\Every@VerbatimLine
+ \tmpb% lwarp
+ \ifeof\Verbatim@Infile\else\noexpand\Verbatim@Par\fi}%
+ \let\protect\relax
+ \The@Verbatim
+ \ifeof\Verbatim@Infile\else
+ \let\The@Verbatim\The@GVerbatim
+ \def\The@GVerbatim{}\Verbatim@NextLine
+ \expandafter\Verbatim@@Input
+ \fi}%
+
\let\LWRFB@UseVerbatim\UseVerbatim
\renewcommand*{\UseVerbatim}[1]{%
\LWR@atbeginverbatim{Verbatim}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
index d496a4461b0..a73bd19cfbc 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
@@ -17,10 +17,171 @@
%% version 2005/12/01 or later.
\AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec
-\LWR@ProvidesPackagePass{fancyvrb}[2008/02/07]
+\LWR@ProvidesPackagePass{fancyvrb}[2023/11/06]
\fvset{frame=none}%
+
+\define@key{FV}{gobble}{%
+ \@tempcnta=#1\relax
+ \ifnum\@tempcnta<\@ne
+ \let\FV@Gobble\relax
+ \else
+ \ifnum\@tempcnta>9
+ \FV@Error{gobble parameter must be less than 10}\FV@eha
+ \else
+ \renewcommand{\FV@@@@Gobble}[\@tempcnta]{}%
+ \let\FV@Gobble\FV@@Gobble%
+ \boolfalse{LWR@HTMLsanitize@tmpb@enable}% lwarp
+ \fi
+ \fi}
+
+\ifxetexorluatex
+\def\LWR@HTML@FancyVerbSpace{\textvisiblespace}
+\else
+\@ifundefined{verbvisiblespace}%
+ {%
+ \@ifundefined{textvisiblespace}%
+ {\begingroup\catcode`\ =12 \gdef\LWR@HTML@FancyVerbSpace{\tt }\endgroup}
+ {\def\LWR@HTML@FancyVerbSpace{\textvisiblespace}}
+ }%
+ {\def\LWR@HTML@FancyVerbSpace{\verbvisiblespace}}
+\fi
+\LWR@formatted{FancyVerbSpace}
+
+\def\LWR@print@FancyVerbTab{|}
+\def\LWR@HTML@FancyVerbTab{|}%
+\LWR@formatted{FancyVerbTab}
+
+\fvset{tabsize=8,showtabs=false}
+
+\def\FV@CatCodes{%
+ \let\do\@makeother\dospecials % The usual stuff.
+ \FV@ActiveWhiteSpace % See below.
+ \FV@FontScanPrep % See below.
+ \FV@CatCodesHook % A style hook.
+ \FancyVerbCodes % A user-defined hook.
+ \catcode`\>=12% % lwarp
+ \catcode`\<=12% % lwarp
+}
+\def\FV@GetLine{%
+ \@noligs%
+ \catcode`\>=12% lwarp, and the next line as well
+ \catcode`\<=12
+ \expandafter\FV@CheckScan\FancyVerbGetLine%
+}
+
+\begingroup
+\catcode`\^^M=\active%
+\gdef\FancyVerbGetLine#1^^M{%
+ \@nil%
+ \FV@CheckEnd{#1}%
+ \ifx\@tempa\FV@EnvironName% % True if end is found
+ \ifx\@tempb\FV@@@CheckEnd\else\FV@BadEndError\fi%
+ \let\next\FV@EndScanning%
+ \else%
+ \ifbool{LWR@HTMLsanitize@tmpb@enable}% lwarp
+ {\def\FV@Line{\LWR@HTMLsanitize@use@tmpb{#1}}}% lwarp
+ {\def\FV@Line{#1}}% lwarp
+ \def\next{\FV@PreProcessLine\FV@GetLine}%
+ \fi%
+ \next}%
+\endgroup
+\def\FV@List#1{%
+ \begingroup
+ \FV@UseKeyValues
+ \FV@LeaveVMode
+ \if@inlabel\else\setbox\@labels=\box\voidb@x\fi
+ \FV@ListNesting{#1}%
+ \FV@ListParameterHook
+ \FV@ListVSpace
+ \FV@SetLineWidth
+ \FV@InterLinePenalty
+ \let\FV@ProcessLine\FV@ListProcessLine% lwarp
+ \FV@CatCodes
+ \FV@FormattingPrep
+ \FV@ObeyTabsInit
+ \FV@BeginListFrame}
+\def\FV@ListProcessLine#1{%
+ \hbox to \hsize{%
+ \hbox to \VerbatimHTMLWidth {%
+ \ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
+ \FV@LeftListNumber%
+ \FancyVerbFormatLine{#1}%
+ \hss%
+ \FV@RightListNumber%
+ }%
+ \hss% required to avoid underfull hboxes
+}
+}
+
+\begingroup
+\catcode`\^^M=\active%
+\gdef\FVC@SaveVerb#1#2{%
+ \@namedef{FV@SV@#1}{}%
+ \begingroup%
+ \FV@UseKeyValues%
+ \FV@CatCodes%
+ \outer\def^^M{\FV@EOL}%
+ \global\let\@tempg\FancyVerbAfterSave%
+ \catcode`#2=12%
+ \def\@tempa{\def\FancyVerbGetVerb####1####2}%
+ \expandafter\@tempa\string#2{%
+ \endgroup%
+ \@namedef{FV@SV@#1}{%
+ \LWR@HTMLsanitize@use@tmpb{##2}% lwarp
+ }\@tempg%
+ }%
+ \FancyVerbGetVerb\FV@EOL}%
+\endgroup
+
+\def\FV@UseVerb#1{%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \mbox{\FV@UseKeyValues\FV@FormattingPrep#1}%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+}
+
+\begingroup
+\catcode`\^^M=\active%
+\gdef\FVC@Verb#1{%
+ \begingroup%
+ \FV@UseKeyValues%
+ \FV@FormattingPrep%
+ \FV@CatCodes%
+ \outer\def^^M{}%
+ \catcode`#1=12%
+ \def\@tempa{\def\FancyVerbGetVerb####1####2}%
+ \expandafter\@tempa\string#1{%
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}% lwarp
+ \def\tmpb{##2}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \mbox{\tmpb}% lwarp
+ \LWR@htmltag{/span}% lwarp
+ }% lwarp
+ {\mbox{##2}}%
+ \endgroup%
+ }%
+ \FancyVerbGetVerb\FV@EOL%
+}%
+\endgroup
+\begingroup
+\catcode`\^^M=\active
+\gdef\FV@ReadLine{%
+ \ifeof\FV@InFile\else
+ \immediate\read\FV@InFile to\tmpb%
+ \LWR@HTMLsanitize@tmpb%
+ \expandafter\FV@@ReadLine\tmpb^^M\relax^^M\@nil%
+ \fi}
+\endgroup
+\newcommand*{\LWR@FVstyle}{}
\AfterEndPreamble{
+
\LWR@traceinfo{Patching fancyvrb.}
+
\def\VerbatimFootnotes{%
\let\@footnotetext\V@footnotetext%
\let\footnote\V@footnote%
@@ -35,6 +196,9 @@
\csname p@footnote\endcsname\@thefnmark%
}% @currentlabel
\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
+ \booltrue{LWR@verbtags}%
+ \booltrue{LWR@HTMLsanitize@tmpb@enable}%
+
\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline%
\@makefntext{}%
\bgroup%
@@ -43,47 +207,71 @@
\ignorespaces%
}%
\def\V@@@footnotetext{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}\LWR@orignewline%
\strut\egroup%
}
\preto\FVB@Verbatim{\LWR@forcenewpage}
\preto\FVB@LVerbatim{\LWR@forcenewpage}
-\def\FV@BeginListFrame@Single{%
+\def\LWR@HTML@FV@BeginListFrame@Single{%
\FV@SingleFrameLine{\z@}%
}
+\LWR@formatted{FV@BeginListFrame@Single}
-\def\FV@EndListFrame@Single{%
+\def\LWR@HTML@FV@EndListFrame@Single{%
\FV@SingleFrameLine{\@ne}%
}
+\LWR@formatted{FV@EndListFrame@Single}
-\def\FV@BeginListFrame@Lines{%
+\def\LWR@HTML@FV@BeginListFrame@Lines{%
\FV@SingleFrameLine{\z@}%
}
+\LWR@formatted{FV@BeginListFrame@Lines}
-\def\FV@EndListFrame@Lines{%
+\def\LWR@HTML@FV@EndListFrame@Lines{%
\FV@SingleFrameLine{\@ne}%
}
+\LWR@formatted{FV@EndListFrame@Lines}
-\renewcommand*{\FV@SingleFrameSep}{}
-\def\FV@BUseVerbatim#1{%
- \FV@BVerbatimBegin#1\FV@BVerbatimEnd%
-}
+\newcommand*{\LWR@HTML@FV@SingleFrameSep}{}%
+\LWR@formatted{FV@SingleFrameSep}
-\newcommand*{\LWR@FVstyle}{}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
-\BlockClass[\LWR@FVstyle]{fancyvrb}
+ \ifdefstring{\LWR@FVstyle}{\LWR@currenttextcolorstyle}%
+ {%
+ \LWR@findcurrenttextcolor%
+ \ifdefstring{\LWR@tempcolor}{000000}%
+ {\BlockClass{fancyvrb}}%
+ {\BlockClass[\LWR@FVstyle]{fancyvrb}}%
+ }%
+ {%
+ \BlockClass[\LWR@FVstyle]{fancyvrb}%
+ }%
\LWR@stoppars
\ifx\FV@LabelPositionTopLine\relax\else
\ifx\FV@LabelBegin\relax\else
\FancyVerbRuleColor{\LWR@FVfindbordercolor}
- \LWR@htmltagc{%
- div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
- style=\textquotedbl{}color: \LWR@origpound\LWR@tempcolor\textquotedbl%
- }
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@findcurrenttextcolor%
+ \LWR@htmltagc{% lwarp
+ div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
+ style=\textquotedbl{}%
+ color: \LWR@origpound\LWR@tempcolor%
+ \textquotedbl%
+ }%
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
\LWR@print@textrm{\FV@LabelBegin}% \textrm preserves emdash
- \LWR@htmltagc{/div}\LWR@orignewline%
+ \LWR@orignewline% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@htmltagc{/div}% lwarp
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
\fi
\fi
\LWR@atbeginverbatim{verbatim}%
@@ -95,16 +283,30 @@
\LWR@stoppars%
\ifx\FV@LabelPositionBottomLine\relax\else
\ifx\FV@LabelEnd\relax\else
- \FancyVerbRuleColor{\LWR@FVfindbordercolor}
- \LWR@htmltagc{%
- div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
- style=\textquotedbl{}color: \LWR@origpound\LWR@tempcolor\textquotedbl%
- }
- \LWR@print@textrm{\FV@LabelEnd}
- \LWR@htmltagc{/div}\LWR@orignewline%
+ \FancyVerbRuleColor{\LWR@FVfindbordercolor}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@findcurrenttextcolor%
+ \LWR@htmltagc{% lwarp
+ div class=\textquotedbl{}fancyvrblabel\textquotedbl\ % space
+ style=\textquotedbl{}%
+ color: \LWR@origpound\LWR@tempcolor%
+ \textquotedbl%
+ }%
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
+ \LWR@print@textrm{\FV@LabelEnd}% lwarp
+ \LWR@orignewline% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {% lwarp
+ \LWR@htmltagc{/div}% lwarp
+ \LWR@orignewline% lwarp
+ }% lwarp
+ {}% lwarp
\fi
\fi
-\endBlockClass
+\endBlockClass% lwarp
}
\newcommand*{\LWR@fvstartsingle}{%
@@ -143,16 +345,17 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt % space
solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
}
-\def\FV@Frame@none{%
+\def\LWR@HTML@FV@Frame@none{%
\renewcommand*{\LWR@FVstyle}{\LWR@currenttextcolorstyle}%
\let\FV@BeginListFrame\LWR@fvstartnone%
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
+\LWR@formatted{FV@Frame@none}
\FV@Frame@none% default values
-\def\FV@Frame@single{%
+\def\LWR@HTML@FV@Frame@single{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{}%
@@ -161,8 +364,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\FV@LeftListFrame@Single%
\let\FV@RightListFrame\FV@RightListFrame@Single%
\let\FV@EndListFrame\LWR@fvendsingle}
+\LWR@formatted{FV@Frame@single}
-\def\FV@Frame@lines{%
+\def\LWR@HTML@FV@Frame@lines{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-top}%
@@ -173,8 +377,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendline}
+\LWR@formatted{FV@Frame@lines}
-\def\FV@Frame@topline{%
+\def\LWR@HTML@FV@Frame@topline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-top}%
@@ -183,8 +388,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
+\LWR@formatted{FV@Frame@topline}
-\def\FV@Frame@bottomline{%
+\def\LWR@HTML@FV@Frame@bottomline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-bottom}%
@@ -193,8 +399,9 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\relax%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendline}
-\def\FV@FrameFillLine{}%
-\def\FV@Frame@leftline{%
+\LWR@formatted{FV@Frame@bottomline}
+\def\FV@FrameFillLine{}
+\def\LWR@HTML@FV@Frame@leftline{%
\renewcommand*{\LWR@FVstyle}{%
\LWR@currenttextcolorstyle\LWR@indentHTMLtwo%
\LWR@FVborderstyle{-left}%
@@ -212,7 +419,8 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\let\FV@LeftListFrame\FV@LeftListFrame@Single%
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
-\def\FV@SingleFrameLine#1{%
+\LWR@formatted{FV@Frame@leftline}
+\def\LWR@HTML@FV@SingleFrameLine#1{%
\ifnum#1=\z@\relax
\let\FV@Label\FV@LabelBegin
\else
@@ -231,32 +439,11 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\fi
\fi
}
-\def\FV@ListProcessLine#1{%
- \hbox to \hsize{%
- \hbox to \VerbatimHTMLWidth {%
- \ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
- \FV@LeftListNumber%
- \FancyVerbFormatLine{#1}%
- \hss%
- \FV@RightListNumber%
- }%
- \hss% required to avoid underfull hboxes
-}
-}
-
-\def\FV@ListProcessLine@i#1{%
- \ifvoid\@labels\else
- \hbox to \z@{\kern\@totalleftmargin\box\@labels\hss}%
- \fi
- \FV@ListProcessLine{#1}%
-}
-
-\def\FV@ListProcessLastLine{}
-
+\LWR@formatted{FV@SingleFrameLine}
\xpretocmd{\FV@BeginVBox}
{%
- \LWR@forcenewpage% instead of \preto
+ \LWR@forcenewpage%
\LWR@atbeginverbatim{bverbatim}%
}
{}
@@ -271,6 +458,22 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
} % \AfterEndPreamble
+\def\FVB@VerbatimOut#1{%
+ \@bsphack
+ \begingroup
+ \FV@UseKeyValues
+ \FV@DefineWhiteSpace
+ \def\FV@Space{\space}%
+ \FV@DefineTabOut
+ \def\FV@ProcessLine{\immediate\write\FV@OutFile}%
+ \immediate\openout\FV@OutFile #1\relax
+ \let\FV@FontScanPrep\relax
+%% DG/SR modification begin - May. 18, 1998 (to avoid problems with ligatures)
+ \let\@noligs\relax
+%% DG/SR modification end
+ \boolfalse{LWR@HTMLsanitize@tmpb@enable}% lwarp
+ \FV@Scan}
+
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty
index 066d023bdee..520c1b3d10c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty
@@ -59,9 +59,9 @@
}
\def\fn@endnote{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}\LWR@orignewline%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
}
\def\fn@startfntext{%
\setbox\z@\vbox\bgroup%
@@ -74,7 +74,7 @@
\def\fn@endfntext{%
\fn@postfntext%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
\LWR@orignewline%
\egroup%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fvextra.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fvextra.sty
index 414c82ff44f..0dcb88103aa 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fvextra.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fvextra.sty
@@ -15,28 +15,25 @@
%% 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{fvextra}[2022/11/30]
+\LWR@ProvidesPackagePass{fvextra}[2023/11/28]
\define@booleankey{FV}{obeytabs}%
+ {\let\FV@ObeyTabsInit\relax}% lwarp
{\let\FV@ObeyTabsInit\relax}
- {\let\FV@ObeyTabsInit\relax}
-
-\define@key{FV}{tabcolor}%
- {}
-\define@key{FV}{tab}{}
+\define@key{FV}{tabcolor}{}%
\define@booleankey{FV}{showtabs}%
- {\let\FV@TabChar\relax}
+ {\def\FV@TabChar{\FV@TabColor{\FancyVerbTab}}}%
{\let\FV@TabChar\relax}
\newbool{LWR@FV@breaklines}
\define@booleankey{FV}{breaklines}%
- {\boolfalse{FV@breaklines}
- \booltrue{LWR@FV@breaklines}
- \let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}
- {\boolfalse{FV@breaklines}
- \boolfalse{LWR@FV@breaklines}
+ {\boolfalse{FV@breaklines}%
+ \booltrue{LWR@FV@breaklines}% lwarp
+ \let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}% lwarp
+ {\boolfalse{FV@breaklines}%
+ \boolfalse{LWR@FV@breaklines}% lwarp
\let\FV@ListProcessLine\FV@ListProcessLine@NoBreak}
\define@key{FV}{breakanywheresymbolpre}{\def\FancyVerbBreakAnywhereSymbolPre{}}
@@ -66,6 +63,29 @@
\define@key{FV}{breaksymbolright}{\def\FancyVerbBreakSymbolRight{}}
\fvset{breaksymbolright={}}
+\def\FV@DefFVSpace{%
+ \ifbool{FV@showspaces}%
+ {%
+ \def\FV@Space{%
+ \FV@SpaceColor{\FancyVerbSpace}%
+ \allowbreak%
+ }%
+ }%
+ {\def\FV@Space{\nobreakspace\allowbreak}}%
+}
+
+\ifxetexorluatex
+\def\FancyVerbSpace{\textvisiblespace}
+\else
+\@ifundefined{verbvisiblespace}%
+ {%
+ \@ifundefined{textvisiblespace}%
+ {\begingroup\catcode`\ =12 \gdef\FancyVerbSpace{\tt }\endgroup}
+ {\def\FancyVerbSpace{\textvisiblespace}}
+ }%
+ {\def\FancyVerbSpace{\verbvisiblespace}}
+\fi
+
\def\FV@ListProcessLine@NoBreak#1{%
\FV@LeftListNumber%
\FV@LeftListFrame%
@@ -76,7 +96,6 @@
\FV@RightListNumber%
\null\par% lwarp
}
-
\newcommand*{\LWR@FV@linethensep}{%
\ifbool{LWR@FV@breaklines}%
{\theFancyVerbLine\kern\FV@NumberSep}%
@@ -89,78 +108,198 @@
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}%
}
-\xpatchcmd{\FV@Numbers@left}
+\xpatchcmd{\FV@Numbers@left}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@left A}}
-\xpatchcmd{\FV@Numbers@left}
+\xpatchcmd{\FV@Numbers@left}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@left B}}
-\xpatchcmd{\FV@Numbers@left}
+\xpatchcmd{\FV@Numbers@left}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@left C}}
-\xpatchcmd{\FV@Numbers@right}
+\xpatchcmd{\FV@Numbers@right}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@right A}}
-\xpatchcmd{\FV@Numbers@right}
+\xpatchcmd{\FV@Numbers@right}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@right B}}
-\xpatchcmd{\FV@Numbers@right}
+\xpatchcmd{\FV@Numbers@right}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@right C}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both A}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both B}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both C}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both D}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\kern\FV@NumberSep\theFancyVerbLine\hss}}
{\LWR@FV@septhenline}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both E}}
-\xpatchcmd{\FV@Numbers@both}
+\xpatchcmd{\FV@Numbers@both}%
{\hbox to\z@{\hss\theFancyVerbLine\kern\FV@NumberSep}}
{\LWR@FV@linethensep}
{}
{\LWR@patcherror{fvextra}{FV@Numbers@both F}}
+\def\FVC@SaveVerb@Extra@ii#1#2#3{%
+ \global\let\FV@AfterSave\FancyVerbAfterSave
+ \endgroup
+ \@namedef{FV@SV@#1}{\LWR@HTMLsanitize@use@tmpb{#3}}% lwarp
+ \@namedef{FV@SVRaw@#1}{\LWR@HTMLsanitize@use@tmpb{#2}}% lwarp
+ \FV@AfterSave}%
+
+\def\FV@UseVerb@Extra#1{%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \ifFV@breaklines
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{#1}}%
+ {\mbox{#1}}%
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+ \endgroup}
+
+\def\FVC@Verb@Extra@ii#1{%
+ \def\tmpb{#1}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \ifFV@breaklines
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{\tmpb}}% lwarp
+ {\mbox{\tmpb}}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+ \endgroup}
+
+\def\FVC@EscVerb@ii#1{%
+ \def\tmpb{#1}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{span class=\textquotedbl{}fancyvrb\textquotedbl}}% lwarp
+ {}% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \ifFV@breaklines
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\FV@InsertBreaks{\FancyVerbFormatInline}{\tmpb}}% lwarp
+ {\mbox{\tmpb}}% lwarp
+ \ifbool{LWR@verbtags}% lwarp
+ {\LWR@htmltag{/span}}% lwarp
+ {}% lwarp
+ \endgroup}
+
+\xpatchcmd{\FVB@VerbatimWrite}
+ {\FV@Scan}
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
+ {}
+ {\LWR@patcherror{fvextra}{FVB@VerbatimWrite}}
+
+\xpatchcmd{\FVB@VerbatimBuffer}
+ {\FV@Scan}
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}\FV@Scan}
+ {}
+ {\LWR@patcherror{fvextra}{FVB@VerbatimBuffer}}
+
+\renewcommand{\VerbatimInsertBuffer}[1][]{%
+ \begingroup
+ \def\FV@KeyValues{#1}%
+ \def\FV@Scan{%
+ \FV@CatCodes
+ \xdef\FV@EnvironName{Verbatim}%
+ \ifnum\expandafter\value\expandafter{\FV@bufferlengthname}=\z@\relax
+ \PackageError{fvextra}%
+ {Buffer length counter \FV@bufferlengthname\space is invalid or zero}%
+ {}%
+ \let\FV@GetLine\relax
+ \fi
+ \FV@GetLine}%
+ \let\FV@CheckScan\relax
+ \setcounter{FancyVerbBufferIndex}{1}%
+ \def\VerbatimInsertBuffer@def@FV@Line##1{%
+ \FVExtraRetokenizeVArg{\def\FV@Line}{}{##1}%
+ \LetLtxMacro\tmpb\FV@Line% lwarp
+ \LWR@HTMLsanitize@tmpb% lwarp
+ \LetLtxMacro\FV@Line\tmpb% lwarp
+ }%
+ \def\FancyVerbGetLine{%
+ \ifnum\value{FancyVerbBufferIndex}>%
+ \expandafter\value\expandafter{\FV@bufferlengthname}\relax
+ \global\let\FV@EnvironName\relax
+ \let\next\relax
+ \else
+ \ifcsname \FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
+ \expandafter\let\expandafter\FV@Line@Buffer
+ \csname\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}\endcsname
+ \expandafter\VerbatimInsertBuffer@def@FV@Line\expandafter{\FV@Line@Buffer}%
+ \def\next{\FV@PreProcessLine\FV@GetLine}%
+ \stepcounter{FancyVerbBufferIndex}%
+ \else
+ \def\next{%
+ \PackageError{fvextra}%
+ {Buffer with line macro named
+ "\FancyVerbBufferLineName\arabic{FancyVerbBufferIndex}" does not exist}%
+ {Check bufferlinename, bufferlengthname, and globalbuffer settings}%
+ }%
+ \fi
+ \fi
+ \next}%
+ \FVB@Verbatim
+ \FVE@Verbatim
+ \setcounter{FancyVerbBufferIndex}{0}%
+ \endgroup}
+
+
\endinput
%%
%% End of file `lwarp-fvextra.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index e7637fd3922..8b0d5432dd6 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -306,7 +306,7 @@
\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
{%
- \LWR@origtilde \LWR@orignewline%
+ \LWR@orignobreakspace \LWR@orignewline%
\begin{LWR@setvirtualpage}%
\large%
\hbadness=10000\relax%
@@ -347,7 +347,8 @@
bool {LWR@igkeepaspectratio}
}{\LWR@ig@useactualimagesize{#1}{#2}{#3}{#4}}{}%
\LWR@traceinfo{LWR@includegraphicsb: about to create href}%
- \LWR@href{\LWR@parsedfilename}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
+ \LWR@href@partsanitized{\LWR@parsedfilename}%
{% start of href
\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
\LWR@htmltag{\LWR@ig@htmltag}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
index 50865b64bb3..4addf49152a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
@@ -284,10 +284,10 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\NewDocumentCommand{\LWR@hyperimageb}{m +m}{%
\LWR@ensuredoingapar%
- \def\LWR@templink{#1}%
- \@onelevel@sanitize\LWR@templink%
+ \edef\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
\LWR@htmltag{%
- img src=\textquotedbl\LWR@templink\textquotedbl\ %
+ img src=\textquotedbl\tmpb\textquotedbl\ %
alt=\textquotedbl#2\textquotedbl\ %
class=\textquotedbl{}hyperimage\textquotedbl%
}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-minted.sty
index 1fa63587466..1006f44b2fd 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}[2022/12/12]
+\LWR@ProvidesPackagePass{minted}[2023/09/12]
\renewcommand{\setminted}[2][]{%
\ifthenelse{\equal{#1}{}}%
{\setkeys{minted@opt@g}{%
@@ -39,7 +39,6 @@
#2,
mathescape=false,breaklines,texcomments=false,highlightlines={}% lwarp
}}}
-
\xpatchcmd{\RobustMintInlineProcess}
{\setkeys{minted@opt@cmd}{#1}}
{%
@@ -47,6 +46,9 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -58,6 +60,9 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -69,6 +74,9 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{minted}}
@@ -79,12 +87,13 @@
#1,%
mathescape=false,breaklines,texcomments=false,highlightlines={}%
}%
+ \ifbool{minted@draft}%
+ {\booltrue{LWR@HTMLsanitize@tmpb@enable}}%
+ {\boolfalse{LWR@HTMLsanitize@tmpb@enable}}%
}
{}
{\LWR@patcherror{minted}{inputminted}}
-
-
\renewenvironment{minted@snugshade*}[1]%
{%
\colorlet{shadecolor}{#1}%
@@ -94,6 +103,22 @@
\end{snugshade*}%
}
+\xpatchcmd{\minted@input}
+ {\input{#1}}
+ {%
+ \LWR@minted@overrides%
+ \input{#1}%
+ }
+ {}
+ {\LWR@patcherror{minted}{minted@input}}
+
+\newcommand*{\LWR@minted@overrides}{
+\def\PYGZam{\char`\&amp;}
+\def\PYGZlt{\char`\&lt;}
+\def\PYGZgt{\char`\&gt;}
+\def\PYGZsq{\char`\&apos;}
+}
+
\endinput
%%
%% End of file `lwarp-minted.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty
index 48b7403899e..a124053dc8e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty
@@ -50,7 +50,7 @@
\LWR@formatted{musDottedNote}
\NewDocumentCommand{\LWR@HTML@musMeter}{ m m }{%
-\begin{lateximage}*[#1/#2][#1#2]*%
+\begin{lateximage}*[#1/#2]*[#1#2]%
\musStack{#1 #2}\kern0.05em%
\end{lateximage}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
index 96295c0f191..6d1e6f31f26 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
@@ -752,12 +752,14 @@
\renewcommand*{\shortsubcaption}{}
\renewcommand*{\normalsubcaption}{}
+\AfterEndPreamble{%
\RenewDocumentEnvironment{sidecaption}{o m o}
{}
{%
\IfValueTF{#1}{\caption[#1]{#2}}{\caption{#2}}%
\IfValueT{#3}{\label{#3}}%
}
+}
\renewcommand*{\setsidecaps}[2]{}
\renewcommand*{\sidecapmargin}[1]{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-simplebnf.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-simplebnf.sty
index 868dec83f18..3bbcc4a06fd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-simplebnf.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-simplebnf.sty
@@ -15,81 +15,35 @@
%% 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{simplebnf}[2022/05/08]
+\LWR@ProvidesPackagePass{simplebnf}[2023-11-25]
\ExplSyntaxOn
-\RenewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b }
+\RenewDocumentEnvironment { bnf } { d() O{llcll} +b }
{
- \regex_gset:Nn \g_simplebnf_rhs_newline_r { #2 }
- \regex_gset:Nn \g_simplebnf_rhs_nb_r { #3 }
-
- %% \l__input_seq is a list of term definitions.
- \regex_split:nnN { ;; } { #4 } \l__input_seq
- \begin{center}
- \begin{lateximage}[#4]% lwarp
- \tl_set:Nn \l__table_tl
- {
- \begin{tabular}{#1}
- }
-
- \bool_set_true:N \l_tmp_first_term % Is this the first term in this grammar?
- \seq_map_inline:Nn \l__input_seq
- {
- %% If not-first, add newline
- \bool_if:NTF \l_tmp_first_term
- {
- \bool_set_false:N \l_tmp_first_term
- }
- {
- \tl_put_right:Nn \l__table_tl { \\ }
- }
-
- \regex_split:nnNTF { ::= } { ##1 } \l__term_seq
- % Parse a ::= definition
- {
- %% \l__term_seq - (lhs, rhses)...
- %% \l__term_tl - lhs
- %% \l__keypairs_tl - rhses
- \seq_pop_left:NN \l__term_seq \l__term_tl
- \seq_pop_left:NN \l__term_seq \l__keypairs_tl
+ \begin{lateximage}[bnf:\space\detokenize{#3}]% lwarp
- \simplebnf_typeset_lhs:n{\l__term_tl}
- \tl_put_right:Nn \l__table_tl
- {
- & \SimpleBNFDefEq &
- }
- %% \l__keypairs_seq - (rhs:annot | rhs)...
- \regex_split:NVN \g_simplebnf_rhs_newline_r \l__keypairs_tl \l__keypairs_seq
+ \IfNoValueF { #1 }
+ { \keys_set:nn { simplebnf } { #1 } }
- \bool_set_true:N \l__first_rhs
- \seq_map_function:NN \l__keypairs_seq \simplebnf_typeset_rhs:n
- }
- {
- % Else, parse a \in declaration
- \regex_split:nnNTF { \c{in} } { ##1 } \l__term_seq
- {
- %% \l__term_seq - (lhs, rhs)
- \seq_pop_left:NN \l__term_seq \l_tmpa_tl
+ \__simplebnf_build_grammar:n { #3 }
- \simplebnf_typeset_lhs:n{\l_tmpa_tl}
- \tl_put_right:Nn \l__table_tl
- {
- & $\in$ & $
- }
- \seq_pop_left:NN \l__term_seq \l_tmpa_tl
- \tl_put_right:NV \l__table_tl \l_tmpa_tl
- \tl_put_right:Nn \l__table_tl
- {
- $ &
- }
- }
- { \msg_error:nn {simplebnf} { Could not parser ##1 } }
- }
- }
+ \begin{@simplebnf_tblr_env}[expand=\l__simplebnf_table_tl]{#2}
+ \tl_use:N \l__simplebnf_table_tl
+ \end{@simplebnf_tblr_env}
+ \end{lateximage}% lwarp
+ }
+ { }
- \tl_put_right:Nn \l__table_tl { \end{tabular} }
- \tl_use:N \l__table_tl
- \end{lateximage}% lwarp
+\RenewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b }
+ {
+ \msg_warning:nn { simplebnf } { dep }
+ \begin{center}
+ \begin{lateximage}[bnf:\space\detokenize{#4}]% lwarp
+ \begin{tabular}{#1}
+ \@dep__simplebnf_typeset_grammar:nnn { #2 } { #3 } { #4 }
+ \tl_use:N \l__simplebnf_table_tl
+ \end{tabular}
+ \end{lateximage}% lwarp
\end{center}
}
{ }
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
index f2f3552d05c..92b342dca0f 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
@@ -25,7 +25,7 @@
\RequirePackage{xcolor}% for \convertcolorspec
-\LWR@ProvidesPackagePass{siunitx}[2022-02-15]
+\LWR@ProvidesPackagePass{siunitx}[2023-11-14]
\ExplSyntaxOn
@@ -43,13 +43,14 @@
{
\tl_set:Nn \l__siunitx_number_outputted_tl
{
+ \boolfalse{mathjax}% lwarp
\LWR@subsingledollar{% lwarp
- \textbackslash( % space
+ \textbackslash( % space lwarp ALT text
\LWR@HTMLsanitizedetokenized{%
\detokenize{#1}%
} \textbackslash)% lwarp
}%
- {siunitx unparsed}%
+ {siunitx unparsed}% lwarp add'l hashing
{\ensuremath{#1}}% lwarp
}
}
@@ -61,80 +62,90 @@
\tl_if_blank:nF {#1}
{ \seq_put_right:Nn \l__siunitx_compound_tmp_seq
{
+ \boolfalse{mathjax}% lwarp
\LWR@subsingledollar{% lwarp
- \textbackslash( % space
+ \textbackslash( % space lwarp ALT tag
\LWR@HTMLsanitizedetokenized{%
\detokenize{#1}%
} \textbackslash)% lwarp
}%
- {siunitx unparsed}%
+ {siunitx unparsed}% lwarp add'l hashing
{\ensuremath{#1}}% lwarp
}
}
}
+\LetLtxMacro\LWR@siunitx@orig@mathrm\mathrm
+
+\newcommand*{\LWR@siunitx@mathrm}[1]{%
+ \ifmmode{\LWR@siunitx@orig@mathrm{#1}}\else{#1}\fi%
+}
\cs_set_protected:Npn \__siunitx_print_aux:nn #1#2
{
- \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
- { \use:n }
- { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
- {
- \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp
- {
- \use:c
- {
- siunitx_print_
- \tl_use:c { l__siunitx_print_ #1 _mode_tl } :n
- }
- {#2}
- }
+ \LetLtxMacro\mathrm\LWR@siunitx@mathrm% lwarp
+ \tl_if_empty:oF {#2}
+ {
+ \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
+ { \use:n }
+ { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
{
- \bool_lazy_all:nTF% lwarp
- {
- {\l__siunitx_print_text_family_bool}
- {\l__siunitx_print_text_series_bool}
- {\l__siunitx_print_text_shape_bool}
- }
- {% No font control if reset-text-family/series/shape
- \use:c
- {
- siunitx_print_% lwarp
- text% lwarp
- :n% lwarp
- }% lwarp
- {#2}% lwarp
- }
- {
- \LWR@textcurrentfont{% lwarp
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp
+ {
+ \use:c
+ {
+ siunitx_print_
+ \tl_use:c { l__siunitx_print_ #1 _mode_tl } :n
+ }
+ {#2}
+ }
+ {
+ \bool_lazy_all:nTF% lwarp
+ {
+ {\l__siunitx_print_text_family_bool}
+ {\l__siunitx_print_text_series_bool}
+ {\l__siunitx_print_text_shape_bool}
+ }
+ {% No font control if reset-text-family/series/shape
\use:c
{
- siunitx_print_% lwarp
- text% lwarp
- :n% lwarp
- }% lwarp
- {#2}% lwarp
+ siunitx_print_% lwarp
+ text% lwarp
+ :n% lwarp
+ }% lwarp
+ {#2}% lwarp
}
- }
+ {
+ \LWR@textcurrentfont{% lwarp
+ \use:c
+ {
+ siunitx_print_% lwarp
+ text% lwarp
+ :n% lwarp
+ }% lwarp
+ {#2}% lwarp
+ }
+ }
+ }
}
- }
- }
+ }
+}
\newcommand*{\LWR@siunitx@complexrootstyle}{textrm}
\newcommand*{\LWR@siunitx@complexrmi}{\mathrm{i}}
\newcommand*{\LWR@siunitx@complexrmj}{\mathrm{j}}
\newcommand*{\LWR@siunitx@setcomplexroot}{%
- \renewcommand*{\LWR@siunitx@complexrootstyle}{textit}%
+ \renewcommand*{\LWR@siunitx@complexrootstyle}{ijit}%
\ifdefequal{\l__siunitx_complex_output_root_tl}{\LWR@siunitx@complexrmi}%
- {\renewcommand*{\LWR@siunitx@complexrootstyle}{textrm}}%
+ {\renewcommand*{\LWR@siunitx@complexrootstyle}{ijup}}%
{}%
\ifdefequal{\l__siunitx_complex_output_root_tl}{\LWR@siunitx@complexrmj}%
- {\renewcommand*{\LWR@siunitx@complexrootstyle}{textrm}}%
+ {\renewcommand*{\LWR@siunitx@complexrootstyle}{ijup}}%
{}%
}
-\cs_set_protected:Npn \__siunitx_complex_format_auxii:n #1
+\cs_set_protected:Npn \__siunitx_complex_format_cartesian_auxii:n #1
{
\LWR@siunitx@setcomplexroot% lwarp
- \__siunitx_complex_format_units:n {#1}
+ \__siunitx_complex_format_cartesian_units:n {#1}
\tl_if_empty:NF \l__siunitx_complex_real_tl
{ \exp_after:wN \__siunitx_complex_drop_exponent:nnnnnnn \l__siunitx_complex_real_tl }
\exp_after:wN \__siunitx_complex_format_sign:nnnnnnn \l__siunitx_complex_img_tl
@@ -307,13 +318,14 @@
{ \__siunitx_quantity_parsed:nn {#1} {#2} }
{
\tl_set:Nn \l__siunitx_quantity_number_tl {
+ \boolfalse{mathjax}% lwarp
\LWR@subsingledollar{% lwarp
- \textbackslash( % space
+ \textbackslash( % space lwaro ALT tag
\LWR@HTMLsanitizedetokenized{%
\detokenize{#1}%
} \textbackslash)% lwarp
}%
- {siunitx unparsed}%
+ {siunitx unparsed}% lwarp add'l hashing
{\ensuremath{#1}}% lwarp
}
\siunitx_unit_format:nN {#2} \l__siunitx_quantity_unit_tl
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty
index d346c27e52f..9f53d91cccd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.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{tcolorbox}[2023/02/12]
+\LWR@ProvidesPackagePass{tcolorbox}[2023/06/19]
\newbool{LWR@havetcblower}
\boolfalse{LWR@havetcblower}
\newcommand{\LWR@tcolorbox@findcolors}{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
index cf66c76a9ea..844fe5e0e73 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
@@ -42,8 +42,8 @@
\newcommand*{\LWR@currenttextcolorstyle}{%
\LWR@findcurrenttextcolor%
\ifdefstring{\LWR@tempcolor}{000000}%
- {}%
- {color: \LWR@origpound\LWR@tempcolor ; }%
+ {}%
+ {color: \LWR@origpound\LWR@tempcolor ; }%
}
\DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{%
\begingroup%
@@ -227,58 +227,6 @@
}
\LWR@formatted{boxframe}
-\newcommand*{\LWR@xcolortempcolor}{}
-
-\def\rowc@l@rs[#1]#2#3#4%
-{%
- \rownum=1%
- \@rowcolorstrue%
- \@ifxempty{#3}%
- {\def\@oddrowcolor{\@norowcolor}}%
- {%
- \convertcolorspec{named}{#3}{HTML}\LWR@xcolortempcolor%
- \edef\@oddrowcolor{%
- \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
- }%
- }%
- \@ifxempty{#4}%
- {\def\@evenrowcolor{\@norowcolor}}%
- {%
- \convertcolorspec{named}{#4}{HTML}\LWR@xcolortempcolor%
- \edef\@evenrowcolor{%
- \csdef{LWR@xcolorrowHTMLcolor}{\LWR@xcolortempcolor}%
- }%
- }%
- \if@rowcmd
- \def\@rowcolors
- {%
- \if@rowcolors
- \relax\ifnum\rownum<#2\@norowcolor\else
- \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi%
- \fi%
- }%
- \else
- \def\@rowcolors
- {%
- \if@rowcolors
- \ifnum\rownum<#2%
- \@norowcolor
- \else
- \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi%
- \fi
- \fi%
- }%
- \fi
- \ignorespaces%
-}
-\def\@norowcolor{%
- \renewcommand{\LWR@xcolorrowHTMLcolor}{}%
-}
-
-\def\@rowc@lors{%
- \advance\rownum\@ne%
- \@rowcolors%
-}
\endinput
%%
%% End of file `lwarp-xcolor.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 1fc21a62319..16540b22088 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}
- [2023/08/28 v0.912 Allows LaTeX to directly produce HTML5 output.]
+ [2024/01/05 v0.913 Allows LaTeX to directly produce HTML5 output.]
@@ -28,7 +28,7 @@
\RequirePackage{iftex}[2019/11/07]
\RequirePackage{ifpdf}
-\RequirePackage{ifptex}
+\RequirePackage{ifptex}% in case TL2019 or earlier
\newif\ifxetexorluatex
@@ -299,6 +299,7 @@
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
\LWR@notmemoirloadafter{appendix}
+\LWR@loadafter{apxproof}
\LWR@loadafter{ar}
\LWR@loadafter{arabicfront}
\LWR@notmemoirloadafter{array}
@@ -380,6 +381,7 @@
\LWR@loadafter{decorule}
\LWR@loadafter{diagbox}
\LWR@loadafter{dingbat}
+\LWR@loadafter{doipubmed}
\LWR@loadafter{DotArrow}
\LWR@loadafter{dotlessi}
\LWR@loadafter{dprogress}
@@ -821,7 +823,9 @@
or \protect\mdfivesum.%
}
}
-\let\LWR@mdfive\pdfmdfivesum
+\ifdef{\pdfmdfivesum}
+ {\let\LWR@mdfive\pdfmdfivesum}
+ {}
\ifLuaTeX
\RequirePackage{pdftexcmds}
\let\LWR@mdfive\pdf@mdfivesum
@@ -981,7 +985,7 @@
\setcounter{LWR@texboxdepth}{0}
\newcommand*{\LWR@maybe@orignewpage}{%
\LWR@traceinfo{LWR@maybe@orignewpage}%
- \ifnumgreater{\value{LWR@texboxdepth}}{0}
+ \ifnumgreater{\value{LWR@texboxdepth}}{0}%
{}%
{\LWR@orignewpage}%
\LWR@traceinfo{LWR@maybe@orignewpage done}%
@@ -2059,7 +2063,8 @@
\chardef\LWR@origpound=`\#
\let\LWR@origcomma\,
-\let\LWR@origtilde~
+\LetLtxMacro\LWR@origtilde~
+\LetLtxMacro\LWR@orignobreakspace\nobreakspace
\let\LWR@orighfil\hfil
\let\LWR@orighss\hss
\let\LWR@origllap\llap
@@ -2512,6 +2517,10 @@ span.textup, div.textup {
font-variant-numeric: normal ;
}
+/* For complex number i,j symbols */
+span.ijit {font-style: italic; font-variant: normal}
+span.ijup {font-style: normal; font-variant: normal}
+
span.textsc, div.textsc {
font-variant: small-caps;
font-variant-numeric: oldstyle-nums ;
@@ -3066,8 +3075,10 @@ span.abstractrunintitle{
}
.fancyvrb {
- font-size:.85em ;
- margin: 3ex 0pt 3ex 0pt
+ margin: 3ex 0pt 3ex 0pt ;
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
}
.fancyvrblabel {
@@ -3605,7 +3616,7 @@ div.programlisting pre.verbatim span.callout{
font-size: .85em ;
}
-span.verbatim {
+span.verbatim, span.verb {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
"Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
"Courier New", monospace;
@@ -4868,9 +4879,9 @@ MathJax = {
\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2023 Brian Dunn
+-- Copyright 2016-2024 Brian Dunn
-printversion = "v0.912"
+printversion = "v0.913"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -7046,7 +7057,7 @@ end -- not --version
}%
\@makefntext{#1}%
\ifbool{LWR@spewingnotes}{}{%
- \LWR@origtilde\LWR@orignewline%
+ \LWR@orignobreakspace\LWR@orignewline%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
\LWR@orignewline%
}%
@@ -7389,29 +7400,70 @@ end -- not --version
}
\egroup
+\newbool{LWR@HTMLsanitize@tmpb@enable}
+\booltrue{LWR@HTMLsanitize@tmpb@enable}
+
+\newbool{LWR@HTMLsanitize@tmpb@removebackslash}
+\booltrue{LWR@HTMLsanitize@tmpb@removebackslash}
+
\newbool{LWR@MathJax@silentquotes}
\boolfalse{LWR@MathJax@silentquotes}
-\catcode`\#=12
\catcode`\&=12
-\newcommand{\LWR@subHTMLsanitize}{%
- \edef\tmpb{\detokenize\expandafter{\LWR@strresult}}%
- \LWR@replacestrings{&}{&amp;}%
- \LWR@replacestrings{<}{&lt;}%
- \LWR@replacestrings{>}{&gt;}%
- \ifbool{LWR@MathJax@silentquotes}
+\newcommand*{\LWR@HTMLsanitize@tmpb}{%
+ \ifbool{LWR@HTMLsanitize@tmpb@enable}%
+ {%
+ \LWR@replacestrings{&}{&amp;}% must be first because & is used for lt, gt, etc.
+ \LWR@replacestrings{<}{&lt;}%
+ \LWR@replacestrings{>}{&gt;}%
+ \LWR@replacestrings{'}{&apos;}%
+ \LWR@replacestrings{`}{&grave;}%
+ \LWR@replacestrings{_}{\detokenize{_}}%
+ \ifbool{LWR@HTMLsanitize@tmpb@removebackslash}%
{%
- \expandafter\LWR@replacestrings\expandafter{\LWRbackslash"}{}%
- \LWR@replacestrings{"}{}%
+ \def\@tempa{\LWR@replacestrings}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\detokenize{\#}}}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\LWRhash}}%
+ \@tempa%
+ \def\@tempa{\LWR@replacestrings}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\detokenize{\%}}}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\LWRpercent}}%
+ \@tempa%
+ \def\@tempa{\LWR@replacestrings}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\detokenize{\&}}}%
+ \expandafter\appto\expandafter\@tempa\expandafter{\expandafter{\LWRamp}}%
+ \@tempa%
}%
- {\LWR@replacestrings{"}{&quot;}}%
- \LWR@replacestrings{'}{&apos;}%
- \LWR@replacestrings{`}{&grave;}%
+ {}%
+ \ifbool{LWR@MathJax@silentquotes}
+ {%
+ \expandafter\LWR@replacestrings\expandafter{\LWRbackslash"}{}%
+ \LWR@replacestrings{"}{}%
+ }%
+ {\LWR@replacestrings{"}{&quot;}}%
+ }% enabled
+ {}% not enabled
+}
+\catcode`\&=4
+
+\newcommand{\LWR@HTMLsanitize@use@tmpb}[1]{%
+ \ifbool{LWR@HTMLsanitize@tmpb@enable}%
+ {%
+ \def\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
+ \tmpb%
+ }%
+ {#1}%
+}
+
+\catcode`\#=12
+\newcommand{\LWR@subHTMLsanitize}{%
+ \edef\tmpb{\detokenize\expandafter{\LWR@strresult}}%
+ \LWR@HTMLsanitize@tmpb%
\LWR@replacestrings{##}{#}%
\edef\LWR@strresult{\detokenize\expandafter{\tmpb}}%
}
\catcode`\#=6
-\catcode`\&=4
\newrobustcmd{\LWR@HTMLsanitizedetokenized}[1]{%
\LWR@traceinfo{LWR@HTMLsanitizedetokenized !#1!}%
@@ -7456,6 +7508,7 @@ end -- not --version
\newcommand*{\LWR@subcustomizedmathjax}[1]{%
\begingroup%
\LWR@hook@processingtags%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\edef\LWR@strresult{\detokenize{#1}}%
\LWR@subHTMLsanitize%
\xdef\LWR@customizedMathJax{%
@@ -8158,6 +8211,7 @@ end -- not --version
\begingroup%
\LWR@restoreoriglists%
\boolfalse{LWR@verbtags}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\IfFileExists{\LWR@mathjaxfilename}%
{\verbatiminput{\LWR@mathjaxfilename}}%
{%
@@ -8169,7 +8223,6 @@ end -- not --version
}%
{Specify an existing file, or remove \protect\MathJaxFilename.}%
}%
- \booltrue{LWR@verbtags}%
\endgroup%
\LWR@stoppars%
}% end of mathjax
@@ -8284,7 +8337,7 @@ end -- not --version
\LWR@stoppars
\LWR@closeprevious{finished}
\LWR@printpendingfootnotes
-\label{\BaseJobname-autofile-last}\LWR@origtilde\LWR@orignewline
+\label{\BaseJobname-autofile-last}\LWR@orignobreakspace\LWR@orignewline
\LWR@htmlelementclassend{section}{textbody}
\LWR@htmlelementclassend{main}{bodycontainer}
\LWR@htmlelementclassend{div}{bodyandsidetoc}
@@ -8675,6 +8728,14 @@ end -- not --version
\begin{warpHTML}
+\ifxetexorluatex
+
+\newcommand*{\LWR@HTML@@setupverbvisiblespace}{\let\@xobeysp\textvisiblespace}
+
+\LWR@formatted{@setupverbvisiblespace}
+
+\fi
+
\newbool{LWR@verbtags}
\booltrue{LWR@verbtags}
@@ -8682,13 +8743,17 @@ end -- not --version
\def\LWR@verb@egroup@endspan{%
\LWR@orig@verb@egroup%
- \LWR@htmltag{/span}%
+ \ifbool{LWR@verbtags}%
+ {\LWR@htmltag{/span}}%
+ {}%
\endgroup%
}
\xpretocmd{\verb}
{%
\begingroup%
- \LWR@htmltag{span class=\textquotedbl{}texttt\textquotedbl}%
+ \ifbool{LWR@verbtags}%
+ {\LWR@htmltag{span class=\textquotedbl{}verb\textquotedbl}}%
+ {}%
\let\verb@egroup\LWR@verb@egroup@endspan%
}
{}
@@ -8701,25 +8766,38 @@ end -- not --version
\setlength{\topsep}{0pt}%
\setlength{\partopsep}{0pt}%
\hbadness=10000\relax%
-\ifbool{LWR@verbtags}{%
- \LWR@htmltag{pre class=\textquotedbl#2\textquotedbl%
- \ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}%
+\ifbool{LWR@verbtags}%
+{%
+ \ifnumcomp{\value{LWR@spandepth}}{=}{0}{%
+ \LWR@htmltag{pre class=\textquotedbl#2\textquotedbl%
+ \ifthenelse{\equal{#1}{}}{}{ style=\textquotedbl#1\textquotedbl}%
+ }%
+ \par%
+ }%
+ {% in a span
+ \LWR@spanwarnformat{verbatim}%
}%
- \par%
}{}%
\begingroup%
\LWR@print@normalfont%
\LWR@origttfamily%
-\LWR@print@scriptsize%
+\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}%
+ {\LWR@print@scriptsize}%
+ {}%
\LWR@restoreoriglists%
\LWR@hook@processingtags%
\let\hspace\LWR@print@hspace%
+\boolfalse{LWR@HTMLsanitize@nobreakspace}%
}
\newcommand*{\LWR@afterendverbatim}{%
\endgroup%
\par%
-\ifbool{LWR@verbtags}{%
+\ifboolexpr{
+ bool{LWR@verbtags} and
+ test {\ifnumcomp{\value{LWR@spandepth}}{=}{0}}
+}%
+{%
\noindent\LWR@htmltag{/pre}\par% pre
}{}%
\LWR@startpars%
@@ -8775,7 +8853,8 @@ end -- not --version
\let\enskip\LWR@print@enskip%
\let\quad\LWR@print@quad%
\let\qquad\LWR@print@qquad%
- \let~\LWR@origtilde%
+ \LetLtxMacro~\LWR@origtilde%
+ \LetLtxMacro\nobreakspace\LWR@orignobreakspace%
\let\,\LWR@origcomma%
\let\thinspace\LWR@print@thinspace%
\let\negthinspace\LWR@print@negthinspace%
@@ -9919,7 +9998,7 @@ end -- not --version
}%
\ifdimcomp{\LWR@templengthone}{>}{0pt}%
{%
- \LWR@origtilde tdrule#1#2%
+ \space tdrule#1#2%
\setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
}%
{%
@@ -11099,6 +11178,11 @@ end -- not --version
\LetLtxMacro\Nameref\nameref
+\def\NR@gettitle#1{%
+ \GetTitleString{#1}%
+ \let\@currentlabelname\GetTitleStringResult
+}
+
@@ -11125,15 +11209,24 @@ end -- not --version
\NewDocumentCommand{\LWR@subhyperref}{m}{%
\LWR@traceinfo{LWR@subhyperref !#1!}%
- \LWR@sanitize{#1}%
+ \edef\tmpb{\detokenize\expandafter{#1}}%
+ \LWR@HTMLsanitize@tmpb%
\LWR@htmltag{%
- a href=\textquotedbl\LWR@sanitized\textquotedbl\ % space
+ a href=\textquotedbl\tmpb\textquotedbl\ % space
\LWR@addlinktitle % space
target=\textquotedbl\_{}blank\textquotedbl\ % space
}%
}
-\newcommand{\LWR@subhyperreftext}[1]{%
+\newcommand{\LWR@subhyperreftext@sanitized}[1]{%
+ \edef\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
+ \tmpb%
+ \LWR@htmltag{/a}%
+ \LWR@ensuredoingapar%
+}
+
+\newcommand{\LWR@subhyperreftext@unsanitized}[1]{%
#1%
\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
@@ -11155,7 +11248,7 @@ end -- not --version
\LWR@ensuredoingapar%
\LWR@subhyperref{#2}%
\endgroup% restore catcodes
- \LWR@subhyperreftext%
+ \LWR@subhyperreftext@unsanitized% takes the following text as an argument
}
\newrobustcmd*{\LWR@href}{%
@@ -11164,11 +11257,37 @@ end -- not --version
\LWR@hrefb%
}
+\DeclareDocumentCommand{\LWR@hrefb@sanitized}{O{} m}{%
+ \LWR@ensuredoingapar%
+ \LWR@subhyperref{#2}%
+ \endgroup% restore catcodes
+ \LWR@subhyperreftext@sanitized% takes the following text as an argument
+}
+
+\newrobustcmd*{\LWR@href@sanitized}{%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@hrefb@sanitized%
+}
+
+\DeclareDocumentCommand{\LWR@hrefb@partsanitized}{O{} m}{%
+ \LWR@ensuredoingapar%
+ \LWR@subhyperref{#2}%
+ \endgroup% restore catcodes
+ \LWR@subhyperreftext@unsanitized% takes the following text as an argument
+}
+
+\newrobustcmd*{\LWR@href@partsanitized}{%
+ \begingroup%
+ \LWR@linkcatcodes%
+ \LWR@hrefb@partsanitized%
+}
+
\newcommand*{\LWR@nolinkurlb}[1]{%
\LWR@ensuredoingapar%
- \def\LWR@templink{#1}%
- \@onelevel@sanitize\LWR@templink%
- \LWR@templink%
+ \edef\tmpb{#1}%
+ \LWR@HTMLsanitize@tmpb%
+ \tmpb%
\endgroup%
}
@@ -11180,9 +11299,7 @@ end -- not --version
\DeclareDocumentCommand{\LWR@urlb}{m}{%
\LWR@ensuredoingapar%
- \def\LWR@templink{#1}%
- \@onelevel@sanitize\LWR@templink%
- \LWR@href{\LWR@templink}{\LWR@templink}%
+ \LWR@href@sanitized{#1}{#1}%
\endgroup%
}
@@ -11193,6 +11310,8 @@ end -- not --version
}
\newcommand*{\LWR@subinlineimage}[6]{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\ifblank{#6}%
{\renewcommand*{\LWR@tempone}{}}%
{\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}%
@@ -11215,6 +11334,7 @@ end -- not --version
class=\textquotedbl#2\textquotedbl \LWR@orignewline
}%
}%
+ \endgroup%
}
\end{warpHTML}
@@ -12065,7 +12185,8 @@ end -- not --version
\let\sp\LWR@origsp%
\let\sb\LWR@origsb%
\LetLtxMacro\underline\LWR@origunderline%
- \let~\LWR@origtilde%
+ \LetLtxMacro~\LWR@origtilde%
+ \LetLtxMacro\nobreakspace\LWR@orignobreakspace%
\LetLtxMacro\endtabular\LWR@origendtabular%
\csletcs{endtabular*}{LWR@origendtabular*}%
\LetLtxMacro\noalign\LWR@orignoalign%
@@ -12497,6 +12618,7 @@ end -- not --version
{%
\LWR@traceinfo{LWR@subsingledollar: Mathjax}%
{%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\textbackslash(%
{%
\ifmmode\else\LWR@print@ttfamily\fi%
@@ -12534,9 +12656,11 @@ end -- not --version
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{% intentional blank line:
+ \begingroup%
\IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{%
\LWR@hidelatexequation{math}{#1}%
\InlineClass{hidden}{\LWR@syncnotenumbers}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\textbackslash[%
{%
\LWR@print@ttfamily%
@@ -12544,14 +12668,17 @@ end -- not --version
}%
\textbackslash]
\InlineClass{hidden}{\LWR@syncnotenames}%
- }{%
+ }% yes note
+ {% no note
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\textbackslash[%
{%
\LWR@print@ttfamily%
\LWR@HTMLsanitizedetokenized{\detokenize{#1}}%
}%
\textbackslash]
- }%
+ }% no note
+ \endgroup%
}% mathjax
{% not mathjax
@@ -12576,6 +12703,8 @@ end -- not --version
\protected\gdef\LWR@singledollar#1${%
\LWR@traceinfo{LWR@singledollar}%
\ifbool{mathjax}{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@subsingledollar*%
{% alt tag
\textbackslash( %
@@ -12584,6 +12713,7 @@ end -- not --version
}%
{singledollar}% add'l hashing
{#1}% contents
+ \endgroup%
}{% not mathjax
\LWR@subsingledollar*%
{% alt tag
@@ -12612,6 +12742,8 @@ end -- not --version
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
+ \begingroup%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}%
{%
\protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
@@ -12620,6 +12752,7 @@ end -- not --version
\relax%
\LWR@origensuredmath{#1}%
}%
+ \endgroup%
}{% SVG math
\ifmmode%
\LWR@origensuredmath{#1}%
@@ -12753,7 +12886,7 @@ end -- not --version
}
\NewDocumentCommand{\LWR@addmathjax}{m +m}{%
- \LWR@origtilde\LWR@orignewline
+ \LWR@orignobreakspace\LWR@orignewline
{%
\LWR@print@ttfamily%
\textbackslash{}begin\{#1\}
@@ -12765,6 +12898,7 @@ end -- not --version
{\{\arabic{LWR@maxfields@}\}}%
{}%
\LWR@orignewline%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#2}}%
\LWR@orignewline%
\textbackslash{}end\{#1\}
@@ -12922,7 +13056,7 @@ end -- not --version
\newcommand*{\LWR@beginhideamsmath}{
\LWR@stoppars
- \LWR@origtilde\LWR@orignewline
+ \LWR@orignobreakspace\LWR@orignewline
\LWR@htmlopencomment
\begingroup
@@ -12950,6 +13084,7 @@ end -- not --version
{%
\LWR@syncmathjax%
\boolfalse{LWR@amsmultline}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@removebackslash}%
\ifbool{LWR@numbereqnarray}%
{%
\LWR@beginhideamsmath%
@@ -13128,6 +13263,8 @@ end -- not --version
\addtocounter{LWR@lateximagenumber}{1}%
\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}%
\boolfalse{mathjax}%
+ \boolfalse{LWR@verbtags}%
+ \boolfalse{LWR@HTMLsanitize@tmpb@enable}%
\LWR@ensuredoingapar%
\hbadness=10000\relax%
\addtocounter{LWR@externalfilecnt}{1}%
@@ -14121,9 +14258,9 @@ color:\LWR@origpound\LWR@tempcolor%
{\InlineClass{textnormal}{#1}}%
{%
\InlineClass{%
- text\LWR@f@family\LWR@origtilde{}%
- text\LWR@f@series\LWR@origtilde{}%
- text\LWR@f@shape\LWR@origtilde{}%
+ text\LWR@f@family\LWR@orignobreakspace{}%
+ text\LWR@f@series\LWR@orignobreakspace{}%
+ text\LWR@f@shape\LWR@orignobreakspace{}%
text\LWR@f@shapecaps%
}%
{#1}%
@@ -14135,9 +14272,9 @@ color:\LWR@origpound\LWR@tempcolor%
\newenvironment*{LWR@blocktextcurrentfont}{%
\LWR@stoppars%
\BlockClass{%
- text\LWR@f@family\LWR@origtilde{}%
- text\LWR@f@series\LWR@origtilde{}%
- text\LWR@f@shape\LWR@origtilde{}%
+ text\LWR@f@family\LWR@orignobreakspace{}%
+ text\LWR@f@series\LWR@orignobreakspace{}%
+ text\LWR@f@shape\LWR@orignobreakspace{}%
text\LWR@f@shapecaps%
}%
}{\endBlockClass\LWR@startpars}
@@ -14318,18 +14455,27 @@ color:\LWR@origpound\LWR@tempcolor%
\begin{warpHTML}
+\newbool{LWR@HTMLsanitize@nobreakspace}
+\booltrue{LWR@HTMLsanitize@nobreakspace}
\AtBeginDocument{%
\renewrobustcmd*{\,}{\HTMLunicode{202f}}% HTML thin non-breakable space, not using LWR@formatted
\newrobustcmd*{\LWR@HTML@thinspace}{\HTMLunicode{202f}}% HTML thin non-breakable space
\LWR@formatted{thinspace}
\newrobustcmd*{\LWR@HTML@negthinspace}{\HTMLunicode{202f}} % HTML thin non-breakable space
\LWR@formatted{negthinspace}
-\renewrobustcmd*{~}{\HTMLentity{nbsp}}% cannot use \LWR@formatted
+\renewrobustcmd*{~}{%
+ \ifbool{LWR@HTMLsanitize@nobreakspace}%
+ {\leavevmode\nobreak\HTMLentity{nbsp}}%
+ {\LWR@orignobreakspace}%
+}
+
+\LetLtxMacro\nobreakspace~
+\expandafter\LetLtxMacro\csname ?-\string\nobreakspace\endcsname~
\newrobustcmd*{\LWR@HTML@textellipsis}{\HTMLunicode{2026}}
\LWR@formatted{textellipsis}
\newrobustcmd*{\LWR@HTML@vdots}{\HTMLunicode{22EE}}
\LWR@formatted{vdots}
-}
+}% AtBeginDocument
\newcommand*{\LWR@font@size}{normalsize}
\newrobustcmd*{\LWR@HTML@normalsize}{\renewcommand*{\LWR@font@size}{normalsize}}