texlive[68097] trunk: lwarp (28aug23)

commits+karl at tug.org commits+karl at tug.org
Mon Aug 28 22:05:10 CEST 2023


Revision: 68097
          http://tug.org/svn/texlive?view=revision&revision=68097
Author:   karl
Date:     2023-08-28 22:05:10 +0200 (Mon, 28 Aug 2023)
Log Message:
-----------
lwarp (28aug23)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
    trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
    trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
    trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
    trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nameref.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty

Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2023-08-28 20:05:10 UTC (rev 68097)
@@ -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 ()

Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2023-08-28 20:05:10 UTC (rev 68097)
@@ -1,5 +1,5 @@
 
-LaTeX lwarp package v0.911  README.txt
+LaTeX lwarp package v0.912  README.txt
 
 Files included are:
 

Modified: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2023-08-28 20:05:10 UTC (rev 68097)
@@ -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 ()

Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2023-08-28 20:05:10 UTC (rev 68097)
@@ -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 @@
 % \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 @@
 % 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 @@
 \LWR at loadafter{musicography}
 \LWR at loadafter{mwe}
 \LWR at loadafter{nameauth}
-\LWR at loadafter{nameref}
 \LWR at loadafter{natbib}
 \LWR at notmemoirloadafter{nccfancyhdr}
 \LWR at loadafter{nccfoots}
@@ -14569,6 +14576,18 @@
 % \end{macro}
 %
 %
+% \begin{macro}{\LWR at 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 at 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 @@
 \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 @@
 %
 % \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 at htmlspanclass}{o D(){} m +m}{%
-    \LWR at traceinfo{LWR at htmlspanclass |#1|#2|#3|}%
+    \LWR at traceinfo{LWR at htmlspanclass #3}%
     \LWR at ensuredoingapar%
     \ifblank{#2}%
         {\LWR at subhtmlelementclass{span}[#1]{#3}}%
@@ -23697,8 +23717,8 @@
     \begin{LWR at nestspan}%
     #4%
     \LWR at htmltagc{/span}%
+    \end{LWR at nestspan}%
     \LWR at traceinfo{LWR at htmlspanclass done}%
-    \end{LWR at nestspan}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -23805,10 +23825,11 @@
 % \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 at subhtmlelementclass}{m O{} D(){} m}{%
-    \LWR at traceinfo{LWR at subhtmlelementclass !#1!#2!#3!#4!}%
+    \LWR at traceinfo{LWR at subhtmlelementclass !#1!#4!}%
     \ifblank{#2}%
     {% empty style
         \LWR at htmltag{%
@@ -24314,7 +24335,8 @@
 %    \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 @@
 }\LWR at orignewline
 %    \end{macrocode}
 %
-% IE patch:
-% \changes{v0.63}{2018/11/30}{Fix: Break ligature for \pkg{luatexko}.}
-%    \begin{macrocode}
-\LWR at htmltag{!-\/-[if lt IE 9]}\LWR at orignewline
-\LWR at htmltag{%
-    script % space
-    src=\LWR at orig@textquotedbl{}%
-        http://html5shiv.googlecode.com/svn/trunk/html5.js%
-    \LWR at orig@textquotedbl%
-}%
-\LWR at htmltag{/script}\LWR at orignewline
-\LWR at htmltag{![endif]-\/-}\LWR at 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 @@
 
 
 % \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,18 +32096,19 @@
     \LWR at 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 at intabularmetadata}%
-    {%
+    \ifboolexpr{
+        bool{LWR at intabularmetadata}
+        and not bool{LWR at exitingtabular}
+        and not bool {LWR at in@multirow at par}
+    }%
+    {% making a tabular data cell
 %    \end{macrocode}
 %
-% If have found the end of tabular command, do not create the next data cell:
-%    \begin{macrocode}
-        \ifbool{LWR at exitingtabular}{}%
-        {% not exiting tabular
-%    \end{macrocode}
-%
 % Print the |@| and |!| contents before first column:
 %    \begin{macrocode}
             \LWR at tabularleftedge%
@@ -32197,8 +32209,8 @@
                 \LWR at getexparray{LWR at colbeforespec}{\arabic{LWR at tableLaTeXcolindex}}%
             }%
             \boolfalse{LWR at intabularmetadata}%
-        }% not exiting tabular
-    }{}% in tabular metadata
+    }% making a tabular data cell
+    {}% not making a tabular data cell
     \LWR at traceinfo{LWR at tabledatasinglecolumntag: done}%
 }%
 %    \end{macrocode}
@@ -34525,9 +34537,9 @@
 %	\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}
@@ -34534,10 +34546,10 @@
 % \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 at 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 at nameref}:] The section or object name for this label.
@@ -34561,9 +34573,9 @@
 %	\begin{description}
 %	\item [\cs{refstepcounter:}] Added: sets \cs{cref at currentlabel}.
 %	\item [\cs{cref at 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 at 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 at currentlabel}{\thepage}}|
@@ -34879,10 +34891,9 @@
 % the special label handling is required, but \cs{LWR at label@createtag} does not
 % generate \HTML\ tags inside a \env{lateximage}.
 %
-% If \pkg{memoir} is used, it's \cs{@mem at 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,9 +35067,10 @@
         {\LWR at subnewref{#2}{#2}}%
 }
 
+\AtBeginDocument{% **8*
 \LWR at formatted{ref}
+}
 
-
 \NewDocumentCommand{\LWR at HTML@Ref}{s m}{%
     \LWR at traceinfo{LWR at HTML@Ref !#2!}%
     \IfBooleanTF{#1}%
@@ -35066,17 +35078,20 @@
         {\LWR at subnewref{#2}{#2}}%
 }
 
+\AtBeginDocument{% **8*
 \LWR at formatted{Ref}
+}
 %    \end{macrocode}
 %
 %
 % \begin{macro}{\LWR at 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 at refwithsection}{s m}{%
     \LWR at traceinfo{LWR at refwithsection !#2!}%
@@ -35086,12 +35101,26 @@
 %    \begin{macrocode}
     \IfBooleanTF{#1}%
         {\LWR at print@ref{\BaseJobname-autopage-\LWR at 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 at startref{\BaseJobname-autopage-1}%
+                    *%
+                    \LWR at htmltag{/a}%
+                }%
+                {% not Doc-Start
+%    \end{macrocode}
+%
 % Open the reference:
 %    \begin{macrocode}
-            \LWR at startref{#2}%
+                    \LWR at startref{#2}%
 %    \end{macrocode}
 %
 % Add the text of the link.
@@ -35098,50 +35127,45 @@
 %
 % Check for and handle an undefined reference:
 %    \begin{macrocode}
-            \edef\@tempa{\LWR at currentautosecpageref{#2}}%
-            \ifdefstring{\@tempa}{??}%
-                {??}%
+                    \edef\@tempa{\LWR at 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 at currentautosecpageref{#2}%
-                        \endcsname%
-                    }%
+                            \edef\@tempa{\csexpandonce{r@\BaseJobname-autopage-\@tempa}}%
+                            \expandafter\LWR at 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 at print@ref{%
-                                \BaseJobname-autopage-\LWR at currentautosecpageref{#2}%
-                            }%
-                        }%
-                }%
+                                {%
+                                    \LWR at print@ref{%
+                                        \BaseJobname-autopage-\LWR at currentautosecpageref{#2}%
+                                    }%
+                                }%
+                        }% not ??
 %    \end{macrocode}
 %
 % Close the reference:
 %    \begin{macrocode}
-            \LWR at htmltag{/a}%
-        }%
+                \LWR at htmltag{/a}%
+            }% not Doc-Start
+        }% not starred
 }
 %    \end{macrocode}
 % \end{macro}
@@ -35186,8 +35210,14 @@
 % \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 at traceinfo{nameref}%
     \LWR at startref{#1}%
     \LWR at traceinfo{nameref B}%
@@ -35203,6 +35233,8 @@
 
 % \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 @@
 \newcommand*{\LWR at indexnameref@ref}[1]{%
     \edef\LWR at thisref{\csuse{r at LWRindex-#1}}%
     \ifdefvoid{\LWR at thisref}{}{%
-        \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+        \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
         \ifdefvoid{\LWR at thisref}%
             {\LWR at indexnameref@anonref{#1}}%
             {\ref{LWRindex-#1}}%
@@ -36958,11 +36990,12 @@
 % 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 at indexnameref@refnameref}[1]{%
     \edef\LWR at thisref{\csuse{r at LWRindex-#1}}%
     \ifdefvoid{\LWR at thisref}{}{%
-        \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+        \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
         \ifdefvoid{\LWR at thisref}{}{%
             \ifdefstring{\LWR at thisref}{(*)}%
                 {}%
@@ -36981,6 +37014,7 @@
 % If no numbered reference is available, a \cs{nameref} is used instead.
 % If the reference is |??|, which will be changed by \cs{LWR at 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 at indexnameref@cref}[1]{%
     \edef\LWR at thisref{\csuse{r at LWRindex-#1}}%
@@ -36987,7 +37021,7 @@
     \ifdefvoid{\LWR at thisref}{%
         \nameref{LWRindex-#1}%
     }{%
-        \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+        \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
         \ifdefvoid{\LWR at thisref}{%
             \nameref{LWRindex-#1}%
         }{%
@@ -37009,6 +37043,7 @@
 % If no numbered reference is available, a \cs{nameref} is used instead.
 % If the reference is |??|, which will be changed by \cs{LWR at 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 at indexnameref@crefnameref}[1]{%
     \edef\LWR at thisref{\csuse{r at LWRindex-#1}}%
@@ -37015,7 +37050,7 @@
     \ifdefvoid{\LWR at thisref}%
         {}%
         {%
-            \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+            \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
             \ifdefvoid{\LWR at thisref}%
                 {}%
                 {%
@@ -37336,7 +37371,7 @@
 % 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 @@
             \LetLtxMacro\@footnotetext\LWR at footnotetext%
         }%
 %    \end{macrocode}
-% Create the |LWRlateximage<number>| label:
+% Create the |LWRlateximage-jobname-<number>| label:
 %    \begin{macrocode}
-    \LWR at traceinfo{lateximage: about to create label}%
+    \LWR at traceinfo{lateximage: about to create label 
+                        LWRlateximage-\BaseJobname-\arabic{LWR at lateximagenumber}}%
     \LWR at orig@label{LWRlateximage-\BaseJobname-\arabic{LWR at lateximagenumber}}%
     \LWR at traceinfo{lateximage: finished creating the label}%
 %    \end{macrocode}
@@ -40460,6 +40496,15 @@
 %    \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 at 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 @@
 % print or \HTML\ output, and thus do not use the \cs{LWR at formatted} system.
 %
 % \codehtml
+%
+% \changes{v0.912}{2023/08/24}{\pkg{nameref}: Allow load before \pkg{lwarp}.}
 %    \begin{macrocode}
 \begin{warpHTML}
 
-\LetLtxMacro\LWR at orig@label\label% includes memoir, before cleveref
+\LetLtxMacro\LWR at orig@label\label
 \LetLtxMacro\label\LWR at new@label
 
-\LetLtxMacro\LWR at orig@pageref\pageref
-\LetLtxMacro\pageref\LWR at new@pageref
+\AtBeginDocument{%
+\LetLtxMacro\LWR at orig@pageref\pageref%
+\LetLtxMacro\pageref\LWR at 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 at 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 @@
 % \cs{LWR at 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 at fboxstyle}{%
 \LWR at findcurrenttextcolor%
-\LWR at traceinfo{LWR at fboxstyle B}%
 border:\LWR at printlength{\LWR at atleastonept} solid \LWR at origpound\LWR at tempcolor ; %
 padding:\LWR at printlength{\fboxsep} ; %
 color:\LWR at origpound\LWR at tempcolor%
@@ -41610,6 +41681,7 @@
     \LWR at 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 @@
 % \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 at ProvidesPackageDrop{nameref}[2023-08-07]
 %    \end{macrocode}
 
 % \iffalse
@@ -85626,11 +85692,13 @@
 %    \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 at 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 at insert@after at upper%
+\newcommand{\LWR at HTML@tcb at error@nolower}{%
+   \tcb at insert@after at upper%
     \end{BlockClass}
     \begin{BlockClass}[%
         border-top: 1px dashed \LWR at origpound\LWR at tcbcolframe ;
@@ -85638,6 +85706,7 @@
     ]{tcolorboxlower}
     \tcb at insert@before at lower%
 }
+\LWR at formatted{tcb at error@nolower}
 %    \end{macrocode}
 %
 % Starred and unstarred \cs{tcbline} are simple \cs{hrule}s.
@@ -93594,40 +93663,35 @@
 % Insert the \pkg{lwarp} label mechanism into the \pkg{memoir} package mechanism:
 %
 % \begin{itemize}
-% \item \cs{@mem at old@label} is the \LaTeX\ definition of \cs{label}.
-% \item \cs{LWR at orig@label} becomes the \pkg{memoir} definition.
+% \item \cs{LWR at orig@label} is the kernel version,
+%               or \pkg{nameref} version if loaded before \pkg{lwarp}.
 % \item \pkg{lwarp}'s \cs{LWR at new@label} uses \cs{LWR at 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 at old@label} is set to \cs{LWR at new@label}.
-%       \item \cs{LWR at orig@label} is set to \cs{@mem at old@label}.
-%   \end{itemize}
 % \item \pkg{cleveref} then encapsulates all the above with \cs{cref at old@label}.
 % \item For a subcaption, \pkg{cleveref} modifies \pkg{memoir}'s \cs{sf at 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 at orig@label\@mem at old@label
-\LetLtxMacro\@mem at old@label\LWR at 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 at label}[1]{%
         \@bsphack
-        \sf@@memsub at label@hook{#1}%
-%         \@memoldlabel{#1}%
-        \cref at label{#1}%                    lwarp
+%         \@mem at kernel@label{#1}%
+        \cref at label{#1}%                        lwarp
         \LWR at label@createtag{sub@#1}%           lwarp
         \protected at write\@auxout{}{%
             \string\newlabel{sub@#1}%
-            {{\@nameuse{@@thesub\@captype}}%
-            {\thepage}}}%
+            {%
+                {\@nameuse{@@thesub\@captype}}%
+                {\thepage}%
+                {\detokenize\expandafter{\@currentlabelname}}% name
+                {#1}% Href
+                {}% reserved
+            }%
+        }%
         \LWR at write@lwarplabel{sub@#1}%          lwarp
         \@esphack
     }
@@ -94884,15 +94948,11 @@
 \LetLtxMacro\titleref\nameref
 \renewcommand*{\headnameref}{}
 \renewcommand*{\tocnameref}{}
+%    \end{macrocode}
 
-\providecounter{LWR at currenttitle}
-
-\renewcommand*{\currenttitle}{%
-    \addtocounter{LWR at currenttitle}{1}%
-    \label{currenttitle\arabic{LWR at currenttitle}}%
-    \nameref{currenttitle\arabic{LWR at 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}{}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nameref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nameref.sty	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nameref.sty	2023-08-28 20:05:10 UTC (rev 68097)
@@ -17,14 +17,7 @@
 %% version 2005/12/01 or later.
 
 
-\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 at ProvidesPackageDrop{nameref}[2023-08-07]
 
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty	2023-08-28 20:05:10 UTC (rev 68097)
@@ -48,18 +48,21 @@
 \RequirePackage{lwarp-titling}% req'd
 \RequirePackage{lwarp-tocloft}% req'd
 \RequirePackage{lwarp-verse}% req'd
-\LetLtxMacro\LWR at orig@label\@mem at old@label
-\LetLtxMacro\@mem at old@label\LWR at new@label
 \AtBeginDocument{
     \renewcommand*{\sf@@memsub at label}[1]{%
         \@bsphack
-        \sf@@memsub at label@hook{#1}%
-        \cref at label{#1}%                    lwarp
+        \cref at label{#1}%                        lwarp
         \LWR at label@createtag{sub@#1}%           lwarp
         \protected at write\@auxout{}{%
             \string\newlabel{sub@#1}%
-            {{\@nameuse{@@thesub\@captype}}%
-            {\thepage}}}%
+            {%
+                {\@nameuse{@@thesub\@captype}}%
+                {\thepage}%
+                {\detokenize\expandafter{\@currentlabelname}}% name
+                {#1}% Href
+                {}% reserved
+            }%
+        }%
         \LWR at write@lwarplabel{sub@#1}%          lwarp
         \@esphack
     }
@@ -962,14 +965,6 @@
 \renewcommand*{\headnameref}{}
 \renewcommand*{\tocnameref}{}
 
-\providecounter{LWR at currenttitle}
-
-\renewcommand*{\currenttitle}{%
-    \addtocounter{LWR at currenttitle}{1}%
-    \label{currenttitle\arabic{LWR at currenttitle}}%
-    \nameref{currenttitle\arabic{LWR at currenttitle}}%
-}
-
 \renewcommand*{\theTitleReference}[2]{}
 \renewcommand*{\namerefon}{}
 \renewcommand*{\namerefoff}{}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tcolorbox.sty	2023-08-28 20:05:10 UTC (rev 68097)
@@ -123,8 +123,8 @@
         \end{BlockClass}
         \LWR at tcolorbox@doendfloat%
     }
-\newcommand{\tcblower}{
-    \tcb at insert@after at upper%
+\newcommand{\LWR at HTML@tcb at error@nolower}{%
+   \tcb at insert@after at upper%
     \end{BlockClass}
     \begin{BlockClass}[%
         border-top: 1px dashed \LWR at origpound\LWR at tcbcolframe ;
@@ -132,6 +132,7 @@
     ]{tcolorboxlower}
     \tcb at insert@before at lower%
 }
+\LWR at formatted{tcb at error@nolower}
 \AtBeginDocument{
 \ifdef{\tcbline}{
     \newcommand*{\LWR at sub@tcbline}{%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2023-08-28 20:04:47 UTC (rev 68096)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2023-08-28 20:05:10 UTC (rev 68097)
@@ -6,7 +6,7 @@
 %%
 %% lwarp.dtx  (with options: `package')
 %% This is a generated file.
-%% Copyright 2016-2018 Brian Dunn
+%% Copyright 2016-2022 Brian Dunn
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
 %% version 2005/12/01 or later.
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{lwarp}
-    [2023/02/28 v0.911  Allows LaTeX to directly produce HTML5 output.]
+    [2023/08/28 v0.912  Allows LaTeX to directly produce HTML5 output.]
 
 
 
@@ -575,7 +575,6 @@
 \LWR at loadafter{musicography}
 \LWR at loadafter{mwe}
 \LWR at loadafter{nameauth}
-\LWR at loadafter{nameref}
 \LWR at loadafter{natbib}
 \LWR at notmemoirloadafter{nccfancyhdr}
 \LWR at loadafter{nccfoots}
@@ -974,6 +973,10 @@
 \long\def\LWR at thirdoffive#1#2#3#4#5{#3}
 \long\def\LWR at fourthoffive#1#2#3#4#5{#4}
 \long\def\LWR at fifthoffive#1#2#3#4#5{#5}
+\long\def\LWR at edeffirstoffive#1#2#3#4#5{%
+    \edef\@tempa{#1}%
+}%
+
 \newcounter{LWR at texboxdepth}
 \setcounter{LWR at texboxdepth}{0}
 \newcommand*{\LWR at maybe@orignewpage}{%
@@ -4865,9 +4868,9 @@
 \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 ()
@@ -6515,7 +6518,7 @@
 }
 
 \NewDocumentCommand{\LWR at htmlspanclass}{o D(){} m +m}{%
-    \LWR at traceinfo{LWR at htmlspanclass |#1|#2|#3|}%
+    \LWR at traceinfo{LWR at htmlspanclass #3}%
     \LWR at ensuredoingapar%
     \ifblank{#2}%
         {\LWR at subhtmlelementclass{span}[#1]{#3}}%
@@ -6523,8 +6526,8 @@
     \begin{LWR at nestspan}%
     #4%
     \LWR at htmltagc{/span}%
+    \end{LWR at nestspan}%
     \LWR at traceinfo{LWR at htmlspanclass done}%
-    \end{LWR at nestspan}%
 }
 
 
@@ -6572,7 +6575,7 @@
 
 
 \NewDocumentCommand{\LWR at subhtmlelementclass}{m O{} D(){} m}{%
-    \LWR at traceinfo{LWR at subhtmlelementclass !#1!#2!#3!#4!}%
+    \LWR at traceinfo{LWR at subhtmlelementclass !#1!#4!}%
     \ifblank{#2}%
     {% empty style
         \LWR at htmltag{%
@@ -8134,15 +8137,6 @@
     name=\LWR at orig@textquotedbl{}viewport\LWR at orig@textquotedbl\ % space
     content=\LWR at orig@textquotedbl{}width=device-width, initial-scale=1.0\LWR at orig@textquotedbl\ /%
 }\LWR at orignewline
-\LWR at htmltag{!-\/-[if lt IE 9]}\LWR at orignewline
-\LWR at htmltag{%
-    script % space
-    src=\LWR at orig@textquotedbl{}%
-        http://html5shiv.googlecode.com/svn/trunk/html5.js%
-    \LWR at orig@textquotedbl%
-}%
-\LWR at htmltag{/script}\LWR at orignewline
-\LWR at htmltag{![endif]-\/-}\LWR at orignewline
 \ifthenelse{\equal{\theHTMLTitle}{}}%
     {}%
     {%
@@ -9772,10 +9766,12 @@
 {%
     \LWR at traceinfo{LWR at tabledatasinglecolumntag}%
     \LWR at maybenewtablerow%
-    \ifbool{LWR at intabularmetadata}%
-    {%
-        \ifbool{LWR at exitingtabular}{}%
-        {% not exiting tabular
+    \ifboolexpr{
+        bool{LWR at intabularmetadata}
+        and not bool{LWR at exitingtabular}
+        and not bool {LWR at in@multirow at par}
+    }%
+    {% making a tabular data cell
             \LWR at tabularleftedge%
             \xdef\LWR at strresult{%
                 \LWR at getexparray{LWR at tablecolspec}{\arabic{LWR at tableLaTeXcolindex}}%
@@ -9821,8 +9817,8 @@
                 \LWR at getexparray{LWR at colbeforespec}{\arabic{LWR at tableLaTeXcolindex}}%
             }%
             \boolfalse{LWR at intabularmetadata}%
-        }% not exiting tabular
-    }{}% in tabular metadata
+    }% making a tabular data cell
+    {}% not making a tabular data cell
     \LWR at traceinfo{LWR at tabledatasinglecolumntag: done}%
 }%
 
@@ -11035,7 +11031,9 @@
         {\LWR at subnewref{#2}{#2}}%
 }
 
+\AtBeginDocument{% **8*
 \LWR at formatted{ref}
+}
 
 \NewDocumentCommand{\LWR at HTML@Ref}{s m}{%
     \LWR at traceinfo{LWR at HTML@Ref !#2!}%
@@ -11044,33 +11042,39 @@
         {\LWR at subnewref{#2}{#2}}%
 }
 
+\AtBeginDocument{% **8*
 \LWR at formatted{Ref}
+}
 \NewDocumentCommand{\LWR at refwithsection}{s m}{%
     \LWR at traceinfo{LWR at refwithsection !#2!}%
     \IfBooleanTF{#1}%
         {\LWR at print@ref{\BaseJobname-autopage-\LWR at currentautosecpageref{#2}}}%
-        {%
-            \LWR at startref{#2}%
-            \edef\@tempa{\LWR at currentautosecpageref{#2}}%
-            \ifdefstring{\@tempa}{??}%
-                {??}%
+        {% not starred
+            \ifstrequal{#2}{Doc-Start}%
                 {%
-                    \edef\@tempa{%
-                        \csname
-                            r@\BaseJobname-autopage-\LWR at currentautosecpageref{#2}%
-                        \endcsname%
-                    }%
-                    \edef\@tempa{\expandafter\@firstoftwo\@tempa}%
-                    \expandafter\ifblank\expandafter{\@tempa}%
-                        {*}
-                        {%
-                            \LWR at print@ref{%
-                                \BaseJobname-autopage-\LWR at currentautosecpageref{#2}%
-                            }%
-                        }%
+                    \LWR at startref{\BaseJobname-autopage-1}%
+                    *%
+                    \LWR at htmltag{/a}%
                 }%
-            \LWR at htmltag{/a}%
-        }%
+                {% not Doc-Start
+                    \LWR at startref{#2}%
+                    \edef\@tempa{\LWR at currentautosecpageref{#2}}%
+                    \ifdefstring{\@tempa}{??}%
+                        {??}%
+                        {% not ??
+                            \edef\@tempa{\csexpandonce{r@\BaseJobname-autopage-\@tempa}}%
+                            \expandafter\LWR at edeffirstoffive\@tempa%
+                            \expandafter\ifblank\expandafter{\@tempa}%
+                                {*}
+                                {%
+                                    \LWR at print@ref{%
+                                        \BaseJobname-autopage-\LWR at currentautosecpageref{#2}%
+                                    }%
+                                }%
+                        }% not ??
+                \LWR at htmltag{/a}%
+            }% not Doc-Start
+        }% not starred
 }
 \CustomizeMathJax{\let\LWRref\ref}
 \CustomizeMathJax{\renewcommand{\ref}{\ifstar\LWRref\LWRref}}
@@ -11081,7 +11085,9 @@
         {(\cpageref{#2})}%
 }
 
-\newrobustcmd*{\nameref}[1]{%
+\providecommand{\nameref}[1]{}%
+
+\renewrobustcmd*{\nameref}[1]{%
     \LWR at traceinfo{nameref}%
     \LWR at startref{#1}%
     \LWR at traceinfo{nameref B}%
@@ -11829,7 +11835,7 @@
 \newcommand*{\LWR at indexnameref@ref}[1]{%
     \edef\LWR at thisref{\csuse{r at LWRindex-#1}}%
     \ifdefvoid{\LWR at thisref}{}{%
-        \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+        \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
         \ifdefvoid{\LWR at thisref}%
             {\LWR at indexnameref@anonref{#1}}%
             {\ref{LWRindex-#1}}%
@@ -11839,7 +11845,7 @@
 \newcommand*{\LWR at indexnameref@refnameref}[1]{%
     \edef\LWR at thisref{\csuse{r at LWRindex-#1}}%
     \ifdefvoid{\LWR at thisref}{}{%
-        \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+        \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
         \ifdefvoid{\LWR at thisref}{}{%
             \ifdefstring{\LWR at thisref}{(*)}%
                 {}%
@@ -11854,7 +11860,7 @@
     \ifdefvoid{\LWR at thisref}{%
         \nameref{LWRindex-#1}%
     }{%
-        \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+        \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
         \ifdefvoid{\LWR at thisref}{%
             \nameref{LWRindex-#1}%
         }{%
@@ -11872,7 +11878,7 @@
     \ifdefvoid{\LWR at thisref}%
         {}%
         {%
-            \edef\LWR at thisref{\expandafter\@firstoftwo\LWR at thisref}%
+            \edef\LWR at thisref{\expandafter\@firstoffive\LWR at thisref}%
             \ifdefvoid{\LWR at thisref}%
                 {}%
                 {%
@@ -13190,7 +13196,8 @@
             \def\thempfn{\thefootnote}%
             \LetLtxMacro\@footnotetext\LWR at footnotetext%
         }%
-    \LWR at traceinfo{lateximage: about to create label}%
+    \LWR at traceinfo{lateximage: about to create label
+                        LWRlateximage-\BaseJobname-\arabic{LWR at lateximagenumber}}%
     \LWR at orig@label{LWRlateximage-\BaseJobname-\arabic{LWR at lateximagenumber}}%
     \LWR at traceinfo{lateximage: finished creating the label}%
     \ifdefvoid{\LWR at ruleHTMLcolor}{}{%
@@ -13334,6 +13341,8 @@
         {}%
 }
 
+\LWR at PreloadedPackage{nameref}
+
 \LWR at PreloadedPackage{inputtrc}
 
 \LWR at PreloadedPackage{textcomp}
@@ -13539,12 +13548,30 @@
 \end{warpHTML}
 \begin{warpHTML}
 
-\LetLtxMacro\LWR at orig@label\label% includes memoir, before cleveref
+\LetLtxMacro\LWR at orig@label\label
 \LetLtxMacro\label\LWR at new@label
 
-\LetLtxMacro\LWR at orig@pageref\pageref
-\LetLtxMacro\pageref\LWR at new@pageref
+\AtBeginDocument{%
+\LetLtxMacro\LWR at orig@pageref\pageref%
+\LetLtxMacro\pageref\LWR at new@pageref%
+}
 
+\xpatchcmd{\LWR at 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}
 
 
@@ -13781,7 +13808,6 @@
 
 \newcommand*{\LWR at fboxstyle}{%
 \LWR at findcurrenttextcolor%
-\LWR at traceinfo{LWR at fboxstyle B}%
 border:\LWR at printlength{\LWR at atleastonept} solid \LWR at origpound\LWR at tempcolor ; %
 padding:\LWR at printlength{\fboxsep} ; %
 color:\LWR at origpound\LWR at tempcolor%



More information about the tex-live-commits mailing list.