texlive[52016] trunk: lwarp (2sep19)
commits+karl at tug.org
commits+karl at tug.org
Mon Sep 2 22:57:55 CEST 2019
Revision: 52016
http://tug.org/svn/texlive?view=revision&revision=52016
Author: karl
Date: 2019-09-02 22:57:55 +0200 (Mon, 02 Sep 2019)
Log Message:
-----------
lwarp (2sep19)
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-academicons.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-asymptote.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bitpattern.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breqn.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome5.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-forest.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lyluatex.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-marvosym.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pifont.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfrag.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfragx.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstool.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstricks.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-stackengine.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-struktex.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-typicons.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.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 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2019-09-02 20:57:55 UTC (rev 52016)
@@ -2,7 +2,7 @@
-- Copyright 2016-2019 Brian Dunn
-printversion = "v0.73"
+printversion = "v0.74"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -32,7 +32,8 @@
lwarpmk pdftosvg <list of file names>: Converts each PDF file to SVG.
lwarpmk epstopdf <list of file names>: Converts each EPS file to PDF.
lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t,
- *.idx, *.ind, *.log, *_html_inc.*, .gl*
+ *.idx, *.ind, *.log, *_html_inc.*, .gl*,
+ *_html.pdf, *_html.html, *_html.sidetoc
lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html
lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
@@ -42,6 +43,23 @@
-- printconf ()
end
+function splitfilename ( pathandfilename )
+--
+-- Separates out the path and extension from a filename.
+-- Returns path, filename with extension, and extension.
+-- Ex: thispath, thisfilename, thisextension = splitfilename ("path/to/filename.ext")
+--
+-- https://www.fhug.org.uk/wiki/wiki/doku.php?id=plugins:code_snippets:
+-- split_filename_in_to_path_filename_and_extension
+--
+ if lfs.attributes(pathandfilename,"mode") == "directory" then
+ local strPath = pathandfilename:gsub("[\\/]$","") -- $ (syntax highlighting)
+ return strPath.."\\","",""
+ end
+ pathandfilename = pathandfilename.."."
+ return pathandfilename:match("^(.-)([^\\/]-)%.([^\\/%.]-)%.?$")
+end
+
function splitfile (destfile,sourcefile)
--
-- Split one large sourcefile into a number of files,
@@ -358,6 +376,8 @@
--
-- Remove auxiliary files:
-- All .aux files are removed since there may be many bbl*.aux files.
+-- Also removes sourcename_html.pdf, sourcename_html.html,
+-- and sourcename_html.sidetoc.
--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
@@ -368,6 +388,9 @@
sourcename ..".ps " .. sourcename .."_html.ps " ..
sourcename ..".log " .. sourcename .. "_html.log " ..
sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ sourcename .. "_html.pdf " ..
+ sourcename .. "_html.html " ..
+ sourcename .. "_html.sidetoc " ..
" *_html_inc.* "
)
end
@@ -609,7 +632,7 @@
--
-- Converts EPS files to PDF files.
-- The filenames are arg[argindex] and up.
--- arg[1] is the command "pdftosvg".
+-- arg[1] is the command "epstopdf".
--
ignoreconf ()
for i = argindex , #arg do
@@ -617,7 +640,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "epstopdf " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "epstopdf " .. arg[i] )
+ else
+ os.execute (
+ "epstopdf " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".pdf"
+ )
+ end
end -- if
end -- do
end --function
@@ -634,7 +666,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "pdftocairo -svg " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "pdftocairo -svg " .. arg[i] )
+ else
+ os.execute (
+ "pdftocairo -svg " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".svg"
+ )
+ end
end -- if
end -- do
end --function
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2019-09-02 20:57:55 UTC (rev 52016)
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.73 README.txt
+LaTeX lwarp package v0.74 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 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2019-09-02 20:57:55 UTC (rev 52016)
@@ -2,7 +2,7 @@
-- Copyright 2016-2019 Brian Dunn
-printversion = "v0.73"
+printversion = "v0.74"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -32,7 +32,8 @@
lwarpmk pdftosvg <list of file names>: Converts each PDF file to SVG.
lwarpmk epstopdf <list of file names>: Converts each EPS file to PDF.
lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t,
- *.idx, *.ind, *.log, *_html_inc.*, .gl*
+ *.idx, *.ind, *.log, *_html_inc.*, .gl*,
+ *_html.pdf, *_html.html, *_html.sidetoc
lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html
lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
@@ -42,6 +43,23 @@
-- printconf ()
end
+function splitfilename ( pathandfilename )
+--
+-- Separates out the path and extension from a filename.
+-- Returns path, filename with extension, and extension.
+-- Ex: thispath, thisfilename, thisextension = splitfilename ("path/to/filename.ext")
+--
+-- https://www.fhug.org.uk/wiki/wiki/doku.php?id=plugins:code_snippets:
+-- split_filename_in_to_path_filename_and_extension
+--
+ if lfs.attributes(pathandfilename,"mode") == "directory" then
+ local strPath = pathandfilename:gsub("[\\/]$","") -- $ (syntax highlighting)
+ return strPath.."\\","",""
+ end
+ pathandfilename = pathandfilename.."."
+ return pathandfilename:match("^(.-)([^\\/]-)%.([^\\/%.]-)%.?$")
+end
+
function splitfile (destfile,sourcefile)
--
-- Split one large sourcefile into a number of files,
@@ -358,6 +376,8 @@
--
-- Remove auxiliary files:
-- All .aux files are removed since there may be many bbl*.aux files.
+-- Also removes sourcename_html.pdf, sourcename_html.html,
+-- and sourcename_html.sidetoc.
--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
@@ -368,6 +388,9 @@
sourcename ..".ps " .. sourcename .."_html.ps " ..
sourcename ..".log " .. sourcename .. "_html.log " ..
sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ sourcename .. "_html.pdf " ..
+ sourcename .. "_html.html " ..
+ sourcename .. "_html.sidetoc " ..
" *_html_inc.* "
)
end
@@ -609,7 +632,7 @@
--
-- Converts EPS files to PDF files.
-- The filenames are arg[argindex] and up.
--- arg[1] is the command "pdftosvg".
+-- arg[1] is the command "epstopdf".
--
ignoreconf ()
for i = argindex , #arg do
@@ -617,7 +640,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "epstopdf " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "epstopdf " .. arg[i] )
+ else
+ os.execute (
+ "epstopdf " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".pdf"
+ )
+ end
end -- if
end -- do
end --function
@@ -634,7 +666,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "pdftocairo -svg " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "pdftocairo -svg " .. arg[i] )
+ else
+ os.execute (
+ "pdftocairo -svg " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".svg"
+ )
+ end
end -- if
end -- do
end --function
Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2019-09-02 20:57:55 UTC (rev 52016)
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2019/07/11 v0.73 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2019/09/02 v0.74 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -383,23 +383,50 @@
}
-\newcommand{\describemathimagename}{%
-When creating an \SVG\ math image, its \attribute{alt} tag may be set
+\newcommand{\describeImageAltText}{%
+\cs{includegraphics} and other images are assigned an \HTML\ \attribute{alt} tag
+according to \cs{ImageAltText} along with \cs{AltTextOpen} and \cs{AltTextClose}.
+This text is visible in the browser if images are not loaded,
+and appears when the text is copied and pasted.
+The default is ``\optn{image}'', and it may be changed
+according to the document's language.
+This may be set in the preamble, or changed as necessary inside the document,
+where it will affect the following \cs{includegraphics} and other images.
+}
+
+\newcommand{\describeThisAltText}{%
+\cs{ThisAltText} can be used to assign an \HTML\ \attribute{alt} text attribute
+to the next image generated by a \env{lateximage}, \env{picture}, \env{tikzpicture},
+or any other similar environment which generates an image,
+or the next \SVG\ math expression. This tag is cleared after use.
+The tag is also cleared after each \brand{MathJax} expression, in case the user
+changes between \SVG\ math and \brand{MathJax}.
+
+\cs{ThisAltText} also may be used to add an \HTML\ \attribute{title} to
+a reference or hyperlink, such as a \cs{ref}, \cs{cref}, \cs{href},
+\cs{url}, \cs{hyperref}, or \cs{hyperlink}. In each case, the alternative text
+is cleared after use.
+}
+
+\newcommand{\describeMathImageAltText}{%
+When creating an \SVG\ math image, its \HTML\ \attribute{alt} tag may be set
to the math expression, which may be hashed for image reuse.
In the case of \cs{ensuremath} or after \cs{inlinemathother},
where the contents require a unique image for each instance of the same expression,
-the \attribute{alt} tag is set to \cs{mathimagename}, and the image is not reused.
+the \attribute{alt} tag is set to \cs{MathImageAltText},
+along with \cs{AltTextOpen} and \cs{AltTextClose}, and the image is not reused.
-This expression is visible in the browser if images are not loaded,
+This \attribute{alt} expression is visible in the browser if images are not loaded,
and appears when the text is copied and pasted.
-The default is ``math image'', and it may be changed according to the document's language.
+The default is ``\optn{math image}'', and it may be changed
+according to the document's language.
This may be set in the preamble, or changed as necessary inside the document,
where it will affect the following \SVG\ math images.
}
-\newcommand{\describepackagediagramname}{%
+\newcommand{\describePackageDiagramAltText}{%
For many packages, the output is placed inside a \env{lateximage} with an
-\HTML\ \attribute{alt} tag set to the package name followed by \cs{packagediagramname}.
+\HTML\ \attribute{alt} tag set to the package name followed by \cs{PackageDiagramAltText}.
For example:
\begin{sourcedisplay}
(-xy- diagram)
@@ -408,9 +435,14 @@
and appears when the text is copied and pasted.
The default is ``diagram'', and may it be changed according to the document's language.
This may be set in the preamble, or changed as necessary inside the document,
-where it will affect the following \env{lateximage}s.
+where it will affect the following package diagrams.
}
+\newcommand{\describeAltTextOpenClose}{%
+\HTML\ \attribute{alt} text is enclosed by the macros \cs{AltTextOpen} and
+\cs{AltTextClose}, which default to an opening and closing parenthesis.
+}
+
\newcommand{\limitscpageref}{%
\pkg{cleveref} and \pkg{varioref} are supported,
\trouble[\pkg{cleveref} page numbers]{page numbers}
@@ -1331,7 +1363,7 @@
If using \cs{polymerdelim} to add delimiters to a \cs{chemfig},
wrap both inside a single \env{lateximage}:
\begin{sourcedisplay}
-\cs{begin}\{lateximage\}[(-chemfig-\textasciitilde\cs{packagediagramname})] \\
+\cs{begin}\{lateximage\}[-chemfig-\textasciitilde\cs{PackageDiagramAltText}] \\
\cs{chemfig}\{\dots\} \\
\cs{polymerdelim}[\dots]\{\dots\} \\
\cs{end}\{lateximage\}
@@ -1378,7 +1410,8 @@
\limitsincludegraphicsscale
For \cs{includegraphics} with \filenm{.pdf} or \filenm{.eps} files,
-\gindex{graphics>formats}
+\gindex{graphics>file formats}
+\gindex{image>file formats}
\gindex{includegraphics=\cs{includegraphics}>using}
\gindex{PDF image>using}
\gindex{EPS image>using}
@@ -1481,7 +1514,7 @@
Likewise, the \cs{includegraphics} \optn{alt} key adds an \HTML\ \attribute{alt} tag to
\margintag{\HTML\ \attribute{alt} tags}
an image, and is ignored for print output. If not assigned, each
-image is given an \attribute{alt} tag of ``\optn{(image)}''.
+image is given an \attribute{alt} tag according to \cs{ImageAltText}.
\cs{rotatebox} accepts the optional \optn{origin} key.
\margintag{\cs{rotatebox}}
@@ -2125,7 +2158,7 @@
\newcommand{\limitssaveboxes}{%
\trouble{boxes}
-\trouble{HTML>corrupted}
+\trouble[\HTML\ corrupted]{HTML>corrupted}
\trouble{savebox=\cs{savebox}}
\trouble{sbox=\cs{sbox}}
\trouble{lrbox=\env{lrbox}}
@@ -2646,7 +2679,7 @@
%<*package>
% \fi
%
-% \CheckSum{33109}
+% \CheckSum{33339}
%
% \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
@@ -2762,6 +2795,7 @@
% \changes{v0.71}{2019/04/29}{\ 2019/04/29}
% \changes{v0.72}{2019/06/08}{\ 2019/06/08}
% \changes{v0.73}{2019/07/11}{\ 2019/07/11}
+% \changes{v0.74}{2019/09/02}{\ 2019/09/02}
@@ -2982,6 +3016,52 @@
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.74:] Docs, \SVG\ math, \prog{lwarpmk}, \HTML\ \attribute{alt} and \attribute{title} text, \pkg{lyluatex}
+% \begin{itemize}
+% \item Added to the tutorial the section \nameref{sec:whatnext}.
+% \margintag{docs}
+% See \cref{sec:whatnext}.
+% \item Added documentation about localization options.
+% See \cref{sec:localization}.
+% \item Added documentation about accessibility options.
+% See \cref{sec:accessibility}.
+% \item Renamed and updated \HTML\ \attribute{alt} text macros:
+% \margintag{\HTML\ \attribute{alt} text}
+% \watchout[changed names]
+% \begin{center}
+% \begin{tabular}{cc}
+% Old & New \\
+% \cmidrule(r){1-1}\cmidrule(l){2-2}
+% (hard coded as ``image'') & \cs{ImageAltText} \\
+% \cs{mathimagename} & \cs{MathImageAltText} \\
+% \cs{pacakgediagramname} & \cs{PackageDiagramAltText} \\
+% \end{tabular}
+% \end{center}
+% \item Added \cs{ImageAltText} for the default \HTML\ \attribute{alt} text for
+% an image. See \cref{sec:ImageAltText}.
+% \item Added \cs{ThisAltText}, which may be used to assign a one-time
+% \HTML\ \attribute{alt} tag to the very next image generated by \pkg{lwarp},
+% such as a \env{lateximage}, \env{picture}, \env{tikzpicture},
+% an image generated by various chemistry or engineering packages, or
+% an \SVG\ math image.
+% This macro also adds a \attribute{title} tag to a reference or hyperlink.
+% See \cref{sec:ThisAltText}.
+% \item Adjusted \cs{LateximageFontScale} default from .75 to 1.
+% \margintag{\SVG\ math}
+% \item Fix: Font control for \SVG\ math.
+% \item Fix: Ignores negative \cs{hspace}.
+% \margintag{misc}
+% \item Warning if \ctr{SideTOCDepth} < \ctr{FileDepth}.
+% \item \prog{lwarpmk}: \cmds{lwarpmk clean} removes additional files.
+% \margintag{\prog{lwarpmk}}
+% \item \prog{lwarpmk}: \cmds{lwarpmk epstopdf} and \cmds{lwarpmk pdftosvg}
+% now honor directories.
+% \item \pkg{lyluatex}: Split images by \optn{system} or per \optn{fullpage},
+% \margintag{packages}
+% improved margins and scaling.
+% \item Tested to work as-is with \pkg{mathspec}, \pkg{unicode-math}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.73:] \cs{include}, \pkg{memoir}, \pkg{koma-script}, \pkg{caption},
% \pkg{xy}, \pkg{datatool}, music scores.
% \begin{itemize}
@@ -3208,7 +3288,7 @@
% \item Improved page layout \CSS.
% \item \pkg{graphicx} \cs{includegraphics}: Added the \optn{alt} key
% \margintag{image \attribute{alt} tags}
-% to assign an \attribute{alt} tag to an image. Default is ``\optn{(image)}'',
+% to assign an \attribute{alt} tag to an image. Default is ``\optn{image}'',
% assigned to pass validation.
% \item Detects and causes an error
% \margintag{duplicate \HTML\ files}
@@ -3323,7 +3403,7 @@
% \needspace{2\baselineskip}
% \item[v0.61:] Custom compilation, \EPS-related packages, documentation, indexes.
% \begin{itemize}
-% \item Split index into multiple indexes. See \cpageref{sec:indexmeta}.
+% \item Split index into multiple indexes.
% \margintag{docs}
% \item Improved documentation regarding font selection. See \cref{sec:fonts}.
% \item Added documentation regarding debugging options.
@@ -3481,13 +3561,13 @@
% \item Improved localization for \env{lateximage} \HTML\ \attribute{alt} tags.
% \margintag{\env{lateximage} \attribute{alt} tags}
% For \SVG\ math images, the \attribute{alt} tag under some conditions
-% will be set to \cs{mathimagename}, which defaults to ``math image''.
+% will be set to \cs{MathImageAltText}, which defaults to \optn{math image}.
% For packages, the \attribute{alt} tag is set using the package name followed by
-% \cs{packagediagramname}, which defaults to ``diagram''. Ex:
+% \cs{PackageDiagramAltText}, which defaults to \optn{diagram}. Ex:
% \begin{sourcedisplay}
% (-xy- diagram)
% \end{sourcedisplay}
-% See \cref{sec:packagediagramname}.
+% See \cref{sec:PackageDiagramAltText}.
% \item Fix: Improved print/\HTML\ macro selection.
% \item Fix: \cs{href} text catcodes.
% \margintag{misc. fixes}
@@ -4740,8 +4820,8 @@
% Additional math: & Math fonts via \SVG\ images,
% \spkg{amscd}, \ipkg{autonum}, \mpkg{backnaur}, \spkg{bm}, \spkg{braket},
% \mpkg{breqn}, \mpkg{cases}, \spkg{delarray}, \spkg{guass}, \spkg{jkmath},
-% \mpkg{mathtools}, \spkg{nicematrix}, \spkg{pb-diagram}, \ipkg{resizegather},
-% \mpkg{xfakebold}, \mpkg{xy}.
+% \spkg{mathspec}, \mpkg{mathtools}, \spkg{nicematrix}, \spkg{pb-diagram},
+% \ipkg{resizegather}, \spkg{unicode-math}, \mpkg{xfakebold}, \mpkg{xy}.
% Many others work as-is. \\
%
% Display math with \cs{displaymathother}: & %
@@ -6045,7 +6125,7 @@
% \subsection{Cleaning auxiliary files}
%
% To remove the auxiliary files |.aux|, |.toc|, |.lof|, |.lot|, |.idx|, |.ind|, |.log|,
-% and |.gl*|:
+% and |.gl*|, and a few others:
% \userentry{lwarpmk clean}
%
%
@@ -6121,7 +6201,34 @@
% tags (|project_html.pdf|), then \prog{lwarpmk} may be used to
% convert each target to \HTML\ files.
%
+% \subsection{What next?}
+% \label{sec:whatnext}
%
+% \begin{description}
+% \item [How do I do something?] See the \nameref{sec:indexgen}.
+% \item [Something do not work!] See the \nameref{sec:indextrb}
+% or \cref{sec:troubleshooting}: \nameref{sec:troubleshooting}.
+% \item [Package options:] See \cref{sec:packageoptions}, \nameref{sec:packageoptions}.
+% \item [\HTML\ and filename settings:] See \cref{sec:htmlsettings},
+% \nameref{sec:htmlsettings}.
+% \item [Footnote placement:] See \cref{sec:htmlsettings},
+% \nameref{sec:htmlsettings}.
+% \item [Title page, indexing, glossaries:] See \cref{sec:frontbackmatter},
+% \nameref{sec:frontbackmatter}.
+% \item [Shell escape:] See \cref{sec:shellescape}, \nameref{sec:shellescape}.
+% \item [\CSS\ customization:] See \cref{sec:csscustomization},
+% \nameref{sec:csscustomization}.
+% \item [Localization:] (languages) --- See \cref{sec:localization},
+% \nameref{sec:localization}.
+% \item [Accessibility:] (\attribute{alt} and \attribute{title} tags) ---
+% See \cref{sec:accessibility}, \nameref{sec:accessibility}.
+% \item [Converting an existing document:] See \cref{sec:convertexisting},
+% \nameref{sec:convertexisting}.
+% \item [\EPUB\ conversion:] See \cref{sec:epub}, \nameref{sec:epub}.
+% \item [Word processor conversion:] See \cref{sec:wordprocessorconversion},
+% \nameref{sec:wordprocessorconversion}.
+% \end{description}
+%
% \clearpage
%
% \section{Converting an existing document}
@@ -6183,6 +6290,130 @@
% \section{Additional details}
%
%
+% \subsection{Localization}
+% \label{sec:localization}
+% \gindex{localization}
+% \gindex{language>localization}
+% \gindex{sideTOC=side\TOC>name}
+% \gindex{settings>language}
+%
+% Regional localization is supported by \pkg{lwarp} via the following package options
+% and macros:
+%
+% \begin{description}
+% \item [Object names:] \LaTeX\ provides redefinable names for various objects,
+% and \pkg{lwarp} adds a few more. Use \cs{renewcommand} to change these.
+% \begin{description}
+% \item [\cs{abstractname}:] This macro is honored by \pkg{lwarp}.
+% \item [\cs{linkhomename}:] Displayed by the link to the homepage.
+% \item [\cs{sidetocname}:] Displayed at the head of the side\TOC.
+% \end{description}
+% \item [\HTML\ settings:] See \cref{tab:htmlsettings} and
+% \cref{sec:htmlsettings} for details.
+% \begin{description}[style=unboxed]
+% \item [\cs{HTMLLanguage}:] The language to declare for each web page.
+% \item [\cs{ImageAltText}, \cs{MathImageAltText}, \cs{PackageDiagramAltText},
+% \cs{AltTextOpen}, \cs{AltTextClose}:] The defaults used for \HTML\
+% \attribute{alt} text for images. See \cref{sec:accessibility}.
+% \item [\cs{CSSFilename}:] The name of the \CSS\ file to use.
+% \item [\cs{MathJaxFilename}:] The name of the \brand{MathJax} script to use.
+% \end{description}
+% \item [Package options:] \
+% \begin{description}
+% \item [\optn{ImagesName} and \optn{ImagesDirectory}:] These options control
+% the filenames used by \pkg{lwarp} when it automatically generates images.
+% See \cref{tab:options} and \cref{sec:loading}.
+% \item [\optn{xindyStyle}, \optn{xindyLanguage}, \optn{xindyCodepage}:]
+% When using \prog{xindy}, these options may be set according to
+% local use. See \cref{sec:modifyxindy}.
+% \item [\optn{pdftotextEnc}:] To adjust the encoding of \prog{pdftotext}.
+% \end{description}
+% \end{description}
+%
+%
+% \subsection{Accessibility}
+% \label{sec:accessibility}
+%
+% \gindex{accessibility}
+% \gindex{alt text=\attribute{alt} text}
+% \gindex{HTML>alt text=\attribute{alt} text}
+% \gindex{image>alt text=\attribute{alt} text}
+% \gindex{math>alt text=\attribute{alt} text}
+% \gindex{MathJax=\brand{MathJax}>accessibility}
+% \gindex{link>title=\attribute{title} text}
+% \gindex{hyperref=\pkg{hyperref}>title=\attribute{title} text}
+% \gindex{settings>accessibility}
+%
+% \pkg{lwarp} provides several methods for improving access to
+% the document using tools such as text-only browsers, copy \Slash paste,
+% text-to-speech readers, or Braille readers.
+% \HTML\ provides the \attribute{alt} text attribute for images,
+% which is used by \pkg{lwarp} as describe below.
+% \HTML\ also provides the \attribute{title} attribute, which usually
+% generates a pop-up text. \pkg{lwarp} can add this to a reference or hyperlink.
+% \brand{MathJax} also has provisions for improved accessibility
+% as well.
+%
+% \begin{description}
+% \item [\cs{ImageAltText}:] The default \HTML\ \attribute{alt} text
+% for \cs{includegraphics} and \env{lateximage}s.
+% Set with \cs{renewcommand}.
+%
+% \item [\cs{includegraphics} \optn{alt} key:]
+% For \cs{includegraphics}, \pkg{lwarp} adds the \attribute{alt} key \Slash value.
+% For example:
+% \begin{sourceverb}
+% \includegraphics[alt={Some text.}]{filename}
+% \end{sourceverb}
+%
+% \item [\SVG\ math:]
+% For simple \SVG\ math, \pkg{lwarp} places the \LaTeX\ math expression in the
+% \attribute{alt} text, so that the \LaTeX\ expression may be copied and pasted to
+% another document as plain text.
+%
+% \item [\cs{MathImageAltText}:]
+% For complicated \SVG\ math, such as enclosed in
+% \cs{InlineMathOther} \Slash \cs{InlineMathNormal}, or
+% \cs{DisplayMathOther} \Slash \cs{DisplayMathNormal},
+% the \HTML\ \attribute{alt} text will be set to \cs{MathImageAltText}.
+% Set with \cs{renewcommand}.
+%
+% \item [\brand{MathJax}:]
+% For \brand{MathJax}, the accessibility tools provided by \brand{MathJax} are
+% enabled by default by \pkg{lwarp}'s \brand{MathJax} scripts.
+%
+% \item [\cs{PackageDiagramAltText}:]
+% Various packages create diagrams which \pkg{lwarp} converts into \SVG\ images.
+% These are given \attribute{alt} text set to \cs{PackageDiagramAltText}.
+% Set with \cs{renewcommand}.
+%
+% \item [\cs{ThisAltText}:]
+% The \HTML\ \attribute{alt} text of the next image may be set with:
+% \margintag{custom \attribute{alt} text}
+% \begin{sourceverb}
+% \ThisAltText{Custom text about the image.}
+% <SVG math, Tikz, picture, etc.>
+% \end{sourceverb}
+% The next single image will be generated with the given text,
+% and the following images will revert to back to their defaults.
+%
+% \cs{ThisAltText} may also be used to assign an \HTML\ \attribute{title} to
+% \margintag{references and links}
+% the next reference or hyperlink.
+% \begin{sourceverb}
+% \ThisAltText{Custom text about the link.}
+% Text ... \ref{label_name} ... text.
+% \end{sourceverb}
+% See \cref{sec:ThisAltText}.
+%
+% \item [\cs{AltTextOpen} and \cs{AltTextClose}:]
+% By default, \HTML\ \attribute{alt} text is enclosed by parentheses.
+% This may be changed by redefining \cs{AltTextOpen} and \cs{AltTextClose}.
+% Set with \cs{renewcommand}.
+% \end{description}
+%
+%
+%
% \subsection{Shell escape}
% \label{sec:shellescape}
% \gindex{shell escape}
@@ -6230,12 +6461,13 @@
% While using \DVI\ \prog{latex} or \PDF\ \prog{pdflatex},
% \margintag{vector fonts}
% if no font-related package is specified then the default
-% Computer Modern font is used, which may be a ``type 3'' bit-mapped font which may not
-% convert well to plain text. A ``type 1'' vector font is required.
+% \brand{Computer Modern} font is used,
% \margintag{Computer Modern}%
% \gindex{font>Computer Modern}\gindex{Computer Modern}%
% \watchout[\prog{pdflatex}]%
% \watchout[DVI \prog{latex}]%
+% which may be a ``type 3'' bit-mapped font which may not
+% convert well to plain text. A ``type 1'' vector font is required.
%
% \DescribePackage{cm-super}
% To use the updated \pkg{cm-super}'s type 1 fonts instead of Computer Modern,
@@ -6397,6 +6629,8 @@
% dvipdfmx & Use \prog{dvipdfmx} to convert \DVI\ documents. \\
% HomeHTMLFilename & The filename of the home page. \\
% HTMLFilename & A prefix for the filenames of the remaining web pages. \\
+% ImagesName & A prefix for the filenames of generated images. \\
+% ImagesDirectory & The directory used to hold generated images. \\
% PrintLatexCmd & The shell commands for \cmds{lwarpmk print}. \\
% HTMLLatexCmd & The shell commands for \cmds{lwarpmk html}. \\
% \midrule
@@ -6449,7 +6683,7 @@
% \gindex{lwarp=\pkg{lwarp}>options}
% \pkg{lwarp} package options are as follows:
%
-% \begin{description}
+% \begin{description}[itemsep=1\baselineskip]
%
% \item[\optn{mathsvg}, \optn{mathjax}:]
% \DescribeOption{mathsvg}
@@ -6496,6 +6730,23 @@
% See \cref{sec:htmlsettings}.
%
%
+% \item[\optn{ImagesName}:]
+% \DescribeOption{ImagesName}
+% \DescribeDefault{image-}
+% The prefix for the images automatically generated by \pkg{lwarp}
+% for objects such as \SVG\ math and \env{lateximage}s.
+%
+%
+% \item[\optn{ImagesDirectory}:]
+% \DescribeOption{ImagesDirectory}
+% \DescribeDefault{\cs{jobname}-images}
+% The directory for the images automatically generated by \pkg{lwarp}
+% for objects such as \SVG\ math and \env{lateximage}s.
+% By default, these images will appear in a directory named
+% \filenm{<jobname>-images}, and the images will be named and numbered
+% \filenm{image-<nn>}.
+%
+%
% \item[\optn{PrintLatexCmd}:]
% \DescribeOption{PrintLatexCmd}
% \DescribeDefault{<automatic>} Sets the shell commands executed by \cmds{lwarpmk print}.
@@ -6531,7 +6782,7 @@
% \DescribeOption{makeindexStyle}
% \DescribeDefault{lwarp.ist}
% If you wish to use a custom |.ist| file for
-% index generation, see \cref{sec:handlingpackageoptions}.
+% index generation, see \cref{sec:packageoptions}.
%
%
% \item[\optn{xindyStyle}:]
@@ -6538,13 +6789,13 @@
% \DescribeOption{xindyStyle}
% \DescribeDefault{lwarp.xdy}
% If you wish to use a custom |.xdy| file for
-% index generation, see \cref{sec:handlingpackageoptions}.
+% index generation, see \cref{sec:packageoptions}.
%
%
% \item[\optn{xindyLanguage}:]
% \DescribeOption{xindyLanguage}
% \DescribeDefault{english} If using an index or glossary,
-% see \cref{sec:handlingpackageoptions}.
+% see \cref{sec:packageoptions}.
%
%
% \item[\optn{xindyCodepage}:]
@@ -6551,7 +6802,7 @@
% \DescribeOption{xindyCodepage}
% \DescribeDefault{utf8} If using an index,
% ^^A or glossary,
-% see \cref{sec:handlingpackageoptions}.
+% see \cref{sec:packageoptions}.
%
%
% \item[\optn{PrintIndexCmd}:]
@@ -6684,7 +6935,7 @@
% \DescribeOption{lwarpmk} If you wish to have \pkg{lwarp} generate a local
% copy of \filenm{lwarpmk.lua} for archival or local-installation purposes,
% compile the print version with the \optn{lwarpmk} option set.
-% See \cref{sec:handlingpackageoptions}.
+% See \cref{sec:packageoptions}.
%
% \begin{quote}
% \hrule
@@ -6715,7 +6966,7 @@
% \DescribeDefault{\cs{jobname}} Not intended for the user.
% Used internally by \pkg{lwarp} when
% creating the |*_html.tex| file used to compile the \HTML\ version.
-% See \cref{sec:handlingpackageoptions}.
+% See \cref{sec:packageoptions}.
%
% \end{description}
%
@@ -6725,6 +6976,8 @@
% \label{sec:htmlsettings}
% \gindex{settings>HTML conversion}
% \gindex{HTML>conversion settings}
+% \gindex{sidetoc=side\TOC>depth}
+% \gindex{settings>filenames}
%
% \changes{v0.43}{2017/11/04}{Docs: \HTML\ settings table.}
% \changes{v0.43}{2017/11/06}{Docs: Reorganized \HTML\ customization.}
@@ -6748,8 +7001,13 @@
% FootnoteDepth & Sectioning depth of footnotes. \\
% \midrule
% \cs{abstractname} & The name of the abstract. \\
-% \cs{mathimagename} & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\
-% \cs{packagediagramname} & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\
+% \cs{ImageAltText} & \cs{includegraphics} and other images' \attribute{alt} tag. \\
+% \cs{ThisAltText} \marg{text} & Assigns an \attribute{alt} \Slash \attribute{title}
+% tag for the next image or link. \\
+% \cs{MathImageAltText} & The \SVG\ math image \env{lateximage} \attribute{alt} tag. \\
+% \cs{PackageDiagramAltText} & The suffix for a package's \env{lateximage} \attribute{alt} tags. \\
+% \cs{AltTextOpen} & Start an \HTML\ \attribute{alt} tag. \\
+% \cs{AltTextClose} & End an \HTML\ \attribute{alt} tag. \\
% \midrule
% \cs{CSSFilename} & The \CSS\ for the following files. \\
% \cs{MathJaxFilename} & The MathJax script for the following files. \\
@@ -6859,10 +7117,10 @@
% Each subpage of the website has its own small table of contents
% \margintag{side\TOC}
% on the side (the ``side\TOC''). Its depth is set by |SideTOCDepth|.
-% This side\TOC\ is only shown if the web page is wide enough.
+% This side\TOC\ is only shown if the browser display is wide enough.
% When using a narrow web browser window,
% ``responsive web design'' is used to show the side\TOC\ at the top of the
-% page and a link back to \UI{Home} at the bottom.
+% page, as well as a link back to \UI{Home} at the top and bottom.
%
% \label{sec:filedepth}
% It is recommended to set:
@@ -7096,16 +7354,32 @@
%
% \begin{description}
%
-% \ItemDescribeMacro{\mathimagename} \DescribeDefault{math image}
-% \label{sec:mathimagename}
+% \ItemDescribeMacro{\ImageAltText} \DescribeDefault{image}
+% \label{sec:ImageAltText}
% Redefine with \cs{renewcommand}.
-% \describemathimagename
+% \describeImageAltText
%
-% \ItemDescribeMacro{\packagediagramname} \DescribeDefault{diagram}
-% \label{sec:packagediagramname}
+% \ItemDescribeMacro{\ThisAltText} \marg{text}
+% \label{sec:ThisAltText}
+% \describeThisAltText
+%
+% \ItemDescribeMacro{\MathImageAltText} \DescribeDefault{math image}
+% \label{sec:MathImageAltText}
% Redefine with \cs{renewcommand}.
-% \describepackagediagramname
+% \describeMathImageAltText
%
+% \ItemDescribeMacro{\PackageDiagramAltText} \DescribeDefault{diagram}
+% \label{sec:PackageDiagramAltText}
+% Redefine with \cs{renewcommand}.
+% \describePackageDiagramAltText
+%
+% \ItemDescribeMacro{\AltTextOpen} \DescribeDefault{(}
+% Redefine with \cs{renewcommand}.
+%
+% \ItemDescribeMacro{\AltTextClose} \DescribeDefault{)}
+% Redefine with \cs{renewcommand}.
+% \describeAltTextOpenClose
+%
% \ItemDescribeEnv{warpprint} An environment which is only used
% while generating print output. Place inside anything which does not
% apply to \HTML\ and which may cause problems with \pkg{lwarp}.
@@ -7381,9 +7655,9 @@
% \DescribeMacro{\title} \marg{title}
%
% Avoid newlines in the \cs{title}; these will interfere with the
+% \trouble[\HTML\ corrupted]{HTML>corrupted}
% file break and \CSS\ detection.
% \trouble[newlines]{title>newlines}
-% \trouble{HTML>corrupted}
% Use a \cs{subtitle} command instead (\cref{sec:publishedsubtitle}).
% The title will appear in the document \cs{maketitle} as a heading \element{h1}.
% The \HTML\ meta |title| tag will also have this title, unless \cs{HTMLTitle}
@@ -7478,6 +7752,7 @@
%
%
%
+%
% \section{Special cases and limitations}
% \label{sec:limitations}
%
@@ -9276,7 +9551,7 @@
%
% \clearpage
%
-% \section{EPUB conversion}
+% \section{\EPUB\ conversion}
% \label{sec:epub}
%
% \pkg{lwarp} does not produce \EPUB\ documents,
@@ -10099,11 +10374,15 @@
% \subsubsection{Compiling}
%
% \begin{description}
+% \item[\ctr{SideTOCDepth} < \ctr{FileDepth}:] A warning is displayed if these
+% counters are set such that the side\TOC\ will not be able to access all pages
+% of the website.
% \item[Duplicate filenames:] \pkg{lwarp} may generate file names from section names.
% While doing so, the filenames are simplified and special characters are removed.
% If this process generates a duplicate filename, and error is generated,
% describing the filename and which section name generated it.
% \item[Multirow:] When \cs{multirow} or \cs{multicolrow} are used,
+% \trouble[\HTML\ corrupted]{HTML>corrupted}
% \cs{mrowcell} or \cs{mcolrowcell} must be placed in the appropriate cells to
% avoid corrupted \HTML\ output.
% \item[(width,height) missing a comma:] \cs{makebox} and \cs{framebox} can accept
@@ -10115,8 +10394,7 @@
% \item[``It is recommended to use \texttt{[width=xx\cs{linewidth}]}
% instead of
% \texttt{[scale=yy]}
-% '':] Browser support of \optn{scale} is not
-% the same effect as \LaTeX.
+% '':] Browser support of \optn{scale} does not have the same effect as in \LaTeX.
% \end{description}
%
%
@@ -10137,7 +10415,7 @@
% \begin{description}
%
% \item [Text is not converting correctly / corrupted \HTML\ tags:] ~
-% \trouble{HTML>corrupted}
+% \trouble[\HTML\ corrupted]{HTML>corrupted}
% \begin{itemize}
% \item Font-related UTF-8 information must be embedded in the \PDF\ file.
% See \cref{sec:fonts} regarding bitmapped vs. vector fonts.
@@ -10267,7 +10545,7 @@
% \needspace{3\baselineskip}
% \item [Incorrect \brand{MathJax}:] Some objects do not convert to \brand{Mathjax}.
% \trouble[\brand{MathJax}]{MathJax=\brand{MathJax}>errors}
-% \trouble[\brand{MathJax}]{MathJax=\brand{MathJax}>unsupported packages}
+% \trouble{MathJax=\brand{MathJax}>unsupported packages}
% Use \cs{displaymathother} before these objects, then \cs{displaymathnormal} to return
% to ``normal'' display math.
% See \cref{sec:displaymathother}.
@@ -10287,7 +10565,7 @@
% See \optn{FileSectionNames} at \cref{sec:htmlsettings}.
% \end{itemize}
%
-% \item [Missing / incorrect cross-references:] ~
+% \item [Missing / incorrect cross-references:] \
% \trouble{reference>missing or incorrect}
% \trouble{cross reference>missing}
% \begin{itemize}
@@ -10342,7 +10620,7 @@
% \end{itemize}
%
% \item [Broken fragments of HTML:] ~
-% \trouble{HTML>corrupted}
+% \trouble[\HTML\ corrupted]{HTML>corrupted}
% \begin{itemize}
% \item Check the \PDF\ file used to create \HTML\
% to see if the tags overflowed the margin.
@@ -11968,7 +12246,7 @@
%
% \section{Package options}
-% \label{sec:handlingpackageoptions}
+% \label{sec:packageoptions}
%
%
@@ -12797,6 +13075,7 @@
% \changes{v0.27}{2017/04/04}{Page geometry modified to reduce line overflow.}
% \changes{v0.28}{2017/04/13}{Forced oneside to maintain large right margin.}
% \changes{v0.52}{2018/03/31}{Fix: MathJax script line wraps. Reduced right margin.}
+% \changes{v0.74}{2019/08/13}{Remembers user's geometry.}
%
% \codehtml
% \begin{macrocode}
@@ -12803,29 +13082,123 @@
\begin{warpHTML}
% \end{macrocode}
%
+% If \pkg{geometry} has not yet been loaded,
+% use the preexising page and text sizes to be preserved for
+% later reuse.
+% These will be replaced by \pkg{lwarp} \cs{AtBeginDocument}
+% with a very large page size to reduce \HTML\ tag overflow off the page.
% \begin{macrocode}
-\RequirePackage{geometry}
+\@ifpackageloaded{geometry}
+{}{
+ \RequirePackage[
+ reset,
+ paperwidth=\paperwidth,
+ paperheight=\paperheight,
+ textwidth=\textwidth,
+ textheight=\textheight,
+ left=\oddsidemargin,
+ top=\topmargin,
+ marginparsep=\marginparsep,
+ marginparwidth=\marginparwidth,
+ ]{geometry}
+}
% \end{macrocode}
%
-% Avoid class and option conflict by changing settings after package load:
+% Remember the original definitions for later reuse.
+% If the \pkg{geometry} package is loaded by the user,
+% \pkg{lwarp-geometry} will nullify the user-level originals.
+% \begin{macrocode}
+\LetLtxMacro\LWR at origgeometry\geometry
+\LetLtxMacro\LWR at orignewgeometry\newgeometry
+\LetLtxMacro\LWR at origrestoregeometry\restoregeometry
+\LetLtxMacro\LWR at origsavegeometry\savegeometry
+\LetLtxMacro\LWR at origloadgeometry\loadgeometry
+% \end{macrocode}
+%
+%
+% \DescribeBoolean{LWR at allowanothergeometry}
+% \pkg{geometry} may be loaded by the user before \pkg{lwarp},
+% after \pkg{lwarp}, or not at all.
+% If before \pkg{lwarp}, it will have already been loaded by now
+% and its page layout has already been saved.
+% If \pkg{geometry} is loaded after \pkg{lwarp},
+% its layout will be set at that time and the user macros nullified.
+% \cs{AtEndPreamble} this layout will be saved.
+% If the user never loads \pkg{geometry},
+% \pkg{lwarp-geometry} will be loaded \cs{AtBeginDocument},
+% but it should not change the page layout set here.
+% This is controlled by the boolean \bool{LWR at allowanothergeometry}.
+% Geometry may be adjusted throughout the preamble until
+% \cs{AtEndPreamble}, when this boolean is set \optn{false}.
+% \begin{macrocode}
+\newbool{LWR at allowanothergeometry}
+\booltrue{LWR at allowanothergeometry}
+% \end{macrocode}
+%
+% Use \cs{AtEndPreamble} to avoid class and option conflict by
+% changing settings after other packages load,
+% instead of using \pkg{geometry} package options:
% \changes{v0.63}{2018/11/24}{\pkg{geometry}: Fix for \pkg{bxjs*} classes.}
% \changes{v0.65}{2018/12/21}{\pkg{geometry}: Fix for \pkg{bxjs*} classes.}
% \begin{macrocode}
-\geometry{
- paperheight=190in,%
- paperwidth=20in,%
- left=2in,right=6in,%
- top=1in,bottom=1in,%
+\AtEndPreamble{
+% \end{macrocode}
+%
+% Whatever geometry choices the user has made in the preamble,
+% either before or after \pkg{lwarp} was loaded,
+% are now saved for possible temporary reuse, such as by \pkg{lyluatex}.
+%
+% See the \pkg{lwarp-geometry} section for what happens if \pkg{geometry}
+% is loaded after \pkg{lwarp}.
+% \begin{macrocode}
+\LWR at origsavegeometry{LWR at usergeometry}
+% \end{macrocode}
+%
+% The user's paper size is saved for later reuse,
+% such as by the \pkg{pdfpages} package.
+% \begin{macrocode}
+\newlength{\LWR at userspaperwidth}
+\setlength{\LWR at userspaperwidth}{\paperwidth}
+
+\newlength{\LWR at userspaperheight}
+\setlength{\LWR at userspaperheight}{\paperheight}
+% \end{macrocode}
+%
+% For \pkg{lwarp}, use a very large page and margins
+% to help avoid letting \HTML\ tags run off the edge:
+% \begin{macrocode}
+\LWR at origgeometry{
+ reset,
+ paperheight=190in,
+ paperwidth=20in,
+ left=2in,
+ right=6in,
+ top=1in,
+ bottom=1in,
+ heightrounded,%
}
% \end{macrocode}
%
-% \pkg{ltjtarticle} and other classes may require these to be reset by \pkg{lwarp}:
+% The \pkg{lwarp} page geometry is saved for future restore:
% \begin{macrocode}
+\LWR at origsavegeometry{LWR at lwarpgeometry}
+% \end{macrocode}
+%
+% No longer adjust the page layout when \pkg{lwarp-geometry} is
+% loaded \cs{AtBeginDocument}:
+% \begin{macrocode}
+\boolfalse{LWR at allowanothergeometry}%
+% \end{macrocode}
+%
+% \pkg{ltjsbook} and other classes can print vertically,
+% and require these to be reset by \pkg{lwarp}:
+% \begin{macrocode}
\setlength{\textheight}{0.8\paperheight}
\setlength{\textwidth}{0.7\paperwidth}
\@twosidefalse
\@mparswitchfalse
+}% \AtEndPreamble
\end{warpHTML}
% \end{macrocode}
@@ -13385,29 +13758,32 @@
% \end{macro}
-% \begin{macro}{\LWR at ProvidesPackageDrop} \marg{pkgname} \oarg{version}
+% \begin{macro}{\LWR at ProvidesPackageDropA} \marg{name} \marg{date or -NoValue-}
%
-% Ignores the original package and uses lwarp's version instead.
-% Drops/discards all options.
+% Declares the package. Factored for reuse.
+%
% \begin{macrocode}
-\NewDocumentCommand{\LWR at ProvidesPackageDrop}{m o}{
-\PackageInfo{lwarp}{%
- Replacing package `#1' with the lwarp version,\MessageBreak
- and discarding options,%
-}%
-\IfValueTF{#2}
-{\ProvidesPackage{lwarp-#1}[#2]}
-{\ProvidesPackage{lwarp-#1}}
+\newcommand*{\LWR at ProvidesPackageDropA}[2]{%
+ \PackageInfo{lwarp}{%
+ Replacing package `#1' with the lwarp version,\MessageBreak
+ and discarding options,%
+ }%
+ \IfValueTF{#2}
+ {\ProvidesPackage{lwarp-#1}[#2]}
+ {\ProvidesPackage{lwarp-#1}}
+}
% \end{macrocode}
-% Ignore all options.
-% \begin{macrocode}
-\DeclareOption*{}
-% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at ProvidesPackageDropB}
% Nullifies then processes the options.
+%
% Seems to be required when options contain curly braces, which were causing
% ``|Missing \begin{document}|''.
% \changes{v0.48}{2018/02/04}{Fix: Options with braces.}
% \begin{macrocode}
+\newcommand*{\LWR at ProvidesPackageDropB}{%
% \ProcessOptions\relax% original LaTeX code
\let\ds@\@empty% from the original \ProcessOptions
\edef\@curroptions{}% lwarp modification to \ProcessOptions
@@ -13415,6 +13791,30 @@
}
% \end{macrocode}
% \end{macro}
+%
+%
+% \begin{macro}{\LWR at ProvidesPackageDrop} \marg{pkgname} \oarg{version}
+%
+% Ignores the original package and uses lwarp's version instead.
+% Drops/discards all options.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at ProvidesPackageDrop}{m o}{
+% \end{macrocode}
+% Declare the package:
+% \begin{macrocode}
+\LWR at ProvidesPackageDropA{#1}{#2}
+% \end{macrocode}
+% Ignore all options:
+% \begin{macrocode}
+\DeclareOption*{}
+% \end{macrocode}
+% Process the options:
+% \begin{macrocode}
+\LWR at ProvidesPackageDropB
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
\end{warpHTML}
@@ -14201,6 +14601,7 @@
\LetLtxMacro\LWR at origttfamily\ttfamily
\LetLtxMacro\LWR at origem\em
+
\LetLtxMacro\LWR at orignormalfont\normalfont
\let\LWR at origonecolumn\onecolumn
@@ -14889,7 +15290,8 @@
% \changes{v0.72}{2019/05/24}{\filenm{lwarp.css}: Added \pkg{backnaur}.}
% \changes{v0.72}{2019/05/26}{\filenm{lwarp.css}: Removed unneeded support for \cs{sishape}, \cs{textsi}.}
% \changes{v0.73}{2019/06/21}{\filenm{lwarp.css}: Added \cs{book} for \pkg{memoir}.}
-% \changes{v0.73}{2019/06/30}{\filenm{lwarp_.css}: Improved pkg{tocdata} formatting.}
+% \changes{v0.73}{2019/06/30}{\filenm{lwarp.css}: Improved pkg{tocdata} formatting.}
+% \changes{v0.74}{2019/08/04}{\filenm{lwarp.css}: Added \pkg{lyluatex}.}
%
% ^^A *lwarp.css
%
@@ -15981,6 +16383,18 @@
}
+/* for lyluatex */
+span.lyluatex {
+ display: inline-block ;
+}
+
+div.lyluatex p span.lateximagesource img {
+ display: block ;
+ margin-top: 3ex ;
+ margin-bottom: 3ex ;
+}
+
+
/* for bigdelim */
.ldelim, .rdelim { font-size: 200% }
@@ -17428,6 +17842,8 @@
% \changes{v0.71}{2019/04/11}{\prog{lwarpmk}: If wrong \filenm{lwarpmk.conf} version,
% or wrong OS,
% displays the print command to recompile.}%
+% \changes{v0.74}{2019/08/05}{\prog{lwarpmk}: \cmds{lwarpmk clean} removes add'l files.}%
+% \changes{v0.74}{2019/08/14}{\prog{lwarpmk}: \cmds{lwarpmk epstopdf} and \cmds{pdftosvg} honor directories.}%
%
% The following is only generated if the \optn{lwarpmk} option
% was given to \pkg{lwarp}.
@@ -17443,7 +17859,7 @@
-- Copyright 2016-2019 Brian Dunn
-printversion = "v0.73"
+printversion = "v0.74"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -17474,7 +17890,8 @@
lwarpmk pdftosvg <list of file names>: Converts each PDF file to SVG.
lwarpmk epstopdf <list of file names>: Converts each EPS file to PDF.
lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t,
- *.idx, *.ind, *.log, *_html_inc.*, .gl*
+ *.idx, *.ind, *.log, *_html_inc.*, .gl*,
+ *_html.pdf, *_html.html, *_html.sidetoc
lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html
lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
@@ -17485,6 +17902,24 @@
end
+function splitfilename ( pathandfilename )
+--
+-- Separates out the path and extension from a filename.
+-- Returns path, filename with extension, and extension.
+-- Ex: thispath, thisfilename, thisextension = splitfilename ("path/to/filename.ext")
+--
+-- https://www.fhug.org.uk/wiki/wiki/doku.php?id=plugins:code_snippets:
+-- split_filename_in_to_path_filename_and_extension
+--
+ if lfs.attributes(pathandfilename,"mode") == "directory" then
+ local strPath = pathandfilename:gsub("[\\/]$","") -- $ (syntax highlighting)
+ return strPath.."\\","",""
+ end
+ pathandfilename = pathandfilename.."."
+ return pathandfilename:match("^(.-)([^\\/]-)%.([^\\/%.]-)%.?$")
+end
+
+
function splitfile (destfile,sourcefile)
--
-- Split one large sourcefile into a number of files,
@@ -17815,6 +18250,8 @@
--
-- Remove auxiliary files:
-- All .aux files are removed since there may be many bbl*.aux files.
+-- Also removes sourcename_html.pdf, sourcename_html.html,
+-- and sourcename_html.sidetoc.
--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
@@ -17825,6 +18262,9 @@
sourcename ..".ps " .. sourcename .."_html.ps " ..
sourcename ..".log " .. sourcename .. "_html.log " ..
sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ sourcename .. "_html.pdf " ..
+ sourcename .. "_html.html " ..
+ sourcename .. "_html.sidetoc " ..
" *_html_inc.* "
)
end
@@ -18074,7 +18514,7 @@
--
-- Converts EPS files to PDF files.
-- The filenames are arg[argindex] and up.
--- arg[1] is the command "pdftosvg".
+-- arg[1] is the command "epstopdf".
--
ignoreconf ()
for i = argindex , #arg do
@@ -18082,7 +18522,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "epstopdf " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "epstopdf " .. arg[i] )
+ else
+ os.execute (
+ "epstopdf " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".pdf"
+ )
+ end
end -- if
end -- do
end --function
@@ -18100,7 +18549,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "pdftocairo -svg " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "pdftocairo -svg " .. arg[i] )
+ else
+ os.execute (
+ "pdftocairo -svg " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".svg"
+ )
+ end
end -- if
end -- do
end --function
@@ -21498,6 +21956,8 @@
% \begin{macro}{\LWR at customizeMathJax}
+% Prints MathJax commands to the \HTML\ output.
+%
% \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.}
% \changes{v0.57}{2018/05/24}{MathJax: Supports \cs{footnote}, \cs{footnotemark}.}
% \begin{macrocode}
@@ -29154,6 +29614,20 @@
% \subsection{References}
% \label{sec:references}
+
+% \begin{macro}{\LWR at addlinktitle}
+% \changes{v0.74}{2019/08/25}{Added.}
+% \begin{macrocode}
+\newcommand*{\LWR at addlinktitle}{%
+ \ifdefvoid{\LWR at ThisAltText}{}{ % space
+ title="\LWR at ThisAltText" % space
+ \gdef\LWR at ThisAltText{}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \begin{macro}{\LWR at startref} \marg{label} \quad
% (Common code for \cs{ref} and \cs{nameref}.)
%
@@ -29214,7 +29688,12 @@
% \end{macrocode}
% Closing quote:
% \begin{macrocode}
-"}%
+"%
+% \end{macrocode}
+% Maybe add a title:
+% \begin{macrocode}
+\LWR at addlinktitle%
+}%
\LWR at traceinfo{LWR at startref F}%
}
% \end{macrocode}
@@ -29373,6 +29852,7 @@
\LWR at sanitize{#1}%
\LWR at htmltag{%
a href="\LWR at sanitized" % space
+ \LWR at addlinktitle % space
target="\_{}blank" % space
}%
}
@@ -29405,6 +29885,7 @@
a % space
href="\begingroup\@sanitize#1\endgroup" % space
class="#3" % space
+ \LWR at addlinktitle % space
}\LWR at orignewline%
#2\LWR at orignewline%
\LWR at htmltag{/a}%
@@ -29504,30 +29985,33 @@
% \end{macro}
-% \begin{macro}{\LWR at subinlineimage} \oarg{alttag} \marg{class}
-% \marg{filename} \marg{extension} \marg{style}
+% \begin{macro}{\LWR at subinlineimage} \marg{\element{alt} tag} \marg{class}
+% \marg{filename} \marg{extension} \marg{CSS style}
%
+% Factored from \env{lateximage}.
+%
% \changes{v0.18}{2016/05/18}{Suppress extra space.}
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\newcommand*{\LWR at subinlineimage}[5][]{%
-\ifblank{#1}%
-{%
- \LWR at htmltag{img \LWR at indentHTML
- src="#3.#4" \LWR at indentHTML
- alt="#3" \LWR at indentHTML
- style="#5" \LWR at indentHTML
- class="#2" \LWR at orignewline
+\newcommand*{\LWR at subinlineimage}[5]{%
+ \ifblank{#1}%
+ {%
+ \LWR at htmltag{img \LWR at indentHTML
+ src="#3.#4" \LWR at indentHTML
+ alt="#3" \LWR at indentHTML
+ style="#5" \LWR at indentHTML
+ class="#2" \LWR at orignewline
+ }%
}%
-}%
-{%
- \LWR at htmltag{img \LWR at indentHTML
- src="#3.#4" \LWR at indentHTML
- alt="#1" \LWR at indentHTML
- style="#5" \LWR at indentHTML
- class="#2" \LWR at orignewline
+ {%
+ \LWR at htmltag{img \LWR at indentHTML
+ src="#3.#4" \LWR at indentHTML
+ alt="#1" \LWR at indentHTML
+ style="#5" \LWR at indentHTML
+ class="#2" \LWR at orignewline
+ }%
}%
-}%
}
% \end{macrocode}
% \end{macro}
@@ -30331,10 +30815,20 @@
% \DescribeCounter{SideTOCDepth}
% Controls how deep the side-TOC gets. Use a standard \LaTeX{} section level
-% similar to |tocdepth|.
+% similar to |tocdepth|. Warn if parts of the website may be inaccessible.
% \begin{macrocode}
\newcounter{SideTOCDepth}
\setcounter{SideTOCDepth}{1}
+
+\AtBeginDocument{%
+ \ifnumcomp{\value{SideTOCDepth}}{<}{\value{FileDepth}}{
+ \PackageWarningNoLine{lwarp}
+ {%
+ SideTOCDepth is less than FileDepth,\MessageBreak
+ so some website pages may be inaccessible%
+ }
+ }{}
+}
% \end{macrocode}
% \begin{macro}{\sidetocname}
@@ -31099,21 +31593,81 @@
\begin{warpall}
% \end{macrocode}
-% \begin{macro}{\mathimagename} The \HTML\ \attribute{alt} tag for
+
+% \begin{macro}{\AltTextOpen} The opening part of \HTML\ \attribute{alt} tag for
+% an image. The default is a left parenthesis.
+% \DescribeDefault{(}
+% \changes{v0.74}{2019/08/20}{Added.}
+% \begin{macrocode}
+\newcommand*{\AltTextOpen}{(}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\AltTextClose} The closing part of \HTML\ \attribute{alt} tag for
+% an image. The default is a right parenthesis.
+% \DescribeDefault{(}
+% \changes{v0.74}{2019/08/20}{Added.}
+% \begin{macrocode}
+\newcommand*{\AltTextClose}{)}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\ImageAltText} The \HTML\ \attribute{alt} tag for
+% an image. \\
+% \DescribeDefault{image}
+% \changes{v0.74}{2019/08/07}{Added.}
+% \begin{macrocode}
+\newcommand*{\ImageAltText}{image}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\MathImageAltText} The \HTML\ \attribute{alt} tag for
% an \SVG\ math image. \\
% \DescribeDefault{``math image''}
% \changes{v0.57}{2018/05/22}{Added.}
+% \changes{v0.74}{2019/08/07}{Renamed from \cs{mathimage}.}
% \begin{macrocode}
-\newcommand*{\mathimagename}{math image}
+\newcommand*{\MathImageAltText}{math image}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\packagediagramname} Appended to the \env{lateximage}
+
+% \begin{macro}{\LWR at ThisAltText} The \HTML\ \attribute{alt} tag for
+% the next image.
+% Cleared after use, and also after each \env{lateximage},
+% \cs{LWR at subsingledollar}, and each use of \brand{MathJax}.
+%
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\newcommand*{\LWR at ThisAltText}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ThisAltText} \marg{text}
+%
+% Assigns the \HTML\ \attribute{alt} tag for the next image
+% generated by \pkg{lwarp}, such as a \env{lateximage},
+% \env{picture}, or \SVG\ math.
+%
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\newcommand*{\ThisAltText}[1]{%
+ \renewcommand{\LWR at ThisAltText}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\PackageDiagramAltText} Appended to the \env{lateximage}
% \HTML\ \attribute{alt} tag for the images generated by many packages.
% \DescribeDefault{``diagram''}
% \changes{v0.57}{2018/05/22}{Added.}
+% \changes{v0.74}{2019/08/07}{Renamed from \cs{packagediagramname}.}
% \begin{macrocode}
-\newcommand*{\packagediagramname}{diagram}
+\newcommand*{\PackageDiagramAltText}{diagram}
% \end{macrocode}
% \end{macro}
@@ -31176,6 +31730,32 @@
% \end{macro}
+
+
+% \begin{macro}{\LWR at setcurrentfont}
+% Sets the actual \LaTeX\ font to that which was selected for
+% \HTML\ output.
+% Ex: In \HTML\ mode, \cs{bfseries} sets \cs{LWR at f@series} to ``|bf|''.
+% This sets the \PDF\ output here for use inside a \env{lateximage}.
+% \changes{v0.74}{2019/09/01}{Factored.}
+% \begin{macrocode}
+\newcommand*{\LWR at setcurrentfont}{%
+ \LWR at traceinfo{Using font family \LWR at f@family}%
+ \@nameuse{LWR at print@\LWR at f@family family}%
+ \LWR at traceinfo{Using font series \LWR at f@series}%
+ \@nameuse{LWR at print@\LWR at f@series series}%
+ \LWR at traceinfo{Using font shape \LWR at f@shape}%
+ \@nameuse{LWR at print@\LWR at f@shape shape}%
+ \LWR at traceinfo{Using font caps shape \LWR at f@shapecaps}%
+ \@nameuse{LWR at print@\LWR at f@shapecaps shape}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+
% \DescribeMacro{\$}
% Plain dollar signs appearing in the \HTML\ output may be interpreted
% by \brand{MathJax} to be math shifts.
@@ -31260,7 +31840,8 @@
}
}
}{% lwarp_baseline_marker.png or .eps is not present
- \PackageWarningNoLine{lwarp}{File \LWR at baselinename\space is not installed\MessageBreak
+ \PackageWarningNoLine{lwarp}{%
+ File \LWR at baselinename\space is not installed\MessageBreak
alongside the lwarp-*.sty files,\MessageBreak
so SVG math baselines may not be accurate}
\newcommand*{\LWR at addbaselinemarker}{}
@@ -31312,7 +31893,7 @@
% MathJax cannot parse the often complicated \TeX\ expressions which
% appear in the various uses of \cs{ensuredmath}.
% \cs{ensuremath} forces the \attribute{alt} tag to ``|(math image)|'', as
-% translated according to \cs{mathimagename}.
+% translated according to \cs{MathImageAltText}.
% If this is the case, force the use of a \env{lateximage} even if MathJax.
% Likewise for \pkg{siunitx} if |parse-numbers=false|.
%
@@ -31326,7 +31907,11 @@
bool{mathjax} or
( bool{FormatWP} and bool{WPMarkMath} )
) and
- ( not test { \ifstrequal {#2} {(\mathimagename)} } ) and % from \ensuredmath
+ ( not test {
+ \ifstrequal {#2}
+ {\AltTextOpen\MathImageAltText\AltTextClose} % from \ensuredmath
+ }
+ ) and
( not bool{LWR at dynamicmath} )
}%
% \end{macrocode}
@@ -31352,20 +31937,14 @@
% Temporarily disable formatting while measuring the image parameters:
% \begin{macrocode}
\LWR at restoreorigformatting%
- \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% inside group
\LWR at print@normalsize%
% \end{macrocode}
% Temporarily set font for the \HTML\ \PDF\ output:
% \changes{v0.51}{2018/03/14}{Fix: Honors text font around \SVG\ math.}
+% \changes{v0.74}{2019/09/01}{Fix: Font control.}
% \begin{macrocode}
- \LWR at traceinfo{Using font family \LWR at f@family}%
- \@nameuse{LWR at orig\LWR at f@family family}%
- \LWR at traceinfo{Using font series \LWR at f@series}%
- \@nameuse{LWR at orig\LWR at f@series series}%
- \LWR at traceinfo{Using font shape \LWR at f@shape}%
- \@nameuse{LWR at orig\LWR at f@shape shape}%
- \LWR at traceinfo{Using font caps shape \LWR at f@shapecaps}%
- \@nameuse{LWR at orig\LWR at f@shapecaps shape}%
+ \LWR at setcurrentfont%
% \end{macrocode}
% |lateximagedepth| must be nested to avoid generating paragraph tags.
% \AmS\ math modifies the \cs{text} macro such that \cs{addtocounter} does not
@@ -31511,11 +32090,12 @@
% When hashing, also include the current font and color in the hash.
% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
+% \changes{v0.74}{2019/08/20}{Adds star argument for \env{lateximage}.}
% \begin{macrocode}
\ifbool{LWR at dynamicmath}{%
\LWR at traceinfo{subsingledollar: dynamic}%
\begin{lateximage}% no hashing
- [(\mathimagename)]% alt tag
+ [\MathImageAltText]% alt tag
[]% no add'l hashing
[\LWR at singledollarstyle \LWR at singledollardepthstyle]% CSS
}{%
@@ -31533,6 +32113,7 @@
% \begin{macrocode}
\begin{lateximage}*% use hashing
[#2]% alt
+ *% do not add open/closing braces
[% addl' hashing
#3%
FM\LWR at f@family%
@@ -31582,6 +32163,11 @@
}% not mathjax
\endgroup%
}% not in a lateximage
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
\LWR at traceinfo{LWR at subsingledollar: done}%
}
% \end{macrocode}
@@ -31657,6 +32243,7 @@
\LWR at HTMLsanitize{#1} % extra space
\textbackslash{]}%
]%
+ *% do not add open/closing braces
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -31668,6 +32255,11 @@
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}%
% \end{macrocode}
% \end{macro}
@@ -31696,6 +32288,11 @@
{singledollar}% add'l hashing
{\LWR at origensuredmath{#1}}% contents
}% not mathjax
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}
% \end{macrocode}
% \end{macro}
@@ -31740,7 +32337,7 @@
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
- \LWR at subsingledollar*{(\mathimagename)}{%
+ \LWR at subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
\protect\LWR at HTMLsanitize{\detokenize\expandafter{#1}}%
}{\relax%
\LWR at origensuredmath{#1}%
@@ -31759,7 +32356,7 @@
\ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}%
{\LWR at origensuredmath{#1}}%
{%
- \LWR at subsingledollar*{(\mathimagename)}{%
+ \LWR at subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
\protect\LWR at HTMLsanitize{\detokenize\expandafter{#1}}%
}{%
\LWR at origensuredmath{#1}%
@@ -31767,6 +32364,11 @@
}%
\fi%
}%
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}
% \end{macrocode}
% \end{macro}
@@ -31810,6 +32412,7 @@
% A version of \env{displaymath} which can handle complicated objects,
% but does not supply \brand{MathJax} or \HTML\ \attribute{alt} tags.
% \changes{v0.51}{2018/03/21}{Processing for complicated display math.}
+% \changes{v0.74}{2019/08/07}{Uses \cs{MathImageAltText}.}
% \begin{macrocode}
\newenvironment{LWR at displaymathother}
{%
@@ -31817,7 +32420,7 @@
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
\begin{lateximage}%
- [(display math)]%
+ [\MathImageAltText]%
\LWR at origdollar\LWR at origdollar%
}
{%
@@ -31833,6 +32436,7 @@
% A version of \env{displaymath} which can handle complicated objects,
% but does not supply \brand{MathJax} or \HTML\ \attribute{alt} tags.
% \changes{v0.51}{2018/03/21}{Processing for complicated display math.}
+% \changes{v0.74}{2019/08/07}{Uses \cs{MathImageAltText}.}
% \begin{macrocode}
\newenvironment{LWR at equationother}
{%
@@ -31839,8 +32443,7 @@
\begin{BlockClass}{displaymathnumbered}%
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}%
- [(display math)]%
+ \begin{lateximage}[\MathImageAltText]%
\LWR at origequation%
}
{%
@@ -32065,7 +32668,7 @@
\textbackslash{begin\{#2\}} % extra space
\LWR at HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
\textbackslash{end\{#2\}}%
- ]% alt tag
+ ]*% alt tag
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -32081,6 +32684,11 @@
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}
% \end{macrocode}
%
@@ -32094,6 +32702,11 @@
\LWR at addmathjax{#1}{\BODY}%
}{}%
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}
% \end{macrocode}
% \end{macro}
@@ -32421,7 +33034,7 @@
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
\begin{lateximage}[(\LWR at startingequationtag--\LWR at equationtag)
- \LWR at addmathjax{eqnarray}{\BODY}]
+ \LWR at addmathjax{eqnarray}{\BODY}]*
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -32445,7 +33058,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[\LWR at addmathjax{eqnarray*}{\BODY}]
+ \begin{lateximage}[\LWR at addmathjax{eqnarray*}{\BODY}]*
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -32466,6 +33079,11 @@
% Default to number equations in the future:
% \begin{macrocode}
\booltrue{LWR at numbereqnarray}
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}
% \end{macrocode}
%
@@ -32531,9 +33149,9 @@
% for text copy/paste. In some other cases, the \attribute{alt} tag is set
% according to the package name.
%
-% \describemathimagename
+% \describeMathImageAltText
%
-% \describepackagediagramname
+% \describePackageDiagramAltText
%
% \limitslateximagefontsize
%
@@ -32603,13 +33221,14 @@
% \begin{macro}{\LateximageFontScale}
% \changes{v0.52}{2018/03/24}{Added user-adjustable \SVG\ math font scaling.}
+% \changes{v0.74}{2019/09/02}{Adjusted \SVG\ math font scaling default to 1.}
% Declares how large to scale inline \SVG\ math images. The |.svg| file text size
% should blend well with the surrounding \HTML\ text size.
-% The default is .75, but it may be redefined as needed depending on the
+% The default is 1, but it may be redefined as needed depending on the
% \HTML\ font.
%
% \begin{macrocode}
-\newcommand*{\LateximageFontScale}{.75}
+\newcommand*{\LateximageFontScale}{1}
% \end{macrocode}
% \end{macro}
@@ -32850,11 +33469,60 @@
% \subsection{\env{lateximage} environment}
-% \begin{environment}{lateximage} * \oarg{2: \element{alt} tag}
-% \oarg{3: add'l hashing} \oarg{4: \CSS\ style}
+
+% \begin{macro}{\LWR at lateximage@oneimageb} \marg{1: alt text} \marg{2: filename}
+% \marg{3: CSS style}
+% Creates the image for the \env{lateximage}.
%
+% \changes{v0.74}{2019/08/26}{Factored from \env{lateximage}.}
+% \begin{macrocode}
+\newcommand{\LWR at lateximage@oneimageb}[3]{%
+ \LWR at subinlineimage{#1}{lateximage}%
+ {%
+ \LWR at print@mbox{%
+ \LWR at ImagesDirectory\OSPathSymbol%
+ #2%
+ }%
+ }{svg}{#3}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at lateximage@oneimage} \marg{1: alt text} \marg{2: filename}
+% \marg{3: \CSS\ style} \marg{4: delimit?}
+%
+% Creates an image for the \env{lateximage},
+% whose \attribute{alt} text depends on the circumstances.
+%
+% \changes{v0.74}{2019/08/26}{Factored from \env{lateximage}.}
+% \begin{macrocode}
+\newcommand{\LWR at lateximage@oneimage}[4]{%
+ \ifdefvoid{\LWR at ThisAltText}{%
+ \IfBooleanTF{#4}{%
+ \LWR at lateximage@oneimageb{#1}{#2}{#3}%
+ }{%
+ \LWR at lateximage@oneimageb%
+ {\AltTextOpen#1\AltTextClose}%
+ {#2}{#3}%
+ }%
+ }{%
+ \LWR at lateximage@oneimageb%
+ {\AltTextOpen\LWR at ThisAltText\AltTextClose}%
+ {#2}{#3}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{environment}{lateximage} * \oarg{2: \element{alt} tag} *
+% \oarg{4: add'l hashing} \oarg{5: \CSS\ style}
+%
% Typesets the contents and then renders the result as an \SVG\ file.
-% Star causes the image to be hashed for reuse.
+% Star \#1 causes the image to be hashed for reuse.
+% Star \#3 causes the \attribute{alt} tag to not include \cs{AltTextOpen} and
+% \cs{AltTextClose}, for use with math expressions.
%
% The optional \element{alt} tag is included in the \HTML\ code for use with copy/paste.
%
@@ -32889,12 +33557,13 @@
% the \protect\env{lateximage} \protect\env{minipage}.}
% \changes{v0.47}{2018/01/24}{Added \CSS\ style option.}
% \changes{v0.51}{2018/03/07}{Added additional hashing option.}
-% \changes{v0.66}{2019/01/27}{Adds \cs{BaseJobname} for multiple projects.}
+% \changes{v0.66}{2019/01/27}{Added \cs{BaseJobname} for multiple projects.}
+% \changes{v0.74}{2019/08/20}{Added second starred argument.}
%
% \begin{macrocode}
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{s O{(image)} O{} O{}}
+\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{}}
{%
\LWR at traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\LWR at traceinfo{lateximage: entering depth is \arabic{LWR at lateximagedepth}}%
@@ -32973,14 +33642,25 @@
\LWR at traceinfo{lateximage: about to write to \BaseJobname-images.txt}%
\IfBooleanTF{#1}% starred
{% hash
- \LWR at traceinfo{lateximage: hash true, adding %
- !\detokenize\expandafter{#2}!\detokenize\expandafter{#3}!}%
% \end{macrocode}
% Compute and save the hashed file name for later use:
% \changes{v0.52}{2018/03/25}{Fix for hash expansion.}
+% \changes{v0.74}{2019/09/01}{Improved \attribute{alt} text.}
% \begin{macrocode}
- \edef\LWR at hashedname{%
- \LWR at mdfive{\detokenize\expandafter{#2}-!-#3}%
+ \ifdefvoid{\LWR at ThisAltText}{%
+ \IfBooleanTF{#3}{%
+ \edef\LWR at hashedname{%
+ \LWR at mdfive{\detokenize\expandafter{#2}-!-#4}%
+ }%
+ }{%
+ \edef\LWR at hashedname{%
+ \LWR at mdfive{\detokenize\expandafter{\AltTextOpen#2\AltTextClose}-!-#4}%
+ }%
+ }%
+ }{%
+ \edef\LWR at hashedname{%
+ \LWR at mdfive{\detokenize\expandafter{\AltTextOpen\LWR at ThisAltText\AltTextClose}-!-#4}%
+ }%
}%
\LWR at traceinfo{lateximage: hash is \LWR at hashedname}%
% \end{macrocode}
@@ -33114,21 +33794,14 @@
% Create a link to the lateximage, allowing its natural height:
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
+% \changes{v0.74}{2019/08/20}{New syntax for \cs{LWR at subinlineimage}.}
% \begin{macrocode}
\IfBooleanTF{#1}% starred
{% hash
- \LWR at subinlineimage[#2]{lateximage}%
- {%
- \LWR at ImagesDirectory\OSPathSymbol%
- \LWR at print@mbox{\LWR at hashedname}%
- }{svg}{#4}%
+ \LWR at lateximage@oneimage{#2}{\LWR at hashedname}{#5}{#3}%
}% hash
{% no hash
- \LWR at subinlineimage[#2]{lateximage}%
- {%
- \LWR at ImagesDirectory\OSPathSymbol%
- \LWR at print@mbox{\LWR at ImagesName\theLWR at externalfilecnt}%
- }{svg}{#4}%
+ \LWR at lateximage@oneimage{#2}{\LWR at ImagesName\theLWR at externalfilecnt}{#5}{#3}%
}% no hash
% \end{macrocode}
% Be sure that are doing a paragraph:
@@ -33146,6 +33819,11 @@
% This is not inside an \AmS\ \cs{text}, so regular \cs{addtocounter} may be used here.
% \begin{macrocode}
\addtocounter{LWR at lateximagedepth}{-1}%
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+ \gdef\LWR at ThisAltText{}%
}% end of outer-most lateximage
\LWR at traceinfo{lateximage: exiting depth is \arabic{LWR at lateximagedepth}}%
\LWR at traceinfo{lateximage: done}%
@@ -33160,13 +33838,15 @@
\begin{warpprint}
% \end{macrocode}
-% \begin{environment}{lateximage} \oarg{\element{alt} tag} \oarg{\CSS\ style}
+% \begin{environment}{lateximage} * \oarg{\element{alt} tag} *
+% \oarg{add'l hashing} \oarg{\CSS\ style}
%
% \env{varwidth} is used to create a box of the natural width of its contents.
%
% \changes{v0.48}{2018/02/02}{Print mode boxed to natural width.}
+% \changes{v0.74}{2019/08/20}{Added second starred argument.}
% \begin{macrocode}
-\NewDocumentEnvironment{lateximage}{s o o o}
+\NewDocumentEnvironment{lateximage}{s o s o o}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
% \end{macrocode}
@@ -33975,7 +34655,7 @@
% \changes{v0.44}{2017/11/16}{\pkg{overpic}: Fix: Groups for lateximages.}
% \changes{v0.59}{2018/09/05}{Added an \attribute{alt} tag.}
% \begin{macrocode}
-\BeforeBeginEnvironment{picture}{\begin{lateximage}[(picture)]}
+\BeforeBeginEnvironment{picture}{\begin{lateximage}[picture]}
\AfterEndEnvironment{picture}{\end{lateximage}}
% \end{macrocode}
@@ -35138,7 +35818,7 @@
% \end{macrocode}
% \changes{v0.73}{2019/06/24}{Fix: \cs{hspace} in sectioning file name.}
% \begin{macrocode}
-\RenewDocumentCommand{\hspace}{s m}{}
+\RenewDocumentCommand{\hspace}{s m}{}%
% \end{macrocode}
% \begin{macrocode}
\RenewDocumentCommand{\LWR at htmlspanclass}{o m +m}{##3}%
@@ -35816,6 +36496,7 @@
% \changes{v0.19}{2016/05/29}{Fix: \cs{hspace} length computations.}
% \changes{v0.20}{2016/08/22}{Add: Supports \HTML\ thin breakable space.}
% \changes{v0.24}{2017/03/14}{Add: \cs{hspace} \cs{fill} converts to 2em}
+% \changes{v0.74}{2019/08/04}{Ignore negative space.}
%
% Prints a span of a given width. Ignores the optional star.
%
@@ -35831,9 +36512,9 @@
\setlength{\LWR at tempwidth}{2em}%
\fi%
% \end{macrocode}
-% Only if the width is not zero:
+% Only if the width is greater than zero:
% \begin{macrocode}
-\ifdimcomp{\LWR at tempwidth}{=}{0pt}{}{%
+\ifdimcomp{\LWR at tempwidth}{>}{0pt}{%
% \end{macrocode}
% If had a minipage this paragraph, try to inline the
% white space without generating paragraph tags:
@@ -35882,7 +36563,7 @@
% white space without generating paragraph tags:
% \begin{macrocode}
\LWR at minipagestartpars%
-}% width not 0
+}{}% width greater than 0
}%
}
% \end{macrocode}
@@ -36996,7 +37677,7 @@
\let\LWR at academicons@orig at AI\AI
\newcommand*{\LWR at academicons@symbol}[1]{%
- \begin{lateximage}*[(academicon)][academicons#1]%
+ \begin{lateximage}*[academicon][academicons#1]%
\begingroup%
\LWR at academicons@orig at AI%
\LWR at orig@symbol{#1}%
@@ -37010,7 +37691,7 @@
\renewcommand*{\aiicon}[1]
{%
- \begin{lateximage}*[(#1 icon)][academicons#1]%
+ \begin{lateximage}*[#1 icon][academicons#1]%
\AI\csname aiicon@#1\endcsname%
\end{lateximage}%
}
@@ -37810,7 +38491,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[\LWR at amsmathbodynumbered{#1}]
+ \begin{lateximage}[\LWR at amsmathbodynumbered{#1}]*
\LWR at applyxfakebold%
}
% \end{macrocode}
@@ -37867,6 +38548,11 @@
\LWR at addmathjax{#1}{\the\@envbody}
}
{\LWR at amsmathenv@@after}
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -38676,12 +39362,14 @@
% \end{macrocode}
%
% \begin{macrocode}
-\BeforeBeginEnvironment{asy}{\begin{lateximage}[(-asymptote-~\packagediagramname)]}
+\BeforeBeginEnvironment{asy}{%
+ \begin{lateximage}[-asymptote-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{asy}{\end{lateximage}}
\xpatchcmd{\asyinclude}
{\begingroup}
- {\begin{lateximage}[(-asymptote-~\packagediagramname)]}
+ {\begin{lateximage}[-asymptote-~\PackageDiagramAltText]}
{}
{\LWR at patcherror{asymptote}{asyinclude-begingroup}}
@@ -39145,7 +39833,9 @@
% \end{macrocode}
% \begin{macrocode}
-\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(-axopicture-~\packagediagramname)]}
+\BeforeBeginEnvironment{axopicture}{%
+ \begin{lateximage}[-axopicture-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{axopicture}{\end{lateximage}}
% \end{macrocode}
@@ -39849,7 +40539,7 @@
% \begin{macrocode}
\xpatchcmd{\bitpattern}
{\begingroup}
- {\begin{lateximage}[(-bitpattern-~\packagediagramname)]}
+ {\begin{lateximage}[-bitpattern-~\PackageDiagramAltText]}
{}
{\LWR at patcherror{bitpattern}{bitpattern}}
@@ -40279,7 +40969,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dmath- \mathimagename]
+ \begin{lateximage}[-breqn dmath- \MathImageAltText]
}
\AfterEndEnvironment{dmath}{
@@ -40290,7 +40980,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dmath*- \mathimagename]
+ \begin{lateximage}[-breqn dmath*- \MathImageAltText]
}
\AfterEndEnvironment{dmath*}{
@@ -40301,7 +40991,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dseries- \mathimagename]
+ \begin{lateximage}[-breqn dseries- \MathImageAltText]
}
\AfterEndEnvironment{dseries}{
@@ -40312,7 +41002,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dseries*- \mathimagename]
+ \begin{lateximage}[-breqn dseries*- \MathImageAltText]
}
\AfterEndEnvironment{dseries*}{
@@ -40323,7 +41013,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dgroup- \mathimagename]
+ \begin{lateximage}[-breqn dgroup- \MathImageAltText]
}
\AfterEndEnvironment{dgroup}{
@@ -40334,7 +41024,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dgroup*- \mathimagename]
+ \begin{lateximage}[-breqn dgroup*- \MathImageAltText]
}
\AfterEndEnvironment{dgroup*}{
@@ -40427,7 +41117,9 @@
% \end{macrocode}
% \begin{macrocode}
-\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(-bytefield-~\packagediagramname)]}
+\BeforeBeginEnvironment{bytefield}{%
+ \begin{lateximage}[-bytefield-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{bytefield}{\end{lateximage}}
% \end{macrocode}
@@ -40792,7 +41484,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-cases- \mathimagename]
+ \begin{lateximage}[-cases- \MathImageAltText]
}
\AfterEndEnvironment{numcases}{
@@ -40803,7 +41495,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-cases- \mathimagename]
+ \begin{lateximage}[-cases- \MathImageAltText]
}
\AfterEndEnvironment{subnumcases}{
@@ -41214,7 +41906,7 @@
\LetLtxMacro\LWR at chemfig@origchemfig\chemfig
\renewcommand*{\chemfig}[2][]{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origchemfig[#1]{#2}%
\end{lateximage}%
}
@@ -41221,12 +41913,14 @@
\GlobalLetLtxMacro\LWR at chemfig@origCF_lewisc\CF_lewisc
\gdef\CF_lewisc#1,#2\_nil{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origCF_lewisc#1,#2\_nil
\end{lateximage}
}
- \gpreto{\schemestart}{\begin{lateximage}[(-chemfig-~\packagediagramname)]}
+ \gpreto{\schemestart}{%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
+ }
\gappto{\CF_schemestop}{\end{lateximage}}
}% 2019/04/18 or newer
@@ -41235,7 +41929,7 @@
\LetLtxMacro\LWR at chemfig@origchemfig\chemfig
\DeclareDocumentCommand\chemfig{s O{} O{} m}{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\IfBooleanTF{#1}{%
\LWR at chemfig@origchemfig*[#2][#3]{#4}%
}{%
@@ -41247,12 +41941,14 @@
\LetLtxMacro\LWR at chemfig@origCF at lewis@b\CF at lewis@b
\def\CF at lewis@b#1#2{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origCF at lewis@b{#1}{#2}%
\end{lateximage}%
}
- \preto{\schemestart}{\begin{lateximage}[(-chemfig-~\packagediagramname)]}
+ \preto{\schemestart}{%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
+ }
\appto{\CF at schemestop}{\end{lateximage}}
}% older than 2019/04/18
@@ -41264,7 +41960,7 @@
\LetLtxMacro\LWR at chemfig@origchemleft\chemleft
\def\chemleft#1#2\chemright#3{%
-\begin{lateximage}[(-chemfig-~\packagediagramname)]%
+\begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origchemleft#1#2\chemright#3%
\end{lateximage}%
}
@@ -41272,7 +41968,7 @@
\LetLtxMacro\LWR at chemfig@origchemup\chemup
\def\chemup#1#2\chemdown#3{%
-\begin{lateximage}[(-chemfig-~\packagediagramname)]%
+\begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origchemup#1#2\chemdown#3%
\end{lateximage}%
}
@@ -41393,7 +42089,7 @@
% \begin{macrocode}
\RenewDocumentCommand \charrow { mO{}O{} }
{
- \begin{lateximage}[(-chemformula- charrow)]
+ \begin{lateximage}[-chemformula- charrow]
\group_begin:
\__chemformula_draw_arrow:nnn {#1} {#2} {#3}
\group_end:
@@ -41409,7 +42105,7 @@
{
\begin{lateximage}*[%
\textbackslash{}chname(\LWR at HTMLsanitize{#1})(\LWR at HTMLsanitize{#2})
- ]%
+ ]*%
\chemformula_chwritebelow:nn {#1} {#2}
\end{lateximage}
}
@@ -41729,7 +42425,7 @@
% \begin{noindenvironment}{polymerdelims}
% \begin{macrocode}
\DeclareDocumentEnvironment{polymerdelims}{}
-{\begin{lateximage}[(-chemmacros- polymer)]}
+{\begin{lateximage}[-chemmacros- polymer]}
{\end{lateximage}}
% \end{macrocode}
% \end{noindenvironment}
@@ -41741,7 +42437,7 @@
% For the print output version, see \cref{sec:chemmacrosprintenvs}.
% \begin{macrocode}
\DeclareDocumentEnvironment{redoxreaction}{m m}
-{\begin{lateximage}[(-chemmacros- redoxreaction)]}
+{\begin{lateximage}[-chemmacros- redoxreaction]}
{\end{lateximage}}
% \end{macrocode}
% \end{noindenvironment}
@@ -41942,13 +42638,13 @@
%
% \begin{macrocode}
\RenewDocumentCommand \Sconf { O{S} } {
-\begin{lateximage}[\textbackslash{}Sconf{[}#1{]}]
+\begin{lateximage}[\textbackslash{}Sconf{[}#1{]}]*
\chemmacros_sconf:n {#1}
\end{lateximage}
}
\RenewDocumentCommand \Rconf { O{R} } {
-\begin{lateximage}[\textbackslash{}Rconf{[}#1{]}]
+\begin{lateximage}[\textbackslash{}Rconf{[}#1{]}]*
\chemmacros_rconf:n {#1}
\end{lateximage}
}
@@ -42210,8 +42906,8 @@
\RenewDocumentCommand \newman {od()m}%
{
\IfValueTF{#2}
- {\begin{lateximage}[\textbackslash{}newman(#2)\{#3\}]}
- {\begin{lateximage}[\textbackslash{}newman\{#3\}]}
+ {\begin{lateximage}[\textbackslash{}newman(#2)\{#3\}]*}
+ {\begin{lateximage}[\textbackslash{}newman\{#3\}]*}
\group_begin:
\IfNoValueF {#1} { \chemmacros_set_keys:nn {newman} {#1} }
\IfNoValueTF {#2}
@@ -42238,12 +42934,12 @@
{
\begin{lateximage}[%
\textbackslash{}orbital{[}\LWR at HTMLsanitize{#1}{]}\{#2\}%
- ][][margin-left: 1em ; margin-right: 1em]
+ ]*[][margin-left: 1em ; margin-right: 1em]
}
{
\begin{lateximage}[%
\textbackslash{}orbital\{#2\}%
- ][][margin-left: 1em ; margin-right: 1em]
+ ]*[][margin-left: 1em ; margin-right: 1em]
}
\group_begin:
\chemmacros_set_keys:nn {orbital/type} {#2}
@@ -42272,7 +42968,10 @@
{
\exp_args:Nnx \DeclareDocumentEnvironment {#1} { O{} \prg_replicate:nn {#3+0} {m} }
{
- \boolfalse{mathjax}% lwarp
+ \boolfalse{mathjax}% lwarp
+ \ifdefvoid{\LWR at ThisAltText}{% lwarp
+ \ThisAltText{-chemmacros-~reaction}% lwarp
+ }{}% lwarp
\chemmacros_add_reaction_description:n {##1}
\__chemmacros_begin_reaction:
\chemmacros_reaction_read:nnw {#2} {#4}
@@ -42279,6 +42978,7 @@
}
{
\__chemmacros_end_reaction:
+ \gdef\LWR at ThisAltText{}% lwarp
}
}
\cs_generate_variant:Nn \chemmacros_declare_reaction_env:nnnn {nnnV}
@@ -47192,7 +47892,7 @@
\newfontfamily{\LWR at orig@FA}{FontAwesome}
\newcommand*{\LWR at fontawesome@xelatex at symbol}[1]{%
-\begin{lateximage}*[(icon)][fontawesomexetex#1]%
+\begin{lateximage}*[icon][fontawesomexetex#1]%
\begingroup%
\LWR at orig@FA%
\LWR at orig@symbol{#1}%
@@ -47207,7 +47907,7 @@
\else
\newcommand*{\LWR at fontawesome@symbolone}[1]{%
-\begin{lateximage}*[(icon #1)][fontawesomeone#1]%
+\begin{lateximage}*[icon #1][fontawesomeone#1]%
\begingroup%
\fontencoding{U}\fontfamily{fontawesomeone}\selectfont%
\LWR at orig@symbol{#1}%
@@ -47216,7 +47916,7 @@
}
\newcommand*{\LWR at fontawesome@symboltwo}[1]{%
-\begin{lateximage}*[(icon #1)][fontawesometwo#1]%
+\begin{lateximage}*[icon #1][fontawesometwo#1]%
\begingroup%
\fontencoding{U}\fontfamily{fontawesometwo}\selectfont%
\LWR at orig@symbol{#1}%
@@ -47225,7 +47925,7 @@
}
\newcommand*{\LWR at fontawesome@symbolthree}[1]{%
-\begin{lateximage}*[(icon #1)][fontawesomethree#1]%
+\begin{lateximage}*[icon #1][fontawesomethree#1]%
\begingroup%
\fontencoding{U}\fontfamily{fontawesomeonethree}\selectfont%
\LWR at orig@symbol{#1}%
@@ -47284,7 +47984,7 @@
\ExplSyntaxOn
\cs_set:Nn\fontawesome_use_icon:nn{
\cs_if_exist:cTF{c__fontawesome_slot_#2_tl}{
- \begin{lateximage}*[(#2)][#1]
+ \begin{lateximage}*[#2][#1]
\exp_last_unbraced:Nv
\__fontawesome_icon_at:nnnn
{c__fontawesome_slot_#2_tl}
@@ -47708,6 +48408,7 @@
% global results of the starred \cs{Forest*} are lost.
%
% \changes{v0.54}{2018/04/14}{\pkg{forest}: Added.}
+% \changes{v0.74}{2019/09/01}{\pkg{forest}: \attribute{alt} text.}
%
% \codehtml
%
@@ -47728,7 +48429,7 @@
{Lwarp uses an environment for images, but \Forest* cannot work in an environment.}%
\let\forest at next\forest at env%
}{\let\forest at next\forest at group@env}%
- \begin{lateximage}[forest]% lwarp
+ \begin{lateximage}[-forest-~\PackageDiagramAltText]% lwarp
\forest at next{#3}%
\end{lateximage}% lwarp
}
@@ -48138,15 +48839,49 @@
% as seen by the user's source code.
%
% \changes{v0.22}{2017/03/01}{\pkg{geometry}: Nullified commands.}
+% \changes{v0.74}{2019/08/13}{\pkg{geometry}: Remembers user's geometry.}
%
% \codehtml
%
% Discard all options for \pkg{lwarp-geometry}:
% \begin{macrocode}
-\LWR at ProvidesPackageDrop{geometry}[2018/04/16]
+\LWR at ProvidesPackageDropA{geometry}{2018/04/16}
% \end{macrocode}
%
+% If \pkg{geometry} is never loaded by the user,
+% it will be loaded by \pkg{lwarp} \cs{AtBeginDocument}.
+% If this is the case, the page layout should not be changed
+% but the user macros should still be nullified.
% \begin{macrocode}
+\ifbool{LWR at allowanothergeometry}{%
+% \end{macrocode}
+%
+% Gather all options:
+% \begin{macrocode}
+\newcommand*{\LWR at newgeometryoptions}{reset,}
+
+\DeclareOption*{%
+ \edef\LWR at newgeometryoptions{\LWR at newgeometryoptions\CurrentOption,}%
+}
+% \end{macrocode}
+%
+% Process the options:
+% \begin{macrocode}
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% Assign and set the selected geometry.
+% \cs{AtEndPreamble} \pkg{lwarp} will save this, then set its own geometry.
+% \begin{macrocode}
+\ifdefvoid{\LWR at newgeometryoptions}{}{
+ \expandafter\LWR at origgeometry\expandafter{\LWR at newgeometryoptions}
+}
+
+}{}% LWR at allowanothergeometry
+% \end{macrocode}
+%
+% The user-level commands are nullified:
+% \begin{macrocode}
\renewcommand*{\geometry}[1]{}
\renewcommand*{\newgeometry}[1]{}
\renewcommand*{\restoregeometry}{}
@@ -48415,7 +49150,7 @@
% \end{macrocode}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
% \begin{macrocode}
-\newcommand*{\LWR at igalt}{(image)}
+\newcommand*{\LWR at igalt}{\ImageAltText}
% \end{macrocode}
% Set the actions of each of the key/value combinations for
@@ -48482,7 +49217,7 @@
% \end{macrocode}
%
%
-% Handle origin key:
+% Handle \optn{origin} key:
% \changes{v0.52}{2018/03/27}{pkg{graphics}: Added defaults.}
% \begin{macrocode}
\define at key{igraph}{origin}[c]{%
@@ -48491,19 +49226,20 @@
% \end{macrocode}
%
%
-% Handle angle key:
+% Handle \optn{angle} key:
% \begin{macrocode}
\define at key{igraph}{angle}{\renewcommand*{\LWR at igangle}{#1}}
% \end{macrocode}
%
%
-% Handle class key:
+% Handle \optn{class} key:
% \begin{macrocode}
\define at key{igraph}{class}{\renewcommand*{\LWR at igclass}{#1}}
% \end{macrocode}
%
-% Handle alt key:
+% Handle \optn{alt} key:
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
\define at key{igraph}{alt}{\renewcommand*{\LWR at igalt}{#1}}
% \end{macrocode}
@@ -48736,8 +49472,13 @@
\renewcommand*{\LWR at igclass}{inlineimage}%
% \end{macrocode}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\renewcommand*{\LWR at igalt}{(image)}%
+\ifdefvoid{\LWR at ThisAltText}{%
+ \renewcommand*{\LWR at igalt}{\ImageAltText}%
+}{%
+ \renewcommand*{\LWR at igalt}{\LWR at ThisAltText}%
+}%
% \end{macrocode}
%
% If |#3| is empty, only one optional argument was given, thus \pkg{graphicx} syntax:
@@ -48897,7 +49638,7 @@
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
% \begin{macrocode}
class="\LWR at igclass"\LWR at indentHTML%
-alt="\LWR at igalt" \LWR at orignewline%
+alt="\AltTextOpen\LWR at igalt\AltTextClose" \LWR at orignewline%
}% end of image tags
}% end of href
% \end{macrocode}
@@ -48905,6 +49646,11 @@
% \changes{v0.48}{2018/02/11}{Fix: Virtual page size limited to a group.}
% \begin{macrocode}
\endgroup
+% \end{macrocode}
+% Clear the single-use \attribute{alt} text:
+% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \begin{macrocode}
+\gdef\LWR at ThisAltText{}%
\LWR at traceinfo{LWR at includegraphicsb done}%
}
% \end{macrocode}
@@ -48978,7 +49724,7 @@
% \end{macro}
%
%
-% Handle the origin key for \cs{rotatebox}:
+% Handle the \optn{origin} key for \cs{rotatebox}:
% \begin{macrocode}
\define at key{krotbox}{origin}{%
\renewcommand*{\LWR at rotboxorigin}{#1}%
@@ -49722,6 +50468,7 @@
\detokenize\expandafter{#1}\LWR at hashmark%
\detokenize\expandafter{#2}.\detokenize\expandafter{#3}%
"%
+ \LWR at addlinktitle%
}%
\endgroup%
\LWR at hyperreffinish%
@@ -52759,54 +53506,153 @@
% \DescribePackage{lyluatex}
% \pkg{lyluatex} is patched for use by \pkg{lwarp}.
%
-%
% For the first compile, to set \prog{lwarpmk}'s configuration, use:
% \begin{sourceverb}
% lualatex --shell-escape <filename>
% \end{sourceverb}
%
-% Avoid using the \optn{insert=fullpage} option, or use it
-% inside \cs{warpprintonly} or the \env{warpprint} environment.
+% After compiling the document with \cmds{lwarpmk html},
+% \watchout[images]
+% use \cmds{lwarpmk limages} to convert the Lilypond images for \HTML.
%
+% The option \optn{insert=systems} results in an image per system.
+% Each music image ``system'' is placed inside a
+% \margintag{\CSS}
+% \element{span} of class \attribute{lyluatex},
+% which defaults to |display: inline-block|.
+%
+% The option \optn{insert=fullpage} results in a single image per
+% \watchout[\optn{insert=fullpage}]
+% page of printed output.
+% Each music ``fullpage'' image is placed inside a
+% \margintag{\CSS}
+% \element{div} of class \attribute{lyluatex}.
+% To match the number of measures per line with the printed version,
+% use the \pkg{geometry} package to select the page geometry, or
+% use the \pkg{lyluatex} options for page and staff sizes.
+%
+% To use \cs{linewidth} or \cs{textwidth} inside the package options for
+% \watchout[options]
+% \pkg{lyluatex}, use the \pkg{kvoptions-patch} package first:
+% \begin{sourceverb}
+% \usepackage{kvoptions-patch}
+% \usepackage[...,line-width-0.8\linewidth,...]{lyluatex}
+% \end{sourceverb}
+%
+% If using \optn{raw-pdf}, the resulting \PDF\ images must be converted
+% \watchout[\optn{raw-pdf}]
+% to \SVG:
+% \userentry{lwarpmk pdftosvg tmp-ly/*.pdf}
+%
% \changes{v0.73}{2019/06/10}{\pkg{lyluatex}: Added.}
%
% \codehtml
%
% \begin{macrocode}
+\LWR at origRequirePackage{luacode}
+
\LWR at ProvidesPackagePass{lyluatex}[2019/05/27]
% \end{macrocode}
%
% User-redefinable \attribute{ALT} tag:
+% \changes{v0.74}{2019/08/25}{\pkg{lyluatex}: Renamef \cs{lyluateximagename}.}
% \begin{macrocode}
-\newcommand*{\lyluateximagename}{(-lilypond-~\packagediagramname)}
+\newcommand*{\LyluatexImageAltText}{-lilypond-~\PackageDiagramAltText}
% \end{macrocode}
%
+% \begin{noindmacro}{\ly at compilescore} \marg{\prog{Lilypond} object}
+% \changes{v0.74}{2019/08/04}{\pkg{lyluatex}: Split system images, assign class.}
% \begin{macrocode}
\LetLtxMacro\LWR at orig@ly at compilescore\ly at compilescore
\renewcommand*{\ly at compilescore}[1]{%
- \begin{lateximage}[\lyluateximagename]%
- \LWR at orig@ly at compilescore{#1}%
- \end{lateximage}%
+% \end{macrocode}
+%
+% A local group holds a number of changes:
+% \begin{macrocode}
+ \begingroup%
+% \end{macrocode}
+%
+% The user's original geometry and font size are restored to match the print version.
+% This allows for correct spacing in the musical score.
+% \changes{v0.74}{2019/08/13}{\pkg{lyluatex}: Adapts to user's geometry.}
+% \begin{macrocode}
+ \LWR at orignewpage%
+ \LWR at origloadgeometry{LWR at usergeometry}%
+ \LWR at print@normalsize%
+% \end{macrocode}
+%
+% A local group holds a redefined \cs{includegraphics} which
+% is used by \prog{lyluatex.lua} to insert the \prog{Lilypond} score
+% if \optn{insert=systems} is used.
+% This is now placed inside a \env{lateximage}, which itself is placed
+% inside a \element{span} of class \attribute{lyluatex}.
+%
+% \cs{LWR at addbaselinemarker} preserves the left margins.
+% \changes{v0.74}{2019/08/05}{\pkg{lyluatex}: Preserves left margin.}
+% \begin{macrocode}
+ \renewcommand{\includegraphics}[2][]{%
+ \InlineClass{lyluatex}{%
+ \begin{lateximage}[\LyluatexImageAltText]%
+ \LWR at addbaselinemarker%
+ \LWR at origincludegraphics{##2}%
+ \end{lateximage}%
+ }%
+ }%
+% \end{macrocode}
+%
+% From the original:
+% \begin{macrocode}
+ \ly at setunits%
+ \directlua{
+ ly_opts:set_option('currfiledir', [[\currfiledir]])
+ ly_opts:set_option('twoside', '\ly at istwosided')
+ #1
+ }%
+ \ly at resetunits%
+ \ly at currentfonts%
+% \end{macrocode}
+% The fullpage version is set inside an \HTML\ \element{div}:
+% \begin{macrocode}
+ \directlua{
+ if (ly.score.insert == 'fullpage') then
+ tex.print{[[\string\begin{BlockClass}{lyluatex}]]}
+ end
+ }%
+% \end{macrocode}
+% Generate the score:
+% \begin{macrocode}
+ \directlua{ly.score:process()}%
+% \end{macrocode}
+% Close the \element{div}:
+% \begin{macrocode}
+ \directlua{
+ if (ly.score.insert == 'fullpage') then
+ tex.print{[[\string\end{BlockClass}]]}
+ end
+ }%
+% \end{macrocode}
+% Move to a new page and renew the regular page geometry:
+% \begin{macrocode}
+ \LWR at orignewpage%
+ \LWR at origrestoregeometry%
+% \end{macrocode}
+% End of the local group.
+% \begin{macrocode}
+ \endgroup%
}
-
-\AtBeginDocument{
- \lysetoption{paperwidth}{6in}
- \lysetoption{paperheight}{9in}
- \lysetoption{line-width}{5.5in}
- \lysetoption{twoside}{false}
- \lysetoption{fullpagestyle}{empty}
- \lysetoption{fullpagealign}{crop}
- \lysetoption{print-page-number}{false}
- \lysetoption{insert}{systems}
- \lysetoption{extra-top-margin}{0}
- \lysetoption{extra-bottom-margin}{0}
- \lysetoption{valign}{center}
- \lysetoption{staffsize}{20}
- \lysetoption{inline-staffsize}{14}
-}
% \end{macrocode}
+% \end{noindmacro}
%
+% In \HTML\ the following generates an error, so is removed:
+% \begin{macrocode}
+\xpatchcmd{\endly at bufferenv}
+ {\hspace{0pt}\\}
+ {}
+ {}
+ {\LWR at patcherror{lyluatex}{endly at bufferenv}}
+% \end{macrocode}
+%
% \iffalse
%</lyluatex>
% \fi
@@ -53187,7 +54033,7 @@
%
% \begin{macrocode}
\renewcommand{\mvchr}[1]{%
- \begin{lateximage}*[(symbol #1)][marvosym #1]%
+ \begin{lateximage}*[symbol #1][marvosym #1]%
\mvs\char#1%
\end{lateximage}%
}
@@ -54200,6 +55046,7 @@
% \end{Verbatim}
%
% \changes{v0.51}{2018/03/04}{\pkg{mhchem}: Added.}
+% \changes{v0.74}{2019/08/26}{\pkg{mhchem}: Modified for new \env{lateximage}.}
%
% \codehtml
%
@@ -54217,7 +55064,20 @@
% The \attribute{alt} tag is set to the \pkg{mhchem} expression.
% \begin{macrocode}
\newcommand{\LWR at mhchem@HTML at ce}[1]{%
-\begin{lateximage}*[\textbackslash{}ce\{\LWR at HTMLsanitize{#1}\}]%
+\LWR at findcurrenttextcolor% sets \LWR at tempcolor
+\ifbool{LWR at xfakebold}%
+ {\def\LWR at tempone{Y}}%
+ {\def\LWR at tempone{N}}%
+\begin{lateximage}*[\textbackslash{}ce\{\LWR at HTMLsanitize{#1}\}]*%
+ [%
+ FM\LWR at f@family%
+ SR\LWR at f@series%
+ SH\LWR at f@shape%
+ SHC\LWR at f@shapecaps%
+ CL\LWR at tempcolor%
+ FB\LWR at tempone% xfakebold
+ ]%
+\LWR at setcurrentfont%
\LWR at mhchem@origce{#1}%
\end{lateximage}%
\endgroup%
@@ -54254,7 +55114,20 @@
% \begin{macrocode}
\newcommand*{\LWR at mhchem@HTML at cesplit}[2]
{%
-\begin{lateximage}*[\textbackslash{}cesplit\{\LWR at HTMLsanitize{#2}\}]%
+\LWR at findcurrenttextcolor% sets \LWR at tempcolor
+\ifbool{LWR at xfakebold}%
+ {\def\LWR at tempone{Y}}%
+ {\def\LWR at tempone{N}}%
+\begin{lateximage}*[\textbackslash{}cesplit\{\LWR at HTMLsanitize{#2}\}]*%
+ [%
+ FM\LWR at f@family%
+ SR\LWR at f@series%
+ SH\LWR at f@shape%
+ SHC\LWR at f@shapecaps%
+ CL\LWR at tempcolor%
+ FB\LWR at tempone% xfakebold
+ ]%
+\LWR at setcurrentfont%
\LWR at mhchem@origcesplit{#1}{#2}%
\end{lateximage}%
\endgroup%
@@ -55259,7 +56132,7 @@
\LWR at formatted{musDottedNote}
\NewDocumentCommand{\LWR at HTML@musMeter}{ m m }{%
-\begin{lateximage}*[#1/#2][#1#2]%
+\begin{lateximage}*[#1/#2][#1#2]*%
\musStack{#1 #2}\kern0.05em%
\end{lateximage}%
}
@@ -55267,7 +56140,7 @@
\LWR at formatted{musMeter}
\NewDocumentCommand{\LWR at HTML@meterCplus}{ m }{%
-\begin{lateximage}*[C#1]%
+\begin{lateximage}*[C#1]*%
\meterC{}\kern-0.7pt#1%
\end{lateximage}%
}
@@ -55275,7 +56148,7 @@
\LWR at formatted{meterCplus}
\NewDocumentCommand{\LWR at HTML@meterC}{}{%
-\begin{lateximage}*[C]%
+\begin{lateximage}*[C]*%
\musSymbolMeter{\symbol{83}}%
\end{lateximage}%
}
@@ -55283,7 +56156,7 @@
\LWR at formatted{meterC}
\NewDocumentCommand{\LWR at HTML@meterCutC}{}{%
-\begin{lateximage}*[C|]%
+\begin{lateximage}*[C|]*%
\musSymbolMeter{\symbol{82}}%
\end{lateximage}%
}
@@ -55291,7 +56164,7 @@
\LWR at formatted{meterCutC}
\NewDocumentCommand{\LWR at HTML@meterCThreeTwo}{}{%
-\begin{lateximage}*[C3/2]%
+\begin{lateximage}*[C3/2]*%
\meterCplus{\musStack{3 2}}%
\end{lateximage}%
}
@@ -55313,9 +56186,9 @@
\LetLtxMacro\musFlat\LWR at HTML@musFlat%
\LetLtxMacro\musDoubleFlat\LWR at HTML@musDoubleFlat%
\LetLtxMacro\musNatural\LWR at HTML@musNatural%
- ({#1})% braces here because \noFig uses []
+ {#1}% braces here because \noFig uses []
}%
-]%
+]*%
\musStack[\musFigFont]{#1}%
\end{lateximage}%
}
@@ -57891,7 +58764,7 @@
{%
% \end{macrocode}
%
-% If the \optn{link} option was specified, add a hyper taraget:
+% If the \optn{link} option was specified, add a hyper target:
% \begin{macrocode}
\ifAM at link%
\hypertarget{\AM at linkname.\AM at page}{}%
@@ -57935,12 +58808,13 @@
% \end{macrocode}
% \end{noindmacro}
%
-% \begin{noindmacro}{\includepdf} Patched to set a reasonable paper size.
+% \begin{noindmacro}{\includepdf} Patched to set the user's paper size.
+% \changes{v0.74}{2019/08/16}{\pkg{pdfpages}: Adjust to user's paper size.}
% \begin{macrocode}
\xpretocmd{\includepdf}{%
\begingroup%
- \setlength{\paperwidth}{8in}%
- \setlength{\paperheight}{10.5in}%
+ \setlength{\paperwidth}{\LWR at userspaperwidth}%
+ \setlength{\paperheight}{\LWR at userspaperheight}%
}{}{}
\xapptocmd{\includepdf}{%
@@ -57949,12 +58823,13 @@
% \end{macrocode}
% \end{noindmacro}
-% \begin{noindmacro}{\includepdfmerge} Patched to set a reasonable paper size.
+% \begin{noindmacro}{\includepdfmerge} Patched to set the user's paper size.
+% \changes{v0.74}{2019/08/16}{\pkg{pdfpages}: Adjust to user's paper size.}
% \begin{macrocode}
\xpretocmd{\includepdfmerge}{%
\begingroup%
- \setlength{\paperwidth}{8in}%
- \setlength{\paperheight}{10.5in}%
+ \setlength{\paperwidth}{\LWR at userspaperwidth}%
+ \setlength{\paperheight}{\LWR at userspaperheight}%
}{}{}
\xapptocmd{\includepdfmerge}{%
@@ -58326,7 +59201,7 @@
%
% \begin{macrocode}
\renewcommand{\Pisymbol}[2]{%
- \begin{lateximage}*[(Pisymbol)][pisymbol#1#2]%
+ \begin{lateximage}*[Pisymbol][pisymbol#1#2]%
{\Pifont{#1}\char#2}%
\end{lateximage}%
}
@@ -58677,7 +59552,7 @@
% A \env{lateximage} captures the modified image from the document.
% \begin{macrocode}
\BeforeBeginEnvironment{psfrags}{%
- \begin{lateximage}[(-psfrags-~\packagediagramname)]%
+ \begin{lateximage}[-psfrags-~\PackageDiagramAltText]%
}
\AfterEndEnvironment{psfrags}{\end{lateximage}}
@@ -58715,13 +59590,13 @@
% A \env{lateximage} captures the modified image from the document.
% \begin{macrocode}
\def\pfx at includegraphicx#1#2{%
- \begin{lateximage}[(-psfragx-~\packagediagramname)]%
+ \begin{lateximage}[-psfragx-~\PackageDiagramAltText]%
\mbox{\pfx at overpix{#1}{#2}\endpfx at overpix}%
\end{lateximage}%
}
\def\@@@overpix[#1]<#2>[#3]#4{%
- \begin{lateximage}[(-psfragx-~\packagediagramname)]%
+ \begin{lateximage}[-psfragx-~\PackageDiagramAltText]%
\pfx at overpix{#1,ovpfgd={#2},ovpbgd={#3}}{#4}%
}
@@ -58797,7 +59672,7 @@
%
% \begin{macrocode}
\renewcommand\pstool at alwaysprocess[3][]{%
- \begin{lateximage}[(-pstool-~\packagediagramname)]%
+ \begin{lateximage}[-pstool-~\PackageDiagramAltText]%
\includegraphics{#2.pdf}%
\end{lateximage}%
}
@@ -58805,7 +59680,7 @@
\LetLtxMacro\pstool at maybeprocess\pstool at alwaysprocess
\renewcommand\pstool@@psfragfig[4]{%
- \begin{lateximage}[(-pstool-~\packagediagramname)]%
+ \begin{lateximage}[-pstool-~\PackageDiagramAltText]%
\includegraphics{#2.pdf}%
\end{lateximage}%
}
@@ -58841,7 +59716,9 @@
% \end{macrocode}
%
% \begin{macrocode}
-\BeforeBeginEnvironment{pspicture}{\begin{lateximage}[(pspicture)]}
+\BeforeBeginEnvironment{pspicture}{%
+ \begin{lateximage}[pspicture]%
+}
\AfterEndEnvironment{pspicture}{\end{lateximage}}
% \end{macrocode}
%
@@ -59290,7 +60167,10 @@
% \begin{macrocode}
\xpatchcmd{\register}
{\centering}
- {\begin{center}\begin{lateximage}[(-register-~\packagediagramname)]}
+ {%
+ \begin{center}%
+ \begin{lateximage}[-register-~\PackageDiagramAltText]%
+ }
{}
{\LWR at patcherror{register}{register}}
@@ -59304,7 +60184,10 @@
{\LWR at patcherror{register}{endregister}}
\expandafter\xapptocmd\csname register*\endcsname
- {\begin{center}\begin{lateximage}[(-register-~\packagediagramname)]}
+ {%
+ \begin{center}%
+ \begin{lateximage}[-register-~\PackageDiagramAltText]%
+ }
{}
{\LWR at patcherror{register}{register*}}
@@ -61005,8 +61888,8 @@
% and adds the \attribute{alt} tag containing the \LaTeX\ code, allowing for
% copy/paste. When units are used outside of the \cs{unit} macro,
% each unit macro will have its own \env{lateximage},
-% and each will have the \attribute{alt} tag set to ``|(|<\cs{mathimagename}>|)|'',
-% which defaults to ``|(math image)|''.
+% and each will have the \attribute{alt} tag set according to \cs{MathImageAltText},
+% which defaults to \optn{(math image)}.
%
% \changes{v0.59}{2018/07/11}{\pkg{SIunits}: Added.}
%
@@ -61806,6 +62689,7 @@
% \pkg{stackengine} is patched for use by \pkg{lwarp}.
%
% \changes{v0.73}{2019/06/11}{\pkg{stackengine}: Added.}
+% \changes{v0.74}{2019/09/01}{\pkg{stackengine}: \attribute{alt} tags.}
%
% \codehtml
%
@@ -61822,8 +62706,8 @@
% \begin{macrocode}
\renewcommand*{\stackengine}[8]{%
\ifstrequal{#4}{O}%
- {\begin{lateximage}}%
- {\begin{lateximage}[][][vertical-align:top]}%
+ {\begin{lateximage}[\ImageAltText]}%
+ {\begin{lateximage}[\ImageAltText][][vertical-align:top]}%
\LWR at orig@stackengine{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
\end{lateximage}%
}
@@ -61839,8 +62723,8 @@
\renewcommand*{\@stack}[4]{%
\ifstrequal{#3}{O}%
- {\begin{lateximage}}%
- {\begin{lateximage}[][][vertical-align:top]}%
+ {\begin{lateximage}[\ImageAltText]}%
+ {\begin{lateximage}[\ImageAltText][][vertical-align:top]}%
\LWR at orig@@stack{#1}{#2}{#3}{#4}%
\end{lateximage}%
}
@@ -61865,7 +62749,8 @@
{}
{\LWR at patcherror{stackengine}{stackanchor patch 2}}
-\xpretocmd{\stackanchor}{\begin{lateximage}[][][vertical-align:middle]}
+\xpretocmd{\stackanchor}
+ {\begin{lateximage}[\ImageAltText][][vertical-align:middle]}
{}
{\LWR at patcherror{stackengine}{stackanchor pre}}
@@ -61876,7 +62761,8 @@
%
% \cs{Centerstack} is simply placed inside a \env{lateximage} with a vertical alignment:
% \begin{macrocode}
-\xpretocmd{\Centerstack}{\begin{lateximage}[][][vertical-align:middle]}
+\xpretocmd{\Centerstack}
+ {\begin{lateximage}[\ImageAltText][][vertical-align:middle]}
{}
{\LWR at patcherror{stackengine}{Centerstack pre}}
@@ -61895,7 +62781,7 @@
}{}%
\begingroup% lwarp
\LWR at restoreorigformatting% lwarp
- \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% lwarp: inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% lwarp: inside group
\expandafter\LWR at gsavebox\csname\sv at name content\endcsname{#2}%
\expandafter\gdef\expandafter#1\expandafter{%
\expandafter\begin\expandafter{lateximage\expandafter}% lwarp
@@ -61975,6 +62861,7 @@
% \pkg{struktex} is patched for use by \pkg{lwarp}.
%
% \changes{v0.67}{2019/02/17}{\pkg{struktex}: Added.}
+% \changes{v0.74}{2019/09/01}{\pkg{struktex}: \attribute{alt} text.}
%
% \codehtml
%
@@ -61983,7 +62870,9 @@
% \end{macrocode}
%
% \begin{macrocode}
-\BeforeBeginEnvironment{struktogramm}{\begin{lateximage}[(struktogramm)]}
+\BeforeBeginEnvironment{struktogramm}{%
+ \begin{lateximage}[-struktex-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{struktogramm}{\end{lateximage}}
\newenvironment{LWR at HTML@centernss}{\begin{center}}{\end{center}}
@@ -63781,6 +64670,7 @@
% \changes{v0.51}{2018/03/06}{\pkg{tikz}: Fix for \cs{tikz} macro.}
% \changes{v0.51}{2018/03/20}{\pkg{tikz}: Fix for \env{tikz} with optional argument.}
% \changes{v0.54}{2018/04/16}{\pkg{tikz}: Fixes for \cs{pgfpicture}, minipages, fit, align, font.}
+% \changes{v0.74}{2019/08/09}{\pkg{tikz}: Added \attribute{alt} text.}
%
% \begin{noindenvironment}{pgfpicture}
% The \cs{pgfpicture} environment is enclosed inside a \cs{lateximage}.
@@ -63789,7 +64679,7 @@
%
% \begin{macrocode}
\preto\pgfpicture{%
- \begin{lateximage}%
+ \begin{lateximage}[-tikz-~\PackageDiagramAltText]%
\ifbool{LWR at tikzbabel}% Test for Tikz version v3.0.0
{}%
{\catcode`\$=3}% dollar sign is math shift
@@ -66050,7 +66940,7 @@
\let\LWR at orig@typicon at TI\TI
\newcommand*{\LWR at typicon@symbol}[1]{%
- \begin{lateximage}*[(typicon)][typicon#1]%
+ \begin{lateximage}*[typicon][typicon#1]%
\begingroup%
\LWR at orig@typicon at TI%
\LWR at orig@symbol{#1}%
@@ -66064,7 +66954,7 @@
\renewcommand*{\ticon}[1]
{%
- \begin{lateximage}*[(#1 icon)][typicon#1]%
+ \begin{lateximage}*[#1 icon][typicon#1]%
\TI\csname ticon@#1\endcsname%
\end{lateximage}%
}
@@ -66755,7 +67645,7 @@
% \begin{macrocode}
\renewenvironment{vowel}[1][]
{%
- \begin{lateximage}[(-vowel-~\packagediagramname)]%
+ \begin{lateximage}[-vowel-~\PackageDiagramAltText]%
\@vowel[#1]%
}
{%
@@ -68395,7 +69285,9 @@
\NewDocumentCommand{\LWR at HTML@keyboard}{ O{}m }
{
\begin{lateximage}*
- [(-xpiano-~\packagediagramname{}: \detokenize\expandafter{#2})]
+ [%
+ -xpiano-~\PackageDiagramAltText{}: \detokenize\expandafter{#2}%
+ ]
[\detokenize\expandafter{#1}]
\xpiano_keyboard:nn { #1 } { #2 }
\end{lateximage}
@@ -68785,7 +69677,7 @@
\renewcommand*{\xy}{%
\ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}%
{\addtocounter{LWR at lateximagedepth}{1}}%
- {\begin{lateximage}[(-xy-~\packagediagramname)]}%
+ {\begin{lateximage}[-xy-~\PackageDiagramAltText]}%
\LWR at orig@xy%
}
@@ -68812,7 +69704,7 @@
\LetLtxMacro\LWR at origxygraph\xygraph
\renewcommand{\xygraph}[1]{%
- \begin{lateximage}[(-xy- xygraph \packagediagramname)]
+ \begin{lateximage}[-xy- xygraph \PackageDiagramAltText]
\LWR at origxygraph{#1}
\end{lateximage}
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-academicons.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-academicons.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-academicons.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -21,7 +21,7 @@
\let\LWR at academicons@orig at AI\AI
\newcommand*{\LWR at academicons@symbol}[1]{%
- \begin{lateximage}*[(academicon)][academicons#1]%
+ \begin{lateximage}*[academicon][academicons#1]%
\begingroup%
\LWR at academicons@orig at AI%
\LWR at orig@symbol{#1}%
@@ -35,7 +35,7 @@
\renewcommand*{\aiicon}[1]
{%
- \begin{lateximage}*[(#1 icon)][academicons#1]%
+ \begin{lateximage}*[#1 icon][academicons#1]%
\AI\csname aiicon@#1\endcsname%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -39,7 +39,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[\LWR at amsmathbodynumbered{#1}]
+ \begin{lateximage}[\LWR at amsmathbodynumbered{#1}]*
\LWR at applyxfakebold%
}
\newcommand*{\LWR at amsmathenv@before}[1]{%
@@ -67,6 +67,7 @@
\LWR at addmathjax{#1}{\the\@envbody}
}
{\LWR at amsmathenv@@after}
+\gdef\LWR at ThisAltText{}%
}
\BeforeBeginEnvironment{multline}{\LWR at amsmathenv@before{multline}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-asymptote.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-asymptote.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-asymptote.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -16,12 +16,14 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{asymptote}[2016/11/26]
-\BeforeBeginEnvironment{asy}{\begin{lateximage}[(-asymptote-~\packagediagramname)]}
+\BeforeBeginEnvironment{asy}{%
+ \begin{lateximage}[-asymptote-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{asy}{\end{lateximage}}
\xpatchcmd{\asyinclude}
{\begingroup}
- {\begin{lateximage}[(-asymptote-~\packagediagramname)]}
+ {\begin{lateximage}[-asymptote-~\PackageDiagramAltText]}
{}
{\LWR at patcherror{asymptote}{asyinclude-begingroup}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -18,7 +18,9 @@
\LWR at ProvidesPackagePass{axodraw2}[2018/02/15]
-\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(-axopicture-~\packagediagramname)]}
+\BeforeBeginEnvironment{axopicture}{%
+ \begin{lateximage}[-axopicture-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{axopicture}{\end{lateximage}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bitpattern.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bitpattern.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bitpattern.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -18,7 +18,7 @@
\LWR at ProvidesPackagePass{bitpattern}[2015/12/11]
\xpatchcmd{\bitpattern}
{\begingroup}
- {\begin{lateximage}[(-bitpattern-~\packagediagramname)]}
+ {\begin{lateximage}[-bitpattern-~\PackageDiagramAltText]}
{}
{\LWR at patcherror{bitpattern}{bitpattern}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breqn.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breqn.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breqn.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -24,7 +24,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dmath- \mathimagename]
+ \begin{lateximage}[-breqn dmath- \MathImageAltText]
}
\AfterEndEnvironment{dmath}{
@@ -35,7 +35,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dmath*- \mathimagename]
+ \begin{lateximage}[-breqn dmath*- \MathImageAltText]
}
\AfterEndEnvironment{dmath*}{
@@ -46,7 +46,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dseries- \mathimagename]
+ \begin{lateximage}[-breqn dseries- \MathImageAltText]
}
\AfterEndEnvironment{dseries}{
@@ -57,7 +57,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dseries*- \mathimagename]
+ \begin{lateximage}[-breqn dseries*- \MathImageAltText]
}
\AfterEndEnvironment{dseries*}{
@@ -68,7 +68,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dgroup- \mathimagename]
+ \begin{lateximage}[-breqn dgroup- \MathImageAltText]
}
\AfterEndEnvironment{dgroup}{
@@ -79,7 +79,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-breqn dgroup*- \mathimagename]
+ \begin{lateximage}[-breqn dgroup*- \MathImageAltText]
}
\AfterEndEnvironment{dgroup*}{
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -18,7 +18,9 @@
\LWR at ProvidesPackagePass{bytefield}[2017/09/15]
-\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(-bytefield-~\packagediagramname)]}
+\BeforeBeginEnvironment{bytefield}{%
+ \begin{lateximage}[-bytefield-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{bytefield}{\end{lateximage}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cases.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -20,7 +20,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-cases- \mathimagename]
+ \begin{lateximage}[-cases- \MathImageAltText]
}
\AfterEndEnvironment{numcases}{
@@ -31,7 +31,7 @@
\begin{BlockClass}{displaymathnumbered}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[-cases- \mathimagename]
+ \begin{lateximage}[-cases- \MathImageAltText]
}
\AfterEndEnvironment{subnumcases}{
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -27,7 +27,7 @@
\LetLtxMacro\LWR at chemfig@origchemfig\chemfig
\renewcommand*{\chemfig}[2][]{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origchemfig[#1]{#2}%
\end{lateximage}%
}
@@ -34,12 +34,14 @@
\GlobalLetLtxMacro\LWR at chemfig@origCF_lewisc\CF_lewisc
\gdef\CF_lewisc#1,#2\_nil{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origCF_lewisc#1,#2\_nil
\end{lateximage}
}
- \gpreto{\schemestart}{\begin{lateximage}[(-chemfig-~\packagediagramname)]}
+ \gpreto{\schemestart}{%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
+ }
\gappto{\CF_schemestop}{\end{lateximage}}
}% 2019/04/18 or newer
@@ -48,7 +50,7 @@
\LetLtxMacro\LWR at chemfig@origchemfig\chemfig
\DeclareDocumentCommand\chemfig{s O{} O{} m}{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\IfBooleanTF{#1}{%
\LWR at chemfig@origchemfig*[#2][#3]{#4}%
}{%
@@ -60,12 +62,14 @@
\LetLtxMacro\LWR at chemfig@origCF at lewis@b\CF at lewis@b
\def\CF at lewis@b#1#2{%
- \begin{lateximage}[(-chemfig-~\packagediagramname)]%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origCF at lewis@b{#1}{#2}%
\end{lateximage}%
}
- \preto{\schemestart}{\begin{lateximage}[(-chemfig-~\packagediagramname)]}
+ \preto{\schemestart}{%
+ \begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
+ }
\appto{\CF at schemestop}{\end{lateximage}}
}% older than 2019/04/18
@@ -75,7 +79,7 @@
\LetLtxMacro\LWR at chemfig@origchemleft\chemleft
\def\chemleft#1#2\chemright#3{%
-\begin{lateximage}[(-chemfig-~\packagediagramname)]%
+\begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origchemleft#1#2\chemright#3%
\end{lateximage}%
}
@@ -83,7 +87,7 @@
\LetLtxMacro\LWR at chemfig@origchemup\chemup
\def\chemup#1#2\chemdown#3{%
-\begin{lateximage}[(-chemfig-~\packagediagramname)]%
+\begin{lateximage}[-chemfig-~\PackageDiagramAltText]%
\LWR at chemfig@origchemup#1#2\chemdown#3%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -68,7 +68,7 @@
}
\RenewDocumentCommand \charrow { mO{}O{} }
{
- \begin{lateximage}[(-chemformula- charrow)]
+ \begin{lateximage}[-chemformula- charrow]
\group_begin:
\__chemformula_draw_arrow:nnn {#1} {#2} {#3}
\group_end:
@@ -78,7 +78,7 @@
{
\begin{lateximage}*[%
\textbackslash{}chname(\LWR at HTMLsanitize{#1})(\LWR at HTMLsanitize{#2})
- ]%
+ ]*%
\chemformula_chwritebelow:nn {#1} {#2}
\end{lateximage}
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -25,11 +25,11 @@
\ExplSyntaxOff
\DeclareDocumentEnvironment{polymerdelims}{}
-{\begin{lateximage}[(-chemmacros- polymer)]}
+{\begin{lateximage}[-chemmacros- polymer]}
{\end{lateximage}}
\DeclareDocumentEnvironment{redoxreaction}{m m}
-{\begin{lateximage}[(-chemmacros- redoxreaction)]}
+{\begin{lateximage}[-chemmacros- redoxreaction]}
{\end{lateximage}}
\ExplSyntaxOn
\AtBeginDocument{
@@ -198,13 +198,13 @@
}
\EndChemCompatibility
\RenewDocumentCommand \Sconf { O{S} } {
-\begin{lateximage}[\textbackslash{}Sconf{[}#1{]}]
+\begin{lateximage}[\textbackslash{}Sconf{[}#1{]}]*
\chemmacros_sconf:n {#1}
\end{lateximage}
}
\RenewDocumentCommand \Rconf { O{R} } {
-\begin{lateximage}[\textbackslash{}Rconf{[}#1{]}]
+\begin{lateximage}[\textbackslash{}Rconf{[}#1{]}]*
\chemmacros_rconf:n {#1}
\end{lateximage}
}
@@ -441,8 +441,8 @@
\RenewDocumentCommand \newman {od()m}%
{
\IfValueTF{#2}
- {\begin{lateximage}[\textbackslash{}newman(#2)\{#3\}]}
- {\begin{lateximage}[\textbackslash{}newman\{#3\}]}
+ {\begin{lateximage}[\textbackslash{}newman(#2)\{#3\}]*}
+ {\begin{lateximage}[\textbackslash{}newman\{#3\}]*}
\group_begin:
\IfNoValueF {#1} { \chemmacros_set_keys:nn {newman} {#1} }
\IfNoValueTF {#2}
@@ -464,12 +464,12 @@
{
\begin{lateximage}[%
\textbackslash{}orbital{[}\LWR at HTMLsanitize{#1}{]}\{#2\}%
- ][][margin-left: 1em ; margin-right: 1em]
+ ]*[][margin-left: 1em ; margin-right: 1em]
}
{
\begin{lateximage}[%
\textbackslash{}orbital\{#2\}%
- ][][margin-left: 1em ; margin-right: 1em]
+ ]*[][margin-left: 1em ; margin-right: 1em]
}
\group_begin:
\chemmacros_set_keys:nn {orbital/type} {#2}
@@ -490,7 +490,10 @@
{
\exp_args:Nnx \DeclareDocumentEnvironment {#1} { O{} \prg_replicate:nn {#3+0} {m} }
{
- \boolfalse{mathjax}% lwarp
+ \boolfalse{mathjax}% lwarp
+ \ifdefvoid{\LWR at ThisAltText}{% lwarp
+ \ThisAltText{-chemmacros-~reaction}% lwarp
+ }{}% lwarp
\chemmacros_add_reaction_description:n {##1}
\__chemmacros_begin_reaction:
\chemmacros_reaction_read:nnw {#2} {#4}
@@ -497,6 +500,7 @@
}
{
\__chemmacros_end_reaction:
+ \gdef\LWR at ThisAltText{}% lwarp
}
}
\cs_generate_variant:Nn \chemmacros_declare_reaction_env:nnnn {nnnV}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -23,7 +23,7 @@
\newfontfamily{\LWR at orig@FA}{FontAwesome}
\newcommand*{\LWR at fontawesome@xelatex at symbol}[1]{%
-\begin{lateximage}*[(icon)][fontawesomexetex#1]%
+\begin{lateximage}*[icon][fontawesomexetex#1]%
\begingroup%
\LWR at orig@FA%
\LWR at orig@symbol{#1}%
@@ -38,7 +38,7 @@
\else
\newcommand*{\LWR at fontawesome@symbolone}[1]{%
-\begin{lateximage}*[(icon #1)][fontawesomeone#1]%
+\begin{lateximage}*[icon #1][fontawesomeone#1]%
\begingroup%
\fontencoding{U}\fontfamily{fontawesomeone}\selectfont%
\LWR at orig@symbol{#1}%
@@ -47,7 +47,7 @@
}
\newcommand*{\LWR at fontawesome@symboltwo}[1]{%
-\begin{lateximage}*[(icon #1)][fontawesometwo#1]%
+\begin{lateximage}*[icon #1][fontawesometwo#1]%
\begingroup%
\fontencoding{U}\fontfamily{fontawesometwo}\selectfont%
\LWR at orig@symbol{#1}%
@@ -56,7 +56,7 @@
}
\newcommand*{\LWR at fontawesome@symbolthree}[1]{%
-\begin{lateximage}*[(icon #1)][fontawesomethree#1]%
+\begin{lateximage}*[icon #1][fontawesomethree#1]%
\begingroup%
\fontencoding{U}\fontfamily{fontawesomeonethree}\selectfont%
\LWR at orig@symbol{#1}%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome5.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome5.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fontawesome5.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -19,7 +19,7 @@
\ExplSyntaxOn
\cs_set:Nn\fontawesome_use_icon:nn{
\cs_if_exist:cTF{c__fontawesome_slot_#2_tl}{
- \begin{lateximage}*[(#2)][#1]
+ \begin{lateximage}*[#2][#1]
\exp_last_unbraced:Nv
\__fontawesome_icon_at:nnnn
{c__fontawesome_slot_#2_tl}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-forest.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-forest.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-forest.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -30,7 +30,7 @@
{Lwarp uses an environment for images, but \Forest* cannot work in an environment.}%
\let\forest at next\forest at env%
}{\let\forest at next\forest at group@env}%
- \begin{lateximage}[forest]% lwarp
+ \begin{lateximage}[-forest-~\PackageDiagramAltText]% lwarp
\forest at next{#3}%
\end{lateximage}% lwarp
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,7 +17,19 @@
%% version 2005/12/01 or later.
-\LWR at ProvidesPackageDrop{geometry}[2018/04/16]
+\LWR at ProvidesPackageDropA{geometry}{2018/04/16}
+\ifbool{LWR at allowanothergeometry}{%
+\newcommand*{\LWR at newgeometryoptions}{reset,}
+
+\DeclareOption*{%
+ \edef\LWR at newgeometryoptions{\LWR at newgeometryoptions\CurrentOption,}%
+}
+\ProcessOptions\relax
+\ifdefvoid{\LWR at newgeometryoptions}{}{
+ \expandafter\LWR at origgeometry\expandafter{\LWR at newgeometryoptions}
+}
+
+}{}% LWR at allowanothergeometry
\renewcommand*{\geometry}[1]{}
\renewcommand*{\newgeometry}[1]{}
\renewcommand*{\restoregeometry}{}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -51,7 +51,7 @@
\newcommand*{\LWR at igxscale}{1}
\newcommand*{\LWR at igyscale}{1}
\newcommand*{\LWR at igclass}{inlineimage}
-\newcommand*{\LWR at igalt}{(image)}
+\newcommand*{\LWR at igalt}{\ImageAltText}
\define at key{igraph}{width}{%
\setlength{\LWR at igwidth}{#1}%
@@ -196,7 +196,11 @@
\renewcommand*{\LWR at igxscale}{1}%
\renewcommand*{\LWR at igyscale}{1}%
\renewcommand*{\LWR at igclass}{inlineimage}%
-\renewcommand*{\LWR at igalt}{(image)}%
+\ifdefvoid{\LWR at ThisAltText}{%
+ \renewcommand*{\LWR at igalt}{\ImageAltText}%
+}{%
+ \renewcommand*{\LWR at igalt}{\LWR at ThisAltText}%
+}%
\IfValueF{#3}{%
\IfValueTF{#2}%
{\setkeys{igraph}{#2}}%
@@ -316,10 +320,11 @@
"\LWR at indentHTML%
}{}%
class="\LWR at igclass"\LWR at indentHTML%
-alt="\LWR at igalt" \LWR at orignewline%
+alt="\AltTextOpen\LWR at igalt\AltTextClose" \LWR at orignewline%
}% end of image tags
}% end of href
\endgroup
+\gdef\LWR at ThisAltText{}%
\LWR at traceinfo{LWR at includegraphicsb done}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -82,6 +82,7 @@
\detokenize\expandafter{#1}\LWR at hashmark%
\detokenize\expandafter{#2}.\detokenize\expandafter{#3}%
"%
+ \LWR at addlinktitle%
}%
\endgroup%
\LWR at hyperreffinish%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lyluatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lyluatex.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lyluatex.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -15,31 +15,53 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
+\LWR at origRequirePackage{luacode}
+
\LWR at ProvidesPackagePass{lyluatex}[2019/05/27]
-\newcommand*{\lyluateximagename}{(-lilypond-~\packagediagramname)}
+\newcommand*{\LyluatexImageAltText}{-lilypond-~\PackageDiagramAltText}
\LetLtxMacro\LWR at orig@ly at compilescore\ly at compilescore
\renewcommand*{\ly at compilescore}[1]{%
- \begin{lateximage}[\lyluateximagename]%
- \LWR at orig@ly at compilescore{#1}%
- \end{lateximage}%
+ \begingroup%
+ \LWR at orignewpage%
+ \LWR at origloadgeometry{LWR at usergeometry}%
+ \LWR at print@normalsize%
+ \renewcommand{\includegraphics}[2][]{%
+ \InlineClass{lyluatex}{%
+ \begin{lateximage}[\LyluatexImageAltText]%
+ \LWR at addbaselinemarker%
+ \LWR at origincludegraphics{##2}%
+ \end{lateximage}%
+ }%
+ }%
+ \ly at setunits%
+ \directlua{
+ ly_opts:set_option('currfiledir', [[\currfiledir]])
+ ly_opts:set_option('twoside', '\ly at istwosided')
+ #1
+ }%
+ \ly at resetunits%
+ \ly at currentfonts%
+ \directlua{
+ if (ly.score.insert == 'fullpage') then
+ tex.print{[[\string\begin{BlockClass}{lyluatex}]]}
+ end
+ }%
+ \directlua{ly.score:process()}%
+ \directlua{
+ if (ly.score.insert == 'fullpage') then
+ tex.print{[[\string\end{BlockClass}]]}
+ end
+ }%
+ \LWR at orignewpage%
+ \LWR at origrestoregeometry%
+ \endgroup%
}
-
-\AtBeginDocument{
- \lysetoption{paperwidth}{6in}
- \lysetoption{paperheight}{9in}
- \lysetoption{line-width}{5.5in}
- \lysetoption{twoside}{false}
- \lysetoption{fullpagestyle}{empty}
- \lysetoption{fullpagealign}{crop}
- \lysetoption{print-page-number}{false}
- \lysetoption{insert}{systems}
- \lysetoption{extra-top-margin}{0}
- \lysetoption{extra-bottom-margin}{0}
- \lysetoption{valign}{center}
- \lysetoption{staffsize}{20}
- \lysetoption{inline-staffsize}{14}
-}
+\xpatchcmd{\endly at bufferenv}
+ {\hspace{0pt}\\}
+ {}
+ {}
+ {\LWR at patcherror{lyluatex}{endly at bufferenv}}
\endinput
%%
%% End of file `lwarp-lyluatex.sty'.
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-marvosym.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-marvosym.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-marvosym.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{marvosym}[2011/07/20]
\renewcommand{\mvchr}[1]{%
- \begin{lateximage}*[(symbol #1)][marvosym #1]%
+ \begin{lateximage}*[symbol #1][marvosym #1]%
\mvs\char#1%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -21,7 +21,20 @@
\LetLtxMacro\LWR at mhchem@origce\ce
\newcommand{\LWR at mhchem@HTML at ce}[1]{%
-\begin{lateximage}*[\textbackslash{}ce\{\LWR at HTMLsanitize{#1}\}]%
+\LWR at findcurrenttextcolor% sets \LWR at tempcolor
+\ifbool{LWR at xfakebold}%
+ {\def\LWR at tempone{Y}}%
+ {\def\LWR at tempone{N}}%
+\begin{lateximage}*[\textbackslash{}ce\{\LWR at HTMLsanitize{#1}\}]*%
+ [%
+ FM\LWR at f@family%
+ SR\LWR at f@series%
+ SH\LWR at f@shape%
+ SHC\LWR at f@shapecaps%
+ CL\LWR at tempcolor%
+ FB\LWR at tempone% xfakebold
+ ]%
+\LWR at setcurrentfont%
\LWR at mhchem@origce{#1}%
\end{lateximage}%
\endgroup%
@@ -44,7 +57,20 @@
\newcommand*{\LWR at mhchem@HTML at cesplit}[2]
{%
-\begin{lateximage}*[\textbackslash{}cesplit\{\LWR at HTMLsanitize{#2}\}]%
+\LWR at findcurrenttextcolor% sets \LWR at tempcolor
+\ifbool{LWR at xfakebold}%
+ {\def\LWR at tempone{Y}}%
+ {\def\LWR at tempone{N}}%
+\begin{lateximage}*[\textbackslash{}cesplit\{\LWR at HTMLsanitize{#2}\}]*%
+ [%
+ FM\LWR at f@family%
+ SR\LWR at f@series%
+ SH\LWR at f@shape%
+ SHC\LWR at f@shapecaps%
+ CL\LWR at tempcolor%
+ FB\LWR at tempone% xfakebold
+ ]%
+\LWR at setcurrentfont%
\LWR at mhchem@origcesplit{#1}{#2}%
\end{lateximage}%
\endgroup%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-musicography.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -50,7 +50,7 @@
\LWR at formatted{musDottedNote}
\NewDocumentCommand{\LWR at HTML@musMeter}{ m m }{%
-\begin{lateximage}*[#1/#2][#1#2]%
+\begin{lateximage}*[#1/#2][#1#2]*%
\musStack{#1 #2}\kern0.05em%
\end{lateximage}%
}
@@ -58,7 +58,7 @@
\LWR at formatted{musMeter}
\NewDocumentCommand{\LWR at HTML@meterCplus}{ m }{%
-\begin{lateximage}*[C#1]%
+\begin{lateximage}*[C#1]*%
\meterC{}\kern-0.7pt#1%
\end{lateximage}%
}
@@ -66,7 +66,7 @@
\LWR at formatted{meterCplus}
\NewDocumentCommand{\LWR at HTML@meterC}{}{%
-\begin{lateximage}*[C]%
+\begin{lateximage}*[C]*%
\musSymbolMeter{\symbol{83}}%
\end{lateximage}%
}
@@ -74,7 +74,7 @@
\LWR at formatted{meterC}
\NewDocumentCommand{\LWR at HTML@meterCutC}{}{%
-\begin{lateximage}*[C|]%
+\begin{lateximage}*[C|]*%
\musSymbolMeter{\symbol{82}}%
\end{lateximage}%
}
@@ -82,7 +82,7 @@
\LWR at formatted{meterCutC}
\NewDocumentCommand{\LWR at HTML@meterCThreeTwo}{}{%
-\begin{lateximage}*[C3/2]%
+\begin{lateximage}*[C3/2]*%
\meterCplus{\musStack{3 2}}%
\end{lateximage}%
}
@@ -104,9 +104,9 @@
\LetLtxMacro\musFlat\LWR at HTML@musFlat%
\LetLtxMacro\musDoubleFlat\LWR at HTML@musDoubleFlat%
\LetLtxMacro\musNatural\LWR at HTML@musNatural%
- ({#1})% braces here because \noFig uses []
+ {#1}% braces here because \noFig uses []
}%
-]%
+]*%
\musStack[\musFigFont]{#1}%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -81,8 +81,8 @@
{\LWR at patcherror{pdfpages}{AM at output-3}}
\xpretocmd{\includepdf}{%
\begingroup%
- \setlength{\paperwidth}{8in}%
- \setlength{\paperheight}{10.5in}%
+ \setlength{\paperwidth}{\LWR at userspaperwidth}%
+ \setlength{\paperheight}{\LWR at userspaperheight}%
}{}{}
\xapptocmd{\includepdf}{%
@@ -91,8 +91,8 @@
\xpretocmd{\includepdfmerge}{%
\begingroup%
- \setlength{\paperwidth}{8in}%
- \setlength{\paperheight}{10.5in}%
+ \setlength{\paperwidth}{\LWR at userspaperwidth}%
+ \setlength{\paperheight}{\LWR at userspaperheight}%
}{}{}
\xapptocmd{\includepdfmerge}{%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pifont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pifont.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pifont.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{pifont}[2005/04/12]
\renewcommand{\Pisymbol}[2]{%
- \begin{lateximage}*[(Pisymbol)][pisymbol#1#2]%
+ \begin{lateximage}*[Pisymbol][pisymbol#1#2]%
{\Pifont{#1}\char#2}%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfrag.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfrag.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfrag.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{psfrag}[1998/04/11]
\BeforeBeginEnvironment{psfrags}{%
- \begin{lateximage}[(-psfrags-~\packagediagramname)]%
+ \begin{lateximage}[-psfrags-~\PackageDiagramAltText]%
}
\AfterEndEnvironment{psfrags}{\end{lateximage}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfragx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfragx.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-psfragx.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,13 +17,13 @@
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{psfragx}[2012/05/02]
\def\pfx at includegraphicx#1#2{%
- \begin{lateximage}[(-psfragx-~\packagediagramname)]%
+ \begin{lateximage}[-psfragx-~\PackageDiagramAltText]%
\mbox{\pfx at overpix{#1}{#2}\endpfx at overpix}%
\end{lateximage}%
}
\def\@@@overpix[#1]<#2>[#3]#4{%
- \begin{lateximage}[(-psfragx-~\packagediagramname)]%
+ \begin{lateximage}[-psfragx-~\PackageDiagramAltText]%
\pfx at overpix{#1,ovpfgd={#2},ovpbgd={#3}}{#4}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstool.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstool.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstool.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{pstool}[2018/01/20]
\renewcommand\pstool at alwaysprocess[3][]{%
- \begin{lateximage}[(-pstool-~\packagediagramname)]%
+ \begin{lateximage}[-pstool-~\PackageDiagramAltText]%
\includegraphics{#2.pdf}%
\end{lateximage}%
}
@@ -25,7 +25,7 @@
\LetLtxMacro\pstool at maybeprocess\pstool at alwaysprocess
\renewcommand\pstool@@psfragfig[4]{%
- \begin{lateximage}[(-pstool-~\packagediagramname)]%
+ \begin{lateximage}[-pstool-~\PackageDiagramAltText]%
\includegraphics{#2.pdf}%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstricks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstricks.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pstricks.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -16,7 +16,9 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{pstricks}[2018/01/06]
-\BeforeBeginEnvironment{pspicture}{\begin{lateximage}[(pspicture)]}
+\BeforeBeginEnvironment{pspicture}{%
+ \begin{lateximage}[pspicture]%
+}
\AfterEndEnvironment{pspicture}{\end{lateximage}}
\endinput
%%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -20,7 +20,10 @@
\xpatchcmd{\register}
{\centering}
- {\begin{center}\begin{lateximage}[(-register-~\packagediagramname)]}
+ {%
+ \begin{center}%
+ \begin{lateximage}[-register-~\PackageDiagramAltText]%
+ }
{}
{\LWR at patcherror{register}{register}}
@@ -34,7 +37,10 @@
{\LWR at patcherror{register}{endregister}}
\expandafter\xapptocmd\csname register*\endcsname
- {\begin{center}\begin{lateximage}[(-register-~\packagediagramname)]}
+ {%
+ \begin{center}%
+ \begin{lateximage}[-register-~\PackageDiagramAltText]%
+ }
{}
{\LWR at patcherror{register}{register*}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-stackengine.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-stackengine.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-stackengine.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -19,8 +19,8 @@
\LetLtxMacro\LWR at orig@stackengine\stackengine
\renewcommand*{\stackengine}[8]{%
\ifstrequal{#4}{O}%
- {\begin{lateximage}}%
- {\begin{lateximage}[][][vertical-align:top]}%
+ {\begin{lateximage}[\ImageAltText]}%
+ {\begin{lateximage}[\ImageAltText][][vertical-align:top]}%
\LWR at orig@stackengine{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
\end{lateximage}%
}
@@ -32,8 +32,8 @@
\renewcommand*{\@stack}[4]{%
\ifstrequal{#3}{O}%
- {\begin{lateximage}}%
- {\begin{lateximage}[][][vertical-align:top]}%
+ {\begin{lateximage}[\ImageAltText]}%
+ {\begin{lateximage}[\ImageAltText][][vertical-align:top]}%
\LWR at orig@@stack{#1}{#2}{#3}{#4}%
\end{lateximage}%
}
@@ -47,7 +47,8 @@
{}
{\LWR at patcherror{stackengine}{stackanchor patch 2}}
-\xpretocmd{\stackanchor}{\begin{lateximage}[][][vertical-align:middle]}
+\xpretocmd{\stackanchor}
+ {\begin{lateximage}[\ImageAltText][][vertical-align:middle]}
{}
{\LWR at patcherror{stackengine}{stackanchor pre}}
@@ -54,7 +55,8 @@
\xapptocmd{\stackanchor}{\end{lateximage}}
{}
{\LWR at patcherror{stackengine}{stackanchor app}}
-\xpretocmd{\Centerstack}{\begin{lateximage}[][][vertical-align:middle]}
+\xpretocmd{\Centerstack}
+ {\begin{lateximage}[\ImageAltText][][vertical-align:middle]}
{}
{\LWR at patcherror{stackengine}{Centerstack pre}}
@@ -68,7 +70,7 @@
}{}%
\begingroup% lwarp
\LWR at restoreorigformatting% lwarp
- \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% lwarp: inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% lwarp: inside group
\expandafter\LWR at gsavebox\csname\sv at name content\endcsname{#2}%
\expandafter\gdef\expandafter#1\expandafter{%
\expandafter\begin\expandafter{lateximage\expandafter}% lwarp
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-struktex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-struktex.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-struktex.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -16,7 +16,9 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR at ProvidesPackagePass{struktex}[2018/06/04]
-\BeforeBeginEnvironment{struktogramm}{\begin{lateximage}[(struktogramm)]}
+\BeforeBeginEnvironment{struktogramm}{%
+ \begin{lateximage}[-struktex-~\PackageDiagramAltText]%
+}
\AfterEndEnvironment{struktogramm}{\end{lateximage}}
\newenvironment{LWR at HTML@centernss}{\begin{center}}{\end{center}}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -26,7 +26,7 @@
{\boolfalse{LWR at tikzbabel}}
\preto\pgfpicture{%
- \begin{lateximage}%
+ \begin{lateximage}[-tikz-~\PackageDiagramAltText]%
\ifbool{LWR at tikzbabel}% Test for Tikz version v3.0.0
{}%
{\catcode`\$=3}% dollar sign is math shift
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-typicons.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-typicons.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-typicons.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -21,7 +21,7 @@
\let\LWR at orig@typicon at TI\TI
\newcommand*{\LWR at typicon@symbol}[1]{%
- \begin{lateximage}*[(typicon)][typicon#1]%
+ \begin{lateximage}*[typicon][typicon#1]%
\begingroup%
\LWR at orig@typicon at TI%
\LWR at orig@symbol{#1}%
@@ -35,7 +35,7 @@
\renewcommand*{\ticon}[1]
{%
- \begin{lateximage}*[(#1 icon)][typicon#1]%
+ \begin{lateximage}*[#1 icon][typicon#1]%
\TI\csname ticon@#1\endcsname%
\end{lateximage}%
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -20,7 +20,7 @@
\renewenvironment{vowel}[1][]
{%
- \begin{lateximage}[(-vowel-~\packagediagramname)]%
+ \begin{lateximage}[-vowel-~\PackageDiagramAltText]%
\@vowel[#1]%
}
{%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -27,7 +27,9 @@
\NewDocumentCommand{\LWR at HTML@keyboard}{ O{}m }
{
\begin{lateximage}*
- [(-xpiano-~\packagediagramname{}: \detokenize\expandafter{#2})]
+ [%
+ -xpiano-~\PackageDiagramAltText{}: \detokenize\expandafter{#2}%
+ ]
[\detokenize\expandafter{#1}]
\xpiano_keyboard:nn { #1 } { #2 }
\end{lateximage}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -25,7 +25,7 @@
\renewcommand*{\xy}{%
\ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}%
{\addtocounter{LWR at lateximagedepth}{1}}%
- {\begin{lateximage}[(-xy-~\packagediagramname)]}%
+ {\begin{lateximage}[-xy-~\PackageDiagramAltText]}%
\LWR at orig@xy%
}
@@ -45,7 +45,7 @@
\LetLtxMacro\LWR at origxygraph\xygraph
\renewcommand{\xygraph}[1]{%
- \begin{lateximage}[(-xy- xygraph \packagediagramname)]
+ \begin{lateximage}[-xy- xygraph \PackageDiagramAltText]
\LWR at origxygraph{#1}
\end{lateximage}
}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2019-09-02 20:57:13 UTC (rev 52015)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2019-09-02 20:57:55 UTC (rev 52016)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2019/07/11 v0.73 Allows LaTeX to directly produce HTML5 output.]
+ [2019/09/02 v0.74 Allows LaTeX to directly produce HTML5 output.]
@@ -1001,18 +1001,52 @@
\end{warpHTML}
\begin{warpHTML}
-\RequirePackage{geometry}
-\geometry{
- paperheight=190in,%
- paperwidth=20in,%
- left=2in,right=6in,%
- top=1in,bottom=1in,%
+\@ifpackageloaded{geometry}
+{}{
+ \RequirePackage[
+ reset,
+ paperwidth=\paperwidth,
+ paperheight=\paperheight,
+ textwidth=\textwidth,
+ textheight=\textheight,
+ left=\oddsidemargin,
+ top=\topmargin,
+ marginparsep=\marginparsep,
+ marginparwidth=\marginparwidth,
+ ]{geometry}
}
+\LetLtxMacro\LWR at origgeometry\geometry
+\LetLtxMacro\LWR at orignewgeometry\newgeometry
+\LetLtxMacro\LWR at origrestoregeometry\restoregeometry
+\LetLtxMacro\LWR at origsavegeometry\savegeometry
+\LetLtxMacro\LWR at origloadgeometry\loadgeometry
+\newbool{LWR at allowanothergeometry}
+\booltrue{LWR at allowanothergeometry}
+\AtEndPreamble{
+\LWR at origsavegeometry{LWR at usergeometry}
+\newlength{\LWR at userspaperwidth}
+\setlength{\LWR at userspaperwidth}{\paperwidth}
+
+\newlength{\LWR at userspaperheight}
+\setlength{\LWR at userspaperheight}{\paperheight}
+\LWR at origgeometry{
+ reset,
+ paperheight=190in,
+ paperwidth=20in,
+ left=2in,
+ right=6in,
+ top=1in,
+ bottom=1in,
+ heightrounded,%
+}
+\LWR at origsavegeometry{LWR at lwarpgeometry}
+\boolfalse{LWR at allowanothergeometry}%
\setlength{\textheight}{0.8\paperheight}
\setlength{\textwidth}{0.7\paperwidth}
\@twosidefalse
\@mparswitchfalse
+}% \AtEndPreamble
\end{warpHTML}
@@ -1253,19 +1287,25 @@
\ProcessOptions\relax
}
-\NewDocumentCommand{\LWR at ProvidesPackageDrop}{m o}{
-\PackageInfo{lwarp}{%
- Replacing package `#1' with the lwarp version,\MessageBreak
- and discarding options,%
-}%
-\IfValueTF{#2}
-{\ProvidesPackage{lwarp-#1}[#2]}
-{\ProvidesPackage{lwarp-#1}}
-\DeclareOption*{}
+\newcommand*{\LWR at ProvidesPackageDropA}[2]{%
+ \PackageInfo{lwarp}{%
+ Replacing package `#1' with the lwarp version,\MessageBreak
+ and discarding options,%
+ }%
+ \IfValueTF{#2}
+ {\ProvidesPackage{lwarp-#1}[#2]}
+ {\ProvidesPackage{lwarp-#1}}
+}
+\newcommand*{\LWR at ProvidesPackageDropB}{%
\let\ds@\@empty% from the original \ProcessOptions
\edef\@curroptions{}% lwarp modification to \ProcessOptions
\@process at ptions\relax% from the original \ProcessOptions
}
+\NewDocumentCommand{\LWR at ProvidesPackageDrop}{m o}{
+\LWR at ProvidesPackageDropA{#1}{#2}
+\DeclareOption*{}
+\LWR at ProvidesPackageDropB
+}
\end{warpHTML}
@@ -1565,6 +1605,7 @@
\LetLtxMacro\LWR at origttfamily\ttfamily
\LetLtxMacro\LWR at origem\em
+
\LetLtxMacro\LWR at orignormalfont\normalfont
\let\LWR at origonecolumn\onecolumn
@@ -2925,6 +2966,17 @@
margin: -.5ex -.5em -.5ex -.5em ;
}
+/* for lyluatex */
+span.lyluatex {
+ display: inline-block ;
+}
+
+div.lyluatex p span.lateximagesource img {
+ display: block ;
+ margin-top: 3ex ;
+ margin-bottom: 3ex ;
+}
+
/* for bigdelim */
.ldelim, .rdelim { font-size: 200% }
@@ -4033,7 +4085,7 @@
-- Copyright 2016-2019 Brian Dunn
-printversion = "v0.73"
+printversion = "v0.74"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -4063,7 +4115,8 @@
lwarpmk pdftosvg <list of file names>: Converts each PDF file to SVG.
lwarpmk epstopdf <list of file names>: Converts each EPS file to PDF.
lwarpmk clean [-p project]: Remove *.aux, *.toc, *.lof/t,
- *.idx, *.ind, *.log, *_html_inc.*, .gl*
+ *.idx, *.ind, *.log, *_html_inc.*, .gl*,
+ *_html.pdf, *_html.html, *_html.sidetoc
lwarpmk cleanall [-p project]: Remove auxiliary files, project.pdf, *.html
lwarpmk cleanlimages: Removes all images from the "lateximages" directory.
lwarpmk -h: Print this help message.
@@ -4073,6 +4126,23 @@
-- printconf ()
end
+function splitfilename ( pathandfilename )
+--
+-- Separates out the path and extension from a filename.
+-- Returns path, filename with extension, and extension.
+-- Ex: thispath, thisfilename, thisextension = splitfilename ("path/to/filename.ext")
+--
+-- https://www.fhug.org.uk/wiki/wiki/doku.php?id=plugins:code_snippets:
+-- split_filename_in_to_path_filename_and_extension
+--
+ if lfs.attributes(pathandfilename,"mode") == "directory" then
+ local strPath = pathandfilename:gsub("[\\/]$","") -- $ (syntax highlighting)
+ return strPath.."\\","",""
+ end
+ pathandfilename = pathandfilename.."."
+ return pathandfilename:match("^(.-)([^\\/]-)%.([^\\/%.]-)%.?$")
+end
+
function splitfile (destfile,sourcefile)
--
-- Split one large sourcefile into a number of files,
@@ -4389,6 +4459,8 @@
--
-- Remove auxiliary files:
-- All .aux files are removed since there may be many bbl*.aux files.
+-- Also removes sourcename_html.pdf, sourcename_html.html,
+-- and sourcename_html.sidetoc.
--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
@@ -4399,6 +4471,9 @@
sourcename ..".ps " .. sourcename .."_html.ps " ..
sourcename ..".log " .. sourcename .. "_html.log " ..
sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ sourcename .. "_html.pdf " ..
+ sourcename .. "_html.html " ..
+ sourcename .. "_html.sidetoc " ..
" *_html_inc.* "
)
end
@@ -4640,7 +4715,7 @@
--
-- Converts EPS files to PDF files.
-- The filenames are arg[argindex] and up.
--- arg[1] is the command "pdftosvg".
+-- arg[1] is the command "epstopdf".
--
ignoreconf ()
for i = argindex , #arg do
@@ -4648,7 +4723,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "epstopdf " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "epstopdf " .. arg[i] )
+ else
+ os.execute (
+ "epstopdf " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".pdf"
+ )
+ end
end -- if
end -- do
end --function
@@ -4665,7 +4749,16 @@
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
else
print ("lwarpmk: Converting \"" .. arg[i] .. "\"")
- os.execute ( "pdftocairo -svg " .. arg[i] )
+ thispath, thisfilename, thisextension = splitfilename(arg[i])
+ if ( thispath == nil ) then
+ os.execute ( "pdftocairo -svg " .. arg[i] )
+ else
+ os.execute (
+ "pdftocairo -svg " ..
+ thispath .. thisfilename .. "." .. thisextension .. " " ..
+ thispath .. thisfilename .. ".svg"
+ )
+ end
end -- if
end -- do
end --function
@@ -9266,6 +9359,13 @@
}
+\newcommand*{\LWR at addlinktitle}{%
+ \ifdefvoid{\LWR at ThisAltText}{}{ % space
+ title="\LWR at ThisAltText" % space
+ \gdef\LWR at ThisAltText{}%
+ }%
+}
+
\newcommand*{\LWR at startref}[1]
{%
\LWR at sanitize{#1}%
@@ -9292,7 +9392,9 @@
}%
}%
\LWR at traceinfo{LWR at startref E}%
-"}%
+"%
+\LWR at addlinktitle%
+}%
\LWR at traceinfo{LWR at startref F}%
}
@@ -9348,6 +9450,7 @@
\LWR at sanitize{#1}%
\LWR at htmltag{%
a href="\LWR at sanitized" % space
+ \LWR at addlinktitle % space
target="\_{}blank" % space
}%
}
@@ -9363,6 +9466,7 @@
a % space
href="\begingroup\@sanitize#1\endgroup" % space
class="#3" % space
+ \LWR at addlinktitle % space
}\LWR at orignewline%
#2\LWR at orignewline%
\LWR at htmltag{/a}%
@@ -9422,24 +9526,24 @@
\LWR at urlb%
}
-\newcommand*{\LWR at subinlineimage}[5][]{%
-\ifblank{#1}%
-{%
- \LWR at htmltag{img \LWR at indentHTML
- src="#3.#4" \LWR at indentHTML
- alt="#3" \LWR at indentHTML
- style="#5" \LWR at indentHTML
- class="#2" \LWR at orignewline
+\newcommand*{\LWR at subinlineimage}[5]{%
+ \ifblank{#1}%
+ {%
+ \LWR at htmltag{img \LWR at indentHTML
+ src="#3.#4" \LWR at indentHTML
+ alt="#3" \LWR at indentHTML
+ style="#5" \LWR at indentHTML
+ class="#2" \LWR at orignewline
+ }%
}%
-}%
-{%
- \LWR at htmltag{img \LWR at indentHTML
- src="#3.#4" \LWR at indentHTML
- alt="#1" \LWR at indentHTML
- style="#5" \LWR at indentHTML
- class="#2" \LWR at orignewline
+ {%
+ \LWR at htmltag{img \LWR at indentHTML
+ src="#3.#4" \LWR at indentHTML
+ alt="#1" \LWR at indentHTML
+ style="#5" \LWR at indentHTML
+ class="#2" \LWR at orignewline
+ }%
}%
-}%
}
\end{warpHTML}
@@ -9751,6 +9855,16 @@
\newcounter{SideTOCDepth}
\setcounter{SideTOCDepth}{1}
+\AtBeginDocument{%
+ \ifnumcomp{\value{SideTOCDepth}}{<}{\value{FileDepth}}{
+ \PackageWarningNoLine{lwarp}
+ {%
+ SideTOCDepth is less than FileDepth,\MessageBreak
+ so some website pages may be inaccessible%
+ }
+ }{}
+}
+
\newcommand{\sidetocname}{Contents}
\end{warpall}
@@ -10050,10 +10164,22 @@
\begin{warpall}
-\newcommand*{\mathimagename}{math image}
+\newcommand*{\AltTextOpen}{(}
-\newcommand*{\packagediagramname}{diagram}
+\newcommand*{\AltTextClose}{)}
+\newcommand*{\ImageAltText}{image}
+
+\newcommand*{\MathImageAltText}{math image}
+
+\newcommand*{\LWR at ThisAltText}{}
+
+\newcommand*{\ThisAltText}[1]{%
+ \renewcommand{\LWR at ThisAltText}{#1}%
+}
+
+\newcommand*{\PackageDiagramAltText}{diagram}
+
\end{warpall}
\begin{warpHTML}
@@ -10070,6 +10196,17 @@
\newcommand*{\LWR at applyxfakebold}{}
+\newcommand*{\LWR at setcurrentfont}{%
+ \LWR at traceinfo{Using font family \LWR at f@family}%
+ \@nameuse{LWR at print@\LWR at f@family family}%
+ \LWR at traceinfo{Using font series \LWR at f@series}%
+ \@nameuse{LWR at print@\LWR at f@series series}%
+ \LWR at traceinfo{Using font shape \LWR at f@shape}%
+ \@nameuse{LWR at print@\LWR at f@shape shape}%
+ \LWR at traceinfo{Using font caps shape \LWR at f@shapecaps}%
+ \@nameuse{LWR at print@\LWR at f@shapecaps shape}%
+}
+
\let\LWR at origtextdollar\$
\renewcommand*{\$}{%
@@ -10110,7 +10247,8 @@
}
}
}{% lwarp_baseline_marker.png or .eps is not present
- \PackageWarningNoLine{lwarp}{File \LWR at baselinename\space is not installed\MessageBreak
+ \PackageWarningNoLine{lwarp}{%
+ File \LWR at baselinename\space is not installed\MessageBreak
alongside the lwarp-*.sty files,\MessageBreak
so SVG math baselines may not be accurate}
\newcommand*{\LWR at addbaselinemarker}{}
@@ -10139,7 +10277,11 @@
bool{mathjax} or
( bool{FormatWP} and bool{WPMarkMath} )
) and
- ( not test { \ifstrequal {#2} {(\mathimagename)} } ) and % from \ensuredmath
+ ( not test {
+ \ifstrequal {#2}
+ {\AltTextOpen\MathImageAltText\AltTextClose} % from \ensuredmath
+ }
+ ) and
( not bool{LWR at dynamicmath} )
}%
{%
@@ -10150,16 +10292,9 @@
\LWR at traceinfo{LWR at subsingledollar: NOT mathjax, or is ensuremath, or is dynamic}%
\begingroup%
\LWR at restoreorigformatting%
- \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% inside group
\LWR at print@normalsize%
- \LWR at traceinfo{Using font family \LWR at f@family}%
- \@nameuse{LWR at orig\LWR at f@family family}%
- \LWR at traceinfo{Using font series \LWR at f@series}%
- \@nameuse{LWR at orig\LWR at f@series series}%
- \LWR at traceinfo{Using font shape \LWR at f@shape}%
- \@nameuse{LWR at orig\LWR at f@shape shape}%
- \LWR at traceinfo{Using font caps shape \LWR at f@shapecaps}%
- \@nameuse{LWR at orig\LWR at f@shapecaps shape}%
+ \LWR at setcurrentfont%
\global\advance\c at LWR@lateximagedepth 1\relax%
\ifmmode%
\global\sbox{\LWR at singledollarbox}{#4}%
@@ -10233,7 +10368,7 @@
\ifbool{LWR at dynamicmath}{%
\LWR at traceinfo{subsingledollar: dynamic}%
\begin{lateximage}% no hashing
- [(\mathimagename)]% alt tag
+ [\MathImageAltText]% alt tag
[]% no add'l hashing
[\LWR at singledollarstyle \LWR at singledollardepthstyle]% CSS
}{%
@@ -10245,6 +10380,7 @@
{\def\LWR at tempone{N}}%
\begin{lateximage}*% use hashing
[#2]% alt
+ *% do not add open/closing braces
[% addl' hashing
#3%
FM\LWR at f@family%
@@ -10270,6 +10406,7 @@
}% not mathjax
\endgroup%
}% not in a lateximage
+\gdef\LWR at ThisAltText{}%
\LWR at traceinfo{LWR at subsingledollar: done}%
}
@@ -10306,11 +10443,13 @@
\LWR at HTMLsanitize{#1} % extra space
\textbackslash{]}%
]%
+ *% do not add open/closing braces
\LWR at applyxfakebold%
\LWR at origdollar\LWR at origdollar#1\LWR at origdollar\LWR at origdollar%
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
+\gdef\LWR at ThisAltText{}%
}%
\protected\gdef\LWR at singledollar#1${%
\ifbool{mathjax}{%
@@ -10332,6 +10471,7 @@
{singledollar}% add'l hashing
{\LWR at origensuredmath{#1}}% contents
}% not mathjax
+\gdef\LWR at ThisAltText{}%
}
\AtBeginDocument{
@@ -10349,7 +10489,7 @@
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
- \LWR at subsingledollar*{(\mathimagename)}{%
+ \LWR at subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
\protect\LWR at HTMLsanitize{\detokenize\expandafter{#1}}%
}{\relax%
\LWR at origensuredmath{#1}%
@@ -10361,7 +10501,7 @@
\ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}%
{\LWR at origensuredmath{#1}}%
{%
- \LWR at subsingledollar*{(\mathimagename)}{%
+ \LWR at subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
\protect\LWR at HTMLsanitize{\detokenize\expandafter{#1}}%
}{%
\LWR at origensuredmath{#1}%
@@ -10369,6 +10509,7 @@
}%
\fi%
}%
+\gdef\LWR at ThisAltText{}%
}
\let\math\relax
@@ -10389,7 +10530,7 @@
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
\begin{lateximage}%
- [(display math)]%
+ [\MathImageAltText]%
\LWR at origdollar\LWR at origdollar%
}
{%
@@ -10402,8 +10543,7 @@
\begin{BlockClass}{displaymathnumbered}%
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}%
- [(display math)]%
+ \begin{lateximage}[\MathImageAltText]%
\LWR at origequation%
}
{%
@@ -10489,7 +10629,7 @@
\textbackslash{begin\{#2\}} % extra space
\LWR at HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
\textbackslash{end\{#2\}}%
- ]% alt tag
+ ]*% alt tag
\LWR at applyxfakebold%
\@nameuse{LWR at orig#2}%
#1% contents collected by \collect at body
@@ -10497,6 +10637,7 @@
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
+\gdef\LWR at ThisAltText{}%
}
\newcommand*{\LWR at doendequation}[1]{%
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
@@ -10504,6 +10645,7 @@
\LWR at addmathjax{#1}{\BODY}%
}{}%
+\gdef\LWR at ThisAltText{}%
}
\AtBeginDocument{
@@ -10639,7 +10781,7 @@
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
\begin{lateximage}[(\LWR at startingequationtag--\LWR at equationtag)
- \LWR at addmathjax{eqnarray}{\BODY}]
+ \LWR at addmathjax{eqnarray}{\BODY}]*
\LWR at applyxfakebold%
\LWR at origeqnarray
\BODY
@@ -10651,7 +10793,7 @@
\begin{BlockClass}{displaymath}
\LWR at newautoidanchor%
\booltrue{LWR at indisplaymathimage}%
- \begin{lateximage}[\LWR at addmathjax{eqnarray*}{\BODY}]
+ \begin{lateximage}[\LWR at addmathjax{eqnarray*}{\BODY}]*
\LWR at applyxfakebold%
\LWR at origeqnarray
\BODY
@@ -10662,6 +10804,7 @@
}% LWR at numbereqnarray
}% not mathjax
\booltrue{LWR at numbereqnarray}
+\gdef\LWR at ThisAltText{}%
}
\RenewEnviron{eqnarray}
{%
@@ -10687,7 +10830,7 @@
\newcommand*{\LateximageFontSizeName}{normalsize}
-\newcommand*{\LateximageFontScale}{.75}
+\newcommand*{\LateximageFontScale}{1}
\end{warpall}
@@ -10783,9 +10926,35 @@
}
+\newcommand{\LWR at lateximage@oneimageb}[3]{%
+ \LWR at subinlineimage{#1}{lateximage}%
+ {%
+ \LWR at print@mbox{%
+ \LWR at ImagesDirectory\OSPathSymbol%
+ #2%
+ }%
+ }{svg}{#3}%
+}
+
+\newcommand{\LWR at lateximage@oneimage}[4]{%
+ \ifdefvoid{\LWR at ThisAltText}{%
+ \IfBooleanTF{#4}{%
+ \LWR at lateximage@oneimageb{#1}{#2}{#3}%
+ }{%
+ \LWR at lateximage@oneimageb%
+ {\AltTextOpen#1\AltTextClose}%
+ {#2}{#3}%
+ }%
+ }{%
+ \LWR at lateximage@oneimageb%
+ {\AltTextOpen\LWR at ThisAltText\AltTextClose}%
+ {#2}{#3}%
+ }%
+}
+
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{s O{(image)} O{} O{}}
+\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{}}
{%
\LWR at traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\LWR at traceinfo{lateximage: entering depth is \arabic{LWR at lateximagedepth}}%
@@ -10817,10 +10986,20 @@
\LWR at traceinfo{lateximage: about to write to \BaseJobname-images.txt}%
\IfBooleanTF{#1}% starred
{% hash
- \LWR at traceinfo{lateximage: hash true, adding %
- !\detokenize\expandafter{#2}!\detokenize\expandafter{#3}!}%
- \edef\LWR at hashedname{%
- \LWR at mdfive{\detokenize\expandafter{#2}-!-#3}%
+ \ifdefvoid{\LWR at ThisAltText}{%
+ \IfBooleanTF{#3}{%
+ \edef\LWR at hashedname{%
+ \LWR at mdfive{\detokenize\expandafter{#2}-!-#4}%
+ }%
+ }{%
+ \edef\LWR at hashedname{%
+ \LWR at mdfive{\detokenize\expandafter{\AltTextOpen#2\AltTextClose}-!-#4}%
+ }%
+ }%
+ }{%
+ \edef\LWR at hashedname{%
+ \LWR at mdfive{\detokenize\expandafter{\AltTextOpen\LWR at ThisAltText\AltTextClose}-!-#4}%
+ }%
}%
\LWR at traceinfo{lateximage: hash is \LWR at hashedname}%
\immediate\write\LWR at lateximagesfile{%
@@ -10883,18 +11062,10 @@
\LWR at traceinfo{lateximage: The page after the image is \arabic{page}}%
\IfBooleanTF{#1}% starred
{% hash
- \LWR at subinlineimage[#2]{lateximage}%
- {%
- \LWR at ImagesDirectory\OSPathSymbol%
- \LWR at print@mbox{\LWR at hashedname}%
- }{svg}{#4}%
+ \LWR at lateximage@oneimage{#2}{\LWR at hashedname}{#5}{#3}%
}% hash
{% no hash
- \LWR at subinlineimage[#2]{lateximage}%
- {%
- \LWR at ImagesDirectory\OSPathSymbol%
- \LWR at print@mbox{\LWR at ImagesName\theLWR at externalfilecnt}%
- }{svg}{#4}%
+ \LWR at lateximage@oneimage{#2}{\LWR at ImagesName\theLWR at externalfilecnt}{#5}{#3}%
}% no hash
\LWR at ensuredoingapar%
\LWR at htmltag{/span}%
@@ -10902,6 +11073,7 @@
\LWR at htmlcomment{End of lateximage}%
}{}%
\addtocounter{LWR at lateximagedepth}{-1}%
+ \gdef\LWR at ThisAltText{}%
}% end of outer-most lateximage
\LWR at traceinfo{lateximage: exiting depth is \arabic{LWR at lateximagedepth}}%
\LWR at traceinfo{lateximage: done}%
@@ -10911,7 +11083,7 @@
\begin{warpprint}
-\NewDocumentEnvironment{lateximage}{s o o o}
+\NewDocumentEnvironment{lateximage}{s o s o o}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
@@ -11281,7 +11453,7 @@
\begin{warpHTML}
-\BeforeBeginEnvironment{picture}{\begin{lateximage}[(picture)]}
+\BeforeBeginEnvironment{picture}{\begin{lateximage}[picture]}
\AfterEndEnvironment{picture}{\end{lateximage}}
@@ -11900,7 +12072,7 @@
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
\renewcommand{\underline}[1]{##1}%
-\RenewDocumentCommand{\hspace}{s m}{}
+\RenewDocumentCommand{\hspace}{s m}{}%
\RenewDocumentCommand{\LWR at htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}%
\def\(##1\){}%
@@ -12176,7 +12348,7 @@
\ifnum\gluestretchorder\LWR at tempwidth>0%
\setlength{\LWR at tempwidth}{2em}%
\fi%
-\ifdimcomp{\LWR at tempwidth}{=}{0pt}{}{%
+\ifdimcomp{\LWR at tempwidth}{>}{0pt}{%
\LWR at minipagestoppars%
\ifdimcomp{\LWR at tempwidth}{=}{.16667em}%
{%
@@ -12198,7 +12370,7 @@
\LWR at htmltagc{/span}%
}%
\LWR at minipagestartpars%
-}% width not 0
+}{}% width greater than 0
}%
}
\newcommand{\LWR at select@html at nohspace}{%
More information about the tex-live-commits
mailing list