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.sty696
1 files changed, 507 insertions, 189 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 930690dcd95..753a687aab8 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,17 +17,48 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2018/02/19 v0.49 Allows LaTeX to directly produce HTML5 output.]
+ [2018/03/03 v0.50 Allows LaTeX to directly produce HTML5 output.]
\RequirePackage{iftex}
+\newif\ifxetexorluatex
+\ifXeTeX
+ \xetexorluatextrue
+\else
+ \ifLuaTeX
+ \xetexorluatextrue
+ \else
+ \xetexorluatexfalse
+ \fi
+\fi
\ifLuaTeX
\RequirePackage{luatex85}% until the geometry package is updated
\fi
+\newcommand{\LWR@mdfive}[1]{%
+\PackageError{lwarp}
+{No MD5 macro was found.}
+{Lwarp must find the macros pdfmdfivesum or mdfivesum.}
+}
+
+\ifPDFTeX
+\let\LWR@mdfive\pdfmdfivesum
+\fi
+
+\ifLuaTeX
+\RequirePackage{pdftexcmds}
+\let\LWR@mdfive\pdf@mdfivesum
+\fi
+
+\ifXeTeX
+\@ifundefined{pdffivesum}{}
+ {\let\LWR@mdfive\pdfmdfivesum}
+\@ifundefined{mdfivesum}{}
+ {\let\LWR@mdfive\mdfivesum}
+\fi
\ifPDFTeX
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
@@ -225,6 +256,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{arabicfront}
\LWR@notmemoirloadafter{array}
\LWR@loadafter{authblk}
+\LWR@loadafter{axodraw2}
\LWR@loadafter{backref}
\LWR@loadafter{balance}
\LWR@loadafter{bigdelim}
@@ -235,6 +267,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{boxedminipage}
\LWR@loadafter{boxedminipage2e}
\LWR@loadafter{breakurl}
+\LWR@loadafter{bytefield}
\LWR@loadafter{cancel}
\LWR@loadafter{caption}
\LWR@notmemoirloadafter{ccaption}
@@ -250,8 +283,10 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{crop}
\LWR@loadafter{cuted}
\LWR@loadafter{cutwin}
+\LWR@loadafter{dblfloatfix}
\LWR@loadafter{dblfnote}
\LWR@notmemoirloadafter{dcolumn}
+\LWR@loadafter{diagbox}
\LWR@loadafter{draftwatermark}
\LWR@loadafter{easy-todo}
\LWR@loadafter{ebook}
@@ -263,6 +298,7 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{enumerate}
\LWR@loadafter{enumitem}
\LWR@notmemoirloadafter{epigraph}
+\LWR@loadafter{epstopdf}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
@@ -332,6 +368,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
\LWR@loadafter{midpage}
+\LWR@loadafter{morefloats}
\LWR@notmemoirloadafter{moreverb}
\LWR@notmemoirloadafter{mparhack}
\LWR@loadafter{multirow}
@@ -341,6 +378,7 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{needspace}
\LWR@loadafter{newtxmath}
\LWR@notmemoirloadafter{nextpage}
+\LWR@loadafter{nonfloat}
\LWR@loadafter{nonumonpart}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
@@ -351,10 +389,12 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{pagesel}
\LWR@loadafter{paralist}
\LWR@notmemoirloadafter{parskip}
+\LWR@loadafter{pbox}
\LWR@loadafter{pdfrender}
\LWR@loadafter{pdflscape}
\LWR@loadafter{pdfsync}
\LWR@loadafter{pfnote}
+\LWR@loadafter{phfqit}
\LWR@loadafter{placeins}
\LWR@loadafter{prelim2e}
\LWR@loadafter{prettyref}
@@ -369,6 +409,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{rotating}
\LWR@loadafter{rotfloat}
\LWR@loadafter{savetrees}
+\LWR@loadafter{schemata}
\LWR@loadafter{scrextend}
\LWR@loadafter{scrhack}
\LWR@loadafter{scrlayer}
@@ -429,29 +470,15 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{xmpincl}
\LWR@loadafter{xtab}
\LWR@loadafter{xurl}
+\LWR@loadafter{xy}
\LWR@loadafter{zwpagelayout}
-
-\begin{warpall}
-
-
-\RequirePackage{iftex}
-\newif\ifxetexorluatex
-\ifXeTeX
- \xetexorluatextrue
-\else
- \ifLuaTeX
- \xetexorluatextrue
- \else
- \xetexorluatexfalse
- \fi
-\fi
-
-\end{warpall}
-
\begin{warpHTML}
\ifxetexorluatex
+\@ifpackageloaded{fontspec}{}{
+\usepackage[no-math]{fontspec}
+}
\defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}}
\defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}}
\defaultfontfeatures[\ttfamily]{Ligatures=NoCommon}
@@ -546,9 +573,8 @@ top=1in,bottom=1in,%
\RequirePackage{zref}
-\PassOptionsToPackage{leqno}{amsmath}
\RequirePackage{amsmath}
-\def\maketag@@@#1{#1}
+\def\maketag@@@#1{\text{#1}}
\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip)}}
@@ -946,7 +972,9 @@ top=1in,bottom=1in,%
}
\LetLtxMacro\LWR@origunderline\underline
-
+\let\LWR@origraggedright\raggedright
+\let\LWR@origraggedleft\raggedleft
+\let\LWR@origcentering\centering
\let\LWR@orignewpage\newpage
\let\LWR@origpagestyle\pagestyle
@@ -1203,6 +1231,25 @@ span.underline {
text-decoration-skip ;
}
+span.overline {
+ text-decoration: overline ;
+ text-decoration-skip ;
+}
+
+/* for diagbox */
+div.diagboxtitleN { border-bottom: 1px solid gray }
+div.diagboxtitleS { border-top: 1px solid gray }
+
+div.diagboxE {
+ padding-left: 2em ;
+ text-align: right ;
+}
+
+div.diagboxW {
+ padding-right: 2em ;
+ text-align: left ;
+}
+
/* For realscripts */
.supsubscript {
display: inline-block;
@@ -1551,6 +1598,36 @@ border-top: 1px solid silver ;
border-bottom: 1px solid silver ;
}
+div.displaymath {
+ text-align: center ;
+}
+
+div.displaymathnumbered {
+ text-align: right ;
+ margin-left: 5% ;
+ margin-right: 5% ;
+ min-width: 2.5in ;
+}
+
+@media all and (min-width: 400px) {
+ div.displaymathnumbered {
+ margin-left: 10% ;
+ margin-right: 10% ;
+ }
+}
+
+@media all and (min-width: 800px) {
+ div.displaymathnumbered {
+ margin-right: 20% ;
+ }
+}
+
+@media all and (min-width: 1200px) {
+ div.displaymathnumbered {
+ margin-right: 30% ;
+ }
+}
+
.inlineprogramlisting {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
"Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
@@ -2518,6 +2595,8 @@ div.minipage {
border-radius: 1ex ;
}
+table div.minipage { background: none ; border: none ; }
+
div.framebox div.minipage {border:none ; background:none}
section.textbody > div.minipage {
@@ -2852,6 +2931,18 @@ nav.botnavigation {
\end{filecontents*}
\end{warpprint}
+\begin{warpprint}
+\begin{filecontents*}{lwarp_one_limage.txt}
+@echo off
+pdfseparate -f %1 -l %1 %4_html.pdf lateximages\lateximagetemp-%%d.pdf"
+pdfcrop lateximages\lateximagetemp-%1.pdf lateximages\%3.pdf
+pdftocairo -svg lateximages\%3.pdf lateximages\%3.svg
+del lateximages\%3.pdf
+del lateximages\lateximagetemp-%1.pdf"
+exit
+\end{filecontents*}
+\end{warpprint}
+
\begin{warpprint}
\begin{filecontents*}{lwarp_mathjax.txt}
@@ -2966,7 +3057,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.49"
+printversion = "v0.50"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -2989,7 +3080,7 @@ lwarpmk pdftohtml [project]:
For use with latexmk or a Makefile:
Convert project_html.pdf to project_html.html and
individual HTML files.
-lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
+lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -3029,10 +3120,12 @@ local sfile = io.open(sourcefile)
io.output(destfile)
for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
-if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
-io.output(newfilename) ;
-else -- not a splitpoint
-io.write (line .. "\n") ;
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then
+ -- split the file
+ io.output(newfilename) ;
+else
+ -- not a splitpoint
+ io.write (line .. "\n") ;
end
end -- do
io.close(sfile)
@@ -3041,8 +3134,10 @@ end -- function
-- Incorrect value, so print an error and exit.
function cvalueerror ( line, linenum , cvalue )
- print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
@@ -3059,11 +3154,14 @@ language = "english"
-- Default xdyfile:
xdyfile = "lwarp.xdy"
-- Verify the file exists:
-if (lfs.attributes(conffile,"mode")==nil) then -- file not exists
-print("lwarpmk: " .. conffile .." does not exist.")
-print("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
-printhelp () ;
-os.exit(1) -- exit the entire lwarpmk script
+if (lfs.attributes(conffile,"mode")==nil) then
+ -- file not exists
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. conffile .." does not exist.")
+ print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
+ print ("lwarpmk: ===")
+ printhelp () ;
+ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
@@ -3075,11 +3173,13 @@ linenum = linenum + 1
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
if ( i == nil ) then
-print ( linenum .. " : " .. line ) ;
-print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
-printconf () ;
-os.exit(1) ;
-end
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
+ os.exit(1) ;
+end -- nil
if ( cvarname == "opsystem" ) then
-- Verify choice of opsystem:
if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
@@ -3105,39 +3205,65 @@ elseif ( cvarname == "latexmk" ) then latexmk = cvalue
elseif ( cvarname == "language" ) then language = cvalue
elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue
else
-print ( linenum .. " : " .. line ) ;
-print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
-printconf () ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
os.exit(1) ;
-end
+end -- cvarname
end -- do scan lines
io.close(cfile)
end -- file exists
+-- Error if sourcename is "lwarp".
+-- This could happen if a local copy of lwarp has recently been recompiled.
+if sourcename=="lwarp" then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Lwarp has recently been recompiled in this directory,")
+ print ("lwarpmk: and \"lwarpmk.conf\" is no longer set for your own project.")
+ print ("lwarpmk: Recompile your own project using pdf/lua/xelatex <projectname>.")
+ print ("lwarpmk: After a recompile, \"lwarpmk.conf\" will be set for your project,")
+ print ("lwarpmk: and you may again use lwarpmk.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end -- sourcename of "lwarp"
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
-rmname = "rm"
-mvname = "mv"
-touchnamepre = "touch"
-touchnamepost = ""
-dirslash = "/"
-opquote= "\'"
+ rmname = "rm"
+ mvname = "mv"
+ cpname = "cp"
+ touchnamepre = "touch"
+ touchnamepost = ""
+ newtouchname = "touch"
+ dirslash = "/"
+ opquote= "\'"
+ cmdgroupopenname = " ( "
+ cmdgroupclosename = " ) "
+ seqname = " ; "
+ bgname = " &"
elseif opsystem=="Windows" then -- For Windows
-rmname = "DEL"
-mvname = "MOVE"
-touchnamepre = "COPY /b"
-touchnamepost = "+,,"
-dirslash = "\\"
-opquote= "\""
+ rmname = "DEL"
+ mvname = "MOVE"
+ cpname = "COPY"
+ touchnamepre = "COPY /b"
+ touchnamepost = "+,,"
+ newtouchname = "echo empty >"
+ dirslash = "\\"
+ opquote= "\""
+ cmdgroupopenname = ""
+ cmdgroupclosename = ""
+ seqname = " & "
+ bgname = ""
else print ( "lwarpmk: Select Unix or Windows for opsystem" )
end --- for Windows
-- set xindycmd according to pdflatex vs xelatex/lualatex:
if ( latexname == "pdflatex" ) then
-xindycmd = "texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
else
-xindycmd = "xindy -M texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "xindy -M texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
end
end -- loadconf
@@ -3156,8 +3282,8 @@ for line in fsource:lines() do
if ( string.find(line,"Rerun to get") ~= nil ) then
io.close(fsource)
return true
-end
-end
+end -- if
+end -- do
io.close(fsource)
return false
end
@@ -3167,10 +3293,13 @@ end
function onetime (fsuffix)
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
-err = os.execute(
--- "echo " ..
- latexname .. " " .. sourcename..fsuffix )
-if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+err = os.execute(latexname .. " " .. sourcename..fsuffix)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
@@ -3190,93 +3319,164 @@ end
function verifyfileexists (filename)
if (lfs.attributes ( filename , "modification" ) == nil ) then
-print ( "lwarpmk: " .. filename .. " not found." ) ;
-os.exit (1) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. filename .. " not found." ) ;
+ print ("lwarpmk: ===")
+ os.exit (1) ;
end
end
-- Convert <project>_html.pdf into HTML files:
function pdftohtml ()
- -- Convert to text:
- print ("lwarpmk: Converting " .. sourcename
- .."_html.pdf to " .. sourcename .. "_html.html")
- os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
- .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
- -- Split the result into individual HTML files:
- splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+-- Convert to text:
+print ("lwarpmk: Converting " .. sourcename
+ .."_html.pdf to " .. sourcename .. "_html.html")
+os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
+ .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+-- Split the result into individual HTML files:
+splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
-- Remove auxiliary files:
function removeaux ()
- os.execute ( rmname .. " " ..
- sourcename ..".aux " .. sourcename .. "_html.aux " ..
- sourcename ..".toc " .. sourcename .. "_html.toc " ..
- sourcename ..".lof " .. sourcename .. "_html.lof " ..
- sourcename ..".lot " .. sourcename .. "_html.lot " ..
- sourcename ..".idx " .. sourcename .. "_html.idx " ..
- sourcename ..".ind " .. sourcename .. "_html.ind " ..
- sourcename ..".log " .. sourcename .. "_html.log " ..
- sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
- "*_html_inc.*"
- )
+os.execute ( rmname .. " " ..
+ sourcename ..".aux " .. sourcename .. "_html.aux " ..
+ sourcename ..".toc " .. sourcename .. "_html.toc " ..
+ sourcename ..".lof " .. sourcename .. "_html.lof " ..
+ sourcename ..".lot " .. sourcename .. "_html.lot " ..
+ sourcename ..".idx " .. sourcename .. "_html.idx " ..
+ sourcename ..".ind " .. sourcename .. "_html.ind " ..
+ sourcename ..".log " .. sourcename .. "_html.log " ..
+ sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ "*_html_inc.*"
+ )
end
-- Create lateximages based on lateximages.txt:
function createlateximages ()
print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \"lateximages.txt\" does not exist.")
+ print ("lwarpmk: Your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: or the file has been deleted somehow.")
+ print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,")
+ print ("lwarpmk: and recreate \"lateximages.txt\".")
+ print ("lwarpmk: If your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: then \"lateximages.txt\" will never exist, and")
+ print ("lwarpmk: \"lwarpmk limages\" will not be necessary.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd:
+if opsystem=="Windows" then
+ err = os.execute (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd"
+ )
+ if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd")
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+ end
+end -- create lwarp_one_limage.cmd
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
--- lwimgnum is the sequential lateximage number to assign for the image
-i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|")
+-- lwimghash is true if this filename is a hash
+-- lwimgname is the lateximage filename root to assign for the image
+i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
+-- Skip is this image is hashed and already exists:
+local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
+if (
+ (lwimghash ~= "true") or
+ (lfs.attributes(lwimgfullname,"mode")==nil) -- file not exists
+)
+then -- not hashed or not exists:
+-- Print the name of the file being generated:
+print ( "lwarpmk: " .. lwimgname )
+-- Touch/create the dest so that only once instance tries to build it:
+err = os.execute(newtouchname .. " " .. lwimgfullname)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to touch " .. lwimgfullname)
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+end
-- Separate out the image into its own single-page pdf:
+if opsystem=="Unix" then
+-- For Unix / Linux / Mac OS:
err = os.execute(
-"pdfseparate -f " .. lwimgpage .. " -l " ..
- lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf")
+-- print (
+cmdgroupopenname ..
+"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
-- Crop the image:
-err = os.execute(
-"pdfcrop lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
-- Convert the image to svg:
-err = os.execute(
-"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
--- Move the result into lateximages/:
-err = os.execute(
-mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash )
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
-- Remove the temporary files:
-err = os.execute(
-rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+cmdgroupclosename .. " >/dev/null " .. bgname
+)
+elseif opsystem=="Windows" then
+-- For Windows
+err = os.execute (
+ "start /b \"\" lwarp_one_limage " ..
+ lwimgpage .. " " ..
+ lwimghash .. " " ..
+ lwimgname .. " " ..
+ sourcename .. " <nul >nul"
+)
+end -- Windows
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to create one lateximage.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end -- not hashed or not exists
+end -- not nil
end -- do
io.close(limagesfile)
+print ( "lwarpmk limages: done" )
end -- function
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
function compilelatexmk ( fsuffix )
- -- The recorder option is required to detect changes in <project>.tex
- -- while we are loading <project>_html.tex.
- err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
- .. "-e "
- .. opquote
- .. "$makeindex = q/" -- $
- .. xindycmd
- .. " -M " .. xdyfile
- .. " -L " .. language .. " /"
- .. opquote
- .. " -pdflatex=\"" .. latexname .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
- if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+-- The recorder option is required to detect changes in <project>.tex
+-- while we are loading <project>_html.tex.
+err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
+ .. "-e "
+ .. opquote
+ .. "$makeindex = q/" -- $
+ .. xindycmd
+ .. " -M " .. xdyfile
+ .. " -L " .. language .. " /"
+ .. opquote
+ .. " -pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename..fsuffix ..".tex" ) ;
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
end
-- lwarpmk --version :
@@ -3701,7 +3901,10 @@ end -- not --version
\newcommand*{\LWR@htmlrefsectionfilename}[1]{%
\LWR@traceinfo{LWR@htmlrefsectionfilename: !\detokenize{#1}!}%
+\begingroup%
+\LWR@nullfonts%
\LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}%
+\endgroup%
\LWR@traceinfo{LWR@htmlrefsectionfilename: done}%
}
@@ -3880,6 +4083,7 @@ end -- not --version
#1%
\protect\LWR@origtextgreater%
\endgroup%
+\LWR@traceinfo{LWR@htmltagc: done}%
}%
}
@@ -4039,7 +4243,10 @@ end -- not --version
\begin{warpHTML}
\NewDocumentEnvironment{BlockClass}{o m}%
-{\LWR@htmldivclass[#1]{#2}}
+{%
+ \LWR@origpar%
+ \LWR@htmldivclass[#1]{#2}%
+}
{\LWR@htmldivclassend{#2}}
\end{warpHTML}
\begin{warpprint}
@@ -4047,6 +4254,7 @@ end -- not --version
\end{warpprint}
\begin{warpHTML}
\newcommand{\BlockClassSingle}[2]{%
+\LWR@origpar%
\LWR@htmlelementclassline{div}{#1}{#2}%
}
\end{warpHTML}
@@ -4339,7 +4547,7 @@ end -- not --version
\csname p@footnote\endcsname\@thefnmark%
}% @currentlabel
\color@begingroup%
- \renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
+ \renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
\ifthenelse{%
\boolean{LWR@doingstartpars} \AND%
\cnttest{\value{LWR@lateximagedepth}}{=}{0}%
@@ -4480,10 +4688,8 @@ end -- not --version
\newcommand*{\LWR@filenamenoblanks}[1]{%
\begingroup
-
\LWR@nullfonts%
\renewcommand*{\LWR@htmltagc}[1]{}%
-\LWR@traceinfo{LWR@filenamenoblanks \#1: !#1!}%
\edef\LWR@thisnewfilename{#1}%
\LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}%
\fullexpandarg%
@@ -4561,7 +4767,7 @@ end -- not --version
}
\newcommand*{\LWR@newhtmlfile}[1]{
-\LWR@traceinfo{LWR@newhtmlfile: !#1!}
+\LWR@traceinfo{LWR@newhtmlfile}
\LWR@htmlelementclassend{section}{textbody}
@@ -4593,10 +4799,13 @@ end -- not --version
{\renewcommand*{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}}
\LWR@traceinfo{LWR@newhtmlfile: about to print start file}%
+\begingroup%
+\LWR@nullfonts%
\LWR@htmlblockcomment{%
|Start file|%
\LWR@htmlsectionfilename{\LWR@thisfilename}|%
}
+\endgroup%
\LWR@stoppars
@@ -4944,11 +5153,8 @@ end -- not --version
\newcommand*{\LWR@filestart}[1]{
\LWR@traceinfo{LWR@filestart}
\begingroup
-\LWR@traceinfo{LWR@filestart: A}
\LWR@nullfonts
-\LWR@traceinfo{LWR@filestart: B}
\LWR@htmltag{!DOCTYPE html}\LWR@orignewline
-\LWR@traceinfo{LWR@filestart: C}
\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline
\LWR@htmltag{head}\LWR@orignewline
\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline
@@ -5392,6 +5598,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}\LWR@orignewline% pre
}{}%
\begingroup%
+\LWR@orignormalsize%
\LWR@origttfamily%
\LWR@restoreoriglists%
\LWR@FBcancel%
@@ -7735,6 +7942,9 @@ autopage-\theLWR@currentautosec%
\let\llap\LWR@origllap%
\let\rlap\LWR@origrlap%
\let\hfilneg\LWR@orighfilneg%
+\let\raggedright\LWR@origraggedright
+\let\raggedleft\LWR@origraggedleft
+\let\centering\LWR@origcentering
\let\,\LWR@origcomma% disable HTML short unbreakable space
\let\textellipsis\LWR@origtextellipsis%
\let\textless\LWR@origtextless%
@@ -7847,10 +8057,16 @@ autopage-\theLWR@currentautosec%
}% mathjax
{% not mathjax
+ \begin{BlockClass}{displaymath}
\begin{lateximage}%
- [\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
+ [%
+ \textbackslash{[} % extra space
+ \LWR@HTMLsanitize{#1} % extra space
+ \textbackslash{]}%
+ ]%
\LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
\end{lateximage}%
+ \end{BlockClass}
}% not mathjax
}%
@@ -7858,28 +8074,47 @@ autopage-\theLWR@currentautosec%
\newlength{\LWR@singledollarheight}
\newlength{\LWR@singledollardepth}
-\protected\gdef\LWR@subsingledollar#1{%
+\protected\gdef\LWR@subsingledollar#1#2{%
\begingroup%
-\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+\ifboolexpr{%
+ (
+ bool{mathjax} or
+ ( bool{FormatWP} and bool{WPMarkMath} )
+ ) and
+ ( not test { \ifstrequal {#1} {math image} } )
+}%
{%
- {\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}%
+ {\textbackslash(\LWR@HTMLsanitize{#2}\textbackslash)}%
}% mathjax
{% not mathjax
\LWR@restoreorigformatting%
\LWR@orignormalsize%
\global\setlength{\LWR@singledollardepth}{\depthof{%
- \LWR@origdollar#1\LWR@origdollar%
+ \LWR@origdollar#2\LWR@origdollar%
}*\real{.8}}%
\global\setlength{\LWR@singledollarwidth}{\widthof{%
- \LWR@origdollar#1\LWR@origdollar%
+ \LWR@origdollar#2\LWR@origdollar%
}*\real{.8}}%
\global\setlength{\LWR@singledollarheight}{\totalheightof{%
- \LWR@origdollar#1\LWR@origdollar%
+ \LWR@origdollar#2\LWR@origdollar%
}*\real{.8}}%
\LWR@origscriptsize%
+ \ifdimgreater{\LWR@singledollarwidth}{\LWR@singledollarheight}{%
+ \def\LWR@singledollarstyle{%
+ width:\LWR@convertto{em}{\the\LWR@singledollarwidth} em%
+ }%
+ }{%
\def\LWR@singledollarstyle{%
height:\LWR@convertto{em}{\the\LWR@singledollarheight }em%
}%
+ }%
+ \ifdimless{\LWR@singledollarwidth}{.8em}%
+ {%
+ \def\LWR@singledollarstyle{%
+ height:\LWR@convertto{em}{\the\LWR@singledollarheight }em%
+ }%
+ }%
+ {}%
\ifdimless{\LWR@singledollarheight}{.3em}%
{%
\def\LWR@singledollarstyle{%
@@ -7889,22 +8124,35 @@ autopage-\theLWR@currentautosec%
{}%
\ifdimgreater{\LWR@singledollardepth}{0.01em}{%
\def\LWR@singledollardepthstyle{%
- \ ; \LWR@origmbox{vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em} %
+ \ ; % extra space
+ \LWR@origmbox{%
+ vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em%
+ } % extra space
}%
}{%
\def\LWR@singledollardepthstyle{}%
}%
- \begin{lateximage}%
- [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
- [\LWR@singledollarstyle \LWR@singledollardepthstyle]%
- \LWR@origdollar#1\LWR@origdollar%
+ \ifblank{#1}{%
+ \begin{lateximage}*%
+ [%
+ \textbackslash( %
+ \LWR@HTMLsanitize{#2} % extra space
+ \textbackslash)%
+ ]%
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]%
+ }{%
+ \begin{lateximage}%
+ [#1]%
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]%
+ }%
+ \LWR@origdollar#2\LWR@origdollar%
\end{lateximage}%
}%
\endgroup%
}
\protected\gdef\LWR@singledollar#1${%
-\LWR@subsingledollar{#1}%
+\LWR@subsingledollar{}{#1}%
}
\protected\gdef\(#1\){$#1$}
@@ -7915,11 +8163,15 @@ autopage-\theLWR@currentautosec%
\LetLtxMacro\LWR@origensuredmath\@ensuredmath
\renewcommand{\@ensuredmath}[1]{%
+\ifbool{mathjax}{%
+ \LWR@subsingledollar{math image}{\relax#1}%
+}{% SVG math
\ifmmode%
\LWR@origensuredmath{#1}%
\else%
- \LWR@subsingledollar{\relax#1}%
+ \LWR@subsingledollar{math image}{\relax#1}%
\fi%
+}%
}
\let\math\relax
@@ -7987,13 +8239,17 @@ autopage-\theLWR@currentautosec%
\LWR@hidelatexequation{equation}{\BODY}
}
{% not mathjax
- \begin{lateximage}[(\LWR@equationtag) \textbackslash{begin\{equation\}} %
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} %
- \textbackslash{end\{equation\}}]% alt tag
+ \begin{BlockClass}{displaymathnumbered}
+ \begin{lateximage}[%
+ (\LWR@equationtag) \textbackslash{begin\{equation\}} % extra space
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} % extra space
+ \textbackslash{end\{equation\}}%
+ ]% alt tag
\LWR@origequation
\BODY% contents collected by NewEnviron
\LWR@origendequation
\end{lateximage}%
+ \end{BlockClass}
}% not mathjax
}[%
@@ -8072,20 +8328,24 @@ autopage-\theLWR@currentautosec%
{% not mathjax
\ifbool{LWR@numbereqnarray}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
\LWR@addmathjax{eqnarray}{\BODY}]
\LWR@origeqnarray
\BODY
\LWR@origendeqnarray
\end{lateximage}
+ \end{BlockClass}
}%
{% not LWR@numbereqnarray
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]
\LWR@origeqnarray
\BODY
\nonumber
\LWR@origendeqnarray
\end{lateximage}
+ \end{BlockClass}
}% LWR@numbereqnarray
}% not mathjax
\booltrue{LWR@numbereqnarray}
@@ -8106,6 +8366,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR@amsmathbodynumbered{multline}]
}
}
@@ -8118,7 +8379,7 @@ autopage-\theLWR@currentautosec%
\boolfalse{LWR@amsmultline}
\LWR@addmathjax{multline}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8131,6 +8392,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR@amsmathbody{multline*}]
}
}
@@ -8143,7 +8405,7 @@ autopage-\theLWR@currentautosec%
\boolfalse{LWR@amsmultline}
\LWR@addmathjax{multline*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8157,6 +8419,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR@amsmathbodynumbered{gather}]
}
}
@@ -8168,7 +8431,7 @@ autopage-\theLWR@currentautosec%
\LWR@endhideamsmath
\LWR@addmathjax{gather}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8181,6 +8444,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR@amsmathbody{gather*}]
}
}
@@ -8192,7 +8456,7 @@ autopage-\theLWR@currentautosec%
\LWR@endhideamsmath
\LWR@addmathjax{gather*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8205,6 +8469,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR@amsmathbodynumbered{align}]
}
}
@@ -8216,7 +8481,7 @@ autopage-\theLWR@currentautosec%
\LWR@endhideamsmath
\LWR@addmathjax{align}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8229,6 +8494,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR@amsmathbody{align*}]
}
}
@@ -8240,7 +8506,7 @@ autopage-\theLWR@currentautosec%
\LWR@endhideamsmath
\LWR@addmathjax{align*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8253,6 +8519,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR@amsmathbodynumbered{flalign}]
}
}
@@ -8264,7 +8531,7 @@ autopage-\theLWR@currentautosec%
\LWR@endhideamsmath
\LWR@addmathjax{flalign}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8277,6 +8544,7 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR@amsmathbody{flalign*}]
}
}
@@ -8288,7 +8556,7 @@ autopage-\theLWR@currentautosec%
\LWR@endhideamsmath
\LWR@addmathjax{flalign*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8411,7 +8679,7 @@ autopage-\theLWR@currentautosec%
\newcommand*{\LWR@amsmathbody}[1]
{%
-\textbackslash\{begin\}\{#1\} %
+\textbackslash\{begin\}\{#1\} % extra space
\LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
\textbackslash\{end\}\{#1\}%
}
@@ -8420,14 +8688,14 @@ autopage-\theLWR@currentautosec%
{%
\ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
{(\LWR@equationtag)}%
-{(\LWR@startingequationtag--\LWR@equationtag)} %
-\LWR@amsmathbody{#1} %
+{(\LWR@startingequationtag--\LWR@equationtag)} % extra space
+\LWR@amsmathbody{#1} % extra space
}
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{O{image}O{}}
+\NewDocumentEnvironment{lateximage}{s O{image} O{}}
{%
\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
@@ -8451,9 +8719,21 @@ autopage-\theLWR@currentautosec%
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
class="lateximagesource"}%
\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR@lateximagesfile{%
- |\arabic{LWR@LIpage}|\arabic{LWR@externalfilecnt}|%
- }%
+ \IfBooleanTF{#1}% starred
+ {% hash
+ \LWR@traceinfo{lateximage: hash true}%
+ \edef\LWR@hashedname{\LWR@mdfive{\detokenize\expandafter{#2}}}%
+ \LWR@traceinfo{lateximage: hash is \LWR@hashedname}%
+ \immediate\write\LWR@lateximagesfile{%
+ |\arabic{LWR@LIpage}|true|\LWR@hashedname|%
+ }%
+ }% hash
+ {% no hash
+ \LWR@traceinfo{lateximage: hash false}%
+ \immediate\write\LWR@lateximagesfile{%
+ |\arabic{LWR@LIpage}|false|lateximage-\arabic{LWR@externalfilecnt}|%
+ }%
+ }% no hash
\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
\addtocounter{LWR@lateximagedepth}{1}%
@@ -8490,8 +8770,21 @@ autopage-\theLWR@currentautosec%
\LWR@origvspace*{.5\baselineskip}%
\LWR@htmlclosecomment%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
- \LWR@subinlineimage[#1]{lateximage}%
- {lateximages\OSPathSymbol{}\LWR@origmbox{lateximage-\theLWR@externalfilecnt}}{svg}{#2}%
+ \IfBooleanTF{#1}% starred
+ {% hash
+ \LWR@subinlineimage[#2]{lateximage}%
+ {%
+ lateximages\OSPathSymbol%
+ \LWR@origmbox{\LWR@hashedname}%
+ }{svg}{#3}%
+ }% hash
+ {% no hash
+ \LWR@subinlineimage[#2]{lateximage}%
+ {%
+ lateximages\OSPathSymbol%
+ \LWR@origmbox{lateximage-\theLWR@externalfilecnt}%
+ }{svg}{#3}%
+ }% no hash
\LWR@ensuredoingapar%
\LWR@htmltag{/span}%
\ifbool{HTMLDebugComments}{%
@@ -8506,7 +8799,7 @@ autopage-\theLWR@currentautosec%
\begin{warpprint}
-\NewDocumentEnvironment{lateximage}{o o}
+\NewDocumentEnvironment{lateximage}{s o o}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
@@ -8570,12 +8863,29 @@ autopage-\theLWR@currentautosec%
\begin{warpHTML}
+\newrobustcmd{\LWR@siunitx@textcelsius}{\HTMLentity{deg}C}
+\newrobustcmd{\LWR@siunitx@textdegree}{\HTMLentity{deg}}
+\newrobustcmd{\LWR@siunitx@textprime}{\HTMLunicode{2032}}
+\newrobustcmd{\LWR@siunitx@textdblprime}{\HTMLunicode{2033}}
+\newrobustcmd{\LWR@siunitx@textplanckbar}{\text{\HTMLunicode{0127}}}
+
+\appto\LWR@restoreorigformatting{
+\renewrobustcmd{\LWR@siunitx@textcelsius}{\text{\ensuremath{^\circ}C}}
+\renewrobustcmd{\LWR@siunitx@textdegree}{\text{\ensuremath{^\circ}}}
+\renewrobustcmd{\LWR@siunitx@textprime}{\text{\ensuremath{^\prime}}}
+\renewrobustcmd{\LWR@siunitx@textdblprime}{\text{\ensuremath{^{\prime\prime}}}}
+\renewrobustcmd{\LWR@siunitx@textplanckbar}{\text{\ensuremath{\hbar}}}
+}
+
\PassOptionsToPackage{
detect-mode=true,
per-mode=symbol, % fraction is not seen by pdftotext
+ text-celsius = {\LWR@siunitx@textcelsius},
+ text-degree = {\LWR@siunitx@textdegree},
+ text-arcminute = {\LWR@siunitx@textprime} ,
+ text-arcsecond = {\LWR@siunitx@textdblprime} ,
}{siunitx}
-
\end{warpHTML}
\begin{warpprint}
@@ -9157,18 +9467,20 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
\renewcommand*{\,}{-}%
\renewcommand*{~}{-}%
+\renewcommand*{\newline}{ }%
\renewcommand*{\textellipsis}{-}%
\renewcommand*{\HTMLunicode}[1]{-}%
\renewcommand*{\HTMLentity}[1]{-}%
\renewcommand*{\&}{and}%
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
-\LetLtxMacro\underline\LWR@origunderline%
+\renewcommand{\underline}[1]{##1}%
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
-\DeclareRobustCommand{\LWR@subsingledollar}[1]{}%
-\renewcommand*{\newline}{ }%
+\def\(##1\){}%
+\def\[##1\]{}%
+\renewcommand{\LWR@subsingledollar}[2]{}
}
@@ -9186,23 +9498,23 @@ width:\LWR@printlength{\LWR@tempwidth}%
}%
}
-\renewcommand*{\mdseries}{\renewcommand*{\LWR@f@series}{md}}
+\renewrobustcmd*{\mdseries}{\renewcommand*{\LWR@f@series}{md}}
-\renewcommand*{\bfseries}{\renewcommand*{\LWR@f@series}{bf}}
+\renewrobustcmd*{\bfseries}{\renewcommand*{\LWR@f@series}{bf}}
-\renewcommand*{\rmfamily}{\renewcommand*{\LWR@f@family}{rm}}
+\renewrobustcmd*{\rmfamily}{\renewcommand*{\LWR@f@family}{rm}}
-\renewcommand*{\sffamily}{\renewcommand*{\LWR@f@family}{sf}}
+\renewrobustcmd*{\sffamily}{\renewcommand*{\LWR@f@family}{sf}}
-\renewcommand*{\ttfamily}{\renewcommand*{\LWR@f@family}{tt}}
+\renewrobustcmd*{\ttfamily}{\renewcommand*{\LWR@f@family}{tt}}
-\renewcommand*{\upshape}{\renewcommand*{\LWR@f@shape}{up}}
+\renewrobustcmd*{\upshape}{\renewcommand*{\LWR@f@shape}{up}}
-\renewcommand*{\itshape}{\renewcommand*{\LWR@f@shape}{it}}
+\renewrobustcmd*{\itshape}{\renewcommand*{\LWR@f@shape}{it}}
-\renewcommand*{\scshape}{\renewcommand*{\LWR@f@shape}{sc}}
+\renewrobustcmd*{\scshape}{\renewcommand*{\LWR@f@shape}{sc}}
-\renewcommand*{\normalfont}{\rmfamily\mdseries\upshape}
+\renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape}
\renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}}
@@ -9210,12 +9522,12 @@ width:\LWR@printlength{\LWR@tempwidth}%
\renewcommand{\sb}[1]{\text{<sub>#1</sub>}{}}
-\renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
+\renewrobustcmd{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
\renewcommand{\@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
\AtBeginDocument{
-\renewcommand{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+\renewrobustcmd{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
}
\AtBeginDocument{
@@ -9232,6 +9544,12 @@ width:\LWR@printlength{\LWR@tempwidth}%
{underline}{#1}%
}
+\newcommand{\LWR@overline}[1]{%
+\LWR@HTMLtextstyle%
+ {text-decoration:overline;text-decoration-skip}%
+ {overline}{#1}%
+}
+
\end{warpHTML}
@@ -9243,16 +9561,16 @@ width:\LWR@printlength{\LWR@tempwidth}%
\renewrobustcmd*{~}{\HTMLentity{nbsp}}
\renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}}
-\renewcommand*{\normalsize}{}
-\renewcommand*{\small}{}
-\renewcommand*{\footnotesize}{}
-\renewcommand*{\scriptsize}{}
-\renewcommand*{\tiny}{}
-\renewcommand*{\large}{}
-\renewcommand*{\Large}{}
-\renewcommand*{\LARGE}{}
-\renewcommand*{\huge}{}
-\renewcommand*{\Huge}{}
+\renewrobustcmd*{\normalsize}{}
+\renewrobustcmd*{\small}{}
+\renewrobustcmd*{\footnotesize}{}
+\renewrobustcmd*{\scriptsize}{}
+\renewrobustcmd*{\tiny}{}
+\renewrobustcmd*{\large}{}
+\renewrobustcmd*{\Large}{}
+\renewrobustcmd*{\LARGE}{}
+\renewrobustcmd*{\huge}{}
+\renewrobustcmd*{\Huge}{}
\DeclareDocumentCommand{\onecolumn}{}{}
\DeclareDocumentCommand{\twocolumn}{O{}}{
@@ -9271,8 +9589,8 @@ width:\LWR@printlength{\LWR@tempwidth}%
}
-\newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}%
-\let\newline\LWR@newlinebr
+\newrobustcmd*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}%
+\LetLtxMacro\newline\LWR@newlinebr
\LetLtxMacro\LWR@origendofline\\
\NewDocumentCommand{\LWR@endofline}{s o}
@@ -9319,7 +9637,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
}%
{%
\LWR@htmltagc{%
- span style="width:\LWR@printlength{\LWR@tempwidth}; %
+ span style="width:\LWR@printlength{\LWR@tempwidth}; % extra space
display:inline-block"%
}%
\ifbool{FormatWP}{%
@@ -9339,7 +9657,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LetLtxMacro{\hspace}{\LWR@hspace}
\NewDocumentCommand{\LWR@vspace}{s m}{}
-\let\vspace\LWR@vspace
+\LetLtxMacro\vspace\LWR@vspace
\renewcommand*{\linebreak}[1][]{\newline}
@@ -9403,7 +9721,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LWR@minipagestartpars%
}% non-zero width
}
-\renewcommand{\rule}{\LWR@rule}
+\renewrobustcmd{\rule}{\LWR@rule}
\end{warpHTML}