summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lwarp/lwarp.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/lwarp/lwarp.dtx')
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx834
1 files changed, 459 insertions, 375 deletions
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index 8945b5d12d..d2ff6b6e28 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> [2022/07/13 v0.908 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2022/11/22 v0.909 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -91,7 +91,7 @@
\usepackage{ifptex}% *8* remove later
-\usepackage[lwarpmk]{lwarp}
+\usepackage[lwarpmk, warpdisable]{lwarp}
\usepackage[erewhon]{newtxmath}
@@ -219,23 +219,25 @@
-\usepackage[pdftex,bookmarks=true,hidelinks,%
-colorlinks,linkcolor=mylinkcolor,urlcolor=myurlcolor,%
-pageanchor=true,hyperindex=true,hyperfootnotes=false%
-]{hyperref}
+\AtBeginDocument{%
\hypersetup{%
+colorlinks,%
+linkcolor=mylinkcolor,%
+urlcolor=myurlcolor,%
+pageanchor=true,%
+hyperfootnotes=false,%
pdfinfo={%
-Title={LaTeX Lwarp package},%
-Author={Brian Dunn},%
-Subject={LaTeX to HTML conversion},%
-Keywords={LaTeX, HTML, conversion}%
+ Title={LaTeX Lwarp package},%
+ Author={Brian Dunn},%
+ Subject={LaTeX to HTML conversion},%
+ Keywords={LaTeX, HTML, conversion}%
}}
+}
-
-
+\AtEndPreamble{
\usepackage{cleveref}
-
+}
\renewcommand{\partname}{Package}
\renewcommand*{\thepart}{\arabic{part}}
@@ -1366,7 +1368,7 @@ Limitations when using \MathJax\ include:
\item Math appearing inside a lateximage,
\margintag{lateximage}
- and therefore also inside a \tikz\ or \env{picture}
+ and therefore also inside a \TikZ\ or \env{picture}
environment, is rendered as \SVG\ math even if \MathJax
is used in the rest of the document.
@@ -1472,13 +1474,13 @@ as text into \HTML\ for \MathJax\ to interpret,
and \SVG\ display math environments render their contents as \SVG\ images
and use their contents as the \attribute{alt} tag of \HTML\ output.
To do so, the contents are loaded into a macro for reuse.
-In some cases, such as complicated \tikz\ pictures, compilation will fail.
+In some cases, such as complicated \TikZ\ pictures, compilation will fail.
\DescribeMacro{\displaymathother}
When selecting \cs{displaymathother},
it is assumed that the contents are more complicated than ``pure''
math.
-An example is an elaborate \tikz\ picture,
+An example is an elaborate \TikZ\ picture,
\margintag{\MathJax\ unsupported}
which will not render in \MathJax\ and
will not make sense as an \HTML\ \attribute{alt} tag.
@@ -1487,7 +1489,7 @@ In this mode, \MathJax\ is turned off,
math display environments become \SVG\ images, even if \MathJax\ is selected,
and the \HTML\ \attribute{alt} tags become simple messages.
The contents are internally processed as an environment instead of a macro argument,
-so complicated objects such as \tikz\ pictures are more likely to compile successfully.
+so complicated objects such as \TikZ\ pictures are more likely to compile successfully.
}
@@ -1931,7 +1933,7 @@ Avoid using the \cs{includegraphics} \optn{scale} option. Change:
}
\newcommand{\limitssvgimages}{%
-When a math expression, \env{picture}, or \tikz\ environment is added or
+When a math expression, \env{picture}, or \TikZ\ environment is added or
\trouble[adding/removing]{SVG image>out of order}
\trouble{graphics>incorrect>added or removed}
\trouble{image>incorrect>added or removed}
@@ -1939,7 +1941,7 @@ When a math expression, \env{picture}, or \tikz\ environment is added or
removed, the \SVG\ images must be re-created by entering \cmds{lwarpmk limages}
to maintain the proper image-file associations.
Inline \SVG\ math may be hashed and thus not need to be recreated, but
-display math and objects such as \tikz\ may move to new image numbers when
+display math and objects such as \TikZ\ may move to new image numbers when
the document is changed.
Before attempting to create the \SVG\ image files,
@@ -1979,7 +1981,7 @@ an individual file for each math expression.
For inline math, and some other objects, \pkg{lwarp} uses an MD5 hash
on its \LaTeX\ source to combine multiple instances of identical inline expressions
into a single image file,
-but display math and other environments such as \env{picture} and \tikz\ require
+but display math and other environments such as \env{picture} and \TikZ\ require
one image file each.
For a document with a large amount of math,
see \cref{sec:tutorialmathjax} to use \MathJax\ instead.
@@ -3280,7 +3282,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{55578}
+% \CheckSum{55554}
%
% \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
@@ -3433,6 +3435,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.906}{2022/06/23}{\ 2022/06/23}
% \changes{v0.907}{2022/07/11}{\ 2022/07/11}
% \changes{v0.908}{2022/07/13}{\ 2022/07/13}
+% \changes{v0.909}{2022/11/22}{\ 2022/11/22}
@@ -3666,6 +3669,16 @@ 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.909:] \cs{ref} fix.
+% \begin{itemize}
+% \item Fixed \cs{ref*}, \pkg{beamerarticle}, \pkg{lyluatex}, \pkg{realscripts}.
+% \item Updated \pkg{mismath}, \pkg{nicematrix}, \pkg{pablance},
+% \pkg{pdfpages}, \pkg{simplebnf}, \pkg{tagpdf}.
+% \item The \pkg{lwarp} documentation index is not yet fully updated to the
+% latest \pkg{doc} package changes. Index categories and some
+% hyperlinks are not yet working.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.908:] Bug fix.
% \begin{itemize}
% \item Fixed obscure cross-reference issue, seen in some citations.
@@ -5011,14 +5024,14 @@ This boolean may be tested by the user for later use.
% ^^A Each image file is only converted to \SVG\ a single time, and reused if it
% ^^A already exists.
% ^^A Display math and other forms of \SVG\ image such as \env{picture} and
-% ^^A \tikz\ still use individual image files which are recreated each time
+% ^^A \TikZ\ still use individual image files which are recreated each time
% ^^A \cmds{lwarpmk limages} is run.
% ^^A \item Fixes: \SVG\ math and/or \cs{underline} in a sectioning file name.
% ^^A \item Improved \SVG\ display math and tags.
% ^^A \item Improved \SVG\ math and \pkg{siunitx} \attribute{alt} tags.
% ^^A \item Improved \pkg{siunitx} units.
% ^^A \item Fix: \cs{ensuremath} with \MathJax\ now creates a \env{lateximage}.
-% ^^A \item Fix: \cs{centering}, etc. in \SVG\ math, \env{lateximage}, \tikz.
+% ^^A \item Fix: \cs{centering}, etc. in \SVG\ math, \env{lateximage}, \TikZ.
% ^^A \item Fix: Made various macros robust,
% ^^A additionally fixing \pkg{authblk}.\margintag{misc. fixes}
% ^^A \item Fix: \pkg{ntheorem} if neither \optn{standard} nor \optn{amsthm} selected.
@@ -5057,7 +5070,7 @@ This boolean may be tested by the user for later use.
% ^^A multiline contents.
% ^^A \item \env{abstract} now allows an optional name, as required by some classes.
% ^^A \item Fix: Improved spacing, \cs{mbox}, and font sizes
-% ^^A with \SVG\ math, \tikz.\margintag{math}
+% ^^A with \SVG\ math, \TikZ.\margintag{math}
% ^^A \item \pkg{siunitx}: Improved \SVG\ math, fraction compatibility, color output.
% ^^A \item Fix: LOF/LOT links.\margintag{misc. fixes}
% ^^A \item Fix: Virtual page size grouping caused excessive \PDF\ page breaks.
@@ -5700,7 +5713,7 @@ This boolean may be tested by the user for later use.
% ^^A \item \pkg{cleveref} is loaded \cs{AtEndPreamble} for improved reliability.
% ^^A See \cref{sec:cleveref}.
% ^^A \item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \HTML.
-% ^^A \item \tikz\ improved catcode handling.
+% ^^A \item \TikZ\ improved catcode handling.
% ^^A \end{itemize}
% ^^A \item[v0.18:] \
% ^^A \begin{itemize}
@@ -5758,7 +5771,7 @@ This boolean may be tested by the user for later use.
% and anything generating plain-text output.
% Blocks of \PDF\ output may be automatically converted to \SVG\ images
% while using the same font and spacing as the original print document,
-% directly supporting \tikz\ and \env{picture}.
+% directly supporting \TikZ\ and \env{picture}.
% Numerous packages are easily adapted for \HTML\ versions, either
% by loading and patching the originals, or by creating nullified or emulated
% replacements, and all without resorting to external programming.
@@ -5786,7 +5799,7 @@ This boolean may be tested by the user for later use.
% Other formats such as \PNG\ and \JPG\ are used as-is.
%
% \SVG\ images may be used for math,
-% and are also used for \env{picture}, \tikz, and similar environments.
+% and are also used for \env{picture}, \TikZ, and similar environments.
% The \SVG\ format has better browser and e-book support
% than \MathML\ (as of this writing),
% while still allowing for high-quality display and printing of images
@@ -7265,8 +7278,8 @@ This boolean may be tested by the user for later use.
% the math is displayed as it was drawn by \LaTeX, and the \LaTeX\ source
% may be copied and pasted into other documents.
%
-% \pkg{lwarp} uses the same mechanism for \env{picture} and \tikz\ environments.
-% \margintag{\env{picture} and \tikz}
+% \pkg{lwarp} uses the same mechanism for \env{picture} and \TikZ\ environments.
+% \margintag{\env{picture} and \TikZ}
%
% \begin{enumerate}
% \item Create the \SVG\ images:
@@ -7668,7 +7681,7 @@ This boolean may be tested by the user for later use.
% \prog{lualatex}, or \prog{xelatex}.
% \item |lwarpmk print| to finish the print version.
% \item |lwarpmk html| to create the \HTML\ version.
-% \item |lwarpmk limages| to create the \SVG\ images of any \SVG\ math, \env{lateximage}, \tikz, etc.
+% \item |lwarpmk limages| to create the \SVG\ images of any \SVG\ math, \env{lateximage}, \TikZ, etc.
% \end{enumerate}
%
% \needhelp
@@ -10828,7 +10841,7 @@ This boolean may be tested by the user for later use.
% \gindex{math>display with complicated objects}
% \gindex{math>dynamic}
% \gindex{dynamic math}
-% \trouble{math>tikz=\tikz}
+% \trouble{math>tikz=\TikZ}
% \trouble{tikz>in math}
% \trouble{mathjax=\MathJax>errors}
% \trouble{HTML>alt tags}
@@ -12175,7 +12188,7 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{Adding a package to the \pkg{lwarp.dtx} file}
%
-% When adding a package to |lwarp.dtx| for permanent inclusing in \pkg{lwarp},
+% When adding a package to |lwarp.dtx| for permanent inclusion in \pkg{lwarp},
% provide the |lwarp-<packagename>| code in |lwarp.dtx|,
% add its entry into |lwarp.ins|, and also remember to add
% \begin{sourcedisplay}
@@ -12606,7 +12619,7 @@ This boolean may be tested by the user for later use.
% the slanted quote |’| character, instead of using
% the upright quote |'| character.
%
-% \item[Complicated objects inside math:] Some objects, such as \tikz,
+% \item[Complicated objects inside math:] Some objects, such as \TikZ,
% \trouble[``impure'' math objects]{math>non-math contents}
% may not compile in \pkg{lwarp}'s normal math emulation.
% Insert
@@ -13984,7 +13997,6 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{quotchap}
\LWR@loadafter{quoting}
\LWR@loadafter{ragged2e}
-\LWR@loadafter{realscripts}
\LWR@loadafter{refcheck}
\LWR@loadafter{register}
\LWR@loadafter{relsize}
@@ -14063,6 +14075,8 @@ This boolean may be tested by the user for later use.
\LWR@notmemoirloadafter{tabularx}
\LWR@loadafter{tabulary}
\LWR@loadafter{tagpdf}
+\LWR@loadafter{tagpdf-mc-code-generic}
+\LWR@loadafter{tagpdf-mc-code-lua}
\LWR@loadafter{tascmac}
\LWR@loadafter{tcolorbox}
\LWR@loadafter{tensor}
@@ -14727,6 +14741,7 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\catcode`\$=12
\def\LWRdollar{$}
+\def\LWRdollar{$}% syntax highlighting
\catcode`\$=3
% \end{macrocode}
%
@@ -14914,6 +14929,20 @@ This boolean may be tested by the user for later use.
%
%
%
+% \DescribeOption{warpdisable}
+% If the \optn{warpdisable} option is given,
+% both boolean |warpingprint| and boolean |warpingHTML| are false,
+% and may be used for \cs{ifbool} tests.
+%
+% \changes{v0.909}{2022/11/21}{Added option \optn{warpdisable}.}
+% \begin{macrocode}
+\DeclareVoidOption{warpdisable}{%
+ \PackageInfo{lwarp}{Using option 'warpdisable'}
+ \boolfalse{warpingprint}%
+ \boolfalse{warpingHTML}%
+}
+% \end{macrocode}
+
% \DescribeOption{warpprint}
% If the \optn{warpprint} option is given,
% boolean |warpingprint| is true and boolean |warpingHTML| is false,
@@ -15589,6 +15618,20 @@ This boolean may be tested by the user for later use.
% \end{environment}
+% If \optn{warpdisable}, turn off both print and HTML output:
+% \changes{v0.909}{2022/11/21}{Added option \optn{warpdisable}.}
+% \begin{macrocode}
+\ifboolexpr{bool {warpingprint} or bool {warpingHTML}}
+ {}
+ {
+ \LWR@excludecomment{warpHTML}{html}
+ \LWR@excludecomment{warpprint}{print}
+ \LWR@excludecomment{warpMathJax}{mathjax}
+ }
+% \end{macrocode}
+
+
+
% \begin{environment}{warpMathJax}
% Only if \MathJax\ is being used along with \HTML.
% \changes{v0.79}{2020/01/26}{Added.}
@@ -17024,7 +17067,34 @@ This boolean may be tested by the user for later use.
%
% \changes{v0.57}{2018/05/28}{New system for switching print and \HTML\ outputs.}
%
+
+
+% Print or disabled versions:
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \changes{v0.901}{2021/08/20}{Added print versions of \cs{LWR@formatted}, etc.}
+% \changes{v0.909}{2022/11/21}{Added option \optn{warpdisable}.}
+% \begin{macrocode}
+\newcommand*{\LWR@formatted}[1]{}
+\newcommand*{\LWR@expandableformatted}[1]{}
+\newcommand*{\LWR@formattedenv}[1]{}
+\newcommand*{\LWR@expandableformattedenv}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
% \codehtml
+
+% HTML versions:
+%
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
@@ -17106,7 +17176,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/15}{Improved error handling.}
% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
-\newcommand*{\LWR@formatted}[1]{%
+\renewcommand*{\LWR@formatted}[1]{%
\LWR@formatted@checkname{#1}%
\ifcsundef{LWR@print@#1}{%
\csNewCommandCopycs{LWR@print@#1}{#1}%
@@ -17133,7 +17203,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/15}{Improved error handling.}
% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
-\newcommand*{\LWR@expandableformatted}[1]{%
+\renewcommand*{\LWR@expandableformatted}[1]{%
\LWR@formatted@checkname{#1}%
\ifcsundef{LWR@print@#1}{%
\csNewCommandCopycs{LWR@print@#1}{#1}%
@@ -17162,7 +17232,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/15}{Improved error handling.}
% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
-\newcommand*{\LWR@formattedenv}[1]{%
+\renewcommand*{\LWR@formattedenv}[1]{%
\LWR@formatted@checkname{#1}%
\LWR@formatted@checkendname{#1}%
\ifcsundef{LWR@print@#1}{%
@@ -17187,7 +17257,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.893}{2020/11/15}{Improved error handling.}
% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
-\newcommand*{\LWR@expandableformattedenv}[1]{%
+\renewcommand*{\LWR@expandableformattedenv}[1]{%
\LWR@formatted@checkname{#1}%
\LWR@formatted@checkendname{#1}%
\ifcsundef{LWR@print@#1}{%
@@ -17209,25 +17279,6 @@ This boolean may be tested by the user for later use.
% \end{macrocode}
-% Print versions.
-%
-% \codeprint
-% \begin{macrocode}
-\begin{warpprint}
-% \end{macrocode}
-
-% \changes{v0.901}{2021/08/20}{Added print versions of \cs{LWR@formatted}, etc.}
-% \begin{macrocode}
-\newcommand*{\LWR@formatted}[1]{}
-\newcommand*{\LWR@expandableformatted}[1]{}
-\newcommand*{\LWR@formattedenv}[1]{}
-\newcommand*{\LWR@expandableformattedenv}[1]{}
-% \end{macrocode}
-
-% \begin{macrocode}
-\end{warpprint}
-% \end{macrocode}
-
% \section{\HTML-conversion output modifications}
%
@@ -21074,7 +21125,7 @@ MathJax = {
-- Copyright 2016-2022 Brian Dunn
-printversion = "v0.908"
+printversion = "v0.909"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -34996,14 +35047,7 @@ end -- not --version
% Create an internal document reference link,
% or without a link if starred per \pkg{hyperref}.
%
-% \pkg{hyperref} defines a starred version.
-% Since \pkg{hyperref} is only emulated, the starred version is
-% defined here for print mode, in case \cs{ref} is used inside
-% \SVG\ math:
-% \changes{v0.88}{2020/07/05}{Fixed: Starred \cs{ref}.}
-% \begin{macrocode}
-\LWR@absorbstar{ref}%
-% \end{macrocode}
+% \changes{v0.909}{2022/10/20}{Removed print version \cs{ref*}.}
%
% The \HTML\ version:
% \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.}
@@ -37418,7 +37462,7 @@ end -- not --version
\def\color@endgroup{\endgraf\endgroup}%
% \end{macrocode}
%
-% \changes{v0.48}{2018/02/04}{Fix: Spacing in \SVG\ math, \env{lateximage}, \tikz.}
+% \changes{v0.48}{2018/02/04}{Fix: Spacing in \SVG\ math, \env{lateximage}, \TikZ.}
% \begin{macrocode}
\LetLtxMacro\hfil\LWR@orighfil%
\let\hss\LWR@orighss%
@@ -38034,7 +38078,7 @@ end -- not --version
% \DescribeBoolean{LWR@unknownmathsize}
-% If \tikz\ or other objects are used inside math mode, the resulting
+% If \TikZ\ or other objects are used inside math mode, the resulting
% image may exceed the \TeX\ box, resulting in an incorrect measurement of
% the size of the resulting image. If this is so, the \HTML\ styles for
% image size and depth will be neutralized.
@@ -38238,7 +38282,7 @@ end -- not --version
}%
% \end{macrocode}
%
-% If using certain \tikz\ actions inside math, the resulting image may exceed the
+% If using certain \TikZ\ actions inside math, the resulting image may exceed the
% \TeX\ boundaries, so the \HTML\ size styles may be incorrect, and must
% be neutralized.
% \changes{v0.79}{2020/01/31}{Adjust for unknown size.}
@@ -39226,7 +39270,7 @@ end -- not --version
% Remember the ``less'' version of \env{equation}, which uses \MathJax
% and \attribute{alt} tags, but does not support complicated contents such as
-% some \tikz\ expressions.
+% some \TikZ\ expressions.
% \begin{macrocode}
\AtBeginDocument{
\LetLtxMacro\LWR@equationless\equation
@@ -40448,6 +40492,11 @@ end -- not --version
\LWR@PreloadedPackage{graphicx}
% \end{macrocode}
+% \pkg{tagpdf-base} may have been preloaded by \pkg{pdfmanagement-testphase}
+% \begin{macrocode}
+\LWR@PreloadedPackage{tagpdf-base}
+% \end{macrocode}
+
% \pkg{scalefnt} may have been preloaded by \pkg{babel}
% \begin{macrocode}
\LWR@PreloadedPackage{scalefnt}
@@ -40475,6 +40524,12 @@ end -- not --version
\LWR@PreloadedPackage{unicode-math}
% \end{macrocode}
+% \changes{v0.909}{2022/10/24}{Allow preloaded \pkg{realscripts}.}
+% \begin{macrocode}
+\LWR@PreloadedPackage{realscripts}
+% \end{macrocode}
+
+
% \pkg{nfssext-cfr} may be preloaded by \pkg{cfm-lm} or related font packages.
% \begin{macrocode}
\LWR@PreloadedPackage{nfssext-cfr}
@@ -43945,7 +44000,8 @@ color:\LWR@origpound\LWR@tempcolor%
{Keys/values are ignored in MathJax.\MessageBreak
\protect\Cdots, etc. do not span multiple cells.\MessageBreak
AutoNiceMatrix, etc. are not supported for MathJax.\MessageBreak
- \protect\CodeBefore\space cannot be done with MathJax.\MessageBreak
+ \protect\CodeBefore, \protect\Body, and \protect\CodeAfter\MessageBreak
+ \space\space also are not supported for MathJax.\MessageBreak
\LWR@forceSVGmessage{nicematrix}%
}
\LWR@nomathjaxwarn{pb-diagram}{\LWR@forceSVGmessage{pb-diagram}}
@@ -47847,9 +47903,12 @@ color:\LWR@origpound\LWR@tempcolor%
{\endBlockClass}
{}
{\LWR@patcherror{beamerarticle}{beamer@endframe}}
-
+% \end{macrocode}
+%
% An example in the beamer docs for \cs{includegraphics}
% shows the use of \cs{llap} in a frame.
+%
+% \begin{macrocode}
\xpretocmd\beamer@article@startframe
{\LWR@nulllistfills}
{}
@@ -47888,23 +47947,35 @@ color:\LWR@origpound\LWR@tempcolor%
\gdef\@subtitle{#2}
\def\insertsubtitle{#2}
}
-
-\xpatchcmd{\@maketitle}
- {%
- \LWR@htmltag{\LWR@tagtitleend}%
- \LWR@startpars%
- }%
- {%
- \LWR@htmltag{\LWR@tagtitleend}%
- \ifdefvoid{\@subtitle}{}{%
- \begin{BlockClass}{subtitle}%
- \@subtitle%
- \end{BlockClass}%
- }%
- \LWR@startpars%
- }%
- {}
- {\LWR@patcherror{beamerarticle}{@maketitle}}
+% \end{macrocode}
+%
+% Add subtitle if not already present:
+%
+% \changes{v0.909}{2022/10/21}{\pkg{beamerarticle}: Fixed w/ Komascript.}
+%
+% \begin{macrocode}
+\AtBeginDocument{
+\IfPackageLoadedTF{lwarp-scrextend}
+ {}% komascript already has subtitle
+ {% not komascript
+ \xpatchcmd{\@maketitle}
+ {%
+ \LWR@htmltag{\LWR@tagtitleend}%
+ \LWR@startpars%
+ }%
+ {%
+ \LWR@htmltag{\LWR@tagtitleend}%
+ \ifdefvoid{\@subtitle}{}{%
+ \begin{BlockClass}{subtitle}%
+ \@subtitle%
+ \end{BlockClass}%
+ }%
+ \LWR@startpars%
+ }%
+ {}
+ {\LWR@patcherror{beamerarticle}{@maketitle}}
+ }% not komascript
+}
\RequirePackage{fancyvrb}
\DefineVerbatimEnvironment{semiverbatim}{Verbatim}{commandchars=\\\{\}}
@@ -67309,6 +67380,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \DescribePackage{lyluatex}
% \pkg{lyluatex} is patched for use by \pkg{lwarp}.
%
+% \trouble{lylualatex=\pkg{lylualatex}}
% For the first compile, to set \prog{lwarpmk}'s configuration, use:
% \begin{sourceverb}
% lualatex --shell-escape <filename>
@@ -67348,13 +67420,14 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \userentry{lwarpmk pdftosvg tmp-ly/*.pdf}
%
% \changes{v0.73}{2019/06/10}{\pkg{lyluatex}: Added.}
+% \changes{v0.909}{2022/11/22}{\pkg{lyluatex}: Updated to v1.1.1.}
%
% \codehtml
%
% \begin{macrocode}
\LWR@origRequirePackage{luacode}
-\LWR@ProvidesPackagePass{lyluatex}[2019/05/27]
+\LWR@ProvidesPackagePass{lyluatex}[2022/11/07]
% \end{macrocode}
%
% User-redefinable \attribute{ALT} tag:
@@ -67407,10 +67480,11 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% From the original:
% \begin{macrocode}
\ly@setunits%
+ \setluaoption{ly}{currfiledir}{\currfiledir}
+ \setluaoption{ly}{twoside}{\ly@istwosided}
\directlua{
- ly_opts:set_option('currfiledir', [[\currfiledir]])
- ly_opts:set_option('twoside', '\ly@istwosided')
#1
+ ly.newpage_if_fullpage()
}%
\ly@resetunits%
\ly@currentfonts%
@@ -68936,7 +69010,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \end{macrocode}
%
%
-% Do not require \tikz{} or pstricks:
+% Do not require \TikZ{} or pstricks:
% \begin{macrocode}
\LWR@origRequirePackage[framemethod=none]{mdframed}
% \end{macrocode}
@@ -70396,11 +70470,12 @@ background:
%
% \changes{v0.80}{2020/02/14}{\pkg{mismath}: Added.}
% \changes{v0.89}{2020/09/02}{\pkg{mismath}: Improved math operators.}
+% \changes{v0.909}{2022/11/21}{\pkg{mismath}: Updated to v2.0.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{mismath}[2019/12/27]
+\LWR@ProvidesPackagePass{mismath}[2022/11/11]
% \end{macrocode}
%
% For \MathJax, used in the \HTML\ comment before the environment.
@@ -70521,7 +70596,6 @@ background:
\CustomizeMathJax{\newcommand{\mul}{\mathord{\times}}}
\CustomizeMathJax{\newcommand{\then}{\ \Longrightarrow \ \mbox{} }}
\CustomizeMathJax{\newcommand{\txt}[1]{\quad\text{#1}\quad}}
-\CustomizeMathJax{\newcommand{\paren}[1]{\mathopen{\left(#1\right)}}}
\CustomizeMathJax{\newcommand{\pow}[2]{\left( #1 \right)^{\!#2}}}
\CustomizeMathJax{\newcommand{\abs}[1]{\left\vert#1\right\vert}}
\CustomizeMathJax{\newcommand{\lfrac}[2]{\frac{\:#1\:}{\:#2\:}}}
@@ -72869,9 +72943,15 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \changes{v0.894}{2020/12/21}{\pkg{nicematrix}: Added.}
%
% \codehtml
-%
+
+% Skip the test for \env{array}, which does not work with \pkg{lwarp}:
+% \changes{v0.909}{2022/10/23}{\pkg{nicematrix}: Fixed array test.}
+% \begin{macrocode}
+\PassOptionsToPackage{no-test-for-array}{nicematrix}
+% \end{macrocode}
+
% \begin{macrocode}
-\LWR@ProvidesPackagePass{nicematrix}[2020/11/23]
+\LWR@ProvidesPackagePass{nicematrix}[2022/10/06]
% \end{macrocode}
%
% \env{NiceTabular} must be converted to \SVG\ to support the
@@ -72989,9 +73069,41 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \end{macrocode}
%
% \changes{v0.901}{2021/08/26}{\pkg{nicematrix}: Added \cs{Hline}.}
+% \changes{v0.909}{2022/10/25}{\pkg{nicematrix}: \cs{Hline} opt arg.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\Hline}[1][]{\hline}}
+% \end{macrocode}
+%
+% \changes{v0.909}{2021/10/24}{\pkg{nicematrix}: Added \cs{CodeBefore}, \cs{CodeAfter},
+% \cs{Body}, \cs{line}, \cs{RowStyle}, \cs{SubMatrix},
+% \cs{OverBrace}, \cs{UnderBrace}, \cs{ShowCellNames}.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\CodeBefore}{}}
+\CustomizeMathJax{\newcommand{\Body}{}}
+\CustomizeMathJax{\newcommand{\CodeAfter}{}}
+\CustomizeMathJax{\newcommand{\line}[3][]{}}
+\CustomizeMathJax{\newcommand{\RowStyle}[2][]{}}
+\CustomizeMathJax{\newcommand{\LWRSubMatrix}[1][]{}}
+\CustomizeMathJax{\newcommand{\SubMatrix}[4]{\LWRSubMatrix}}
+\CustomizeMathJax{\newcommand{\OverBrace}[4][]{}}
+\CustomizeMathJax{\newcommand{\UnderBrace}[4][]{}}
+\CustomizeMathJax{\newcommand{\ShowCellNames}{}}
+% \end{macrocode}
+%
+% \changes{v0.909}{2021/10/24}{\pkg{nicematrix}: Added \cs{cellcolor}, etc.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\cellcolor}[3][]{}}
+\CustomizeMathJax{\newcommand{\rowcolor}[3][]{}}
+\CustomizeMathJax{\newcommand{\LWRrowcolors}[1][]{}}
+\CustomizeMathJax{\newcommand{\rowcolors}[4][]{\LWRrowcolors}}
+\CustomizeMathJax{\newcommand{\rowlistcolors}[3][]{\LWRrowcolors}}
+\CustomizeMathJax{\newcommand{\columncolor}[3][]{}}
+\CustomizeMathJax{\newcommand{\rectanglecolor}[4][]{}}
+\CustomizeMathJax{\newcommand{\arraycolor}[2][]{}}
+\CustomizeMathJax{\newcommand{\chessboardcolors}[3][]{}}
+% \end{macrocode}
+%
% \begin{macrocode}
-\CustomizeMathJax{\let\Hline\hline}
-
\CustomizeMathJax{\newcommand{\ldots}[1][]{\dots}}
\CustomizeMathJax{\newcommand{\Cdots}[1][]{\cdots}}
\CustomizeMathJax{\newcommand{\Vdots}[1][]{\vdots}}
@@ -74888,17 +75000,20 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \pkg{pbalance} is ignored.
%
% \changes{v0.897}{2021/04/18}{\pkg{pbalance}: Added.}
+% \changes{v0.909}{2022/10/26}{\pkg{pbalance}: Updated to v1.4.0.}
%
% \codehtml
%
% \begin{macrocode}
\RequirePackage{balance}
-\LWR@ProvidesPackageDrop{pbalance}[2020/12/16]
+\LWR@ProvidesPackageDrop{pbalance}[2022/07/28]
% \end{macrocode}
%
% \begin{macrocode}
\newcommand\shrinkLastPage[1]{}
+\newcommand\balancePageNum[1]{}
+\newcommand\nopbalance{}
% \end{macrocode}
%
% \iffalse
@@ -75317,7 +75432,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{pdfpages}[2017-10-31]
+\LWR@ProvidesPackagePass{pdfpages}[2022-10-09]
% \end{macrocode}
%
% Disable option which have no meaning for \HTML\ output:
@@ -75399,20 +75514,21 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
% \begin{noindmacro}{\AM@output}
% Patched to use \cs{LWR@esopic@newpage}.
+% \changes{v0.909}{2022/07/15}{\pkg{pdfpages}: Updated to v0.5w.}
% \begin{macrocode}
-\xpatchcmd{\AM@output}
+\xpatchcmd{\AM@output@i}
{\newpage}
{\LWR@esopic@newpage}
{}
{\LWR@patcherror{pdfpages}{AM@output-1}}
-\xpatchcmd{\AM@output}
+\xpatchcmd{\AM@output@i}
{\newpage}
{\LWR@esopic@newpage}
{}
{\LWR@patcherror{pdfpages}{AM@output-2}}
-\xpatchcmd{\AM@output}
+\xpatchcmd{\AM@output@i}
{\newpage}
{\LWR@esopic@newpage}
{}
@@ -77069,6 +77185,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \cs{textsubscript}.}
% \changes{v0.84}{2020/04/13}{\pkg{realscripts}: Improved supersub scripts.}
% \changes{v0.84}{2020/04/13}{\pkg{realscripts}: Added print mode.}
+% \changes{v0.909}{2022/10/24}{\pkg{realscripts}: Removed print defns due to improved \pkg{xparse} support.}
%
% \codehtml
%
@@ -77077,29 +77194,9 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
%
%
-% The following are copied verbatim from the original,
-% but given new names, since \pkg{xparse} definitions should not be \cs{let}.
% \begin{macrocode}
\ExplSyntaxOn
-\DeclareDocumentCommand \LWR@print@realsubscript {m} {
- \fontspec_if_fontspec_font:TF {
- \fontspec_if_opentype:TF
- { \fontspec_if_feature:nTF {+subs}
- { {\addfontfeature{VerticalPosition=Inferior}#1} }
- { \fontspec_if_feature:nTF {+sinf}
- { {\addfontfeature{VerticalPosition=ScientificInferior}#1} }
- { \fakesubscript{#1} }
- }
- }
- { \fontspec_if_aat_feature:nnTF {10} {2}
- { {\addfontfeature{VerticalPosition=Inferior}#1} }
- { \fakesubscript{#1} }
- }
- }
- { \fakesubscript{#1} }
-}
-
\DeclareDocumentCommand \LWR@HTML@realsubscript {m} {
\LWR@HTML@textsubscript{#1}
}
@@ -77107,22 +77204,6 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\LWR@formatted{realsubscript}
-\DeclareDocumentCommand \LWR@print@realsuperscript {m} {
- \fontspec_if_fontspec_font:TF
- {
- \fontspec_if_opentype:TF
- { \fontspec_if_feature:nTF {+sups}
- { {\addfontfeature{VerticalPosition=Superior}#1} }
- { \fakesuperscript{#1} }
- }
- { \fontspec_if_aat_feature:nnTF {10} {1}
- { {\addfontfeature{VerticalPosition=Superior}#1} }
- { \fakesuperscript{#1} }
- }
- }
- { \fakesuperscript{#1} }
-}
-
\DeclareDocumentCommand \LWR@HTML@realsuperscript {m} {
\LWR@HTML@textsuperscript{#1}
}
@@ -77130,75 +77211,6 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\LWR@formatted{realsuperscript}
-\DeclareDocumentCommand \LWR@print@textsubsuperscript {s O{l} mm} {
- \leavevmode
- \group_begin:
- \IfBooleanTF #1
- {
- \hbox_set:Nn \l_tmpa_box {\textsubscript*{#3}}
- \hbox_set:Nn \l_tmpb_box {\textsuperscript*{#4}}
- }
- {
- \hbox_set:Nn \l_tmpa_box {\textsubscript{#3}}
- \hbox_set:Nn \l_tmpb_box {\textsuperscript{#4}}
- }
- \hbox_set:Nn \l_tmpa_box
- { \box_move_down:nn \subsupersep {\box_use:N \l_tmpa_box} }
- \hbox_set:Nn \l_tmpb_box
- { \box_move_up:nn \subsupersep {\box_use:N \l_tmpb_box} }
- \str_case:nnF {#2}
- {
- {l}{\use_i:nnn}
- {c}{\use_ii:nnn}
- {r}{\use_iii:nnn}
- }
- {
- \PackageWarning{realscripts}{
- Unknown~alignment~option~`#2'. \MessageBreak
- One~ of~ `l',~ `c',~ `r',~ only
- }
- \use_i:nnn
- }
- {
- \hbox_overlap_right:n { \box_use:N \l_tmpa_box }
- \hbox_overlap_right:n { \box_use:N \l_tmpb_box }
- \skip_horizontal:n {
- \dim_max:nn {\box_wd:N \l_tmpa_box} {\box_wd:N \l_tmpb_box}
- }
- }
- {
- \dim_compare:nTF { \box_wd:N \l_tmpa_box > \box_wd:N \l_tmpb_box }
- {
- \skip_horizontal:n {
- 0.5\box_wd:N \l_tmpa_box-0.5\box_wd:N \l_tmpb_box
- }
- \box_use:N \l_tmpb_box
- \skip_horizontal:n {
- -0.5\box_wd:N \l_tmpa_box-0.5\box_wd:N \l_tmpb_box
- }
- \box_use:N \l_tmpa_box
- }
- {
- \skip_horizontal:n {
- 0.5\box_wd:N \l_tmpb_box-0.5\box_wd:N \l_tmpa_box
- }
- \box_use:N \l_tmpa_box
- \skip_horizontal:n {
- -0.5\box_wd:N \l_tmpb_box-0.5\box_wd:N \l_tmpa_box
- }
- \box_use:N \l_tmpb_box
- }
- }
- {
- \skip_horizontal:n {
- \dim_max:nn {\box_wd:N \l_tmpa_box} {\box_wd:N \l_tmpb_box}
- }
- \hbox_overlap_left:n { \box_use:N \l_tmpa_box }
- \hbox_overlap_left:n { \box_use:N \l_tmpb_box }
- }
- \group_end:
-}
-
\ExplSyntaxOff
@@ -79628,7 +79640,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{simplebnf}[2020/09/01]
+\LWR@ProvidesPackagePass{simplebnf}[2022/05/08]
% \end{macrocode}
%
% The entire object is placed inside a \env{lateximage} whose
@@ -79636,28 +79648,24 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \begin{macrocode}
\ExplSyntaxOn
-\RenewDocumentEnvironment { bnfgrammar } { +b }
+\RenewDocumentEnvironment { bnfgrammar } { O{llcll} O{[^\|]\|[^\|]} O{\|\|} +b }
{
+ \regex_gset:Nn \g_simplebnf_rhs_newline_r { #2 }
+ \regex_gset:Nn \g_simplebnf_rhs_nb_r { #3 }
+
%% \l__input_seq is a list of term definitions.
- \regex_split:nnN { ;; } { #1 } \l__input_seq
+ \regex_split:nnN { ;; } { #4 } \l__input_seq
\begin{center}
- \begin{lateximage}[#1]% lwarp
+ \begin{lateximage}[#4]% lwarp
\tl_set:Nn \l__table_tl
{
- \begin{tabular}{lcll}
+ \begin{tabular}{#1}
}
+
\bool_set_true:N \l_tmp_first_term % Is this the first term in this grammar?
\seq_map_inline:Nn \l__input_seq
{
- %% \l__term_seq - (term, rhses)...
- %% \l__term_tl - term
- %% \l__keypairs_tl - rhses
- \regex_split:nnN { ::= } { ##1 } \l__term_seq
- \seq_pop_left:NN \l__term_seq \l__term_tl
- \seq_pop_left:NN \l__term_seq \l__keypairs_tl
-
- \regex_replace_once:nnN { ^\s+ } {} \l__term_tl
-
+ %% If not-first, add newline
\bool_if:NTF \l_tmp_first_term
{
\bool_set_false:N \l_tmp_first_term
@@ -79665,15 +79673,48 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{
\tl_put_right:Nn \l__table_tl { \\ }
}
- \tl_put_right:Nx \l__table_tl
+
+ \regex_split:nnNTF { ::= } { ##1 } \l__term_seq
+ % Parse a ::= definition
{
- \bnfexpr { \l__term_tl } & \g__simplebnf_defeq_tl &
+ %% \l__term_seq - (lhs, rhses)...
+ %% \l__term_tl - lhs
+ %% \l__keypairs_tl - rhses
+ \seq_pop_left:NN \l__term_seq \l__term_tl
+ \seq_pop_left:NN \l__term_seq \l__keypairs_tl
+
+ \simplebnf_typeset_lhs:n{\l__term_tl}
+ \tl_put_right:Nn \l__table_tl
+ {
+ & \SimpleBNFDefEq &
+ }
+ %% \l__keypairs_seq - (rhs:annot | rhs)...
+ \regex_split:NVN \g_simplebnf_rhs_newline_r \l__keypairs_tl \l__keypairs_seq
+
+ \bool_set_true:N \l__first_rhs
+ \seq_map_function:NN \l__keypairs_seq \simplebnf_typeset_rhs:n
}
- %% \l__keypairs_seq - (rhs:annot | rhs)...
- \seq_set_split:NnV \l__keypairs_seq { | } \l__keypairs_tl
+ {
+ % Else, parse a \in declaration
+ \regex_split:nnNTF { \c{in} } { ##1 } \l__term_seq
+ {
+ %% \l__term_seq - (lhs, rhs)
+ \seq_pop_left:NN \l__term_seq \l_tmpa_tl
- \bool_set_true:N \l__first_rhs
- \seq_map_function:NN \l__keypairs_seq \simplebnf_typeset_rhs:n
+ \simplebnf_typeset_lhs:n{\l_tmpa_tl}
+ \tl_put_right:Nn \l__table_tl
+ {
+ & $\in$ & $
+ }
+ \seq_pop_left:NN \l__term_seq \l_tmpa_tl
+ \tl_put_right:NV \l__table_tl \l_tmpa_tl
+ \tl_put_right:Nn \l__table_tl
+ {
+ $ &
+ }
+ }
+ { \msg_error:nn {simplebnf} { Could not parser ##1 } }
+ }
}
\tl_put_right:Nn \l__table_tl { \end{tabular} }
@@ -85000,203 +85041,246 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \section{tagpdf}
%
% \DescribePackage{tagpdf}
-% \pkg{tagpdf} is mostly ignored, but emulates alt text, for images only.
+% \pkg{tagpdf} adds alt text, for images only.
% (\HTML\ only has alternate text for images.)
%
-% (If left enabled for \HTML\ output, \pkg{tagpdf} errors when producing \HTML,
-% somehow due to the \HTML\ page numbers.)
+% The overall strategy is that \pkg{tagpdf} is deactivated,
+% and slightly patched to process alt tags.
+% Also see \pkg{tagpdf-base}, \pkg{tagpdf-mc-code-generic},
+% and \pkg{tagpdf-mc-code-lua}, following \pkg{tagpdf}.
%
% \changes{v0.80}{2020/02/20}{\pkg{tagpdf}: Added.}
+% \changes{v0.909}{2022/10/25}{\pkg{tagpdf}: Refactored.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{tagpdf}[2021-08-27]
+\LWR@ProvidesPackagePass{tagpdf}[2022-08-24]
% \end{macrocode}
%
% \begin{macrocode}
\ExplSyntaxOn
-\tl_new:N \l__uftag_mc_key_label_tl
-
-\keys_define:nn { __tag / mc }
- {
- stash .bool_set:N = \l__tag_mc_key_stash_bool,
- __artifact-bool .bool_set:N = \l__tag_mc_artifact_bool,
- __artifact-type .choice:,
- __artifact-type / pagination .code:n =
- {},
- __artifact-type / pagination/header .code:n =
- {},
- __artifact-type / pagination/footer .code:n =
- {},
- __artifact-type / layout .code:n =
- {},
- __artifact-type / page .code:n =
- {},
- __artifact-type / background .code:n =
- {},
- __artifact-type / notype .code:n =
- {},
- __artifact-type / .code:n =
- {},
- }
-
-\keys_define:nn { __tag / mc }
- {
- tag .code:n = % the name (H,P,Span) etc
- {},
- raw .code:n =
- {},
- alttext .code:n = % Alt property
- {
- \gdef\LWR@ThisAltText{\detokenize\expandafter{#1}}%
- },
- actualtext .code:n = % ActualText property
- {},
- label .tl_set:N = \l__tag_mc_key_label_tl,
- artifact .code:n =
- {},
- artifact .default:n = {notype}
- }
-
\keys_define:nn { __tag / struct }
{
- label .tl_set:N = \l__tag_struct_key_label_tl,
- stash .bool_set:N = \l__tag_struct_elem_stash_bool,
- tag .code:n = % S property
- {},
- title .code:n = % T property
- {},
- title-o .code:n = % T property
- {},
- alttext .code:n = % Alt property
+ alt .code:n = % Alt property
{
- \gdef\LWR@ThisAltText{\detokenize\expandafter{#1}}%
+% \str_set_convert:Noon
+% \l__tag_tmpa_str
+% { #1 }
+% { default }
+% { utf16/hex }
+% \__tag_prop_gput:cnx
+% { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+% { Alt }
+% { <\l__tag_tmpa_str> }
+ \gdef\LWR@ThisAltText{\detokenize\expandafter{#1}}% lwarp
},
- actualtext .code:n = % ActualText property
- {},
- lang .code:n = % Lang property
- {},
- ref .code:n = % Lang property
- {},
- E .code:n = % E property
- {},
}
-\keys_define:nn { __tag / struct }
- {
- AF .code:n = % AF property
- {},
- ,AFinline .code:n =
- {}
- ,AFinline-o .code:n =
- {}
- }
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% The package is deactivated on load,
+% and also each time \cs{tagpdfsetup} is used.
+% \begin{macrocode}
+\LWR@tagpdf@deactivate
+% \end{macrocode}
+%
+% \iffalse
+%</tagpdf>
+% \fi
+%
+%
+%
+%
+% \iffalse
+%<*tagpdf-base>
+% \fi
+%
+% \part{lwarp-tagpdf-base.sty}
+%
+% \section{tagpdf-base}
+%
+% \credits{Ulrike Fischer}
+%
+% \DescribePackage{tagpdf-base}
+% \pkg{tagpdf-base} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.909}{2022/10/25}{\pkg{tagpdf-base}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{tagpdf-base}[2022-08-24]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
-\keys_define:nn { __tag / struct }
+\newcommand*{\LWR@tagpdf@deactivate}{
+ \keys_set:nn { __tag / setup } {
+ activate-space = false ,
+ activate-mc = false ,
+ activate-tree = false ,
+ activate-struct = false
+ }
+}
+
+\RenewDocumentCommand \tagpdfsetup { m }{
+ \keys_set:nn { __tag / setup } { #1 }
+ \LWR@tagpdf@deactivate
+}
+
+\RenewDocumentCommand \tagmcbegin { m }
{
- attribute-class .code:n =
- {}
+% \tag_mc_begin:n {#1}
+ \keys_set:nn { __tag / mc } {#1}
}
-\keys_define:nn { __tag / struct }
+\RenewDocumentCommand \tagmcend { }
{
- attribute .code:n = % A property (attribute, value currently a dictionary)
- {},
+% \tag_mc_end:
+ \ThisAltText{}% lwarp
}
-\cs_new_protected:Npn \__tag_ref_label:nn #1 #2 %#1 label, #2 name of list mc or struct
+\RenewDocumentCommand \tagmcuse { m }
{
- \@bsphack
- \ref_label:nv {#1}{c__tag_ref#2_clist}
- \@esphack
+% \tag_mc_use:n {#1}
}
-\cs_generate_variant:Nn \__tag_ref_label:nn {en}
-\cs_new:Npn \__tag_ref_value:nnn #1 #2 #3 %#1 label, #2 attribute, #3 default
+\RenewDocumentCommand \tagstructbegin { m }
{
- \ref_value:nnn {#1}{#2}{#3}
+ \keys_set:nn { __tag / struct} { #1 }% lwarp
+% \tag_struct_begin:n {#1}
}
-\cs_generate_variant:Nn \__tag_ref_value:nnn {enn}
-\cs_new:Npn \__tag_ref_value_lastpage:nn #1 #2
+
+\RenewDocumentCommand \tagstructend { }
{
- \ref_value:nnn {__tag_LastPage}{#1}{#2}
+% \tag_struct_end:
+ \ThisAltText{}% lwarp
}
-
-\NewDocumentCommand \tagpdfsetup { m }{}
-
-\cs_set_eq:NN\tagpdfifluatexTF \sys_if_engine_luatex:TF
-\cs_set_eq:NN\tagpdfifluatexT \sys_if_engine_luatex:T
-\cs_set_eq:NN\tagpdfifpdftexT \sys_if_engine_pdftex:T
-\cs_new:Npn \tagpdfget #1 {}
-\cs_new:Npn \uftag_get:n #1 {}
-
-\NewDocumentCommand \tagmcifinTF { m m }{}
-
-\NewDocumentCommand \tagmcbegin { m }{%
- \tag_mc_begin:n {#1}%\ignorespaces
-}
-
-\cs_new_protected:Npn \tag_mc_begin:n #1 %#1 keyval
+\RenewDocumentCommand \tagstructuse { m }
{
- \keys_set:nn { __tag / mc } {#1}
+% \tag_struct_use:n {#1}
}
-\NewDocumentCommand \tagmcend {}{\ThisAltText{}}
-
-\NewDocumentCommand \tagmcuse { m }{}
-
-\cs_new_protected:Nn \uftag_mc_use:n {}
-
-\NewDocumentCommand \tagstructbegin { m }
- {
- \tag_struct_begin:n {#1}
- }
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \iffalse
+%</tagpdf-base>
+% \fi
+%
+%
+%
+%
+% \iffalse
+%<*tagpdf-mc-code-generic>
+% \fi
+%
+% \part{lwarp-tagpdf-mc-code-generic.sty}
+%
+% \section{tagpdf-mc-code-generic}
+%
+% \credits{Ulrike Fischer}
+%
+% \DescribePackage{tagpdf-mc-code-generic}
+% \pkg{tagpdf-mc-code-generic} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.909}{2022/10/25}{\pkg{tagpdf-mc-code-generic}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{tagpdf-mc-code-generic}[2022-08-24]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
-\cs_new_protected:Npn \tag_struct_begin:n #1 %#1 key-val
+% From tagpdf-mc-code-generic.sty:
+\keys_define:nn { __tag / mc }
{
- \keys_set:nn { __tag / struct} { #1 }
+ alt .code:n = % Alt property
+ {
+% \str_set_convert:Noon
+% \l__tag_tmpa_str
+% { #1 }
+% { default }
+% { utf16/hex }
+% \tl_put_right:Nn \l__tag_mc_key_properties_tl { /Alt~< }
+% \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
+ \gdef\LWR@ThisAltText{\detokenize\expandafter{#1}}% lwarp
+ },
}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \iffalse
+%</tagpdf-mc-code-generic>
+% \fi
+%
+%
+%
+% \iffalse
+%<*tagpdf-mc-code-lua>
+% \fi
+%
+% \part{lwarp-tagpdf-mc-code-lua.sty}
+%
+% \section{tagpdf-mc-code-lua}
+%
+% \credits{Ulrike Fischer}
+%
+% \DescribePackage{tagpdf-mc-code-lua}
+% \pkg{tagpdf-mc-code-lua} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.909}{2022/10/25}{\pkg{tagpdf-mc-code-lua}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{tagpdf-mc-code-lua}[2022-08-24]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
-\NewDocumentCommand \tagstructend { }
+\keys_define:nn { __tag / mc }
{
- \tag_struct_end:
+ alt .code:n = % Alt property
+ {
+% \str_set_convert:Noon
+% \l__tag_tmpa_str
+% { #1 }
+% { default }
+% { utf16/hex }
+% \tl_put_right:Nn \l__tag_mc_key_properties_tl { /Alt~< }
+% \tl_put_right:No \l__tag_mc_key_properties_tl { \l__tag_tmpa_str>~ }
+% \lua_now:e
+% {
+% ltx.__tag.func.store_mc_data
+% (
+% \__tag_get_mc_abs_cnt:,"alt","/Alt~<\str_use:N \l__tag_tmpa_str>"
+% )
+% }
+ \gdef\LWR@ThisAltText{\detokenize\expandafter{#1}}% lwarp
+ },
}
-\cs_new_protected:Nn \tag_struct_end:
- {\ThisAltText{}}
-
-\NewDocumentCommand \tagstructuse { m }{}
-
-\NewDocumentCommand\ShowTagging { m }
- {}
-
-\sys_if_engine_luatex:T
-{
- \NewDocumentCommand\pdffakespace { }
- {}
-}
-
-\newcommand\tagpdfparaOn {}
-
-\newcommand\tagpdfparaOff{}
-
-\NewDocumentCommand\tagpdfsuppressmarks{m}{}
-
\ExplSyntaxOff
% \end{macrocode}
%
% \iffalse
-%</tagpdf>
+%</tagpdf-mc-code-lua>
% \fi
%
%
%
%
-%
% \iffalse
%<*tascmac>
% \fi
@@ -86952,8 +87036,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \pkg{lwarp} changes the catcode of |$| for its own use.
% \margintag{catcodes}
-% The \tikz{} |babel| library temporarily changes catcodes
-% back to normal for \tikz's use.
+% The \TikZ{} |babel| library temporarily changes catcodes
+% back to normal for \TikZ's use.
% \gindex{tikz=\pkg{tikz}>dollar redefined}
% \gindex{tikz=\pkg{tikz}>catcodes}
% \pkg{tikz} v3.0.0 introduced the |babel| library which handles catcode changes.
@@ -87000,7 +87084,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
% \end{noindenvironment}
-% \tikz\ is placed inside an \SVG\ image, so use the original
+% \TikZ\ is placed inside an \SVG\ image, so use the original
% meanings of the following:
% \begin{macrocode}
\LetLtxMacro\pgfutil@minipage\LWR@print@minipage