summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lwarp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-29 03:00:56 +0000
committerNorbert Preining <norbert@preining.info>2023-08-29 03:00:56 +0000
commit64e26532c685fd24d6983508c6239e3c268b810b (patch)
treea947b8d31ea56b72c4c21ac202aead0d4544412d /macros/latex/contrib/lwarp
parent7ea6dacf544f9f0ec4f9566681de2434ca5e0e38 (diff)
CTAN sync 202308290300
Diffstat (limited to 'macros/latex/contrib/lwarp')
-rw-r--r--macros/latex/contrib/lwarp/README.txt2
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx304
-rw-r--r--macros/latex/contrib/lwarp/lwarp.pdfbin3399651 -> 3405893 bytes
-rwxr-xr-xmacros/latex/contrib/lwarp/lwarpmk.lua4
4 files changed, 185 insertions, 125 deletions
diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt
index 92fff483cc..3918deb3e5 100644
--- a/macros/latex/contrib/lwarp/README.txt
+++ b/macros/latex/contrib/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.911 README.txt
+LaTeX lwarp package v0.912 README.txt
Files included are:
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index 4865f5567e..d7f79fc3cf 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> [2023/02/28 v0.911 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2023/08/28 v0.912 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -3423,6 +3423,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.909}{2022/11/22}{\ 2022/11/22}
% \changes{v0.910}{2023/01/03}{\ 2023/01/03}
% \changes{v0.911}{2023/02/28}{\ 2023/02/28}
+% \changes{v0.912}{2023/08/28}{\ 2023/08/28}
@@ -3656,6 +3657,13 @@ This boolean may be tested by the user for later use.
% see the end of the Change History on page \pageref{sec:changesend}.
%
% \begin{description}
+% \item[v0.912:] Updated for new \LaTeX\ label system.
+% \begin{itemize}
+% \item Fixed for updated kernel label system, name and back references.
+% \item Updated \pkg{memoir}, \pkg{tcolorbox}.
+% \item \pkg{nameref}: Now allowed to load before \pkg{lwarp}, such as by \pkg{memoir}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.911:] Updated \pkg{mismath}, \pkg{tcolorbox}.
% \needspace{2\baselineskip}
% \item[v0.910:] Updated \pkg{fvextra}, \pkg{minted}.
@@ -13906,7 +13914,6 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{musicography}
\LWR@loadafter{mwe}
\LWR@loadafter{nameauth}
-\LWR@loadafter{nameref}
\LWR@loadafter{natbib}
\LWR@notmemoirloadafter{nccfancyhdr}
\LWR@loadafter{nccfoots}
@@ -14569,6 +14576,18 @@ This boolean may be tested by the user for later use.
% \end{macro}
%
%
+% \begin{macro}{\LWR@edeffirstoffive} \marg{first} \marg{second} \marg{third} \marg{fourth} \marg{fifth}
+% \cs{edef}s to the first of five arguments.
+% Used for back referencing.
+% \changes{v0.912}{2023/08/24}{Added.}
+% \begin{macrocode}
+\long\def\LWR@edeffirstoffive#1#2#3#4#5{%
+ \edef\@tempa{#1}%
+}%
+% \end{macrocode}
+% \end{macro}
+
+
% \subsection{Inside boxes}
%
% Greater than zero if currently inside a \TeX\ box,
@@ -21118,10 +21137,10 @@ MathJax = {
\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2022 Brian Dunn
+-- Copyright 2016-2023 Brian Dunn
-printversion = "v0.911"
+printversion = "v0.912"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -23687,9 +23706,10 @@ end -- not --version
%
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.912}{2023/08/27}{Fixed with tracing on.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@htmlspanclass}{o D(){} m +m}{%
- \LWR@traceinfo{LWR@htmlspanclass |#1|#2|#3|}%
+ \LWR@traceinfo{LWR@htmlspanclass #3}%
\LWR@ensuredoingapar%
\ifblank{#2}%
{\LWR@subhtmlelementclass{span}[#1]{#3}}%
@@ -23697,8 +23717,8 @@ end -- not --version
\begin{LWR@nestspan}%
#4%
\LWR@htmltagc{/span}%
- \LWR@traceinfo{LWR@htmlspanclass done}%
\end{LWR@nestspan}%
+ \LWR@traceinfo{LWR@htmlspanclass done}%
}
% \end{macrocode}
% \end{macro}
@@ -23805,10 +23825,11 @@ end -- not --version
% \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.}
+% \changes{v0.912}{2023/08/27}{Fixed with tracing on.}
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} D(){} m}{%
- \LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}%
+ \LWR@traceinfo{LWR@subhtmlelementclass !#1!#4!}%
\ifblank{#2}%
{% empty style
\LWR@htmltag{%
@@ -24314,7 +24335,8 @@ end -- not --version
% \end{macrocode}
%
% The opening paragraph tag.
-% Do not create tag if doing \pkg{algorithm2e} handling instead:
+% Do not create tag if doing \pkg{algorithm2e} handling
+% or inside a \cs{multirow}.
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
@@ -27831,19 +27853,7 @@ end -- not --version
}\LWR@orignewline
% \end{macrocode}
%
-% IE patch:
-% \changes{v0.63}{2018/11/30}{Fix: Break ligature for \pkg{luatexko}.}
-% \begin{macrocode}
-\LWR@htmltag{!-\/-[if lt IE 9]}\LWR@orignewline
-\LWR@htmltag{%
- script % space
- src=\LWR@orig@textquotedbl{}%
- http://html5shiv.googlecode.com/svn/trunk/html5.js%
- \LWR@orig@textquotedbl%
-}%
-\LWR@htmltag{/script}\LWR@orignewline
-\LWR@htmltag{![endif]-\/-}\LWR@orignewline
-% \end{macrocode}
+% \changes{v0.912}{2023/08/28}{Removed IE 9 shim patch.}
%
% The page's title, if there is one.
% A section name is also added if given.
@@ -30099,6 +30109,7 @@ end -- not --version
% \section{Tabular}
+% ^^A *tabular
%
% This is arguably the most complicated part of the entire package.
% Numerous tricks are employed to handle the syntax of the \LaTeX\ core
@@ -32085,16 +32096,17 @@ end -- not --version
\LWR@maybenewtablerow%
% \end{macrocode}
%
-% Don't start a new paragraph tag if have already started one:
+% Don't start a new paragraph tag if have already started one,
+% or have found the end of the tabular,
+% or if are inside a \cs{multirow}:
+% \changes{v0.912}{2023/08/28}{Fixed \cs{multirow} par handling.}
% \begin{macrocode}
- \ifbool{LWR@intabularmetadata}%
- {%
-% \end{macrocode}
-%
-% If have found the end of tabular command, do not create the next data cell:
-% \begin{macrocode}
- \ifbool{LWR@exitingtabular}{}%
- {% not exiting tabular
+ \ifboolexpr{
+ bool{LWR@intabularmetadata}
+ and not bool{LWR@exitingtabular}
+ and not bool {LWR@in@multirow@par}
+ }%
+ {% making a tabular data cell
% \end{macrocode}
%
% Print the |@| and |!| contents before first column:
@@ -32197,8 +32209,8 @@ end -- not --version
\LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}%
}%
\boolfalse{LWR@intabularmetadata}%
- }% not exiting tabular
- }{}% in tabular metadata
+ }% making a tabular data cell
+ {}% not making a tabular data cell
\LWR@traceinfo{LWR@tabledatasinglecolumntag: done}%
}%
% \end{macrocode}
@@ -34525,19 +34537,19 @@ end -- not --version
% \item [\cs{refstepcounter}:] Steps the couunter and sets \cs{@currentlabel}.
% \item [\cs{@currentlabel}:] \cs{p@<ctr>}\cs{the<ctr>} Updated by \cs{refstepcounter}.
% \item [\cs{label}:] Writes to the |.aux| file:
-% \qquad |\newlabel{<label>}{{\@currentlabel}{\thepage}}|
+% \qquad |\newlabel{<label>}{{\@currentlabel}{\thepage}{name}{Href}{()}}|
% \item [\cs{newlabel}:] When the |.aux| file is read, sets \cs{r@<label>}.
-% \item [\cs{r@<label>}:] Set to: |{{\@currentlabel}{\thepage}}|
+% \item [\cs{r@<label>}:] Set to: |{\@currentlabel}{\thepage}{name}{Href}{}|
% \item [\cs{ref}:] Returns the first part of \cs{r@<label>}.
% \item [\cs{pageref}:] Returns the second part of \cs{r@<label>}.
% \end{description}
% \item [Added by \pkg{lwarp}:] \hfill (\HTML\ only)
% \begin{description}
% \item [\cs{label}:] Adds \HTML\ tags (\cref{sec:labels}),
-% and another \filenm{.aux} entry (\cref{sec:lwarplabelsetup}).
-% If \pkg{memoir} is used, its \cs{@mem@old@label} points to \pkg{lwarp}'s version,
-% and \pkg{cleveref} patches.
-% \item [\cs{newlabel}:] Unchanged. When the |.aux| file is read, sets \cs{r@<label>@lwarp}.
+% and another \filenm{.aux} entry (\cref{sec:lwarplabelsetup}) for \cs{r@<label>@lwarp}.
+% (\pkg{nameref} changes to \cs{ref}, etc. are undone \cs{AtBeginDocument}.)
+% \item [\cs{newlabel}:] Unchanged. When the |.aux| file is read,
+% used to set \cs{r@<label>}, and then \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 or object name for this label.
@@ -34561,9 +34573,9 @@ end -- not --version
% \begin{description}
% \item [\cs{refstepcounter:}] Added: sets \cs{cref@currentlabel}.
% \item [\cs{cref@currentlabel}:] (|<type>|=|<ctr>| unless an alias is used):
-% \qquad |[<type>][\arabic{<ctr>}][<parent ctrs>]{\p@<ctr>\the<ctr>}|
+% \qquad |[<type>][\arabic{<ctr>}][<parent ctrs>]{\p@<ctr>\the<ctr>}| \\
% Also see \cref{sec:footnotesregular} for use with footnotes.
-% \item [\cs{label}:] Writes to the |.aux| file:
+% \item [\cs{label}:] Also writes to the |.aux| file:
% \qquad |\newlabel{<label>@cref}{{\cref@currentlabel}{\thepage}}|
% \item [\cs{newlabel}:] Unchanged. When the |.aux| file is read, sets \cs{r@<label>@cref}.
% \item [\cs{r@<label>@cref}:] Set to: |{{\cref@currentlabel}{\thepage}}|
@@ -34879,10 +34891,9 @@ end -- not --version
% the special label handling is required, but \cs{LWR@label@createtag} does not
% generate \HTML\ tags inside a \env{lateximage}.
%
-% If \pkg{memoir} is used, it's \cs{@mem@old@label} is pointed here.
+% \pkg{clevereref} later encases this to add its own cross-referencing.
%
-% \pkg{clevereref} later encases this to add its own cross-referencing,
-% and also patches \pkg{memoir}.
+% \pkg{nameref} patches are undone \cs{AtBeginDocument}.
%
% \changes{v0.84}{2020/04/05}{Removed optional args.}
% \changes{v0.896}{2021/04/08}{Revert to a simple \cs{newcommand*}.}
@@ -35056,8 +35067,9 @@ end -- not --version
{\LWR@subnewref{#2}{#2}}%
}
+\AtBeginDocument{% **8*
\LWR@formatted{ref}
-
+}
\NewDocumentCommand{\LWR@HTML@Ref}{s m}{%
\LWR@traceinfo{LWR@HTML@Ref !#2!}%
@@ -35066,17 +35078,20 @@ end -- not --version
{\LWR@subnewref{#2}{#2}}%
}
+\AtBeginDocument{% **8*
\LWR@formatted{Ref}
+}
% \end{macrocode}
%
%
% \begin{macro}{\LWR@refwithsection} * \marg{label}
%
-% Creates a reference, using the section number as the text.
+% Creates a reference, printing the section number as the text.
% Used for back references.
%
% \changes{v0.896}{2021/04/21}{Added.}
% \changes{v0.903}{2021/12/13}{Fixed: Ref undefined or w/o label.}
+% \changes{v0.912}{2023/08/26}{Fixed back references.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@refwithsection}{s m}{%
\LWR@traceinfo{LWR@refwithsection !#2!}%
@@ -35086,62 +35101,71 @@ end -- not --version
% \begin{macrocode}
\IfBooleanTF{#1}%
{\LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}}%
- {%
+% \end{macrocode}
+%
+% If not starred:
+% Check for a reference to the start of the document.
+% (Generated by \pkg{backref}.
+%
+% \begin{macrocode}
+ {% not starred
+ \ifstrequal{#2}{Doc-Start}%
+ {%
+ \LWR@startref{\BaseJobname-autopage-1}%
+ *%
+ \LWR@htmltag{/a}%
+ }%
+ {% not Doc-Start
% \end{macrocode}
%
% Open the reference:
% \begin{macrocode}
- \LWR@startref{#2}%
+ \LWR@startref{#2}%
% \end{macrocode}
%
% Add the text of the link.
%
% Check for and handle an undefined reference:
% \begin{macrocode}
- \edef\@tempa{\LWR@currentautosecpageref{#2}}%
- \ifdefstring{\@tempa}{??}%
- {??}%
+ \edef\@tempa{\LWR@currentautosecpageref{#2}}%
+ \ifdefstring{\@tempa}{??}%
+ {??}%
% \end{macrocode}
%
% For a defined reference:
% \begin{macrocode}
- {%
+ {% not ??
% \end{macrocode}
%
-% Set \cs{@tempa} to \cs{r@<label>}, which is |{section number}{page number}|.
+% Set \cs{@tempa} to \cs{r@<label>}, which is |{section number}{page number}{name}{Href}{}|.
% \begin{macrocode}
- \edef\@tempa{%
- \csname
- r@\BaseJobname-autopage-\LWR@currentautosecpageref{#2}%
- \endcsname%
- }%
+ \edef\@tempa{\csexpandonce{r@\BaseJobname-autopage-\@tempa}}%
+ \expandafter\LWR@edeffirstoffive\@tempa%
% \end{macrocode}
%
% Check the section number alone:
-% \begin{macrocode}
- \edef\@tempa{\expandafter\@firstoftwo\@tempa}%
-% \end{macrocode}
%
% If the reference has no section number print an asterisk:
% \begin{macrocode}
- \expandafter\ifblank\expandafter{\@tempa}%
- {*}
+ \expandafter\ifblank\expandafter{\@tempa}%
+ {*}
% \end{macrocode}
%
% If there is a section number, print it:
% \begin{macrocode}
- {%
- \LWR@print@ref{%
- \BaseJobname-autopage-\LWR@currentautosecpageref{#2}%
- }%
- }%
- }%
+ {%
+ \LWR@print@ref{%
+ \BaseJobname-autopage-\LWR@currentautosecpageref{#2}%
+ }%
+ }%
+ }% not ??
% \end{macrocode}
%
% Close the reference:
% \begin{macrocode}
- \LWR@htmltag{/a}%
- }%
+ \LWR@htmltag{/a}%
+ }% not Doc-Start
+ }% not starred
}
% \end{macrocode}
% \end{macro}
@@ -35186,8 +35210,14 @@ end -- not --version
% \begin{macro}{\nameref} \marg{label}
%
% \changes{v0.43}{2017/10/31}{Made robust.}
+% \changes{v0.912}{2023/08/24}{\pkg{nameref}: Allow load before \pkg{lwarp}.}
+%
+% \pkg{nameref} may have already defined \cs{nameref}.
+% Redefine it here.
% \begin{macrocode}
-\newrobustcmd*{\nameref}[1]{%
+\providecommand{\nameref}[1]{}%
+
+\renewrobustcmd*{\nameref}[1]{%
\LWR@traceinfo{nameref}%
\LWR@startref{#1}%
\LWR@traceinfo{nameref B}%
@@ -35203,6 +35233,8 @@ end -- not --version
% \begin{macro}{\Nameref} \marg{label}
% In print, adds the page number. In \HTML, does not.
+%
+% Overwrites \pkg{nameref} definition if already defined.
% \begin{macrocode}
\LetLtxMacro\Nameref\nameref
% \end{macrocode}
@@ -36942,7 +36974,7 @@ end -- not --version
\newcommand*{\LWR@indexnameref@ref}[1]{%
\edef\LWR@thisref{\csuse{r@LWRindex-#1}}%
\ifdefvoid{\LWR@thisref}{}{%
- \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}%
+ \edef\LWR@thisref{\expandafter\@firstoffive\LWR@thisref}%
\ifdefvoid{\LWR@thisref}%
{\LWR@indexnameref@anonref{#1}}%
{\ref{LWRindex-#1}}%
@@ -36958,11 +36990,12 @@ end -- not --version
% To avoid an unwanted space if there is nothing to reference,
% the reference is checked first.
% For links to starred or |??| objects, only the name is used.
+% \changes{v0.912}{2023/08/27}{Fixed for new LaTeX labels.}
% \begin{macrocode}
\newcommand*{\LWR@indexnameref@refnameref}[1]{%
\edef\LWR@thisref{\csuse{r@LWRindex-#1}}%
\ifdefvoid{\LWR@thisref}{}{%
- \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}%
+ \edef\LWR@thisref{\expandafter\@firstoffive\LWR@thisref}%
\ifdefvoid{\LWR@thisref}{}{%
\ifdefstring{\LWR@thisref}{(*)}%
{}%
@@ -36981,13 +37014,14 @@ end -- not --version
% If no numbered reference is available, a \cs{nameref} is used instead.
% If the reference is |??|, which will be changed by \cs{LWR@indexnameref}
% to become |(*)|, then the link is changed to show |(*)|.
+% \changes{v0.912}{2023/08/27}{Fixed for new LaTeX labels.}
% \begin{macrocode}
\newcommand*{\LWR@indexnameref@cref}[1]{%
\edef\LWR@thisref{\csuse{r@LWRindex-#1}}%
\ifdefvoid{\LWR@thisref}{%
\nameref{LWRindex-#1}%
}{%
- \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}%
+ \edef\LWR@thisref{\expandafter\@firstoffive\LWR@thisref}%
\ifdefvoid{\LWR@thisref}{%
\nameref{LWRindex-#1}%
}{%
@@ -37009,13 +37043,14 @@ end -- not --version
% If no numbered reference is available, a \cs{nameref} is used instead.
% If the reference is |??|, which will be changed by \cs{LWR@indexnameref}
% to become |(*)|, then the link is changed to show only the name.
+% \changes{v0.912}{2023/08/27}{Fixed for new LaTeX labels.}
% \begin{macrocode}
\newcommand*{\LWR@indexnameref@crefnameref}[1]{%
\edef\LWR@thisref{\csuse{r@LWRindex-#1}}%
\ifdefvoid{\LWR@thisref}%
{}%
{%
- \edef\LWR@thisref{\expandafter\@firstoftwo\LWR@thisref}%
+ \edef\LWR@thisref{\expandafter\@firstoffive\LWR@thisref}%
\ifdefvoid{\LWR@thisref}%
{}%
{%
@@ -37336,7 +37371,7 @@ end -- not --version
% which meant the \HTML\ version could not resolve until the print version was
% also present. This also confused \pkg{multibib}.
% It has been reverted to the original to use \cs{jobname}\filenm{.bbl}.
-% \changes{v0.87}{2020/05/17}{Reverted to original.}
+% \changes{v0.87}{2020/05/17}{Reverted \cs{bibliography} to original.}
% \end{macro}
%
%
@@ -40130,9 +40165,10 @@ end -- not --version
\LetLtxMacro\@footnotetext\LWR@footnotetext%
}%
% \end{macrocode}
-% Create the |LWRlateximage<number>| label:
+% Create the |LWRlateximage-jobname-<number>| label:
% \begin{macrocode}
- \LWR@traceinfo{lateximage: about to create label}%
+ \LWR@traceinfo{lateximage: about to create label
+ LWRlateximage-\BaseJobname-\arabic{LWR@lateximagenumber}}%
\LWR@orig@label{LWRlateximage-\BaseJobname-\arabic{LWR@lateximagenumber}}%
\LWR@traceinfo{lateximage: finished creating the label}%
% \end{macrocode}
@@ -40460,6 +40496,15 @@ end -- not --version
% \end{macrocode}
% \end{macro}
+
+% Undo \pkg{nameref} if already loaded, such as by \pkg{memoir}:
+% \changes{v0.912}{2023/08/24}{\pkg{nameref}: Allow load before \pkg{lwarp}.}
+% \begin{macrocode}
+\LWR@PreloadedPackage{nameref}
+% \end{macrocode}
+
+
+
% If \pkg{inputtrc} was loaded before \pkg{lwarp},
% as is usually done,
% explicitly load the lwarp patches now:
@@ -40965,17 +41010,43 @@ end -- not --version
% print or \HTML\ output, and thus do not use the \cs{LWR@formatted} system.
%
% \codehtml
+%
+% \changes{v0.912}{2023/08/24}{\pkg{nameref}: Allow load before \pkg{lwarp}.}
% \begin{macrocode}
\begin{warpHTML}
-\LetLtxMacro\LWR@orig@label\label% includes memoir, before cleveref
+\LetLtxMacro\LWR@orig@label\label
\LetLtxMacro\label\LWR@new@label
-\LetLtxMacro\LWR@orig@pageref\pageref
-\LetLtxMacro\pageref\LWR@new@pageref
+\AtBeginDocument{%
+\LetLtxMacro\LWR@orig@pageref\pageref%
+\LetLtxMacro\pageref\LWR@new@pageref%
+}
+% \end{macrocode}
+
+% \begin{macro}{\label}
+% Detokenize \cs{@currentnamelabel} to avoid bug if math is in the name.
+% \changes{v0.912}{2023/08/24}{Detokenize \cs{@currentnamelabel} while writing.}
+% \begin{macrocode}
+\xpatchcmd{\LWR@orig@label}
+ {{\@currentlabelname}}
+ {{\detokenize\expandafter{\@currentlabelname}}}
+ {}
+ {
+ \typeout{***}
+ \typeout{***}
+ \typeout{*** Package lwarp warning:}
+ \typeout{*** Could not patch \string\label.}
+ \typeout{*** This may cause an error with section names or float captions}
+ \typeout{*** containing math, for example.}
+ \typeout{*** (Recent updates in the LaTeX kernel may make things work again.)}
+ \typeout{***}
+ \typeout{***}
+ }
\end{warpHTML}
% \end{macrocode}
+% \end{macro}
@@ -41576,11 +41647,11 @@ end -- not --version
% \cs{LWR@forceminwidth} must be used first in order to set the border width.
%
% \changes{v0.66}{2019/02/04}{Use current text color.}
+% \changes{v0.912}{2023/08/27}{Fixed with tracing on.}
%
% \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%
@@ -41610,6 +41681,7 @@ color:\LWR@origpound\LWR@tempcolor%
\LWR@traceinfo{HTML fbox: done}%
}
% \end{macrocode}
+%
% \pkg{xcolor} \cs{let}s things to \cs{fbox} when it is loaded,
% and this must remain even for \HTML\ output while in a \env{lateximage},
% so \cs{fbox} is not modified until \cs{AtBeginDocument}:
@@ -71902,22 +71974,16 @@ background:
% \section{nameref}
%
% \DescribePackage{nameref}
-% \pkg{nameref} is emulated by \pkg{lwarp}.
+% \pkg{nameref} is nullified here, then emulated by \pkg{lwarp}.
%
% \changes{v0.22}{2017/03/01}{\pkg{nameref}: Added.}
+% \changes{v0.912}{2023/08/24}{\pkg{nameref}: Allow load before \pkg{lwarp}.}
%
% \codehtml
%
% Discard all options for \pkg{lwarp-nameref}:
% \begin{macrocode}
-\PackageInfo{lwarp}{%
-Using the lwarp HTML version of package `nameref',\MessageBreak
-and discarding options.\MessageBreak
-(Not using \protect\ProvidesPackage, so that other packages\MessageBreak
-do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
-}
-\DeclareOption*{}
-\ProcessOptions\relax
+\LWR@ProvidesPackageDrop{nameref}[2023-08-07]
% \end{macrocode}
% \iffalse
@@ -85626,11 +85692,13 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
%
% For the lower part, the upper part is finished then the lower is started.
-% \cs{tcblower} is only temporarily defined where appropriate, so the \HTML\ version is
-% defined globally via \cs{newcommand} instead of \cs{renewcommand}.
+%
+% \cs{tcblower} is \cs{let} to \cs{tcb@error@nolower} globally,
+% which gives an error in print mode, but is redefined here for \HTML.
+% \changes{v0.912}{2023/08/27}{\pkg{tcolorbox}: Updated to v6.0.4}
% \begin{macrocode}
-\newcommand{\tcblower}{
- \tcb@insert@after@upper%
+\newcommand{\LWR@HTML@tcb@error@nolower}{%
+ \tcb@insert@after@upper%
\end{BlockClass}
\begin{BlockClass}[%
border-top: 1px dashed \LWR@origpound\LWR@tcbcolframe ;
@@ -85638,6 +85706,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
]{tcolorboxlower}
\tcb@insert@before@lower%
}
+\LWR@formatted{tcb@error@nolower}
% \end{macrocode}
%
% Starred and unstarred \cs{tcbline} are simple \cs{hrule}s.
@@ -93594,40 +93663,35 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% Insert the \pkg{lwarp} label mechanism into the \pkg{memoir} package mechanism:
%
% \begin{itemize}
-% \item \cs{@mem@old@label} is the \LaTeX\ definition of \cs{label}.
-% \item \cs{LWR@orig@label} becomes the \pkg{memoir} definition.
+% \item \cs{LWR@orig@label} is the kernel version,
+% or \pkg{nameref} version if loaded before \pkg{lwarp}.
% \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} 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 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}.
+% \item \pkg{memoir} uses the final \cs{label} for subcaptions.
% \end{itemize}
-% \changes{v0.84}{2020/04/05}{\pkg{lwarp-patch-memoir}: Fix: \cs{label}.}
-% \begin{macrocode}
-\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.
% This is the non-\pkg{hyperref} version from \pkg{memoir}.
+% \changes{v0.912}{2023/08/27}{\pkg{memoir}: Fixed for new \LaTeX\ labels.}
% \begin{macrocode}
\AtBeginDocument{
\renewcommand*{\sf@@memsub@label}[1]{%
\@bsphack
- \sf@@memsub@label@hook{#1}%
-% \@memoldlabel{#1}%
- \cref@label{#1}% lwarp
+% \@mem@kernel@label{#1}%
+ \cref@label{#1}% lwarp
\LWR@label@createtag{sub@#1}% lwarp
\protected@write\@auxout{}{%
\string\newlabel{sub@#1}%
- {{\@nameuse{@@thesub\@captype}}%
- {\thepage}}}%
+ {%
+ {\@nameuse{@@thesub\@captype}}%
+ {\thepage}%
+ {\detokenize\expandafter{\@currentlabelname}}% name
+ {#1}% Href
+ {}% reserved
+ }%
+ }%
\LWR@write@lwarplabel{sub@#1}% lwarp
\@esphack
}
@@ -94884,15 +94948,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\LetLtxMacro\titleref\nameref
\renewcommand*{\headnameref}{}
\renewcommand*{\tocnameref}{}
+% \end{macrocode}
-\providecounter{LWR@currenttitle}
-
-\renewcommand*{\currenttitle}{%
- \addtocounter{LWR@currenttitle}{1}%
- \label{currenttitle\arabic{LWR@currenttitle}}%
- \nameref{currenttitle\arabic{LWR@currenttitle}}%
-}
-
+% \changes{v0.912}{2023/08/24}{\pkg{memoir}: Updated to v3.8.1}
+% \cs{currenttitle} has been removed from \pkg{memoir}.
+% \begin{macrocode}
\renewcommand*{\theTitleReference}[2]{}
\renewcommand*{\namerefon}{}
\renewcommand*{\namerefoff}{}
diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf
index be875b28e7..550c9096d7 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 7275b345e7..1d47893217 100755
--- a/macros/latex/contrib/lwarp/lwarpmk.lua
+++ b/macros/latex/contrib/lwarp/lwarpmk.lua
@@ -1,8 +1,8 @@
#!/usr/bin/env texlua
--- Copyright 2016-2022 Brian Dunn
+-- Copyright 2016-2023 Brian Dunn
-printversion = "v0.911"
+printversion = "v0.912"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()