summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty336
1 files changed, 254 insertions, 82 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index dcd7ad4fa11..2fca6085b4a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -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@origgeometry\geometry
+\LetLtxMacro\LWR@orignewgeometry\newgeometry
+\LetLtxMacro\LWR@origrestoregeometry\restoregeometry
+\LetLtxMacro\LWR@origsavegeometry\savegeometry
+\LetLtxMacro\LWR@origloadgeometry\loadgeometry
+\newbool{LWR@allowanothergeometry}
+\booltrue{LWR@allowanothergeometry}
+\AtEndPreamble{
+\LWR@origsavegeometry{LWR@usergeometry}
+\newlength{\LWR@userspaperwidth}
+\setlength{\LWR@userspaperwidth}{\paperwidth}
+
+\newlength{\LWR@userspaperheight}
+\setlength{\LWR@userspaperheight}{\paperheight}
+\LWR@origgeometry{
+ reset,
+ paperheight=190in,
+ paperwidth=20in,
+ left=2in,
+ right=6in,
+ top=1in,
+ bottom=1in,
+ heightrounded,%
+}
+\LWR@origsavegeometry{LWR@lwarpgeometry}
+\boolfalse{LWR@allowanothergeometry}%
\setlength{\textheight}{0.8\paperheight}
\setlength{\textwidth}{0.7\paperwidth}
\@twosidefalse
\@mparswitchfalse
+}% \AtEndPreamble
\end{warpHTML}
@@ -1253,19 +1287,25 @@
\ProcessOptions\relax
}
-\NewDocumentCommand{\LWR@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@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@ProvidesPackageDropB}{%
\let\ds@\@empty% from the original \ProcessOptions
\edef\@curroptions{}% lwarp modification to \ProcessOptions
\@process@ptions\relax% from the original \ProcessOptions
}
+\NewDocumentCommand{\LWR@ProvidesPackageDrop}{m o}{
+\LWR@ProvidesPackageDropA{#1}{#2}
+\DeclareOption*{}
+\LWR@ProvidesPackageDropB
+}
\end{warpHTML}
@@ -1565,6 +1605,7 @@
\LetLtxMacro\LWR@origttfamily\ttfamily
\LetLtxMacro\LWR@origem\em
+
\LetLtxMacro\LWR@orignormalfont\normalfont
\let\LWR@origonecolumn\onecolumn
@@ -2925,6 +2966,17 @@ div.cellcolor {
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 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-
-- Copyright 2016-2019 Brian Dunn
-printversion = "v0.73"
+printversion = "v0.74"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -4063,7 +4115,8 @@ lwarpmk pdftohtml [-p project]:
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 @@ lwarpmk --help: Print this help message.
-- 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 @@ function removeaux ()
--
-- 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 @@ os.execute ( rmname .. " *.aux " ..
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 @@ function convertepstopdf ()
--
-- 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 @@ for i = argindex , #arg do
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 @@ for i = argindex , #arg do
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 @@ rowspan="#2" %
}
+\newcommand*{\LWR@addlinktitle}{%
+ \ifdefvoid{\LWR@ThisAltText}{}{ % space
+ title="\LWR@ThisAltText" % space
+ \gdef\LWR@ThisAltText{}%
+ }%
+}
+
\newcommand*{\LWR@startref}[1]
{%
\LWR@sanitize{#1}%
@@ -9292,7 +9392,9 @@ rowspan="#2" %
}%
}%
\LWR@traceinfo{LWR@startref E}%
-"}%
+"%
+\LWR@addlinktitle%
+}%
\LWR@traceinfo{LWR@startref F}%
}
@@ -9348,6 +9450,7 @@ autopage-\theLWR@currentautosec%
\LWR@sanitize{#1}%
\LWR@htmltag{%
a href="\LWR@sanitized" % space
+ \LWR@addlinktitle % space
target="\_{}blank" % space
}%
}
@@ -9363,6 +9466,7 @@ autopage-\theLWR@currentautosec%
a % space
href="\begingroup\@sanitize#1\endgroup" % space
class="#3" % space
+ \LWR@addlinktitle % space
}\LWR@orignewline%
#2\LWR@orignewline%
\LWR@htmltag{/a}%
@@ -9422,24 +9526,24 @@ autopage-\theLWR@currentautosec%
\LWR@urlb%
}
-\newcommand*{\LWR@subinlineimage}[5][]{%
-\ifblank{#1}%
-{%
- \LWR@htmltag{img \LWR@indentHTML
- src="#3.#4" \LWR@indentHTML
- alt="#3" \LWR@indentHTML
- style="#5" \LWR@indentHTML
- class="#2" \LWR@orignewline
+\newcommand*{\LWR@subinlineimage}[5]{%
+ \ifblank{#1}%
+ {%
+ \LWR@htmltag{img \LWR@indentHTML
+ src="#3.#4" \LWR@indentHTML
+ alt="#3" \LWR@indentHTML
+ style="#5" \LWR@indentHTML
+ class="#2" \LWR@orignewline
+ }%
}%
-}%
-{%
- \LWR@htmltag{img \LWR@indentHTML
- src="#3.#4" \LWR@indentHTML
- alt="#1" \LWR@indentHTML
- style="#5" \LWR@indentHTML
- class="#2" \LWR@orignewline
+ {%
+ \LWR@htmltag{img \LWR@indentHTML
+ src="#3.#4" \LWR@indentHTML
+ alt="#1" \LWR@indentHTML
+ style="#5" \LWR@indentHTML
+ class="#2" \LWR@orignewline
+ }%
}%
-}%
}
\end{warpHTML}
@@ -9751,6 +9855,16 @@ autopage-\theLWR@currentautosec%
\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,9 +10164,21 @@ autopage-\theLWR@currentautosec%
\begin{warpall}
-\newcommand*{\mathimagename}{math image}
+\newcommand*{\AltTextOpen}{(}
+
+\newcommand*{\AltTextClose}{)}
+
+\newcommand*{\ImageAltText}{image}
+
+\newcommand*{\MathImageAltText}{math image}
+
+\newcommand*{\LWR@ThisAltText}{}
-\newcommand*{\packagediagramname}{diagram}
+\newcommand*{\ThisAltText}[1]{%
+ \renewcommand{\LWR@ThisAltText}{#1}%
+}
+
+\newcommand*{\PackageDiagramAltText}{diagram}
\end{warpall}
@@ -10070,6 +10196,17 @@ autopage-\theLWR@currentautosec%
\newcommand*{\LWR@applyxfakebold}{}
+\newcommand*{\LWR@setcurrentfont}{%
+ \LWR@traceinfo{Using font family \LWR@f@family}%
+ \@nameuse{LWR@print@\LWR@f@family family}%
+ \LWR@traceinfo{Using font series \LWR@f@series}%
+ \@nameuse{LWR@print@\LWR@f@series series}%
+ \LWR@traceinfo{Using font shape \LWR@f@shape}%
+ \@nameuse{LWR@print@\LWR@f@shape shape}%
+ \LWR@traceinfo{Using font caps shape \LWR@f@shapecaps}%
+ \@nameuse{LWR@print@\LWR@f@shapecaps shape}%
+}
+
\let\LWR@origtextdollar\$
\renewcommand*{\$}{%
@@ -10110,7 +10247,8 @@ autopage-\theLWR@currentautosec%
}
}
}{% lwarp_baseline_marker.png or .eps is not present
- \PackageWarningNoLine{lwarp}{File \LWR@baselinename\space is not installed\MessageBreak
+ \PackageWarningNoLine{lwarp}{%
+ File \LWR@baselinename\space is not installed\MessageBreak
alongside the lwarp-*.sty files,\MessageBreak
so SVG math baselines may not be accurate}
\newcommand*{\LWR@addbaselinemarker}{}
@@ -10139,7 +10277,11 @@ autopage-\theLWR@currentautosec%
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@dynamicmath} )
}%
{%
@@ -10150,16 +10292,9 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{LWR@subsingledollar: NOT mathjax, or is ensuremath, or is dynamic}%
\begingroup%
\LWR@restoreorigformatting%
- \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% inside group
+ \RenewDocumentEnvironment{lateximage}{s o s o o}{}{}% inside group
\LWR@print@normalsize%
- \LWR@traceinfo{Using font family \LWR@f@family}%
- \@nameuse{LWR@orig\LWR@f@family family}%
- \LWR@traceinfo{Using font series \LWR@f@series}%
- \@nameuse{LWR@orig\LWR@f@series series}%
- \LWR@traceinfo{Using font shape \LWR@f@shape}%
- \@nameuse{LWR@orig\LWR@f@shape shape}%
- \LWR@traceinfo{Using font caps shape \LWR@f@shapecaps}%
- \@nameuse{LWR@orig\LWR@f@shapecaps shape}%
+ \LWR@setcurrentfont%
\global\advance\c@LWR@lateximagedepth 1\relax%
\ifmmode%
\global\sbox{\LWR@singledollarbox}{#4}%
@@ -10233,7 +10368,7 @@ autopage-\theLWR@currentautosec%
\ifbool{LWR@dynamicmath}{%
\LWR@traceinfo{subsingledollar: dynamic}%
\begin{lateximage}% no hashing
- [(\mathimagename)]% alt tag
+ [\MathImageAltText]% alt tag
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
}{%
@@ -10245,6 +10380,7 @@ autopage-\theLWR@currentautosec%
{\def\LWR@tempone{N}}%
\begin{lateximage}*% use hashing
[#2]% alt
+ *% do not add open/closing braces
[% addl' hashing
#3%
FM\LWR@f@family%
@@ -10270,6 +10406,7 @@ autopage-\theLWR@currentautosec%
}% not mathjax
\endgroup%
}% not in a lateximage
+\gdef\LWR@ThisAltText{}%
\LWR@traceinfo{LWR@subsingledollar: done}%
}
@@ -10306,11 +10443,13 @@ autopage-\theLWR@currentautosec%
\LWR@HTMLsanitize{#1} % extra space
\textbackslash{]}%
]%
+ *% do not add open/closing braces
\LWR@applyxfakebold%
\LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
+\gdef\LWR@ThisAltText{}%
}%
\protected\gdef\LWR@singledollar#1${%
\ifbool{mathjax}{%
@@ -10332,6 +10471,7 @@ autopage-\theLWR@currentautosec%
{singledollar}% add'l hashing
{\LWR@origensuredmath{#1}}% contents
}% not mathjax
+\gdef\LWR@ThisAltText{}%
}
\AtBeginDocument{
@@ -10349,7 +10489,7 @@ autopage-\theLWR@currentautosec%
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
- \LWR@subsingledollar*{(\mathimagename)}{%
+ \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{\relax%
\LWR@origensuredmath{#1}%
@@ -10361,7 +10501,7 @@ autopage-\theLWR@currentautosec%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{\LWR@origensuredmath{#1}}%
{%
- \LWR@subsingledollar*{(\mathimagename)}{%
+ \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{%
\LWR@origensuredmath{#1}%
@@ -10369,6 +10509,7 @@ autopage-\theLWR@currentautosec%
}%
\fi%
}%
+\gdef\LWR@ThisAltText{}%
}
\let\math\relax
@@ -10389,7 +10530,7 @@ autopage-\theLWR@currentautosec%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
\begin{lateximage}%
- [(display math)]%
+ [\MathImageAltText]%
\LWR@origdollar\LWR@origdollar%
}
{%
@@ -10402,8 +10543,7 @@ autopage-\theLWR@currentautosec%
\begin{BlockClass}{displaymathnumbered}%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}%
- [(display math)]%
+ \begin{lateximage}[\MathImageAltText]%
\LWR@origequation%
}
{%
@@ -10489,7 +10629,7 @@ autopage-\theLWR@currentautosec%
\textbackslash{begin\{#2\}} % extra space
\LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
\textbackslash{end\{#2\}}%
- ]% alt tag
+ ]*% alt tag
\LWR@applyxfakebold%
\@nameuse{LWR@orig#2}%
#1% contents collected by \collect@body
@@ -10497,6 +10637,7 @@ autopage-\theLWR@currentautosec%
\end{lateximage}%
\end{BlockClass}%
}% not mathjax
+\gdef\LWR@ThisAltText{}%
}
\newcommand*{\LWR@doendequation}[1]{%
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
@@ -10504,6 +10645,7 @@ autopage-\theLWR@currentautosec%
\LWR@addmathjax{#1}{\BODY}%
}{}%
+\gdef\LWR@ThisAltText{}%
}
\AtBeginDocument{
@@ -10639,7 +10781,7 @@ autopage-\theLWR@currentautosec%
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
- \LWR@addmathjax{eqnarray}{\BODY}]
+ \LWR@addmathjax{eqnarray}{\BODY}]*
\LWR@applyxfakebold%
\LWR@origeqnarray
\BODY
@@ -10651,7 +10793,7 @@ autopage-\theLWR@currentautosec%
\begin{BlockClass}{displaymath}
\LWR@newautoidanchor%
\booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]
+ \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]*
\LWR@applyxfakebold%
\LWR@origeqnarray
\BODY
@@ -10662,6 +10804,7 @@ autopage-\theLWR@currentautosec%
}% LWR@numbereqnarray
}% not mathjax
\booltrue{LWR@numbereqnarray}
+\gdef\LWR@ThisAltText{}%
}
\RenewEnviron{eqnarray}
{%
@@ -10687,7 +10830,7 @@ autopage-\theLWR@currentautosec%
\newcommand*{\LateximageFontSizeName}{normalsize}
-\newcommand*{\LateximageFontScale}{.75}
+\newcommand*{\LateximageFontScale}{1}
\end{warpall}
@@ -10783,9 +10926,35 @@ autopage-\theLWR@currentautosec%
}
+\newcommand{\LWR@lateximage@oneimageb}[3]{%
+ \LWR@subinlineimage{#1}{lateximage}%
+ {%
+ \LWR@print@mbox{%
+ \LWR@ImagesDirectory\OSPathSymbol%
+ #2%
+ }%
+ }{svg}{#3}%
+}
+
+\newcommand{\LWR@lateximage@oneimage}[4]{%
+ \ifdefvoid{\LWR@ThisAltText}{%
+ \IfBooleanTF{#4}{%
+ \LWR@lateximage@oneimageb{#1}{#2}{#3}%
+ }{%
+ \LWR@lateximage@oneimageb%
+ {\AltTextOpen#1\AltTextClose}%
+ {#2}{#3}%
+ }%
+ }{%
+ \LWR@lateximage@oneimageb%
+ {\AltTextOpen\LWR@ThisAltText\AltTextClose}%
+ {#2}{#3}%
+ }%
+}
+
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{s O{(image)} O{} O{}}
+\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{}}
{%
\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\LWR@traceinfo{lateximage: entering depth is \arabic{LWR@lateximagedepth}}%
@@ -10817,10 +10986,20 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{lateximage: about to write to \BaseJobname-images.txt}%
\IfBooleanTF{#1}% starred
{% hash
- \LWR@traceinfo{lateximage: hash true, adding %
- !\detokenize\expandafter{#2}!\detokenize\expandafter{#3}!}%
- \edef\LWR@hashedname{%
- \LWR@mdfive{\detokenize\expandafter{#2}-!-#3}%
+ \ifdefvoid{\LWR@ThisAltText}{%
+ \IfBooleanTF{#3}{%
+ \edef\LWR@hashedname{%
+ \LWR@mdfive{\detokenize\expandafter{#2}-!-#4}%
+ }%
+ }{%
+ \edef\LWR@hashedname{%
+ \LWR@mdfive{\detokenize\expandafter{\AltTextOpen#2\AltTextClose}-!-#4}%
+ }%
+ }%
+ }{%
+ \edef\LWR@hashedname{%
+ \LWR@mdfive{\detokenize\expandafter{\AltTextOpen\LWR@ThisAltText\AltTextClose}-!-#4}%
+ }%
}%
\LWR@traceinfo{lateximage: hash is \LWR@hashedname}%
\immediate\write\LWR@lateximagesfile{%
@@ -10883,18 +11062,10 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
\IfBooleanTF{#1}% starred
{% hash
- \LWR@subinlineimage[#2]{lateximage}%
- {%
- \LWR@ImagesDirectory\OSPathSymbol%
- \LWR@print@mbox{\LWR@hashedname}%
- }{svg}{#4}%
+ \LWR@lateximage@oneimage{#2}{\LWR@hashedname}{#5}{#3}%
}% hash
{% no hash
- \LWR@subinlineimage[#2]{lateximage}%
- {%
- \LWR@ImagesDirectory\OSPathSymbol%
- \LWR@print@mbox{\LWR@ImagesName\theLWR@externalfilecnt}%
- }{svg}{#4}%
+ \LWR@lateximage@oneimage{#2}{\LWR@ImagesName\theLWR@externalfilecnt}{#5}{#3}%
}% no hash
\LWR@ensuredoingapar%
\LWR@htmltag{/span}%
@@ -10902,6 +11073,7 @@ autopage-\theLWR@currentautosec%
\LWR@htmlcomment{End of lateximage}%
}{}%
\addtocounter{LWR@lateximagedepth}{-1}%
+ \gdef\LWR@ThisAltText{}%
}% end of outer-most lateximage
\LWR@traceinfo{lateximage: exiting depth is \arabic{LWR@lateximagedepth}}%
\LWR@traceinfo{lateximage: done}%
@@ -10911,7 +11083,7 @@ autopage-\theLWR@currentautosec%
\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 @@ autopage-\theLWR@currentautosec%
\begin{warpHTML}
-\BeforeBeginEnvironment{picture}{\begin{lateximage}[(picture)]}
+\BeforeBeginEnvironment{picture}{\begin{lateximage}[picture]}
\AfterEndEnvironment{picture}{\end{lateximage}}
@@ -11900,7 +12072,7 @@ color:\LWR@origpound\LWR@tempcolor%
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
\renewcommand{\underline}[1]{##1}%
-\RenewDocumentCommand{\hspace}{s m}{}
+\RenewDocumentCommand{\hspace}{s m}{}%
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{##4}%
\def\(##1\){}%
@@ -12176,7 +12348,7 @@ color:\LWR@origpound\LWR@tempcolor%
\ifnum\gluestretchorder\LWR@tempwidth>0%
\setlength{\LWR@tempwidth}{2em}%
\fi%
-\ifdimcomp{\LWR@tempwidth}{=}{0pt}{}{%
+\ifdimcomp{\LWR@tempwidth}{>}{0pt}{%
\LWR@minipagestoppars%
\ifdimcomp{\LWR@tempwidth}{=}{.16667em}%
{%
@@ -12198,7 +12370,7 @@ color:\LWR@origpound\LWR@tempcolor%
\LWR@htmltagc{/span}%
}%
\LWR@minipagestartpars%
-}% width not 0
+}{}% width greater than 0
}%
}
\newcommand{\LWR@select@html@nohspace}{%