summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lwarp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-09 03:02:31 +0000
committerNorbert Preining <norbert@preining.info>2021-04-09 03:02:31 +0000
commit8ccafc1be8d24ff0c4126d40847afbedab7fc7fb (patch)
tree06fbb0b4fc6fa3865d719139f6a1f04aaa03c963 /macros/latex/contrib/lwarp
parent31d38d879db092b485e49e1b7c79f96c312fd1fb (diff)
CTAN sync 202104090302
Diffstat (limited to 'macros/latex/contrib/lwarp')
-rw-r--r--macros/latex/contrib/lwarp/README.txt2
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx2155
-rw-r--r--macros/latex/contrib/lwarp/lwarp.ins6
-rw-r--r--macros/latex/contrib/lwarp/lwarp.pdfbin3153568 -> 3184136 bytes
-rwxr-xr-xmacros/latex/contrib/lwarp/lwarpmk.lua2
5 files changed, 1676 insertions, 489 deletions
diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt
index f77e4ae669..bf13a2f01a 100644
--- a/macros/latex/contrib/lwarp/README.txt
+++ b/macros/latex/contrib/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.895 README.txt
+LaTeX lwarp package v0.896 README.txt
Files included are:
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index 51892df0c1..bcd587f552 100644
--- a/macros/latex/contrib/lwarp/lwarp.dtx
+++ b/macros/latex/contrib/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2021/02/18 v0.895 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2021/04/08 v0.896 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -309,11 +309,11 @@ Keywords={LaTeX, HTML, conversion}%
\newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is
\newcommand{\mpkg}[1]{\textcolor[Hsb]{240,1,.4}{\pkg{#1}}}% package modified for HTML
\newcommand{\epkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package emulated for HTML
-\newcommand{\ipkg}[1]{\textcolor[Hsb]{0,0,.5}{\pkg{#1}}}% package ignored
+\newcommand{\ipkg}[1]{\textcolor[Hsb]{0,0,.4}{\pkg{#1}}}% package ignored
\newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case
\newcommand{\sjax}{\textsuperscript{\textcolor[Hsb]{120,1,.4}{MJ}}}
\newcommand{\ejax}{\textsuperscript{\textcolor[Hsb]{300,1,.5}{MJ}}}
-\newcommand{\ijax}{\textsuperscript{\textcolor[Hsb]{0,0,.5}{MJ}}}
+\newcommand{\ijax}{\textsuperscript{\textcolor[Hsb]{0,0,.4}{MJ}}}
% green/cyan/blue/magenta
% \newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is
@@ -322,7 +322,7 @@ Keywords={LaTeX, HTML, conversion}%
% \newcommand{\ipkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package ignored
% \newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case
-
+\newcommand{\ARIA}{\acro{ARIA}}
\newcommand{\pdflatexonly}{
\textred{Only pre-loaded if \prog{pdflatex} is being used.}
@@ -871,6 +871,7 @@ the link will be empty.
Index entries also use \cs{nameref} and have the same limitation.
\trouble{index>empty link}
\trouble{reference>empty link}
+\trouble{link>empty}
}
\newcommand{\limitspfnote}{
@@ -908,16 +909,19 @@ due to the limited number of symbols which are available.
\limitsperpage
-If using \brand{MathJax}, after each math expression with a \cs{footnotemark},
-\watchout[MathJax, \cs{footnotemark}]
-adjust the \ctr{footnote} counter by the number of \cs{footnotemark}s:
-\begin{sourcedisplay}
-\cs{[} (math expression with \textgreen{two} instances of \cs{footnotemark}) \cs{]} \\
-\textred{\cs{warpHTMLonly}\{}\cs{addtocounter}\{footnote\}\{\textgreen{2}\}\textred{\}}
-\end{sourcedisplay}
-Similarly for \pkg{endnotes}, but \emph{not} \pkg{sidenotes}.
+% No longer true:
+% If using \brand{MathJax}, \cs{footnote} and \cs{endnote} work,
+% \watchout[MathJax, \cs{footnotemark}]
+% but for \cs{footnotemark}, after each math expression with a \cs{footnotemark}
+% adjust the \ctr{footnote} counter by the number of \cs{footnotemark}s:
+% \begin{sourcedisplay}
+% \cs{[} (math expression with \textgreen{two} instances of \cs{footnotemark}) \cs{]} \\
+% \textred{\cs{warpHTMLonly}\{}\cs{addtocounter}\{footnote\}\{\textgreen{2}\}\textred{\}}
+% \end{sourcedisplay}
+% Similarly for \pkg{endnotes}, but \emph{not} \pkg{sidenotes}.
Also for \brand{MathJax}, \cs{footnotename} is used for a \cs{footnotemark}
+\margintag{\brand{MathJax}}
if the actual footnote number is not known.
To redefine it, provide it before loading \pkg{lwarp}:
\begin{sourcedisplay}
@@ -1643,34 +1647,38 @@ While using \brand{Mathjax}, \cs{displaymathother} may also be used
for other forms of display and inline math which contain \pkg{chemformula} expressions.
}
-\newcommand{\limitsntheorem}{%
-This conversion is not total.
-\trouble[Font control]{ntheorem=\pkg{ntheorem}>font}
-Font control is via \CSS, and the custom \LaTeX\ font settings
-are ignored.
-
+\newcommand{\limitstheorems}{%
If the print version does not use \pkg{cleveref},
-\trouble[cref reference format undefined]{ntheorem=\pkg{ntheorem}>cref reference format}
-\trouble{cref reference format}
-\trouble{cleveref=\pkg{cleveref}>cref reference format}
+\trouble[cref reference format undefined]{ntheorem=\pkg{ntheorem}>cref reference format undefined}
+\trouble{cref reference format undefined}
+\trouble{cleveref=\pkg{cleveref}>cref reference format undefined}
+\trouble{theorem>cref reference format undefined}
place all \cs{theoremstyle} and \cs{newtheorem}
-declarations in the preamble inside \cs{AtBeginDocument}.\footnote{%
+declarations in the preamble inside \cs{AtEndPreamble}.\footnote{%
\pkg{lwarp} uses \pkg{cleveref} for the \HTML\ conversion,
- and loads \pkg{cleveref} \cs{AtEndPreamble}, just before \cs{AtBeginDocument}.%
+ and loads \pkg{cleveref} \cs{AtEndPreamble}, just before \cs{AtBeginDocument}.
+ This is also before the \filenm{.aux} file is read.
}
-For some theorems, it may also be required to add inside \cs{AtBeginDocument}
+For some theorems, it may also be required to add inside \cs{AtEndPreamble}
something such as:
\begin{sourcedisplay}
-\cs{AtBeginDocument}\{ \% if not using cleveref package \\
+\cs{usepackage}\{etoolbox\} \% for \cs{ifdef}, \cs{AtEndPreamble} \\
+\cs{AtEndPreamble}\{ \% if not using cleveref package \\
\fquad \cs{theoremstyle}\{definition\} \\
\fquad \cs{newtheorem}\{dtheorem\}\{Definition\} \\
\fquad \dots \\
- \fquad \cs{usepackage}\{etoolbox\} \% for \cs{ifdef} \\
\fquad \cs{ifdef}\{\cs{cref}\}\{ \\
\fqquad \cs{crefname}\{Proof\}\{Proof\}\{Proofs\} \\
\fquad \}\{\} \\
\}
\end{sourcedisplay}
+}
+
+\newcommand{\limitsntheorem}{%
+This conversion is not total.
+\trouble[Font control]{ntheorem=\pkg{ntheorem}>font}
+Font control is via \CSS, and the custom \LaTeX\ font settings
+are ignored.
\limitsntheoremnumbering
}
@@ -2911,8 +2919,8 @@ changes do not affect the \HTML\ output.
}
\newcommand{\limitspolyglossia}{%
-\trouble{Undefined control sequence \dots begindocument>polyglossia=\pkg{polyglossia}}
-\trouble{polyglossia=\pkg{polyglossia}>Undefined control sequence \dots begindocument}
+\trouble{Undefined control seq \dots\ begindocument>polyglossia=\pkg{polyglossia}}
+\trouble{polyglossia=\pkg{polyglossia}>Undefined control seq \dots\ begindocument}
\pkg{lwarp} uses \pkg{cleveref}, which has some limitations when using
\pkg{polyglossia}, possibly resulting in the error
\begin{sourcedisplay}
@@ -3053,7 +3061,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{53146}
+% \CheckSum{54091}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -3190,6 +3198,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/26}{\ 2020/11/26}
% \changes{v0.894}{2020/12/24}{\ 2020/12/24}
% \changes{v0.895}{2021/02/18}{\ 2021/02/18}
+% \changes{v0.896}{2021/04/08}{\ 2021/04/08}
@@ -3413,6 +3422,41 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \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 Increased sectioning nesting stack depth. Error if overflow stack.
+% \item Fixed footnotes at the end of the document,
+% or inside a \env{description} label.
+% \item Added an error if using braces inside \cs{usepackage} options.
+% \item Fixed footnotes in bracket display math with \brand{MathJax}.
+% \margintag{\brand{MathJax}}
+% \item \LaTeX\ theorems, \pkg{amsthm}, \pkg{ntheorem}, \pkg{theorem}:
+% \margintag{theorems}
+% Print theorem footnotes following theorems.
+% \item Added \HTML\ \element{main} element to each page.
+% \margintag{accessibility}
+% \item Added \ARIA\ |math| role to \SVG\ math images, and |note| role to
+% margin notes, footnotes, etc.
+% \item Improved citation backreferences for various packages.
+% \margintag{packages}
+% \item \pkg{chemfig}: Updated to v1.6a.
+% \item \pkg{bigdelim}: Updated to v2.8.
+% \item \pkg{xetexko}: Updated to v3.1.
+% \item \pkg{hyperxmp}: Fix: Accept and discard additional keys.
+% \item \pkg{hyperef}: Fix: Added \cs{*autorefname} macros.
+% \item \pkg{biblatex}: Fix: Back references.
+% \item \pkg{tocloft}: Fix: \cs{cftpagenumbersoff}, \cs{cftpagenumberson}.
+% \item \pkg{threeparttablex}: Fix: \cs{TPTL@tnotex}.
+% \item \pkg{amsthm}: Fix: Footnotes inside environment optional argument.
+% \item \pkg{listings}: Fixed labels. Accepts but ignores escapes w/o error.
+% \item \pkg{pdflscape}: Fix: Added \env{landscape} environment.
+% \item Added \pkg{ccicons}, \pkg{classicthesis}, \pkg{orcidlink}.
+% \item Added \pkg{enotez}.
+% \item Verified support for \pkg{doi}, \pkg{doipubmed}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.895:] Vector packages, greatly improved \brand{MathJax} for \pkg{siunitx}.
% \begin{itemize}
% \item Fixed quotes in \HTML\ tags while using old font packages with
@@ -4544,33 +4588,33 @@ This boolean may be tested by the user for later use.
% \item \pkg{endfloat}: Updated for v2.6.
% \item \pkg{url}: Fixes for active characters.
% \end{itemize}
-% \needspace{2\baselineskip}
-% \item[v0.51:] Improved \SVG\ math, added numerous chemistry packages.
-% \begin{itemize}
-% \item Docs: Added \nameref{sec:thingstoavoid}.
-% \margintag{documentation}
-% \item Docs: Added to \nameref{sec:convertexisting}.
-% \item Docs: Multiple authors and affiliations with custom classes.
-% See \cref{sec:authorsaffils}.
-% \item Docs: \pkg{tikz} with matrices. See \cref{sec:limitstikz}.
-% \item Improved \SVG\ math baseline.\margintag{SVG math}
-% \item Improved \SVG\ math font and color.
-% \item Faster \SVG\ math rendering.
-% \item Improved support for display math containing complicated math objects,
-% such as \pkg{tikz-cd}. See \cref{sec:displaymathother}.
-% \item Fix: \cs{addcontentsline} inside \SVG\ math.
-% \item Fix: \SVG\ math containing an embedded \env{lateximage}.
-% \item \brand{MathJax} now handles \cs{ensuremath} in expressions.\margintag{MathJax}
-% \item Fix: Added \env{alignat} environment. \margintag{misc. fixes}
-% \item Fix: \pkg{afterpackage} no longer required, which conflicted with \pkg{scrlfile}.
-% \item Fix: \pkg{titling} \cs{thanks} mark.
-% \item Fix: \pkg{fancybox} improvements.
-% \item Fix: \pkg{tikz} \cs{tikz} macro. (Previously only the \env{tikzpicture} environment worked.)
-% \item Fix: \pkg{tikz} with optional argument.
-% \item Added \pkg{mhchem}, \margintag{packages}
-% \pkg{chemfig}, \pkg{chemformula}, \pkg{chemmacros}, \pkg{chemnum}, \pkg{chemgreek},
-% \pkg{epstopdf-base}, \pkg{grid}, \pkg{ltxgrid}.
-% \end{itemize}
+% ^^A % \needspace{2\baselineskip}
+% ^^A % \item[v0.51:] Improved \SVG\ math, added numerous chemistry packages.
+% ^^A % \begin{itemize}
+% ^^A % \item Docs: Added \nameref{sec:thingstoavoid}.
+% ^^A % \margintag{documentation}
+% ^^A % \item Docs: Added to \nameref{sec:convertexisting}.
+% ^^A % \item Docs: Multiple authors and affiliations with custom classes.
+% ^^A % See \cref{sec:authorsaffils}.
+% ^^A % \item Docs: \pkg{tikz} with matrices. See \cref{sec:limitstikz}.
+% ^^A % \item Improved \SVG\ math baseline.\margintag{SVG math}
+% ^^A % \item Improved \SVG\ math font and color.
+% ^^A % \item Faster \SVG\ math rendering.
+% ^^A % \item Improved support for display math containing complicated math objects,
+% ^^A % such as \pkg{tikz-cd}. See \cref{sec:displaymathother}.
+% ^^A % \item Fix: \cs{addcontentsline} inside \SVG\ math.
+% ^^A % \item Fix: \SVG\ math containing an embedded \env{lateximage}.
+% ^^A % \item \brand{MathJax} now handles \cs{ensuremath} in expressions.\margintag{MathJax}
+% ^^A % \item Fix: Added \env{alignat} environment. \margintag{misc. fixes}
+% ^^A % \item Fix: \pkg{afterpackage} no longer required, which conflicted with \pkg{scrlfile}.
+% ^^A % \item Fix: \pkg{titling} \cs{thanks} mark.
+% ^^A % \item Fix: \pkg{fancybox} improvements.
+% ^^A % \item Fix: \pkg{tikz} \cs{tikz} macro. (Previously only the \env{tikzpicture} environment worked.)
+% ^^A % \item Fix: \pkg{tikz} with optional argument.
+% ^^A % \item Added \pkg{mhchem}, \margintag{packages}
+% ^^A % \pkg{chemfig}, \pkg{chemformula}, \pkg{chemmacros}, \pkg{chemnum}, \pkg{chemgreek},
+% ^^A % \pkg{epstopdf-base}, \pkg{grid}, \pkg{ltxgrid}.
+% ^^A % \end{itemize}
% ^^A \needspace{2\baselineskip}
% ^^A \item[v0.50:] Improved \SVG\ math.
% ^^A \begin{itemize}
@@ -5545,10 +5589,11 @@ This boolean may be tested by the user for later use.
% \ipkg{fullminipage}, \ipkg{fullpage},
% \ipkg{fwlw}, \ipkg{geometry}, \ipkg{gmeometric},
% \ipkg{grid}, \mpkg{grid-system}, \ipkg{gridset},
-% \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading},
+% \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading}, \ipkg{lscape},
% \ipkg{ltxgrid}, \ipkg{nccfancyhdr}, \ipkg{notespages}, \ipkg{nowidow},
% \ipkg{pagegrid}, \ipkg{pagesel}, \epkg{parallel}, \epkg{parcolumns},
-% \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt}, \ipkg{pdfprivacy},
+% \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt},
+% \ipkg{pdflscape}, \ipkg{pdfprivacy},
% \ipkg{preview}, \epkg{ragged2e}, \ipkg{returntogrid}, \ipkg{rmpage},
% \epkg{scrlayer-scrpage}, \epkg{scrpage2}, \epkg{setspace}, \ipkg{selectp},
% \ipkg{textarea}, \ipkg{threadcol},
@@ -5616,7 +5661,7 @@ This boolean may be tested by the user for later use.
% Footnotes: & Adds \progcode{FootnoteDepth} to print footnotes at section breaks.
% \brand{MathJax} emulation for \cs{footnote}, and also as marked in the following:
% \epkg{bigfoot}, \ipkg{dblfnote},
-% \ipkg{endheads}, \mpkg{endnotes}\ejax, \spkg{fixfoot},
+% \ipkg{endheads}, \mpkg{endnotes}\ejax, \mpkg{enotez}\ejax, \spkg{fixfoot},
% \ipkg{fnbreak}, \ipkg{fnpara}, \ipkg{fnpos},
% \epkg{footmisc}, \mpkg{footnote}, \ipkg{footnotebackref},
% \mpkg{footnoterange}, \ipkg{footnpag}, \epkg{manyfoot},
@@ -5733,8 +5778,8 @@ This boolean may be tested by the user for later use.
% \midrule
%
% \mpkg{xcolor}: & \textcolor{DarkGreen}{Full package color names}, any color models,
-% and \textcolor{Goldenrod}{mixing}.
-% \textcolor{Maroon}{\cs{textcolor}},
+% and \textcolor{red!70!black}{mixing}.
+% \textcolor{blue}{\cs{textcolor}},
% \colorbox{LightSteelBlue}{\cs{colorbox}},
% \fcolorbox{red}{NavajoWhite}{\cs{fcolorbox}}.
% Enhanced for \HTML\ compatibility. \\
@@ -5821,7 +5866,7 @@ This boolean may be tested by the user for later use.
% Also see the math section for math and \brand{MathJax} support for math font packages. \\
%
% Symbols: & Native \LaTeX\ diacriticals, \mpkg{academicons}, \spkg{amssymb}\sjax,
-% \mpkg{bbding},
+% \mpkg{bbding}, \mpkg{ccicons},
% \mpkg{chemgreek}, \mpkg{dingbat}, \spkg{euro}, \mpkg{eurosym},
% \mpkg{fontawesome}, \mpkg{fontawesome5}, \spkg{gensymb}\ejax, \spkg{latexsym}\sjax,
% \mpkg{marvosym},
@@ -5872,7 +5917,8 @@ This boolean may be tested by the user for later use.
%
% \midrule
%
-% Calendars: & \mpkg{termcal} \\
+% Academic: & \mpkg{academicons}, \epkg{classicthesis}, \spkg{doi},
+% \spkg{doipubmed}, \mpkg{orcidlink}\ijax, \mpkg{termcal} \\
%
% \midrule
%
@@ -6620,7 +6666,7 @@ This boolean may be tested by the user for later use.
% own auxiliary files. In this way, both \PDF\ and \HTML\
% documents may co-exist side-by-side.
%
-% \item [Auxiliary files:] The usual \LaTeX\ files |.aux|, |.log|, |.out|, |.toc|, |.lof|, |.idx|.
+% \item [Auxiliary files:] The usual \LaTeX\ files |.aux|, |.log|, |.out|, \filenm{.toc}, \filenm{.lof}, |.idx|.
% When an \HTML\ version of the document is created, |_html| versions
% of the auxiliary files will also be generated.
%
@@ -7012,7 +7058,7 @@ This boolean may be tested by the user for later use.
%
% \subsection{Cleaning auxiliary files}
%
-% To remove the auxiliary files |.aux|, |.toc|, |.lof|, |.lot|, |.idx|, |.ind|, |.log|,
+% To remove the auxiliary files |.aux|, \filenm{.toc}, \filenm{.lof}, \filenm{.lot}, |.idx|, |.ind|, |.log|,
% and |.gl*|, and a few others:
% \userentry{lwarpmk clean}
%
@@ -7277,14 +7323,20 @@ This boolean may be tested by the user for later use.
% \gindex{link>title=\attribute{title} text}
% \gindex{hyperref=\pkg{hyperref}>title=\attribute{title} text}
% \gindex{settings>accessibility}
+% \gindex{ARIA=\acro{ARIA}}
+% \gindex{roles>ARIA=\acro{ARIO}}
%
% \pkg{lwarp} provides several methods for improving access to
% the document using tools such as text-only browsers, copy \Slash paste,
% text-to-speech readers, or Braille readers.
-% \HTML\ provides the \attribute{alt} text attribute for images,
-% which is used by \pkg{lwarp} as describe below.
-% \HTML\ also provides the \attribute{title} attribute, which usually
+% \pkg{lwarp} can use the \HTML\ \attribute{alt} text attribute for images,
+% as describe below.
+% \pkg{lwarp} can also use the \HTML\ \attribute{title} attribute, which usually
% generates a pop-up text. \pkg{lwarp} can add this to a reference or hyperlink.
+% \pkg{lwarp} also uses standard \HTML5 elements which are pre-assigned
+% \ARIA\ roles for increased accessibility, and \pkg{lwarp} assigns the |math|
+% role for \SVG\ math images, and the |note| role for footnotes, end notes,
+% margin paragraphs and notes, etc.
% \brand{MathJax} also has provisions for improved accessibility
% as well. See \cref{tab:accessibility}.
%
@@ -9613,7 +9665,7 @@ This boolean may be tested by the user for later use.
% \cs{usepackage}[ \\
% \fqquad \textred{makeindex,} \\
% \fqquad \textred{makeindexStyle=gindex.ist,} \\
-% \fqquad \dots or \dots \\
+% \fqquad \dots\ or \dots \\
% \fqquad \textred{makeindexStyle=gindexh.ist,} \\
% \fqquad \textgreen{latexmk} \hfill \textrm{<optional>}\\
% ]\{\textblue{lwarp}\}
@@ -10141,7 +10193,7 @@ This boolean may be tested by the user for later use.
% \DescribeOption{makeindexStyle}
% \begin{sourcedisplay}
% \cs{usepackage}[ \\
-% \fquad \dots other options \dots \\
+% \fquad \dots\ other options \dots \\
% \fquad \textred{makeindex}, \\
% \fquad \textred{makeindexStyle=projectname.ist}, \\
% ]\{lwarp\}
@@ -10200,7 +10252,7 @@ This boolean may be tested by the user for later use.
% \DescribeOption{xindyStyle}
% \begin{sourcedisplay}
% \cs{usepackage}[ \\
-% \fquad \dots other options \dots \\
+% \fquad \dots\ other options \dots \\
% \fquad \textred{xindy}, \\
% \fquad \textred{xindyStyle=projectname.xdy}, \\
% ]\{lwarp\}
@@ -10237,7 +10289,7 @@ This boolean may be tested by the user for later use.
% \DescribeOption{xindexConfig}
% \begin{sourcedisplay}
% \cs{usepackage}[ \\
-% \fquad \dots other options \dots \\
+% \fquad \dots\ other options \dots \\
% \fquad \textred{xindex}, \\
% \fquad \textred{xindexConfig=projectname}, \quad \% \textgreen{(without xindex- or .lua)} \\
% ]\{lwarp\}
@@ -10341,6 +10393,10 @@ This boolean may be tested by the user for later use.
% \limitsmathdisplay
%
%
+% \subsubsection{Theorems}
+% \limitstheorems
+% \changes{v0.896}{2021/03/25}{Docs: Theorem references.}
+%
% \subsubsection{\pkg{ntheorem} package}
%
% \DescribePackage{ntheorem}
@@ -10890,8 +10946,8 @@ This boolean may be tested by the user for later use.
% No attempt has yet been made to make \pkg{pythontex} robust with \HTML\ output.
% Some math objects must be surrounded by
% \trouble[``impure'' math]{pythontex=\pkg{pythontex}}
-% \cs{displaymathother} \dots \cs{displaymathnormal},
-% or \cs{inlinemathother} \dots \cs{inlinemathnormal}.
+% \cs{displaymathother} \dots\ \cs{displaymathnormal},
+% or \cs{inlinemathother} \dots\ \cs{inlinemathnormal}.
% Displays of code may have to be
% enclosed inside a \env{lateximage} environment
% \watchout[HTML look-alike]
@@ -11949,7 +12005,7 @@ This boolean may be tested by the user for later use.
% \item [``Temporary page! LaTeX was unable to guess the total
% number of pages \dots'':] \
% Harmless. Recompile the document one more time.
-% \trouble{Temporary page \dots unable to guess \dots}
+% \trouble{Temporary page \dots\ unable to guess \dots}
% \trouble{LaTeX was unable to guess the total\dots}
%
% \item [``Leaders not followed by proper glue'':] ~ \\
@@ -12051,8 +12107,8 @@ This boolean may be tested by the user for later use.
% \trouble{alt tags}
% can also cause problems with \attribute{alt} tags, resulting in
% very slow compilation, large \attribute{alt} tags, and possible
-% crashes. Use \cs{inlinemathother} \dots \cs{inlinemathnormal} or
-% \cs{displaymathother} \dots \cs{displaymathnormal} around the
+% crashes. Use \cs{inlinemathother} \dots\ \cs{inlinemathnormal} or
+% \cs{displaymathother} \dots\ \cs{displaymathnormal} around the
% math expression.
% \end{description}
%
@@ -12896,6 +12952,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{bussproofs}
\LWR@loadafter{bxpapersize}
\LWR@loadafter{bytefield}
+\LWR@loadafter{ccicons}
\LWR@loadafter{cancel}
\LWR@loadafter{canoniclayout}
\LWR@loadafter{caption}
@@ -12920,6 +12977,7 @@ This boolean may be tested by the user for later use.
\LWR@notmemoirloadafter{chngpage}
\LWR@loadafter{cite}
\LWR@loadafter{citeref}
+\LWR@loadafter{classicthesis}
\LWR@loadafter{cleveref}
% cmbright may be preloaded
\LWR@loadafter{cmdtrack}
@@ -12957,6 +13015,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{endheads}
\LWR@loadafter{endnotes}
\LWR@loadafter{engtlc}
+\LWR@loadafter{enotez}
\LWR@notmemoirloadafter{enumerate}
\LWR@loadafter{enumitem}
\LWR@notmemoirloadafter{epigraph}
@@ -13171,6 +13230,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
\LWR@loadafter{octave}
+\LWR@loadafter{orcidlink}
\LWR@loadafter{overpic}
\LWR@loadafter{pagegrid}
\LWR@notmemoirloadafter{pagenote}
@@ -13381,7 +13441,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{xcolor}
\LWR@loadafter{xechangebar}
\LWR@loadafter{xellipsis}
-% xetexko-vertical must be loaded before lwarp
+% xetexko must be loaded before lwarp
\LWR@loadafter{xevlna}
\LWR@loadafter{xfakebold}
\LWR@loadafter{xfrac}
@@ -13739,25 +13799,29 @@ This boolean may be tested by the user for later use.
%
% \subsection{Argument selection}
%
-% \begin{macro}{\LWR@firstoffour} \marg{first} \marg{second} \marg{third} \marg{fourth}
+% \begin{macro}{\LWR@firstoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth}
% \changes{v0.63}{2019/01/25}{Added.}
-% \begin{macro}{\LWR@secondoffour} \marg{first} \marg{second} \marg{third} \marg{fourth}
-% \begin{macro}{\LWR@thirdoffour} \marg{first} \marg{second} \marg{third} \marg{fourth}
-% \begin{macro}{\LWR@fourthoffour} \marg{first} \marg{second} \marg{third} \marg{fourth}
+% \changes{v0.896}{2021/04/05}{Changed to firstoffive instead of four.}
+% \begin{macro}{\LWR@secondoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth}
+% \begin{macro}{\LWR@thirdoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth}
+% \begin{macro}{\LWR@fourthoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth}
+% \begin{macro}{\LWR@fifthoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth}
%
-% Expands to the nth of the four arguments.
+% Expands to the nth of the five arguments.
% Used for extra cross referencing.
%
% \begin{macrocode}
-\long\def\LWR@firstoffour#1#2#3#4{#1}
-\long\def\LWR@secondoffour#1#2#3#4{#2}
-\long\def\LWR@thirdoffour#1#2#3#4{#3}
-\long\def\LWR@fourthoffour#1#2#3#4{#4}
+\long\def\LWR@firstoffive#1#2#3#4#5{#1}
+\long\def\LWR@secondoffive#1#2#3#4#5{#2}
+\long\def\LWR@thirdoffive#1#2#3#4#5{#3}
+\long\def\LWR@fourthoffive#1#2#3#4#5{#4}
+\long\def\LWR@fifthoffive#1#2#3#4#5{#5}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
%
% \subsection{Inside boxes}
@@ -15676,6 +15740,7 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
% \end{macrocode}
+%
% Redirect up to twenty names:\footnote{This was originally nine names, but
% then I came across a package which used twelve...}
% \changes{v0.61}{2018/10/02}{Support up to 20 packages.}
@@ -15703,6 +15768,31 @@ This boolean may be tested by the user for later use.
\LWR@lookforpackagename{19}%
\LWR@lookforpackagename{20}%
% \end{macrocode}
+%
+% Error if braces are used in optional argument.
+% This can cause an error, so tell how to avoid.
+% \changes{v0.896}{2021/03/14}{Warn if package option has braces.}
+% \begin{macrocode}
+\IfSubStr{\detokenize\expandafter{#1}}{\LWRleftbrace}%
+ {%
+ \PackageError{lwarp}{%
+ You used:\MessageBreak
+ \protect\requirepackage[#1]{#2}\MessageBreak
+ Braces in the package options will fail with Lwarp.\MessageBreak
+ Instead, use:\MessageBreak
+ \protect\PassOptionsToPackage{#1}{#2}\MessageBreak
+ \protect\requirepackage{#2}\MessageBreak
+ near the line number given below.\MessageBreak
+ Enter 'h' for more info%
+ }%
+ {%
+ See the Lwarp manual troubleshooting index entry for\MessageBreak
+ ``package, options with braces''%
+ }%
+ }%
+ {}% no brace
+% \end{macrocode}
+%
% \cs{RequirePackage} depending on the options and version:
% \begin{macrocode}
\IfValueTF{#1}%
@@ -15967,7 +16057,7 @@ This boolean may be tested by the user for later use.
% \begin{macro}{\LWR@copyfile} \marg{source filename} \marg{destination filename}
%
-% Used to copy the |.toc| file to |.sidetoc| to re-print the \TOC\ in
+% Used to copy the \filenm{.toc} file to |.sidetoc| to re-print the \TOC\ in
% the side\TOC\ navigation pane.
% \begin{macrocode}
\newwrite\LWR@copyoutfile % open the file to write to
@@ -17389,6 +17479,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.88}{2020/07/14}{\filenm{lwarp.css}: Added \optn{indexheading} for \pkg{gindex}.}
% \changes{v0.893}{2020/10/18}{\filenm{lwarp.css}: Added \pkg{keystroke}.}
% \changes{v0.894}{2020/12/15}{\filenm{lwarp.css}: \TeX\ logos no longer below baseline.}
+% \changes{v0.896}{2021/03/04}{\filenm{lwarp.css}: Added \element{main}, adjusted \element{sidetoccontainer} margin.}
%
% ^^A *lwarp.css
%
@@ -17888,12 +17979,12 @@ div.marginblock br ,
div.marginparblock br
{ margin-bottom: 2ex ; }
-div.bodycontainer {
+main.bodycontainer {
float: left ;
width: 80% ;
}
-div.bodywithoutsidetoc div.bodycontainer {
+div.bodywithoutsidetoc main.bodycontainer {
float: none ;
width: 100% ;
}
@@ -18735,15 +18826,12 @@ img.lateximage{
}
-/* The -1px right margin compensates for the 1px right border. */
-/* Without this -1px margin, the body container appears below instead */
-/* of floating to the side. */
div.sidetoccontainer {
font-family: "DejaVu Serif", "Bitstream Vera Serif",
"Lucida Bright", Georgia, serif;
float: left ;
- width: 20%;
- margin: 0pt -1px 3ex 0pt ;
+ width: 19%; /* room for border-right next to 80% main */
+ margin: 0pt 0em 3ex 0pt ;
border-right: 1px solid silver;
border-bottom: 1px solid silver;
background: #FAF7F4 ;
@@ -19097,7 +19185,7 @@ span.sidetocthetitle { display: none }
span.sidetocthetitle { display: inline }
nav.topnavigation { display:block }
nav.botnavigation { display:block }
- div.bodycontainer { width: 100% }
+ main.bodycontainer { width: 100% }
.marginpar {
max-width: 100%;
float: none;
@@ -19116,21 +19204,21 @@ span.sidetocthetitle { display: none }
div.sidetoccontainer { display:none; }
nav.topnavigation { display: none; }
nav.botnavigation { display: none; }
- div.bodycontainer { width: 100% }
+ main.bodycontainer { width: 100% }
}
@media handheld {
div.sidetoccontainer { display:none; }
nav.topnavigation { display:block }
nav.botnavigation { display:block }
- div.bodycontainer { width: 100% }
+ main.bodycontainer { width: 100% }
}
@media projection {
div.sidetoccontainer { display:none; }
nav.topnavigation { display:block }
nav.botnavigation { display:block }
- div.bodycontainer { width: 100% }
+ main.bodycontainer { width: 100% }
}
\end{filecontents*}
% \end{Verbatim}% for syntax highlighting
@@ -20192,7 +20280,7 @@ MathJax = {
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.895"
+printversion = "v0.896"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -21169,9 +21257,7 @@ end -- not --version
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
-
-
-
+%
% Stacks are used to remember how to close sections and list items.
% Before a new section is started, previously nested sections and items must
% be closed out (un-nested) in proper order.
@@ -21224,6 +21310,7 @@ end -- not --version
% A stack to record the action to take to close each nesting level:
% Add more levels of stack if necessary for a very deeply nested document,
% adding to \cs{pushclose} and \cs{popclose} as well.
+% \changes{v0.896}{2021/03/15}{Stack 19 deep.}
% \begin{macrocode}
\newcommand*{\LWR@closeone}{}% top of the stack
\newcommand*{\LWR@closetwo}{}
@@ -21237,6 +21324,13 @@ end -- not --version
\newcommand*{\LWR@closeten}{}
\newcommand*{\LWR@closeeleven}{}
\newcommand*{\LWR@closetwelve}{}
+\newcommand*{\LWR@closethirteen}{}
+\newcommand*{\LWR@closefourteen}{}
+\newcommand*{\LWR@closefifteen}{}
+\newcommand*{\LWR@closesixteen}{}
+\newcommand*{\LWR@closeseventeen}{}
+\newcommand*{\LWR@closeeighteen}{}
+\newcommand*{\LWR@closenineteen}{}
% \end{macrocode}
% \subsection{Closing depths}
@@ -21258,7 +21352,8 @@ end -- not --version
% \end{Verbatim}
% \vspace{-\baselineskip}
% \end{docsidebar}
-
+%
+% \changes{v0.896}{2021/03/15}{Stack 19 deep.}
% \begin{macrocode}
\newcommand*{\LWR@closedepthone}{\LWR@depthnone}% top of the stack
\newcommand*{\LWR@closedepthtwo}{\LWR@depthnone}
@@ -21272,6 +21367,13 @@ end -- not --version
\newcommand*{\LWR@closedepthten}{\LWR@depthnone}
\newcommand*{\LWR@closedeptheleven}{\LWR@depthnone}
\newcommand*{\LWR@closedepthtwelve}{\LWR@depthnone}
+\newcommand*{\LWR@closedepththirteen}{\LWR@depthnone}
+\newcommand*{\LWR@closedepthfourteen}{\LWR@depthnone}
+\newcommand*{\LWR@closedepthfifteen}{\LWR@depthnone}
+\newcommand*{\LWR@closedepthsixteen}{\LWR@depthnone}
+\newcommand*{\LWR@closedepthseventeen}{\LWR@depthnone}
+\newcommand*{\LWR@closedeptheighteen}{\LWR@depthnone}
+\newcommand*{\LWR@closedepthnineteen}{\LWR@depthnone}
% \end{macrocode}
% \subsection{Pushing and popping the stack}
@@ -21280,9 +21382,17 @@ end -- not --version
% Pushes one return action and its \LaTeX\ depth onto the stacks.
% \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.}
+% \changes{v0.896}{2021/03/15}{Stack 19 deep.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@pushclose}{m}
{%
+\global\let\LWR@closenineteen\LWR@closeeighteen%
+\global\let\LWR@closeeighteen\LWR@closeseventeen%
+\global\let\LWR@closeseventeen\LWR@closesixteen%
+\global\let\LWR@closesixteen\LWR@closefifteen%
+\global\let\LWR@closefifteen\LWR@closefourteen%
+\global\let\LWR@closefourteen\LWR@closethirteen%
+\global\let\LWR@closethirteen\LWR@closetwelve%
\global\let\LWR@closetwelve\LWR@closeeleven%
\global\let\LWR@closeeleven\LWR@closeten%
\global\let\LWR@closeten\LWR@closenine%
@@ -21295,6 +21405,13 @@ end -- not --version
\global\let\LWR@closethree\LWR@closetwo%
\global\let\LWR@closetwo\LWR@closeone%
\global\csletcs{LWR@closeone}{LWR@printclose#1}%
+\global\let\LWR@closedepthnineteen\LWR@closedeptheighteen%
+\global\let\LWR@closedeptheighteen\LWR@closedepthseventeen%
+\global\let\LWR@closedepthseventeen\LWR@closedepthsixteen%
+\global\let\LWR@closedepthsixteen\LWR@closedepthfifteen%
+\global\let\LWR@closedepthfifteen\LWR@closedepthfourteen%
+\global\let\LWR@closedepthfourteen\LWR@closedepththirteen%
+\global\let\LWR@closedepththirteen\LWR@closedepthtwelve%
\global\let\LWR@closedepthtwelve\LWR@closedeptheleven%
\global\let\LWR@closedeptheleven\LWR@closedepthten%
\global\let\LWR@closedepthten\LWR@closedepthnine%
@@ -21307,6 +21424,20 @@ end -- not --version
\global\let\LWR@closedepththree\LWR@closedepthtwo%
\global\let\LWR@closedepthtwo\LWR@closedepthone%
\global\csletcs{LWR@closedepthone}{LWR@depth#1}%
+% \end{macrocode}
+%
+% Error if the deepest depth is no longer \cs{LWR@depthnone},
+% which means that it somehow has been nested too deeply,
+% or things are not being unnested correctly.
+% \changes{v0.896}{2021/03/15}{Error if stack overflow.}
+% \begin{macrocode}
+\ifdefstring{\LWR@closedepthnineteen}{\LWR@depthnone}%
+ {}%
+ {%
+ \PackageError{lwarp}%
+ {The document is nested too deeply for Lwarp}%
+ {PLEASE inform the Lwarp maintainer!}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -21316,6 +21447,7 @@ end -- not --version
% Pops one action and its depth off the stacks.
% \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.}
+% \changes{v0.896}{2021/03/15}{Stack 19 deep.}
% \begin{macrocode}
\newcommand*{\LWR@popclose}
{%
@@ -21330,6 +21462,13 @@ end -- not --version
\global\let\LWR@closenine\LWR@closeten%
\global\let\LWR@closeten\LWR@closeeleven%
\global\let\LWR@closeeleven\LWR@closetwelve%
+\global\let\LWR@closetwelve\LWR@closethirteen%
+\global\let\LWR@closethirteen\LWR@closefourteen%
+\global\let\LWR@closefourteen\LWR@closefifteen%
+\global\let\LWR@closefifteen\LWR@closesixteen%
+\global\let\LWR@closesixteen\LWR@closeseventeen%
+\global\let\LWR@closeseventeen\LWR@closeeighteen%
+\global\let\LWR@closeeighteen\LWR@closenineteen%
\global\let\LWR@closedepthone\LWR@closedepthtwo%
\global\let\LWR@closedepthtwo\LWR@closedepththree%
\global\let\LWR@closedepththree\LWR@closedepthfour%
@@ -21341,6 +21480,13 @@ end -- not --version
\global\let\LWR@closedepthnine\LWR@closedepthten%
\global\let\LWR@closedepthten\LWR@closedeptheleven%
\global\let\LWR@closedeptheleven\LWR@closedepthtwelve%
+\global\let\LWR@closedepthtwelve\LWR@closedepththirteen%
+\global\let\LWR@closedepththirteen\LWR@closedepthfourteen%
+\global\let\LWR@closedepthfourteen\LWR@closedepthfifteen%
+\global\let\LWR@closedepthfifteen\LWR@closedepthsixteen%
+\global\let\LWR@closedepthsixteen\LWR@closedepthseventeen%
+\global\let\LWR@closedepthseventeen\LWR@closedeptheighteen%
+\global\let\LWR@closedeptheighteen\LWR@closedepthnineteen%
}
% \end{macrocode}
% \end{macro}
@@ -21524,7 +21670,7 @@ end -- not --version
\boolfalse{LWR@dynamicmath}
% \end{macrocode}
%
-% \begin{macro}{\inlinemathother} Place before using |$| \dots\ |$| or \cs{(} \dots \cs{)}
+% \begin{macro}{\inlinemathother} Place before using |$| \dots\ |$| or \cs{(} \dots\ \cs{)}
% if the contents of the math are not static, depending on counters or dynamic macros.
% \changes{v0.57}{2018/05/23}{Added.}
% \changes{v0.61}{2018/09/20}{Changed name from \cs{StartDynamicMath} to \cs{inlinemathother}.}
@@ -21536,7 +21682,7 @@ end -- not --version
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\inlinemathnormal} Place after using |$| \dots\ |$| or \cs{(} \dots \cs{)}
+% \begin{macro}{\inlinemathnormal} Place after using |$| \dots\ |$| or \cs{(} \dots\ \cs{)}
% with dynamic contents.
% \changes{v0.61}{2018/09/20}{Changed name from \cs{StopDynamicMath} to \cs{inlinemathnormal}.}
% \begin{macrocode}
@@ -22069,12 +22215,16 @@ end -- not --version
% \begin{macro}{\LWRPrintStack} Prints the closedepth stack.
% \changes{v0.46}{2018/01/15}{Name changed from \cs{PrintStack}.}
+% \changes{v0.896}{2021/03/15}{Stack 19 deep.}
% \begin{macrocode}
\newcommand*{\LWR@subprintstack}{
\LWR@closedepthone\ \LWR@closedepthtwo\ \LWR@closedepththree\
\LWR@closedepthfour\ \LWR@closedepthfive\ \LWR@closedepthsix\
\LWR@closedepthseven\ \LWR@closedeptheight\ \LWR@closedepthnine\
\LWR@closedepthten\ \LWR@closedeptheleven\ \LWR@closedepthtwelve\
+\LWR@closedepththirteen\ \LWR@closedepthfourteen\ \LWR@closedepthfifteen\
+\LWR@closedepthsixteen\ \LWR@closedepthseventeen\ \LWR@closedeptheighteen\
+\LWR@closedepthnineteen\
}
\newcommand*{\LWRPrintStack}{
@@ -22490,6 +22640,7 @@ end -- not --version
% \changes{v0.73}{2019/06/23}{Fix: \env{quote}, \env{quotation} inside a span.}
% \changes{v0.84}{2020/04/22}{Nullified \env{minipage}, \cs{parbox} inside a span.}
% \changes{v0.84}{2020/04/22}{Issue warnings inside a span.}
+% \changes{v0.896}{2021/03/05}{Issue \env{BlockClassWP} warning inside a span.}
%
% \begin{macrocode}
\newcommand*{\LWR@nestspanitem}{%
@@ -22518,6 +22669,9 @@ end -- not --version
\RenewDocumentEnvironment{BlockClass}{o m}%
{\LWR@spanwarnformat{multi-paragraph object}}%
{}%
+ \RenewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}%
+ {\LWR@spanwarnformat{multi-paragraph object}}%
+ {}%
\renewcommand{\BlockClassSingle}[2]{%
{\LWR@spanwarnformat{multi-paragraph object}}%
##2%
@@ -22566,20 +22720,23 @@ end -- not --version
% \end{macro}
-% \begin{macro}{\LWR@htmlspanclass} \oarg{style} \marg{class} \marg{text}
+% \begin{macro}{\LWR@htmlspanclass}
+% \oarg{style} \parg{\ARIA\ role} \marg{class} \marg{text}
%
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
-%
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@htmlspanclass}{o m +m}{%
-\LWR@traceinfo{LWR@htmlspanclass |#1|#2|}%
-\LWR@ensuredoingapar%
-\LWR@subhtmlelementclass{span}[#1]{#2}%
-\begin{LWR@nestspan}%
-#3%
-\LWR@htmltagc{/span}%
-\LWR@traceinfo{LWR@htmlspanclass done}%
-\end{LWR@nestspan}%
+\NewDocumentCommand{\LWR@htmlspanclass}{o D(){} m +m}{%
+ \LWR@traceinfo{LWR@htmlspanclass |#1|#2|#3|}%
+ \LWR@ensuredoingapar%
+ \ifblank{#2}%
+ {\LWR@subhtmlelementclass{span}[#1]{#3}}%
+ {\LWR@subhtmlelementclass{span}[#1](#2){#3}}%
+ \begin{LWR@nestspan}%
+ #4%
+ \LWR@htmltagc{/span}%
+ \LWR@traceinfo{LWR@htmlspanclass done}%
+ \end{LWR@nestspan}%
}
% \end{macrocode}
% \end{macro}
@@ -22676,7 +22833,8 @@ end -- not --version
% \subsection{Div class and element class}
-% \begin{macro}{\LWR@subhtmlelementclass} \marg{element} \oarg{style} \marg{class}
+% \begin{macro}{\LWR@subhtmlelementclass}
+% \marg{element} \oarg{style} \parg{\ARIA\ role} \marg{class}
%
% Factored and reused in several places.
%
@@ -22690,21 +22848,24 @@ end -- not --version
% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.}
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
% \changes{v0.892}{2020/10/03}{Ignore empty class.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
%
% \begin{macrocode}
-\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{%
-\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!}%
+\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} D(){} m}{%
+\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}%
\ifblank{#2}%
{% empty style
\LWR@htmltag{%
#1%
- \ifblank{#3}{}{ class=\textquotedbl#3\textquotedbl\ }% spaces
+ \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% spaces
+ \ifblank{#4}{}{ class=\textquotedbl#4\textquotedbl}% spaces
}%
}%
{% non-empty style
\LWR@htmltag{%
#1\LWR@indentHTML%
- \ifblank{#3}{}{class=\textquotedbl#3\textquotedbl\LWR@indentHTML}%
+ \ifblank{#3}{}{role=\textquotedbl#3\textquotedbl\LWR@indentHTML}%
+ \ifblank{#4}{}{class=\textquotedbl#4\textquotedbl\LWR@indentHTML}%
style=\textquotedbl#2\textquotedbl\LWR@orignewline%
}%
}%
@@ -22714,17 +22875,20 @@ end -- not --version
% \end{macro}
-% \begin{macro}{\LWR@htmlelementclass} \marg{element} \marg{class} \oarg{style}
+% \begin{macro}{\LWR@htmlelementclass} \marg{element} \oarg{style} \marg{class}
%
% \changes{v0.20}{2017/01/17}{Added optional style.}
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
% \changes{v0.73}{2019/06/26}{Vertical space.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@htmlelementclass}{m o m}{%
-\LWR@stoppars%
-\LWR@forceemptyline%
-\LWR@subhtmlelementclass{#1}[#2]{#3}%
-\LWR@startpars%
+\NewDocumentCommand{\LWR@htmlelementclass}{m o D(){} m}{%
+ \LWR@stoppars%
+ \LWR@forceemptyline%
+ \ifblank{#3}%
+ {\LWR@subhtmlelementclass{#1}[#2]{#4}}%
+ {\LWR@subhtmlelementclass{#1}[#2](#3){#4}}%
+ \LWR@startpars%
}
% \end{macrocode}
% \end{macro}
@@ -22733,24 +22897,27 @@ end -- not --version
% \begin{macro}{\LWR@htmlelementclassend} \marg{element} \marg{class}
% \begin{macrocode}
\newcommand*{\LWR@htmlelementclassend}[2]{%
-\LWR@stoppars%
-\LWR@htmltag{/#1}%
-\ifbool{HTMLDebugComments}{%
- \LWR@htmlcomment{End of #1 ``#2''}%
-}{}%
-\LWR@startpars%
+ \LWR@stoppars%
+ \LWR@htmltag{/#1}%
+ \ifbool{HTMLDebugComments}{%
+ \LWR@htmlcomment{End of #1 ``#2''}%
+ }{}%
+ \LWR@startpars%
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\LWR@htmldivclass} \oarg{style} \marg{class}
+% \begin{macro}{\LWR@htmldivclass} \oarg{style} \parg{\ARIA\ role} \marg{class}
%
% \changes{v0.20}{2017/01/17}{Added optional style.}
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
%
% \begin{macrocode}
-\NewDocumentCommand{\LWR@htmldivclass}{o m}{%
-\LWR@htmlelementclass{div}[#1]{#2}%
+\NewDocumentCommand{\LWR@htmldivclass}{o D(){} m}{%
+ \ifblank{#2}
+ {\LWR@htmlelementclass{div}[#1]{#3}}%
+ {\LWR@htmlelementclass{div}[#1](#2){#3}}%
}
% \end{macrocode}
% \end{macro}
@@ -22758,7 +22925,7 @@ end -- not --version
% \begin{macro}{\LWR@htmldivclassend} \marg{class}
% \begin{macrocode}
\newcommand*{\LWR@htmldivclassend}[1]{%
-\LWR@htmlelementclassend{div}{#1}%
+ \LWR@htmlelementclassend{div}{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -22825,7 +22992,7 @@ end -- not --version
% For other direct-formatting commands, see \cref{sec:directformatting}.
%
%
-% \begin{environment}{BlockClass} \oarg{style} \marg{class} \quad
+% \begin{environment}{BlockClass} \oarg{style} \parg{\ARIA\ role} \marg{class} \quad
% High-level interface for \element{div} classes.
%
% \qquad Ex: |\begin{BlockClass}{class}| text |\end{BlockClass}|
@@ -22834,11 +23001,12 @@ end -- not --version
% \changes{v0.20}{2017/01/17}{Added optional style.}
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
%
% \codeprint
% \begin{macrocode}
\begin{warpprint}
-\NewDocumentEnvironment{BlockClass}{o m}{}{}%
+\NewDocumentEnvironment{BlockClass}{o D(){} m}{}{}
\end{warpprint}
% \end{macrocode}
% \end{environment}
@@ -22847,11 +23015,11 @@ end -- not --version
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentEnvironment{LWR@print@BlockClass}{o m}{}{}%
+\NewDocumentEnvironment{LWR@print@BlockClass}{o D(){} m}{}{}%
-\NewDocumentEnvironment{LWR@HTML@BlockClass}{o m}%
- {\LWR@htmldivclass[#1]{#2}}
- {\LWR@htmldivclassend{#2}}
+\NewDocumentEnvironment{LWR@HTML@BlockClass}{o D(){} m}%
+ {\LWR@htmldivclass[#1](#2){#3}}%
+ {\LWR@htmldivclassend{#3}}
\LWR@formattedenv{BlockClass}
\end{warpHTML}
@@ -22914,11 +23082,15 @@ end -- not --version
\NewDocumentCommand{\LWR@print@InlineClass}{D{(}{)}{} o m +m}{#4}%
\NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{%
+\LWR@traceinfo{LWR@HTML@InlineClass #3}%
\ifbool{FormatWP}{%
+ \LWR@traceinfo{LWR@HTML@InlineClass: FormatWP}%
\LWR@htmlspanclass[#1]{#3}{#4}%
}{%
+ \LWR@traceinfo{LWR@HTML@InlineClass: not FormatWP}%
\LWR@htmlspanclass[#2]{#3}{#4}%
}%
+\LWR@traceinfo{LWR@HTML@InlineClass: done}%
}
\LWR@formatted{InlineClass}
@@ -22926,7 +23098,8 @@ end -- not --version
% \end{macrocode}
-% \begin{environment}{LWR@BlockClassWP} \marg{WPstyle} \marg{HTMLstyle} \marg{class} \quad
+% \begin{environment}{LWR@BlockClassWP}
+% \marg{WPstyle} \marg{HTMLstyle} \parg{\ARIA\ role} \marg{class} \quad
% Low-level interface for \element{div} classes with an automatic float ID.
% These are often used when |\ifbool{FormatWP}|.
%
@@ -22937,11 +23110,12 @@ end -- not --version
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
%
% \codeprint
% \begin{macrocode}
\begin{warpprint}
-\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}{}{}
\end{warpprint}
% \end{macrocode}
% \end{environment}
@@ -22949,8 +23123,9 @@ end -- not --version
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m m}{}{}%
-\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m m}%
+\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m D(){} m}{}{}%
+
+\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m D(){} m}%
{%
\LWR@stoppars%
\ifbool{FormatWP}%
@@ -22960,22 +23135,24 @@ end -- not --version
% \changes{v0.65}{2018/12/21}{Fix space between class and id.}
% \begin{macrocode}
\LWR@htmltag{%
- div class=\textquotedbl#3\textquotedbl\ % space
+ div class=\textquotedbl#4\textquotedbl\ % space
id=\textquotedbl%
\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}%
\textquotedbl%
+ \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}%
\ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}%
}%
}% FormatWP
{% not FormatWP
\LWR@htmltag{%
- div class=\textquotedbl#3\textquotedbl%
+ div class=\textquotedbl#4\textquotedbl%
+ \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}%
\ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}%
}%
}% not FormatWP
\LWR@startpars%
}
-{\LWR@htmldivclassend{#3}}
+{\LWR@htmldivclassend{#4}}
\LWR@formattedenv{LWR@BlockClassWP}
\end{warpHTML}
@@ -23866,14 +24043,30 @@ end -- not --version
% \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.}
% \changes{v0.36}{2017/08/16}{Force \protect\HTML\ superscripts.}
% \changes{v0.68}{2019/03/04}{Factored for multiple foot boxes.}
+% \changes{v0.896}{2021/04/04}{Fix: \ctr{autopage} references in footnotes.}
%
% \begin{macrocode}
\long\def\LWR@@footnotetext#1#2{%
\LWR@traceinfo{LWR@footnotetext}%
-\global\setbox\csname #2\endcsname=\vbox{%
% \end{macrocode}
-% Add to any current footnotes:
+%
+% Perhaps generate an autopage in the text to link a citation backreference
+% closer to its usage.
+% \begin{macrocode}
+\LWR@newautopagelabel{page}%
+% \end{macrocode}
+%
+% Locally disable auto page labels inside the footnote text.
+% Footnotes are accumulated in the current page before finally being placed
+% in a potentially later page, so the aotopages would be incorrect.
+% \begin{macrocode}
+\begingroup%
+\let\LWR@newautopagelabel\LWR@null@newautopagelabel%
+% \end{macrocode}
+%
+% Take the existing footnote box and add the new content:
% \begin{macrocode}
+\global\setbox\csname #2\endcsname=\vbox{%
\unvbox\csname #2\endcsname%
% \end{macrocode}
% Remember the footnote number for \cs{ref}:
@@ -23929,6 +24122,7 @@ end -- not --version
% \begin{macrocode}
\color@endgroup%
}% vbox
+\endgroup%
% \end{macrocode}
% Paragraph handling:
% \changes{v0.52}{2018/03/28}{Fix: Paragraph handling.}
@@ -23940,7 +24134,7 @@ end -- not --version
% \begin{macro}{\LWR@footnotetext} \marg{text}
% \begin{macrocode}
-\long\def\LWR@footnotetext#1{\LWR@@footnotetext{#1}{LWR@footnotebox}}
+\long\def\LWR@footnotetext#1{\LWR@@footnotetext{#1}{LWR@footnotebox}}%
% \end{macrocode}
% \end{macro}
%
@@ -24034,11 +24228,20 @@ end -- not --version
%
%
% \begin{macro}{\LWR@@printpendingfootnotes} \marg{footnote counter name}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.896}{2021/03/26}{Fix: Backref to footnote.}
% \begin{macrocode}
\newcommand*{\LWR@@printpendingfootnotes}[1]{%
\expandafter\ifvoid\csname LWR@#1box\endcsname\else
\LWR@forcenewpage
- \begin{BlockClass}{footnotes}
+ \begin{BlockClass}(note){footnotes}%
+% \end{macrocode}
+%
+% Create a new autopage in case citation back references occur inside the footnotes:
+% \begin{macrocode}
+ \LWR@newautopagelabel{page}%
+% \end{macrocode}
+% \begin{macrocode}
\null
\unvbox\csuse{LWR@#1box}
\setbox\csuse{LWR@#1box}=\vbox{}
@@ -24085,11 +24288,12 @@ end -- not --version
% \begin{macro}{\LWR@printpendingmpfootnotes}
% Enclose the minipage footnotes in a class, print, then clear.
% \changes{v0.45}{2018/01/10}{Added.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\newcommand*{\LWR@printpendingmpfootnotes}{%
\ifvoid\LWR@mpfootnotes\else
\LWR@forcenewpage
- \begin{BlockClass}{footnotes}
+ \begin{BlockClass}(note){footnotes}%
\null
\unvbox\LWR@mpfootnotes
\setbox\LWR@mpfootnotes=\vbox{}
@@ -24122,17 +24326,17 @@ end -- not --version
%
% \changes{v0.21}{2017/02/11}{Fixed source listing.}
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} emulate a wrapfig.}
-%
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\renewcommand{\marginpar}[2][]{%
\ifbool{FormatWP}%
{%
-\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock}
+\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}%
#2
-\end{LWR@BlockClassWP}
+\end{LWR@BlockClassWP}%
}%
{%
- \LWR@htmlspanclass{marginpar}{#2}%
+ \LWR@htmlspanclass(note){marginpar}{#2}%
}%
}
% \end{macrocode}
@@ -24149,17 +24353,17 @@ end -- not --version
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} emulate a wrapfig.}
% \changes{v0.44}{2017/11/10}{Added.}
% \changes{v0.73}{2019/06/25}{Fix: Paragraph tags.}
-%
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\newcommand{\marginparBlock}[2][]{%
\LWR@stoppars%
\ifbool{FormatWP}%
{%
- \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock}
+ \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}%
#2
\end{LWR@BlockClassWP}
}{%
- \begin{BlockClass}[width:2in; float:right; margin:10pt]{marginparblock}
+ \begin{BlockClass}[width:2in; float:right; margin:10pt](note){marginparblock}%
#2
\end{BlockClass}
}%
@@ -24213,6 +24417,122 @@ end -- not --version
+% \section{Tracking internal cross references}
+%
+% Cross references are generated using the \PDF\ file's page number during
+% \LaTeX\ compilation.
+% Internal labels are generated which include these page numbers in the label.
+%
+%
+% \DescribeFile{*_html.aux}
+% A new entry in the \filenm{*_html.aux} file is used to help
+% cross-references:
+% \begin{sourceverb}
+% \newlabel{autopage-<nnn>}{{<x>}{<y>}}
+% \end{sourceverb}
+%
+%
+% \DescribeCounter{LWR@currentautosecpage} Records the page number when the section
+% was created. (If a math expression is included in the section name,
+% and \SVG\ math is used, the corresponding \env{lateximage} will cause the
+% page number to change by the time the following autosec label is created,
+% thus the initial page number is recorded here.)
+% \ctr{LWR@currentautosecfloatpage} is updated
+% more often than \ctr{LWR@currentautosecpage}.
+% \changes{v0.43}{2017/11/01}{\ctr{LWR@currentautosecpage}: Added.}
+% \changes{v0.66}{2019/01/28}{\ctr{LWR@currentautosecpage}: Fix for \LOF, \LOT float in home page.}
+% \begin{macrocode}
+\newcounter{LWR@currentautosecpage}
+\setcounter{LWR@currentautosecpage}{1}
+% \end{macrocode}
+%
+%
+% \DescribeCounter{LWR@currentautosecfloatpage}
+% The \HTML\ output's \PDF\ page number at the start of a new \HTML\ file, section,
+% or float.
+% Updated more often than \ctr{LWR@currentautosecpage}, such as when a new float occurs.
+% Used only for table of contents, list of figures, list of tables,
+% but not for general cross references such as \cs{label}, citation backlinks, etc.
+%
+% \cs{LWRsetnextfloat} is written with this and the |autoid|
+% by the modified \cs{addcontentsline} just before each float's entry.
+% \begin{macrocode}
+\newcounter{LWR@currentautosecfloatpage}
+\setcounter{LWR@currentautosecfloatpage}{1}
+% \end{macrocode}
+%
+%
+% \DescribeCounter{LWR@previousautopagelabel} Remembers which autopage label
+% was most recently generated. Used to avoid duplicates.
+% \begin{macrocode}
+\newcounter{LWR@previousautopagelabel}
+\setcounter{LWR@previousautopagelabel}{-1}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\LWR@newautopagelabel} \marg{pagenumber counter}
+% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.}
+% \changes{v0.72}{2019/06/05}{Fix: References for \pkg{xr}, \pkg{xr-hyper}.}
+% \changes{v0.896}{2021/03/26}{Fix: Refs if page changed.}
+%
+% \cs{BaseJobname} is added to the label in case \pkg{xr} or \pkg{xr-hyper} are used.
+% \begin{macrocode}
+\newcommand*{\LWR@newautopagelabel}[1]{%
+% \end{macrocode}
+%
+% No action if this autopage label has already been defined:
+% \begin{macrocode}
+\ifnumequal{\value{LWR@previousautopagelabel}}{\value{page}}%
+ {}%
+% \end{macrocode}
+%
+% If the \PDF\ page has changed, create a label using the desired counter.
+%
+% If the counter is \ctr{LWR@currentautosecpage}, that was the page number
+% when the section generation began,
+% but the current \PDF\ page may be different by now
+% if the section name had an \SVG\ image, such as \SVG\ math.
+% To allow the cross-reference to point just after the section heading, the
+% label must be made after the section heading is complete, which may have
+% generated a new \PDF\ page.
+% Thus, the label is made with the given counter, which may be the \PDF\ page
+% number where the section heading began,
+% then if the \PDF\ page number has changed,
+% another label is made for the current page number.
+% \begin{macrocode}
+ {%
+ \label{\BaseJobname-autopage-\csuse{the#1}}%
+% \end{macrocode}
+%
+% If there are intervening pages, such as an \SVG\ image,
+% define another label for the new page:
+% \begin{macrocode}
+ \ifnumequal{\value{#1}}{\value{page}}%
+ {}%
+ {\label{\BaseJobname-autopage-\csuse{thepage}}}%
+% \end{macrocode}
+%
+% Remember the latest autopage label:
+% \begin{macrocode}
+ \setcounter{LWR@previousautopagelabel}{\value{page}}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@null@newautopagelabel} \marg{pagenumber counter}
+% \changes{v0.896}{2021/04/04}{Fix: Refs in footnotes.}
+%
+% Inside a footnote, the page numbers will be incorrect,
+% so this is nullified.
+% \begin{macrocode}
+\newcommand*{\LWR@null@newautopagelabel}[1]{}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
% \section{Splitting \HTML\ files}
%
% \begin{itemize}
@@ -24559,40 +24879,6 @@ end -- not --version
% \end{macro}
-% \DescribeCounter{LWR@previousautopagelabel} Remembers which autopage label
-% was most recently generated. Used to avoid duplicates.
-% \begin{macrocode}
-\newcounter{LWR@previousautopagelabel}
-\setcounter{LWR@previousautopagelabel}{-1}
-% \end{macrocode}
-
-
-% \DescribeFile{*_html.aux}
-% A new entry in the \filenm{*_html.aux} file is used to help
-% cross-references:
-% \begin{sourceverb}
-% \newlabel{autopage-<nnn>}{{<x>}{<y>}}
-% \end{sourceverb}
-%
-% \begin{macro}{\LWR@newautopagelabel} \marg{pagenumber counter}
-% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.}
-% \changes{v0.72}{2019/06/05}{Fix: References for \pkg{xr}, \pkg{xr-hyper}.}
-%
-% \cs{BaseJobname} is added to the label in case \pkg{xr} or \pkg{xr-hyper} are used.
-% \begin{macrocode}
-\newcommand*{\LWR@newautopagelabel}[1]{%
-\ifnumequal{\value{LWR@previousautopagelabel}}{\value{page}}%
-{}% no action if this autopage label has already been defined
-{%
- \label{\BaseJobname-autopage-\arabic{#1}}%
- \setcounter{LWR@previousautopagelabel}{\value{page}}
-}%
-}
-% \end{macrocode}
-% \end{macro}
-
-
-
% \subsection{Sanitizing expressions for \HTML}
% Math expressions are converted to |lateximage|s,
@@ -25119,9 +25405,10 @@ end -- not --version
% At the bottom of the ending file:
%
% \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.}
+% \changes{v0.896}{2021/03/04}{Added \element{main}.}
% \begin{macrocode}
\LWR@htmlelementclassend{section}{textbody}
-\LWR@htmlelementclassend{div}{bodycontainer}
+\LWR@htmlelementclassend{main}{bodycontainer}
\LWR@htmlelementclassend{div}{bodyandsidetoc}
\LWR@printpendingfootnotes
@@ -25250,11 +25537,12 @@ end -- not --version
% \end{macrocode}
%
-% Track the \PDF\ page numbers of the \HTML\ output:
+% Track the \PDF\ page numbers of the \HTML\ output.
+% This is updated more frequently than \ctr{LWR@currentautosecpage}.
% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.}
% \begin{macrocode}
-\setcounter{LWR@latestautopage}{\value{page}}%
-\LWR@newautopagelabel{LWR@latestautopage}%
+\setcounter{LWR@currentautosecfloatpage}{\value{page}}%
+\LWR@newautopagelabel{LWR@currentautosecfloatpage}%
% \end{macrocode}
%
%
@@ -25305,8 +25593,9 @@ end -- not --version
% Start of the \element{textbody}:
% \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.}
% \changes{v0.84}{2020/04/24}{Added prev/next links.}
+% \changes{v0.896}{2021/03/04}{Added \element{main}.}
% \begin{macrocode}
-\LWR@htmlelementclass{div}{bodycontainer}
+\LWR@htmlelementclass{main}{bodycontainer}
\LWR@htmlelementclass{section}{textbody}
% \end{macrocode}
%
@@ -25664,20 +25953,6 @@ end -- not --version
% \end{macro}
%
%
-% \DescribeCounter{LWR@currentautosec} Records the page number when the section
-% was created. (If a math expression is included in the section name,
-% and \SVG\ math is used, the corresponding \env{lateximage} will cause the
-% page number to change by the time the following autosec label is created,
-% thus the initial page number is recorded here.)
-% \changes{v0.43}{2017/11/01}{\ctr{LWR@currentautosec}: Added.}
-% \changes{v0.66}{2019/01/28}{\ctr{LWR@currentautosec}: Fix for \LOF, \LOT float in home page.}
-% \begin{macrocode}
-\newcounter{LWR@currentautosec}
-\setcounter{LWR@currentautosec}{1}
-% \end{macrocode}
-%
-%
-%
% \begin{macro}{\LWR@section} * \oarg{TOC name} \marg{name} \marg{sectiontype}
%
% \changes{v0.20}{2017/01/09}{Combined higher-level sections together into files.}
@@ -25819,7 +26094,7 @@ end -- not --version
% \end{macrocode}
% \changes{v0.43}{2017/11/01}{Fix: Math in section name.}
% \begin{macrocode}
-\setcounter{LWR@currentautosec}{\value{page}}%
+\setcounter{LWR@currentautosecpage}{\value{page}}%
% \end{macrocode}
%
% Check if starred:
@@ -25960,6 +26235,12 @@ end -- not --version
% Generate a \LaTeX{} label.
%
% Track the \PDF\ page numbers of the \HTML\ output.
+% A new autopage label may be generated for \ctr{LWR@currentautosecpage}
+% for the start of the section,
+% and also for the current page if it is different due to an \SVG\ image
+% in the section name.
+% Also, the final page after the section has been created is updated
+% in \ctr{LWR@currentautosecfloatpage}.
%
% \changes{v0.43}{2017/11/01}{Fix: Math in section name.}
% \changes{v0.48}{2018/02/11}{Fix: \TOC, \LOF, \LOT\ links.}
@@ -25967,8 +26248,8 @@ end -- not --version
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
% \begin{macrocode}
\LWR@traceinfo{LWR@section: about to create the LaTeX label}%
-\setcounter{LWR@latestautopage}{\value{page}}%
-\LWR@newautopagelabel{LWR@currentautosec}\LWR@orignewline%
+\setcounter{LWR@currentautosecfloatpage}{\value{page}}%
+\LWR@newautopagelabel{LWR@currentautosecpage}\LWR@orignewline%
% \end{macrocode}
%
% If this is the first section found in this file,
@@ -26665,9 +26946,10 @@ end -- not --version
}%
% \end{macrocode}
% \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.}
+% \changes{v0.896}{2021/03/04}{Added \element{main}.}
% \begin{macrocode}
\LWR@htmlelementclass{div}{bodywithoutsidetoc}
-\LWR@htmlelementclass{div}{bodycontainer}
+\LWR@htmlelementclass{main}{bodycontainer}
\LWR@traceinfo{LWR@lwarpStart: Generating textbody.}
\LWR@htmlelementclass{section}{textbody}
% \end{macrocode}
@@ -26732,11 +27014,17 @@ end -- not --version
% ^^A % \end{macrocode}
%
%
-% First autopage label in case a figure occurs early.
+% First autopage label in case a figure occurs early before the first section:
+% A new autopage label may be generated for \ctr{LWR@currentautosecpage}
+% for the start of the section,
+% and also for the current page if it is different due to an \SVG\ image
+% in the section name.
+% Also, the final page after the section has been created is updated
+% in \ctr{LWR@currentautosecfloatpage}.
% \changes{v0.66}{2019/01/28}{Fix: \TOC, \LOF, \LOT\ links.}
% \begin{macrocode}
-\setcounter{LWR@latestautopage}{\value{page}}%
-\LWR@newautopagelabel{LWR@currentautosec}%
+\setcounter{LWR@currentautosecfloatpage}{\value{page}}%
+\LWR@newautopagelabel{LWR@currentautosecpage}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -26790,20 +27078,23 @@ end -- not --version
\LWR@closeprevious{finished}
% \end{macrocode}
% At the bottom of the ending file:
-
+%
+% Print any pending footnotes:
+% \changes{v0.896}{2021/03/14}{Fix: Footnotes at end of document.}
+% \begin{macrocode}
+\LWR@printpendingfootnotes
+% \end{macrocode}
+%
% Close the textbody:
% \changes{v0.65}{2018/12/18}{Improved \CSS\ for page layout.}
% \changes{v0.84}{2020/04/24}{Added prev/next links.}
+% \changes{v0.896}{2021/03/04}{Added \element{main}.}
% \begin{macrocode}
\label{\BaseJobname-autofile-last}
\LWR@htmlelementclassend{section}{textbody}
-\LWR@htmlelementclassend{div}{bodycontainer}
+\LWR@htmlelementclassend{main}{bodycontainer}
\LWR@htmlelementclassend{div}{bodyandsidetoc}
% \end{macrocode}
-% Print any pending footnotes:
-% \begin{macrocode}
-\LWR@printpendingfootnotes
-% \end{macrocode}
%
% Create the footer if not \EPUB\:
% \changes{v0.84}{2020/04/24}{Fix: No footer for \EPUB}
@@ -27360,7 +27651,9 @@ end -- not --version
%
% \begin{macrocode}
\LWR@setfootnoteseries%
-\def\@makefnmark{\textsuperscript{\thefootnote}}
+\def\@makefnmark{%
+ \textsuperscript{\thefootnote}%
+}
% \end{macrocode}
%
% \begin{center}
@@ -28107,6 +28400,12 @@ end -- not --version
% \begin{macrocode}
\renewcommand{\@begintheorem}[2]{%
\LWR@forcenewpage
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{theoremcontents}
\trivlist
\item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape
@@ -28137,6 +28436,12 @@ end -- not --version
% \begin{macrocode}
\renewcommand*{\@endtheorem}{%
\endtrivlist
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\endBlockClass% theoremcontents
}
% \end{macrocode}
@@ -28260,7 +28565,7 @@ end -- not --version
% \changes{v0.48}{2018/02/02}{Honors \cs{makelabel}.}
% \begin{macrocode}
\def\LWR@HTML@item[#1]{%
-\LWR@traceinfo{@item}
+\LWR@traceinfo{@item}%
\if@noparitem
\@donoparitem
\else
@@ -28517,12 +28822,55 @@ end -- not --version
% \end{macro}
% \begin{environment}{description} \oarg{options}
+%
+% Footnotes are modified to correctly parse optional arguments.
+% \changes{v0.896}{2021/03/14}{Fix: Footnotes inside \env{description} label.}
% \begin{macrocode}
\newcommand*{\LWR@descriptionstart}{%
-\renewcommand*{\LWR@printcloselist}{\LWR@printclosedescription}
-\renewcommand*{\LWR@printopenlist}{dl}
-\let\item\LWR@descitem%
-\LWR@nulllistfills%
+ \renewcommand*{\LWR@printcloselist}{\LWR@printclosedescription}
+ \renewcommand*{\LWR@printopenlist}{dl}
+ \let\item\LWR@descitem%
+ \LWR@nulllistfills%
+% \end{macrocode}
+%
+% Footnotes are redefined to process optional arguments inside the \env{description}
+% label.
+% A \cs{footnote} is dropped, as it is in print mode.
+% Using the optional arguments does not work in print mode,
+% but for some reason they must be accepted as done here to work correctly
+% even without the optional arguments.
+% \begin{macrocode}
+ \renewcommand{\footnote}[2][]{%
+ \ifblank{##1}%
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark%\@footnotetext
+ }%
+ {%
+ \begingroup
+ \csname c@\@mpfn\endcsname ##1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark%\@footnotetext
+ }%
+ }%
+ %
+ \renewcommand{\footnotemark}[1][]{%
+ \ifblank{##1}%
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \@footnotemark%
+ }%
+ {%
+ \begingroup%
+ \c@footnote ##1\relax%
+ \unrestored@protected@xdef\@thefnmark{\thefootnote}%
+ \endgroup%
+ \@footnotemark%
+ }%
+ }%
}
% \end{macrocode}
% \end{environment}
@@ -29416,7 +29764,8 @@ end -- not --version
\LWR@setexparray{LWR@colatspec}%
{\arabic{LWR@tabletotalLaTeXcols}}%
{\expandafter\@firstofone\LWR@colparameter}%
- \LWR@traceinfo{at \arabic{LWR@tabletotalLaTeXcols}: %
+ \LWR@traceinfo{at \arabic{LWR@tabletotalLaTeXcols}%
+ : % space
\LWR@getexparray{LWR@colatspec}{\arabic{LWR@tabletotalLaTeXcols}}}%
}%
\let\LWR@colparameter\relax%
@@ -32690,7 +33039,8 @@ end -- not --version
% \item [\cs{newlabel}:] Unchanged. When the |.aux| file is read, sets \cs{r@<label>@lwarp}.
% \item [\cs{r@<label>@lwarp}:] Set to |{{section_name}{file_name}{depth}{number}}|:
% \begin{description}
-% \item [\cs{LWR@nameref}:] The section name for this label.
+% \item [\cs{LWR@nameref}:] The section or object name for this label.
+% \item [\cs{LWR@currentautosecpageref}:] The \ctr{LWR@currentautosecpage} for this label.
% \item [\cs{LWR@htmlfileref}:] The filenumber or name for this label.
% \item [\cs{LWR@lateximagedepthref}:] The |lateximagedepth| for this label.
% \item [\cs{LWR@lateximagenumberref}:] The |lateximagenumber| for this label.
@@ -32830,7 +33180,18 @@ end -- not --version
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
% \begin{macrocode}
\newcommand*{\LWR@nameref}[1]{%
- \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@firstoffour{#1}%
+ \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@firstoffive{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR@currentautosecpageref} \marg{label}
+% Returns the \ctr{LWR@currentautosecpage} for this label:
+% \changes{v0.896}{2021/04/05}{Added.}
+% \begin{macrocode}
+\newcommand*{\LWR@currentautosecpageref}[1]{%
+ \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@secondoffive{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -32842,7 +33203,7 @@ end -- not --version
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
% \begin{macrocode}
\newcommand*{\LWR@htmlfileref}[1]{%
- \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@secondoffour{#1}%
+ \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@thirdoffive{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -32853,7 +33214,7 @@ end -- not --version
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
% \begin{macrocode}
\newcommand*{\LWR@lateximagedepthref}[1]{%
- \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@thirdoffour{#1}%
+ \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@fourthoffive{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -32865,7 +33226,7 @@ end -- not --version
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
% \begin{macrocode}
\newcommand*{\LWR@lateximagenumberref}[1]{%
- \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@fourthoffour{#1}%
+ \expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@fifthoffive{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -32874,6 +33235,7 @@ end -- not --version
% \begin{macro}{\LWR@write@lwarplabel} \marg{label}
% Sanitize the name and then creates the label:
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
+% \changes{v0.896}{2021/04/05}{Added \cs{LWR@currentautosecpage}.}
% \begin{macrocode}
\newcommand*{\LWR@write@lwarplabel}[1]{%
\LWR@traceinfo{LWR@write@lwarplabel !#1!}%
@@ -32883,6 +33245,7 @@ end -- not --version
{%
\string\newlabel{#1@lwarp}{%
{\@currentlabelname}%
+ {\theLWR@currentautosecpage}%
{%
\ifbool{FileSectionNames}%
{\LWR@thisfilename}%
@@ -33017,8 +33380,9 @@ end -- not --version
% and also patches \pkg{memoir}.
%
% \changes{v0.84}{2020/04/05}{Removed optional args.}
+% \changes{v0.896}{2021/04/08}{Revert to a simple \cs{newcommand*}.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@new@label}{m}{%
+\newcommand*{\LWR@new@label}[1]{%
\LWR@traceinfo{LWR@new@label: starting}%
\LWR@traceinfo{LWR@new@label: !#1!}%
% \@bsphack%
@@ -33027,7 +33391,7 @@ end -- not --version
% \begin{macrocode}
\LWR@orig@label{#1}%
% \end{macrocode}
-% Create a special label which holds the section number,
+% Create a special label which holds the section number, section name,
% |LWR@htmlfilenumber|, |LWR@lateximagedepth|, and |LWR@lateximagenumber|:
% \begin{macrocode}
\LWR@traceinfo{%
@@ -33190,6 +33554,24 @@ end -- not --version
\LWR@formatted{ref}
% \end{macrocode}
%
+%
+% \begin{macro}{\LWR@refwithsection}
+% \changes{v0.896}{2021/04/21}{Added.}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR@refwithsection}{s m}{%
+ \LWR@traceinfo{LWR@refwithsection !#2!}%
+ \IfBooleanTF{#1}%
+ {\LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}}%
+ {%
+ \LWR@startref{#2}%
+ \LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}%
+ \LWR@htmltag{/a}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
% For \brand{MathJax}:
% \changes{v0.88}{2020/07/05}{Added \brand{MathJax}.}
% \begin{macrocode}
@@ -33280,9 +33662,10 @@ end -- not --version
% \begin{macro}{\@currentHref} Added to support \pkg{backref}.
% \changes{v0.45}{2018/01/14}{Added.}
% \changes{v0.84}{2020/04/07}{\pkg{backref}: Fixed from \pkg{lwarp} v0.72 changes.}
+% \changes{v0.896}{2021/04/05}{\pkg{backref}: Improved back refs.}
% \begin{macrocode}
\AtBeginDocument{
- \def\@currentHref{\BaseJobname-autopage-\theLWR@currentautosec}
+ \def\@currentHref{\BaseJobname-autopage-\theLWR@previousautopagelabel}%
}
% \end{macrocode}
% \end{macro}
@@ -33471,8 +33854,8 @@ end -- not --version
% \end{macro}
-% \begin{macro}{\LWR@subinlineimage} \marg{\element{alt} tag} \marg{class}
-% \marg{filename} \marg{extension} \marg{CSS style}
+% \begin{macro}{\LWR@subinlineimage} \marg{1: \element{alt} tag} \marg{2: class}
+% \marg{3: filename} \marg{4: extension} \marg{5: \CSS\ style} \marg{6: \ARIA\ role}
%
% Factored from \env{lateximage}.
%
@@ -33480,13 +33863,18 @@ end -- not --version
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
% \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.}
% \begin{macrocode}
-\newcommand*{\LWR@subinlineimage}[5]{%
+\newcommand*{\LWR@subinlineimage}[6]{%
+ \ifblank{#6}%
+ {\renewcommand*{\LWR@tempone}{}}
+ {\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}
\ifblank{#1}%
{%
\LWR@htmltag{img \LWR@indentHTML
src=\textquotedbl#3.#4\textquotedbl \LWR@indentHTML
alt=\textquotedbl#3\textquotedbl \LWR@indentHTML
+ \LWR@tempone
style=\textquotedbl#5\textquotedbl \LWR@indentHTML
class=\textquotedbl#2\textquotedbl \LWR@orignewline
}%
@@ -33495,6 +33883,7 @@ end -- not --version
\LWR@htmltag{img \LWR@indentHTML
src=\textquotedbl#3.#4\textquotedbl \LWR@indentHTML
alt=\textquotedbl#1\textquotedbl \LWR@indentHTML
+ \LWR@tempone
style=\textquotedbl#5\textquotedbl \LWR@indentHTML
class=\textquotedbl#2\textquotedbl \LWR@orignewline
}%
@@ -33899,20 +34288,20 @@ end -- not --version
% When a new \HTML\ file is marked in the \LaTeX\ \PDF\ file,
% or at the start of a new section,
-% the \LaTeX\ page number at that point is stored in |LWR@latestautopage|,
+% the \LaTeX\ \PDF\ page number at that point is stored in \ctr{LWR@currentautosecfloatpage},
% (and the associated filename is remembered by the special \LaTeX\ labels).
% This page number is used to generate an |autopage| \HTML\ \element{id}
% in the \HTML\ output at the start of the new \HTML\ file or section.
% Meanwhile, there is a float counter used to generate an \HTML\ |autoid|
% \element{id} at the start of the float itself in the \HTML\ file.
% The |autopage| and |autoid| values to use for each float are written to the
-% |.lof|, etc. files just before each float's entry. These values are used
+% \filenm{.lof}, etc. files just before each float's entry. These values are used
% by \cs{l@figure}, etc. to create the \HTML\ links in the List of Figures, etc.
%
% \DescribeCounter{LWR@nextautoid} Tracks |autoid| for floats.
% \DescribeCounter{LWR@nextautopage} Tracks |autopage| for floats.
%
-% These are updated per float as the |.lof|, |.lot| file is read.
+% These are updated per float as the \filenm{.lof}, \filenm{.lot} file is read.
% \begin{macrocode}
\newcounter{LWR@nextautoid}
\newcounter{LWR@nextautopage}
@@ -33938,16 +34327,6 @@ end -- not --version
% \end{macro}
-% \DescribeCounter{LWR@latestautopage}
-% The \HTML\ output's \PDF\ page number at the start of a new \HTML\ file or section.
-%
-% \cs{LWRsetnextfloat} is written with this and the |autoid|
-% by the modified \cs{addcontentsline} just before each float's entry.
-% \begin{macrocode}
-\newcounter{LWR@latestautopage}
-\setcounter{LWR@latestautopage}{1}
-% \end{macrocode}
-
% \begin{environment}{LWR@figcaption}
%
@@ -33963,7 +34342,6 @@ end -- not --version
{%
\ifbool{FormatWP}{%
\BlockClass[font-style:italic]{figurecaption}%
-% \LWR@print@vspace*{\baselineskip}
}{%
\BlockClass{figurecaption}%
}%
@@ -34087,7 +34465,7 @@ end -- not --version
% \begin{macro}{\addcontentsline}
% Patched to write the |autopage| and |autoid| before each float's entry.
-% No changes if writing |.toc|
+% No changes if writing \filenm{.toc}
% For a theorem, automatically defines \cs{ext@<type>} as needed, to
% mimic and reuse the float mechanism.
%
@@ -34113,7 +34491,7 @@ end -- not --version
% \begin{macrocode}
\addtocontents{\@nameuse{ext@#2}}{%
\protect\LWRsetnextfloat%
- {\arabic{LWR@latestautopage}}%
+ {\arabic{LWR@currentautosecfloatpage}}%
{\arabic{LWR@thisautoid}}%
}%
}% not TOC
@@ -34156,7 +34534,7 @@ end -- not --version
%
% This section controls the generation of the \TOC, \LOF, and \LOT.
%
-% The |.toc|, |.lof|, and |.lot| files are named by the source code \cs{jobname}.
+% The \filenm{.toc}, \filenm{.lof}, and \filenm{.lot} files are named by the source code \cs{jobname}.
%
% In \HTML, the printed tables are placed inside a \element{div}
% of class \attribute{toc}, \attribute{lof}, or \attribute{lot}.
@@ -34308,8 +34686,8 @@ end -- not --version
}
{
% \end{macrocode}
-% Copy the |.toc| file to |.sidetoc| for printing the side\TOC.
-% The original |.toc| file is renewed when \cs{tableofcontents} is finished.
+% Copy the \filenm{.toc} file to |.sidetoc| for printing the side\TOC.
+% The original \filenm{.toc} file is renewed when \cs{tableofcontents} is finished.
% \begin{macrocode}
\ifbool{LWR@copiedsidetoc}{}{%
\LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
@@ -34498,7 +34876,7 @@ end -- not --version
% \begin{macro}{\numberline} \marg{number}
%
-% (Called from each line in the |.aux|, |.lof| files.)
+% (Called from each line in the |.aux|, \filenm{.lof} files.)
%
% Record this section number for further use:
%
@@ -34906,7 +35284,7 @@ end -- not --version
% \begin{macro}{\@wrglossary} \marg{term} \qquad
-% Redefined to write the |LWR@latestautopage| counter instead of |page|.
+% Redefined to write the |LWR@autoglossary| counter instead of |page|.
% \begin{macrocode}
\def\@wrglossary#1{%
\addtocounter{LWR@autoglossary}{1}%
@@ -35704,9 +36082,11 @@ end -- not --version
% \begin{macrocode}
\RenewDocumentCommand{\hspace}{s m}{}%
% \end{macrocode}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.896}{2021/03/15}{Added groups.}
% \begin{macrocode}
- \RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
- \DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}%
+ \RenewDocumentCommand{\LWR@htmlspanclass}{o D(){} m +m}{{##4}}%
+ \DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{{##4}}%
% \end{macrocode}
% Nullify math macros.
% \changes{v0.55}{2018/04/24}{Removed extraneous space which appeared in file links.}
@@ -36113,7 +36493,7 @@ end -- not --version
% Temporarily disable formatting while measuring the image parameters:
% \begin{macrocode}
\LWR@restoreorigformatting%
- \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o d()}{}{}% inside group
\LWR@print@normalsize%
% \end{macrocode}
% Temporarily set font for the \HTML\ \PDF\ output:
@@ -36297,6 +36677,7 @@ end -- not --version
% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
% \changes{v0.74}{2019/08/20}{Adds star argument for \env{lateximage}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\ifbool{LWR@dynamicmath}{%
\LWR@traceinfo{subsingledollar: dynamic}%
@@ -36304,6 +36685,7 @@ end -- not --version
[\MathImageAltText]% alt tag
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ (math)% ARIA
}{% not dynamic math
\LWR@traceinfo{subsingledollar: static}%
\IfValueTF{#1}{% #1 True
@@ -36330,11 +36712,13 @@ end -- not --version
FB\LWR@tempone% xfakebold
]%
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ (math)% ARIA
}{% #1 False
\begin{lateximage}% no hashing
[#2]% alt
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ (math)% ARIA
}%
}% not dynamic math
% \end{macrocode}
@@ -36498,7 +36882,7 @@ end -- not --version
\LetLtxMacro\LWR@origopenbracket\[
\LetLtxMacro\LWR@origclosebracket\]
% \end{macrocode}
-
+%
% \DescribeObject{\$}
% \DescribeObject{\$\$}
% Redefine the dollar sign to place math inside a \env{lateximage},
@@ -36532,12 +36916,31 @@ end -- not --version
% For \brand{MathJax}, print the math between |\[| and |\]|:
% \changes{v0.42}{2017/10/16}{Improved line spacing with mathjax.}
% \changes{v0.89}{2020/08/01}{TT font for \brand{MathJax}.}
+% \changes{v0.896}{2021/04/07}{Fix: Displaymath notes with \brand{MathJax}.}
% \begin{macrocode}
{
- \textbackslash[%
- {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}%
- \textbackslash]
+ \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{%
+% \end{macrocode}
+%
+% The equation is printed to the \PDF\ output inside \HTML\ comment tags.
+% This allows labels and footnotes to be accepted and processed.
+% The \env{math} environment is selected here, and \cs{LWR@hidelatexequation}
+% will use the original print-mode meaning of \env{math}.
+% \begin{macrocode}
+ \LWR@hidelatexequation{math}{#1}%
+% \end{macrocode}
+% \begin{macrocode}
+ \InlineClass{hidden}{\LWR@syncnotenumbers}%
+ \textbackslash[%
+ {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}%
+ \textbackslash]
+ \InlineClass{hidden}{\LWR@syncnotenames}%
+ }{%
+ \textbackslash[%
+ {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}%
+ \textbackslash]
+ }%
}% mathjax
% \end{macrocode}
@@ -36546,6 +36949,7 @@ end -- not --version
% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
{% not mathjax
\begin{BlockClass}{displaymath}%
@@ -36558,6 +36962,7 @@ end -- not --version
\textbackslash{]}%
]%
*% do not add open/closing braces
+ (math)% ARIA
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -36697,11 +37102,13 @@ end -- not --version
% \begin{macrocode}
\let\LWR@orig@math\math
\let\LWR@orig@endmath\endmath
+
\let\LWR@orig@displaymath\displaymath
\let\LWR@orig@enddisplaymath\enddisplaymath
\let\math\relax
\let\endmath\relax
+
\let\displaymath\relax
\let\enddisplaymath\relax
% \end{macrocode}
@@ -36740,14 +37147,14 @@ end -- not --version
% but does not supply \brand{MathJax} or \HTML\ \attribute{alt} tags.
% \changes{v0.51}{2018/03/21}{Processing for complicated display math.}
% \changes{v0.74}{2019/08/07}{Uses \cs{MathImageAltText}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\newenvironment{LWR@displaymathother}
{%
\begin{BlockClass}{displaymath}%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}%
- [\MathImageAltText]%
+ \begin{lateximage}[\MathImageAltText](math)% [alt](ARIA)
\LWR@origdollar\LWR@origdollar%
}
{%
@@ -36764,17 +37171,18 @@ end -- not --version
% but does not supply \brand{MathJax} or \HTML\ \attribute{alt} tags.
% \changes{v0.51}{2018/03/21}{Processing for complicated display math.}
% \changes{v0.74}{2019/08/07}{Uses \cs{MathImageAltText}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\newenvironment{LWR@equationother}
{%
\begin{BlockClass}{displaymathnumbered}%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[\MathImageAltText]%
- \LWR@origequation%
+ \begin{lateximage}[\MathImageAltText](math)% [alt](ARIA)
+ \LWR@orig@equation%
}
{%
- \LWR@origendequation%
+ \LWR@orig@endequation%
\end{lateximage}%
\end{BlockClass}%
}
@@ -36895,7 +37303,7 @@ end -- not --version
% Start the \LaTeX\ math environment inside the \HTML\ comment:
% \begin{macrocode}
\begingroup
- \@nameuse{LWR@orig#1}
+ \@nameuse{LWR@orig@#1}
% \end{macrocode}
% While in the math environment,
% restore various commands to their \LaTeX\ meanings.
@@ -36914,7 +37322,7 @@ end -- not --version
% \end{macrocode}
% End the \LaTeX{} math environment inside the \HTML\ comment:
% \begin{macrocode}
- \@nameuse{LWR@origend#1}
+ \@nameuse{LWR@orig@end#1}
\endgroup
% \end{macrocode}
@@ -36965,10 +37373,10 @@ end -- not --version
% after redefined by \pkg{amsmath}, if loaded.
% \begin{macrocode}
\AtBeginDocument{
- \let\LWR@origequation\equation
- \let\LWR@origendequation\endequation
- \csletcs{LWR@origequation*}{equation*}
- \csletcs{LWR@origendequation*}{endequation*}
+ \let\LWR@orig@equation\equation
+ \let\LWR@orig@endequation\endequation
+ \csletcs{LWR@orig@equation*}{equation*}
+ \csletcs{LWR@orig@endequation*}{endequation*}
}
% \end{macrocode}
%
@@ -37023,6 +37431,7 @@ end -- not --version
% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.}
% \changes{v0.52}{2018/03/31}{Fix: \env{equation*} now based on \env{equation} instead of \env{displaymath}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\ifstrequal{#2}{equation*}{%
\begin{BlockClass}{displaymath}%
@@ -37044,7 +37453,7 @@ end -- not --version
\textbackslash{begin\{#2\}} % extra space
\LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
\textbackslash{end\{#2\}}%
- ]*% alt tag
+ ]*(math)% alt tag, ARIA
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -37054,9 +37463,9 @@ end -- not --version
% Create the actual \LaTeX-formatted equation inside
% the |lateximage| using the contents of the environment.
% \begin{macrocode}
- \@nameuse{LWR@orig#2}%
+ \@nameuse{LWR@orig@#2}%
#1% contents collected by \collect@body
- \@nameuse{LWR@origend#2}%
+ \@nameuse{LWR@orig@end#2}%
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
@@ -37124,10 +37533,11 @@ end -- not --version
% \begin{macro}{\LWR@synconenotename} \marg{\brand{MathJax} variable} \marg{text}
+% \changes{v0.896}{2021/04/07}{Fix: \brand{MathJax}: Footnote names.}
% \begin{macrocode}
\newcommand*{\LWR@synconenotename}[2]{%
\textbackslash(
- \textbackslash{}def\textbackslash{}#1\{#2\}
+ \textbackslash{}def\textbackslash{}#1name\{#2\}
\textbackslash)
}
% \end{macrocode}
@@ -37417,7 +37827,7 @@ end -- not --version
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[(\LWR@startingequationtag\textendash\LWR@equationtag)%
- \LWR@addmathjax{eqnarray}{\BODY}]*%
+ \LWR@addmathjax{eqnarray}{\BODY}]*(math)%
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -37441,7 +37851,7 @@ end -- not --version
\begin{BlockClass}{displaymath}%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]*%
+ \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]*(math)%
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -37755,19 +38165,21 @@ end -- not --version
% \begin{macro}{\LWR@lateximage@oneimageb} \marg{1: alt text} \marg{2: filename}
-% \marg{3: CSS style}
+% \marg{3: \CSS\ style}
+% \marg{4: \ARIA\ role}
% Creates the image for the \env{lateximage}.
%
% \changes{v0.74}{2019/08/26}{Factored from \env{lateximage}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
-\newcommand{\LWR@lateximage@oneimageb}[3]{%
+\newcommand{\LWR@lateximage@oneimageb}[4]{%
\LWR@subinlineimage{#1}{lateximage}%
{%
\LWR@print@mbox{%
\LWR@ImagesDirectory\OSPathSymbol%
#2%
}%
- }{svg}{#3}%
+ }{svg}{#3}{#4}%
}
% \end{macrocode}
% \end{macro}
@@ -37775,25 +38187,27 @@ end -- not --version
% \begin{macro}{\LWR@lateximage@oneimage} \marg{1: alt text} \marg{2: filename}
% \marg{3: \CSS\ style} \marg{4: delimit?}
+% \marg{5: \ARIA\ role}
%
% Creates an image for the \env{lateximage},
% whose \attribute{alt} text depends on the circumstances.
%
% \changes{v0.74}{2019/08/26}{Factored from \env{lateximage}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
-\newcommand{\LWR@lateximage@oneimage}[4]{%
+\newcommand{\LWR@lateximage@oneimage}[5]{%
\ifdefvoid{\LWR@ThisAltText}{%
\IfBooleanTF{#4}{%
- \LWR@lateximage@oneimageb{#1}{#2}{#3}%
+ \LWR@lateximage@oneimageb{#1}{#2}{#3}{#5}%
}{%
\LWR@lateximage@oneimageb%
{\AltTextOpen#1\AltTextClose}%
- {#2}{#3}%
+ {#2}{#3}{#5}%
}%
}{%
\LWR@lateximage@oneimageb%
{\AltTextOpen\LWR@ThisAltText\AltTextClose}%
- {#2}{#3}%
+ {#2}{#3}{#5}%
}%
}
% \end{macrocode}
@@ -37802,6 +38216,7 @@ end -- not --version
% \begin{environment}{lateximage} * \oarg{2: \element{alt} tag} *
% \oarg{4: add'l hashing} \oarg{5: \CSS\ style}
+% \parg{6: \ARIA\ role}
%
% Typesets the contents and then renders the result as an \SVG\ file.
% Star \#1 causes the image to be hashed for reuse.
@@ -37843,11 +38258,12 @@ end -- not --version
% \changes{v0.51}{2018/03/07}{Added additional hashing option.}
% \changes{v0.66}{2019/01/27}{Added \cs{BaseJobname} for multiple projects.}
% \changes{v0.74}{2019/08/20}{Added second starred argument.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
%
% \begin{macrocode}
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{}}
+\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{} D(){}}%
{%
\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\LWR@traceinfo{lateximage: entering depth is \arabic{LWR@lateximagedepth}}%
@@ -38040,10 +38456,10 @@ end -- not --version
\ifbool{LWR@indisplaymathimage}{}{% not in display math
\LetLtxMacro\[\LWR@origopenbracket%
\LetLtxMacro\]\LWR@origclosebracket%
- \let\equation\LWR@origequation%
- \let\endequation\LWR@origendequation%
- \csletcs{equation*}{LWR@origequation*}%
- \csletcs{endequation*}{LWR@origendequation*}%
+ \let\equation\LWR@orig@equation%
+ \let\endequation\LWR@orig@endequation%
+ \csletcs{equation*}{LWR@orig@equation*}%
+ \csletcs{endequation*}{LWR@orig@endequation*}%
}% not in display math
% \end{macrocode}
%
@@ -38106,13 +38522,14 @@ end -- not --version
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
% \changes{v0.74}{2019/08/20}{New syntax for \cs{LWR@subinlineimage}.}
+% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\IfBooleanTF{#1}% starred
{% hash
- \LWR@lateximage@oneimage{#2}{\LWR@hashedname}{#5}{#3}%
+ \LWR@lateximage@oneimage{#2}{\LWR@hashedname}{#5}{#3}{#6}%
}% hash
{% no hash
- \LWR@lateximage@oneimage{#2}{\LWR@ImagesName\theLWR@externalfilecnt}{#5}{#3}%
+ \LWR@lateximage@oneimage{#2}{\LWR@ImagesName\theLWR@externalfilecnt}{#5}{#3}{#6}%
}% no hash
% \end{macrocode}
%
@@ -38161,7 +38578,7 @@ end -- not --version
% \changes{v0.48}{2018/02/02}{Print mode boxed to natural width.}
% \changes{v0.74}{2019/08/20}{Added second starred argument.}
% \begin{macrocode}
-\NewDocumentEnvironment{lateximage}{s o s o o}
+\NewDocumentEnvironment{lateximage}{s o s o o d()}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
% \end{macrocode}
@@ -38182,17 +38599,20 @@ end -- not --version
% \end{macrocode}
% \begin{environment}{center}
-% Replace \env{center} functionality with \CSS\ tags:
+% Replace \env{center} functionality with \CSS\ tags.
+% In a \element{span}, these macros are nullified, but extra \% are used
+% to remove spurrious spaces here as well.
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} use explicit \attribute{text-align}.}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.84}{2020/04/14}{Added print mode.}
+% \changes{v0.896}{2021/04/07}{Spurrious space in a \element{span}.}
% \begin{macrocode}
\newenvironment*{LWR@HTML@center}
-{
- \LWR@forcenewpage
- \ifbool{FormatWP}
- {\BlockClass[\LWR@print@mbox{text-align:center}]{center}}
- {\BlockClass{center}}
+{%
+ \LWR@forcenewpage%
+ \ifbool{FormatWP}%
+ {\BlockClass[\LWR@print@mbox{text-align:center}]{center}}%
+ {\BlockClass{center}}%
}
{\endBlockClass}
@@ -38204,13 +38624,14 @@ end -- not --version
% \begin{environment}{flushright}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.84}{2020/04/14}{Added print mode.}
+% \changes{v0.896}{2021/04/07}{Spurrious space in a \element{span}.}
% \begin{macrocode}
\newenvironment*{LWR@HTML@flushright}
-{
- \LWR@forcenewpage
- \ifbool{FormatWP}
- {\BlockClass[\LWR@print@mbox{text-align:right}]{flushright}}
- {\BlockClass{flushright}}
+{%
+ \LWR@forcenewpage%
+ \ifbool{FormatWP}%
+ {\BlockClass[\LWR@print@mbox{text-align:right}]{flushright}}%
+ {\BlockClass{flushright}}%
}
{\endBlockClass}
@@ -38221,13 +38642,14 @@ end -- not --version
% \begin{environment}{flushleft}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.84}{2020/04/14}{Added print mode.}
+% \changes{v0.896}{2021/04/07}{Spurrious space in a \element{span}.}
% \begin{macrocode}
\newenvironment*{LWR@HTML@flushleft}
-{
- \LWR@forcenewpage
- \ifbool{FormatWP}
- {\BlockClass[\LWR@print@mbox{text-align:left}]{flushleft}}
- {\BlockClass{flushleft}}
+{%
+ \LWR@forcenewpage%
+ \ifbool{FormatWP}%
+ {\BlockClass[\LWR@print@mbox{text-align:left}]{flushleft}}%
+ {\BlockClass{flushleft}}%
}
{\endBlockClass}
@@ -38400,9 +38822,8 @@ end -- not --version
\LWR@PreloadedPackage{ulem}
% \end{macrocode}
-% \pkg{xetexko-vertical} may be preloaded by \pkg{xetexko}.
% \begin{macrocode}
-\LWR@PreloadedPackage{xetexko-vertical}
+\LWR@PreloadedPackage{xetexko}
% \end{macrocode}
% \pkg{geometry} is preloaded by \pkg{lwarp}, and perhaps by various classes.
@@ -39157,6 +39578,11 @@ end -- not --version
\LWR@print@raggedright%
% \end{macrocode}
%
+% \changes{v0.896}{2021/04/06}{Improved back refs.}
+% \begin{macrocode}
+ \LWR@newautopagelabel{page}%
+% \end{macrocode}
+%
% Set minipage footnotes:
% \begin{macrocode}
\def\@mpfn{mpfootnote}%
@@ -39252,8 +39678,9 @@ end -- not --version
% \qquad Nullified for \HTML.
% \changes{v0.48}{2018/02/04}{Nullified for \HTML.}
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
+% \changes{v0.896}{2021/03/15}{Added a group.}
% \begin{macrocode}
-\newcommand*{\LWR@HTML@mbox}[1]{#1}
+\newcommand*{\LWR@HTML@mbox}[1]{{#1}}
\LWR@formatted{mbox}
% \end{macrocode}
@@ -39401,6 +39828,7 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@fboxstyle}{%
\LWR@findcurrenttextcolor%
+\LWR@traceinfo{LWR@fboxstyle B}%
border:\LWR@printlength{\LWR@atleastonept} solid \LWR@origpound\LWR@tempcolor ; %
padding:\LWR@printlength{\fboxsep} ; %
color:\LWR@origpound\LWR@tempcolor%
@@ -39422,10 +39850,12 @@ color:\LWR@origpound\LWR@tempcolor%
\newcommand{\LWR@HTML@fbox}[1]{%
\LWR@traceinfo{HTML fbox}%
\LWR@forceminwidth{\fboxrule}%
+\LWR@traceinfo{HTML fbox B}%
\InlineClass[%
\LWR@print@mbox{display:inline-block} ; %
\LWR@fboxstyle%
]{fbox}{#1}%
+\LWR@traceinfo{HTML fbox: done}%
}
% \end{macrocode}
% \pkg{xcolor} \cs{let}s things to \cs{fbox} when it is loaded,
@@ -40318,7 +40748,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.66}{2019/02/04}{Fix: Color if \pkg{xcolor} not loaded.}
% \begin{macrocode}
\newcommand*{\LWR@findcurrenttextcolor}{%
-\renewcommand{\LWR@tempcolor}{000000}%
+ \renewcommand{\LWR@tempcolor}{000000}%
}
% \end{macrocode}
% \end{macro}
@@ -43612,7 +44042,7 @@ color:\LWR@origpound\LWR@tempcolor%
\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#2}}%
}% lwarp
}%
- \@tempa
+ \@tempa%
}
% \end{macrocode}
@@ -43649,20 +44079,24 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macrocode}
\GetTitleString{#3}% lwarp
\let\@currentlabelname\GetTitleStringResult% lwarp
+ \item[%
+% \end{macrocode}
+% \changes{v0.896}{2021/04/05}{\pkg{amsthm}: Improved back refs.}
+% \begin{macrocode}
+ \LWR@newautopagelabel{page}%
% \end{macrocode}
% \begin{macrocode}
- \item[
% \deferred@thm@head{
% \the\thm@headfont \thm@indent
\@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% lwarp
\@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% lwarp
\@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% lwarp
\thm@swap\swappedhead\thmhead{#1}{#2}{#3}%
- \the\thm@headpunct~
+ \the\thm@headpunct % space
\thmheadnl % possibly a newline.
\hskip\thm@headsep
% }%
- ]
+ ]%
\ignorespaces}
% \end{macrocode}
%
@@ -43673,7 +44107,51 @@ color:\LWR@origpound\LWR@tempcolor%
\ifhmode\unskip\unskip\par\fi
\normalfont
\LWR@forcenewpage% lwarp
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{amsthm}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
+% \end{macrocode}
+%
+% Footnotes are redefined to work correctly inside the option brackets
+% for a theorem environment.
+% \changes{v0.896}{2021/03/14}{\pkg{amsthm}: Fix: Footnotes in opt arg..}
+% \begin{macrocode}
+ \renewcommand{\footnote}[1][]{%
+ \ifblank{##1}%
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark\@footnotetext
+ }%
+ {%
+ \begingroup
+ \csname c@\@mpfn\endcsname ##1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\@footnotetext
+ }%
+ }%
+%
+ \renewcommand{\footnotemark}[1][]{%
+ \ifblank{##1}%
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \@footnotemark%
+ }%
+ {%
+ \begingroup%
+ \c@footnote ##1\relax%
+ \unrestored@protected@xdef\@thefnmark{\thefootnote}%
+ \endgroup%
+ \@footnotemark%
+ }%
+ }%
+%
\trivlist
\let\thmheadnl\relax
\let\thm@swap\@gobble
@@ -43690,9 +44168,10 @@ color:\LWR@origpound\LWR@tempcolor%
\refstepcounter{#2}%
\def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
\fi
- \@tempa
+ \@tempa%
}
% \end{macrocode}
+%
% \pkg{cleveref} patches \cs{@thm} to do \cs{cref@thmoptarg} if an optional
% argument is given. \pkg{lwarp} then patches \cs{cref@thmoptarg}
% \cs{AtBeginDocument}.
@@ -43702,6 +44181,12 @@ color:\LWR@origpound\LWR@tempcolor%
\ifhmode\unskip\unskip\par\fi%
\normalfont%
\LWR@forcenewpage% lwarp
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{amsthm}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
\trivlist%
\let\thmheadnl\relax%
@@ -43723,7 +44208,17 @@ color:\LWR@origpound\LWR@tempcolor%
}%
}% AtBeginDocument
-\def\@endtheorem{\endtrivlist\endBlockClass\@endpefalse }
+\def\@endtheorem{%
+ \endtrivlist%
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{amsthm}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
+ \endBlockClass%
+ \@endpefalse%
+}
% \end{macrocode}
%
%
@@ -43752,10 +44247,18 @@ color:\LWR@origpound\LWR@tempcolor%
% \end{macrocode}
%
% Patched for \CSS:
+% \changes{v0.896}{2021/04/05}{\pkg{amsthm}: Improved back refs.}
% \begin{macrocode}
\renewenvironment{proof}[1][\proofname]{\par
-\LWR@forcenewpage% lwarp
+ \LWR@forcenewpage% lwarp
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{amsthm}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{amsthmproof}% lwarp
+ \LWR@newautopagelabel{page}%
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
@@ -43763,6 +44266,12 @@ color:\LWR@origpound\LWR@tempcolor%
\InlineClass{amsthmproofname}{#1\@addpunct{.}}]\ignorespaces% changes
}{%
\InlineClass{theoremendmark}{\popQED}\endtrivlist%
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{amsthm}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\endBlockClass% lwarp
\@endpefalse
}
@@ -45068,6 +45577,7 @@ color:\LWR@origpound\LWR@tempcolor%
%
% \changes{v0.45}{2018/01/14}{\pkg{backref}: Added.}
% \changes{v0.84}{2020/04/07}{\pkg{backref}: Fixed from \pkg{lwarp} v0.72 changes.}
+% \changes{v0.896}{2021/04/05}{\pkg{backref}: Improved backrefs.}
%
% \codehtml
%
@@ -45080,7 +45590,7 @@ color:\LWR@origpound\LWR@tempcolor%
\def\backref{}
\long\def\hyper@section@backref#1#2#3{%
- \ref{#3}%
+ \LWR@refwithsection{#3}%
}
\let\backrefxxx\hyper@section@backref
@@ -45512,10 +46022,39 @@ color:\LWR@origpound\LWR@tempcolor%
\let\blx@imc@ifhyperref\@firstoftwo
% \end{macrocode}
%
+% Ensure that an autopage reference is current where each \cs{cite} is used,
+% although this is nullified inside footnotes since they now use a \LaTeX\ box.
+% \changes{v0.896}{2021/03/25}{\pkg{biblatex}: Fix: Citation references.}
+% \begin{macrocode}
+\xpretocmd{\blx@citecmdinit}
+ {\LWR@newautopagelabel{page}}%
+ {}
+ {\LWR@patcherror{biblatex}{blx@citecmdinit}}
+% \end{macrocode}
+%
+% Ensure that an autopage reference is current for each backref.
+% If the citation is in a footnote, the backref will point to whatever
+% preceeded the footnotes.
+% \changes{v0.896}{2021/03/25}{\pkg{biblatex}: Fix: Back references.}
+% \begin{macrocode}
+\xpatchcmd{\blx@addbackref@i}
+ {\thepage}
+ {\theLWR@previousautopagelabel}% ref to the most recent object
+ {}
+ {\LWR@patcherror{biblatex}{blx@addbackref@i A}}
+
+\xpatchcmd{\blx@addbackref@i}
+ {\c@page}
+ {\c@LWR@previousautopagelabel}% refto the most recent object
+ {}
+ {\LWR@patcherror{biblatex}{blx@addbackref@i B}}
+% \end{macrocode}
+%
%
% The following patches are for back page references.
%
% \changes{v0.891}{2020/09/05}{\pkg{biblatex}: Fixed: Back page references.}
+% \changes{v0.896}{2021/04/05}{\pkg{biblatex}: Improved refs: \cs{ref} to \cs{LWR@refwithsection}.}
% \begin{macrocode}
\DeclareListFormat{pageref}{%
\ifnumless{\abx@pagerefstyle}{0}
@@ -45523,7 +46062,7 @@ color:\LWR@origpound\LWR@tempcolor%
\ifhyperref
{%
% \hyperlink{page.#1}{#1}%
- \ref{\BaseJobname-autopage-#1}% lwarp
+ \LWR@refwithsection{\BaseJobname-autopage-#1}% lwarp
}
{#1}}
{\ifnumequal{\value{listcount}}{1}
@@ -45561,7 +46100,7 @@ color:\LWR@origpound\LWR@tempcolor%
{}%
\ifhyperref
% {\hyperlink{page.#1}{#1}}
- {\ref{\BaseJobname-autopage-#1}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-#1}}% lwarp
{#1}}%
\edef\abx@range@prev{\abx@range@num}}
{\usebibmacro{pageref:dump}%
@@ -45570,7 +46109,7 @@ color:\LWR@origpound\LWR@tempcolor%
{}%
\ifhyperref
% {\hyperlink{page.#1}{#1}}
- {\ref{\BaseJobname-autopage-#1}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-#1}}% lwarp
{#1}%
\def\abx@range@prev{-1}}%
\edef\abx@range@last{\abx@range@this}}
@@ -45581,7 +46120,7 @@ color:\LWR@origpound\LWR@tempcolor%
\bibrangedash
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\abx@range@hold}%
\or % three
\ifnumless{\abx@range@diff}{2}
@@ -45589,49 +46128,49 @@ color:\LWR@origpound\LWR@tempcolor%
{\bibrangedash}%
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\abx@range@hold}%
\or % two+
\ifnumless{\abx@range@diff}{2}
{\sqspace
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\bibstring{sequens}}}
{\bibrangedash
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\abx@range@hold}}%
\or % three+
\ifnumless{\abx@range@diff}{2}
{\sqspace
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\bibstring{sequens}}}
{\ifnumless{\abx@range@diff}{3}
{\sqspace
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\bibstring{sequentes}}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\bibstring{sequentes}}}
{\bibrangedash
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\abx@range@hold}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\abx@range@hold}}}%
\else % all+
\ifnumless{\abx@range@diff}{2}
{\sqspace
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\bibstring{sequens}}}
{\sqspace
\ifhyperref
% {\hyperlink{page.\abx@range@hold}{\bibstring{sequentes}}}
- {\ref{\BaseJobname-autopage-\abx@range@hold}}% lwarp
+ {\LWR@refwithsection{\BaseJobname-autopage-\abx@range@hold}}% lwarp
{\bibstring{sequentes}}}%
\fi
\def\abx@range@diff{0}}
@@ -45705,6 +46244,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.39}{2017/08/31}{\pkg{bigdelim}: Added.}
% \changes{v0.40}{2017/09/09}{\pkg{bigdelim}: Improved documentation.}
% \changes{v0.57}{2018/06/01}{\pkg{bigdelim}: Improved print/\HTML\ output selection.}
+% \changes{v0.896}{2021/03/16}{\pkg{bigdelim}: Updated to v2.8.}
%
% \codehtml
%
@@ -45717,23 +46257,23 @@ color:\LWR@origpound\LWR@tempcolor%
%
% Next, load the package's new definitions:
% \begin{macrocode}
-\LWR@ProvidesPackagePass{bigdelim}[2018/08/03]
+\LWR@ProvidesPackagePass{bigdelim}[2021/03/15]
% \end{macrocode}
%
%
-% \marg{1:delimiter} \marg{2:\#rows} \marg{3:width} \oarg{4:text}
+% \marg{1:delimiter} \marg{2:\#rows} \oarg{3: vmove} \marg{4:width} \oarg{5:text}
% \marginpar{\hfill\cs{ldelim}}\marginpar{\hfill\cs{rdelim}}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@HTML@ldelim}{m m m O{}}{%
+\NewDocumentCommand{\LWR@HTML@ldelim}{m m o m O{}}{%
\renewcommand{\LWR@multirowborder}{right}%
-\multirow{#2}{#3}{#4 \InlineClass{ldelim}{#1}}%
+\multirow{#2}{#4}{#5 \InlineClass{ldelim}{#1}}%
}
\LWR@formatted{ldelim}
-\NewDocumentCommand{\LWR@HTML@rdelim}{m m m O{}}{%
+\NewDocumentCommand{\LWR@HTML@rdelim}{m m o m O{}}{%
\renewcommand{\LWR@multirowborder}{left}%
-\multirow{#2}{#3}{\InlineClass{rdelim}{#1} #4}%
+\multirow{#2}{#4}{\InlineClass{rdelim}{#1} #5}%
}
\LWR@formatted{rdelim}
@@ -45744,12 +46284,14 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.79}{2020/01/20}{\pkg{bigdelim}: Added \brand{MathJax} emulation.}
% \begin{macrocode}
\begin{warpMathJax}
-% \ldelim ( [n]{width}[text]
-\CustomizeMathJax{\newcommand{\LWRldelim}[1][]{\text{#1}~\LWRbigdelim}}
-\CustomizeMathJax{\def\ldelim#1#2#3{\def\LWRbigdelim{#1}\LWRldelim}}
-% \rdelim ) [n]{width}[text]
-\CustomizeMathJax{\newcommand{\LWRrdelim}[1][]{\LWRbigdelim~\text{#1}}}
-\CustomizeMathJax{\def\rdelim#1#2#3{\def\LWRbigdelim{#1}\LWRrdelim}}
+% \ldelim ( {n}{width}[text]
+\CustomizeMathJax{\newcommand{\LWRldelimtwo}[1][]{\text{#1}~\LWRbigdelim}}
+\CustomizeMathJax{\newcommand{\LWRldelimone}[2][]{\LWRldelimtwo}}
+\CustomizeMathJax{\def\ldelim#1#2{\def\LWRbigdelim{#1}\LWRldelimone}}
+% \rdelim ) {n}{width}[text]
+\CustomizeMathJax{\newcommand{\LWRrdelimtwo}[1][]{\LWRbigdelim~\text{#1}}}
+\CustomizeMathJax{\newcommand{\LWRrdelimone}[2][]{\LWRrdelimtwo}}
+\CustomizeMathJax{\def\rdelim#1#2{\def\LWRbigdelim{#1}\LWRrdelimone}}
\end{warpMathJax}
% \end{macrocode}
%
@@ -47199,6 +47741,55 @@ s%
%
%
%
+%
+% \iffalse
+%<*ccicons>
+% \fi
+%
+% \part{lwarp-ccicons.sty}
+%
+% \section{ccicons}
+%
+% \credits{Michael Ummels}
+%
+% \DescribePackage{ccicons} \pkg{ccicons} is used as \SVG\ images for \HTML.
+%
+% \changes{v0.896}{2021/03/15}{\pkg{ccicons}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-ccicons}:
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{ccicons}[2017/10/30]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand{\LWR@ccicons}[2]{%
+ {\begin{lateximage}*[#1]\ccicons@font\char#2\end{lateximage}}
+}
+\renewcommand{\ccicons@logo}{\LWR@ccicons{ccLogo}{0}}
+\renewcommand{\ccicons@by}{\LWR@ccicons{ccAttribution}{1}}
+\renewcommand{\ccicons@sa}{\LWR@ccicons{ccShareAlike}{2}}
+\renewcommand{\ccicons@nd}{\LWR@ccicons{ccNoDerivatives}{3}}
+\renewcommand{\ccicons@nc}{\LWR@ccicons{ccNonCommercial}{4}}
+\renewcommand{\ccicons@nceu}{\LWR@ccicons{ccNonCommercialEU}{5}}
+\renewcommand{\ccicons@ncjp}{\LWR@ccicons{ccNonCommercialJP}{6}}
+\renewcommand{\ccicons@pd}{\LWR@ccicons{ccPublicDomain}{7}}
+\renewcommand{\ccicons@zero}{\LWR@ccicons{ccZero}{8}}
+\renewcommand{\ccicons@sampling}{\LWR@ccicons{ccSampling}{9}}
+\renewcommand{\ccicons@share}{\LWR@ccicons{ccShare}{10}}
+\renewcommand{\ccicons@remix}{\LWR@ccicons{ccRemix}{11}}
+\renewcommand{\ccicons@copy}{\LWR@ccicons{ccCopy}{12}}
+\renewcommand{\ccicons@pdalt}{\LWR@ccicons{ccPublicDomainAlt}{13}}
+% \end{macrocode}
+%
+% \iffalse
+%</ccicons>
+% \fi
+%
+%
+%
+%
% \iffalse
%<*centernot>
% \fi
@@ -47772,15 +48363,15 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
% \changes{v0.51}{2018/03/04}{\pkg{chemfig}: Added.}
% \changes{v0.71}{2019/04/25}{\pkg{chemfig}: Updated to v1.4.}
% \changes{v0.82}{2020/03/12}{\pkg{chemfig}: Updated to v1.5.}
+% \changes{v0.896}{2021/03/04}{\pkg{chemfig}: Updated to v1.6a.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{chemfig}[2020/03/05]
+\LWR@ProvidesPackagePass{chemfig}[2021/02/28]
% \end{macrocode}
% \begin{macrocode}
-
\catcode`\_=11
\@ifpackagelater{chemfig}{2020/03/05}
@@ -47795,15 +48386,17 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
\@ifpackagelater{chemfig}{2019/04/18}%
{% 2019/04/18 or newer
+% \end{macrocode}
+% \changes{v0.896}{2021/03/04}{\pkg{chemfig}: Updated to v1.6a.}
+% \begin{macrocode}
+ \xpretocmd{\CF_chemfiga}
+ {\begin{lateximage}[-chemfig-~\PackageDiagramAltText]}
+ {}{\LWR@patcherror{chemfig}{CF_chemfiga}}
-
- \LetLtxMacro\LWR@chemfig@origchemfig\chemfig
-
- \renewcommand*{\chemfig}[2][]{%
- \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
- \LWR@chemfig@origchemfig[#1]{#2}%
- \end{lateximage}%
- }
+ \xpatchcmd{\CF_chemfigb}
+ {\let\CF_flipstate\CF_zero}
+ {\end{lateximage}\let\CF_flipstate\CF_zero}
+ {}{\LWR@patcherror{chemfig}{CF_chemfigb}}
\GlobalLetLtxMacro\LWR@chemfig@origCF_lewisc\CF_lewisc
\gdef\CF_lewisc#1,#2\_nil{%
@@ -49520,6 +50113,7 @@ name = \chemmacros_translate:n {scheme-name}
% \pkg{citeref} is patched for use by \pkg{lwarp}.
%
% \changes{v0.87}{2020/05/16}{\pkg{citeref}: Added.}
+% \changes{v0.896}{2021/04/05}{\pkg{citeref}: Improved refs: \cs{ref} to \cs{LWR@refwithsection}.}
%
% \codehtml
%
@@ -49528,7 +50122,9 @@ name = \chemmacros_translate:n {scheme-name}
% \end{macrocode}
%
% \begin{macrocode}
-\def\@cprwrite#1={\write\@auxout{\string\citepageref{#1}{\theLWR@currentautosec}}}
+\def\@cprwrite#1={%
+ \write\@auxout{\string\citepageref{#1}{\theLWR@previousautopagelabel}}%
+}
\def\citepageref#1#2{%
\xdef\cpr@testa{\@nameuse{cpr@last@#1}}%letzte Zitatstelle
@@ -49538,8 +50134,11 @@ name = \chemmacros_translate:n {scheme-name}
\else%
\@namexdef{cpr@last@#1}{#2}%
\@ifundefined{cpr@#1}%
- {\@namexdef{cpr@#1}{\ref{\BaseJobname-autopage-#2}}}% lwarp
- {\@namexdef{cpr@#1}{\@nameuse{cpr@#1}, \ref{\BaseJobname-autopage-#2}}}% lwarp
+ {\@namexdef{cpr@#1}{\LWR@refwithsection{\BaseJobname-autopage-#2}}}% lwarp
+ {% lwarp
+ \@namexdef{cpr@#1}{\@nameuse{cpr@#1}, % space
+ \LWR@refwithsection{\BaseJobname-autopage-#2}}%
+ }%
\fi
}
% \end{macrocode}
@@ -49607,6 +50206,54 @@ name = \chemmacros_translate:n {scheme-name}
%
%
%
+% \iffalse
+%<*classicthesis>
+% \fi
+%
+% \part{lwarp-classicthesis.sty}
+%
+% \section{classicthesis}
+%
+% \credits{André Miede and Ivo Pletikosić}
+%
+% \DescribePackage{classicthesis} \pkg{classicthesis} is emulated.
+%
+% \changes{v0.896}{2021/03/15}{\pkg{classicthesis}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-classicthesis}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{classicthesis}[2018/06/03]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{scrlayer-scrpage} % provides headers and footers (KOMA Script)
+\RequirePackage{scrtime} % time access
+\PassOptionsToPackage{titles}{tocloft}
+\RequirePackage{textcase} % for \MakeTextUppercase
+\RequirePackage[newparttoc]{titlesec} % newparttoc to write \part to .toc with \numberline
+\RequirePackage{tocloft}
+\PassOptionsToPackage{headinclude,footinclude}{typearea} % for classes other than KOMA
+\RequirePackage{typearea}
+\PassOptionsToPackage{marginal}{footmisc}% marginal flushmargin
+\RequirePackage{footmisc}%
+\RequirePackage{prelim2e}
+\RequirePackage{remreset}%
+
+\DeclareRobustCommand{\spacedallcaps}[1]{\textsc{\MakeTextUppercase{#1}}}
+\DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textsc{\MakeTextLowercase{#1}}}
+\newcommand{\ctparttext}[1]{}
+\newcommand{\tocEntry}[1]{}
+\DeclareRobustCommand*{\deactivateaddvspace}{}%
+\newlength{\beforebibskip}
+% \end{macrocode}
+%
+% \iffalse
+%</classicthesis>
+% \fi
+%
+%
%
% \iffalse
%<*cleveref>
@@ -49814,6 +50461,30 @@ name = \chemmacros_translate:n {scheme-name}
% \end{macrocode}
%
%
+% \changes{v0.896}{2021/04/07}{\pkg{cleveref}: Undo \pkg{memoir} changes.}
+% \begin{macrocode}
+\@ifclassloaded{memoir}{
+\AtBeginDocument{
+\def\sf@memsub@label(#1)#2{%
+ \protected@edef\mem@currentlabelname{#1}%
+ \sf@@memsub@label{#2}}
+}
+}{}
+% \end{macrocode}
+%
+% \changes{v0.896}{2021/04/07}{\pkg{cleveref}: Undo \pkg{subfig} changes.}
+% \begin{macrocode}
+\@ifpackageloaded{subfig}{
+\def\sf@sub@label(#1)#2{%
+ \ifhyperrefloaded
+ \protected@edef\@currentlabelname{%
+ \expandafter\strip@period #1\relax.\relax\@@@}%
+ \fi
+ \sf@@sub@label{#2}}
+}{}
+% \end{macrocode}
+%
+%
% ^^A % For \brand{MathJax} and \pkg{cleveref},
% ^^A % but not \pkg{varioref} since \pkg{varioref} macros would only
% ^^A % be useful in math inside a \cs{text} macro, where they do not
@@ -52069,6 +52740,156 @@ name = \chemmacros_translate:n {scheme-name}
%
%
%
+% \iffalse
+%<*enotez>
+% \fi
+%
+% \part{lwarp-enotez.sty}
+%
+% \section{enotez}
+%
+% \credits{Clemens Niederberger}
+%
+% \DescribePackage{enotez}
+% \pkg{enotez} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.896}{2021/04/07}{\pkg{enotez}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{enotez}[2020/12/13]
+% \end{macrocode}
+%
+% Hyperref is emulated by \pkg{lwarp}, so it is forced on for \pkg{enotez}:
+% \begin{macrocode}
+\ExplSyntaxOn
+\AtBeginDocument{
+ \bool_set_true:N \l__enotez_hyperref_bool
+ \bool_set_true:N \l__enotez_hyperfootnotes_bool
+}
+% \end{macrocode}
+%
+% Do not move or \cs{hbox} the \cs{hypertarget}:
+% \begin{macrocode}
+% typeset the actual mark:
+% #1: id
+% #2: mark
+\cs_gset_protected:Npn \enotez_write_mark:nn #1#2
+ {
+ \bool_if:NTF \l__enotez_hyperfootnotes_bool
+ {
+ \enotezwritemark { \hyperlink {enz.#1} { \enmarkstyle #2 } }
+ \bool_if:NT \l__enotez_hyperbackref_bool
+ {
+% \box_move_up:nn {1em} {
+% \hbox:n {
+ \hypertarget {enz.#1.backref} { }
+% }
+% }
+ }
+ }
+ { \enotezwritemark { \enmarkstyle #2 } }
+ }
+\cs_generate_variant:Nn \enotez_write_mark:nn {x}
+% \end{macrocode}
+%
+% Do not move or \cs{hbox} the \cs{hypertarget}:
+% \begin{macrocode}
+\cs_gset_protected:Npn \enotez_write_list_number:n #1
+ {
+ \bool_if:NT \l__enotez_hyperfootnotes_bool
+ {
+% \box_move_up:nn {1em} { \hbox:n {
+ \hypertarget {enz.#1} { }
+% } }
+ }
+ \tl_use:N \l__enotez_list_number_format_tl
+ \tl_if_eq:nxTF {a} { \prop_item:Nn \g__enotez_endnote_man_prop {#1} }
+ {
+ \bool_if:nTF
+ { \l__enotez_hyperfootnotes_bool && \l__enotez_hyperbackref_bool }
+ {
+ \exp_args:Nnx
+ \hyperlink {enz.#1.backref}
+ { \exp_not:V \l__enotez_endnote_mark_tl }
+ }
+ { \prop_item:Nn \g__enotez_endnote_mark_prop {#1} }
+ }
+ {
+ \bool_if:nTF
+ { \l__enotez_hyperfootnotes_bool && \l__enotez_hyperbackref_bool }
+ {
+ \exp_args:Nnx
+ \hyperlink {enz.#1.backref}
+ { \exp_not:V \l__enotez_endnote_mark_tl }
+ }
+ { \tl_use:N \l__enotez_endnote_mark_tl }
+ }
+ }
+% \end{macrocode}
+%
+% Do not move the label to the left:
+% \begin{macrocode}
+\DeclareTemplateCode {enotez-list} {paragraph} {1}
+ {
+ heading = \enotez_list_heading:n ,
+ format = \l__enotez_list_format_tl ,
+ number = \enotez_list_number:n ,
+ number-format = \l__enotez_list_number_format_tl ,
+ notes-sep = \l__enotez_list_notes_sep_dim
+ }
+ {
+ \AssignTemplateKeys
+ \enotez_set_totoc:
+ \enotez_list_heading:n { \l__enotez_list_name_tl }
+ \enotez_list_preamble:
+ \enotez_build_print_list:nnnn {#1}
+ {}
+ {
+ \par\noindent
+ \group_begin:
+ \tl_use:N \l__enotez_list_format_tl
+% \hbox_overlap_left:n
+% {
+ \enotez_list_number:n
+ { \enotez_write_list_number:n {##1} }
+ \tl_use:N \c_space_tl
+% }
+ % \cs_set:cpn {@currentlabel}
+ % { \p@endnote \l__enotez_endnote_mark_tl }
+ \tl_use:N \g__enotez_endnote_text_tl
+ \par
+ \dim_compare:nT { \l__enotez_list_notes_sep_dim != 0pt }
+ { \addvspace { \l__enotez_list_notes_sep_dim } }
+ \group_end:
+ }
+ {}
+ \enotez_list_postamble:
+ }
+
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% For \brand{MathJax}:
+% \begin{macrocode}
+\begin{warpMathJax}
+\def\endnotename{endnote}
+\appto\LWR@syncnotenumbers{\LWR@synconenotenumber{LWRendnote}{\theendnote}}
+\appto\LWR@syncnotenames{\LWR@synconenotename{LWRendnote}{\endnotename}}
+\CustomizeMathJax{\def\LWRendnote{1}}
+\CustomizeMathJax{\newcommand{\endnote}[2][\LWRendnote]{{}^{\mathrm{#1}}}}
+\CustomizeMathJax{\newcommand{\endnotemark}[1][\LWRendnote]{{}^{\mathrm{#1}}}}
+\end{warpMathJax}
+% \end{macrocode}
+
+%
+% \iffalse
+%</enotez>
+% \fi
+%
+%
+%
%
% \iffalse
%<*enumerate>
@@ -52204,17 +53025,18 @@ name = \chemmacros_translate:n {scheme-name}
% \end{macrocode}
% \changes{v0.47}{2018/01/26}{\pkg{epigraph}: Fix: Line wrap at \HTML\ hyphen.}
+% \changes{v0.896}{2021/03/05}\pkg{epigraph}: {Added \ARIA\ role.}
% \begin{macrocode}
\DeclareDocumentCommand{\LWR@HTML@epigraph}{m m}
{%
- \begin{LWR@BlockClassWP}{\LWR@print@mbox{text-align:right}}{}{epigraph}%
+ \begin{LWR@BlockClassWP}{\LWR@print@mbox{text-align:right}}{}(note){epigraph}%
\qitem{#1}{#2}%
\end{LWR@BlockClassWP}%
}
\LWR@formatted{epigraph}
\DeclareDocumentEnvironment{LWR@HTML@epigraphs}{}
- {\LWR@BlockClassWP{\LWR@print@mbox{text-align:right}}{}{epigraph}}
+ {\LWR@BlockClassWP{\LWR@print@mbox{text-align:right}}{}(note){epigraph}}%
{\endLWR@BlockClassWP}
\LWR@formattedenv{epigraphs}
% \end{macrocode}
@@ -53131,9 +53953,20 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{noindmacro}{\V@@footnotetext}
% Patches in a subset of \pkg{lwarp}'s \cs{LWR@footnotetext} to the
% \pkg{fancyvrb} version of \cs{V@@footnotetext}.
+% \changes{v0.896}{2021/04/04}{Fix: \ctr{autopage} references in footnotes.}
% \begin{macrocode}
\def\V@@footnotetext{%
\LWR@traceinfo{V@footnotetext}%
+% \end{macrocode}
+%
+% Place an autopage marker so that back references to citations inside
+% a footnote will link closer to the footnote text, if possible.
+% \begin{macrocode}
+\LWR@newautopagelabel{page}%
+% \end{macrocode}
+%
+% Take the current footnote box, then append:
+% \begin{macrocode}
\global\setbox\LWR@footnotebox=\vbox\bgroup%
% \end{macrocode}
% Add to any current footnotes:
@@ -53168,6 +54001,14 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{macrocode}
\bgroup%
\aftergroup{\V@@@footnotetext}%
+% \end{macrocode}
+%
+% Do not generate autopages inside the footnotes, since they are
+% accumulated at the moment before finally being used perhaps on a later page.
+% \begin{macrocode}
+ \let\LWR@newautopagelabel\LWR@null@newautopagelabel%
+% \end{macrocode}
+% \begin{macrocode}
\ignorespaces%
}%
% \end{macrocode}
@@ -53581,9 +54422,20 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{noindmacro}{\V@@footnotetext}
% Patches in a subset of \pkg{lwarp}'s \cs{LWR@footnotetext} to the
% \pkg{fancyvrb} version of \cs{V@@footnotetext}.
+% \changes{v0.896}{2021/04/04}{Fix: \ctr{autopage} references in footnotes.}
% \begin{macrocode}
\def\V@@footnotetext{%
\LWR@traceinfo{V@footnotetext}%
+% \end{macrocode}
+%
+% Place an autopage marker so that back references to citations inside
+% a footnote will link closer to the footnote text, if possible.
+% \begin{macrocode}
+\LWR@newautopagelabel{page}%
+% \end{macrocode}
+%
+% Take the current footnote box, then append:
+% \begin{macrocode}
\global\setbox\LWR@footnotebox=\vbox\bgroup%
% \end{macrocode}
% Add to any current footnotes:
@@ -53618,6 +54470,14 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{macrocode}
\bgroup%
\aftergroup{\V@@@footnotetext}%
+% \end{macrocode}
+%
+% Do not generate autopages inside the footnotes, since they are
+% accumulated at the moment before finally being used perhaps on a later page.
+% \begin{macrocode}
+ \let\LWR@newautopagelabel\LWR@null@newautopagelabel%
+% \end{macrocode}
+% \begin{macrocode}
\ignorespaces%
}%
% \end{macrocode}
@@ -54366,7 +55226,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\renewcommand{\l@fixme}[2]{%
\hypertocfloat{1}{fixme}{lox}%
- {\LWR@nameref{\BaseJobname-autopage-\arabic{LWR@nextautopage}} --- #1}
+ {\LWR@nameref{\BaseJobname-autopage-\arabic{LWR@nextautopage}} --- #1}%
{#2}
}
% \end{macrocode}
@@ -54682,6 +55542,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
% \changes{v0.42}{2017/10/26}{\pkg{floatflt}: Added width.}
% \changes{v0.79}{2020/01/08}{\pkg{floatflt}: Improved width control.}
+% \changes{v0.896}{2021/03/05}{\pkg{floatflt}: Added \ARIA\ role.}
% \begin{macrocode}
\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m m}
{%
@@ -54692,6 +55553,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
width: 1.5in; % reasonable dummy width for word processor
margin:10pt%
}{}%
+ (note)%
{marginblock}%
}{%
\setlength{\LWR@templengthone}{#3}%
@@ -54702,6 +55564,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
}{%
width:\LWR@printlength{\LWR@templengthone}%
}%
+ (note)%
{marginblock}%
}%
\renewcommand*{\@captype}{#2}%
@@ -59061,9 +59924,12 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \changes{v0.52}{2018/03/26}{\pkg{hyperref}: Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
% \changes{v0.54}{2018/04/19}{\pkg{hyperref}: Fix: \cs{ref} in \cs{hyperref} and \cs{hyperlink} caused nested link.}
% \changes{v0.54}{2018/04/19}{\pkg{hyperref}: Fix: \cs{hyperref} and \cs{hyperlink} with special chars in text.}
+% \changes{v0.896}{2021/04/07}{\pkg{hyperref}: Fix: No \cs{hyperlink} in \HTML\ comment.}
% \begin{macrocode}
\DeclareDocumentCommand{\LWR@hyperlinkb}{m}{%
- \LWR@hyperrefcb[LWR-ht-#1]%
+ \ifbool{LWR@insidemathcomment}%
+ {\endgroup}%
+ {\LWR@hyperrefcb[LWR-ht-#1]}%
}
\DeclareDocumentCommand{\hyperlink}{}{%
@@ -59099,6 +59965,27 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \end{macrocode}
% \end{noindmacro}
+% Default names:
+% \changes{v0.896}{2021/03/13}{\pkg{hyperref}: Fix: Added \cs{*autorefname} macros.}
+% \begin{macrocode}
+\def\equationautorefname{Equation}%
+\def\footnoteautorefname{footnote}%
+\def\itemautorefname{item}%
+\def\figureautorefname{Figure}%
+\def\tableautorefname{Table}%
+\def\partautorefname{Part}%
+\def\appendixautorefname{Appendix}%
+\def\chapterautorefname{chapter}%
+\def\sectionautorefname{section}%
+\def\subsectionautorefname{subsection}%
+\def\subsubsectionautorefname{subsubsection}%
+\def\paragraphautorefname{paragraph}%
+\def\subparagraphautorefname{subparagraph}%
+\def\FancyVerbLineautorefname{line}%
+\def\theoremautorefname{Theorem}%
+\def\pageautorefname{page}%
+% \end{macrocode}
+
% \begin{noindmacro}{\pdfstringdef} \marg{macroname} \marg{\TeX{}string}
@@ -59321,12 +60208,59 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \DescribePackage{hyperxmp} \pkg{hyperxmp} is ignored.
%
% \changes{v0.34}{2017/08/03}{\pkg{hyperxmp}: Added.}
+% \changes{v0.896}{2021/03/13}{\pkg{hyperxmp}: Added keys.}
%
% \codehtml
%
% Discard all options for \pkg{lwarp-hyperxmp}:
% \begin{macrocode}
\LWR@ProvidesPackageDrop{hyperxmp}[2018/11/27]
+
+\define@key{LWR@hyperref}{pdfdate}[]{}
+\define@key{LWR@hyperref}{pdfmetadate}[]{}
+\define@key{LWR@hyperref}{pdfcopyright}[]{}
+\define@key{LWR@hyperref}{pdftype}[]{}
+\define@key{LWR@hyperref}{pdflicenseurl}[]{}
+\define@key{LWR@hyperref}{pdfauthortitle}[]{}
+\define@key{LWR@hyperref}{pdfcaptionwriter}[]{}
+\define@key{LWR@hyperref}{pdfmetalang}[]{}
+\define@key{LWR@hyperref}{pdfapart}[]{}
+\define@key{LWR@hyperref}{pdfaconformance}[]{}
+\define@key{LWR@hyperref}{pdfuapart}[]{}
+\define@key{LWR@hyperref}{pdfxstandard}[]{}
+\define@key{LWR@hyperref}{pdfsource}[]{}
+\define@key{LWR@hyperref}{pdfdocumentid}[]{}
+\define@key{LWR@hyperref}{pdfinstanceid}[]{}
+\define@key{LWR@hyperref}{pdfversionid}[]{}
+\define@key{LWR@hyperref}{pdfrendition}[]{}
+\define@key{LWR@hyperref}{pdfpublication}[]{}
+\define@key{LWR@hyperref}{pdfpubtype}[]{}
+\define@key{LWR@hyperref}{pdfbytes}[]{}
+\define@key{LWR@hyperref}{pdfnumpages}[]{}
+\define@key{LWR@hyperref}{pdfissn}[]{}
+\define@key{LWR@hyperref}{pdfeissn}[]{}
+\define@key{LWR@hyperref}{pdfisbn}[]{}
+\define@key{LWR@hyperref}{pdfbookedition}[]{}
+\define@key{LWR@hyperref}{pdfpublisher}[]{}
+\define@key{LWR@hyperref}{pdfvolumenum}[]{}
+\define@key{LWR@hyperref}{pdfissuenum}[]{}
+\define@key{LWR@hyperref}{pdfpagerange}[]{}
+\define@key{LWR@hyperref}{pdfdoi}[]{}
+\define@key{LWR@hyperref}{pdfurl}[]{}
+\define@key{LWR@hyperref}{pdfidentifier}[]{}
+\define@key{LWR@hyperref}{pdfsubtitle}[]{}
+\define@key{LWR@hyperref}{pdfpubstatus}[]{}
+\define@key{LWR@hyperref}{pdfcontactaddress}[]{}
+\define@key{LWR@hyperref}{pdfcontactcity}[]{}
+\define@key{LWR@hyperref}{pdfcontactregion}[]{}
+\define@key{LWR@hyperref}{pdfcontactpostcode}[]{}
+\define@key{LWR@hyperref}{pdfcontactcountry}[]{}
+\define@key{LWR@hyperref}{pdfcontactphone}[]{}
+\define@key{LWR@hyperref}{pdfcontactemail}[]{}
+\define@key{LWR@hyperref}{pdfcontacturl}[]{}
+\define@key{LWR@hyperref}{keeppdfinfo}[]{}
+\define@key{LWR@hyperref}{pdfauthor}[]{}
+\define@key{LWR@hyperref}{pdfkeywords}[]{}
% \end{macrocode}
%
%
@@ -60674,6 +61608,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \begin{noindenvironment}{KFLT@marginfloat} \oarg{offset} \marg{type}
% \changes{v0.42}{2017/10/26}{\pkg{keyfloat}: If \progcode{FormatWP} add explicit \HTML\ style.}
+% \changes{v0.896}{2021/03/05}{\pkg{keyfloat}: Added \ARIA\ role.}
% \begin{macrocode}
\DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m}
{%
@@ -60681,6 +61616,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\LWR@BlockClassWP%
{float:right; width:2in; margin:10pt}%
{}%
+ (note)%
{marginblock}%
\renewcommand*{\@captype}{#2}%
\minipage{\LWR@usersmarginparwidth}%
@@ -60706,7 +61642,8 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \begin{noindenvironment}{keywrap} \marg{width} \marg{keyfloat}
-% \changes{v0.79}{2020/01/10}{Factored to \cs{LWR@setvirtualpage}.}
+% \changes{v0.79}{2020/01/10}{\pkg{keyfloat}: Factored to \cs{LWR@setvirtualpage}.}
+% \changes{v0.896}{2021/03/05}{\pkg{keyfloat}: Added \ARIA\ role.}
% ^^A % Modified to vertically align minipage for \HTML\ output:
% \begin{macrocode}
\DeclareDocumentEnvironment{keywrap}{m +m}
@@ -60719,6 +61656,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
margin:10pt%
}%
{}%
+ (note)%
{marginblock}%
\setlength{\linewidth}{.95\LWR@templengthone}%
\booltrue{KFLT@keywrap}%
@@ -62016,7 +62954,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
%
% \DescribePackage{listings}
% \pkg{listings} is supported with some limitations.
-% Text formatting is not yet supported.
+% Text formatting and escape characters are not yet supported.
%
% \changes{v0.20}{2017/01/01}{\pkg{listings}: Added.}
%
@@ -62084,7 +63022,6 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \end{macrocode}
% \end{noindmacro}
%
-%
% \begin{noindmacro}{\lst@Init} \marg{backslash-processing} \quad
% Done at the start of a listing.
% \begin{macrocode}
@@ -62102,29 +63039,113 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% with paragraph handling and conditionals.
% \changes{v0.891}{2020/09/16}{\pkg{listings}: Fix for \brand{MathJax}: Moved \cs{LWR@forcenewpage} to start.}
% \begin{macrocode}
-\lst@ifdisplaystyle%
- \LWR@forcenewpage%
-\fi%
-\renewcommand*{\@captype}{lstlisting}%
-\let\lst@aboveskip\z@\let\lst@belowskip\z@%
-\gdef\lst@boxpos{t}%
-\let\lst@frame\@empty
- \let\lst@frametshape\@empty
- \let\lst@framershape\@empty
- \let\lst@framebshape\@empty
- \let\lst@framelshape\@empty
-\lstframe@\lst@frameround ffff\relax%
-\lst@multicols\@empty%
-\LWR@origlst@Init{#1}\relax%
+\lst@ifdisplaystyle% lwarp
+ \LWR@forcenewpage% lwarp
+\fi% lwarp
+% \end{macrocode}
+%
+% Escapes do not work yet, and are disabled:
+% \changes{v0.896}{2021/03/14}{\pkg{listings}: Escapes accepted but disabled.}
+% \begin{macrocode}
+\let\lst@ifmathescape\iffalse% lwarp
+\let\lst@DefEsc\relax% lwarp
+\def\lst@escapebegin{}% lwarp
+\def\lst@escapeend{}% lwarp
+% \end{macrocode}
+% \begin{macrocode}
+\renewcommand*{\@captype}{lstlisting}% lwarp
+ \let\lst@aboveskip\z@\let\lst@belowskip\z@% lwarp
+ \gdef\lst@boxpos{t}% lwarp
+ \let\lst@frame\@empty% lwarp
+ \let\lst@frametshape\@empty% lwarp
+ \let\lst@framershape\@empty% lwarp
+ \let\lst@framebshape\@empty% lwarp
+ \let\lst@framelshape\@empty% lwarp
+ \lstframe@\lst@frameround ffff\relax% lwarp
+ \lst@multicols\@empty% lwarp
+ \begingroup%
+ \ifx\lst@float\relax\else%
+ \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}%
+ \expandafter\@tempa%
+ \fi%
+ \ifx\lst@multicols\@empty\else%
+ \edef\lst@next{\noexpand\multicols{\lst@multicols}}%
+ \expandafter\lst@next%
+ \fi%
+ \ifhmode\ifinner \lst@boxtrue \fi\fi%
+ \lst@ifbox%
+ \lsthk@BoxUnsafe%
+ \hbox to\z@\bgroup%
+ $\if t\lst@boxpos \vtop%
+ \else \if b\lst@boxpos \vbox%
+ \else \vcenter \fi\fi%
+ \bgroup \par\noindent%
+ \else%
+ \lst@ifdisplaystyle%
+ \lst@EveryDisplay%
+ \par\penalty-50\relax%
+ \vspace\lst@aboveskip%
+ \fi%
+ \fi%
+ \normalbaselines%
+ \abovecaptionskip\lst@abovecaption\relax%
+ \belowcaptionskip\lst@belowcaption\relax%
+ \lst@MakeCaption t%
+% \end{macrocode}
+%
+% Use the overall listing label instead of the line number label:
+% \changes{v0.896}{2021/03/14}{\pkg{listings}: Fix: Labels.}
+% \begin{macrocode}
+\LWR@traceinfo{lst@Init: defining current label !\@currentlabel!}%
+ \let\LWR@listings@currentlabel\@currentlabel% lwarp
+\LWR@traceinfo{lst@Init: defining current label !\cref@currentlabel!}%
+ \let\LWR@listings@cref@currentlabel\cref@currentlabel% lwarp
+% \end{macrocode}
+% \begin{macrocode}
+\LWR@traceinfo{lst@Init: preinit and init}%
+ \lsthk@PreInit \lsthk@Init%
+% \end{macrocode}
+% \begin{macrocode}
+ \let\@currentlabel\LWR@listings@currentlabel% lwarp
+ \let\cref@currentlabel\LWR@listings@cref@currentlabel% lwarp
+% \end{macrocode}
+%
+% \begin{macrocode}
+\LWR@traceinfo{lst@Init: M}%
+ \lst@ifdisplaystyle
+ \global\let\lst@ltxlabel\@empty
+ \if@inlabel
+ \lst@ifresetmargins
+ \leavevmode
+ \else
+ \xdef\lst@ltxlabel{\the\everypar}%
+ \lst@AddTo\lst@ltxlabel{%
+ \global\let\lst@ltxlabel\@empty
+ \everypar{\lsthk@EveryLine\lsthk@EveryPar}}%
+ \fi
+ \fi
+ \everypar\expandafter{\lst@ltxlabel
+ \lsthk@EveryLine\lsthk@EveryPar}%
+ \else
+ \everypar{}
+ \let\lst@NewLine\@empty
+ \fi
+\LWR@traceinfo{lst@Init: P}%
+ \lsthk@InitVars \lsthk@InitVarsBOL
+ \lst@Let{13}\lst@MProcessListing
+ \let\lst@Backslash#1%
+ \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}%
+ \lst@InitFinalize%
+\LWR@traceinfo{lst@Init: S}%
% \end{macrocode}
% Avoids extra horizontal space:
% \changes{v0.60}{2018/09/12}{\pkg{listings}: Fix if inside a list.}
% \begin{macrocode}
-\def\lst@framelr{}%
+\def\lst@framelr{}% lwarp
% \end{macrocode}
% \begin{macrocode}
-\LWR@traceinfo{finished origlst@Init}%
-\lst@ifdisplaystyle%
+\LWR@traceinfo{lst@Init: finished origlst@Init}%
+\lst@ifdisplaystyle% lwarp
% \end{macrocode}
% Creating a display.
%
@@ -62132,26 +63153,25 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% produce the \element{pre}, then
% reenable line numbers.
% \begin{macrocode}
- \LWR@traceinfo{About to create verbatim.}%
- \let\lsthk@EveryPar\relax%
+ \LWR@traceinfo{lst@Init: About to create verbatim.}% lwarp
+ \let\lsthk@EveryPar\relax% lwarp
% \end{macrocode}
% \changes{v0.891}{2020/09/16}{\pkg{listings}: Fix for \brand{MathJax}: Moved \cs{LWR@forcenewpage} to start.}
% \begin{macrocode}
- \LWR@atbeginverbatim{programlisting}%
+ \LWR@atbeginverbatim{programlisting}% lwarp
- \let\lsthk@EveryPar\LWR@origlsthkEveryPar%
-\else%
+ \let\lsthk@EveryPar\LWR@origlsthkEveryPar% lwarp
+\else% lwarp
% \end{macrocode}
% Inline, so open a \element{span}:
% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
% \begin{macrocode}
- \ifbool{LWR@verbtags}{\LWR@htmltag{%
- span class=\textquotedbl{}inlineprogramlisting\textquotedbl%
- }}{}%
-\fi%
-\LWR@traceinfo{lst@Init done}%
+ \ifbool{LWR@verbtags}{\LWR@htmltag{% lwarp
+ span class=\textquotedbl{}inlineprogramlisting\textquotedbl% lwarp
+ }}{}% lwarp
+\fi% lwarp
+\LWR@traceinfo{lst@Init: done}%
}
-
% \end{macrocode}
% \end{noindmacro}
%
@@ -62159,27 +63179,57 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \begin{noindmacro}{\lst@DeInit} \quad Done at the end of a listing.
% \begin{macrocode}
\renewcommand*{\lst@DeInit}{%
+\LWR@traceinfo{lst@DeInit}%
\lst@ifdisplaystyle%
% \end{macrocode}
+%
% Creating a display.
%
-% Disable line numbers,
-% produce the \element{/pre}, then
-% reenable line numbers:
+% Disable line numbers, produce the \element{/pre}, then reenable line numbers:
% \begin{macrocode}
\let\lsthk@EveryPar\relax%
\LWR@afterendverbatim%
\let\lsthk@EveryPar\LWR@origlsthkEveryPar%
\else%
% \end{macrocode}
+%
% Inline, so create the closing \element{/span}:
% \begin{macrocode}
\ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/span}}{}%
\fi%
% \end{macrocode}
+%
% Final \pkg{listings} deinit:
% \begin{macrocode}
-\LWR@origlst@DeInit%
+ \lst@XPrintToken \lst@EOLUpdate
+ \global\advance\lst@newlines\m@ne
+ \lst@ifshowlines
+ \lst@DoNewLines
+ \else
+ \setbox\@tempboxa\vbox{\lst@DoNewLines}%
+ \fi
+ \lst@ifdisplaystyle \par\removelastskip \fi
+ \lsthk@ExitVars\everypar{}\lsthk@DeInit\normalbaselines\normalcolor
+ \lst@MakeCaption b%
+ \lst@ifbox
+ \egroup $\hss \egroup
+ \vrule\@width\lst@maxwidth\@height\z@\@depth\z@
+ \else
+ \lst@ifdisplaystyle
+ \par\penalty-50\vspace\lst@belowskip
+ \fi
+ \fi
+ \ifx\lst@multicols\@empty\else
+ \def\lst@next{\global\let\@checkend\@gobble
+ \endmulticols
+ \global\let\@checkend\lst@@checkend}
+ \expandafter\lst@next
+ \fi
+ \ifx\lst@float\relax\else
+ \expandafter\lst@endfloat
+ \fi
+ \endgroup
+\LWR@traceinfo{lst@DeInit done}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -62192,19 +63242,18 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
%
% Patched for \pkg{lwarp}.
% \begin{macrocode}
-
\def\lst@MakeCaption#1{%
-\LWR@traceinfo{MAKING CAPTION at #1}%
+\LWR@traceinfo{lst@MakeCaption at #1}%
\lst@ifdisplaystyle
-\LWR@traceinfo{making a listings display caption}%
+\LWR@traceinfo{lst@MakeCaption: making a listings display caption}%
\ifx #1t%
\ifx\lst@@caption\@empty\expandafter\lst@HRefStepCounter \else
\expandafter\refstepcounter
\fi {lstlisting}%
-\LWR@traceinfo{About to assign label: !\lst@label!}%
+% \LWR@traceinfo{About to assign label: !\lst@label!}%
% \ifx\lst@label\@empty\else
% \label{\lst@label}\fi
-\LWR@traceinfo{Finished assigning the label.}%
+% \LWR@traceinfo{Finished assigning the label.}%
\let\lst@arg\lst@intname \lst@ReplaceIn\lst@arg\lst@filenamerpl
\global\let\lst@name\lst@arg \global\let\lstname\lst@name
\lst@ifnolol\else
@@ -62218,7 +63267,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% This code places a contents entry for a non-float.
% This would have to be modified for \pkg{lwarp}:
% \begin{macrocode}
-\LWR@traceinfo{addcontents lst@name: -\lst@name-}%
+\LWR@traceinfo{lst@MakeCaption: addcontents lst@name: -\lst@name-}%
% \addcontentsline{lol}{lstlisting}{\lst@name}
\fi
\fi
@@ -62227,7 +63276,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \end{macrocode}
% This would have to be modified for \pkg{lwarp}:
% \begin{macrocode}
-\LWR@traceinfo{addcontents lst@@caption: -\lst@@caption-}%
+\LWR@traceinfo{lst@MakeCaption: addcontents lst@@caption: -\lst@@caption-}%
\addcontentsline{lol}{lstlisting}%
{\protect\numberline{\thelstlisting}%
{\protect\ignorespaces \LWR@isolate{\lst@@caption} \protect\relax}}%
@@ -62235,10 +63284,10 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\fi
\fi
\ifx\lst@caption\@empty\else
-\LWR@traceinfo{lst@caption not empty-}%
+\LWR@traceinfo{lst@MakeCaption: lst@caption not empty-}%
\lst@IfSubstring #1\lst@captionpos
{\begingroup
-\LWR@traceinfo{at the selected position}%
+\LWR@traceinfo{lst@MakeCaption: at the selected position}%
% \end{macrocode}
% These space and box commands are not needed for \HTML\ output:
% \begin{macrocode}
@@ -62252,37 +63301,37 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% New \pkg{lwarp} code to create a caption:
% \changes{v0.73}{2019/06/25}{\pkg{listings}: Fix: Paragraph tags.}
% \begin{macrocode}
- \LWR@stoppars%
+ \LWR@stoppars% lwarp
\lst@makecaption\fnum@lstlisting{\ignorespaces \lst@caption}
\else
% \end{macrocode}
% New \pkg{lwarp} code to create a title:
% \begin{macrocode}
% \lst@maketitle\lst@title % (AS)
-\LWR@traceinfo{Making title: \lst@title}%
+\LWR@traceinfo{lst@MakeCaption: Making title: \lst@title}%
\begin{BlockClass}{lstlistingtitle}% lwarp
\lst@maketitle\lst@title% lwarp
\end{BlockClass}% lwarp
- \fi
-\LWR@traceinfo{About to assign label: !\lst@label!}%
- \ifx\lst@label\@empty\else
+ \fi%
+\LWR@traceinfo{lst@MakeCaption: About to assign label: !\lst@label!}%
+ \ifx\lst@label\@empty\else%
\leavevmode% gets rid of bad space factor error
\GetTitleStringExpand{\lst@caption}%
\edef\LWR@lntemp{\GetTitleStringResult}%
\edef\@currentlabelname{\detokenize\expandafter{\LWR@lntemp}}%
-\label{\lst@label}\fi
-\LWR@traceinfo{Finished assigning the label.}%
+\label{\lst@label}\fi%
+\LWR@traceinfo{lst@MakeCaption: Finished assigning the label.}%
% \end{macrocode}
% Not needed for \pkg{lwarp}:
% \begin{macrocode}
% \ifx #1b\allowbreak \fi
\endgroup}{}%
\fi
-\LWR@traceinfo{end of making a listings display caption}%
+\LWR@traceinfo{lst@MakeCaption: end of making a listings display caption}%
\else
-\LWR@traceinfo{INLINE}%
+\LWR@traceinfo{lst@MakeCaption: INLINE}%
\fi
-\LWR@traceinfo{DONE WITH CAPTION at #1}%
+\LWR@traceinfo{lst@MakeCaption: done at #1}%
}
\renewcommand{\lst@maketitle}[1]{%
@@ -62293,6 +63342,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \end{noindmacro}
%
%
+%
% Patched to keep left line numbers outside of the left margin, and
% \margintag{line numbers}
% place right line numbers in a field \cs{VerbatimHTMLWidth} wide.
@@ -62525,25 +63575,26 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\newcommand*{\LWR@longtable@headerror}{%
\PackageError{lwarp-longtable}
{For longtable:\MessageBreak
- 1: Keep either one of an \protect\endhead\space or
- \protect\endfirsthead\space\MessageBreak
- \space phrase as-is, to be used by both print and HTML.\MessageBreak
+ 1: Keep either one of an \protect\endhead\space or\MessageBreak
+ \space\protect\endfirsthead\space phrase as-is,\MessageBreak
+ \space to be used by both print and HTML.\MessageBreak
2: Place any other \protect\end... phrases inside a\MessageBreak
\space\protect\warpprintonly\space macro,
to be ignored by HTML.\MessageBreak
- 3: Add a final footer for HTML at the end of the table\MessageBreak
+ 3: At the end of the table,\MessageBreak
+ \space add a final footer for HTML\MessageBreak
\space inside a \protect\warpHTMLonly\space macro.
This can be\MessageBreak
\space a copy of an \protect\endfoot\space or
- \protect\endfirstfoot\space phrase,\MessageBreak
- \space but without the actual \protect\endfoot\space
- or \protect\endfirstfoot\MessageBreak
- \space macros. If using threeparttablex, add\MessageBreak
+ \protect\endfirstfoot\MessageBreak
+ \space phrase, but without the actual \protect\endfoot\MessageBreak
+ \space or \protect\endfirstfoot\space macros.\MessageBreak
+ \space If using threeparttablex, add\MessageBreak
\space \protect\insertTableNotes\space here,
optionally with\MessageBreak
\space \protect\UseMinipageWidths\space in front.\MessageBreak
- See the Lwarp documentation regarding longtables\MessageBreak
- and threeparttablex}
+ See the Lwarp documentation regarding\MessageBreak
+ longtables and threeparttablex}
{See the Lwarp documentation regading longtables and threeparttablex.}
}
% \end{macrocode}
@@ -67855,7 +68906,16 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\LWRNB@patchnatbibopenclose%
}
% \end{macrocode}
-
+%
+% Syncronize the autopage labels:
+% \changes{v0.896}{2021/03/26}{\pkg{natbib}: Fix: Citation references..}
+% \begin{macrocode}
+\xpretocmd{\NAT@reset@parser}
+ {\LWR@newautopagelabel{page}}%
+ {}
+ {\LWR@patcherror{natbib}{NAT@reset@parser}}
+% \end{macrocode}
+%
% \iffalse
%</natbib>
% \fi
@@ -69475,6 +70535,12 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\refstepcounter[#1]{#2}% <<< cleveref modification
\theorem@prework
\LWR@forcenewpage% lwarp
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{ntheorem}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{theorembody#1}%\LWR@thisthmstyle% lwarp
\trivlist % latex's \trivlist, calling latex's \@trivlist unchanged
\ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist
@@ -69511,6 +70577,12 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\refstepcounter{#2}%
\theorem@prework
\LWR@forcenewpage% lwarp
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{ntheorem}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{theorembody#1}%\LWR@thisthmstyle% lwarp
\trivlist % latex's \trivlist, calling latex's \@trivlist unchanged
\ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist
@@ -69964,6 +71036,12 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
}{}%
\LWR@origendtheorem% also does \@endtrivlist
\ifbool{LWR@ntheoremmarks}{\global\setendmarktrue}{}%
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{ntheorem}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\endBlockClass%
}
% \end{macrocode}
@@ -70139,6 +71217,60 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \fi
%
%
+% \iffalse
+%<*orcidlink>
+% \fi
+%
+% \part{lwarp-orcidlink.sty}
+%
+% \section{orcidlink}
+%
+% \credits{Leo C. Stein}
+%
+% \DescribePackage{orcidlink}
+% \pkg{orcidlink} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.896}{2021/03/19}{\pkg{orcidlink}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\RequirePackage{lwarp-scalerel}
+
+\LWR@ProvidesPackagePass{orcidlink}[2020/11/21]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand\orcidlink[1]{%
+ \texorpdfstring%
+ {%
+ \href%
+ {https://orcid.org/#1}%
+ {%
+ \begin{lateximage}[orcid #1]% lwarp
+ \mbox{%
+ \scalerel*{%
+ \begin{tikzpicture}[yscale=-1,transform shape]
+ \pic{orcidlogo};
+ \end{tikzpicture}
+ }{|}%
+ }%
+ \end{lateximage}% lwarp
+ }%
+ }%
+ {}%
+}
+
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\orcidlink}[1]{}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</orcidlink>
+% \fi
+%
+%
%
%
% \iffalse
@@ -70614,6 +71746,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \pkg{parnotes} is supported with some patches.
%
% \changes{v0.56}{2018/05/08}{\pkg{parnotes}: Added.}
+% \changes{v0.896}{2021/03/05}{\pkg{parnotes}: Added \ARIA\ role.}
%
% \codehtml
%
@@ -70647,10 +71780,10 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\unless\ifvmode\par\fi
% Avoid page breaks between a paragraph and its parnotes
\nopagebreak\addvspace{\parnotevskip}%
- \LWR@forcenewpage% lwarp
- \begin{BlockClass}{footnotes}% lwarp
+ \LWR@forcenewpage% lwarp
+ \begin{BlockClass}(note){footnotes}% lwarp
{\parnotefmt{\PN@text}\par}%
- \end{BlockClass}% lwarp
+ \end{BlockClass}% lwarp
\global\def\PN@text{}%
\addvspace{\parnotevskip}%
%
@@ -71048,12 +72181,20 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \DescribePackage{pdflscape} \pkg{pdflscape} is ignored.
%
% \changes{v0.34}{2017/08/03}{\pkg{pdflscape}: Added.}
+% \changes{v0.896}{2021/03/14}{\pkg{pdflscape}: Fix: Added \env{landscape}.}
%
% \codehtml
%
% Discard all options for \pkg{lwarp-pdflscape}:
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{pdflscape}[2016/05/14]
+\LWR@ProvidesPackageDrop{pdflscape}[2019/12/05]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\landscape\relax
+\let\endlandscape\relax
+
+\newenvironment*{landscape}{}{}
% \end{macrocode}
%
% \iffalse
@@ -71775,12 +72916,13 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
%
% The \env{window} is floated by a \env{BlockClass} style.
+% \changes{v0.896}{2021/03/05}{\pkg{picinpar}: Added \ARIA\ role.}
% \begin{macrocode}
\long\def\LWR@HTML@window[#1,#2,#3,#4] {%
\if #2r%
- \begin{BlockClass}[float:right]{marginblock}%
+ \begin{BlockClass}[float:right](note){marginblock}%
\else%
- \begin{BlockClass}[float:left]{marginblock}%
+ \begin{BlockClass}[float:left](note){marginblock}%
\fi%
#3\par%
#4%
@@ -74372,7 +75514,22 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\NewDocumentCommand{\ofoot}{s o m}{}
\NewDocumentCommand{\cfoot}{s o m}{}
\NewDocumentCommand{\ifoot}{s o m}{}
+% \end{macrocode}
+% \changes{v0.896}{2021/03/13}{\pkg{scrlayer-scrpage}: Added \cs{automark}, \cs{manualmark}.}
+% \begin{macrocode}
+\NewDocumentCommand{\automark}{som}{}
+\newcommand*{\manualmark}{}
+% \end{macrocode}
+% \begin{macrocode}
\DeclareDocumentCommand{\MakeMarkcase}{m}{#1}
+% \end{macrocode}
+% \changes{v0.896}{2021/03/13}{\pkg{scrlayer-scrpage}: Added \cs{headmeark}, \cs{pagemark}.}
+% \begin{macrocode}
+\let\headmark\leftmark
+\providecommand{\pnumfont}{\normalfont}%
+\DeclareRobustCommand\pagemark{{\pnumfont{\thepage}}}%
+% \end{macrocode}
+% \begin{macrocode}
\newcommand*{\defpairofpagestyles}[3][]{}
\newcommand*{\newpairofpagestyles}[3][]{}
\newcommand*{\renewpairofpagestyles}[3][]{}
@@ -75267,7 +76424,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
%
%
-% The following patch \pkg{sidenotes} for use with \pkg{lwarp}:
+% The following patch \pkg{sidenotes} for use with \pkg{lwarp}.
+%
+% An \ARIA\ |note| role is not assigned since the caption is an
+% important part of the figure.
%
% \begin{noindmacro}{\sidecaption} * \oarg{entry} \oarg{offset} \marg{text}
% \changes{v0.47}{2018/01/30}{\pkg{sidenotes}: Fix for \SVG\ math in captions.}
@@ -75280,7 +76440,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\captionsetup{style=sidecaption}%
\IfBooleanTF{#1}
{ % starred
- \begin{BlockClass}[border:none ; box-shadow:none]{marginblock}
+ \begin{BlockClass}[border:none ; box-shadow:none]{marginblock}%
\caption*{#4}%
\end{BlockClass}
}
@@ -75288,7 +76448,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\IfNoValueOrEmptyTF{#2}
{\def\@sidenotes@sidecaption@tof{#4}}
{\def\@sidenotes@sidecaption@tof{#2}}
- \begin{BlockClass}[border:none ; box-shadow:none]{marginblock}
+ \begin{BlockClass}[border:none ; box-shadow:none]{marginblock}%
\caption[\@sidenotes@sidecaption@tof]{#4}
\end{BlockClass}
}
@@ -77821,7 +78981,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}{}%
\begingroup% lwarp
\LWR@restoreorigformatting% lwarp
- \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% lwarp: inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o d()}{}{}% lwarp: inside group
\expandafter\LWR@gsavebox\csname\sv@name content\endcsname{#2}%
\expandafter\gdef\expandafter#1\expandafter{%
\expandafter\begin\expandafter{lateximage\expandafter}% lwarp
@@ -79041,21 +80201,17 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{noindmacro}
-
% \begin{noindmacro}{\subfloat@label}
% Patches for \cs{sf@sub@label}:
% \begin{macrocode}
-\def\subfloat@label{%
-\LWR@ensuredoingapar% lwarp
- \@ifnextchar(% %) match left parenthesis
- {\sf@sub@label}
- {\sf@sub@label(Sub\@captype\space
- \@ifundefined{thechapter}{}{\@nameuse{thechapter}\space}%
- \@nameuse{p@sub\@captype}%
- \@nameuse{thesub\@captype}.)}}
+\xpretocmd{\subfloat@label}
+ {\LWR@ensuredoingapar}
+ {}
+ {\LWR@patcherror{subfig}{subfloat@label}}
% \end{macrocode}
% \end{noindmacro}
+
% Patches for \cs{subref}.
%
% \begin{noindmacro}{\sf@subref} \marg{label}
@@ -81010,6 +82166,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \begin{macrocode}
\gdef\@thm#1#2{\refstepcounter{#1}%
\LWR@forcenewpage% lwarp
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{theorem}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\BlockClass{theorembody\LWR@thisthmstyle}% lwarp
\trivlist
\@topsep \theorempreskipamount % used by first \item
@@ -81020,6 +82182,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\gdef\@endtheorem{%
\endtrivlist
+% \end{macrocode}
+% \changes{v0.896}{2021/03/14}{\pkg{theorem}: Intersperse footnotes.}
+% \begin{macrocode}
+ \LWR@printpendingfootnotes% lwarp
+% \end{macrocode}
+% \begin{macrocode}
\endBlockClass
}
% \end{macrocode}
@@ -81435,8 +82603,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}%
}%
}
+% \end{macrocode}
-\renewcommand\TPTL@tnotex[2]{\tnote{\nameref{#2}}}
+% \changes{v0.896}{2021/03/13}{\pkg{threeparttablex}: Fix: \cs{TPTL@tnotex} if not referrable.}
+% \begin{macrocode}
+\providecommand{\TPTL@tnotex}{}
+\renewcommand{\TPTL@tnotex}[2]{\tnote{\nameref{#2}}}
% \end{macrocode}
%
% \iffalse
@@ -83147,9 +84319,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\DeclareDocumentCommand{\cftsetindents}{m m m}{}
% \end{macrocode}
+% \changes{v0.893}{2021/03/13}{\pkg{tocloft}: Fix: \cs{cftpagenumbersoff}, \cs{cftpagenumberson}.}
+% \changes{v0.896}{2021/04/05}{\pkg{tocloft}: Fix: \cs{cftpagenumbersoff}, \cs{cftpagenumberson} with \pkg{memoir}.}
% \begin{macrocode}
-\newcommand{\pagenumbersoff}[1]{}
-\newcommand{\pagenumberson}[1]{}
+\providecommand{\cftpagenumbersoff}[1]{}
+\providecommand{\cftpagenumberson}[1]{}
% \end{macrocode}
@@ -83699,13 +84873,13 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \watchout
% \pkg{algorithmicx} uses |.loa|.
% \pkg{trivfloat} by default starts with |.loa| and goes up for additional floats,
-% skipping |.lof| and |.lot|.
+% skipping \filenm{.lof} and \filenm{.lot}.
%
% When using \cs{newfloat},
% \watchout
% be sure to manually assign higher letters to the \cs{newfloat}
% files to avoid |.loa| used by \pkg{algorithmicx}, and any files used by \pkg{trivfloat}.
-% Also avoid using |.lof| and |.lot|.
+% Also avoid using \filenm{.lof} and \filenm{.lot}.
%
% When using \cs{trivfloat}, you may force it to avoid conflicting with
% \watchout
@@ -85584,6 +86758,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.42}{2017/10/26}{\pkg{wrapfig}: If \progcode{FormatWP}
% add explicit \HTML\ style.}
% \changes{v0.75}{2019/09/22}{\pkg{wrapfig}: Fix for width.}
+% \changes{v0.896}{2021/03/05}{\pkg{wrapfig}: Added \ARIA\ role.}
% \begin{macrocode}
\newcommand*{\LWR@wrapposition}{}
@@ -85603,6 +86778,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{%
width:\LWR@printlength{\LWR@templengthone}; \LWR@wrapposition; %
}%
+(note)%
{marginblock}%
% \end{macrocode}
% \changes{v0.75}{2019/09/17}{\pkg{wrapfig}: Fix for \cs{linewidth}.}
@@ -85881,8 +87057,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% Sets \cs{LWR@tempcolor} to the current color.
% \begin{macrocode}
\renewcommand*{\LWR@findcurrenttextcolor}{%
+\LWR@traceinfo{LWR@findcurrenttextcolor}%
\protect\colorlet{LWR@current@color}{.}%
+\LWR@traceinfo{LWR@findcurrenttextcolor B}%
\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor%
+\LWR@traceinfo{LWR@findcurrenttextcolor: done}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -86487,26 +87666,26 @@ height:\LWR@printlength{\LWR@tempheight}%
%
%
% \iffalse
-%<*xetexko-vertical>
+%<*xetexko>
% \fi
%
-% \part{lwarp-xetexko-vertical.sty}
+% \part{lwarp-xetexko.sty}
%
-% \section{xetexko-vertical}
+% \section{xetexko}
%
% \credits{Dohyun Kim}
%
-% \DescribePackage{xetexko-vertical}
-% \pkg{xetexko-vertical} is patched for use by \pkg{lwarp}.
+% \DescribePackage{xetexko}
+% \pkg{xetexko} is patched for use by \pkg{lwarp}.
%
-% \changes{v0.20}{2017/01/11}{\pkg{xetexko-vertical}: Added.}
+% \changes{v0.20}{2017/01/11}{\pkg{xetexko}: Added.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@loadbefore{xetexko-vertical}
+\LWR@loadbefore{xetexko}
-\LWR@ProvidesPackagePass{xetexko-vertical}[2018/04/06]
+\LWR@ProvidesPackagePass{xetexko}[2021/03/22]
% \end{macrocode}
%
% \begin{macrocode}
@@ -86517,7 +87696,7 @@ height:\LWR@printlength{\LWR@tempheight}%
% \end{macrocode}
%
% \iffalse
-%</xetexko-vertical>
+%</xetexko>
% \fi
%
%
@@ -87816,37 +88995,40 @@ height:\LWR@printlength{\LWR@tempheight}%
%
% \begin{itemize}
% \item \cs{@mem@old@label} is the \LaTeX\ definition of \cs{label}.
-% \item \cs{LWR@orig@label} adds the \pkg{memoir} definition.
+% \item \cs{LWR@orig@label} becomes the \pkg{memoir} definition.
% \item \pkg{lwarp}'s \cs{LWR@new@label} uses \cs{LWR@orig@label}.
% \item Want \pkg{memoir}'s \cs{label} to use \pkg{lwarp}'s \cs{label},
% which then would use \LaTeX's \cs{label}.
% \item So:
% \begin{itemize}
-% \item \cs{@mem@old@label} becomes \cs{LWR@new@label}.
-% \item \cs{LWR@orig@label} becomes \cs{@mem@old@label}.
+% \item \cs{@mem@old@label} is set to \cs{LWR@new@label}.
+% \item \cs{LWR@orig@label} is set to \cs{@mem@old@label}.
% \end{itemize}
-% \item \pkg{cleveref} then encapsulates all the above.
-% \item For a subcaption, \pkg{cleveref} modifies \pkg{memoir}'s \cs{sf@memsub@label}.
+% \item \pkg{cleveref} then encapsulates all the above with \cs{cref@old@label}.
+% \item For a subcaption, \pkg{cleveref} modifies \pkg{memoir}'s \cs{sf@memsub@label},
+% but that change is undone by \pkg{lwarp}.
% \end{itemize}
% \changes{v0.84}{2020/04/05}{\pkg{lwarp-patch-memoir}: Fix: \cs{label}.}
% \begin{macrocode}
-\let\LWR@orig@label\@mem@old@label
-\let\@mem@old@label\LWR@new@label
+\LetLtxMacro\LWR@orig@label\@mem@old@label
+\LetLtxMacro\@mem@old@label\LWR@new@label
% \end{macrocode}
%
-% Patches for subfloats to support additional \pkg{lwarp} labels:
+% Patches for subfloats to support additional \pkg{lwarp} labels.
+% This is the non-\pkg{hyperref} version from \pkg{memoir}.
% \begin{macrocode}
\AtBeginDocument{
\renewcommand*{\sf@@memsub@label}[1]{%
\@bsphack
\sf@@memsub@label@hook{#1}%
- \@memoldlabel{#1}%
- \LWR@label@createtag{sub@#1}%
+% \@memoldlabel{#1}%
+ \cref@label{#1}% lwarp
+ \LWR@label@createtag{sub@#1}% lwarp
\protected@write\@auxout{}{%
\string\newlabel{sub@#1}%
{{\@nameuse{@@thesub\@captype}}%
{\thepage}}}%
- \LWR@write@lwarplabel{sub@#1}%
+ \LWR@write@lwarplabel{sub@#1}% lwarp
\@esphack
}
}
@@ -88709,10 +89891,11 @@ height:\LWR@printlength{\LWR@tempheight}%
% \end{macrocode}
%
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
+% \changes{v0.896}{2021/03/05}{\pkg{lwarp-patch-memoir}: Added \ARIA\ role.}
% \begin{macrocode}
\NewDocumentEnvironment{KFLTmemoir@marginfloat}{O{-1.2ex} m}
{% start
- \LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
+ \LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}(note){marginblock}%
\renewcommand*{\@captype}{#2}%
}
{%
diff --git a/macros/latex/contrib/lwarp/lwarp.ins b/macros/latex/contrib/lwarp/lwarp.ins
index 97c0deaed8..0ce71e74ae 100644
--- a/macros/latex/contrib/lwarp/lwarp.ins
+++ b/macros/latex/contrib/lwarp/lwarp.ins
@@ -97,6 +97,7 @@ version 2005/12/01 or later.
\file{lwarp-bussproofs.sty}{\from{lwarp.dtx}{bussproofs}}
\file{lwarp-bxpapersize.sty}{\from{lwarp.dtx}{bxpapersize}}
\file{lwarp-bytefield.sty}{\from{lwarp.dtx}{bytefield}}
+\file{lwarp-ccicons.sty}{\from{lwarp.dtx}{ccicons}}
\file{lwarp-cancel.sty}{\from{lwarp.dtx}{cancel}}
\file{lwarp-canoniclayout.sty}{\from{lwarp.dtx}{canoniclayout}}
\file{lwarp-caption.sty}{\from{lwarp.dtx}{caption}}
@@ -120,6 +121,7 @@ version 2005/12/01 or later.
\file{lwarp-citeref.sty}{\from{lwarp.dtx}{citeref}}
\file{lwarp-CJK.sty}{\from{lwarp.dtx}{CJK}}
\file{lwarp-CJKutf8.sty}{\from{lwarp.dtx}{CJKutf8}}
+\file{lwarp-classicthesis.sty}{\from{lwarp.dtx}{classicthesis}}
\file{lwarp-cleveref.sty}{\from{lwarp.dtx}{cleveref}}
\file{lwarp-clrdblpg.sty}{\from{lwarp.dtx}{clrdblpg}}
\file{lwarp-cmbright.sty}{\from{lwarp.dtx}{cmbright}}
@@ -157,6 +159,7 @@ version 2005/12/01 or later.
\file{lwarp-endheads.sty}{\from{lwarp.dtx}{endheads}}
\file{lwarp-endnotes.sty}{\from{lwarp.dtx}{endnotes}}
\file{lwarp-engtlc.sty}{\from{lwarp.dtx}{engtlc}}
+\file{lwarp-enotez.sty}{\from{lwarp.dtx}{enotez}}
\file{lwarp-enumerate.sty}{\from{lwarp.dtx}{enumerate}}
\file{lwarp-enumitem.sty}{\from{lwarp.dtx}{enumitem}}
\file{lwarp-epigraph.sty}{\from{lwarp.dtx}{epigraph}}
@@ -368,6 +371,7 @@ version 2005/12/01 or later.
\file{lwarp-nowidow.sty}{\from{lwarp.dtx}{nowidow}}
\file{lwarp-ntheorem.sty}{\from{lwarp.dtx}{ntheorem}}
\file{lwarp-octave.sty}{\from{lwarp.dtx}{octave}}
+\file{lwarp-orcidlink.sty}{\from{lwarp.dtx}{orcidlink}}
\file{lwarp-overpic.sty}{\from{lwarp.dtx}{overpic}}
\file{lwarp-pagegrid.sty}{\from{lwarp.dtx}{pagegrid}}
\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}}
@@ -576,7 +580,7 @@ version 2005/12/01 or later.
\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}}
\file{lwarp-xechangebar.sty}{\from{lwarp.dtx}{xechangebar}}
\file{lwarp-xellipsis.sty}{\from{lwarp.dtx}{xellipsis}}
-\file{lwarp-xetexko-vertical.sty}{\from{lwarp.dtx}{xetexko-vertical}}
+\file{lwarp-xetexko.sty}{\from{lwarp.dtx}{xetexko}}
\file{lwarp-xevlna.sty}{\from{lwarp.dtx}{xevlna}}
\file{lwarp-xfakebold.sty}{\from{lwarp.dtx}{xfakebold}}
\file{lwarp-xfrac.sty}{\from{lwarp.dtx}{xfrac}}
diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf
index e49cbc84fb..d280510a29 100644
--- a/macros/latex/contrib/lwarp/lwarp.pdf
+++ b/macros/latex/contrib/lwarp/lwarp.pdf
Binary files differ
diff --git a/macros/latex/contrib/lwarp/lwarpmk.lua b/macros/latex/contrib/lwarp/lwarpmk.lua
index 95c5d37a13..7357f24b90 100755
--- a/macros/latex/contrib/lwarp/lwarpmk.lua
+++ b/macros/latex/contrib/lwarp/lwarpmk.lua
@@ -2,7 +2,7 @@
-- Copyright 2016-2021 Brian Dunn
-printversion = "v0.895"
+printversion = "v0.896"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()