summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-06 20:52:12 +0000
committerKarl Berry <karl@freefriends.org>2018-06-06 20:52:12 +0000
commit0287311bafc0bdd253df0c8d6df3ef85f804d263 (patch)
tree151b584accf0b823a70c9bb86673bb0ad79f2991
parente0b44a591ea65a8c11f15d8e4c0cfb50a6058782 (diff)
lwarp (6jun18)
git-svn-id: svn://tug.org/texlive/trunk@47944 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua349
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/README.txt2
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/lwarp.pdfbin2120473 -> 2151248 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/lwarp/lwarpmk.lua349
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx3664
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.ins10
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty161
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty73
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty10
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty10
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty44
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ellipsis.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty89
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty15
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-glossary.sty21
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty32
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ltablex.sty36
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-marginnote.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty13
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty30
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty8
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty40
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty7
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-scrextend.sty12
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-trimclip.sty35
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty33
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty57
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xellipsis.sty53
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty18
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xltabular.sty29
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty41
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty1304
50 files changed, 4602 insertions, 2035 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
index 1181ca8230d..81fac010a4f 100755
--- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
+++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
@@ -2,15 +2,16 @@
-- Copyright 2016-2018 Brian Dunn
--- Print the usage of the lwarpmk command:
-
-printversion = "v0.56"
+printversion = "v0.57"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
end
function printusage ()
+--
+-- Print the usage of the lwarpmk command:
+--
print ( [[
lwarpmk print [project]: Compile the print version if necessary.
@@ -38,9 +39,10 @@ lwarpmk --help: Print this help message.
printconf ()
end
--- Print the format of the configuration file lwarpmk.conf:
-
function printconf ()
+--
+-- Print the format of the configuration file lwarpmk.conf:
+--
print ( [[
An example lwarpmk.conf or <project>.lwarpmkconf project file:
--
@@ -62,11 +64,12 @@ Values must be in upright "quotes".
]] ) ;
end
+function splitfile (destfile,sourcefile)
+--
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
-
-function splitfile (destfile,sourcefile)
+--
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -83,20 +86,25 @@ end -- do
io.close(sfile)
end -- function
--- Incorrect value, so print an error and exit.
-
function cvalueerror ( line, linenum , cvalue )
+--
+-- Incorrect value, so print an error and exit.
+--
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print (
+ "lwarpmk: incorrect variable value \"" .. cvalue ..
+ "\" in lwarpmk.conf.\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
--- Load settings from the project's "lwarpmk.conf" file:
-
function loadconf ()
+--
+-- Load settings from the project's "lwarpmk.conf" file:
+--
-- Default configuration filename:
local conffile = "lwarpmk.conf"
-- Optional configuration filename:
@@ -118,7 +126,10 @@ if (lfs.attributes(conffile,"mode")==nil) then
print ("lwarpmk: recompile using pdflatex, xelatex, or lualatex,")
print ("lwarpmk: then try using lwarpmk again.")
if ( arg[2] ~= nil ) then
- print ("lwarpmk: (\"" .. arg[2] .. "\" does not appear to be a project name.)")
+ print (
+ "lwarpmk: (\"" .. arg[2] ..
+ "\" does not appear to be a project name.)"
+ )
end
print ("lwarpmk: ===")
printhelp () ;
@@ -171,7 +182,10 @@ elseif ( cvarname == "pdftotextenc" ) then pdftotextenc = cvalue
else
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print (
+ "lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " ..
+ conffile ..".\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
@@ -203,7 +217,7 @@ if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
opquote= "\'"
cmdgroupopenname = " ( "
cmdgroupclosename = " ) "
- seqname = " ; "
+ seqname = " && "
bgname = " &"
elseif opsystem=="Windows" then -- For Windows
rmname = "DEL"
@@ -232,15 +246,31 @@ end
end -- loadconf
+function executecheckerror ( executecommands , errormessage )
+--
+-- Execute an operating system call,
+-- and maybe exit with an error message.
+--
+local err
+err = os.execute ( executecommands )
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. errormessage )
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
+end -- executecheckerror
+
function refreshdate ()
os.execute(touchnamepre .. " " .. sourcename .. ".tex " .. touchnamepost)
end
+function reruntoget (filesource)
+--
-- Scan the LaTeX log file for the phrase "Rerun to get",
-- indicating that the file should be compiled again.
-- Return true if found.
-
-function reruntoget (filesource)
+--
local fsource = io.open(filesource)
for line in fsource:lines() do
if ( string.find(line,"Rerun to get") ~= nil ) then
@@ -252,10 +282,11 @@ io.close(fsource)
return false
end
+function onetime (fsuffix)
+--
-- Compile one time, return true if should compile again.
-- fsuffix is "" for print, "_html" for HTML output.
-
-function onetime (fsuffix)
+--
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -263,20 +294,18 @@ if ( shellescape == "true" ) then
else
thisshellescape = " "
end
-err = os.execute(latexname .. thisshellescape .. sourcename..fsuffix)
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+executecheckerror (
+ latexname .. thisshellescape .. sourcename..fsuffix ,
+ "Compile error."
+)
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
+function manytimes (fsuffix)
+--
-- Compile up to five times.
-- fsuffix is "" for print, "_html" for HTML output
-
-function manytimes (fsuffix)
+--
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
@@ -285,9 +314,10 @@ if onetime(fsuffix) == true then
end end end end end
end
--- Exit if the given file does not exist.
-
function verifyfileexists (filename)
+--
+-- Exit if the given file does not exist.
+--
if (lfs.attributes ( filename , "modification" ) == nil ) then
print ("lwarpmk: ===")
print ("lwarpmk: " .. filename .. " not found." ) ;
@@ -296,9 +326,10 @@ if (lfs.attributes ( filename , "modification" ) == nil ) then
end
end
--- Convert <project>_html.pdf into HTML files:
-
function pdftohtml ()
+--
+-- Convert <project>_html.pdf into HTML files:
+--
-- Convert to text:
print ("lwarpmk: Converting " .. sourcename
.."_html.pdf to " .. sourcename .. "_html.html")
@@ -308,9 +339,11 @@ os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
+function removeaux ()
+--
-- Remove auxiliary files:
-- All aux files are removed since there may be many bbl*.aux files.
-function removeaux ()
+--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
sourcename ..".lof " .. sourcename .. "_html.lof " ..
@@ -323,10 +356,12 @@ os.execute ( rmname .. " *.aux " ..
)
end
+function checkhtmlpdfexists ()
+--
-- Error if the HTML document does not exist.
--- The lateximages are drawn from the HTML PDF verison of the document,
+-- The lateximages are drawn from the HTML PDF version of the document,
-- so "lwarpmk html" must be done before "lwarpmk limages".
-function checkhtmlpdfexists ()
+--
local htmlpdffile = io.open(sourcename .. "_html.pdf", "r")
if ( htmlpdffile == nil ) then
print ("")
@@ -339,8 +374,10 @@ end
io.close (htmlpdffile)
end -- checkhtmlpdfexists
--- Warning of a missing lateximages.txt file:
function warnlimages ()
+--
+-- Warning of a missing lateximages.txt file:
+--
print ("lwarpmk: ===")
print ("lwarpmk: \"lateximages.txt\" does not exist.")
print ("lwarpmk: Your project does not use SVG math or other lateximages,")
@@ -353,9 +390,11 @@ function warnlimages ()
print ("lwarpmk: ===")
end -- warnlimages
+function checklimages ()
+--
-- Check lateximages.txt to see if need to recompile first.
-- If any entry has a page number of zero, then there were incorrect images.
-function checklimages ()
+--
print ("lwarpmk: Checking for a valid lateximages.txt file.")
local limagesfile = io.open("lateximages.txt", "r")
if ( limagesfile == nil ) then
@@ -387,90 +426,33 @@ if ( pagezerowarning ) then
print ("lwarpmk: ===")
os.exit(1) ;
end -- pagezerowarning
-end -- checklateximages
+end -- checklimages
--- Create lateximages based on lateximages.txt:
-function createlateximages ()
--- See if the document must be recompiled first:
-checklimages ()
--- See if the print version exists:
-checkhtmlpdfexists ()
--- Attempt to create the lateximages:
-print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt", "r")
-if ( limagesfile == nil ) then
- warnlateximages ()
- 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 from lwarp_one_limage.txt:
-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")
- print (" lwarp_one_limage.txt to lwarp_one_limage.cmd")
- print ("lwarpmk: ===")
- os.exit(1) ;
- end
-end -- create lwarp_one_limage.cmd
--- Track the number of parallel processes
-numimageprocesses = 0
--- Track warning to recompile if find a page 0
-pagezerowarning = false
--- Scan lateximages.txt
-for line in limagesfile:lines() do
--- lwimgpage is the page number in the PDF which has the image
--- 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 if the page number is 0:
-if ( lwimgpage == "0" ) then
- pagezerowarning = true
-else
--- 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(
-cmdgroupopenname ..
-"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
- sourcename .."_html.pdf " ..
- "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
- seqname ..
--- Crop the image:
-"pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
- seqname ..
--- Convert the image to svg:
-"pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname ..".svg" ..
- seqname ..
--- Remove the temporary files:
-rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
-rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
-cmdgroupclosename .. " >/dev/null " .. bgname
+function createuniximage ( lwimgfullname )
+--
+-- Create one lateximage for Unix / Linux / Mac OS.
+--
+executecheckerror (
+ cmdgroupopenname ..
+ "pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
+ -- Crop the image:
+ "pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" ..
+ lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
+ -- Convert the image to svg:
+ "pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
+ -- Remove the temporary files:
+ rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+ rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+ cmdgroupclosename .. " >/dev/null " .. bgname
+ ,
+ "File error trying to convert " .. lwimgfullname
)
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
@@ -478,10 +460,14 @@ numimageprocesses = numimageprocesses + 1
if ( numimageprocesses > 32 ) then
numimageprocesses = 0
print ( "lwarpmk: waiting" )
- err = os.execute ( "wait" )
+ executecheckerror ( "wait" , "File error trying to wait.")
end
-elseif opsystem=="Windows" then
--- For Windows
+end -- createuniximage
+
+function createwindowsimage ( lwimgfullname )
+--
+-- Create one lateximage for Windows.
+--
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
numimageprocesses = numimageprocesses + 1
@@ -493,30 +479,94 @@ else
thiswaitcommand = ""
end
-- Execute the image generation command
-err = os.execute (
+executecheckerror (
"start /B " .. thiswaitcommand .. " \"\" lwarp_one_limage " ..
lwimgpage .. " " ..
lwimghash .. " " ..
lwimgname .. " " ..
sourcename .. " <nul >nul"
+ ,
+ "File error trying to create image."
)
-end -- Windows
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: File error trying to create one lateximage.")
- print ("lwarpmk: ===")
+end -- createwindowsimage
+
+function createonelateximage ( line )
+--
+-- Given the next line of lateximages.txt, convert a single image.
+--
+-- lwimgpage is the page number in the PDF which has the image
+-- 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 if the page number is 0:
+ if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+ else
+ -- 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:
+ executecheckerror (
+ newtouchname .. " " .. lwimgfullname ,
+ "File error trying to touch " .. lwimgfullname
+ )
+ -- Separate out the image into its own single-page pdf:
+ if opsystem=="Unix" then
+ createuniximage (lwimgfullname)
+ elseif opsystem=="Windows" then
+ createwindowsimage (lwimgfullname)
+ end
+ end -- not hashed or not exists
+ end -- not page 0
+end -- not nil
+end -- createonelateximage
+
+function createlateximages ()
+--
+-- Create lateximages based on lateximages.txt:
+--
+-- See if the document must be recompiled first:
+checklimages ()
+-- See if the print version exists:
+checkhtmlpdfexists ()
+-- Attempt to create the lateximages:
+print ("lwarpmk: Creating lateximages.")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ warnlateximages ()
os.exit(1)
end
-end -- not hashed or not exists
-end -- not page 0
-end -- not nil
+-- Create the lateximages directory, ignore error if already exists
+err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd from lwarp_one_limage.txt:
+if opsystem=="Windows" then
+ executecheckerror (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd" ,
+ "File error trying to copy lwarp_one_limage.txt to lwarp_one_limage.cmd"
+ )
+end -- create lwarp_one_limage.cmd
+-- Track the number of parallel processes
+numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
+-- Scan lateximages.txt
+for line in limagesfile:lines() do
+ createonelateximage ( line )
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: ===")
print ( "lwarpmk limages: Wait a moment for the images to complete" )
-print ( "lwarpmk limages: before reloading the page." )
+print ( "lwarpmk limages: before reloading the page." )
print ( "lwarpmk limages: ===")
-print ( "lwarpmk limages: done" )
+print ( "lwarpmk limages: Done." )
if ( pagezerowarning == true ) then
print ( "lwarpmk limages: WARNING: Images will be incorrect." )
print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
@@ -525,9 +575,11 @@ if ( pagezerowarning == true ) then
end -- pagezerowarning
end -- function
+function compilelatexmk ( fsuffix )
+--
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
-function compilelatexmk ( fsuffix )
+--
-- Maybe select the shell-escape option:
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -537,7 +589,8 @@ else
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 "
+executecheckerror (
+ "latexmk -pdf -dvi- -ps- -recorder "
.. "-e "
.. opquote
.. "$makeindex = q/" -- $
@@ -547,19 +600,18 @@ err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
.. " -L " .. xindylanguage .. " /"
.. opquote
.. " -pdflatex=\"" .. latexname .. thisshellescape .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+ .. sourcename..fsuffix ..".tex"
+ ,
+ "Compile error."
+)
end -- function
+function convertpdftosvg ()
+--
-- Converts PDF files to SVG files.
-- The filenames are arg[2] and up.
-- arg[1] is the command "pdftosvg".
-function convertpdftosvg ()
+--
for i = 2 , #arg do
if (lfs.attributes(arg[i],"mode")==nil) then
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
@@ -570,6 +622,8 @@ for i = 2 , #arg do
end -- do
end --function
+-- Start of the main code: --
+
-- lwarpmk --version :
if (arg[1] == "--version") then
@@ -606,6 +660,8 @@ else -- not latexmk
end
end -- not latexmk
+-- lwarpmk print1:
+
elseif arg[1] == "print1" then
loadconf ()
verifyfileexists (sourcename .. ".tex") ;
@@ -676,6 +732,8 @@ else -- not latexmk
end
end -- not latexmk
+-- lwarpmk html1:
+
elseif arg[1] == "html1" then
loadconf ()
verifyfileexists ( sourcename .. ".tex" ) ;
@@ -683,6 +741,7 @@ elseif arg[1] == "html1" then
pdftohtml ()
print ("lwarpmk: Done.")
+-- lwarpmk pdftohtml:
elseif arg[1] == "pdftohtml" then
loadconf ()
pdftohtml ()
@@ -790,6 +849,8 @@ printhelp ()
elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
printusage ()
+-- Unknown command:
+
else
printhelp ()
print ("\nlwarpmk: ****** Unknown command \""..arg[1].."\". ******\n")
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt
index c163e63a3eb..4d1a2275143 100644
--- a/Master/texmf-dist/doc/latex/lwarp/README.txt
+++ b/Master/texmf-dist/doc/latex/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.56 README.txt
+LaTeX lwarp package v0.57 README.txt
Files included are:
diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
index b93bd1eaaac..f4a153778a5 100644
--- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
+++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
index 1181ca8230d..81fac010a4f 100755
--- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
+++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
@@ -2,15 +2,16 @@
-- Copyright 2016-2018 Brian Dunn
--- Print the usage of the lwarpmk command:
-
-printversion = "v0.56"
+printversion = "v0.57"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
end
function printusage ()
+--
+-- Print the usage of the lwarpmk command:
+--
print ( [[
lwarpmk print [project]: Compile the print version if necessary.
@@ -38,9 +39,10 @@ lwarpmk --help: Print this help message.
printconf ()
end
--- Print the format of the configuration file lwarpmk.conf:
-
function printconf ()
+--
+-- Print the format of the configuration file lwarpmk.conf:
+--
print ( [[
An example lwarpmk.conf or <project>.lwarpmkconf project file:
--
@@ -62,11 +64,12 @@ Values must be in upright "quotes".
]] ) ;
end
+function splitfile (destfile,sourcefile)
+--
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
-
-function splitfile (destfile,sourcefile)
+--
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -83,20 +86,25 @@ end -- do
io.close(sfile)
end -- function
--- Incorrect value, so print an error and exit.
-
function cvalueerror ( line, linenum , cvalue )
+--
+-- Incorrect value, so print an error and exit.
+--
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print (
+ "lwarpmk: incorrect variable value \"" .. cvalue ..
+ "\" in lwarpmk.conf.\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
--- Load settings from the project's "lwarpmk.conf" file:
-
function loadconf ()
+--
+-- Load settings from the project's "lwarpmk.conf" file:
+--
-- Default configuration filename:
local conffile = "lwarpmk.conf"
-- Optional configuration filename:
@@ -118,7 +126,10 @@ if (lfs.attributes(conffile,"mode")==nil) then
print ("lwarpmk: recompile using pdflatex, xelatex, or lualatex,")
print ("lwarpmk: then try using lwarpmk again.")
if ( arg[2] ~= nil ) then
- print ("lwarpmk: (\"" .. arg[2] .. "\" does not appear to be a project name.)")
+ print (
+ "lwarpmk: (\"" .. arg[2] ..
+ "\" does not appear to be a project name.)"
+ )
end
print ("lwarpmk: ===")
printhelp () ;
@@ -171,7 +182,10 @@ elseif ( cvarname == "pdftotextenc" ) then pdftotextenc = cvalue
else
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print (
+ "lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " ..
+ conffile ..".\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
@@ -203,7 +217,7 @@ if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
opquote= "\'"
cmdgroupopenname = " ( "
cmdgroupclosename = " ) "
- seqname = " ; "
+ seqname = " && "
bgname = " &"
elseif opsystem=="Windows" then -- For Windows
rmname = "DEL"
@@ -232,15 +246,31 @@ end
end -- loadconf
+function executecheckerror ( executecommands , errormessage )
+--
+-- Execute an operating system call,
+-- and maybe exit with an error message.
+--
+local err
+err = os.execute ( executecommands )
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. errormessage )
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
+end -- executecheckerror
+
function refreshdate ()
os.execute(touchnamepre .. " " .. sourcename .. ".tex " .. touchnamepost)
end
+function reruntoget (filesource)
+--
-- Scan the LaTeX log file for the phrase "Rerun to get",
-- indicating that the file should be compiled again.
-- Return true if found.
-
-function reruntoget (filesource)
+--
local fsource = io.open(filesource)
for line in fsource:lines() do
if ( string.find(line,"Rerun to get") ~= nil ) then
@@ -252,10 +282,11 @@ io.close(fsource)
return false
end
+function onetime (fsuffix)
+--
-- Compile one time, return true if should compile again.
-- fsuffix is "" for print, "_html" for HTML output.
-
-function onetime (fsuffix)
+--
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -263,20 +294,18 @@ if ( shellescape == "true" ) then
else
thisshellescape = " "
end
-err = os.execute(latexname .. thisshellescape .. sourcename..fsuffix)
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+executecheckerror (
+ latexname .. thisshellescape .. sourcename..fsuffix ,
+ "Compile error."
+)
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
+function manytimes (fsuffix)
+--
-- Compile up to five times.
-- fsuffix is "" for print, "_html" for HTML output
-
-function manytimes (fsuffix)
+--
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
@@ -285,9 +314,10 @@ if onetime(fsuffix) == true then
end end end end end
end
--- Exit if the given file does not exist.
-
function verifyfileexists (filename)
+--
+-- Exit if the given file does not exist.
+--
if (lfs.attributes ( filename , "modification" ) == nil ) then
print ("lwarpmk: ===")
print ("lwarpmk: " .. filename .. " not found." ) ;
@@ -296,9 +326,10 @@ if (lfs.attributes ( filename , "modification" ) == nil ) then
end
end
--- Convert <project>_html.pdf into HTML files:
-
function pdftohtml ()
+--
+-- Convert <project>_html.pdf into HTML files:
+--
-- Convert to text:
print ("lwarpmk: Converting " .. sourcename
.."_html.pdf to " .. sourcename .. "_html.html")
@@ -308,9 +339,11 @@ os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
+function removeaux ()
+--
-- Remove auxiliary files:
-- All aux files are removed since there may be many bbl*.aux files.
-function removeaux ()
+--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
sourcename ..".lof " .. sourcename .. "_html.lof " ..
@@ -323,10 +356,12 @@ os.execute ( rmname .. " *.aux " ..
)
end
+function checkhtmlpdfexists ()
+--
-- Error if the HTML document does not exist.
--- The lateximages are drawn from the HTML PDF verison of the document,
+-- The lateximages are drawn from the HTML PDF version of the document,
-- so "lwarpmk html" must be done before "lwarpmk limages".
-function checkhtmlpdfexists ()
+--
local htmlpdffile = io.open(sourcename .. "_html.pdf", "r")
if ( htmlpdffile == nil ) then
print ("")
@@ -339,8 +374,10 @@ end
io.close (htmlpdffile)
end -- checkhtmlpdfexists
--- Warning of a missing lateximages.txt file:
function warnlimages ()
+--
+-- Warning of a missing lateximages.txt file:
+--
print ("lwarpmk: ===")
print ("lwarpmk: \"lateximages.txt\" does not exist.")
print ("lwarpmk: Your project does not use SVG math or other lateximages,")
@@ -353,9 +390,11 @@ function warnlimages ()
print ("lwarpmk: ===")
end -- warnlimages
+function checklimages ()
+--
-- Check lateximages.txt to see if need to recompile first.
-- If any entry has a page number of zero, then there were incorrect images.
-function checklimages ()
+--
print ("lwarpmk: Checking for a valid lateximages.txt file.")
local limagesfile = io.open("lateximages.txt", "r")
if ( limagesfile == nil ) then
@@ -387,90 +426,33 @@ if ( pagezerowarning ) then
print ("lwarpmk: ===")
os.exit(1) ;
end -- pagezerowarning
-end -- checklateximages
+end -- checklimages
--- Create lateximages based on lateximages.txt:
-function createlateximages ()
--- See if the document must be recompiled first:
-checklimages ()
--- See if the print version exists:
-checkhtmlpdfexists ()
--- Attempt to create the lateximages:
-print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt", "r")
-if ( limagesfile == nil ) then
- warnlateximages ()
- 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 from lwarp_one_limage.txt:
-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")
- print (" lwarp_one_limage.txt to lwarp_one_limage.cmd")
- print ("lwarpmk: ===")
- os.exit(1) ;
- end
-end -- create lwarp_one_limage.cmd
--- Track the number of parallel processes
-numimageprocesses = 0
--- Track warning to recompile if find a page 0
-pagezerowarning = false
--- Scan lateximages.txt
-for line in limagesfile:lines() do
--- lwimgpage is the page number in the PDF which has the image
--- 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 if the page number is 0:
-if ( lwimgpage == "0" ) then
- pagezerowarning = true
-else
--- 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(
-cmdgroupopenname ..
-"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
- sourcename .."_html.pdf " ..
- "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
- seqname ..
--- Crop the image:
-"pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
- seqname ..
--- Convert the image to svg:
-"pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname ..".svg" ..
- seqname ..
--- Remove the temporary files:
-rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
-rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
-cmdgroupclosename .. " >/dev/null " .. bgname
+function createuniximage ( lwimgfullname )
+--
+-- Create one lateximage for Unix / Linux / Mac OS.
+--
+executecheckerror (
+ cmdgroupopenname ..
+ "pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
+ -- Crop the image:
+ "pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" ..
+ lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
+ -- Convert the image to svg:
+ "pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
+ -- Remove the temporary files:
+ rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+ rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+ cmdgroupclosename .. " >/dev/null " .. bgname
+ ,
+ "File error trying to convert " .. lwimgfullname
)
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
@@ -478,10 +460,14 @@ numimageprocesses = numimageprocesses + 1
if ( numimageprocesses > 32 ) then
numimageprocesses = 0
print ( "lwarpmk: waiting" )
- err = os.execute ( "wait" )
+ executecheckerror ( "wait" , "File error trying to wait.")
end
-elseif opsystem=="Windows" then
--- For Windows
+end -- createuniximage
+
+function createwindowsimage ( lwimgfullname )
+--
+-- Create one lateximage for Windows.
+--
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
numimageprocesses = numimageprocesses + 1
@@ -493,30 +479,94 @@ else
thiswaitcommand = ""
end
-- Execute the image generation command
-err = os.execute (
+executecheckerror (
"start /B " .. thiswaitcommand .. " \"\" lwarp_one_limage " ..
lwimgpage .. " " ..
lwimghash .. " " ..
lwimgname .. " " ..
sourcename .. " <nul >nul"
+ ,
+ "File error trying to create image."
)
-end -- Windows
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: File error trying to create one lateximage.")
- print ("lwarpmk: ===")
+end -- createwindowsimage
+
+function createonelateximage ( line )
+--
+-- Given the next line of lateximages.txt, convert a single image.
+--
+-- lwimgpage is the page number in the PDF which has the image
+-- 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 if the page number is 0:
+ if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+ else
+ -- 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:
+ executecheckerror (
+ newtouchname .. " " .. lwimgfullname ,
+ "File error trying to touch " .. lwimgfullname
+ )
+ -- Separate out the image into its own single-page pdf:
+ if opsystem=="Unix" then
+ createuniximage (lwimgfullname)
+ elseif opsystem=="Windows" then
+ createwindowsimage (lwimgfullname)
+ end
+ end -- not hashed or not exists
+ end -- not page 0
+end -- not nil
+end -- createonelateximage
+
+function createlateximages ()
+--
+-- Create lateximages based on lateximages.txt:
+--
+-- See if the document must be recompiled first:
+checklimages ()
+-- See if the print version exists:
+checkhtmlpdfexists ()
+-- Attempt to create the lateximages:
+print ("lwarpmk: Creating lateximages.")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ warnlateximages ()
os.exit(1)
end
-end -- not hashed or not exists
-end -- not page 0
-end -- not nil
+-- Create the lateximages directory, ignore error if already exists
+err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd from lwarp_one_limage.txt:
+if opsystem=="Windows" then
+ executecheckerror (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd" ,
+ "File error trying to copy lwarp_one_limage.txt to lwarp_one_limage.cmd"
+ )
+end -- create lwarp_one_limage.cmd
+-- Track the number of parallel processes
+numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
+-- Scan lateximages.txt
+for line in limagesfile:lines() do
+ createonelateximage ( line )
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: ===")
print ( "lwarpmk limages: Wait a moment for the images to complete" )
-print ( "lwarpmk limages: before reloading the page." )
+print ( "lwarpmk limages: before reloading the page." )
print ( "lwarpmk limages: ===")
-print ( "lwarpmk limages: done" )
+print ( "lwarpmk limages: Done." )
if ( pagezerowarning == true ) then
print ( "lwarpmk limages: WARNING: Images will be incorrect." )
print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
@@ -525,9 +575,11 @@ if ( pagezerowarning == true ) then
end -- pagezerowarning
end -- function
+function compilelatexmk ( fsuffix )
+--
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
-function compilelatexmk ( fsuffix )
+--
-- Maybe select the shell-escape option:
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -537,7 +589,8 @@ else
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 "
+executecheckerror (
+ "latexmk -pdf -dvi- -ps- -recorder "
.. "-e "
.. opquote
.. "$makeindex = q/" -- $
@@ -547,19 +600,18 @@ err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
.. " -L " .. xindylanguage .. " /"
.. opquote
.. " -pdflatex=\"" .. latexname .. thisshellescape .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+ .. sourcename..fsuffix ..".tex"
+ ,
+ "Compile error."
+)
end -- function
+function convertpdftosvg ()
+--
-- Converts PDF files to SVG files.
-- The filenames are arg[2] and up.
-- arg[1] is the command "pdftosvg".
-function convertpdftosvg ()
+--
for i = 2 , #arg do
if (lfs.attributes(arg[i],"mode")==nil) then
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
@@ -570,6 +622,8 @@ for i = 2 , #arg do
end -- do
end --function
+-- Start of the main code: --
+
-- lwarpmk --version :
if (arg[1] == "--version") then
@@ -606,6 +660,8 @@ else -- not latexmk
end
end -- not latexmk
+-- lwarpmk print1:
+
elseif arg[1] == "print1" then
loadconf ()
verifyfileexists (sourcename .. ".tex") ;
@@ -676,6 +732,8 @@ else -- not latexmk
end
end -- not latexmk
+-- lwarpmk html1:
+
elseif arg[1] == "html1" then
loadconf ()
verifyfileexists ( sourcename .. ".tex" ) ;
@@ -683,6 +741,7 @@ elseif arg[1] == "html1" then
pdftohtml ()
print ("lwarpmk: Done.")
+-- lwarpmk pdftohtml:
elseif arg[1] == "pdftohtml" then
loadconf ()
pdftohtml ()
@@ -790,6 +849,8 @@ printhelp ()
elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
printusage ()
+-- Unknown command:
+
else
printhelp ()
print ("\nlwarpmk: ****** Unknown command \""..arg[1].."\". ******\n")
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index 147c859e0f6..355a913cfd6 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2018/05/12 v0.56 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2018/06/06 v0.57 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -440,6 +440,34 @@ code apply to the generation of \HTML, print, or both forms of output.
}
+\newcommand{\describemathimagename}{%
+When creating an \SVG\ math image, its \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{StartDynamicMath},
+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.
+
+This 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.
+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}{%
+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}.
+For example:
+\begin{sourcedisplay}
+(-xy- diagram)
+\end{sourcedisplay}
+This expression is visible in the browser if images are not loaded,
+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.
+}
+
\newcommand{\limitscpageref}{\pkg{cleveref} and \pkg{varioref} are supported,
\watchout[\pkg{cleveref} page numbers]
but printed page numbers do not map to \HTML,
@@ -985,7 +1013,6 @@ Examples:
\newcommand{\limitsmath}{%
-
\subsubsection{Rendering tradeoffs}
Math may be rendered
@@ -1125,6 +1152,39 @@ Limitations when using \brand{MathJax} include:
\end{itemize}
}
+\newcommand{\limitsmathcatcode}{
+The math shift character \texttt{\$} is not set for \HTML\ output until
+\margintag{preamble macros with math}
+after the preamble. Macros defined in the preamble which contain \texttt{\$}
+must be enclosed between \cs{StartDefiningMath} and \cs{StopDefiningMath}
+to temporarily change to the \HTML\ meaning of \texttt{\$}:
+\begin{sourcedisplay}
+\textcolor{red}{\cs{StartDefiningMath}} \\
+\cs{newcommand}\{\dots\} \\
+\textcolor{red}{\cs{StopDefiningMath}}
+\end{sourcedisplay}
+
+As an alternative, use \cs{(} and \cs{)} instead of \texttt{\$}, in which
+case \cs{StartDefiningMath} and \cs{StopDefiningMath} are not necessary.
+
+If a package defines macros using \texttt{\$}, it may be nessary to use
+\cs{StartDefiningMath} and \cs{StopDefiningMath} before and after loading the
+package.
+}
+
+\newcommand{\limitsmathdynamic}{
+An inline math expression is usually converted to a reusable hashed \SVG\ math
+\margintag{inline dynamic math}
+image, or a MathJax expression. The hash or expression depends on the contents
+of the math expression. In most cases this math expression is static, such as \texttt{\$x+1\$},
+so the image can be reused for multiples instances of the same expression.
+In some cases, the math expression includes a counter or other object which may
+change between uses. The macro \cs{StartDynamicMath} may be used before a dynamic
+math expression, and \cs{StopDynamicMath} after. Doing so tells \pkg{lwarp} to
+use an unhashed \SVG\ math image, even if MathJax is in use.
+See \cref{sec:localizingdynamicmath}.
+}
+
\newcommand{\limitschemformula}{%
\pkg{chemformula} works best without \brand{MathJax}.
\watchout[\pkg{chemformula} with \brand{MathJax}]
@@ -1401,7 +1461,7 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta
\begin{sourcedisplay}
\textcolor{red}{\cs{StartDefiningTabulars}} \\
<define macros or environments using \env{tabular} and \texttt{\&} here> \\
- \textcolor{red}{\cs{EndDefiningTabulars}}
+ \textcolor{red}{\cs{StopDefiningTabulars}}
\end{sourcedisplay}
This includes before and after defining any macro
\watchout[floatrow]
@@ -1603,7 +1663,7 @@ left \& right \textbackslash\textbackslash \\
left \& right \textbackslash\textbackslash \\
\cs{endtabular} \\
\} \\
-\textcolor{red}{\cs{EndDefiningTabulars}} \\
+\textcolor{red}{\cs{StopDefiningTabulars}} \\
\end{sourcedisplay}
}
@@ -1640,7 +1700,7 @@ For \cs{tablefirsthead}, etc., enclose them as follows:
\textcolor{red}{\cs{StartDefiningTabulars}} \\
\cs{tablefirsthead} \\
\dots \\
-\textcolor{red}{\cs{EndDefiningTabulars}}
+\textcolor{red}{\cs{StopDefiningTabulars}}
\end{sourcedisplay}
See \cref{sec:limitstabular}.
@@ -1930,7 +1990,7 @@ they are the first command inside the float:
}
\newcommand{\limitsfloatrow}{%
-Use \cs{StartDefiningTabulars} and \cs{EndDefiningTabulars} before and after
+Use \cs{StartDefiningTabulars} and \cs{StopDefiningTabulars} before and after
\watchout[misplaced alignment alignment tab character \&]
defining macros using \cs{ttabbox} with a tabular inside.
See \cref{sec:limitstabular}.
@@ -2167,7 +2227,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{24234}
+% \CheckSum{24592}
%
% \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
@@ -2265,6 +2325,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.54}{2018/04/22}{\ 2018/04/22}
% \changes{v0.55}{2018/04/26}{\ 2018/04/26}
% \changes{v0.56}{2018/05/12}{\ 2018/05/12}
+% \changes{v0.57}{2018/06/06}{\ 2018/06/06}
@@ -2324,7 +2385,7 @@ This boolean may be tested by the user for later use.
%
% A modular package-loading system uses the \pkg{lwarp} version of a package for
% \HTML\ when available.
-% More than 270 \LaTeX\ packages are supported with these high-level source
+% Almost 300 \LaTeX\ packages are supported with these high-level source
% compatibility replacements, and many others work as-is.
%
% A tutorial is provided to quickly introduce the user to the major components
@@ -2462,6 +2523,50 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.57:] \
+% \begin{itemize}
+% \item Added support for MathJax equations with \cs{footnote}, \cs{footnotemark}.
+% \margintag{MathJax}
+% \item Added \cs{StartDefiningMath} and \cs{StopDefiningMath} for
+% \margintag{math macros}
+% use when defining macros in the preamble which contain \$.
+% See \cref{sec:mathcatcode}.
+% \item Added \cs{StartDynamicMath} and \cs{StopDynamicMath} to
+% \margintag{dynamic math}
+% delimit math expressions which depend on a variable condition
+% such as a counter. Such expressions will not be hashed for reuse,
+% and will be converted to \SVG\ math images even when MathJax is enabled.
+% See \cref{sec:mathdynamic}.
+% \item Renamed \cs{EndDefiningTabulars} to \cs{StopDefiningTabulars}.
+% \watchout[new name]
+% \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''.
+% For packages, the \attribute{alt} tag is set using the package name followed by
+% \cs{packagediagramname}, which defaults to ``diagram''. Ex:
+% \begin{sourcedisplay}
+% (-xy- diagram)
+% \end{sourcedisplay}
+% See \cref{sec:packagediagramname}.
+% \item Fix: Restoring various macros in a \env{lateximage} and similar situations.
+% \item Fix: \cs{href} text catcodes.
+% \margintag{misc. fixes}
+% \item Fix: \cs{subref} text.
+% \item Fixes: Colored \cs{rule} and \cs{boxframe}.
+% \item \pkg{float}, \pkg{rotfloat}: Adds support for float styles |ruled| and |boxed|.
+% \margintag{packages}
+% \item \pkg{float}: Fix: Do not create \cs{l@<type>} until \cs{listof} is used.
+% \item \pkg{marginnote}: Fix: Long optional argument.
+% \item \pkg{ellipsis}: Adds \cs{midwordellipsis}.
+% \item \pkg{breakurl}: Fix for text catcodes.
+% \item Added \pkg{algorithm2e}, \pkg{register}, \pkg{ltablex}, \pkg{xltabular},
+% \pkg{xellipsis}, \pkg{trimclip}, \pkg{errata}, \pkg{vowel}, \pkg{xpiano}.
+% \item Prevents \pkg{glossary}.
+% \item Verified works as-is with \pkg{gauss}, \pkg{phonrule}, \pkg{piano},
+% \pkg{SIunits}, \pkg{tikzcodeblocks}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.56:] \
% \begin{itemize}
% \item Added
@@ -2486,7 +2591,7 @@ This boolean may be tested by the user for later use.
% \item Added \pkg{parnotes}, \pkg{quoting}, \pkg{lua-check-hyphen},
% \pkg{tocenter}, \pkg{underscore}.
% \margintag{packages}
-% \item Verified works with \pkg{babelbib}, \pkg{bibunits}, \pkg{bodegraph},
+% \item Verified works as-is with \pkg{babelbib}, \pkg{bibunits}, \pkg{bodegraph},
% \pkg{fast-diagram}, \pkg{nicematrix}, \pkg{structmech}.
% \end{itemize}
% \needspace{2\baselineskip}
@@ -3086,12 +3191,13 @@ This boolean may be tested by the user for later use.
% \needspace{2\baselineskip}
% \item[v0.33:] \
% \begin{itemize}
-% \item Tabular |@| and |!| columns now have their own \HTML\ columns.
+% \item Tabular |@| and |!| columns now havetheir own \HTML\ columns.
% \item |&| catcode changes are localized, perhaps causing errors
% about the tab alignment character |&|,
% so any definitions of macros or environments
% which themselves contain \env{tabular} and |&| must be enclosed within \cs{StartDefiningTabulars}
-% and \cs{EndDefiningTabulars}. See \cref{sec:localizingampersand}.
+% and \cs{StopDefiningTabulars} (previously called \cs{EndDefiningTabulars}.
+% See \cref{sec:localizingcatcodes}.
% This change is not required for the routine use of tables,
% but only when a table is defined inside another macro or environment,
% and while also using the |&| character inside the definition.
@@ -3605,7 +3711,7 @@ This boolean may be tested by the user for later use.
% Additional math: & Math fonts via \SVG\ images, \pkg{resizegather}, \pkg{xy}.
%
% Tested to work as-is:
-% \pkg{amscd}, \pkg{bm}, \pkg{braket}, \pkg{delarray}, \pkg{nicematrix},
+% \pkg{amscd}, \pkg{bm}, \pkg{braket}, \pkg{delarray}, \pkg{guass}, \pkg{nicematrix},
% \pkg{pb-diagram}, \pkg{tikz-cd}, etc. \\
%
% Display math with \cs{displaymathother}: & %
@@ -3613,7 +3719,9 @@ This boolean may be tested by the user for later use.
%
% \midrule
%
-% Units and fractions: & \pkg{nicefrac}, \pkg{siunitx}, \pkg{units}, \pkg{xfrac}. \\
+% Units and fractions: & \pkg{nicefrac}, \pkg{siunitx}, \pkg{units}, \pkg{xfrac}.
+%
+% Tested to work as-is: \pkg{SIunits}. \\
%
% \midrule
%
@@ -3630,9 +3738,9 @@ This boolean may be tested by the user for later use.
%
% Tabular: &
% \env{tabular} environment, \pkg{array}, \pkg{arydshln}, \pkg{bigdelim}, \pkg{booktabs},
-% \pkg{colortbl}, \pkg{diagbox}, \pkg{longtable}, \pkg{ltxtable},
+% \pkg{colortbl}, \pkg{diagbox}, \pkg{longtable}, \pkg{ltablex}, \pkg{ltxtable},
% \pkg{multirow}, \pkg{supertabular}, \pkg{tabularx}, \pkg{tabulary},
-% \pkg{threeparttable}, \pkg{xtab}. \\
+% \pkg{threeparttable}, \pkg{xltabular}, \pkg{xtab}. \\
%
% \midrule
%
@@ -3692,7 +3800,7 @@ This boolean may be tested by the user for later use.
%
% Acronyms: & \pkg{acro}, \pkg{acronym}. \\
%
-% Todo notes: & \pkg{changebar}, \pkg{easy-todo}, \pkg{fixme},
+% Todo notes: & \pkg{changebar}, \pkg{easy-todo}, \pkg{errata}, \pkg{fixme},
% \pkg{fixmetodonotes}, \pkg{todo}, \pkg{todonotes}. \\
%
% \midrule
@@ -3700,10 +3808,11 @@ This boolean may be tested by the user for later use.
% Direct formatting: & \cs{emph}, \cs{textsuperscript},
% \cs{textbf}, etc are supported.
% \cs{bfseries}, etc.\ are only supported in some cases.
-% \pkg{cancel}, \pkg{hyphenat}, \pkg{lettrine}, \pkg{lua-check-hyphen}, \pkg{luacolor},
+% \pkg{cancel}, \pkg{ellipsis}, \pkg{hyphenat}, \pkg{lettrine}, \pkg{lips},
+% \pkg{lua-check-hyphen}, \pkg{luacolor},
% \pkg{magaz}, \pkg{pdfrender}, \pkg{realscripts}, \pkg{relsize},
% \pkg{scalefnt}, \pkg{soul}, \pkg{soulpos}, \pkg{soulutf8},
-% \pkg{textfit}, \pkg{ulem}, \pkg{underscore}. \\
+% \pkg{textfit}, \pkg{trimclip}, \pkg{ulem}, \pkg{underscore}, \pkg{xellipsis}. \\
%
% Ordinals: & \pkg{engord}, \pkg{fmtcount}, \pkg{nth}. \\
%
@@ -3731,24 +3840,24 @@ This boolean may be tested by the user for later use.
% \midrule
%
% Science and engineering: &
-% \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bytefield},
+% \pkg{algorithm2e}, \pkg{algorithmicx}, \pkg{axodraw2}, \pkg{bytefield},
% \pkg{chemfig}, \pkg{chemformula}, \pkg{chemgreek}, \pkg{chemmacros}, \pkg{chemnum},
-% \pkg{listings}, \pkg{mhchem}, \pkg{phfqit}.
+% \pkg{listings}, \pkg{mhchem}, \pkg{phfqit}, \pkg{register}.
%
% Tested to work as-is:
% \pkg{blochsphere}, \pkg{bodegraph}, \pkg{bohr}, \pkg{circuitikz},
% \pkg{elements}, \pkg{fast-diagram},
% \pkg{hepnicenames}, \pkg{heppennames},
% \pkg{linop}, \pkg{pgfgantt}, \pkg{physics}, \pkg{simpler-wick}, \pkg{slashed},
-% \pkg{structmech}.
+% \pkg{structmech}, \pkg{tikzcodeblocks}.
% \\
%
% \midrule
%
-% Liberal arts and humanities: & \pkg{forest}, \pkg{schemata}.
+% Liberal arts and humanities: & \pkg{forest}, \pkg{schemata}, \pkg{vowel}, \pkg{xpiano}.
%
% Tested to work as-is:
-% \pkg{tikz-dependency}. \\
+% \pkg{phonrule}, \pkg{piano}, \pkg{tikz-dependency}. \\
%
% \midrule
%
@@ -5242,6 +5351,8 @@ This boolean may be tested by the user for later use.
% FileSectionNames & Use section names for file names, else use numbers. \\
% FootnoteDepth & Sectioning depth of footnotes. \\
% \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{CSSFilename} & The \CSS\ for the following files. \\
% \cs{HTMLLanguage} & The |html lang| tag. \\
% \cs{HTMLTitle} & The \HTML\ |title| meta tag, overriding \cs{title}. \\
@@ -5509,6 +5620,14 @@ This boolean may be tested by the user for later use.
% \item[Placed in the document wherever necessary:] \
%
% \begin{description}
+% \ItemDescribeMacro{\mathimagename} \DescribeDefault{math image}
+% \label{sec:mathimagename}
+% \describemathimagename
+%
+% \ItemDescribeMacro{\packagediagramname} \DescribeDefault{diagram}
+% \label{sec:packagediagramname}
+% \describepackagediagramname
+%
% \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}.
@@ -6097,7 +6216,7 @@ This boolean may be tested by the user for later use.
% \watchout[Misplaced alignment tab character \&]
% you will have to use \cs{StartDefiningTabulars}
% before the start of the macro which uses \cs{fboxBlock} and the \env{tabular},
-% and \cs{EndDefiningTabulars} afterwards.
+% and \cs{StopDefiningTabulars} afterwards.
% Also see the \pkg{lwarp} documentation for the \pkg{fancybox} package.
% \item [To frame equations:] See \cref{sec:fancybox} for the \pkg{fancybox} package.
% \item [For fancy framed minipages:] See packages \pkg{boxedminipage},
@@ -6334,6 +6453,14 @@ This boolean may be tested by the user for later use.
% \label{sec:limitsmath}
% \limitsmath
%
+% \subsubsection{Catcode changes}
+% \label{sec:mathcatcode}
+% \limitsmathcatcode
+%
+% \subsubsection{Dynamic math}
+% \label{sec:mathdynamic}
+% \limitsmathdynamic
+%
% \subsubsection{Display math}
% \label{sec:displaymathother}
% \index{math>\cs{displayingmath}}\index{math>\cs{displayingmore}}
@@ -7031,7 +7158,9 @@ This boolean may be tested by the user for later use.
% \section{Modifying \pkg{lwarp}}
% \pagestyle{pageheadfoot}
%
-% To quickly find the source for a package in |lwarp.dtx|, search for |*packagename|,
+% To quickly find the source for a package in |lwarp.dtx|,
+% \margintag{locating something}
+% search for |*packagename|,
% such as |*siunitx|.
%
% Likewise, to quickly find the source for a file in |lwarp.dtx|,
@@ -7043,16 +7172,30 @@ This boolean may be tested by the user for later use.
% Look to existing code for ideas on how to expand into new code.
%
% An environment may be converted to a |lateximage| then displayed
+% \margintag{image of \TeX\ output}
% with an image of the resulting \LaTeX{} output.
% See \cref{sec:picture} for an example of the |picture| environment.
%
% To create a custom \HTML\ block or inline \CSS\ class,
+% \margintag{CSS classes}
% see \cref{sec:highlevelclasses}.
%
+% To create print and \HTML\ versions of the same macro or environment,
+% \margintag{print/HTML macros}
+% see \cref{sec:definingprinthtml}.
+%
% Any \TeX\ boxes must be undone, as \SVG\ math or \env{lateximage}s
% \watchout[\TeX\ boxes]
% require \cs{newpage}, which will not work in a \TeX\ box.
%
+% \changes{v0.57}{2018/05/28}{Docs: Recreating the index for \pkg{lwarp} source.}
+% To recreate the index for the \pkg{lwarp} documentation:
+% \margintag{index recreation}
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% makeindex -s gglo.ist -o lwarp.gls lwarp.glo
+% makeindex -s gind.ist lwarp.idx
+% \end{Verbatim}
+%
%
% \subsection{Modifying a package for \pkg{lwarp}}
%
@@ -7098,7 +7241,7 @@ This boolean may be tested by the user for later use.
% will not need to be emulated for \HTML\ output. Only the ``user-facing''
% macros need to be nullified or emulated.
%
-% \needspace{10\baselineskip}
+% \needspace{5\baselineskip}
% Each |lwarp-| package should first call either
% \begin{sourcedisplay}
% \cs{LWR@ProvidesPackageDrop}
@@ -7158,6 +7301,21 @@ This boolean may be tested by the user for later use.
% Remember that the configuration files are only rewritten when compiling the
% printed version of the document.
%
+% \changes{v0.57}{2018/05/28}{Docs: Recompiling \prog{lwarpmk} or \CSS\ files.}
+% When changing the source to \prog{lwarpmk} or a \CSS\ file in \filenm{lwarp.dtx}:
+% \begin{enumerate}
+% \item Change the source in \filenm{lwarp.dtx}.
+% \item |pdflatex lwarp.ins|
+% \item |pdflatex lwarp.dtx|
+% \item If modifying \prog{lwarpmk} the new version should now be active.
+% \item If modifying \CSS\ files:
+% \begin{enumerate}
+% \item For the document, |lwarpmk print| to update the \CSS\ files
+% in the project.
+% \item Reload the \HTML\ document to see the effect of the new \CSS\ files.
+% \end{enumerate}
+% \end{enumerate}
+%
% Sometimes it is worth checking the |<project>_html.pdf| file, which is the
% \PDF\ containing \HTML\ tags. Also, |<project>_html.html| has
% the text conversion of these tags, before the file is split into individual
@@ -7721,7 +7879,7 @@ This boolean may be tested by the user for later use.
% \end{macrocode}
%
%
-%
+%macrocode
%
% \section{Miscellaneous tools}
%
@@ -7782,9 +7940,8 @@ This boolean may be tested by the user for later use.
% \end{macrocode}
%
-% \clearpage
-%
-%
+
+
% \section{Operating-System portability}
% \label{sec:OSportability}
% \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.}
@@ -8346,6 +8503,7 @@ For a possible alternative, see package(s) #2.}
\LWR@earlyloadnever{caption2}{caption}
% \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir
\LWR@earlyloadnever{fancyheadings}{fancyhdr}
+\LWR@earlyloadnever{glossary}{glossaries}
\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx}
\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
% \end{macrocode}
@@ -8371,7 +8529,10 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{acronym}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
+\LWR@loadafter{ae}
+\LWR@loadafter{aecc}
\LWR@loadafter{afterpage}
+\LWR@loadafter{algorithm2e}
\LWR@loadafter{algorithmicx}
\LWR@loadafter{alltt}
\LWR@loadafter{amsmath}
@@ -8397,6 +8558,8 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{bytefield}
\LWR@loadafter{cancel}
\LWR@loadafter{caption}
+\LWR@loadafter{caption2}
+\LWR@loadafter{ccaption}
\LWR@loadafter{changebar}
\LWR@notmemoirloadafter{changepage}
\LWR@notmemoirloadafter{chngpage}
@@ -8431,12 +8594,14 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{epigraph}
\LWR@loadafter{epstopdf}
\LWR@loadafter{epstopdf-base}
+\LWR@loadafter{errata}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
\LWR@loadafter{extramarks}
\LWR@loadafter{fancybox}
\LWR@loadafter{fancyhdr}
+\LWR@loadafter{fancyheadings}
\LWR@loadafter{fancyref}
\LWR@loadafter{fancyvrb}
\LWR@loadafter{figcaps}
@@ -8470,6 +8635,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{glossaries}
% \LWR@loadafter{graphics}% pre-loaded by xunicode
% \LWR@loadafter{graphicx}% pre-loaded by xunicode
+\LWR@loadafter{glossary}
\LWR@loadafter{grffile}
\LWR@loadafter{grid}
\LWR@loadafter{gridset}
@@ -8495,6 +8661,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{listings}
\LWR@loadafter{longtable}
\LWR@loadafter{lscape}
+\LWR@loadafter{ltablex}
\LWR@loadafter{ltcaption}
\LWR@loadafter{ltxgrid}
\LWR@loadafter{ltxtable}
@@ -8554,6 +8721,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{quoting}
\LWR@loadafter{ragged2e}
\LWR@loadafter{realscripts}
+\LWR@loadafter{register}
\LWR@loadafter{relsize}
\LWR@loadafter{resizegather}
\LWR@loadafter{romanbar}
@@ -8586,6 +8754,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{subfig}
\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
+\LWR@loadafter{t1inc}
\LWR@loadafter{tabls}
\LWR@notmemoirloadafter{tabularx}
\LWR@loadafter{tabulary}
@@ -8608,6 +8777,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
\LWR@loadafter{transparent}
+\LWR@loadafter{trimclip}
\LWR@loadafter{trivfloat}
\LWR@loadafter{turnthepage}
% \end{macrocode}
@@ -8622,14 +8792,19 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{verse}
\LWR@loadafter{vertbars}
\LWR@loadafter{vmargin}
+\LWR@loadafter{vowel}
\LWR@loadafter{vwcol}
\LWR@loadafter{wallpaper}
+\LWR@loadafter{wasysym}
\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
\LWR@loadafter{xcolor}
+\LWR@loadafter{xellipsis}
\LWR@loadafter{xfrac}
+\LWR@loadafter{xltabular}
\LWR@loadafter{xltxtra}
\LWR@loadafter{xmpincl}
+\LWR@loadafter{xpiano}
\LWR@loadafter{xtab}
\LWR@loadafter{xurl}
\LWR@loadafter{xy}
@@ -9144,7 +9319,7 @@ top=1in,bottom=1in,%
% Remember the original \cs{RequirePackage}:
% \begin{macrocode}
-\LetLtxMacro{\LWR@origRequirePackage}{\RequirePackage}
+\LetLtxMacro\LWR@origRequirePackage\RequirePackage
% \end{macrocode}
% \begin{macro}{\LWR@requirepackagenames}
@@ -9274,7 +9449,7 @@ top=1in,bottom=1in,%
{\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}%
}%
}
-\LetLtxMacro{\usepackage}{\RequirePackage}
+\LetLtxMacro\usepackage\RequirePackage
% \end{macrocode}
% \end{macro}
@@ -9531,7 +9706,6 @@ top=1in,bottom=1in,%
\ifbool{LWR@tracinglwarp}%
{%
\typeout{*** lwarp: #1}%
- % \PackageInfo{lwarp}{#1 : }%
}%
{}%
}
@@ -9572,6 +9746,264 @@ top=1in,bottom=1in,%
+% \section{Defining print and HTML versions of macros and environments}
+% \label{sec:definingprinthtml}
+% \index{print>selecting print/HTML definitions}
+% \index{HTML>selecting print/HTML definitions}
+%
+% The following refers to defining objects inside \pkg{lwarp}, and is not
+% for the user's document.
+%
+% Many macros and environments must be provided as both print and \HTML\ versions.
+%
+% While generating the print version of a document, the original macros
+% as defined by \LaTeX\ and its packages are used as-is.
+%
+% While generating the \HTML\ version of a document,
+% the original macro or environment is redefined to call a new \HTML\ version
+% or a copy of the original print version.
+% The new \HTML\ versions of macros and environments are used most of the time.
+% Copies of the print versions are used inside a \env{lateximage} environment,
+% which draws and remembers an image of the printed output, and also several
+% other places.
+%
+% The general structure for providing print and \HTML\ versions of a macro or
+% environment is as follows:
+%
+% \begin{description}
+%
+% \item[For a preexisting macro, not defined with \pkg{xparse}:] An \HTML\ version
+% is provided with a special name, inside a \env{warpHTML} environment,
+% then \cs{LWR@formatted} is used to redefine and patch various macros:
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \begin{warpHTML}
+% \newcommand{\LWR@HTML@name}{...}% may also use xparse
+%
+% \LWR@formatted{name}
+% \end{warpHTML}
+% \end{Verbatim}
+% |\LWR@formatted{name}| copies the original print version,
+% then redefines \cs{name} to use either the print or \HTML\ version depending
+% on which mode \pkg{lwarp} is using. \pkg{xparse} may be used to
+% define the new \HTML\ version, even if the original did not use \pkg{xparse}.
+
+% \item[For a preexisiting environment, not defined with \pkg{xparse}:] The process
+% is similar. Note the use of \cs{LWR@formattedenv} instead of \cs{LWR@formatted}.
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \begin{warpHTML}
+% \newenvironment{LWR@HTML@name}{...}% may also use xparse
+%
+% \LWR@formattedenv{name}
+% \end{warpHTML}
+% \end{Verbatim}
+
+% \item[If the original used \pkg{xparse}:] A copy must be made using a new name:
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \begin{warpHTML}
+% \NewDocumentCommand{\LWR@print@name}{..}{..}% copy the original
+%
+% \NewDocumentCommand{\LWR@HTML@name}{..}{..}% or use \newcommand
+%
+% \LWR@formatted{name}
+% \end{warpHTML}
+% \end{Verbatim}
+% Similar for an environment, using \cs{LWR@formattedenv}.
+% (\cs{LWR@formatted} and \cs{LWR@formattedenv} use \cs{LetLtxMacro} to
+% copy the original print definiton,
+% which may not work with macros and environments created by \pkg{xparse},
+% so the print version must be manually recreated in the \pkg{lwarp} source.)
+
+% \item[For a new macro or environment, not using \pkg{xparse} for the print version:] \
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \begin{warpall}
+% \newcommand{\name}{...}% NOT xparse!
+% \end{warpall}
+%
+% \begin{warpHTML}
+% \newcommand{\LWR@HTML@name}{...}% may use xparse for HTML
+%
+% \LWR@formatted{name}
+% \end{warpHTML}
+% \end{Verbatim}
+% Similar for an environment.
+% The plain \cs{name} or environment \env{name} is used for the printed
+% version, and is placed inside \env{warpall}.
+% \pkg{xparse} may be used for the \cs{LWR@HTML@<name>} version.
+%
+% \item [For a new macro or environment, using \pkg{xparse}:]
+% It is possible to use \pkg{xparse} for an entirely new macro or environment
+% by defining the \cs{LWR@print@<name>} version with \pkg{xparse}, along with
+% \cs{name} defined without \pkg{xparse} to refer directly to the \cs{LWR@print}
+% version:
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \begin{warpall}
+% \NewDocumentCommand{\LWR@print@name}{...} {...}% -or-
+% \NewDocumentEnvironment{\LWR@print@name}{...} {...} {...}
+%
+% % Simply a call to \LWR@print@name:
+% \newcommand{\name}{\LWR@print@name}% -or-
+% \newenvironment{name}{\LWR@print@name}{\endLWR@print@name}
+% \end{warpall}
+%
+% \begin{warpHTML}
+% \NewDocumentCommand{\LWR@HTML@name}{...} {...}% -or-
+% \NewDocumentEnvironment{\LWR@HTML@name}{...} {...} {...}
+%
+% \LWR@formatted{name}% -or-
+% \LWR@formattedenv{name}
+% \end{warpHTML}
+% \end{Verbatim}
+%
+% \end{description}
+%
+% In general, \cs{LWR@formatted} or \cs{LWR@formattedenv} are placed inside
+% a \env{warpHTML} environment, and while producing an \HTML\ document
+% they do the following:
+% \begin{itemize}
+% \item Macros are modified:
+% \begin{enumerate}
+% \item The pre-existing print version \cs{name} is saved as \cs{LWR@print@<name>},
+% unless \cs{LWR@print@<name>} is already defined.
+% \item The original \cs{name} is redefined to call either the print or \HTML\ version
+% depending on which format is in use at the moment, as set by \cs{LWR@formatting},
+% which is defined as either ``|print|'' or ``|HTML|''.
+% \end{enumerate}
+% \item When \pkg{lwarp} is producing a print document, the original definitions are
+% used, as well as any new definitions defined in \env{warpall} above.
+% \item When \pkg{lwarp} is generating \HTML\ output, \cs{LWR@formatting} is
+% set to ``|HTML|'', and \cs{name} is directed to \cs{LWR@HTML@<name>}.
+% \item When \pkg{lwarp} is generating \HTML\ output
+% but enters a \env{lateximage} environment,
+% or for some other reason needs to draw images using the original print
+% defintions, \cs{LWR@formatting} is changed to ``|print|'' and \cs{name} is
+% then redirected to \cs{LWR@print@<name>}, which was the original \cs{name}.
+% \end{itemize}
+%
+% Since arguments are not handled by the new \cs{name}, any star and other arguments
+% are processed by the print or \HTML\ version.
+%
+% Expandable versions are also provided as well:
+% \begin{sourcedisplay}
+% \cs{LWR@expandableformatted} \\
+% \cs{LWR@expandableformattedenv}
+% \end{sourcedisplay}
+%
+% (Older versions of \pkg{lwarp} used \cs{LetLtxMacro} for everything,
+% but this could fail when using macros defined by \pkg{xparse}.
+% This older system is still in use for many definitions.)
+% ^^A *8* Modify the above when all old \lets are removed.
+%
+% \changes{v0.57}{2018/05/28}{New system for switching print and HTML outputs.}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\LWR@formatting} Remembers if selected print/\HTML\ formatting.
+%
+% Used while \cs{LWR@restoreorigformatting}, such as in an \env{lateximage}.
+% May be set to either ``|print|'' or ``|HTML|''.
+%
+% \begin{macrocode}
+\newcommand*{\LWR@formatting}{HTML}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR@formatted} \marg{macroname} \qquad No backslash in the macro name.
+%
+% If not yet defined, defines \cs{LWR@print@<name>} as
+% the original print-mode \cs{<name>}.
+% Also redefines \cs{<name>} to use \cs{LWR@<format>@<name>},
+% where <format> is set by \cs{LWR@formatting}, and is |print| or |HTML|.
+% \begin{macrocode}
+\newcommand*{\LWR@formatted}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ }{}%
+ \ifcsundef{#1}{%
+ \expandafter\newrobustcmd\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }{%
+ \expandafter\renewrobustcmd\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR@expandableformatted} \marg{macroname} \qquad No backslash
+% in the macro name.
+%
+% An expandable version of \cs{LWR@formatted}.
+% \begin{macrocode}
+\newcommand*{\LWR@expandableformatted}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ }{}%
+ \ifcsundef{#1}{%
+ \expandafter\newcommand\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }{%
+ \expandafter\renewcommand\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR@formattedenv} \marg{environmentname}
+%
+% If not yet defined, defines the environment \env{LWR@print@<name>} as
+% the original print-mode \env{<name>}.
+% Also redefines the environment |<name>| to use environment |LWR@<format>@<name>|,
+% where <format> is set by \cs{LWR@formatting}, and is |print| or |HTML|.
+% \begin{macrocode}
+\newcommand*{\LWR@formattedenv}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ \csletcs{endLWR@print@#1}{end#1}%
+ }{}%
+ \DeclareDocumentEnvironment{#1}{}%
+ {\csuse{LWR@\LWR@formatting @#1}}%
+ {\csuse{endLWR@\LWR@formatting @#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR@expandableformattedenv} \marg{environmentname}
+%
+% An expandable version of \env{LWR@formattedenv}.
+% \begin{macrocode}
+\newcommand*{\LWR@expandableformattedenv}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ \csletcs{endLWR@print@#1}{end#1}%
+ }{}%
+ \DeclareExpandableDocumentEnvironment{#1}{}%
+ {\csuse{LWR@\LWR@formatting @#1}}%
+ {\csuse{endLWR@\LWR@formatting @#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
% \section{HTML-conversion output modifications}
%
% These booleans modify the \HTML\ output in various ways
@@ -9776,10 +10208,7 @@ top=1in,bottom=1in,%
% Will be changed to \HTML\ commands for most uses.
% Will be temporarily restored to original meaning inside any lateximage environment.
% Also nullify unused commands.
-% \begin{macrocode}
-\LetLtxMacro\LWR@origmbox\mbox
-\LetLtxMacro\LWR@origmakebox\makebox
-% \end{macrocode}
+%
% Some packages redefine \cs{\#}, which is used to generate \HTML, so the original must
% be remembered here.
% \changes{v0.51}{2018/03/12}{Fix: Remember original \cs{\#} in case is redefined.}
@@ -9793,17 +10222,13 @@ top=1in,bottom=1in,%
\let\LWR@origenskip\enskip
\let\LWR@origquad\quad
\let\LWR@origqquad\qquad
-
-\let\LWR@orighspace\hspace
\let\LWR@orighfill\hfill
\let\LWR@orighfil\hfil
-\let\LWR@origvspace\vspace
\let\LWR@orighss\hss
\let\LWR@origllap\llap
\let\LWR@origrlap\rlap
\let\LWR@orighfilneg\hfilneg
-\let\LWR@origrule\rule
\let\LWR@orighrulefill\hrulefill
\let\LWR@origdotfill\dotfill
@@ -9823,29 +10248,29 @@ top=1in,bottom=1in,%
\let\LWR@orighuge\huge
\let\LWR@origHuge\Huge
-\LetLtxMacro{\LWR@origtextrm}{\textrm}
-\LetLtxMacro{\LWR@origtextsf}{\textsf}
-\LetLtxMacro{\LWR@origtexttt}{\texttt}
-\LetLtxMacro{\LWR@origtextnormal}{\textnormal}
-\LetLtxMacro{\LWR@origtextbf}{\textbf}
-\LetLtxMacro{\LWR@origtextmd}{\textmd}
-\LetLtxMacro{\LWR@origtextit}{\textit}
-\LetLtxMacro{\LWR@origtextsl}{\textsl}
-\LetLtxMacro{\LWR@origtextsc}{\textsc}
-\LetLtxMacro{\LWR@origtextup}{\textup}
-\LetLtxMacro{\LWR@origemph}{\emph}
-
-\LetLtxMacro{\LWR@origrmfamily}{\rmfamily}
-\LetLtxMacro{\LWR@origsffamily}{\sffamily}
-\LetLtxMacro{\LWR@origttfamily}{\ttfamily}
-\LetLtxMacro{\LWR@origbfseries}{\bfseries}
-\LetLtxMacro{\LWR@origmdseries}{\mdseries}
-\LetLtxMacro{\LWR@origupshape}{\upshape}
-\LetLtxMacro{\LWR@origslshape}{\slshape}
-\LetLtxMacro{\LWR@origscshape}{\scshape}
-\LetLtxMacro{\LWR@origitshape}{\itshape}
-\LetLtxMacro{\LWR@origem}{\em}
-\LetLtxMacro{\LWR@orignormalfont}{\normalfont}
+\LetLtxMacro\LWR@origtextrm\textrm
+\LetLtxMacro\LWR@origtextsf\textsf
+\LetLtxMacro\LWR@origtexttt\texttt
+\LetLtxMacro\LWR@origtextnormal\textnormal
+\LetLtxMacro\LWR@origtextbf\textbf
+\LetLtxMacro\LWR@origtextmd\textmd
+\LetLtxMacro\LWR@origtextit\textit
+\LetLtxMacro\LWR@origtextsl\textsl
+\LetLtxMacro\LWR@origtextsc\textsc
+\LetLtxMacro\LWR@origtextup\textup
+\LetLtxMacro\LWR@origemph\emph
+
+\LetLtxMacro\LWR@origrmfamily\rmfamily
+\LetLtxMacro\LWR@origsffamily\sffamily
+\LetLtxMacro\LWR@origttfamily\ttfamily
+\LetLtxMacro\LWR@origbfseries\bfseries
+\LetLtxMacro\LWR@origmdseries\mdseries
+\LetLtxMacro\LWR@origupshape\upshape
+\LetLtxMacro\LWR@origslshape\slshape
+\LetLtxMacro\LWR@origscshape\scshape
+\LetLtxMacro\LWR@origitshape\itshape
+\LetLtxMacro\LWR@origem\em
+\LetLtxMacro\LWR@orignormalfont\normalfont
\let\LWR@origraggedright\raggedright
\let\LWR@origonecolumn\onecolumn
@@ -9876,10 +10301,6 @@ top=1in,bottom=1in,%
\let\LWR@origthispagestyle\thispagestyle
\LetLtxMacro\LWR@origpagenumbering\pagenumbering
-\LetLtxMacro\LWR@origminipage\minipage
-\let\LWR@origendminipage\endminipage
-\LetLtxMacro{\LWR@origparbox}{\parbox}
-
\let\LWR@orignewline\newline
@@ -9903,7 +10324,7 @@ top=1in,bottom=1in,%
\let\LWR@origpar\par
-\LetLtxMacro{\LWR@origfootnote}{\footnote}
+\LetLtxMacro\LWR@origfootnote\footnote
\let\LWR@orig@mpfootnotetext\@mpfootnotetext
\let\LWR@origclearpage\clearpage
@@ -9941,18 +10362,18 @@ top=1in,bottom=1in,%
%
% For Unicode engines, only \cs{t} needs to be redefined:
% \begin{macrocode}
-\LetLtxMacro{\LWR@origt}{\t}
+\LetLtxMacro\LWR@origt\t
% \end{macrocode}
% For pdf\LaTeX, additional work is required:
% \begin{macrocode}
\ifPDFTeX
-\LetLtxMacro{\LWR@origequalaccent}{\=}
-\LetLtxMacro{\LWR@origdotaccent}{\.}
-\LetLtxMacro{\LWR@origu}{\u}
-\LetLtxMacro{\LWR@origv}{\v}
-\LetLtxMacro{\LWR@origc}{\c}
-\LetLtxMacro{\LWR@origd}{\d}
-\LetLtxMacro{\LWR@origb}{\b}
+\LetLtxMacro\LWR@origequalaccent\=
+\LetLtxMacro\LWR@origdotaccent\.
+\LetLtxMacro\LWR@origu\u
+\LetLtxMacro\LWR@origv\v
+\LetLtxMacro\LWR@origc\c
+\LetLtxMacro\LWR@origd\d
+\LetLtxMacro\LWR@origb\b
% \end{macrocode}
% The \HTML\ redefinitions follow.
%
@@ -9978,18 +10399,18 @@ top=1in,bottom=1in,%
% \begin{macrocode}
\ifPDFTeX
\newcommand*{\LWR@restoreorigaccents}{%
-\LetLtxMacro{\=}{\LWR@origequalaccent}%
-\LetLtxMacro{\.}{\LWR@origdotaccent}%
-\LetLtxMacro{\u}{\LWR@origu}%
-\LetLtxMacro{\v}{\LWR@origu}%
-\LetLtxMacro{\t}{\LWR@origt}%
-\LetLtxMacro{\c}{\LWR@origc}%
-\LetLtxMacro{\d}{\LWR@origd}%
-\LetLtxMacro{\b}{\LWR@origb}%
+\LetLtxMacro\=\LWR@origequalaccent%
+\LetLtxMacro\.\LWR@origdotaccent%
+\LetLtxMacro\u\LWR@origu%
+\LetLtxMacro\v\LWR@origu%
+\LetLtxMacro\t\LWR@origt%
+\LetLtxMacro\c\LWR@origc%
+\LetLtxMacro\d\LWR@origd%
+\LetLtxMacro\b\LWR@origb%
}%
\else% XeLaTeX, LuaLaTeX:
\newcommand*{\LWR@restoreorigaccents}{%
-\LetLtxMacro{\t}{\LWR@origt}%
+\LetLtxMacro\t\LWR@origt%
}%
\fi%
}% AtBeginDocument
@@ -10173,6 +10594,8 @@ homehtmlfilename = "\HomeHTMLFilename"%
% \changes{v0.54}{2018/04/24}{\filenm{lwarp.css}: Fix: Text-decoration-skip: auto.}
% \changes{v0.56}{2018/04/27}{\filenm{lwarp.css}: Added \attribute{span.textbf}, etc.}
% \changes{v0.56}{2018/05/09}{\filenm{lwarp.css}: Added \attribute{div.textbf}, etc.}
+% \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Added ruled, boxed, boxruled floats.}
+% \changes{v0.57}{2018/05/21}{\filenm{lwarp.css}: Increased float vertical margins.}
%
% ^^A *lwarp.css
% \begin{macrocode}
@@ -11000,7 +11423,7 @@ img.logoimage{
figure {
- margin: 3ex auto 3ex auto ;
+ margin: 5ex auto 5ex auto ;
padding: 1ex 1em 1ex 1em ;
overflow-x: auto ;
}
@@ -11065,6 +11488,28 @@ figure div.floatrow div.minipage figcaption {
}
+/* For packages such as float, rotfloat, and algorithm2e: */
+
+figure.boxed, figure.boxruled {
+ border: 1px solid black ;
+}
+
+figure.ruled {
+ border-top: 1px solid black ;
+ border-bottom: 1px solid black ;
+ border-left: 0px ;
+ border-right: 0px ;
+ border-radius: 0px ;
+ background: none ;
+ box-shadow: none ;
+}
+
+figure.ruled figcaption, figure.boxruled figcaption {
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+}
+
+
table {
margin: 1ex auto 1ex auto ;
border-collapse: separate ;
@@ -11366,8 +11811,33 @@ div.multicols { -webkit-columns: 3 380px ;
div.multicols p {margin-top: 0ex}
+/* Used for algorithm2e: */
+div.alg2evline{
+ margin-left: 1em ;
+ padding-left: 1em ;
+ border-left: 1px solid black ;
+ border-radius: 0px 0px 0px 1ex ;
+}
-/* Used to support algorithmicx: */
+div.alg2evsline{
+ margin-left: 1em ;
+ padding-left: 1em ;
+ border-left: 1px solid black ;
+}
+
+div.alg2enoline{
+ margin-left: 1em ;
+ padding-left: 1em ;
+}
+
+span.alg2elinenumber{
+ margin-right: .5em ;
+ font-size: 50% ;
+ color: red ;
+}
+
+
+/* Used for algorithmicx: */
span.floatright { float: right ; }
@@ -11997,7 +12467,7 @@ div.fancyvrblabel{
figure {
- margin: 3ex 5% 3ex 5% ;
+ margin: 5ex 5% 5ex 5% ;
padding: 1ex 1em 1ex 1em ;
background-color: #fffcf5 ;
overflow-x: auto ;
@@ -12309,7 +12779,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-% \subsection{lwarpmk option}
+% \subsection{lwarpmk.lua — lwarpmk option}
% \DescribeOption{lwarpmk} Creates a local copy of \prog{lwarpmk}.
%
@@ -12368,6 +12838,8 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
% \changes{v0.54}{2018/04/19}{\prog{lwarpmk}: Improved error if configuration file does not exist.}
% \changes{v0.56}{2018/04/29}{\prog{lwarpmk}: Added \progcode{lwarpmk pdftosvg}.}
% \changes{v0.56}{2018/05/11}{\prog{lwarpmk}: Supports \texttt{-shell-escape}.}
+% \changes{v0.57}{2018/05/20}{\prog{lwarpmk}: Improved code factoring.}
+% \changes{v0.57}{2018/05/20}{\prog{lwarpmk}: Improved error handling.}
%
% The following is only generated if the \optn{lwarpmk} option
% was given to \pkg{lwarp}.
@@ -12382,15 +12854,19 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Copyright 2016-2018 Brian Dunn
--- Print the usage of the lwarpmk command:
-printversion = "v0.56"
+printversion = "v0.57"
+
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
end
+
function printusage ()
+--
+-- Print the usage of the lwarpmk command:
+--
print ( [[
lwarpmk print [project]: Compile the print version if necessary.
@@ -12418,9 +12894,11 @@ lwarpmk --help: Print this help message.
printconf ()
end
--- Print the format of the configuration file lwarpmk.conf:
function printconf ()
+--
+-- Print the format of the configuration file lwarpmk.conf:
+--
print ( [[
An example lwarpmk.conf or <project>.lwarpmkconf project file:
--
@@ -12443,11 +12921,13 @@ Values must be in upright "quotes".
end
+
+function splitfile (destfile,sourcefile)
+--
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
-
-function splitfile (destfile,sourcefile)
+--
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -12464,20 +12944,27 @@ end -- do
io.close(sfile)
end -- function
--- Incorrect value, so print an error and exit.
function cvalueerror ( line, linenum , cvalue )
+--
+-- Incorrect value, so print an error and exit.
+--
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print (
+ "lwarpmk: incorrect variable value \"" .. cvalue ..
+ "\" in lwarpmk.conf.\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
--- Load settings from the project's "lwarpmk.conf" file:
function loadconf ()
+--
+-- Load settings from the project's "lwarpmk.conf" file:
+--
-- Default configuration filename:
local conffile = "lwarpmk.conf"
-- Optional configuration filename:
@@ -12499,7 +12986,10 @@ if (lfs.attributes(conffile,"mode")==nil) then
print ("lwarpmk: recompile using pdflatex, xelatex, or lualatex,")
print ("lwarpmk: then try using lwarpmk again.")
if ( arg[2] ~= nil ) then
- print ("lwarpmk: (\"" .. arg[2] .. "\" does not appear to be a project name.)")
+ print (
+ "lwarpmk: (\"" .. arg[2] ..
+ "\" does not appear to be a project name.)"
+ )
end
print ("lwarpmk: ===")
printhelp () ;
@@ -12552,7 +13042,10 @@ elseif ( cvarname == "pdftotextenc" ) then pdftotextenc = cvalue
else
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print (
+ "lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " ..
+ conffile ..".\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
@@ -12584,7 +13077,7 @@ if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
opquote= "\'"
cmdgroupopenname = " ( "
cmdgroupclosename = " ) "
- seqname = " ; "
+ seqname = " && "
bgname = " &"
elseif opsystem=="Windows" then -- For Windows
rmname = "DEL"
@@ -12614,16 +13107,34 @@ end
end -- loadconf
+function executecheckerror ( executecommands , errormessage )
+--
+-- Execute an operating system call,
+-- and maybe exit with an error message.
+--
+local err
+err = os.execute ( executecommands )
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. errormessage )
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
+end -- executecheckerror
+
+
function refreshdate ()
os.execute(touchnamepre .. " " .. sourcename .. ".tex " .. touchnamepost)
end
+
+function reruntoget (filesource)
+--
-- Scan the LaTeX log file for the phrase "Rerun to get",
-- indicating that the file should be compiled again.
-- Return true if found.
-
-function reruntoget (filesource)
+--
local fsource = io.open(filesource)
for line in fsource:lines() do
if ( string.find(line,"Rerun to get") ~= nil ) then
@@ -12636,10 +13147,12 @@ return false
end
--- Compile one time, return true if should compile again.
--- fsuffix is "" for print, "_html" for HTML output.
function onetime (fsuffix)
+--
+-- Compile one time, return true if should compile again.
+-- fsuffix is "" for print, "_html" for HTML output.
+--
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -12647,21 +13160,19 @@ if ( shellescape == "true" ) then
else
thisshellescape = " "
end
-err = os.execute(latexname .. thisshellescape .. sourcename..fsuffix)
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+executecheckerror (
+ latexname .. thisshellescape .. sourcename..fsuffix ,
+ "Compile error."
+)
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
+function manytimes (fsuffix)
+--
-- Compile up to five times.
-- fsuffix is "" for print, "_html" for HTML output
-
-function manytimes (fsuffix)
+--
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
@@ -12670,9 +13181,11 @@ if onetime(fsuffix) == true then
end end end end end
end
--- Exit if the given file does not exist.
function verifyfileexists (filename)
+--
+-- Exit if the given file does not exist.
+--
if (lfs.attributes ( filename , "modification" ) == nil ) then
print ("lwarpmk: ===")
print ("lwarpmk: " .. filename .. " not found." ) ;
@@ -12682,9 +13195,11 @@ end
end
--- Convert <project>_html.pdf into HTML files:
function pdftohtml ()
+--
+-- Convert <project>_html.pdf into HTML files:
+--
-- Convert to text:
print ("lwarpmk: Converting " .. sourcename
.."_html.pdf to " .. sourcename .. "_html.html")
@@ -12695,9 +13210,11 @@ splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
+function removeaux ()
+--
-- Remove auxiliary files:
-- All aux files are removed since there may be many bbl*.aux files.
-function removeaux ()
+--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
sourcename ..".lof " .. sourcename .. "_html.lof " ..
@@ -12710,10 +13227,12 @@ os.execute ( rmname .. " *.aux " ..
)
end
+function checkhtmlpdfexists ()
+--
-- Error if the HTML document does not exist.
--- The lateximages are drawn from the HTML PDF verison of the document,
+-- The lateximages are drawn from the HTML PDF version of the document,
-- so "lwarpmk html" must be done before "lwarpmk limages".
-function checkhtmlpdfexists ()
+--
local htmlpdffile = io.open(sourcename .. "_html.pdf", "r")
if ( htmlpdffile == nil ) then
print ("")
@@ -12726,8 +13245,11 @@ end
io.close (htmlpdffile)
end -- checkhtmlpdfexists
--- Warning of a missing lateximages.txt file:
+
function warnlimages ()
+--
+-- Warning of a missing lateximages.txt file:
+--
print ("lwarpmk: ===")
print ("lwarpmk: \"lateximages.txt\" does not exist.")
print ("lwarpmk: Your project does not use SVG math or other lateximages,")
@@ -12741,9 +13263,11 @@ function warnlimages ()
end -- warnlimages
+function checklimages ()
+--
-- Check lateximages.txt to see if need to recompile first.
-- If any entry has a page number of zero, then there were incorrect images.
-function checklimages ()
+--
print ("lwarpmk: Checking for a valid lateximages.txt file.")
local limagesfile = io.open("lateximages.txt", "r")
if ( limagesfile == nil ) then
@@ -12775,91 +13299,34 @@ if ( pagezerowarning ) then
print ("lwarpmk: ===")
os.exit(1) ;
end -- pagezerowarning
-end -- checklateximages
+end -- checklimages
--- Create lateximages based on lateximages.txt:
-function createlateximages ()
--- See if the document must be recompiled first:
-checklimages ()
--- See if the print version exists:
-checkhtmlpdfexists ()
--- Attempt to create the lateximages:
-print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt", "r")
-if ( limagesfile == nil ) then
- warnlateximages ()
- 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 from lwarp_one_limage.txt:
-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")
- print (" lwarp_one_limage.txt to lwarp_one_limage.cmd")
- print ("lwarpmk: ===")
- os.exit(1) ;
- end
-end -- create lwarp_one_limage.cmd
--- Track the number of parallel processes
-numimageprocesses = 0
--- Track warning to recompile if find a page 0
-pagezerowarning = false
--- Scan lateximages.txt
-for line in limagesfile:lines() do
--- lwimgpage is the page number in the PDF which has the image
--- 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 if the page number is 0:
-if ( lwimgpage == "0" ) then
- pagezerowarning = true
-else
--- 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(
-cmdgroupopenname ..
-"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
- sourcename .."_html.pdf " ..
- "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
- seqname ..
--- Crop the image:
-"pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
- seqname ..
--- Convert the image to svg:
-"pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname ..".svg" ..
- seqname ..
--- Remove the temporary files:
-rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
-rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
-cmdgroupclosename .. " >/dev/null " .. bgname
+function createuniximage ( lwimgfullname )
+--
+-- Create one lateximage for Unix / Linux / Mac OS.
+--
+executecheckerror (
+ cmdgroupopenname ..
+ "pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
+ -- Crop the image:
+ "pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" ..
+ lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
+ -- Convert the image to svg:
+ "pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
+ -- Remove the temporary files:
+ rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+ rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+ cmdgroupclosename .. " >/dev/null " .. bgname
+ ,
+ "File error trying to convert " .. lwimgfullname
)
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
@@ -12867,10 +13334,15 @@ numimageprocesses = numimageprocesses + 1
if ( numimageprocesses > 32 ) then
numimageprocesses = 0
print ( "lwarpmk: waiting" )
- err = os.execute ( "wait" )
+ executecheckerror ( "wait" , "File error trying to wait.")
end
-elseif opsystem=="Windows" then
--- For Windows
+end -- createuniximage
+
+
+function createwindowsimage ( lwimgfullname )
+--
+-- Create one lateximage for Windows.
+--
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
numimageprocesses = numimageprocesses + 1
@@ -12882,30 +13354,96 @@ else
thiswaitcommand = ""
end
-- Execute the image generation command
-err = os.execute (
+executecheckerror (
"start /B " .. thiswaitcommand .. " \"\" lwarp_one_limage " ..
lwimgpage .. " " ..
lwimghash .. " " ..
lwimgname .. " " ..
sourcename .. " <nul >nul"
+ ,
+ "File error trying to create image."
)
-end -- Windows
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: File error trying to create one lateximage.")
- print ("lwarpmk: ===")
+end -- createwindowsimage
+
+
+function createonelateximage ( line )
+--
+-- Given the next line of lateximages.txt, convert a single image.
+--
+-- lwimgpage is the page number in the PDF which has the image
+-- 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 if the page number is 0:
+ if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+ else
+ -- 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:
+ executecheckerror (
+ newtouchname .. " " .. lwimgfullname ,
+ "File error trying to touch " .. lwimgfullname
+ )
+ -- Separate out the image into its own single-page pdf:
+ if opsystem=="Unix" then
+ createuniximage (lwimgfullname)
+ elseif opsystem=="Windows" then
+ createwindowsimage (lwimgfullname)
+ end
+ end -- not hashed or not exists
+ end -- not page 0
+end -- not nil
+end -- createonelateximage
+
+
+function createlateximages ()
+--
+-- Create lateximages based on lateximages.txt:
+--
+-- See if the document must be recompiled first:
+checklimages ()
+-- See if the print version exists:
+checkhtmlpdfexists ()
+-- Attempt to create the lateximages:
+print ("lwarpmk: Creating lateximages.")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ warnlateximages ()
os.exit(1)
end
-end -- not hashed or not exists
-end -- not page 0
-end -- not nil
+-- Create the lateximages directory, ignore error if already exists
+err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd from lwarp_one_limage.txt:
+if opsystem=="Windows" then
+ executecheckerror (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd" ,
+ "File error trying to copy lwarp_one_limage.txt to lwarp_one_limage.cmd"
+ )
+end -- create lwarp_one_limage.cmd
+-- Track the number of parallel processes
+numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
+-- Scan lateximages.txt
+for line in limagesfile:lines() do
+ createonelateximage ( line )
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: ===")
print ( "lwarpmk limages: Wait a moment for the images to complete" )
-print ( "lwarpmk limages: before reloading the page." )
+print ( "lwarpmk limages: before reloading the page." )
print ( "lwarpmk limages: ===")
-print ( "lwarpmk limages: done" )
+print ( "lwarpmk limages: Done." )
if ( pagezerowarning == true ) then
print ( "lwarpmk limages: WARNING: Images will be incorrect." )
print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
@@ -12915,9 +13453,11 @@ end -- pagezerowarning
end -- function
+function compilelatexmk ( fsuffix )
+--
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
-function compilelatexmk ( fsuffix )
+--
-- Maybe select the shell-escape option:
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -12927,7 +13467,8 @@ else
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 "
+executecheckerror (
+ "latexmk -pdf -dvi- -ps- -recorder "
.. "-e "
.. opquote
.. "$makeindex = q/" -- $
@@ -12937,19 +13478,19 @@ err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
.. " -L " .. xindylanguage .. " /"
.. opquote
.. " -pdflatex=\"" .. latexname .. thisshellescape .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+ .. sourcename..fsuffix ..".tex"
+ ,
+ "Compile error."
+)
end -- function
+
+function convertpdftosvg ()
+--
-- Converts PDF files to SVG files.
-- The filenames are arg[2] and up.
-- arg[1] is the command "pdftosvg".
-function convertpdftosvg ()
+--
for i = 2 , #arg do
if (lfs.attributes(arg[i],"mode")==nil) then
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
@@ -12960,6 +13501,11 @@ for i = 2 , #arg do
end -- do
end --function
+
+
+-- Start of the main code: --
+
+
-- lwarpmk --version :
if (arg[1] == "--version") then
@@ -12967,10 +13513,12 @@ print ( "lwarpmk: " .. printversion )
else -- not --version
+
-- print intro:
print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+
-- lwarpmk print:
if arg[1] == "print" then
@@ -12996,12 +13544,16 @@ else -- not latexmk
end
end -- not latexmk
+
+-- lwarpmk print1:
+
elseif arg[1] == "print1" then
loadconf ()
verifyfileexists (sourcename .. ".tex") ;
onetime("")
print ("lwarpmk: Done.") ;
+
-- lwarp printindex:
-- Compile the index then touch the source
-- to trigger a recompile of the document:
@@ -13020,6 +13572,7 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+
-- lwarp printglossary:
-- Compile the glossary then touch the source
-- to trigger a recompile of the document:
@@ -13039,6 +13592,7 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+
-- lwarpmk html:
elseif arg[1] == "html" then
@@ -13066,6 +13620,9 @@ else -- not latexmk
end
end -- not latexmk
+
+-- lwarpmk html1:
+
elseif arg[1] == "html1" then
loadconf ()
verifyfileexists ( sourcename .. ".tex" ) ;
@@ -13073,10 +13630,13 @@ elseif arg[1] == "html1" then
pdftohtml ()
print ("lwarpmk: Done.")
+
+-- lwarpmk pdftohtml:
elseif arg[1] == "pdftohtml" then
loadconf ()
pdftohtml ()
+
-- lwarpmk htmlindex:
-- Compile the index then touch the source
-- to trigger a recompile of the document:
@@ -13096,6 +13656,7 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+
-- lwarpmk htmlglossary:
-- Compile the glossary then touch the source
-- to trigger a recompile of the document:
@@ -13116,6 +13677,7 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+
-- lwarpmk limages:
-- Scan the lateximages.txt file to create lateximages.
@@ -13125,6 +13687,7 @@ print ("lwarpmk: Processing images.")
createlateximages ()
print ("lwarpmk: Done.")
+
-- lwarpmk again:
-- Touch the source to trigger a recompile.
@@ -13135,6 +13698,7 @@ refreshdate ()
print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
print ("lwarpmk: Done.")
+
-- lwarpmk clean:
-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, *_html_inc.*, .gl*
@@ -13143,6 +13707,7 @@ loadconf ()
removeaux ()
print ("lwarpmk: Done.")
+
-- lwarpmk cleanall
-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log, *_html_inc.*, .gl*
-- and also project.pdf, *.html
@@ -13156,6 +13721,7 @@ os.execute ( rmname .. " " ..
)
print ("lwarpmk: Done.")
+
-- lwarpmk cleanlimages
-- Remove images from the lateximages directory.
@@ -13170,16 +13736,21 @@ elseif arg[1] == "pdftosvg" then
convertpdftosvg ()
print ("lwarpmk: Done.")
+
-- lwarpmk with no argument :
elseif (arg[1] == nil) then
printhelp ()
+
-- lwarpmk -h or lwarpmk --help :
elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
printusage ()
+
+-- Unknown command:
+
else
printhelp ()
print ("\nlwarpmk: ****** Unknown command \""..arg[1].."\". ******\n")
@@ -13425,6 +13996,152 @@ end -- not --version
% \end{macrocode}
+
+% \section{Localizing catcodes}
+% \label{sec:localizingcatcodes}
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+% Place \cs{StartDefiningTabulars} and
+% \cs{StopDefiningTabulars}\watchout[misplaced alignment tab character \&]
+% \index{alignment tab character \&, misplaced}
+% \index{misplaced alignment tab character \&}
+% before and after defining macros or environments which include
+% the tabular |&| character in their definitions.
+%
+% The catcode of |&| must be changed before the definitions begin,
+% and must be restored afterwards. Doing so avoids the error\\
+% \hspace*{.5in}\texttt{misplaced alignment tab character \&}
+%
+% \begin{macro}{\StartDefiningTabulars} Place before defining something with |&| in it.
+% \changes{v0.33}{2017/06/20}{Add: Avoids error: \protect\texttt{misplaced alignment tab character \&}.}
+% \begin{macrocode}
+\newcommand{\StartDefiningTabulars}{%
+\LWR@traceinfo{StartDefiningTabulars}%
+\warpHTMLonly{\catcode`\&=\active}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\StopDefiningTabulars} Place after defining something with |&| in it.
+% \begin{macrocode}
+\newcommand{\StopDefiningTabulars}{%
+\LWR@traceinfo{StopDefiningTabulars}%
+\warpHTMLonly{\catcode`\&=4}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeBoolean{LWR@mathmacro} True if currently defining math macros.
+% Used to disable \SVG\ math hashing and MathJax math contents while
+% defining a macro using inline math.
+% Begin a macro, it is not guaranteed that the contents are static, and so
+% the image must be unique. The contents also almost certainly will not be
+% parsed correctly by MathJax.
+% \begin{macrocode}
+\newbool{LWR@mathmacro}
+\boolfalse{LWR@mathmacro}
+% \end{macrocode}
+
+% \begin{macro}{\StartDefiningMath} Place before defining something with |$| in it.
+% \changes{v0.57}{2018/05/23}{Added.}
+% \begin{macrocode}
+\newcommand{\StartDefiningMath}{%
+\LWR@traceinfo{StartDefiningMath}%
+\warpHTMLonly{\catcode`\$=\active}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\StopDefiningMath} Place after defining something with |$| in it.
+% \begin{macrocode}
+\newcommand{\StopDefiningMath}{%
+\LWR@traceinfo{StopDefiningMath}%
+\warpHTMLonly{\catcode`\$=3}% math shift
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \section{Localizing dynamic math}
+% \label{sec:localizingdynamicmath}
+% \index{SVG>math incorrect images}
+% \index{SVG>dynamic math}
+% \index{math>images incorrect}
+% \index{math>dynamic}
+% \index{dynamic math expressions}
+%
+% Inline \SVG\ math usually uses a hash of its contents to generate \env{lateximage}s
+% which are reusable for multiple instances with the same contents.
+% If the contents may change for each use, such as depending on the current
+% value of a counter, then \cs{StartDynamicMath} must be used before the
+% inline math expression, and \cs{StopDynamicMath} must be used after.
+%
+% For MathJax, the inline math expression is usually printed for MathJax to
+% interpret. When marked as dynamic math, the following inline math expression
+% will be displayed as an unhashed inline \SVG\ image instead.
+%
+% For existing code and packages, it may be possible to patch macros after
+% they have been defined, using the \pkg{xpatch} package,
+% which is pre-loaded by \pkg{lwarp}:
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \xpatchcmd{\macroname}
+% {$math expression$}
+% {\StartDynamicMath$math expression$\StopDynamicMath}
+% {}
+% {\typeout{Error patching macroname.}}
+% \end{Verbatim}
+%
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+% \DescribeBoolean{LWR@dynamicmath} True to mark inline math which is dynamic in
+% nature, thus should not be hashed for reuse.
+% \DescribeDefault{false}
+% \begin{macrocode}
+\newbool{LWR@dynamicmath}
+\boolfalse{LWR@dynamicmath}
+% \end{macrocode}
+%
+% \begin{macro}{\StartDynamicMath} Place before using |$| \dots\ |$| or \cs{(} \dots \cs{)}
+% if the contents of the math are not static, depending on counters or dynamic macros.
+% \changes{v0.57}{2018/05/23}{Added.}
+% \begin{macrocode}
+\newcommand{\StartDynamicMath}{%
+\LWR@traceinfo{StartDynamicMath}%
+\booltrue{LWR@dynamicmath}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\StopDynamicMath} Place after using |$| \dots\ |$| or \cs{(} \dots \cs{)}
+% with dynamic contents.
+% \begin{macrocode}
+\newcommand{\StopDynamicMath}{%
+\LWR@traceinfo{StopDynamicMath}%
+\boolfalse{LWR@dynamicmath}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+
% \section{Sanitizing labels and filenames}
%
% Special handling for underscores in labels and filenames.
@@ -13704,9 +14421,7 @@ end -- not --version
% The filename must be detokenized for underscores.
% \begin{macrocode}
\newcommand*{\LinkHome}{%
-\LWR@subhyperrefclass{%
-\HomeHTMLFilename.html}%
-{Home}{linkhome}%
+\LWR@subhyperrefclass{\HomeHTMLFilename.html}{Home}{linkhome}%
}
% \end{macrocode}
% \end{macro}
@@ -14188,7 +14903,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\LWR@origmbox{\LWR@origtextless{}!{-}{-}}%
+\LWR@print@mbox{\LWR@origtextless{}!{-}{-}}%
\endgroup%
}%
}
@@ -14199,7 +14914,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\LWR@origmbox{{-}{-}\LWR@origtextgreater}%
+\LWR@print@mbox{{-}{-}\LWR@origtextgreater}%
\endgroup%
}%
}
@@ -14382,49 +15097,58 @@ end -- not --version
% \changes{v0.20}{2017/01/03}{Renamed from "blockclass".}
% \changes{v0.20}{2017/01/17}{Added optional style.}
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\NewDocumentEnvironment{BlockClass}{o m}{}{}%
+\end{warpprint}
+% \end{macrocode}
+% \end{environment}
%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentEnvironment{BlockClass}{o m}%
+\NewDocumentEnvironment{LWR@print@BlockClass}{o m}{}{}%
+\NewDocumentEnvironment{LWR@HTML@BlockClass}{o m}%
{%
\LWR@origpar%
\LWR@htmldivclass[#1]{#2}%
}
{\LWR@htmldivclassend{#2}}
+
+\LWR@formattedenv{BlockClass}
\end{warpHTML}
% \end{macrocode}
%
-% \codeprint
-% \begin{macrocode}
-\begin{warpprint}
-\NewDocumentEnvironment{BlockClass}{o m}{}{}%
-\end{warpprint}
-% \end{macrocode}
-% \end{environment}
%
%
% \begin{macro}{\BlockClassSingle} \marg{class} \marg{text} \quad
% A single-line \element{div}, without a paragraph tag for the line of text.
%
% \changes{v0.20}{2017/01/03}{Renamed from "LWR@htmldivclassline".}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+\newcommand{\BlockClassSingle}[2]{#2}
+\end{warpall}
+% \end{macrocode}
%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\newcommand{\BlockClassSingle}[2]{%
+\newcommand{\LWR@HTML@BlockClassSingle}[2]{%
\LWR@origpar%
\LWR@htmlelementclassline{div}{#1}{#2}%
}
+
+\LWR@formatted{BlockClassSingle}
\end{warpHTML}
% \end{macrocode}
%
-% \codeprint
-% \begin{macrocode}
-\begin{warpprint}
-\newcommand{\BlockClassSingle}[2]{#2}
-\end{warpprint}
-% \end{macrocode}
%
% \end{macro}
@@ -14434,15 +15158,8 @@ end -- not --version
%
% \changes{v0.20}{2017/01/03}{Renamed from "inlineclass".}
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
%
-% \codehtml
-% \begin{macrocode}
-\begin{warpHTML}
-\NewDocumentCommand{\InlineClass}{o m +m}{%
-\LWR@htmlspanclass[#1]{#2}{#3}%
-}
-\end{warpHTML}
-% \end{macrocode}
% \codeprint
% \begin{macrocode}
\begin{warpprint}
@@ -14450,6 +15167,19 @@ end -- not --version
\end{warpprint}
% \end{macrocode}
% \end{macro}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\NewDocumentCommand{\LWR@print@InlineClass}{o m +m}{#3}%
+
+\NewDocumentCommand{\LWR@HTML@InlineClass}{o m +m}{%
+ \LWR@htmlspanclass[#1]{#2}{#3}%
+}
+
+\LWR@formatted{InlineClass}
+\end{warpHTML}
+% \end{macrocode}
% \begin{environment}{LWR@BlockClassWP} \marg{WPstyle} \marg{HTMLstyle} \marg{class} \quad
@@ -14458,11 +15188,21 @@ end -- not --version
%
% \changes{v0.42}{2017/10/26}{Added to factor code.}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
+\end{warpprint}
+% \end{macrocode}
+% \end{environment}
%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}%
+\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m m}{}{}%
+\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m m}%
{%
\LWR@stoppars%
\ifbool{FormatWP}%
@@ -14470,7 +15210,7 @@ end -- not --version
\addtocounter{LWR@thisautoidWP}{1}%
\LWR@htmltag{%
div class="#3" %
- id="\LWR@origmbox{autoidWP-\arabic{LWR@thisautoidWP}}"%
+ id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -14483,19 +15223,10 @@ end -- not --version
\LWR@startpars%
}
{\LWR@htmldivclassend{#3}}
+
+\LWR@formattedenv{LWR@BlockClassWP}
\end{warpHTML}
% \end{macrocode}
-%
-% \codeprint
-% \begin{macrocode}
-\begin{warpprint}
-\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
-\end{warpprint}
-% \end{macrocode}
-% \end{environment}
-%
-%
-
% \subsection{Closing HTML tags}
@@ -15420,7 +16151,7 @@ end -- not --version
\ifvoid\LWR@mpfootnotes\else
\LWR@forcenewpage
\begin{BlockClass}{footnotes}
- \LWR@origvspace*{\baselineskip}
+ \LWR@print@vspace*{\baselineskip}
\unvbox\LWR@mpfootnotes
\setbox\LWR@mpfootnotes=\vbox{}
\end{BlockClass}
@@ -15774,6 +16505,7 @@ end -- not --version
% \begin{macro}{\LWR@customizeMathJax}
% \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.}
+% \changes{v0.57}{2018/05/24}{MathJax: Supports \cs{footnote}, \cs{footnotemark}.}
% \begin{macrocode}
\newcommand{\LWR@customizeMathJax}{%
\ifbool{mathjax}{
@@ -15782,6 +16514,10 @@ end -- not --version
\(\newcommand\ensuremath[1]{##1}\)
+\(\newcommand\footnote[2][]{\text{( Footnote ##1 )}}\)
+
+\(\newcommand\footnotemark[1][]{\text{( Footnote ##1 )}}\)
+
\LWR@htmlcomment{Additional customizations for MathJax:}
\LWR@customizedMathJax
@@ -16162,7 +16898,7 @@ end -- not --version
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\newcommand*{\LWR@createautosec}[1]{%
-\LWR@htmltag{#1 id="\LWR@origmbox{autosec-\arabic{page}}"}%
+\LWR@htmltag{#1 id="\LWR@print@mbox{autosec-\arabic{page}}"}%
}
% \end{macrocode}
% \end{macro}
@@ -16941,10 +17677,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% Tabular:
% \begin{macrocode}
-\LetLtxMacro{\LWR@origtabular}{\tabular}
-\LetLtxMacro{\LWR@origendtabular}{\endtabular}
-\LetLtxMacro{\tabular}{\LWR@tabular}
-\LetLtxMacro{\endtabular}{\endLWR@tabular}
+\LetLtxMacro\LWR@origtabular\tabular
+\LetLtxMacro\LWR@origendtabular\endtabular
+\LetLtxMacro\tabular\LWR@tabular
+\LetLtxMacro\endtabular\endLWR@tabular
% \end{macrocode}
% Float captions:
% \begin{macrocode}
@@ -18048,7 +18784,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifthenelse{\equal{#1}{}}{}{style="#1"}%
}%
\LWR@orignewline% pre
- \leavevmode\unskip\LWR@origvspace*{-#2\baselineskip}%
+ \leavevmode\unskip\LWR@print@vspace*{-#2\baselineskip}%
}{}%
% \end{macrocode}
% Use a mono-spaced font to preserve horizontal positioning.
@@ -18076,7 +18812,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Do not produce \HTML\ tags for \cs{hspace} inside a verse |par|.
% Restore plain \LaTeX{} \cs{hspace} functionality:
% \begin{macrocode}
-\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LWR@select@print@hspace%
}
% \end{macrocode}
% \end{macro}
@@ -18095,7 +18831,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% At the end of the environment, close the |pre|:
% \begin{macrocode}
\ifbool{LWR@verbtags}{%
- \LWR@origvspace*{-#1\baselineskip}%
+ \LWR@print@vspace*{-#1\baselineskip}%
\noindent\LWR@htmltag{/pre}\LWR@orignewline% pre
}{}%
% \end{macrocode}
@@ -18302,7 +19038,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% May be locally redefined by \env{enumerate} or \env{description}.
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
-\newcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\newcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"}
% \end{macrocode}
% \end{macro}
@@ -18541,7 +19277,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\newcommand*{\LWR@itemizestart}{%
\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\renewcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\renewcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"}
\let\item\LWR@itemizeitem%
\LWR@nulllistfills%
}
@@ -18559,7 +19295,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\newcommand*{\LWR@enumeratestart}{%
\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\renewcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\renewcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"}
\let\item\LWR@itemizeitem%
\LWR@nulllistfills%
}
@@ -18583,7 +19319,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% This causes \pkg{lwarp} to mistakenly place an empty span between
% \HTML\ list tags.
% \begin{macrocode}
-\LetLtxMacro\hspace\LWR@nohspace%
+\LWR@select@html@nohspace%
% \end{macrocode}
% Process the original \cs{item} code:
% \begin{macrocode}
@@ -18591,7 +19327,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% Restore \cs{hspace} for use in the item text:
% \begin{macrocode}
-\LetLtxMacro\hspace\LWR@hspace%
+\LWR@select@html@hspace%
+% \end{macrocode}
+% \begin{macrocode}
\LWR@htmltag{dt}#1\LWR@htmltag{/dt}%
\LWR@orignewline%
\LWR@htmltag{dd}%
@@ -19088,60 +19826,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
%
%
-% \subsubsection{Localizing \progcode{\&} catcodes}
-% \label{sec:localizingampersand}
-%
-% \codeall
-% \begin{macrocode}
-\begin{warpall}
-% \end{macrocode}
-%
-% Place \cs{StartDefiningTabulars} and
-% \cs{EndDefiningTabulars}\watchout[misplaced alignment tab character \&]
-% \index{alignment tab character \&, misplaced}
-% \index{misplaced alignment tab character \&}
-% before and after defining macros or environments which include
-% the tabular |&| character in their definitions.
-%
-% The catcode of |&| must be changed before the definitions begin,
-% and must be restored afterwards. Doing so avoids the error\\
-% \hspace*{.5in}\texttt{misplaced alignment tab character \&}
-%
-% \begin{macro}{\StartDefiningTabulars} Place before defining something with |&| in it.
-% \changes{v0.33}{2017/06/20}{Add: Avoids error: \protect\texttt{misplaced alignment tab character \&}.}
-% \begin{macrocode}
-\newcommand{\StartDefiningTabulars}{%
-\LWR@traceinfo{StartDefiningTabulars}%
-\warpHTMLonly{\catcode`\&=\active}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\EndDefiningTabulars} Place after defining something with |&| in it.
-% \begin{macrocode}
-\newcommand{\EndDefiningTabulars}{%
-\LWR@traceinfo{EndDefiningTabulars}%
-\warpHTMLonly{\catcode`\&=4}%
-}
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macrocode}
-\end{warpall}
-% \end{macrocode}
-%
%
% \subsubsection{Handling \progcode{\&}}
%
-%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
%
-%
-
-%
% \changes{v0.15}{2016/03/31}{Ampersand (\&): Fixed handling when passed as an argument.}
%
% \begin{macro}{&} Will behave depending on whether it is being used inside \env{tabular}.
@@ -20010,69 +20702,37 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% \end{macro}
%
-% Inside an \HTML\ \env{tabular}, each of \cs{columncolor} etc. is \cs{let} to
-% the \cs{LWR@HTML} versions below. When \pkg{colortbl} is loaded,
-% its definitions override the following.
-%
-% \begin{macro}{\columncolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
-% \begin{macro}{\LWR@HTMLcolumncolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
-% \begin{macrocode}
-\NewDocumentCommand{\LWR@HTMLcolumncolor}{O{named} m o o}{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-
% \begin{macro}{\rowcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
-% \begin{macro}{\LWR@HTMLrowcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
+% Print version. The \HTML\ version is in \pkg{lwarp-colortbl}.
% Used before starting a tabular data cell, thus \cs{LWR@getmynexttoken}.
% \begin{macrocode}
-\NewDocumentCommand{\LWR@HTMLrowcolor}{O{named} m o o}{\LWR@getmynexttoken}
+\newcommand*{\rowcolor}{\LWR@getmynexttoken}%
% \end{macrocode}
% \end{macro}
-% \end{macro}
-
-% \begin{macro}{\cellcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
-% \begin{macro}{\LWR@HTMLcellcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
-% \begin{macrocode}
-\NewDocumentCommand{\LWR@HTMLcellcolor}{O{named} m o o}{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
% \begin{macro}{\arrayrulecolor} \oarg{model} \marg{color}
+% \begin{macro}{\arrayrulecolornexttoken} \oarg{model} \marg{color}
%
-% The version for use outside a \env{tabular}.
+% Print versions for use outside and inside a \env{tabular}:
% \begin{macrocode}
\newcommand{\arrayrulecolor}[2][named]{}
+\newcommand{\arrayrulecolornexttoken}[2][named]{\LWR@getmynexttoken}
% \end{macrocode}
% \end{macro}
-
-% \begin{macro}{\LWR@HTMLarrayrulecolor} \oarg{model} \marg{color}
-%
-% The version for use inside a \env{tabular}.
-% \begin{macrocode}
-\newcommand{\LWR@HTMLarrayrulecolor}[2][named]{\LWR@getmynexttoken}
-% \end{macrocode}
% \end{macro}
% \begin{macro}{\doublerulesepcolor} \oarg{model} \marg{color}
+% \begin{macro}{\doublerulesepcolornexttoken} \oarg{model} \marg{color}
%
-% The version for use outside a \env{tabular}.
+% Print versions for use inside and outside a \env{tabular}:
% \begin{macrocode}
\newcommand{\doublerulesepcolor}[2][named]{}
+\newcommand{\doublerulesepcolornexttoken}[2][named]{\LWR@getmynexttoken}
% \end{macrocode}
% \end{macro}
-
-% \begin{macro}{\LWR@HTMLdoublerulesepcolor} \oarg{model} \marg{color}
-%
-% The version for use inside a \env{tabular}.
-% \begin{macrocode}
-\newcommand{\LWR@HTMLdoublerulesepcolor}[2][named]{\LWR@getmynexttoken}
-% \end{macrocode}
% \end{macro}
-
% \subsection{Starting a new row}
% \begin{macro}{\LWR@maybenewtablerow}
@@ -20702,7 +21362,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\newcommand*{\LWR@WPcell}[2]{%
\LWR@tdaddstyle%
-\LWR@origmbox{text-align:#1}; \LWR@origmbox{vertical-align:#2}%
+\LWR@print@mbox{text-align:#1}; \LWR@print@mbox{vertical-align:#2}%
}
% \end{macrocode}
% \end{macro}
@@ -21309,8 +21969,8 @@ rowspan="#2" %
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\IfValueT{#1}{% vpos?
-\ifstrequal{#1}{b}{style="\LWR@origmbox{vertical-align:bottom}" }{}%
-\ifstrequal{#1}{t}{style="\LWR@origmbox{vertical-align:top}" }{}%
+\ifstrequal{#1}{b}{style="\LWR@print@mbox{vertical-align:bottom}" }{}%
+\ifstrequal{#1}{t}{style="\LWR@print@mbox{vertical-align:top}" }{}%
}% vpos?
}% rows?
% \end{macrocode}
@@ -21480,7 +22140,8 @@ rowspan="#2" %
{%
\refstepcounter{\LTcaptype}%
\protected@edef\@currentlabel{%
- \csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+ \csuse{p@\LTcaptype}\csuse{the\LTcaptype}%
+ }%
}%
}{}%
% \end{macrocode}
@@ -21636,6 +22297,15 @@ rowspan="#2" %
% \end{macrocode}
%
%
+% \subsection{Multirow if not loaded}
+%
+% A default defintion in case \pkg{multirow} is not loaded.
+% This is used during table parsing.
+% \begin{macrocode}
+\begin{warpHTML}
+\newcommand{\multirow}[2][c]{}
+\end{warpHTML}
+% \end{macrocode}
%
%
% \subsection{Multicolumnrow}
@@ -21665,17 +22335,25 @@ rowspan="#2" %
%
% \changes{v0.39}{2017/08/31}{Added.}
% \changes{v0.40}{2017/09/22}{Fix: Adapts to older \pkg{multirow} and \pkg{xparse}.}
+% \changes{v0.57}{2018/06/01}{Improved print/\HTML\ output selection.}
%
-% After the user may have
+% \cs{AtBeginDocument} to adjust after the user may have loaded \pkg{multirow},
+% which requires several tests to determine which version is loaded
+% and thus which options are available.
% \begin{macrocode}
\AtBeginDocument{
% \end{macrocode}
%
% |\@ifundefined{@xmultirow}| determines if \pkg{multirow} was never loaded.
%
+% Null action if not loaded:
% \begin{macrocode}
\@ifundefined{@xmultirow}
-{}% no version of multirow was loaded
+{
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
+ {+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
+ {}%
+}% no version of multirow was loaded
{% \@xmultirow defined, so some version of multirow was loaded
% \end{macrocode}
%
@@ -21683,17 +22361,19 @@ rowspan="#2" %
% \pkg{multirow} was used, which included the \cs{ProvidesPackage} macro.
%
% \begin{macrocode}
+% The print version:
+% \begin{macrocode}
\@ifpackageloaded{multirow}{% v2.0 or newer
\@ifpackagelater{multirow}{2016/09/01}% 2016/09/27 for v2.0
{% v2.0+:
-\DeclareExpandableDocumentCommand{\LWR@origmulticolumnrow}%
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
-{\multicolumn{#1}{#2}{\@xmultirow[#3]{#4}[#5]{#6}[#7]{#8}}}%
+ {\multicolumn{#1}{#2}{\@xmultirow[#3]{#4}[#5]{#6}[#7]{#8}}}%
}
{% loaded but older, probably not executed:
-\DeclareExpandableDocumentCommand{\LWR@origmulticolumnrow}%
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
-{\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
+ {\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
}
}% packageloaded{multirow}
% \end{macrocode}
@@ -21704,18 +22384,15 @@ rowspan="#2" %
%
% \begin{macrocode}
{% v1.6 or older did not \ProvidePackage
-\DeclareExpandableDocumentCommand{\LWR@origmulticolumnrow}%
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
-{\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
+ {\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
}
-% \end{macrocode}
-%
-% The user-level interface. This is provided if the \HTML\ version was
-% not already given.
-%
-% \begin{macrocode}
-\providecommand*{\multicolumnrow}{\LWR@origmulticolumnrow}
-}% \@xmultirow defined, so multirow was loaded
+
+}% \@ifundefined{@xmultirow}
+
+\providecommand*{\multicolumnrow}{\LWR@print@multicolumnrow}
+
}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -22055,9 +22732,6 @@ rowspan="#2" %
% \end{macro}
-
-
-
% \subsection{HTML \env{tabular} environment}
% \codehtml
@@ -22071,13 +22745,13 @@ rowspan="#2" %
%
% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
% \begin{macrocode}
-\newcommand*{\LWR@origtoprule}[1][]{\hline}
-\newcommand*{\LWR@origmidrule}[1][]{\hline}
-\LetLtxMacro\LWR@origcmidrule\cline
-\newcommand*{\LWR@origbottomrule}[1][]{\hline}
-\newcommand*{\LWR@origaddlinespace}[1][]{}
-\newcommand*{\LWR@origmorecmidrules}{}
-\newcommand*{\LWR@origspecialrule}[3]{\hline}
+\newcommand*{\toprule}[1][]{\hline}
+\newcommand*{\midrule}[1][]{\hline}
+\LetLtxMacro\cmidrule\cline
+\newcommand*{\bottomrule}[1][]{\hline}
+\newcommand*{\addlinespace}[1][]{}
+\newcommand*{\morecmidrules}{}
+\newcommand*{\specialrule}[3]{\hline}
% \end{macrocode}
%
%
@@ -22238,14 +22912,11 @@ rowspan="#2" %
\LetLtxMacro{\\}{\LWR@tabularendofline}%
% \end{macrocode}
%
-% The following adjust for \pkg{colortbl}:
+% The following adjust for \pkg{colortbl}.
% \changes{v0.48}{2018/02/06}{\pkg{colortbl}: Added.}
% \begin{macrocode}
-\LetLtxMacro\columncolor\LWR@HTMLcolumncolor%
-\LetLtxMacro\rowcolor\LWR@HTMLrowcolor%
-\LetLtxMacro\cellcolor\LWR@HTMLcellcolor%
-\LetLtxMacro\arrayrulecolor\LWR@HTMLarrayrulecolor%
-\LetLtxMacro\doublerulesepcolor\LWR@HTMLdoublerulesepcolor%
+\LetLtxMacro\arrayrulecolor\arrayrulecolornexttoken%
+\LetLtxMacro\doublerulesepcolor\doublerulesepcolornexttoken%
\renewcommand*{\LWR@columnHTMLcolor}{}%
\renewcommand*{\LWR@rowHTMLcolor}{}%
\renewcommand*{\LWR@cellHTMLcolor}{}%
@@ -22273,60 +22944,6 @@ rowspan="#2" %
\LetLtxMacro\hline\LWR@HTMLhline%
\LetLtxMacro\cline\LWR@HTMLcline%
% \end{macrocode}
-% \changes{v0.41}{2017/10/03}{Improved rules.}
-% \changes{v0.42}{2017/10/19}{If \progcode{FormatWP} force explicit border.}
-% \begin{macrocode}
-\DeclareDocumentCommand{\toprule}{o d()}%
- {%
- \IfValueTF{##1}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {%
- \ifbool{FormatWP}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {\booltrue{LWR@doingtbrule}}%
- }%
- \LWR@getmynexttoken}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareDocumentCommand{\midrule}{o d()}%
- {%
- \IfValueTF{##1}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {%
- \ifbool{FormatWP}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {\addtocounter{LWR@hlines}{1}}%
- }%
- \LWR@getmynexttoken}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareDocumentCommand{\cmidrule}{O{\LWR@cmidrulewidth} d() m}{%
- \LWR@docmidrule[##1](##2){##3}%
- \LWR@getmynexttoken%
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareDocumentCommand{\bottomrule}{o d()}{%
- \IfValueTF{##1}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {%
- \ifbool{FormatWP}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {\booltrue{LWR@doingtbrule}}%
- }%
- \LWR@getmynexttoken%
-}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareDocumentCommand{\addlinespace}{o}{}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareDocumentCommand{\morecmidrules}{}{}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareDocumentCommand{\specialrule}{m m m d()}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}\LWR@getmynexttoken}%
-% \end{macrocode}
% \begin{macrocode}
\DeclareDocumentCommand{\hdashline}{o}{%
\ifbool{FormatWP}%
@@ -22442,11 +23059,11 @@ rowspan="#2" %
% Restore |&| to its usual meaning:
% \begin{macrocode}
\protected\gdef&{\LWR@origampmacro}%
-\EndDefiningTabulars%
+\StopDefiningTabulars%
\LWR@traceinfo{LWR@tabular finished ending}%
}
-\EndDefiningTabulars
+\StopDefiningTabulars
% \end{macrocode}
% \end{environment}
@@ -22456,7 +23073,6 @@ rowspan="#2" %
-
% \section{Cross-references}
%
% Sectioning commands have been emulated from scratch, so the cross-referencing
@@ -22728,16 +23344,16 @@ rowspan="#2" %
{% pars allowed
\ifbool{LWR@doingapar}%
{% par started
- \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
}% par started
{% par not started
\LWR@stoppars%
- \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
\LWR@startpars%
}% par not started
}% pars allowed
{% pars not allowed
- \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
}% pars not allowed
}% not lateximage
}
@@ -22804,7 +23420,7 @@ rowspan="#2" %
% \begin{macrocode}
\LWR@htmltag{a href="%
\LWR@traceinfo{LWR@startref B}%
-\LWR@origmbox{\LWR@htmlrefsectionfilename{#1}}%
+\LWR@print@mbox{\LWR@htmlrefsectionfilename{#1}}%
\LWR@traceinfo{LWR@startref C}%
\LWR@origpound%
% \end{macrocode}
@@ -22840,7 +23456,7 @@ rowspan="#2" %
% \cs{detokenize} is used to allow underscores in the labels:
% \changes{v0.45}{2017/12/01}{Fix: Labels with underscores.}
% \begin{macrocode}
- \LWR@origmbox{\LWR@sanitized}%
+ \LWR@print@mbox{\LWR@sanitized}%
}%
}%
\LWR@traceinfo{LWR@startref E}%
@@ -22869,10 +23485,13 @@ rowspan="#2" %
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\ref} * \marg{label} \quad \cs{ref} is \cs{let} to \cs{LWR@newref}
-% \begin{macro}{\LWR@newref} * \marg{label} \quad
-% Create an internal document reference link,
-% or without a link if starred per \pkg{hyperref}.
+% \begin{macro}{\ref} * \marg{label} \quad
+% \cs{ref} is redefined to \cs{LWR@newref},
+% except inside the text part of a \cs{hyperref},
+% where it is redefined to \cs{LWR@ref@ignorestar}.
+% \begin{macro}{\LWR@newref} * \marg{label}
+% Create an internal document reference link,
+% or without a link if starred per \pkg{hyperref}.
% \begin{macrocode}
\NewDocumentCommand{\LWR@newref}{s m}{%
\LWR@traceinfo{LWR@newref !#2!}%
@@ -22883,6 +23502,17 @@ rowspan="#2" %
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\LWR@ref@ignorestar} * \marg{label} \quad
+% For use inside \cs{hyperref}. Ignores the star, then uses the original \cs{ref}.
+%
+% \changes{v0.57}{2018/06/05}{\pkg{subcaption}: Fix: \cs{subref}.}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR@ref@ignorestar}{s m}{%
+ \LWR@origref{#2}%
+}
+% \end{macrocode}
+% \end{macro}
@@ -22975,26 +23605,43 @@ autopage-\theLWR@currentautosec%
-% Create a link with a text name:
-
-% \begin{macro}{\LWR@subhyperref} \marg{URL} \marg{text}
+% \begin{macro}{\LWR@subhyperref} \marg{URL}
+%
+% Starts a link for \cs{LWR@hrefb}.
+% A group must have been opened first, with nullified catcodes.
+% The text name is printed afterwards, after the group is closed and catcodes restored.
+%
% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.}
% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
+% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@subhyperref}{m +m}{%
+\NewDocumentCommand{\LWR@subhyperref}{m}{%
\LWR@traceinfo{LWR@subhyperref !#1!}%
\LWR@sanitize{#1}%
\LWR@htmltag{%
a href="\LWR@sanitized" %
target="\_{}blank"\LWR@orignewline%
}%
-#2%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@subhyperreftext} \marg{text}
+%
+% Finishes the hyperref for \cs{LWR@hrefb}. Catcodes must have been restored already.
+% To be used after \cs{LWR@subhyperref}, and after its group has been closed.
+%
+% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
+% \begin{macrocode}
+\newcommand{\LWR@subhyperreftext}[1]{%
+#1%
\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\LWR@subhyperrefclass} \marg{URL} \marg{text} \marg{htmlclass}
% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.}
% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
@@ -23015,18 +23662,20 @@ autopage-\theLWR@currentautosec%
-% \begin{macro}{\href} \oarg{options} \marg{URL} \marg{text}
+% \begin{macro}{\href} \oarg{options} \marg{URL}
%
% Create a link with accompanying text:
%
% \changes{v0.43}{2017/10/31}{Made robust.}
% \changes{v0.49}{2018/02/18}{Fix: Adapt to classes.}
% \changes{v0.52}{2018/03/26}{Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \acro{URL}.}
+% \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
% \begin{macrocode}
-\DeclareDocumentCommand{\LWR@hrefb}{O{} m +m}{%
+\DeclareDocumentCommand{\LWR@hrefb}{O{} m}{%
\LWR@ensuredoingapar%
-\LWR@subhyperref{#2}{#3}%
-\endgroup%
+\LWR@subhyperref{#2}%
+\endgroup% restore catcodes
+\LWR@subhyperreftext%
}
\newrobustcmd*{\href}{%
@@ -23197,11 +23846,19 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\LWR@origraggedright%
% \end{macrocode}
-% Open an \HTML\ |figure| tag:
+% Open an \HTML\ |figure| tag.
+% The figure is assigned a \attribute{class} equal to its type,
+% and another class according to the \pkg{float} package style, if used.
+% Note that \cs{csuse} returns an empty string if \cs{LWR@floatstyle@<type>}
+% is note defined.
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add a text frame.}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
+% \changes{v0.56}{2018/05/14}{Adds a \element{class} per \pkg{float} package style.}
% \begin{macrocode}
-\LWR@htmltag{figure id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}" class="#1"}%
+\LWR@htmltag{%
+ figure id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" % space
+ class="#1 \csuse{LWR@floatstyle@#1}"%
+}%
\ifbool{FormatWP}{%
\LWR@orignewline%
\LWR@BlockClassWP{}{}{wp#1}%
@@ -23336,7 +23993,7 @@ autopage-\theLWR@currentautosec%
{
\ifbool{LWR@freezethisautoid}{}{%
\addtocounter{LWR@thisautoid}{1}%
- \LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}%
+ \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}%
\LWR@htmltag{/a}%
}%
}
@@ -23475,7 +24132,7 @@ autopage-\theLWR@currentautosec%
\LWR@htmlblocktag{figcaption}%
\ifbool{FormatWP}{%
\begin{BlockClass}[font-style:italic]{italic}
-\LWR@origvspace*{\baselineskip}
+\LWR@print@vspace*{\baselineskip}
}{}%
\LWR@traceinfo{LWR@figcaption env start: done}%
}
@@ -23497,7 +24154,8 @@ autopage-\theLWR@currentautosec%
}
% \end{macrocode}
-% \begin{macro}{\LWR@caption@begin}
+% \begin{macro}{\LWR@caption@begin} \marg{type}
+%
% Low-level patches to create \HTML\ tags for captions.
% \changes{v0.47}{2018/01/28}{Fix: Argument passed to \cs{LWR@origcaption@begin}.}
% \begin{macrocode}
@@ -23573,7 +24231,7 @@ autopage-\theLWR@currentautosec%
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
\bgroup
\@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
{\egroup\LWR@LT@captionlistentry}}%
@@ -23855,8 +24513,13 @@ autopage-\theLWR@currentautosec%
% Emulate the \cs{listof} command from the \pkg{float} package (\cref{sec:newfloat}).
% Used to create lists of custom float types. Also used to redefine
% the standard \LaTeX{} \cs{listoffigures} and \cs{listoftables} commands.
+%
+% \changes{v0.57}{2018/05/26}{Fix: Provide \cs{l@name} if not defined.}
% \begin{macrocode}
\NewDocumentCommand{\listof}{m +m}{%
+\@ifundefined{l@#1}{%
+ \csdef{l@#1}[2]{\hypertocfloat{1}{#1}{\csuse{ext@#1}}{##1}{##2}}%
+}{}%
\LWR@subtableofcontents{\@nameuse{ext@#1}}{#2}
\expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname
\immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname
@@ -24003,7 +24666,7 @@ autopage-\theLWR@currentautosec%
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\LWR@origpound\LWR@origmbox{autosec-#4}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\LWR@origpound\LWR@print@mbox{autosec-#4}%
}{#3}{toc#2}%
\LWR@stoppars%
}%
@@ -24068,7 +24731,7 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\LWR@subhyperrefclass{%
\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
- \LWR@origpound\LWR@origmbox{autoid-\arabic{LWR@nextautoid}}}%
+ \LWR@origpound\LWR@print@mbox{autoid-\arabic{LWR@nextautoid}}}%
{#4}{toc#2}%
\LWR@stoppars%
}{}%
@@ -24380,21 +25043,17 @@ autopage-\theLWR@currentautosec%
-
% \section{Restoring original formatting}
%
-%
-% \codehtml
-% \begin{macrocode}
-\begin{warpHTML}
-% \end{macrocode}
-%
-%
-%
% \begin{macro}{\LWR@restoreorigformatting}
% Used to temporarily restore
% the print-mode meaning of a number of formatting, graphics, and symbols-related
% macros while generating \SVG\ math or a \env{lateximage}.
+%
+% Must be used inside a group.
+%
+% Sets \cs{LWR@formatting} to |print| until the end of the group.
+%
% A number of packages will \cs{appto} additional actions to this macro.
%
% Various packages add to this macro using \cs{appto}.
@@ -24408,10 +25067,16 @@ autopage-\theLWR@currentautosec%
% \changes{v0.40}{2017/09/09}{Improved symbols inside a \env{lateximage}.}
% \changes{v0.40}{2017/09/09}{Improved \protect\LaTeX\ logos inside a \env{lateximage}.}
% \changes{v0.40}{2017/09/09}{Nullified \cs{InlineClass}, etc. inside a \env{lateximage}.}
-%
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
% \begin{macrocode}
\newcommand*{\LWR@restoreorigformatting}{%
\LWR@traceinfo{LWR@restoreorigformatting}%
+\renewcommand*{\LWR@formatting}{print}%
\linespread{1}%
% \end{macrocode}
%
@@ -24423,7 +25088,7 @@ autopage-\theLWR@currentautosec%
%
% \changes{v0.43}{2017/10/31}{Fix: \cs{ref} in math or lateximage.}
% \begin{macrocode}
-\LetLtxMacro\ref\LWR@origref%{} syntax highlighting
+\LetLtxMacro\ref\LWR@origref% {} syntax highlighting
% \end{macrocode}
% \changes{v0.48}{2018/02/04}{Fix: Font sizes in \SVG\ math, \env{lateximage}, \tikz.}
% \begin{macrocode}
@@ -24439,19 +25104,14 @@ autopage-\theLWR@currentautosec%
\let\Huge\LWR@origHuge%
% \end{macrocode}
% \begin{macrocode}
-\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
-\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
-\renewcommand{\BlockClassSingle}[2]{##2}%
-\LetLtxMacro\hspace\LWR@orighspace%
+\LWR@select@print@hspace%
% \end{macrocode}
% \changes{v0.48}{2018/02/04}{Fix: Spacing in \SVG\ math, \env{lateximage}, \tikz.}
% \begin{macrocode}
\LetLtxMacro\hfill\LWR@orighfill%
\LetLtxMacro\hfil\LWR@orighfil%
-\LetLtxMacro\rule\LWR@origrule%
\LetLtxMacro\hrulefill\LWR@orighrulefill%
\LetLtxMacro\dotfill\LWR@origdotfill%
-\let\vspace\LWR@origvspace%
\let\hss\LWR@orighss%
\let\llap\LWR@origllap%
\let\rlap\LWR@origrlap%
@@ -24469,28 +25129,28 @@ autopage-\theLWR@currentautosec%
\let\textellipsis\LWR@origtextellipsis%
\let\textless\LWR@origtextless%
\let\textgreater\LWR@origtextgreater%
-\LetLtxMacro{\textrm}{\LWR@origtextrm}%
-\LetLtxMacro{\textsf}{\LWR@origtextsf}%
-\LetLtxMacro{\texttt}{\LWR@origtexttt}%
-\LetLtxMacro{\textbf}{\LWR@origtextbf}%
-\LetLtxMacro{\textmd}{\LWR@origtextmd}%
-\LetLtxMacro{\textit}{\LWR@origtextit}%
-\LetLtxMacro{\textsl}{\LWR@origtextsl}%
-\LetLtxMacro{\textsc}{\LWR@origtextsc}%
-\LetLtxMacro{\textup}{\LWR@origtextup}%
-\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
-\LetLtxMacro{\emph}{\LWR@origemph}%
-\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
-\LetLtxMacro{\upshape}{\LWR@origupshape}%
-\LetLtxMacro{\slshape}{\LWR@origslshape}%
-\LetLtxMacro{\scshape}{\LWR@origscshape}%
-\LetLtxMacro{\itshape}{\LWR@origitshape}%
-\LetLtxMacro{\em}{\LWR@origem}%
-\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
+\LetLtxMacro\textrm\LWR@origtextrm%
+\LetLtxMacro\textsf\LWR@origtextsf%
+\LetLtxMacro\texttt\LWR@origtexttt%
+\LetLtxMacro\textbf\LWR@origtextbf%
+\LetLtxMacro\textmd\LWR@origtextmd%
+\LetLtxMacro\textit\LWR@origtextit%
+\LetLtxMacro\textsl\LWR@origtextsl%
+\LetLtxMacro\textsc\LWR@origtextsc%
+\LetLtxMacro\textup\LWR@origtextup%
+\LetLtxMacro\textnormal\LWR@origtextnormal%
+\LetLtxMacro\emph\LWR@origemph%
+\LetLtxMacro\rmfamily\LWR@origrmfamily%
+\LetLtxMacro\sffamily\LWR@origsffamily%
+\LetLtxMacro\ttfamily\LWR@origttfamily%
+\LetLtxMacro\bfseries\LWR@origbfseries%
+\LetLtxMacro\mdseries\LWR@origmdseries%
+\LetLtxMacro\upshape\LWR@origupshape%
+\LetLtxMacro\slshape\LWR@origslshape%
+\LetLtxMacro\scshape\LWR@origscshape%
+\LetLtxMacro\itshape\LWR@origitshape%
+\LetLtxMacro\em\LWR@origem%
+\LetLtxMacro\normalfont\LWR@orignormalfont%
\let\sp\LWR@origsp%
\let\sb\LWR@origsb%
\LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
@@ -24506,35 +25166,8 @@ autopage-\theLWR@currentautosec%
\LetLtxMacro\endtabular\LWR@origendtabular%
\LetLtxMacro\noalign\LWR@orignoalign%
\LetLtxMacro\hline\LWR@orighline%
-\LetLtxMacro\toprule\LWR@origtoprule%
-\LetLtxMacro\midrule\LWR@origmidrule%
-\LetLtxMacro\cmidrule\LWR@origcmidrule%
-\LetLtxMacro\bottomrule\LWR@origbottomrule%
-\LetLtxMacro\addlinespace\LWR@origaddlinespace%
-\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
-\LetLtxMacro\specialrule\LWR@origspecialrule%
\let\newline\LWR@orignewline%
-\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
\LetLtxMacro\includegraphics\LWR@origincludegraphics%
-\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
-\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
-\let\reflectbox\LWR@origreflectbox%
-\LetLtxMacro\resizebox\LWR@origresizebox%
-\let\framebox\LWR@origframebox%
-% \end{macrocode}
-% \changes{v0.48}{2018/02/05}{Fix: \cs{mbox} in \SVG\ math, \env{lateximage}, \tikz.}
-% \begin{macrocode}
-\LetLtxMacro\mbox\LWR@origmbox%
-% \end{macrocode}
-% \begin{macrocode}
-\LetLtxMacro\makebox\LWR@origmakebox%
-\let\fbox\LWRprint@fbox%
-\let\fboxBlock\LWRprint@fbox%
-\LetLtxMacro\fminipage\LWRprint@fminipage%
-\LetLtxMacro\endfminipage\endLWRprint@fminipage%
-\LetLtxMacro\minipage\LWR@origminipage%
-\let\endminipage\LWR@origendminipage%
-\LetLtxMacro\parbox\LWR@origparbox%
\let\TeX\LWR@origTeX%
\let\LaTeX\LWR@origLaTeX%
\let\LaTeXe\LWR@origLaTeXe%
@@ -24567,21 +25200,56 @@ autopage-\theLWR@currentautosec%
%
% \limitsmath
%
+% \subsubsection{Catcode changes}
+% \limitsmathcatcode
+%
+% \subsubsection{Dynamic math}
+% \limitsmathdynamic
+%
% \subsubsection{Display math}
%
% \describedisplaymathother
+
+
+% \subsection{HTML \attribute{alt} tag names}
%
+% Redefinable names for the \HTML\ \attribute{alt} tags,
+% for translation according to the reader's native language.
%
-%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \begin{macro}{\mathimagename} The \HTML\ \attribute{alt} tag for
+% an \SVG\ math image. \\
+% \DescribeDefault{``math image''}
+% \changes{v0.57}{2018/05/22}{Added.}
+% \begin{macrocode}
+\newcommand*{\mathimagename}{math image}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\packagediagramname} 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.}
+% \begin{macrocode}
+\newcommand*{\packagediagramname}{diagram}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
% \subsection{Inline and display math}
%
-%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
-
-
%
% \DescribeCounter{LWR@externalfilecnt}
% Counter for the external files which are generated and then referenced from the \HTML:
@@ -24719,25 +25387,29 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
% 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)|''.
+% \cs{ensuremath} forces the \attribute{alt} tag to ``|(math image)|'', as
+% translated according to \cs{mathimagename}.
% If this is the case, force the use of a \env{lateximage} even if MathJax.
% Likewise for \pkg{siunitx} if |parse-numbers=false|.
%
% If MathJax, or if formatting math for a word processor, and not \cs{ensuredmath},
-% print the math expression.
+% and not a dynamic math expression, print the math expression:
% \changes{v0.51}{2018/03/11}{Fix: \cs{ensuredmath} inside \SVG\ image.}
+% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
% \begin{macrocode}
\ifboolexpr{%
(
bool{mathjax} or
( bool{FormatWP} and bool{WPMarkMath} )
) and
- ( not test { \ifstrequal {#2} {(math image)} } )% from \ensuredmath
+ ( not test { \ifstrequal {#2} {(\mathimagename)} } ) and % from \ensuredmath
+ ( not bool{LWR@dynamicmath} )
}%
% \end{macrocode}
% For \brand{MathJax}, print the math between |\(| and |\)|:
% \begin{macrocode}
{%
+ \LWR@traceinfo{LWR@subsingledollar: Mathjax}%
{\textbackslash(\LWR@HTMLsanitize{#4}\textbackslash)}%
}% mathjax
% \end{macrocode}
@@ -24746,7 +25418,7 @@ autopage-\theLWR@currentautosec%
% and a \CSS\ style to control the baseline adjustment.
% \begin{macrocode}
{% not mathjax
-\LWR@traceinfo{LWR@subsingledollar: not mathjax}%
+\LWR@traceinfo{LWR@subsingledollar: NOT mathjax, or is ensuremath, or is dynamic}%
% \end{macrocode}
% Measure the depth, width, and height of the math image:
% \changes{v0.51}{2018/03/04}{Fix: SVG math with enclosed \env{lateximage}.}
@@ -24775,11 +25447,36 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\global\advance\c@LWR@lateximagedepth 1\relax%
% \end{macrocode}
-% Typeset and save the contents:
+% Typeset and save the contents, depending on how they were generated:
+% \begin{description}
+% \item [SVG math:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [SVG math \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [SVG dynamic math:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [Mathjax:] Argument \#4 is the contents of the math expression
+% without \cs{LWR@origensuredmath}. This case is handled above.
+% \item [Mathjax \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [Mathjax dynamic math:] Argument \#4 is the contents of the math expression
+% without \cs{LWR@origensuredmath}, so \cs{LWR@origensuredmath} is added below.\
+% \item [\cs{ifmmode}:] Included ``just in case''.
+% \end{description}
+%
% \changes{v0.51}{2018/03/07}{Fix: \env{lateximage} inside \AmS\ \cs{text}.}
% \changes{v0.51}{2018/03/12}{Typeset \SVG\ math only once during measurement.}
+% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
% \begin{macrocode}
- \global\sbox{\LWR@singledollarbox}{#4}%
+ \ifmmode%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ \else%
+ \ifbool{LWR@dynamicmath}{%
+ \ifbool{mathjax}{%
+ \global\sbox{\LWR@singledollarbox}{\LWR@origensuredmath{#4}}%
+ }{%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ }%
+ }{%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ }%
+ \fi%
% \end{macrocode}
% Add a small and almost transparent marker at the depth of the image.
%
@@ -24875,7 +25572,7 @@ autopage-\theLWR@currentautosec%
\ifdimgreater{\LWR@singledollardepth}{0.05ex}{%
\def\LWR@singledollardepthstyle{%
\ ; % extra space
- \LWR@origmbox{%
+ \LWR@print@mbox{%
vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em%
} % extra space
}%
@@ -24888,24 +25585,34 @@ autopage-\theLWR@currentautosec%
% The star causes \env{lateximage} to use an MD5 hash as the filename.
% 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.}
% \begin{macrocode}
- \IfValueTF{#1}{%
- \LWR@findcurrenttextcolor% sets \LWR@tempcolor
- \begin{lateximage}*% use hashing
- [#2]% alt
- [% addl' hashing
- #3%
- FM\LWR@f@family%
- SR\LWR@f@series%
- SH\LWR@f@shape%
- CL\LWR@tempcolor%
- ]%
- [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
- }{%
+ \ifbool{LWR@dynamicmath}{%
+ \LWR@traceinfo{subsingledollar: dynamic}%
\begin{lateximage}% no hashing
- [#2]% alt
+ [(\mathimagename)]% alt tag
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ }{%
+ \LWR@traceinfo{subsingledollar: static}%
+ \IfValueTF{#1}{%
+ \LWR@findcurrenttextcolor% sets \LWR@tempcolor
+ \begin{lateximage}*% use hashing
+ [#2]% alt
+ [% addl' hashing
+ #3%
+ FM\LWR@f@family%
+ SR\LWR@f@series%
+ SH\LWR@f@shape%
+ CL\LWR@tempcolor%
+ ]%
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ }{%
+ \begin{lateximage}% no hashing
+ [#2]% alt
+ []% no add'l hashing
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ }%
}%
% \end{macrocode}
% Place small and almost transparent markers on the baseline
@@ -25081,7 +25788,7 @@ autopage-\theLWR@currentautosec%
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
- \LWR@subsingledollar*{(math image)}{%
+ \LWR@subsingledollar*{(\mathimagename)}{%
\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{\relax%
\LWR@origensuredmath{#1}%
@@ -25100,7 +25807,7 @@ autopage-\theLWR@currentautosec%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{\LWR@origensuredmath{#1}}%
{%
- \LWR@subsingledollar*{(math image)}{%
+ \LWR@subsingledollar*{(\mathimagename)}{%
\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{%
\LWR@origensuredmath{#1}%
@@ -26169,9 +26876,20 @@ autopage-\theLWR@currentautosec%
% at a later time. The label is declared along with the image, and so it correctly remembers
% where the image finally ended up.
%
+% The \HTML\ \attribute{alt} tag is set to the \LaTeX\ source for \SVG\ math,
+% \margintag{\HTML\ \attribute{alt} tag}
+% some chemistry expressions, and perhaps some other expressions which make sense
+% for text copy/paste. In some other cases, the \attribute{alt} tag is set
+% according to the package name.
+%
+% \describemathimagename
+%
+% \describepackagediagramname
+%
% \limitslateximagefontsize
%
%
+%
% \subsection{Support counters and macros}
%
% \codehtml
@@ -26458,7 +27176,7 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
-% \subsection{HTML \element{alt} tags}
+% \subsection{HTML \attribute{alt} tags}
% \begin{macro}{\LWR@amsmathbody} \marg{envname} \qquad
% For use inside the optional argument to a \env{lateximage}
@@ -26495,7 +27213,7 @@ autopage-\theLWR@currentautosec%
% \end{macro}
-% \subsection{\env{lateximage}}
+% \subsection{\env{lateximage} environment}
% \begin{environment}{lateximage} * \oarg{2: \element{alt} tag}
% \oarg{3: add'l hashing} \oarg{4: CSS style}
@@ -26646,7 +27364,7 @@ autopage-\theLWR@currentautosec%
% Typeset the image in a ``standard'' width page and font size:
% \begin{macrocode}
\LWR@traceinfo{lateximage: about to create minipage}%
- \LWR@origminipage{6in}%
+ \LWR@print@minipage{6in}%
\csuse{LWR@orig\LateximageFontSizeName}%
% \end{macrocode}
% Temporarily restore formatting to its \PDF\ definitions:
@@ -26726,13 +27444,13 @@ autopage-\theLWR@currentautosec%
% Finish the lateximage minipage and start a new \PDF\ page:
% \begin{macrocode}
\LWR@traceinfo{lateximage: ending outer-most lateximage}%
- \LWR@origendminipage%
+ \endLWR@print@minipage%
\LWR@orignewpage%
\LWR@origscriptsize%
% \end{macrocode}
% Close the \HTML\ comment which encapsulated any traces of the lateximage picked up by \prog{pdftotext}:
% \begin{macrocode}
- \LWR@origvspace*{.5\baselineskip}%
+ \LWR@print@vspace*{.5\baselineskip}%
\LWR@htmlclosecomment%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
% \end{macrocode}
@@ -26745,14 +27463,14 @@ autopage-\theLWR@currentautosec%
\LWR@subinlineimage[#2]{lateximage}%
{%
lateximages\OSPathSymbol%
- \LWR@origmbox{\LWR@hashedname}%
+ \LWR@print@mbox{\LWR@hashedname}%
}{svg}{#4}%
}% hash
{% no hash
\LWR@subinlineimage[#2]{lateximage}%
{%
lateximages\OSPathSymbol%
- \LWR@origmbox{lateximage-\theLWR@externalfilecnt}%
+ \LWR@print@mbox{lateximage-\theLWR@externalfilecnt}%
}{svg}{#4}%
}% no hash
% \end{macrocode}
@@ -26820,7 +27538,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\LWR@origmbox{text-align:center}]{center}}
+{\BlockClass[\LWR@print@mbox{text-align:center}]{center}}
{\BlockClass{center}}
}
{\endBlockClass}
@@ -26835,7 +27553,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\LWR@origmbox{text-align:right}]{flushright}}
+{\BlockClass[\LWR@print@mbox{text-align:right}]{flushright}}
{\BlockClass{flushright}}
}
{\endBlockClass}
@@ -26849,7 +27567,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\LWR@origmbox{text-align:left}]{flushleft}}
+{\BlockClass[\LWR@print@mbox{text-align:left}]{flushleft}}
{\BlockClass{flushleft}}
}
{\endBlockClass}
@@ -27082,6 +27800,8 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{patching xcolor}
% \end{macrocode}
%
+%
+% The print version:
% \begin{macro}{\colorboxBlock}
% \cs{colorboxBlock} is the same as \cs{colorbox}:
% \begin{macrocode}
@@ -27091,14 +27811,9 @@ autopage-\theLWR@currentautosec%
%
%
%
-% In \HTML\ mode, the following is done when \pkg{xcolor} is loaded.
-% Following is the print-mode action:
+% The original definition is reused by the new versions:
% \begin{macrocode}
-\warpprintonly{
-\LetLtxMacro\LWRprint@colorboxBlock\colorbox
-\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
-\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
-}
+\LetLtxMacro\LWR@orig@print@fcolorbox\fcolorbox
% \end{macrocode}
% \begin{macro}{\fcolorbox}
@@ -27111,8 +27826,8 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newsavebox{\LWR@colorminipagebox}
-\DeclareDocumentCommand{\LWRprint@fcolorbox}{o m o m +m}{%
-\LWR@traceinfo{LWRprint@fcolorbox #2 #4}%
+\NewDocumentCommand{\LWR@print@fcolorbox}{o m o m +m}{%
+\LWR@traceinfo{LWR@print@fcolorbox #2 #4}%
% \end{macrocode}
% Pre-load the contents into an LR box so that they can
% be used inside a \cs{fcolorbox}:
@@ -27144,17 +27859,19 @@ autopage-\theLWR@currentautosec%
\IfValueTF{#1}%
{%
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}%
{% no value #1
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}% no value #1
}% #4 not none
-\LWR@traceinfo{LWRprint@fcolorbox done}%
+\LWR@traceinfo{LWR@print@fcolorbox done}%
}
+
+\renewcommand*{\fcolorbox}{\LWR@print@fcolorbox}
% \end{macrocode}
% \end{macro}
%
@@ -27164,17 +27881,19 @@ autopage-\theLWR@currentautosec%
%
% In print mode, \cs{fcolorboxBlock} is the same as \cs{fcolorbox}.
% \begin{macrocode}
-\LetLtxMacro\LWRprint@fcolorboxBlock\LWRprint@fcolorbox
+\newcommand*{\LWR@print@fcolorboxBlock}{\LWR@print@fcolorbox}
+\newcommand*{\fcolorboxBlock}{\LWR@print@fcolorboxBlock}
% \end{macrocode}
% \end{macro}
+
% \begin{environment}{fcolorminipage}
% \oarg{1:framemodel} \marg{2:framecolor} \oarg{3:boxmodel} \marg{4:boxcolor}
% \oarg{5:align} \oarg{6:height} \oarg{7:inner-align} \marg{8:width}
%
% In print mode, becomes a \cs{fcolorbox} containing a \env{minipage}:
% \begin{macrocode}
-\NewDocumentEnvironment{LWRprint@fcolorminipage}{o m o m O{c} O{} o m}
+\NewDocumentEnvironment{LWR@print@fcolorminipage}{o m o m O{c} O{} o m}
{%
\LWR@traceinfo{*** fcolorminipage: #2 #4 #8}%
% \end{macrocode}
@@ -27215,44 +27934,25 @@ autopage-\theLWR@currentautosec%
\IfValueTF{#1}%
{%
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}%
{% no value #1
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}% no value #1
}% #4 not none
\LWR@traceinfo{*** finished end fcolorminipage}%
}
+
+\newenvironment*{fcolorminipage}
+ {\LWR@print@fcolorminipage}
+ {\endLWR@print@fcolorminipage}
% \end{macrocode}
% \end{environment}
-% \begin{macro}{\LWR@restoreorigprintxcolor}
-% Used to activate print-mode additions for \pkg{xcolor}.
-% In print mode, this is used immediately following.
-% In \HTML\ mode, this is used inside a \env{lateximage}.
-% \begin{macrocode}
-\newcommand*{\LWR@restoreorigprintxcolor}{%
-\LWR@traceinfo{LWR@restoreorigprintxcolor}%
-\LetLtxMacro\colorboxBlock\LWRprint@colorboxBlock%
-\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
-\LetLtxMacro\fcolorboxBlock\LWRprint@fcolorboxBlock%
-\LetLtxMacro\fcolorminipage\LWRprint@fcolorminipage%
-\LetLtxMacro\endfcolorminipage\endLWRprint@fcolorminipage%
-}
-
-\appto\LWR@restoreorigformatting{%
-\LWR@restoreorigprintxcolor%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% If print mode, immediately activate the print-mode enhancements for \pkg{xcolor}:
% \begin{macrocode}
-\warpprintonly{\LWR@restoreorigprintxcolor}
-
\LWR@traceinfo{xcolor patches done}
}{}% xcolor loaded
}% AtBeginDocument
@@ -27388,7 +28088,7 @@ autopage-\theLWR@currentautosec%
\renewcommand*{\@@@setcref}[2]{#1{\ref{#2}}{}{}}
}{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\cref\space will fail.
}%
}
@@ -27415,7 +28115,7 @@ autopage-\theLWR@currentautosec%
}
}{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\crefrange\space will fail.
}
}
@@ -27462,7 +28162,7 @@ autopage-\theLWR@currentautosec%
}
{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\cpageref\space will fail.
}
}
@@ -27500,7 +28200,7 @@ autopage-\theLWR@currentautosec%
}
{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\cpagerefrange\space will fail.
}
}
@@ -27637,7 +28337,6 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
%
% \codehtml
-%
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
@@ -27657,6 +28356,7 @@ autopage-\theLWR@currentautosec%
% \begin{environment}{minipage} \oarg{vert position} \oarg{height}
% \oarg{inner vert position} \marg{width}
% \changes{v0.18}{2016/05/17}{Fix: \cs{linewidth}, \cs{textwidth}, \cs{textheight} inside a minipage.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
%
% The vertical positions may be 'c', 't', or 'b'.
% The inner position may also be 's'.
@@ -27665,7 +28365,7 @@ autopage-\theLWR@currentautosec%
% 6\texttimes{}9 inch text area.
%
% \begin{macrocode}
-\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
+\NewDocumentEnvironment{LWR@HTML@minipage}{O{t} o O{t} m}
{%
\LWR@traceinfo{minipage}%
% \end{macrocode}
@@ -27720,7 +28420,10 @@ autopage-\theLWR@currentautosec%
\ifbool{FormatWP}{%
\addtocounter{LWR@thisautoidWP}{1}%
-\LWR@htmltag{div id="\LWR@origmbox{autoidWP-\arabic{LWR@thisautoidWP}}" class="wpminipage"}%
+\LWR@htmltag{%
+ div id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}" %
+ class="wpminipage"%
+}%
}{}%
% \end{macrocode}
@@ -27729,13 +28432,13 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\LWR@traceinfo{minipage: creating div class}%
\LWR@htmltag{div class="minipage" style="%
-\ifthenelse{\equal{#1}{t}}{\LWR@origmbox{vertical-align:bottom} ; }{}%
-\ifthenelse{\equal{#1}{c}}{\LWR@origmbox{vertical-align:middle} ; }{}%
-\ifthenelse{\equal{#1}{b}}{\LWR@origmbox{vertical-align:top} ; }{}%
-\ifthenelse{\equal{#3}{t}}{\LWR@origmbox{justify-content:flex-start} ; }{}%
-\ifthenelse{\equal{#3}{c}}{\LWR@origmbox{justify-content:center} ; }{}%
-\ifthenelse{\equal{#3}{b}}{\LWR@origmbox{justify-content:flex-end} ; }{}%
-\ifthenelse{\equal{#3}{s}}{\LWR@origmbox{justify-content:space-between} ; }{}%
+\ifthenelse{\equal{#1}{t}}{\LWR@print@mbox{vertical-align:bottom} ; }{}%
+\ifthenelse{\equal{#1}{c}}{\LWR@print@mbox{vertical-align:middle} ; }{}%
+\ifthenelse{\equal{#1}{b}}{\LWR@print@mbox{vertical-align:top} ; }{}%
+\ifthenelse{\equal{#3}{t}}{\LWR@print@mbox{justify-content:flex-start} ; }{}%
+\ifthenelse{\equal{#3}{c}}{\LWR@print@mbox{justify-content:center} ; }{}%
+\ifthenelse{\equal{#3}{b}}{\LWR@print@mbox{justify-content:flex-end} ; }{}%
+\ifthenelse{\equal{#3}{s}}{\LWR@print@mbox{justify-content:space-between} ; }{}%
% \end{macrocode}
% Print the width and optional height styles:
% \begin{macrocode}
@@ -27826,6 +28529,8 @@ autopage-\theLWR@currentautosec%
\global\booltrue{LWR@minipagethispar}%
\LWR@traceinfo{LWR@minipage: done}%
}
+
+\LWR@formattedenv{minipage}
% \end{macrocode}
% \end{environment}
%
@@ -27834,17 +28539,23 @@ autopage-\theLWR@currentautosec%
%
% \codehtml
%
+% \null
+%
% \begin{macro}{\parbox} \oarg{pos} \oarg{height} \oarg{inner-pos} \marg{width} \marg{text}
%
% A parbox uses the minipage code:
+%
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
+\NewDocumentCommand{\LWR@HTML@parbox}{O{t} o O{t} m +m}
{
\LWR@traceinfo{parbox of width #4}%
\begin{minipage}[#1][#2][#3]{#4}%
#5
\end{minipage}%
}
+
+\LWR@formatted{parbox}
% \end{macrocode}
% \end{macro}
%
@@ -27853,8 +28564,11 @@ autopage-\theLWR@currentautosec%
% \begin{macro}{\mbox} \marg{text}
% \qquad Nullified for \HTML.
% \changes{v0.48}{2018/02/04}{Nullified for \HTML.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\renewcommand*{\mbox}[1]{#1}
+\newcommand*{\LWR@HTML@mbox}[1]{#1}
+
+\LWR@formatted{mbox}
% \end{macrocode}
% \end{macro}
%
@@ -27864,8 +28578,9 @@ autopage-\theLWR@currentautosec%
%
% \changes{v0.34}{2017/07/31}{Fix: Handles paren arg.}
% \changes{v0.36}{2017/08/15}{Fix: Handles width and horiz position.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\RenewDocumentCommand{\makebox}{d() o o m}{%
+\NewDocumentCommand{\LWR@HTML@makebox}{d() o o m}{%
% \end{macrocode}
% Check for the optional width:
% \begin{macrocode}
@@ -27890,8 +28605,8 @@ autopage-\theLWR@currentautosec%
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\InlineClass[%
- \LWR@origmbox{display:inline-block} ; %
- \LWR@origmbox{text-align}:\LWR@align\ ; %
+ \LWR@print@mbox{display:inline-block} ; %
+ \LWR@print@mbox{text-align}:\LWR@align\ ; %
width:\LWR@printlength{\LWR@tempwidth}%
]%
{makebox}%
@@ -27909,19 +28624,24 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
{#4}% no width
}
+
+\LWR@formatted{makebox}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\framebox} \oarg{width} \oarg{pos} \marg{text}
% \changes{v0.36}{2017/08/15}{Fix: Handles width and horiz position.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
%
% \begin{macrocode}
\LetLtxMacro\LWR@origframebox\framebox
-\RenewDocumentCommand{\framebox}{o o m}{%
+\NewDocumentCommand{\LWR@HTML@framebox}{o o m}{%
\fbox{\makebox[#1][#2]{#3}}%
}
+
+\LWR@formatted{framebox}
% \end{macrocode}
% \end{macro}
%
@@ -27962,22 +28682,16 @@ padding:\LWR@printlength{\fboxsep}%
% \end{macro}
%
%
-%
% \begin{macro}{\fbox} \marg{text}
%
% Creates a framed inline span enclosing the text.
%
% \changes{v0.36}{2017/08/10}{Fix: Uses \cs{fboxrule} and \cs{fboxsep}.}
%
-% Remember the print-mode version:
-% \begin{macrocode}
-\let\LWRprint@fbox\fbox
-% \end{macrocode}
-%
% Create a new \HTML\ version, but don't use it until after \pkg{xcolor}
% may have loaded:
% \begin{macrocode}
-\newcommand{\LWRhtml@fbox}[1]{%
+\newcommand{\LWR@HTML@fbox}[1]{%
\LWR@traceinfo{HTML fbox}%
\LWR@forceminwidth{\fboxrule}%
\InlineClass[%
@@ -27989,20 +28703,33 @@ padding:\LWR@printlength{\fboxsep}%
% and this must remain even for \HTML\ output while in a \env{lateximage},
% so \cs{fbox} is not modified until \cs{AtBeginDocument}:
% \begin{macrocode}
-\AtBeginDocument{\let\fbox\LWRhtml@fbox}
+\AtBeginDocument{\LWR@formatted{fbox}}
% \end{macrocode}
% \end{macro}
%
-
+%
% \begin{macro}{\fboxBlock} \marg{text}
% Creates a framed \HTML\ \element{div} of the text.
%
-% A print-output version is also supplied below.
+% First, a print-mode version.
+% This is newly defined for print mode, so it is defined inside \env{warpall}.
+%
+% \codeall
+% \begin{macrocode}
+\end{warpHTML}
+\begin{warpall}
+\let\fboxBlock\fbox
+\end{warpall}
+\begin{warpHTML}
+% \end{macrocode}
+% \codehtml
%
+% Next, an \HTML\ version:
% \changes{v0.34}{2017/07/31}{Added.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
%
% \begin{macrocode}
-\newcommand{\fboxBlock}[1]{%
+\newcommand{\LWR@HTML@fboxBlock}[1]{%
\LWR@forceminwidth{\fboxrule}%
\begin{BlockClass}[%
\LWR@blackborderpadding%
@@ -28010,75 +28737,29 @@ padding:\LWR@printlength{\fboxsep}%
#1
\end{BlockClass}
}
-% \end{macrocode}
-% \end{macro}
-% \begin{environment}{fminipage} \oarg{align} \oarg{height} \oarg{align} \marg{width}
-%
-% Creates a framed \HTML\ \element{div} around its contents.
-%
-% A print-output version is also supplied below.
-%
-% \changes{v0.34}{2017/07/31}{Added.}
-%
-% \begin{macrocode}
-\NewDocumentEnvironment{fminipage}{O{t} o O{t} m}
-{%
-\LWR@traceinfo{fminipage #1 #2 #3 #4}%
-\LWR@forceminwidth{\fboxrule}%
-\setlength{\LWR@tempwidth}{#4}%
-\IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}%
-\begin{BlockClass}[%
-\LWR@blackborderpadding ; %
-\IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }%
-width:\LWR@printlength{\LWR@tempwidth}%
-]{fminipage}%
-}
-{%
-\end{BlockClass}%
-\LWR@traceinfo{fminipage done}%
-}
-% \end{macrocode}
-% \end{environment}
-%
-%
-% \begin{macro}{\raisebox} \marg{raiselen} \oarg{height} \oarg{depth} \marg{text}
-% \begin{macrocode}
-\LetLtxMacro{\LWR@origraisebox}{\raisebox}
-
-\RenewDocumentCommand{\raisebox}{m o o m}{%
-#4%
-}
-% \end{macrocode}
-% \end{macro}
+\LWR@formatted{fboxBlock}
-% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
-
-
-
-% \codeall
-% \begin{macrocode}
-\begin{warpall}
-% \end{macrocode}
-%
+% \end{macro}
%
%
-% \env{LWRprint@fminipage} is defined inside \env{warpall}.
-% For print output, it is \cs{let} to \env{fminipage}.
-% For \HTML\ output, the \HTML\ version of \env{fminipage} is used instead,
-% but the print version is still available for use inside a \env{lateximage}.
+% \begin{environment}{fminipage} \oarg{align} \oarg{height} \oarg{align} \marg{width}
%
+% Creates a framed \HTML\ \element{div} around its contents.
+% \changes{v0.34}{2017/07/31}{Added.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
%
-% \begin{environment}{LWRprint@fminipage}
-% \oarg{1:align} \oarg{2:height} \oarg{3:inner-align} \marg{4:width}
+% Print version:
+% \codeall \\
%
-% Creates a frame around its contents.
% \begin{macrocode}
+\begin{warpall}
+
\newsavebox{\LWR@fminipagebox}
-\NewDocumentEnvironment{LWRprint@fminipage}{O{t} o O{t} m}
+\NewDocumentEnvironment{LWR@print@fminipage}{O{t} o O{t} m}
{%
% \end{macrocode}
% An outer minipage will be used for vertical alignment.
@@ -28122,53 +28803,64 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\endminipage%
}
-% \end{macrocode}
-% \end{environment}
+\newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage}
-% \begin{macrocode}
\end{warpall}
% \end{macrocode}
+% \HTML\ version:
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\NewDocumentEnvironment{LWR@HTML@fminipage}{O{t} o O{t} m}
+{%
+\LWR@traceinfo{fminipage #1 #2 #3 #4}%
+\LWR@forceminwidth{\fboxrule}%
+\setlength{\LWR@tempwidth}{#4}%
+\IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}%
+\begin{BlockClass}[%
+\LWR@blackborderpadding ; %
+\IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }%
+width:\LWR@printlength{\LWR@tempwidth}%
+]{fminipage}%
+}
+{%
+\end{BlockClass}%
+\LWR@traceinfo{fminipage done}%
+}
-% \codeprint
-% \begin{macrocode}
-\begin{warpprint}
+\LWR@formattedenv{fminipage}
% \end{macrocode}
+% \end{environment}
%
-%
-% For print output, the following are \cs{let} to become active.
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
%
%
-% \begin{macro}{\fboxBlock} \marg{text}
%
-% Creates a framed \HTML\ \element{div} around the text.
+% \begin{macro}{\raisebox} \marg{raiselen} \oarg{height} \oarg{depth} \marg{text}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\let\fboxBlock\fbox
-% \end{macrocode}
-% \end{macro}
+\begin{warpHTML}
+\NewDocumentCommand{\LWR@HTML@raisebox}{m o o m}{%
+#4%
+}
-% \begin{environment}{fminipage} \oarg{align} \oarg{height} \oarg{align} \marg{width}
-%
-% Creates a frame around its contents.
-% \begin{macrocode}
-\LetLtxMacro{\fminipage}{\LWRprint@fminipage}
-\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}
+\LWR@formatted{raisebox}
% \end{macrocode}
-% \end{environment}
+% \end{macro}
% \begin{macrocode}
-\end{warpprint}
+\end{warpHTML}
% \end{macrocode}
-
-
-
% \section{Direct formatting}
% \label{sec:directformatting}
%
@@ -28210,7 +28902,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}}
\DeclareRobustCommand{\LWR@nullemph}[1]{#1}
-\LetLtxMacro{\emph}{\LWR@HTMLemph}
+\LetLtxMacro\emph\LWR@HTMLemph
% \end{macrocode}
% \end{macro}
@@ -28222,7 +28914,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
}
\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1}
-\LetLtxMacro{\textmd}{\LWR@HTMLtextmd}
+\LetLtxMacro\textmd\LWR@HTMLtextmd
% \end{macrocode}
% \end{macro}
@@ -28231,7 +28923,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}}
\DeclareRobustCommand{\LWR@nulltextbf}[1]{#1}
-\LetLtxMacro{\textbf}{\LWR@HTMLtextbf}
+\LetLtxMacro\textbf\LWR@HTMLtextbf
% \end{macrocode}
% \end{macro}
@@ -28244,7 +28936,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
-\LetLtxMacro{\textrm}{\LWR@HTMLtextrm}
+\LetLtxMacro\textrm\LWR@HTMLtextrm
% \end{macrocode}
% \end{macro}
@@ -28255,7 +28947,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}%
}
\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
-\LetLtxMacro{\textsf}{\LWR@HTMLtextsf}
+\LetLtxMacro\textsf\LWR@HTMLtextsf
% \end{macrocode}
% \end{macro}
@@ -28263,7 +28955,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLtexttt}[1]{\LWR@htmlspan{kbd}{#1}}
\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1}
-\LetLtxMacro{\texttt}{\LWR@HTMLtexttt}
+\LetLtxMacro\texttt\LWR@HTMLtexttt
% \end{macrocode}
% \end{macro}
@@ -28276,7 +28968,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextup}[1]{#1}
-\LetLtxMacro{\textup}{\LWR@HTMLtextup}
+\LetLtxMacro\textup\LWR@HTMLtextup
% \end{macrocode}
% \end{macro}
@@ -28284,7 +28976,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLtextit}[1]{\LWR@htmlspan{i}{#1}}
\DeclareRobustCommand{\LWR@nulltextit}[1]{#1}
-\LetLtxMacro{\textit}{\LWR@HTMLtextit}
+\LetLtxMacro\textit\LWR@HTMLtextit
% \end{macrocode}
% \end{macro}
@@ -28296,7 +28988,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
-\LetLtxMacro{\textsc}{\LWR@HTMLtextsc}
+\LetLtxMacro\textsc\LWR@HTMLtextsc
% \end{macrocode}
% \end{macro}
@@ -28308,7 +29000,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
-\LetLtxMacro{\textsl}{\LWR@HTMLtextsl}
+\LetLtxMacro\textsl\LWR@HTMLtextsl
% \end{macrocode}
% \end{macro}
@@ -28318,7 +29010,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
\DeclareRobustCommand{\LWR@nulltextnormal}[1]{#1}
-\LetLtxMacro{\textnormal}{\LWR@HTMLtextnormal}
+\LetLtxMacro\textnormal\LWR@HTMLtextnormal
% \end{macrocode}
% \end{macro}
@@ -28353,28 +29045,28 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \changes{v0.48}{2018/02/04}{Fix: \cs{newline} in title.}
% \begin{macrocode}
\newcommand*{\LWR@nullfonts}{%
-\LetLtxMacro{\emph}{\LWR@nullemph}%
-\LetLtxMacro{\textmd}{\LWR@nulltextmd}%
-\LetLtxMacro{\textbf}{\LWR@nulltextbf}%
-\LetLtxMacro{\textrm}{\LWR@nulltextrm}%
-\LetLtxMacro{\textsf}{\LWR@nulltextsf}%
-\LetLtxMacro{\texttt}{\LWR@nulltexttt}%
-\LetLtxMacro{\textup}{\LWR@nulltextup}%
-\LetLtxMacro{\textit}{\LWR@nulltextit}%
-\LetLtxMacro{\textsc}{\LWR@nulltextsc}%
-\LetLtxMacro{\textsl}{\LWR@nulltextsl}%
-\LetLtxMacro{\textnormal}{\LWR@nulltextnormal}%
-\LetLtxMacro{\rmfamily}{\LWR@nullrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@nullsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@nullttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@nullbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@nullmdseries}%
-\LetLtxMacro{\upshape}{\LWR@nullupshape}%
-\LetLtxMacro{\slshape}{\LWR@nullslshape}%
-\LetLtxMacro{\scshape}{\LWR@nullscshape}%
-\LetLtxMacro{\itshape}{\LWR@nullitshape}%
-\LetLtxMacro{\em}{\LWR@nullem}%
-\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
+\LetLtxMacro\emph\LWR@nullemph%
+\LetLtxMacro\textmd\LWR@nulltextmd%
+\LetLtxMacro\textbf\LWR@nulltextbf%
+\LetLtxMacro\textrm\LWR@nulltextrm%
+\LetLtxMacro\textsf\LWR@nulltextsf%
+\LetLtxMacro\texttt\LWR@nulltexttt%
+\LetLtxMacro\textup\LWR@nulltextup%
+\LetLtxMacro\textit\LWR@nulltextit%
+\LetLtxMacro\textsc\LWR@nulltextsc%
+\LetLtxMacro\textsl\LWR@nulltextsl%
+\LetLtxMacro\textnormal\LWR@nulltextnormal%
+\LetLtxMacro\rmfamily\LWR@nullrmfamily%
+\LetLtxMacro\sffamily\LWR@nullsffamily%
+\LetLtxMacro\ttfamily\LWR@nullttfamily%
+\LetLtxMacro\bfseries\LWR@nullbfseries%
+\LetLtxMacro\mdseries\LWR@nullmdseries%
+\LetLtxMacro\upshape\LWR@nullupshape%
+\LetLtxMacro\slshape\LWR@nullslshape%
+\LetLtxMacro\scshape\LWR@nullscshape%
+\LetLtxMacro\itshape\LWR@nullitshape%
+\LetLtxMacro\em\LWR@nullem%
+\LetLtxMacro\normalfont\LWR@nullnormalfont%
% \end{macrocode}
% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
@@ -28876,7 +29568,9 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \end{macrocode}
%
-% \begin{macro}{\LWR@hspace} * \marg{length}
+% \begin{macro}{\LWR@select@html@hspace}
+%
+% \begin{macro}{\hspace} * \marg{length} * \marg{length}
%
% Handles special minipage \& horizontal space interactions.
% \changes{v0.18}{2016/05/13}{\cs{hspace} supported.}
@@ -28888,8 +29582,9 @@ width:\LWR@printlength{\LWR@tempwidth}%
%
% |\hspace{\fill}| is converted to |\hspace{2em}|, equal to \cs{qquad}.
% \begin{macrocode}
-\NewDocumentCommand{\LWR@hspace}{s m}{%
-\setlength{\LWR@tempwidth}{#2}%
+\newcommand{\LWR@select@html@hspace}{%
+\RenewDocumentCommand{\hspace}{s m}{%
+\setlength{\LWR@tempwidth}{##2}%
% \end{macrocode}
% If \cs{fill}, change to \cs{qquad}:
% \begin{macrocode}
@@ -28943,25 +29638,41 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\LWR@minipagestartpars%
}% width not 0
+}%
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\LWR@select@html@nohspace}
%
-% \begin{macro}{\LWR@nohspace} * \marg{length}
+% \begin{macro}{\hspace} * \marg{length}
%
% Used to disable \cs{hspace} while creating |description| \cs{item}s.
% \begin{macrocode}
-\NewDocumentCommand{\LWR@nohspace}{s m}{}
+\newcommand{\LWR@select@html@nohspace}{%
+ \RenewDocumentCommand{\hspace}{s m}{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\LWR@select@print@hspace}
+% \begin{macrocode}
+\newcommand*{\LWR@select@print@hspace}{%
+ \renewrobustcmd\hspace{\@ifstar\@hspacer\@hspace}%
+}
% \end{macrocode}
% \end{macro}
+
%
%
% \begin{macro}{\hspace} * \marg{length}
%
% Handles special minipage \& horizontal space interactions.
% \begin{macrocode}
-\LetLtxMacro\hspace\LWR@hspace
+\LWR@select@html@hspace
% \end{macrocode}
% \end{macro}
@@ -28969,19 +29680,17 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macro}{\LWR@vspace} * \marg{length} Nullified vspace.
%
% \changes{v0.33}{2017/06/21}{Add: \cs{vspace} nullified.}
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
%
% \begin{macrocode}
-\NewDocumentCommand{\LWR@vspace}{s m}{}
+\NewDocumentCommand{\LWR@HTML@vspace}{s m}{}
+
+\LWR@formatted{vspace}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\vspace} * \marg{length} Nullified.
-% \changes{v0.50}{2018/02/20}{Robustify macros.}
-% \begin{macrocode}
-\LetLtxMacro\vspace\LWR@vspace
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\linebreak} \oarg{num} \qquad
@@ -29030,7 +29739,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
%
%
%
-% \begin{macro}{\LWR@rule} \oarg{raise} \marg{width} \marg{height}
+% \begin{macro}{\rule} \oarg{raise} \marg{width} \marg{height}
%
% Handles special minipage \& horizontal space interactions.
%
@@ -29038,7 +29747,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
%
% \cs{fill} is zero-width, so |\hspace{\fill}| is ignored.
% \begin{macrocode}
-\NewDocumentCommand{\LWR@rule}{o m m}{%
+\newcommand*{\LWR@HTML@rule}[3][]{%
% \end{macrocode}
% The width is copied into a temporary \LaTeX\ length, from which
% comparisons and conversions may be made:
@@ -29077,7 +29786,9 @@ width:\LWR@printlength{\LWR@tempwidth}%
% Print the span with the converted width and height.
% The width and height are NOT rounded, since a height of
% less than 1pt is quite common in \LaTeX\ code.
+% \changes{v0.57}{2018/06/02}{Fix: Colored rules.}
% \begin{macrocode}
+ \LWR@findcurrenttextcolor%
\LWR@htmltagc{%
span
style="%
@@ -29100,7 +29811,8 @@ width:\LWR@printlength{\LWR@tempwidth}%
% limits the allowable syntax. To do:\ A superior method would compute a
% ratio of \LaTeX\ ex height, then print that to \HTML\ with an ex unit.
% \begin{macrocode}
- \IfValueT{#1}%
+ \ifblank{#1}%
+ {}%
{%
\setlength{\LWR@tempraise}{0pt-#1}%
\setlength{\LWR@tempraise}{\LWR@tempraise*2}%
@@ -29140,21 +29852,11 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LWR@minipagestartpars%
}% non-zero width
}
+
+\LWR@formatted{rule}
% \end{macrocode}
% \end{macro}
%
-%
-% \begin{macro}{\rule} \oarg{raise} \marg{width} \marg{height}
-%
-% Handles special minipage \& horizontal space interactions.
-%
-% \changes{v0.19}{2016/06/01}{Added}
-% \changes{v0.50}{2018/02/20}{Robustify macros.}
-% \begin{macrocode}
-\renewrobustcmd{\rule}{\LWR@rule}
-% \end{macrocode}
-% \end{macro}
-
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
@@ -29968,8 +30670,8 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \changes{v0.47}{2018/01/26}{\pkg{adjmulticol}: Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\BlockClass[%
-\LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
-\LWR@origmbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}%
+\LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
+\LWR@print@mbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}%
]{\LWR@mcolstype}%
}
{\endBlockClass}
@@ -30097,6 +30799,253 @@ width:\LWR@printlength{\LWR@tempwidth}%
%
%
%
+% \iffalse
+%<*algorithm2e>
+% \fi
+%
+% \part{lwarp-algorithm2e.sty}
+
+% \section{algorithm2e}
+%
+% \credits{Christophe Fiorio}
+%
+% \DescribePackage{algorithm2e}
+% \pkg{algorithm2e} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.57}{2018/05/20}{\pkg{algorithm2e}: Added.}
+%
+% For print output, captions are placed according to package options,
+% but for \HTML\ output captions are placed where used.
+% Therefore, to have captions appear at the top of the algorithms for both
+% print and \HTML, place each captions at the top of each algorithm.
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{algorithm2e}
+% \end{macrocode}
+
+% For the list-of entries:
+% \begin{macrocode}
+\renewcommand{\l@algocf}[2]{\hypertocfloat{1}{algocf}{loa}{#1}{#2}}
+% \end{macrocode}
+%
+%
+% Select the \pkg{lwarp} float style according to the \pkg{algorithm2e} style:
+% \begin{macrocode}
+\newcommand*{\LWR@floatstyle@algocf}{ruled}
+
+\ifdefstring{\algocf@style}{boxed}{%
+\renewcommand*{\LWR@floatstyle@algocf}{boxed}
+}{}
+
+\ifdefstring{\algocf@style}{boxruled}{%
+\renewcommand*{\LWR@floatstyle@algocf}{boxruled}
+}{}
+
+\ifdefstring{\algocf@style}{plain}{%
+\renewcommand*{\LWR@floatstyle@algocf}{plain}
+}{}
+% \end{macrocode}
+%
+%
+% Paragraph handling to allow line numbers under certain conditions:
+% \begin{macrocode}
+\newbool{LWR@algocf@dopars}
+\booltrue{LWR@algocf@dopars}
+
+\renewcommand{\algocf@everypar}{%
+\ifbool{LWR@algocf@dopars}{%
+ \ifbool{LWR@doingstartpars}{%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {%
+ \algocf@everyparnl\algocf@everyparhanging%
+ }%
+ }{}%
+}{}%
+}
+% \end{macrocode}
+%
+%
+% \pkg{lwarp} caption handling:
+% \begin{macrocode}
+\renewcommand{\algocf@makecaption}[2]{%
+\LWR@caption@begin{algocf}%
+\algocf@captiontext{#1}{#2}%
+\LWR@caption@end%
+}
+% \end{macrocode}
+%
+%
+% Print any caption where it is declared:
+% \begin{macrocode}
+\renewcommand{\algocf@makecaption@plain}[2]{%
+ \LWR@caption@begin{algocf}%
+ \algocf@captiontext{#1}{#2}%
+ \LWR@caption@end%
+}
+
+\renewcommand{\algocf@makecaption@boxed}[2]{%
+ \LWR@caption@begin{algocf}%
+ \algocf@captiontext{#1}{#2}%
+ \LWR@caption@end%
+}
+
+\renewcommand{\algocf@makecaption@ruled}[2]{%
+ \LWR@caption@begin{algocf}%
+ \algocf@captiontext{#1}{#2}%
+ \LWR@caption@end%
+}
+% \end{macrocode}
+%
+%
+% Turn off line numbering while making the caption:
+% \begin{macrocode}
+\long\def\algocf@latexcaption#1[#2]#3{% original definition of caption
+\boolfalse{LWR@algocf@dopars}% lwarp
+ \par%
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup%
+ \@parboxrestore%
+ \if@minipage%
+ \@setminipage%
+ \fi%
+ \normalsize%
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par%
+ \endgroup%
+\booltrue{LWR@algocf@dopars}% lwarp
+}
+% \end{macrocode}
+%
+%
+% Line numbers are printed in a \element{span} of class \attribute{alg2elinenumber}:
+% \begin{macrocode}
+\renewcommand{\algocf@printnl}[1]{%
+ \InlineClass{alg2elinenumber}{\NlSty{#1}}~%
+}%
+% \end{macrocode}
+%
+%
+% While initializing an algorithm environment,
+% locally declare the style of a regular figure to be the same as the algorithm style,
+% in case the \optn{figure} option was used.
+% \begin{macrocode}
+\preto\@algocf@init{%
+ \edef\LWR@floatstyle@figure{\LWR@floatstyle@algocf}%
+}
+% \end{macrocode}
+%
+%
+% For \pkg{lwarp}, the algorithm is not assembled inside a box,
+% since \env{lateximage}s would not work, so the captions are
+% printed where declared.
+% \begin{macrocode}
+\renewcommand{\@algocf@start}{%
+ \let\@mathsemicolon=\;\def\;{\ifmmode\@mathsemicolon\else\@endalgoln\fi}%
+% \raggedright%
+ \AlFnt{}%
+ \booltrue{LWR@algocf@dopars}% lwarp
+}
+
+\renewcommand{\@algocf@finish}{%
+ \boolfalse{LWR@algocf@dopars}% lwarp
+ \lineskip\normallineskip\setlength{\skiptotal}{\@defaultskiptotal}%
+ \let\;=\@mathsemicolon%
+ \let\]=\@emathdisplay%
+}
+% \end{macrocode}
+%
+%
+% Use an \HTML\ break:
+% \begin{macrocode}
+\renewcommand{\BlankLine}{%
+\LWR@stoppars%
+\LWR@htmltagc{br /}%
+\LWR@startpars%
+}
+% \end{macrocode}
+%
+%
+% Simplified for \HTML.
+% The paragraph handling must be preserved.
+% \begin{macrocode}
+\renewcommand{\SetKwInOut}[2]{%
+ \algocf@newcommand{#1}[1]{%
+ \ifthenelse{\boolean{algocf@hanginginout}}%
+ {\relax}%
+ {\algocf@seteveryparhanging{\relax}}%
+ \ifthenelse{\boolean{algocf@inoutnumbered}}%
+ {\relax}%
+ {\algocf@seteveryparnl{\relax}}%
+ {%
+ \KwSty{#2\algocf@typo:}%
+ ~##1\par%
+ }%
+ \algocf@linesnumbered% reset the numbering of the lines
+ \ifthenelse{\boolean{algocf@hanginginout}}%
+ {\relax}%
+ {\algocf@reseteveryparhanging}%
+ }%
+}%
+
+\renewcommand{\ResetInOut}[1]{}%
+% \end{macrocode}
+%
+%
+% Each of the following creates a \element{div} of a given class,
+% and turns off line numbering while creating the \element{div} tags:
+% \begin{macrocode}
+\renewcommand{\algocf@Vline}[1]{%
+\boolfalse{LWR@algocf@dopars}%
+\begin{BlockClass}{alg2evline}
+\booltrue{LWR@algocf@dopars}%
+#1
+\boolfalse{LWR@algocf@dopars}%
+\end{BlockClass}
+\booltrue{LWR@algocf@dopars}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand{\algocf@Vsline}[1]{%
+\boolfalse{LWR@algocf@dopars}%
+\begin{BlockClass}{alg2evsline}
+\booltrue{LWR@algocf@dopars}%
+#1
+\boolfalse{LWR@algocf@dopars}%
+\end{BlockClass}
+\booltrue{LWR@algocf@dopars}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand{\algocf@Noline}[1]{%
+\boolfalse{LWR@algocf@dopars}%
+\begin{BlockClass}{alg2enoline}
+\booltrue{LWR@algocf@dopars}%
+#1
+\boolfalse{LWR@algocf@dopars}%
+\end{BlockClass}
+\booltrue{LWR@algocf@dopars}%
+}
+% \end{macrocode}
+%
+%
+% The |[H]| environment is converted to a regular float, which in \HTML\
+% is placed where declared. Reusing the regular float allows the |[H]|
+% version to reuse the ruled and boxed options.
+% \begin{macrocode}
+\LetLtxMacro\algocf@Here\algocf
+\LetLtxMacro\endalgocf@Here\endalgocf
+% \end{macrocode}
+
+% \iffalse
+%</algorithm2e>
+% \fi
+%
+%
%
% \iffalse
%<*algorithmicx>
@@ -30883,7 +31832,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \end{macrocode}
% \begin{macrocode}
-\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(axopicture)]}
+\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(-axopicture-~\packagediagramname)]}
\AfterEndEnvironment{axopicture}{\end{lateximage}}
% \end{macrocode}
@@ -31027,6 +31976,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
% \changes{v0.39}{2017/08/31}{\pkg{bigdelim}: Added.}
% \changes{v0.40}{2017/09/09}{\pkg{bigdelim}: Improved documentation.}
+% \changes{v0.57}{2018/06/01}{\pkg{bigdelim}: Improved print/\HTML\ output selection.}
%
% \codehtml
%
@@ -31042,33 +31992,24 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LWR@ProvidesPackagePass{bigdelim}
% \end{macrocode}
%
-% Remember the print-mode versions:
-% \begin{macrocode}
-\LetLtxMacro\LWR@origldelim\ldelim
-\LetLtxMacro\LWR@origrdelim\rdelim
-% \end{macrocode}
%
% \marg{1:delimiter} \marg{2:\#rows} \marg{3:width} \oarg{4:text}
% \marginpar{\hfill\cs{ldelim}}\marginpar{\hfill\cs{rdelim}}
% \begin{macrocode}
-\RenewDocumentCommand{\ldelim}{m m m O{}}{%
+\NewDocumentCommand{\LWR@HTML@ldelim}{m m m O{}}{%
\renewcommand{\LWR@multirowborder}{right}%
\multirow{#2}{#3}{#4 \InlineClass{ldelim}{#1}}%
}
-\RenewDocumentCommand{\rdelim}{m m m O{}}{%
+\LWR@formatted{ldelim}
+
+\NewDocumentCommand{\LWR@HTML@rdelim}{m m m O{}}{%
\renewcommand{\LWR@multirowborder}{left}%
\multirow{#2}{#3}{\InlineClass{rdelim}{#1} #4}%
}
+
+\LWR@formatted{rdelim}
% \end{macrocode}
-% When entering a \env{lateximage}, restore the print-mode versions:
-% \begin{macrocode}
-\appto\LWR@restoreorigformatting{%
-\LetLtxMacro{\ldelim}{\LWR@origldelim}%
-\LetLtxMacro{\rdelim}{\LWR@origrdelim}%
-}
-% \end{macrocode}
-%
%
% \iffalse
%</bigdelim>
@@ -31106,7 +32047,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\renewcommand\bigstrut[1][x]{}
\appto\LWR@restoreorigformatting{%
-\LetLtxMacro{\bigstrut}{\LWR@origbigstrut}%
+\LetLtxMacro\bigstrut\LWR@origbigstrut%
}
% \end{macrocode}
%
@@ -31204,23 +32145,81 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
%
% \codehtml
+%
+% First, forget the placeholder macros:
% \begin{macrocode}
+\LetLtxMacro\toprule\relax
+\LetLtxMacro\midrule\relax
+\LetLtxMacro\cmidrule\cline
+\LetLtxMacro\bottomrule\relax
+\LetLtxMacro\addlinespace\relax
+\LetLtxMacro\morecmidrules\relax
+\LetLtxMacro\specialrule\relax
+
\LWR@ProvidesPackagePass{booktabs}
% \end{macrocode}
%
-% Booktabs emulation is spread among the tabular code.
-% The original definitions are saved here for use in \HTML\ \env{lateximage}s.
-% The \HTML\ versions temporarily overwrite these print versions
-% when \env{tabular} is started.
-%
+% \changes{v0.41}{2017/10/03}{Improved rules.}
+% \changes{v0.42}{2017/10/19}{If \progcode{FormatWP} force explicit border.}
% \begin{macrocode}
-\LetLtxMacro\LWR@origtoprule\toprule
-\LetLtxMacro\LWR@origmidrule\midrule
-\LetLtxMacro\LWR@origcmidrule\cmidrule
-\LetLtxMacro\LWR@origbottomrule\bottomrule
-\LetLtxMacro\LWR@origaddlinespace\addlinespace
-\LetLtxMacro\LWR@origmorecmidrules\morecmidrules
-\LetLtxMacro\LWR@origspecialrule\specialrule
+\DeclareDocumentCommand{\LWR@HTML@toprule}{o d()}%
+ {%
+ \IfValueTF{#1}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
+ \LWR@getmynexttoken}
+
+\LWR@expandableformatted{toprule}
+
+\DeclareDocumentCommand{\LWR@HTML@midrule}{o d()}%
+ {%
+ \IfValueTF{#1}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {\addtocounter{LWR@hlines}{1}}%
+ }%
+ \LWR@getmynexttoken}
+
+\LWR@expandableformatted{midrule}
+
+\DeclareDocumentCommand{\LWR@HTML@cmidrule}{O{\LWR@cmidrulewidth} d() m}{%
+ \LWR@docmidrule[#1](#2){#3}%
+ \LWR@getmynexttoken%
+}%
+
+\LWR@expandableformatted{cmidrule}
+
+\DeclareDocumentCommand{\LWR@HTML@bottomrule}{o d()}{%
+ \IfValueTF{#1}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
+ \LWR@getmynexttoken%
+}%
+
+\LWR@expandableformatted{bottomrule}
+
+\DeclareDocumentCommand{\LWR@HTML@addlinespace}{o}{}%
+
+\LWR@expandableformatted{addlinespace}
+
+\DeclareDocumentCommand{\LWR@HTML@morecmidrules}{}{}%
+
+\LWR@expandableformatted{morecmidrules}
+
+\DeclareDocumentCommand{\LWR@HTML@specialrule}{m m m d()}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}\LWR@getmynexttoken}%
+
+\LWR@expandableformatted{specialrule}
% \end{macrocode}
%
% \iffalse
@@ -31231,8 +32230,6 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
-%
-%
% \iffalse
%<*boxedminipage>
% \fi
@@ -31314,6 +32311,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \changes{v0.43}{2017/10/31}{\pkg{breakurl}: Added.}
% \changes{v0.45}{2017/12/29}{\pkg{breakurl}: Fix: Underscore in \acro{URL}.}
% \changes{v0.52}{2018/03/26}{\pkg{breakurl}: Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \acro{URL}.}
+% \changes{v0.57}{2018/06/05}{\pkg{breakurl}: Fix: Text catcodes.}
%
% \codehtml
%
@@ -31326,13 +32324,9 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
\LWR@ensuredoingapar%
-\def\LWR@templink{#2}%
-\@onelevel@sanitize\LWR@templink%
-\def\LWR@templinktwo{#3}%
-\@onelevel@sanitize\LWR@templinktwo%
-\LWR@subhyperref{\LWR@templink}{\LWR@templinktwo}%
-\LWR@ensuredoingapar%
-\endgroup%
+\LWR@subhyperref{#2}%
+\LWR@subhyperreftext{#3}%
+\endgroup% restore catcodes
}
\newrobustcmd*{\burlalt}{%
@@ -31377,7 +32371,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \end{macrocode}
% \begin{macrocode}
-\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(bytefield)]}
+\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(-bytefield-~\packagediagramname)]}
\AfterEndEnvironment{bytefield}{\end{lateximage}}
% \end{macrocode}
@@ -31916,7 +32910,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LetLtxMacro\LWR@chemfig@origchemfig\chemfig
\DeclareDocumentCommand\chemfig{s O{} O{} m}{%
- \begin{lateximage}[(chemfig)]%
+ \begin{lateximage}[(-chemfig-~\packagediagramname)]%
\IfBooleanTF{#1}{%
\LWR@chemfig@origchemfig*[#2][#3]{#4}%
}{%
@@ -31928,18 +32922,18 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LetLtxMacro\LWR@chemfig@origCF@lewis@b\CF@lewis@b
\def\CF@lewis@b#1#2{%
-\begin{lateximage}[(chemfig)]%
+\begin{lateximage}[(-chemfig-~\packagediagramname)]%
\LWR@chemfig@origCF@lewis@b{#1}{#2}%
\end{lateximage}%
}
-\preto{\schemestart}{\begin{lateximage}[(chemfig)]}
+\preto{\schemestart}{\begin{lateximage}[(-chemfig-~\packagediagramname)]}
\appto{\CF@schemestop}{\end{lateximage}}
\LetLtxMacro\LWR@chemfig@origchemleft\chemleft
\def\chemleft#1#2\chemright#3{%
-\begin{lateximage}[(chemfig)]%
+\begin{lateximage}[(-chemfig-~\packagediagramname)]%
\LWR@chemfig@origchemleft#1#2\chemright#3%
\end{lateximage}%
}
@@ -31947,7 +32941,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LetLtxMacro\LWR@chemfig@origchemup\chemup
\def\chemup#1#2\chemdown#3{%
-\begin{lateximage}[(chemfig)]%
+\begin{lateximage}[(-chemfig-~\packagediagramname)]%
\LWR@chemfig@origchemup#1#2\chemdown#3%
\end{lateximage}%
}
@@ -32066,7 +33060,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\RenewDocumentCommand \charrow { mO{}O{} }
{
- \begin{lateximage}[(charrow)]
+ \begin{lateximage}[(-chemformula- charrow)]
\group_begin:
\__chemformula_draw_arrow:nnn {#1} {#2} {#3}
\group_end:
@@ -32396,7 +33390,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \begin{noindenvironment}{polymerdelims}
% \begin{macrocode}
\DeclareDocumentEnvironment{polymerdelims}{}
-{\begin{lateximage}[(polymer)]}
+{\begin{lateximage}[(-chemmacros- polymer)]}
{\end{lateximage}}
% \end{macrocode}
% \end{noindenvironment}
@@ -32408,7 +33402,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% For the print output version, see \cref{sec:chemmacrosprintenvs}.
% \begin{macrocode}
\DeclareDocumentEnvironment{redoxreaction}{m m}
-{\begin{lateximage}[(redox~reaction)]}
+{\begin{lateximage}[(-chemmacros- redoxreaction)]}
{\end{lateximage}}
% \end{macrocode}
% \end{noindenvironment}
@@ -33547,27 +34541,13 @@ name = \chemmacros_translate:n {scheme-name}
%
% \codehtml
%
+% A few placeholder definitions are forgotten first:
% \begin{macrocode}
-\LWR@ProvidesPackagePass{colortbl}
-% \end{macrocode}
-
-% Remember the print-mode definitions:
-% \begin{macrocode}
-\LetLtxMacro\LWR@origcolumncolor\columncolor
-\LetLtxMacro\LWR@origrowcolor\rowcolor
-\LetLtxMacro\LWR@origcellcolor\cellcolor
-\LetLtxMacro\LWR@origarrayrulecolor\arrayrulecolor
-\LetLtxMacro\LWR@origdoublerulesepcolor\doublerulesepcolor
+\let\rowcolor\relax
-\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\columncolor\LWR@origcolumncolor%
-\LetLtxMacro\rowcolor\LWR@origrowcolor%
-\LetLtxMacro\cellcolor\LWR@origcellcolor%
-\LetLtxMacro\arrayrulecolor\LWR@origarrayrulecolor%
-\LetLtxMacro\doublerulesepcolor\LWR@origdoublerulesepcolor%
-}
+\LWR@ProvidesPackagePass{colortbl}
% \end{macrocode}
-
+%
%
% The following \cs{LWR@HTML} versions are used inside an \HTML\ \env{tabular}.
%
@@ -33575,53 +34555,77 @@ name = \chemmacros_translate:n {scheme-name}
%
% \cs{LWR@getmynexttoken} is not used here because \cs{columncolor} is not used
% inside the data area of the tabular.
+%
+% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\RenewDocumentCommand{\LWR@HTMLcolumncolor}{O{named} m o o}{%
+\NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{%
\convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor%
\LWR@addtabularcellcolor%
}
+
+\LWR@formatted{columncolor}
% \end{macrocode}
% \end{noindmacro}
%
+%
% \cs{LWR@getmynexttoken} is used for \cs{rowcolor} because it is used
% inside the data area of the tabular.
%
+%
% \begin{noindmacro}{\rowcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
+%
+% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\RenewDocumentCommand{\LWR@HTMLrowcolor}{O{named} m o o}{%
+\NewDocumentCommand{\LWR@HTML@rowcolor}{O{named} m o o}{%
\convertcolorspec{#1}{#2}{HTML}\LWR@rowHTMLcolor%
\LWR@getmynexttoken%
}
+
+\LWR@expandableformatted{rowcolor}
% \end{macrocode}
% \end{noindmacro}
-
+%
+%
% \begin{noindmacro}{\cellcolor} \oarg{model} \marg{color} \oarg{left overhang} \oarg{right overhang}
+%
+% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\RenewDocumentCommand{\LWR@HTMLcellcolor}{O{named} m o o}{%
+\NewDocumentCommand{\LWR@HTML@cellcolor}{O{named} m o o}{%
\convertcolorspec{#1}{#2}{HTML}\LWR@cellHTMLcolor%
\LWR@addtabularcellcolor%
}
+
+\LWR@formatted{cellcolor}
% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\arrayrulecolor} \oarg{model} \marg{color}
%
-% The version for use outside a \env{tabular}.
+% The \HTML\ version for use outside a \env{tabular}.
+% Inside a \env{tabular}, \cs{LWR@HTML@arrayrulecolornexttoken} is used instead.
+%
+% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\renewcommand{\arrayrulecolor}[2][named]{%
+\newcommand{\LWR@HTML@arrayrulecolor}[2][named]{%
\convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
}
+
+\LWR@expandableformatted{arrayrulecolor}
% \end{macrocode}
% \end{noindmacro}
-% \begin{noindmacro}{\LWR@arrayrulecolor} \oarg{model} \marg{color}
+% \begin{noindmacro}{\LWR@arrayrulecolornexttoken} \oarg{model} \marg{color}
%
-% The version for use inside a \env{tabular}.
+% The \HTML\ version for use inside a \env{tabular}.
+%
+% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\renewcommand{\LWR@HTMLarrayrulecolor}[2][named]{%
+\newcommand{\LWR@HTML@arrayrulecolornexttoken}[2][named]{%
\convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
\LWR@getmynexttoken%
}
+
+\LWR@expandableformatted{arrayrulecolornexttoken}
% \end{macrocode}
% \end{noindmacro}
@@ -33629,15 +34633,19 @@ name = \chemmacros_translate:n {scheme-name}
%
% The version for use outside a \env{tabular}.
% \begin{macrocode}
-\renewcommand{\doublerulesepcolor}[2][named]{}
+\newcommand{\LWR@HTML@doublerulesepcolor}[2][named]{}
+
+\LWR@expandableformatted{doublerulesepcolor}
% \end{macrocode}
% \end{noindmacro}
-% \begin{noindmacro}{\LWR@doublerulesepcolor} \oarg{model} \marg{color}
+% \begin{noindmacro}{\LWR@doublerulesepcolornexttoken} \oarg{model} \marg{color}
%
% The version for use inside a \env{tabular}.
% \begin{macrocode}
-\renewcommand{\LWR@HTMLdoublerulesepcolor}[2][named]{\LWR@getmynexttoken}
+\newcommand{\LWR@HTML@doublerulesepcolornexttoken}[2][named]{\LWR@getmynexttoken}
+
+\LWR@expandableformatted{doublerulesepcolornexttoken}
% \end{macrocode}
% \end{noindmacro}
@@ -34178,6 +35186,7 @@ name = \chemmacros_translate:n {scheme-name}
% \credits{Peter J. Heslin}
%
% \changes{v0.25}{2017/03/16}{\pkg{ellipsis}: Added.}
+% \changes{v0.57}{2018/05/15}{\pkg{ellipsis}: Added \cs{midwordellipsis}.}
%
% \DescribePackage{ellipsis}
% \pkg{ellipsis} is emulated.
@@ -34186,6 +35195,8 @@ name = \chemmacros_translate:n {scheme-name}
\LWR@ProvidesPackageDrop{ellipsis}
\newcommand{\ellipsisgap}{0.1em}
+
+\newcommand*{\midwordellipsis}{\,\textellipsis\,}
% \end{macrocode}
% \iffalse
@@ -34510,13 +35521,13 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{macrocode}
\DeclareDocumentCommand{\epigraph}{m m}
{
-\begin{LWR@BlockClassWP}{\LWR@origmbox{text-align:right}}{}{epigraph}
+\begin{LWR@BlockClassWP}{\LWR@print@mbox{text-align:right}}{}{epigraph}
\qitem{#1}{#2}
\end{LWR@BlockClassWP}
}
\DeclareDocumentEnvironment{epigraphs}{}
-{\LWR@BlockClassWP{\LWR@origmbox{text-align:right}}{}{epigraph}}
+{\LWR@BlockClassWP{\LWR@print@mbox{text-align:right}}{}{epigraph}}
{\endLWR@BlockClassWP}
% \end{macrocode}
%
@@ -34631,6 +35642,123 @@ name = \chemmacros_translate:n {scheme-name}
%
%
% \iffalse
+%<*errata>
+% \fi
+%
+% \part{lwarp-errata.sty}
+
+% \section{errata}
+%
+% \credits{Michael Kohlhase}
+%
+% \DescribePackage{errata}
+% \pkg{errata} is patched for use by \pkg{lwarp}.
+%
+% This is for v0.3 of \pkg{errata}.
+% A newer version of \pkg{errata} with more features is under development,
+% at which time the \pkg{lwarp} version will have to be updated.
+%
+% \changes{v0.57}{2018/05/23}{\pkg{errata}: Added.}
+%
+% \codehtml
+%
+% Macros are being defined with the math dollar,
+% so enable the \HTML\ version during package loading:
+% \begin{macrocode}
+\StartDefiningMath
+% \end{macrocode}
+
+% Now load the package:
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{errata}[2006/11/12]
+% \end{macrocode}
+
+% Patches for dynamic inline math:
+% \begin{macrocode}
+\xpatchcmd{\erratumAdd}
+ {$_a^{\arabic{erratum}}$}
+% {\StartDynamicMath$_a^{\arabic{erratum}}$\StopDynamicMath}
+ {\textsubscript{a}\textsuperscript{\arabic{erratum}}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, erratumAdd macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratumDelete}
+ {$_d^{\arabic{erratum}}$}
+% {\StartDynamicMath$_d^{\arabic{erratum}}$\StopDynamicMath}
+ {\textsubscript{d}\textsuperscript{\arabic{erratum}}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, erratumDelete macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratumReplace}
+ {$_r^{\arabic{erratum}}$}
+% {\StartDynamicMath$_r^{\arabic{erratum}}$\StopDynamicMath}
+ {\textsubscript{r}\textsuperscript{\arabic{erratum}}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, erratumReplace macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratum}
+ {$_a$}
+% {\StartDynamicMath$_a$\StopDynamicMath}
+ {\textsubscript{a}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, eDelete macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratum}
+ {$_d^{\@thefnmark}$}
+% {\StartDynamicMath$_d^{\@thefnmark}$\StopDynamicMath}
+ {\textsubscript{d}\textsuperscript{\@thefnmark}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, eDelete macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratum}
+ {$_r^{\@thefnmark}$}
+% {\StartDynamicMath$_r^{\@thefnmark}$\StopDynamicMath}
+ {\textsubscript{r}\textsuperscript{\@thefnmark}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, eReplace macro}
+ {Please contact the author of the lwarp package.}
+ }
+% \end{macrocode}
+
+% Finish the current page's errata before closing and reloading the list:
+% \begin{macrocode}
+\preto\PrintErrata{\LWR@orignewpage}
+% \end{macrocode}
+
+% No longer defining math macros with the \HTML\ |$|:
+% \begin{macrocode}
+\StopDefiningMath
+% \end{macrocode}
+
+% \iffalse
+%</errata>
+% \fi
+%
+%
+%
+% \iffalse
%<*eso-pic>
% \fi
%
@@ -35843,7 +36971,7 @@ solid \LWR@origpound\LWR@tempcolor ; %
% \part{lwarp-float.sty}
-% \section{float and \cs{newfloat}}
+% \section{float}
% \label{sec:newfloat}
% \label{sec:float}
%
@@ -35852,17 +36980,33 @@ solid \LWR@origpound\LWR@tempcolor ; %
% \DescribePackage{float}
% \pkg{float} is emulated.
%
-% \changes{v0.20}{2017/01/22}{Improved float caption type handling.}
+% Float styles |boxed| and |ruled| are emulated by \CSS\ and a float class according
+% to style.
%
+% The \HTML\ \element{figure} \attribute{class} is set to the float type,
+% so \CSS\ may also be used to format the float and its caption, according to
+% float type.
+% Furthermore, an additional class is set to the float style: |plain|, |plaintop|,
+% |boxed|, or |ruled|, so \CSS\ may be used to format by float style as well.
+% Default formatting by \CSS\ is provided for |ruled| and |boxed| styles.
+%
+% \changes{v0.20}{2017/01/22}{\pkg{float}: Improved float caption type handling.}
%
% \codehtml
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{float}[2016/03/04]
+\LWR@ProvidesPackageDrop{float}[2001/11/08]
% \end{macrocode}
-%
+% \begin{noindmacro}{\listof}
% See \cref{sec:listof} for the \cs{listof} command.
+% \end{noindmacro}
+% \begin{macro}{\LWR@floatstyle}
+% The default float style:
+% \begin{macrocode}
+\newcommand*{\LWR@floatstyle}{plain}
+% \end{macrocode}
+% \end{macro}
% \begin{noindmacro}{\newfloat} \marg{1: type} \marg{2: placement}
% \marg{3: ext} \oarg{4: within}
@@ -35877,13 +37021,23 @@ solid \LWR@origpound\LWR@tempcolor ; %
{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}%
{\DeclareFloatingEnvironment[fileext=#3]{#1}}%
% \end{macrocode}
+% Remember the float style:
+% \changes{v0.57}{2018/05/14}{\pkg{float}: Added float styles.}
+% \begin{macrocode}
+\csedef{LWR@floatstyle@#1}{\LWR@floatstyle}%
+% \end{macrocode}
% \pkg{newfloat} package automatically creates the \cs{listof} command
% for new floats, but \pkg{float} does not,
% so remove \cs{listof} here in case it is manually created later.
-% ^^A required?
% \begin{macrocode}
\cslet{listof#1s}\relax%
\cslet{listof#1es}\relax%
+% \end{macrocode}
+% Likesize, \pkg{newfloat} also creates \cs{l@<type>}, but \pkg{float} does not,
+% so remove it here:
+% \changes{v0.57}{2018/05/26}{\pkg{float}: Fix: Do not pre-define \cs{l@name}.}
+% \begin{macrocode}
+\cslet{l@#1}\relax%
}
% \end{macrocode}
% \end{noindmacro}
@@ -35893,7 +37047,7 @@ solid \LWR@origpound\LWR@tempcolor ; %
% Sets the text name of the float, such as ``Figure''.
% \begin{macrocode}
\NewDocumentCommand{\floatname}{m +m}{%
-\SetupFloatingEnvironment{#1}{name=#2}%
+ \SetupFloatingEnvironment{#1}{name=#2}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -35903,24 +37057,27 @@ solid \LWR@origpound\LWR@tempcolor ; %
% Float placement is ignored.
% \begin{macrocode}
\newcommand*{\floatplacement}[2]{%
-\SetupFloatingEnvironment{#1}{placement=#2}%
+ \SetupFloatingEnvironment{#1}{placement=#2}%
}
% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\floatstyle} \marg{style}
%
-% Float styles are ignored.
+% Remember the style for future floats:
% \begin{macrocode}
-\newcommand{\floatstyle}[1]{}
+\newcommand{\floatstyle}[1]{%
+ \def\LWR@floatstyle{#1}%
+}
% \end{macrocode}
% \end{noindmacro}
-% \begin{noindmacro}{\restylefloat} * \marg{style}
+% \begin{noindmacro}{\restylefloat} * \marg{type}
%
-% Float styles are ignored.
+% Remember the style for this float:
% \begin{macrocode}
\NewDocumentCommand{\restylefloat}{s m}{%
+ \csedef{LWR@floatstyle@#2}{\LWR@floatstyle}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -35932,10 +37089,6 @@ solid \LWR@origpound\LWR@tempcolor ; %
%
%
%
-%
-%
-%
-%
% \iffalse
%<*floatflt>
% \fi
@@ -36349,7 +37502,7 @@ solid \LWR@origpound\LWR@tempcolor ; %
% \end{macrocode}
% \begin{noindenvironment}{subfloatrow} \oarg{num\_floats}
-% \changes{v0.15}{2016/04/01}{Added}
+% \changes{v0.15}{2016/04/01}{Added.}
% \begin{macrocode}
\newenvironment*{subfloatrow}[1][2]
{
@@ -37333,6 +38486,30 @@ solid \LWR@origpound\LWR@tempcolor ; %
%
%
%
+% \iffalse
+%<*glossary>
+% \fi
+%
+% \part{lwarp-glossary.sty}
+%
+% \section{glossary}
+%
+% \DescribePackage{glossary}
+% \pkg{glossary} is superceded by \pkg{glossaries}.
+%
+% \changes{v0.57}{2018/05/16}{\pkg{glossary}: Prevented.}
+%
+% \codehtml
+% \begin{macrocode}
+\LWR@loadnever{glossary}{glossaries}
+% \end{macrocode}
+%
+% \iffalse
+%</glossary>
+% \fi
+%
+%
+%
%
% \iffalse
%<*graphics>
@@ -37888,11 +39065,14 @@ img src="%
%
%
% \begin{macro}{\rotatebox} \oarg{keyval list} \marg{angle} \marg{text}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\LetLtxMacro\LWR@origrotatebox\rotatebox
-
\AtBeginDocument{
-\RenewDocumentCommand{\rotatebox}{O{} m +m}{%
+% \end{macrocode}
+%
+% The \HTML\ version:
+% \begin{macrocode}
+\NewDocumentCommand{\LWR@HTML@rotatebox}{O{} m +m}{%
% \end{macrocode}
% Reset the origin to ``none-given'':
% \begin{macrocode}
@@ -37928,16 +39108,26 @@ img src="%
\LWR@htmltagc{/span}%
\end{LWR@nestspan}%
}
+% \end{macrocode}
+%
+% The high-level interface:
+% \begin{macrocode}
+\LWR@formatted{rotatebox}
+
}% AtBeginDocument
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\scalebox} \marg{h-scale} \oarg{v-scale} \marg{text}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\LetLtxMacro\LWR@origscalebox\scalebox
-
\AtBeginDocument{
-\RenewDocumentCommand{\scalebox}{m o m}{%
+% \end{macrocode}
+%
+% The \HTML\ version:
+% \begin{macrocode}
+\NewDocumentCommand{\LWR@HTML@scalebox}{m o m}{%
% \end{macrocode}
% Select |inline-block| so that \HTML\ will transform this span:
% \begin{macrocode}
@@ -37960,17 +39150,29 @@ img src="%
\LWR@htmltagc{/span}%
\end{LWR@nestspan}%
}
+% \end{macrocode}
+%
+% The high-level interface:
+% \begin{macrocode}
+\LWR@formatted{scalebox}
+
}% AtBeginDocument
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\reflectbox} \marg{text}
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\let\LWR@origreflectbox\reflectbox
-
\AtBeginDocument{
-\renewcommand{\reflectbox}[1]{\scalebox{-1}[1]{#1}}
-}
+
+\newcommand{\LWR@HTML@reflectbox}[1]{%
+\scalebox{-1}[1]{#1}%
+}% \reflectbox
+
+\LWR@formatted{reflectbox}
+
+}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -37979,12 +39181,18 @@ img src="%
% \begin{macro}{\resizebox} \marg{h-length} \marg{v-length} \marg{text}
%
% Simply prints its text argument.
+%
+% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\LetLtxMacro\LWR@origresizebox\resizebox
-
\AtBeginDocument{
-\renewcommand{\resizebox}[3]{#3}
+
+\NewDocumentCommand{\LWR@HTML@resizebox}{s m m m}{%
+#4%
}
+
+\LWR@formatted{resizebox}
+
+}% AtBeginDocument
% \end{macrocode}
% \end{macro}
%
@@ -38017,7 +39225,7 @@ img src="%
%
% \codehtml
% \begin{macrocode}
-\LWR@ProvidesPackagePass{graphicx}
+\LWR@ProvidesPackagePass{graphicx}[2017/06/01]
% \end{macrocode}
% \iffalse
@@ -38165,8 +39373,8 @@ img src="%
{
\LWR@findhangingleftmargin%
\BlockClass[%
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
- \LWR@origmbox{text-indent:-\LWR@printlength{\hangingindent}}%
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
+ \LWR@print@mbox{text-indent:-\LWR@printlength{\hangingindent}}%
]%
{hangingpar}%
}
@@ -38178,11 +39386,11 @@ img src="%
\renewcommand*{\LWR@printopenlist}{%
\LWR@findhangingleftmargin%
ul style="%
- \LWR@origmbox{list-style-type:none;} % extra space
- \LWR@origmbox{%
+ \LWR@print@mbox{list-style-type:none;} % extra space
+ \LWR@print@mbox{%
margin-left:\LWR@printlength{\LWR@templengthone}%
} ; % extra space
- \LWR@origmbox{%
+ \LWR@print@mbox{%
text-indent:-\LWR@printlength{\hangingindent}%
}%
"%
@@ -38203,8 +39411,8 @@ img src="%
{%
\BlockClass[%
\LWR@findhangingleftmargin%
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
- \LWR@origmbox{text-indent:-\LWR@printlength{\hangingindent}}%
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
+ \LWR@print@mbox{text-indent:-\LWR@printlength{\hangingindent}}%
]{labeledpar}#2%
}
{\endBlockClass}
@@ -38269,8 +39477,8 @@ img src="%
\newenvironment*{hangparas}[2]
{%
\BlockClass[%
- \LWR@origmbox{margin-left:\LWR@printlength{#1}} ; %
- \LWR@origmbox{text-indent:-\LWR@printlength{#1}}%
+ \LWR@print@mbox{margin-left:\LWR@printlength{#1}} ; %
+ \LWR@print@mbox{text-indent:-\LWR@printlength{#1}}%
]%
{hangingpar}%
}
@@ -38481,12 +39689,13 @@ img src="%
% \marg{3: name} \marg{4: text}
% \changes{v0.45}{2018/01/02}{\pkg{hyperref}: Fix: Underscore in \acro{URL}.}
% \changes{v0.52}{2018/03/26}{\pkg{hyperref}: Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \acro{URL}.}
+% \changes{v0.57}{2018/06/05}{\pkg{subcaption}: Fix: \cs{subref}.}
%
% Creates an \HTML\ link to |URL#category.name| with the given text.
% \begin{macrocode}
\newcommand{\LWR@hyperreffinish}[1]{%
\begingroup%
-\LetLtxMacro\ref\LWR@origref%{} syntax highlighting
+\RenewDocumentCommand{\ref}{}{\LWR@ref@ignorestar}%
#1%
\endgroup%
\LWR@htmltag{/a}%
@@ -40035,6 +41244,55 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
%
%
%
+%
+%
+%
+% \iffalse
+%<*ltablex>
+% \fi
+
+% \part{lwarp-ltablex.sty}
+
+% \section{ltablex}
+%
+% \credits{Anil K. Goel}
+%
+% \DescribePackage{ltablex}
+% \pkg{ltablex} is emulated by \pkg{lwarp}.
+%
+% \changes{v0.57}{2018/05/25}{\pkg{ltablex}: Added.}
+%
+% \codehtml
+%
+% Relies on \pkg{tabularx}.
+%
+% \begin{macrocode}
+\RequirePackage{tabularx}
+
+\LWR@ProvidesPackageDrop{ltablex}
+
+\DeclareDocumentEnvironment{tabularx}{m o m}
+{\longtable{#3}}
+{\endlongtable}
+
+\DeclareDocumentEnvironment{tabularx*}{m o m}
+{\longtable{#3}}
+{\endlongtable}
+
+\newcommand*{\keepXColumns}{}
+\newcommand*{\convertXColumns}{}
+% \end{macrocode}
+%
+%
+% \iffalse
+%</ltablex>
+% \fi
+%
+%
+%
+%
+%
+%
% \iffalse
%<*ltcaption>
% \fi
@@ -40122,6 +41380,10 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \DescribePackage{ltxtable}
% \pkg{ltxtable} is emulated.
%
+% The print version does not seem to honor \env{longtable*} from the
+% \watchout[table numbering]
+% \pkg{caption} package, while \pkg{lwarp} does.
+%
% \changes{v0.44}{2017/11/15}{\pkg{ltxtable}: Added.}
%
% \codehtml
@@ -40459,6 +41721,7 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
% \DescribePackage{marginnote} Emulated.
%
% \changes{v0.26}{2017/03/30}{\pkg{marginnote}: Added.}
+% \changes{v0.57}{2018/06/05}{\pkg{marginnote}: Fix: Long optional argument.}
%
% \codehtml
%
@@ -40467,8 +41730,11 @@ width=\KFLT@imagewidth,height=\KFLT@h]{\KFLT@i}%
\LWR@ProvidesPackageDrop{marginnote}
% \end{macrocode}
%
+% \changes{v0.57}{2018/06/05}{\pkg{marginnote}: Fix: Long optional argument.}
+% \begin{macrocode}
+\NewDocumentCommand{\marginnote}{+o +m o}{\marginpar{#2}}
+% \end{macrocode}
% \begin{macrocode}
-\NewDocumentCommand{\marginnote}{o +m o}{\marginpar{#2}}
\newcommand*{\marginnoteleftadjust}{}
\newcommand*{\marginnoterightadjust}{}
\newcommand*{\marginnotetextwidth}{}
@@ -40706,9 +41972,11 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
% \env{mdframed} environment may not work with the \HTML\ versions of the following,
% so restore them to their originals while inside \env{mdframed}:
% \begin{macrocode}
-\LetLtxMacro\hspace\LWR@orighspace%
-\LetLtxMacro\rule\LWR@origrule%
-\LetLtxMacro\makebox\LWR@origmakebox%
+\LWR@select@print@hspace%
+\renewcommand*{\rule}{\LWR@print@rule}
+\LetLtxMacro\makebox\LWR@print@makebox%
+% \end{macrocode}
+% \begin{macrocode}
\LWR@startpars%
\LWR@traceinfo{LWR@mdframedstart done}%
}
@@ -40839,16 +42107,16 @@ background:
; \LWR@orignewline
}{}%
% \end{macrocode}
-% The title's top border radius is adjusted for the line width:
-% \begin{macrocode}
-border-radius:
-\setlength{\LWR@titleroundcorner}
- {\maxof{\mdf@roundcorner@length-\mdf@linewidth@length}{0pt}}
- \LWR@printlength{\LWR@titleroundcorner}
- \LWR@printlength{\LWR@titleroundcorner}
- 0pt 0pt
- \LWR@orignewline
-% \end{macrocode}
+% ^^A The title's top border radius is adjusted for the line width:
+% ^^A \begin{macrocode}
+% ^^A border-radius:
+% ^^A \setlength{\LWR@titleroundcorner}
+% ^^A {\maxof{\mdf@roundcorner@length-\mdf@linewidth@length}{0pt}}
+% ^^A \LWR@printlength{\LWR@titleroundcorner}
+% ^^A \LWR@printlength{\LWR@titleroundcorner}
+% ^^A 0pt 0pt
+% ^^A \LWR@orignewline
+% ^^A \end{macrocode}
% Finish the custom style and the opening span tag:
% \begin{macrocode}
" \LWR@orignewline
@@ -41469,7 +42737,7 @@ background:
% \changes{v0.47}{2018/01/26}{\pkg{midpage}: Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\newenvironment{midpage}
-{\begin{BlockClass}[\LWR@origmbox{margin-top:6ex} ; \LWR@origmbox{margin-bottom:6ex}]{midpage}}
+{\begin{BlockClass}[\LWR@print@mbox{margin-top:6ex} ; \LWR@print@mbox{margin-bottom:6ex}]{midpage}}
{\end{BlockClass}}
% \end{macrocode}
%
@@ -41793,15 +43061,17 @@ background:
% See \cref{sec:printmultirow} for the print-mode versions.
%
% \codehtml
+%
+% Remove the placeholder macro which was used if \pkg{multirow} was not loaded:
% \begin{macrocode}
-\LWR@ProvidesPackagePass{multirow}
+\LetLtxMacro\multirow\relax
% \end{macrocode}
%
-% Remember the print-mode version:
% \begin{macrocode}
-\LetLtxMacro\LWR@origmultirow\multirow
+\LWR@ProvidesPackagePass{multirow}
% \end{macrocode}
%
+%
% \begin{macro}{\LWR@multirowborder}
% Set to |left| or |right| to create a thick border for the cell,
% for use by \pkg{bigdelim}:
@@ -41822,10 +43092,11 @@ background:
% \changes{v0.40}{2017/09/22}{\pkg{multirow}: Improved \pkg{bigdelim} borders.}
% \changes{v0.41}{2017/09/28}{\pkg{multirow}: Add: \cs{cmidrule} trims.}
% \changes{v0.47}{2018/01/26}{\pkg{multirow}: Fix: Line wrap at \HTML\ hyphen.}
+% \changes{v0.57}{2018/05/28}{\pkg{multirow}: Improved print/\HTML\ output selection.}
% \begin{macrocode}
-\RenewDocumentCommand{\multirow}{O{c} m o m o +m}%
+\NewDocumentCommand{\LWR@HTML@multirow}{O{c} m o m o +m}%
{%
-\LWR@traceinfo{*** multirow #1 #2 #4}%
+\LWR@traceinfo{*** LWR@HTML@multirow #1 #2 #4}%
\LWR@maybenewtablerow%
\LWR@tabularleftedge%
% \end{macrocode}
@@ -41836,15 +43107,15 @@ background:
% The vertical alignment, if given:
% \begin{macrocode}
\IfValueT{#1}{%
-\ifstrequal{#1}{b}{style="\LWR@origmbox{vertical-align:bottom}" }{}%
-\ifstrequal{#1}{t}{style="\LWR@origmbox{vertical-align:top}" }{}%
+\ifstrequal{#1}{b}{style="\LWR@print@mbox{vertical-align:bottom}" }{}%
+\ifstrequal{#1}{t}{style="\LWR@print@mbox{vertical-align:top}" }{}%
}%
% \end{macrocode}
% The left/right border, if given:
% \begin{macrocode}
\ifdefvoid{\LWR@multirowborder}{}{%
-style="\LWR@origmbox{border-\LWR@multirowborder:} 2px dotted black ; %
-\LWR@origmbox{padding-\LWR@multirowborder:} 2px" %
+style="\LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; %
+\LWR@print@mbox{padding-\LWR@multirowborder:} 2px" %
}%
% \end{macrocode}
% A class adds the column spec and the rule:
@@ -41884,8 +43155,10 @@ class="td%
\LWR@stoppars%
\global\boolfalse{LWR@intabularmetadata}%
\renewcommand{\LWR@multirowborder}{}%
-\LWR@traceinfo{*** multirow done}%
+\LWR@traceinfo{*** LWR@HTML@multirow done}%
}%
+
+\LWR@formatted{multirow}
% \end{macrocode}
%
%
@@ -41904,9 +43177,20 @@ class="td%
% \marg{6:width} \oarg{7:fixup} \marg{8:text}
%
% \changes{v0.39}{2017/08/30}{Added.}
+% \changes{v0.57}{2018/05/28}{\pkg{multirow}: Improved print/\HTML\ output selection.}
+%
+% |\@ifpackageloaded{multirow}| determines if v2.0 or later of
+% \pkg{multirow} was used, which included the \cs{ProvidesPackage} macro.
+%
+%
+% The \HTML\ version follows.
%
+% \cs{AtBeginDocument} because the print version had to see if \pkg{multirow}
+% was loaded before determining how to define \cs{LWR@print@multicolumnrow}.
% \begin{macrocode}
-\NewDocumentCommand{\multicolumnrow}{m m O{} m O{} m O{} +m}{%
+\AtBeginDocument{
+
+\NewExpandableDocumentCommand{\LWR@HTML@multicolumnrow}{m m O{} m O{} m O{} +m}{%
% \end{macrocode}
% Figure out how many extra \HTML\ columns to add for |@| and |!| columns:
% \begin{macrocode}
@@ -41928,18 +43212,14 @@ class="td%
% \begin{macrocode}
\booltrue{LWR@skipatbang}%
}
+
+\LWR@expandableformatted{multicolumnrow}
+
+}% \AtBeginDocument
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macrocode}
-\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\multirow\LWR@origmultirow%
-\renewcommand{\multicolumnrow}{\LWR@origmulticolumnrow}%
-}
-% \end{macrocode}
-%
-%
% \iffalse
%</multirow>
% \fi
@@ -42640,7 +43920,7 @@ class="td%
\newcommand{\LWR@inctheorem}{%
\addtocounter{LWR@thisautoid}{1}%
\LWR@stoppars%
-\LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
\LWR@startpars%
}
% \end{macrocode}
@@ -43815,7 +45095,7 @@ class="td%
{
\PackageError{lwarp}
{Unable to patch the quoting package}
- {Please contact the author of lwarp.}
+ {Please contact the author of the lwarp package.}
}
\xpatchcmd{\endquoting}{\quo@endtext}
{\quo@endtext\end{LWR@blocktextcurrentfont}}
@@ -43823,7 +45103,7 @@ class="td%
{
\PackageError{lwarp}
{Unable to patch the quoting package}
- {Please contact the author of lwarp.}
+ {Please contact the author of the lwarp package.}
}
% \end{macrocode}
@@ -43930,8 +45210,12 @@ class="td%
\newcommand*{\LWR@setrealscriptsalign}[1]{%
\renewcommand*{\LWR@realscriptsalign}{}%
-\ifthenelse{\equal{#1}{c}}{\renewcommand{\LWR@realscriptsalign}{\LWR@origmbox{text-align:center} ; }}{}%
-\ifthenelse{\equal{#1}{r}}{\renewcommand{\LWR@realscriptsalign}{\LWR@origmbox{text-align:right} ; }}{}%
+\ifthenelse{\equal{#1}{c}}{%
+ \renewcommand{\LWR@realscriptsalign}{\LWR@print@mbox{text-align:center} ; }%
+}{}%
+\ifthenelse{\equal{#1}{r}}{%
+ \renewcommand{\LWR@realscriptsalign}{\LWR@print@mbox{text-align:right} ; }%
+}{}%
}
\DeclareDocumentCommand \textsubsuperscript {s O{l} mm} {%
@@ -43957,6 +45241,52 @@ class="td%
%
%
%
+% \iffalse
+%<*register>
+% \fi
+%
+% \part{lwarp-register.sty}
+
+% \section{register}
+%
+% \credits{Matthew Lovell}
+%
+% \DescribePackage{register}
+% \pkg{register} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.57}{2018/06/03}{\pkg{register}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{register}
+% \end{macrocode}
+
+% \begin{macrocode}
+\xpatchcmd{\register}
+ {\centering}
+ {\begin{center}\begin{lateximage}[-register-~\packagediagramname]}
+ {\typeout{Patch register success.}}
+ {\typeout{Patch register failure.}}
+
+\xpatchcmd{\endregister}
+ {\leftskip}
+ {%
+ \end{lateximage}\end{center}%
+ \leftskip%
+ }%
+ {\typeout{Patch endregister success.}}
+ {\typeout{Patch endregister failure.}}
+
+\setlength{\regWidth}{5in}
+% \end{macrocode}
+
+% \iffalse
+%</register>
+% \fi
+%
+%
+%
%
% \iffalse
%<*relsize>
@@ -44188,10 +45518,9 @@ class="td%
%
% \changes{v0.34}{2017/07/25}{\pkg{rotfloat}: Added.}
%
-%
% \codehtml
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{rotfloat}
+\LWR@ProvidesPackageDrop{rotfloat}[2004/01/04]
\RequirePackage{float}
% \end{macrocode}
@@ -44213,21 +45542,25 @@ class="td%
}%
{%
\DeclareFloatingEnvironment[fileext=#3]{#1}%
-% \end{macrocode}
-% ^^A required:??
-% \begin{macrocode}
- \DeclareFloatingEnvironment[fileext=#3]{sideways#1}%
}%
\csletcs{sideways#1}{#1}%
\csletcs{endsideways#1}{end#1}%
% \end{macrocode}
+% Remember the float style:
+% \changes{v0.57}{2018/05/14}{\pkg{rotfloat}: Added float styles.}
+% \begin{macrocode}
+\csedef{LWR@floatstyle@#1}{\LWR@floatstyle}%
+\csedef{LWR@floatstyle@sideways#1}{\LWR@floatstyle}%
+% \end{macrocode}
% \pkg{newfloat} package automatically creates the \cs{listof} command
% for new floats, but \pkg{float} does not,
-% so remove \cs{listof} here in case it is manually created later.
-% ^^A *8* keep the below?
+% so remove \cs{listof} here in case it is manually created later:
+% \changes{v0.57}{2018/05/14}{\pkg{rotfloat}: Fix for listof sideways floats.}
% \begin{macrocode}
\cslet{listof#1s}\relax%
\cslet{listof#1es}\relax%
+\cslet{listofsideways#1s}\relax%
+\cslet{listofsideways#1es}\relax%
}
% \end{macrocode}
% \end{macro}
@@ -44433,12 +45766,12 @@ class="td%
\DeclareDocumentCommand{\raggedfootnote}{}{}
\DeclareDocumentCommand{\dictum}{o m}{
-\begin{LWR@BlockClassWP}{\LWR@origmbox{text-align:right}}{}{dictum}
+\begin{LWR@BlockClassWP}{\LWR@print@mbox{text-align:right}}{}{dictum}
#2
\IfValueT{#1}
{
\ifbool{FormatWP}
- {\begin{BlockClass}[\LWR@origmbox{border-top:} 1px solid gray]{dictumauthor}}
+ {\begin{BlockClass}[\LWR@print@mbox{border-top:} 1px solid gray]{dictumauthor}}
{\begin{BlockClass}{dictumauthor}}
\dictumauthorformat{#1}
\end{BlockClass}
@@ -44478,15 +45811,15 @@ class="td%
\ifblank{#2}
{
\begin{BlockClass}[
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthtwo}} ;
- \LWR@origmbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthtwo}} ;
+ \LWR@print@mbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
]{addmargin}
}
{
\setlength{\LWR@templengthone}{#2}
\begin{BlockClass}[
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ;
- \LWR@origmbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ;
+ \LWR@print@mbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
]{addmargin}
}
}
@@ -45341,7 +46674,7 @@ class="td%
\int_new:c { c__siunitx_math #1 _int }
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\hbox_set:Nn \l__siunitx_tmp_box
{
\ensuremath
@@ -45359,7 +46692,7 @@ class="td%
\cs_new_protected:Npn \__siunitx_combined_output:n #1 {
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_if:NTF \l__siunitx_number_parse_bool
{
\tl_clear:N \l__siunitx_number_out_tl
@@ -45468,7 +46801,7 @@ class="td%
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueF {#1}
{ \keys_set:nn { siunitx } {#1} }
@@ -45480,7 +46813,7 @@ class="td%
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueF {#1}
{ \keys_set:nn { siunitx } {#1} }
@@ -45491,7 +46824,7 @@ class="td%
\RenewDocumentCommand \ang { o > { \SplitArgument { 2 } { ; } } m } {
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\IfNoValueF {#1}
{ \keys_set:nn { siunitx } {#1} }
\__siunitx_angle_output:nnn #2
@@ -45502,7 +46835,7 @@ class="td%
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueTF {#1}
{ \__siunitx_unit_output:nn {#2} { } }
@@ -45519,7 +46852,7 @@ class="td%
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueTF {#1}
{ \__siunitx_range_unit:nnnn {#4} { } {#2} {#3} }
@@ -47206,8 +48539,8 @@ class="td%
% \tikz\ is placed inside an \SVG\ image, so use the original
% meanings of the following:
% \begin{macrocode}
-\LetLtxMacro\pgfutil@minipage\LWR@origminipage
-\let\pgfutil@endminipage\LWR@origendminipage
+\LetLtxMacro\pgfutil@minipage\LWR@print@minipage
+\let\pgfutil@endminipage\endLWR@print@minipage
\let\pgfutil@raggedleft\LWR@origraggedleft
\let\pgfutil@raggedright\LWR@origraggedright
@@ -48966,6 +50299,51 @@ class="td%
%
%
%
+% \iffalse
+%<*trimclip>
+% \fi
+%
+% \part{lwarp-trimclip.sty}
+%
+% \section{trimclip}
+%
+% \DescribePackage{trimclip}
+% \pkg{trimclip} is nullified.
+%
+% \changes{v0.57}{2018/05/26}{\pkg{trimclip}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{trimclip}
+% \end{macrocode}
+%
+% The third argument, the text, is not touched.
+% This allows \cs{bgroup} / \cs{egroup}, and verbatim content.
+% \begin{macrocode}
+\csdef{trimbox}{\@ifstar\@gobble\@gobble}
+\csletcs{trimbox*}{trimbox}
+\def\endtrimbox{}
+\csletcs{endtrimbox*}{endtrimbox}
+
+\csletcs{clipbox}{trimbox}
+\csletcs{clipbox*}{trimbox}
+\csletcs{endclipbox}{endtrimbox}
+\csletcs{endclipbox*}{endtrimbox}
+
+\csletcs{marginbox}{trimbox}
+\csletcs{marginbox*}{trimbox}
+\csletcs{endmarginbox}{endtrimbox}
+\csletcs{endmarginbox*}{endtrimbox}
+% \end{macrocode}
+%
+% \iffalse
+%</trimclip>
+% \fi
+%
+%
+%
+%
%
%
% \iffalse
@@ -49561,6 +50939,56 @@ class="td%
%
%
% \iffalse
+%<*vowel>
+% \fi
+%
+% \part{lwarp-vowel.sty}
+
+% \section{vowel}
+%
+% \credits{FUKUI Rei}
+%
+% \DescribePackage{vowel}
+% \pkg{vowel} is patched for use by \pkg{lwarp}.
+%
+% This package has been tested with \prog{pdflatex} and the Type 1 TIPA fonts
+% using the following package load sequence:
+% \begin{sourcedisplay}
+% \cs{usepackage}[T3,T1]\{fontenc\} \\
+% \cs{usepackage}[utf8]\{inputenc\} \\
+% \cs{usepackage}[noenc]\{tipa\} \\
+% \cs{usepackage}\{vowel\}
+% \end{sourcedisplay}
+% \bigskip
+%
+% \changes{v0.57}{2018/05/22}{\pkg{vowel}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{vowel}
+% \end{macrocode}
+
+% \begin{macrocode}
+\renewenvironment{vowel}[1][]
+ {%
+ \begin{lateximage}[(-vowel-~\packagediagramname)]%
+ \@vowel[#1]%
+ }
+ {%
+ \@@vowel%
+ \end{lateximage}%
+ }
+% \end{macrocode}
+
+% \iffalse
+%</vowel>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*vwcol>
% \fi
%
@@ -50022,7 +51450,7 @@ class="td%
% \item [\cs{fcolorbox}:] \
% \begin{description}
% \item [Print:] Modified to allow a background of |none|. \newline
-% \cs{LWRprint@fcolorbox} at \cref{sec:xcolorpatches}
+% \cs{LWR@print@fcolorbox} at \cref{sec:xcolorpatches}
% \item [HTML:] Redefined by \pkg{lwarp-xcolor}, page \pageref{sec:fcolorbox}.
% \item [HTML \env{lateximage}:] Remembers and reuses the print version.
% \end{description}
@@ -50038,7 +51466,7 @@ class="td%
% \item [\env{fcolorminipage}:] \
% \begin{description}
% \item [Print:] Newly defined in the \pkg{lwarp} core. \newline
-% \env{LWRprint@fcolorminipage} at \cref{sec:xcolorpatches}
+% \env{LWR@print@fcolorminipage} at \cref{sec:xcolorpatches}
% \item [HTML:] Newly defined by \pkg{lwarp-xcolor}, page \pageref{sec:fcolorminipage}.
% \item [HTML \env{lateximage}:] Uses the print version.
% \end{description}
@@ -50070,30 +51498,16 @@ class="td%
% Remember the following print-mode actions to be restored
% when inside a \env{lateximage} environment:
% \begin{macrocode}
-\LetLtxMacro\LWRprint@textcolor\textcolor
-\LetLtxMacro\LWRprint@pagecolor\pagecolor
-\LetLtxMacro\LWRprint@nopagecolor\nopagecolor
-\LetLtxMacro\LWRprint@colorbox\colorbox
-\LetLtxMacro\LWRprint@colorboxBlock\colorbox
-% \end{macrocode}
-% New print-mode versions of the following are also defined:
-% \begin{macrocode}
-\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
-\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
-\LetLtxMacro\LWRorigprint@boxframe\boxframe
+\LetLtxMacro\LWR@print@pagecolor\pagecolor
+\LetLtxMacro\LWR@print@nopagecolor\nopagecolor
% \end{macrocode}
%
-%
% Inside a \env{lateximage} the following gets restored to their print-mode actions:
% \margintag{\small\cs{LWR@restoreorigformatting}}
% \begin{macrocode}
\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\textcolor\LWRprint@textcolor%
-\LetLtxMacro\pagecolor\LWRprint@pagecolor%
-\LetLtxMacro\nopagecolor\LWRprint@nopagecolor%
-\LetLtxMacro\colorbox\LWRprint@colorbox%
-\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
-\LetLtxMacro\boxframe\LWRorigprint@boxframe%
+\LetLtxMacro\pagecolor\LWR@print@pagecolor%
+\LetLtxMacro\nopagecolor\LWR@print@nopagecolor%
}
% \end{macrocode}
%
@@ -50211,8 +51625,10 @@ padding:\LWR@printlength{\fboxsep}%
% \oarg{model} \marg{color} \marg{text}
%
% Converted into an \HTML\ hex color span.
+%
+% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\RenewDocumentCommand{\textcolor}{o m m}{%
+\NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{%
\begingroup%
% \end{macrocode}
% Set the \PDF\ color, to be picked up by \SVG\ math if possible.
@@ -50243,6 +51659,8 @@ padding:\LWR@printlength{\fboxsep}%
}%
\endgroup%
}
+
+\LWR@formatted{textcolor}
% \end{macrocode}
% \end{macro}
@@ -50271,8 +51689,9 @@ padding:\LWR@printlength{\fboxsep}%
%
% Converted into an \HTML\ hex background color \element{span}.
%
+% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\RenewDocumentCommand{\colorbox}{O{named} m +m}{%
+\NewDocumentCommand{\LWR@HTML@colorbox}{O{named} m +m}{%
\begingroup%
\LWR@FBcancel%
\InlineClass[%
@@ -50281,6 +51700,10 @@ padding:\LWR@printlength{\fboxsep}%
]{colorbox}{#3}%
\endgroup%
}
+
+\AtBeginDocument{
+\LWR@formatted{colorbox}
+}
% \end{macrocode}
% \end{macro}
@@ -50289,8 +51712,9 @@ padding:\LWR@printlength{\fboxsep}%
%
% Converted into an \HTML\ hex background color \element{div}.
%
+% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\NewDocumentCommand{\colorboxBlock}{O{named} m +m}{%
+\NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{%
\begingroup%
\LWR@FBcancel%
\begin{BlockClass}[%
@@ -50301,6 +51725,10 @@ padding:\LWR@printlength{\fboxsep}%
\end{BlockClass}%
\endgroup%
}
+
+\AtBeginDocument{
+\LWR@formatted{colorboxBlock}
+}
% \end{macrocode}
% \end{macro}
@@ -50312,8 +51740,9 @@ padding:\LWR@printlength{\fboxsep}%
%
% A background color of |none| creates a colored frame without a background color.
%
+% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and HTML outputs.}
% \begin{macrocode}
-\RenewDocumentCommand{\fcolorbox}{O{named} m O{named} m +m}{%
+\NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{named} m +m}{%
\LWR@traceinfo{HTML fcolorbox #2 #4}%
\begingroup%
\LWR@FBcancel%
@@ -50332,6 +51761,10 @@ padding:\LWR@printlength{\fboxsep}%
}%
\endgroup%
}
+
+\AtBeginDocument{
+\LWR@formatted{fcolorbox}
+}
% \end{macrocode}
% \end{macro}
@@ -50344,7 +51777,7 @@ padding:\LWR@printlength{\fboxsep}%
% A background color of |none| creates a colored frame without a background color.
%
% \begin{macrocode}
-\NewDocumentCommand{\fcolorboxBlock}{O{named} m O{named} m +m}{%
+\NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{named} m +m}{%
\LWR@traceinfo{HTML fcolorboxBlock #2 #4}%
\begingroup%
\LWR@FBcancel%
@@ -50369,6 +51802,10 @@ padding:\LWR@printlength{\fboxsep}%
\endgroup%
\LWR@traceinfo{HTML fcolorboxBlock done}%
}
+
+\AtBeginDocument{
+\LWR@formatted{fcolorboxBlock}
+}
% \end{macrocode}
% \end{macro}
@@ -50400,7 +51837,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \oarg{5:align} \oarg{6:height} \oarg{7:inner-align} \marg{8:width}
%
% \begin{macrocode}
-\NewDocumentEnvironment{fcolorminipage}{O{named} m O{named} m O{c} o o m}
+\NewDocumentEnvironment{LWR@HTML@fcolorminipage}{O{named} m O{named} m O{c} o o m}
{%
\LWR@FBcancel%
\setlength{\LWR@tempwidth}{#8}%
@@ -50415,6 +51852,10 @@ width:\LWR@printlength{\LWR@tempwidth}%
}%
}
{\end{BlockClass}}
+
+\AtBeginDocument{
+\LWR@formattedenv{fcolorminipage}
+}
% \end{macrocode}
% \end{environment}
%
@@ -50425,13 +51866,16 @@ width:\LWR@printlength{\LWR@tempwidth}%
%
% The depth is added to the height, but the box is not decended below
% by the depth. \cs{textcolor} is honored.
+%
+% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: Fix: Colored \cs{boxframe}.}
% \begin{macrocode}
-\renewcommand*{\boxframe}[3]{%
+\newcommand*{\LWR@HTML@boxframe}[3]{%
{%
\setlength{\LWR@tempwidth}{#1}%
\setlength{\LWR@tempheight}{#2}%
\addtolength{\LWR@tempheight}{#3}%
\LWR@forceminwidth{\fboxrule}%
+\LWR@findcurrenttextcolor%
\InlineClass[%
display:inline-block ; %
border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; %
@@ -50440,6 +51884,8 @@ height:\LWR@printlength{\LWR@tempheight}%
]{boxframe}{}%
}%
}
+
+\LWR@formatted{boxframe}
% \end{macrocode}
% \end{macro}
%
@@ -50537,6 +51983,66 @@ height:\LWR@printlength{\LWR@tempheight}%
%
%
%
+% \iffalse
+%<*xellipsis>
+% \fi
+%
+% \part{lwarp-xellipsis.sty}
+
+% \section{xellipsis}
+%
+% \credits{Donald P. Goodman III}
+%
+% \DescribePackage{xellipsis}
+% \pkg{xellipsis} is patched for use by \pkg{lwarp}.
+%
+% When non-zero, each of the spaces is converted to an \HTML\ thin unbreakable space.
+%
+% \changes{v0.57}{2018/05/15}{\pkg{xellipsis}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{xellipsis}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\LWR@xellipsespace}[1]{%
+\ifdim#1=0pt\else%
+ \ifdim#1<\fontdimen2\font%
+ \,%
+ \else%
+ ~%
+ \fi%
+\fi%
+}
+
+\def\xelip{%
+\mbox{%
+ \LWR@xellipsespace{\xelipprebef}%
+ \xelipprechar%
+ \LWR@xellipsespace{\xelippreaft}%
+ \LWR@xellipsespace{\xelipbef}%
+ \xelipchar%
+ \xel@loopi = 1%
+ \loop\ifnum\xelipnum>\xel@loopi%
+ \advance\xel@loopi by1%
+ \LWR@xellipsespace{\xelipgap}%
+ \xelipchar%
+ \repeat%
+ \LWR@xellipsespace{\xelipaft}%
+ \LWR@xellipsespace{\xelippostbef}%
+ \xelippostchar%
+ \LWR@xellipsespace{\xelippostaft}%
+}%
+}%
+% \end{macrocode}
+
+% \iffalse
+%</xellipsis>
+% \fi
+%
+%
%
%
% \iffalse
@@ -50623,12 +52129,7 @@ height:\LWR@printlength{\LWR@tempheight}%
\endLWR@nestspan%
}
% \end{macrocode}
-% A nullified \cs{scalebox} command, to avoid introducing \HTML\ scaling tags:
-% \margintag{\cs{scalebox}}
-% \begin{macrocode}
-\NewDocumentCommand{\LWR@noscalebox}{m o m}{#3}
-% \end{macrocode}
-
+%
% Instances of \pkg{xfrac} for various font choices:
% \margintag{instances}
%
@@ -50640,17 +52141,18 @@ height:\LWR@printlength{\LWR@tempheight}%
% \changes{v0.16}{2016/04/07}{\pkg{xfrac}: Adjusted for the use of any font:}
% \changes{v0.48}{2018/02/13}{\pkg{xfrac}: Fix: Added groups around super/subscripts
% to localize \env{LWR@nestspan} changes.}
+% \changes{v0.57}{2018/06/01}{\pkg{xfrac}: Improved print/HTML \cs{scalebox} control.}
% \begin{macrocode}
\DeclareInstance{xfrac}{default}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -50663,13 +52165,13 @@ scaling = false
\DeclareInstance{xfrac}{lmr}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -50682,13 +52184,13 @@ scaling = false
\DeclareInstance{xfrac}{lmss}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -50701,13 +52203,13 @@ scaling = false
\DeclareInstance{xfrac}{lmtt}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -50735,6 +52237,53 @@ scaling = false
%
%
%
+%
+% \iffalse
+%<*xltabular>
+% \fi
+
+% \part{lwarp-xltabular.sty}
+
+% \section{xltabular}
+%
+% \credits{Rolf Niepraschk, Herbert Voß}
+%
+% \DescribePackage{xltabular}
+% \pkg{xltabular} is emulated by \pkg{lwarp}.
+%
+% \changes{v0.57}{2018/05/25}{\pkg{xltabular}: Added.}
+%
+% \codehtml
+%
+% Relies on \pkg{tabularx}.
+%
+% At present, an \env{xltabular} without a caption or with only a \cs{caption*}
+% \watchout[table numbering]
+% may be misnumbered in \HTML, so it may be necessary to place at the end
+% of the table:
+% \begin{sourcedisplay}
+% \cs{warpHTMLonly}\{\cs{addtocounter}\{table\}\{-1\}\}
+% \end{sourcedisplay}
+%
+% \begin{macrocode}
+\RequirePackage{tabularx}
+
+\LWR@ProvidesPackageDrop{xltabular}
+
+\DeclareDocumentEnvironment{xltabular}{o m m}
+{\longtable{#3}}
+{\endlongtable}
+% \end{macrocode}
+%
+%
+% \iffalse
+%</xltabular>
+% \fi
+%
+%
+%
+%
+%
% \iffalse
%<*xltxtra>
% \fi
@@ -50821,6 +52370,53 @@ scaling = false
%
%
%
+% \iffalse
+%<*xpiano>
+% \fi
+%
+% \part{lwarp-xpiano.sty}
+
+% \section{xpiano}
+%
+% \credits{Enrico Gregorio}
+%
+% \DescribePackage{xpiano}
+% \pkg{xpiano} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.57}{2018/06/03}{\pkg{xpiano}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{xpiano}
+% \end{macrocode}
+
+% \begin{macrocode}
+\ExplSyntaxOn
+\NewDocumentCommand{\LWR@print@keyboard}{ O{}m }
+{
+\xpiano_keyboard:nn { #1 } { #2 }
+}
+
+\NewDocumentCommand{\LWR@HTML@keyboard}{ O{}m }
+{
+\begin{lateximage}*
+ [-xpiano-~\packagediagramname{}: \detokenize\expandafter{#2}]
+ [\detokenize\expandafter{#1}]
+\xpiano_keyboard:nn { #1 } { #2 }
+\end{lateximage}
+}
+\ExplSyntaxOff
+
+\LWR@formatted{keyboard}
+% \end{macrocode}
+
+% \iffalse
+%</xpiano>
+% \fi
+%
+%
+%
%
%
% \iffalse
@@ -50974,14 +52570,14 @@ scaling = false
% \begin{macrocode}
\AtBeginDocument{
-\preto{\xy}{\begin{lateximage}[(xy)]}
+\preto{\xy}{\begin{lateximage}[(-xy-~\packagediagramname)]}
\appto{\endxy}{\end{lateximage}}
\@ifundefined{xymatrix}{}{
\LetLtxMacro\LWR@origxymatrix\xymatrix
\renewcommand{\xymatrix}[1]{%
-\begin{lateximage}[(xymatrix)]
+\begin{lateximage}[(-xy- xymatrix \packagediagramname)]
\LWR@origxymatrix{#1}
\end{lateximage}
}
@@ -50991,7 +52587,7 @@ scaling = false
\LetLtxMacro\LWR@origxygraph\xygraph
\renewcommand{\xygraph}[1]{%
-\begin{lateximage}[(xygraph)]
+\begin{lateximage}[(-xy- xygraph \packagediagramname)]
\LWR@origxygraph{#1}
\end{lateximage}
}
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
index d0fb53ae0b6..f9f665d100a 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
@@ -44,6 +44,7 @@ version 2005/12/01 or later.
\file{lwarp-ae.sty}{\from{lwarp.dtx}{ae}}
\file{lwarp-aecc.sty}{\from{lwarp.dtx}{aecc}}
\file{lwarp-afterpage.sty}{\from{lwarp.dtx}{afterpage}}
+\file{lwarp-algorithm2e.sty}{\from{lwarp.dtx}{algorithm2e}}
\file{lwarp-algorithmicx.sty}{\from{lwarp.dtx}{algorithmicx}}
\file{lwarp-alltt.sty}{\from{lwarp.dtx}{alltt}}
\file{lwarp-amsthm.sty}{\from{lwarp.dtx}{amsthm}}
@@ -107,6 +108,7 @@ version 2005/12/01 or later.
\file{lwarp-epigraph.sty}{\from{lwarp.dtx}{epigraph}}
\file{lwarp-epstopdf.sty}{\from{lwarp.dtx}{epstopdf}}
\file{lwarp-epstopdf-base.sty}{\from{lwarp.dtx}{epstopdf-base}}
+\file{lwarp-errata.sty}{\from{lwarp.dtx}{errata}}
\file{lwarp-eso-pic.sty}{\from{lwarp.dtx}{eso-pic}}
\file{lwarp-everypage.sty}{\from{lwarp.dtx}{everypage}}
\file{lwarp-everyshi.sty}{\from{lwarp.dtx}{everyshi}}
@@ -145,6 +147,7 @@ version 2005/12/01 or later.
\file{lwarp-fwlw.sty}{\from{lwarp.dtx}{fwlw}}
\file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}}
\file{lwarp-glossaries.sty}{\from{lwarp.dtx}{glossaries}}
+\file{lwarp-glossary.sty}{\from{lwarp.dtx}{glossary}}
\file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}}
\file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}}
\file{lwarp-grffile.sty}{\from{lwarp.dtx}{grffile}}
@@ -172,6 +175,7 @@ version 2005/12/01 or later.
\file{lwarp-listings.sty}{\from{lwarp.dtx}{listings}}
\file{lwarp-longtable.sty}{\from{lwarp.dtx}{longtable}}
\file{lwarp-lscape.sty}{\from{lwarp.dtx}{lscape}}
+\file{lwarp-ltablex.sty}{\from{lwarp.dtx}{ltablex}}
\file{lwarp-ltcaption.sty}{\from{lwarp.dtx}{ltcaption}}
\file{lwarp-ltxgrid.sty}{\from{lwarp.dtx}{ltxgrid}}
\file{lwarp-ltxtable.sty}{\from{lwarp.dtx}{ltxtable}}
@@ -230,6 +234,7 @@ version 2005/12/01 or later.
\file{lwarp-quoting.sty}{\from{lwarp.dtx}{quoting}}
\file{lwarp-ragged2e.sty}{\from{lwarp.dtx}{ragged2e}}
\file{lwarp-realscripts.sty}{\from{lwarp.dtx}{realscripts}}
+\file{lwarp-register.sty}{\from{lwarp.dtx}{register}}
\file{lwarp-relsize.sty}{\from{lwarp.dtx}{relsize}}
\file{lwarp-resizegather.sty}{\from{lwarp.dtx}{resizegather}}
\file{lwarp-romanbar.sty}{\from{lwarp.dtx}{romanbar}}
@@ -287,6 +292,7 @@ version 2005/12/01 or later.
\file{lwarp-todo.sty}{\from{lwarp.dtx}{todo}}
\file{lwarp-todonotes.sty}{\from{lwarp.dtx}{todonotes}}
\file{lwarp-transparent.sty}{\from{lwarp.dtx}{transparent}}
+\file{lwarp-trimclip.sty}{\from{lwarp.dtx}{trimclip}}
\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}}
\file{lwarp-turnthepage.sty}{\from{lwarp.dtx}{turnthepage}}
\file{lwarp-typearea.sty}{\from{lwarp.dtx}{typearea}}
@@ -297,15 +303,19 @@ version 2005/12/01 or later.
\file{lwarp-verse.sty}{\from{lwarp.dtx}{verse}}
\file{lwarp-vertbars.sty}{\from{lwarp.dtx}{vertbars}}
\file{lwarp-vmargin.sty}{\from{lwarp.dtx}{vmargin}}
+\file{lwarp-vowel.sty}{\from{lwarp.dtx}{vowel}}
\file{lwarp-vwcol.sty}{\from{lwarp.dtx}{vwcol}}
\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}}
\file{lwarp-wasysym.sty}{\from{lwarp.dtx}{wasysym}}
\file{lwarp-watermark.sty}{\from{lwarp.dtx}{watermark}}
\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}}
\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}}
+\file{lwarp-xellipsis.sty}{\from{lwarp.dtx}{xellipsis}}
\file{lwarp-xfrac.sty}{\from{lwarp.dtx}{xfrac}}
+\file{lwarp-xltabular.sty}{\from{lwarp.dtx}{xltabular}}
\file{lwarp-xltxtra.sty}{\from{lwarp.dtx}{xltxtra}}
\file{lwarp-xmpincl.sty}{\from{lwarp.dtx}{xmpincl}}
+\file{lwarp-xpiano.sty}{\from{lwarp.dtx}{xpiano}}
\file{lwarp-xtab.sty}{\from{lwarp.dtx}{xtab}}
\file{lwarp-xurl.sty}{\from{lwarp.dtx}{xurl}}
\file{lwarp-xy.sty}{\from{lwarp.dtx}{xy}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
index 81e0b816adf..5e1c6431e2b 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
@@ -28,8 +28,8 @@
\ifnumcomp{#2}{=}{1}{\renewcommand*{\LWR@mcolstype}{singlecolumn}}{}%
\LWR@forcenewpage%
\BlockClass[%
-\LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
-\LWR@origmbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}%
+\LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
+\LWR@print@mbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}%
]{\LWR@mcolstype}%
}
{\endBlockClass}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty
new file mode 100644
index 00000000000..8ecc6b19b70
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithm2e.sty
@@ -0,0 +1,161 @@
+%%
+%% This is file `lwarp-algorithm2e.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `algorithm2e')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@ProvidesPackagePass{algorithm2e}
+
+\renewcommand{\l@algocf}[2]{\hypertocfloat{1}{algocf}{loa}{#1}{#2}}
+\newcommand*{\LWR@floatstyle@algocf}{ruled}
+
+\ifdefstring{\algocf@style}{boxed}{%
+\renewcommand*{\LWR@floatstyle@algocf}{boxed}
+}{}
+
+\ifdefstring{\algocf@style}{boxruled}{%
+\renewcommand*{\LWR@floatstyle@algocf}{boxruled}
+}{}
+
+\ifdefstring{\algocf@style}{plain}{%
+\renewcommand*{\LWR@floatstyle@algocf}{plain}
+}{}
+\newbool{LWR@algocf@dopars}
+\booltrue{LWR@algocf@dopars}
+
+\renewcommand{\algocf@everypar}{%
+\ifbool{LWR@algocf@dopars}{%
+ \ifbool{LWR@doingstartpars}{%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {%
+ \algocf@everyparnl\algocf@everyparhanging%
+ }%
+ }{}%
+}{}%
+}
+\renewcommand{\algocf@makecaption}[2]{%
+\LWR@caption@begin{algocf}%
+\algocf@captiontext{#1}{#2}%
+\LWR@caption@end%
+}
+\renewcommand{\algocf@makecaption@plain}[2]{%
+ \LWR@caption@begin{algocf}%
+ \algocf@captiontext{#1}{#2}%
+ \LWR@caption@end%
+}
+
+\renewcommand{\algocf@makecaption@boxed}[2]{%
+ \LWR@caption@begin{algocf}%
+ \algocf@captiontext{#1}{#2}%
+ \LWR@caption@end%
+}
+
+\renewcommand{\algocf@makecaption@ruled}[2]{%
+ \LWR@caption@begin{algocf}%
+ \algocf@captiontext{#1}{#2}%
+ \LWR@caption@end%
+}
+\long\def\algocf@latexcaption#1[#2]#3{% original definition of caption
+\boolfalse{LWR@algocf@dopars}% lwarp
+ \par%
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup%
+ \@parboxrestore%
+ \if@minipage%
+ \@setminipage%
+ \fi%
+ \normalsize%
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par%
+ \endgroup%
+\booltrue{LWR@algocf@dopars}% lwarp
+}
+\renewcommand{\algocf@printnl}[1]{%
+ \InlineClass{alg2elinenumber}{\NlSty{#1}}~%
+}%
+\preto\@algocf@init{%
+ \edef\LWR@floatstyle@figure{\LWR@floatstyle@algocf}%
+}
+\renewcommand{\@algocf@start}{%
+ \let\@mathsemicolon=\;\def\;{\ifmmode\@mathsemicolon\else\@endalgoln\fi}%
+ \AlFnt{}%
+ \booltrue{LWR@algocf@dopars}% lwarp
+}
+
+\renewcommand{\@algocf@finish}{%
+ \boolfalse{LWR@algocf@dopars}% lwarp
+ \lineskip\normallineskip\setlength{\skiptotal}{\@defaultskiptotal}%
+ \let\;=\@mathsemicolon%
+ \let\]=\@emathdisplay%
+}
+\renewcommand{\BlankLine}{%
+\LWR@stoppars%
+\LWR@htmltagc{br /}%
+\LWR@startpars%
+}
+\renewcommand{\SetKwInOut}[2]{%
+ \algocf@newcommand{#1}[1]{%
+ \ifthenelse{\boolean{algocf@hanginginout}}%
+ {\relax}%
+ {\algocf@seteveryparhanging{\relax}}%
+ \ifthenelse{\boolean{algocf@inoutnumbered}}%
+ {\relax}%
+ {\algocf@seteveryparnl{\relax}}%
+ {%
+ \KwSty{#2\algocf@typo:}%
+ ~##1\par%
+ }%
+ \algocf@linesnumbered% reset the numbering of the lines
+ \ifthenelse{\boolean{algocf@hanginginout}}%
+ {\relax}%
+ {\algocf@reseteveryparhanging}%
+ }%
+}%
+
+\renewcommand{\ResetInOut}[1]{}%
+\renewcommand{\algocf@Vline}[1]{%
+\boolfalse{LWR@algocf@dopars}%
+\begin{BlockClass}{alg2evline}
+\booltrue{LWR@algocf@dopars}%
+#1
+\boolfalse{LWR@algocf@dopars}%
+\end{BlockClass}
+\booltrue{LWR@algocf@dopars}%
+}
+\renewcommand{\algocf@Vsline}[1]{%
+\boolfalse{LWR@algocf@dopars}%
+\begin{BlockClass}{alg2evsline}
+\booltrue{LWR@algocf@dopars}%
+#1
+\boolfalse{LWR@algocf@dopars}%
+\end{BlockClass}
+\booltrue{LWR@algocf@dopars}%
+}
+\renewcommand{\algocf@Noline}[1]{%
+\boolfalse{LWR@algocf@dopars}%
+\begin{BlockClass}{alg2enoline}
+\booltrue{LWR@algocf@dopars}%
+#1
+\boolfalse{LWR@algocf@dopars}%
+\end{BlockClass}
+\booltrue{LWR@algocf@dopars}%
+}
+\LetLtxMacro\algocf@Here\algocf
+\LetLtxMacro\endalgocf@Here\endalgocf
+
+\endinput
+%%
+%% End of file `lwarp-algorithm2e.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
index eef21647d17..b6d92cb41d3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
@@ -18,7 +18,7 @@
\LWR@ProvidesPackagePass{axodraw2}
-\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(axopicture)]}
+\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(-axopicture-~\packagediagramname)]}
\AfterEndEnvironment{axopicture}{\end{lateximage}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty
index 6d78508d3fc..a6e49f9987e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty
@@ -18,21 +18,19 @@
\let\ldelim\relax
\let\rdelim\relax
\LWR@ProvidesPackagePass{bigdelim}
-\LetLtxMacro\LWR@origldelim\ldelim
-\LetLtxMacro\LWR@origrdelim\rdelim
-\RenewDocumentCommand{\ldelim}{m m m O{}}{%
+\NewDocumentCommand{\LWR@HTML@ldelim}{m m m O{}}{%
\renewcommand{\LWR@multirowborder}{right}%
\multirow{#2}{#3}{#4 \InlineClass{ldelim}{#1}}%
}
-\RenewDocumentCommand{\rdelim}{m m m O{}}{%
+\LWR@formatted{ldelim}
+
+\NewDocumentCommand{\LWR@HTML@rdelim}{m m m O{}}{%
\renewcommand{\LWR@multirowborder}{left}%
\multirow{#2}{#3}{\InlineClass{rdelim}{#1} #4}%
}
-\appto\LWR@restoreorigformatting{%
-\LetLtxMacro{\ldelim}{\LWR@origldelim}%
-\LetLtxMacro{\rdelim}{\LWR@origrdelim}%
-}
+
+\LWR@formatted{rdelim}
\endinput
%%
%% End of file `lwarp-bigdelim.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty
index 3cdb6db97af..7d344bb1bca 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty
@@ -21,7 +21,7 @@
\renewcommand\bigstrut[1][x]{}
\appto\LWR@restoreorigformatting{%
-\LetLtxMacro{\bigstrut}{\LWR@origbigstrut}%
+\LetLtxMacro\bigstrut\LWR@origbigstrut%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty
index a09291c335e..e05f2dfd0d2 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty
@@ -15,14 +15,73 @@
%% 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.
+\LetLtxMacro\toprule\relax
+\LetLtxMacro\midrule\relax
+\LetLtxMacro\cmidrule\cline
+\LetLtxMacro\bottomrule\relax
+\LetLtxMacro\addlinespace\relax
+\LetLtxMacro\morecmidrules\relax
+\LetLtxMacro\specialrule\relax
+
\LWR@ProvidesPackagePass{booktabs}
-\LetLtxMacro\LWR@origtoprule\toprule
-\LetLtxMacro\LWR@origmidrule\midrule
-\LetLtxMacro\LWR@origcmidrule\cmidrule
-\LetLtxMacro\LWR@origbottomrule\bottomrule
-\LetLtxMacro\LWR@origaddlinespace\addlinespace
-\LetLtxMacro\LWR@origmorecmidrules\morecmidrules
-\LetLtxMacro\LWR@origspecialrule\specialrule
+\DeclareDocumentCommand{\LWR@HTML@toprule}{o d()}%
+ {%
+ \IfValueTF{#1}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
+ \LWR@getmynexttoken}
+
+\LWR@expandableformatted{toprule}
+
+\DeclareDocumentCommand{\LWR@HTML@midrule}{o d()}%
+ {%
+ \IfValueTF{#1}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {\addtocounter{LWR@hlines}{1}}%
+ }%
+ \LWR@getmynexttoken}
+
+\LWR@expandableformatted{midrule}
+
+\DeclareDocumentCommand{\LWR@HTML@cmidrule}{O{\LWR@cmidrulewidth} d() m}{%
+ \LWR@docmidrule[#1](#2){#3}%
+ \LWR@getmynexttoken%
+}%
+
+\LWR@expandableformatted{cmidrule}
+
+\DeclareDocumentCommand{\LWR@HTML@bottomrule}{o d()}{%
+ \IfValueTF{#1}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
+ \LWR@getmynexttoken%
+}%
+
+\LWR@expandableformatted{bottomrule}
+
+\DeclareDocumentCommand{\LWR@HTML@addlinespace}{o}{}%
+
+\LWR@expandableformatted{addlinespace}
+
+\DeclareDocumentCommand{\LWR@HTML@morecmidrules}{}{}%
+
+\LWR@expandableformatted{morecmidrules}
+
+\DeclareDocumentCommand{\LWR@HTML@specialrule}{m m m d()}%
+ {\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalcols}}\LWR@getmynexttoken}%
+
+\LWR@expandableformatted{specialrule}
\endinput
%%
%% End of file `lwarp-booktabs.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
index 80a8537c07e..2661fe8f670 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
@@ -20,13 +20,9 @@
\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
\LWR@ensuredoingapar%
-\def\LWR@templink{#2}%
-\@onelevel@sanitize\LWR@templink%
-\def\LWR@templinktwo{#3}%
-\@onelevel@sanitize\LWR@templinktwo%
-\LWR@subhyperref{\LWR@templink}{\LWR@templinktwo}%
-\LWR@ensuredoingapar%
-\endgroup%
+\LWR@subhyperref{#2}%
+\LWR@subhyperreftext{#3}%
+\endgroup% restore catcodes
}
\newrobustcmd*{\burlalt}{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
index 6691dbb0b2c..d4ac74bf02e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
@@ -18,7 +18,7 @@
\LWR@ProvidesPackagePass{bytefield}
-\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(bytefield)]}
+\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(-bytefield-~\packagediagramname)]}
\AfterEndEnvironment{bytefield}{\end{lateximage}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
index 4676f010e2c..640d71b3502 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
@@ -21,7 +21,7 @@
\LetLtxMacro\LWR@chemfig@origchemfig\chemfig
\DeclareDocumentCommand\chemfig{s O{} O{} m}{%
- \begin{lateximage}[(chemfig)]%
+ \begin{lateximage}[(-chemfig-~\packagediagramname)]%
\IfBooleanTF{#1}{%
\LWR@chemfig@origchemfig*[#2][#3]{#4}%
}{%
@@ -33,18 +33,18 @@
\LetLtxMacro\LWR@chemfig@origCF@lewis@b\CF@lewis@b
\def\CF@lewis@b#1#2{%
-\begin{lateximage}[(chemfig)]%
+\begin{lateximage}[(-chemfig-~\packagediagramname)]%
\LWR@chemfig@origCF@lewis@b{#1}{#2}%
\end{lateximage}%
}
-\preto{\schemestart}{\begin{lateximage}[(chemfig)]}
+\preto{\schemestart}{\begin{lateximage}[(-chemfig-~\packagediagramname)]}
\appto{\CF@schemestop}{\end{lateximage}}
\LetLtxMacro\LWR@chemfig@origchemleft\chemleft
\def\chemleft#1#2\chemright#3{%
-\begin{lateximage}[(chemfig)]%
+\begin{lateximage}[(-chemfig-~\packagediagramname)]%
\LWR@chemfig@origchemleft#1#2\chemright#3%
\end{lateximage}%
}
@@ -52,7 +52,7 @@
\LetLtxMacro\LWR@chemfig@origchemup\chemup
\def\chemup#1#2\chemdown#3{%
-\begin{lateximage}[(chemfig)]%
+\begin{lateximage}[(-chemfig-~\packagediagramname)]%
\LWR@chemfig@origchemup#1#2\chemdown#3%
\end{lateximage}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
index 6312ab8d43a..1530d4a536b 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
@@ -68,7 +68,7 @@
}
\RenewDocumentCommand \charrow { mO{}O{} }
{
- \begin{lateximage}[(charrow)]
+ \begin{lateximage}[(-chemformula- charrow)]
\group_begin:
\__chemformula_draw_arrow:nnn {#1} {#2} {#3}
\group_end:
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
index ac51f867237..ca0052c3cda 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
@@ -25,11 +25,11 @@
\ExplSyntaxOff
\DeclareDocumentEnvironment{polymerdelims}{}
-{\begin{lateximage}[(polymer)]}
+{\begin{lateximage}[(-chemmacros- polymer)]}
{\end{lateximage}}
\DeclareDocumentEnvironment{redoxreaction}{m m}
-{\begin{lateximage}[(redox~reaction)]}
+{\begin{lateximage}[(-chemmacros- redoxreaction)]}
{\end{lateximage}}
\ExplSyntaxOn
\AtBeginDocument{
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
index 984da43d311..1f9a65b90c3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
@@ -15,48 +15,48 @@
%% 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@ProvidesPackagePass{colortbl}
-
-\LetLtxMacro\LWR@origcolumncolor\columncolor
-\LetLtxMacro\LWR@origrowcolor\rowcolor
-\LetLtxMacro\LWR@origcellcolor\cellcolor
-\LetLtxMacro\LWR@origarrayrulecolor\arrayrulecolor
-\LetLtxMacro\LWR@origdoublerulesepcolor\doublerulesepcolor
-
-\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\columncolor\LWR@origcolumncolor%
-\LetLtxMacro\rowcolor\LWR@origrowcolor%
-\LetLtxMacro\cellcolor\LWR@origcellcolor%
-\LetLtxMacro\arrayrulecolor\LWR@origarrayrulecolor%
-\LetLtxMacro\doublerulesepcolor\LWR@origdoublerulesepcolor%
-}
+\let\rowcolor\relax
-\RenewDocumentCommand{\LWR@HTMLcolumncolor}{O{named} m o o}{%
+\LWR@ProvidesPackagePass{colortbl}
+\NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{%
\convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor%
\LWR@addtabularcellcolor%
}
-\RenewDocumentCommand{\LWR@HTMLrowcolor}{O{named} m o o}{%
+
+\LWR@formatted{columncolor}
+\NewDocumentCommand{\LWR@HTML@rowcolor}{O{named} m o o}{%
\convertcolorspec{#1}{#2}{HTML}\LWR@rowHTMLcolor%
\LWR@getmynexttoken%
}
-\RenewDocumentCommand{\LWR@HTMLcellcolor}{O{named} m o o}{%
+\LWR@expandableformatted{rowcolor}
+\NewDocumentCommand{\LWR@HTML@cellcolor}{O{named} m o o}{%
\convertcolorspec{#1}{#2}{HTML}\LWR@cellHTMLcolor%
\LWR@addtabularcellcolor%
}
-\renewcommand{\arrayrulecolor}[2][named]{%
+\LWR@formatted{cellcolor}
+
+\newcommand{\LWR@HTML@arrayrulecolor}[2][named]{%
\convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
}
-\renewcommand{\LWR@HTMLarrayrulecolor}[2][named]{%
+\LWR@expandableformatted{arrayrulecolor}
+
+\newcommand{\LWR@HTML@arrayrulecolornexttoken}[2][named]{%
\convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
\LWR@getmynexttoken%
}
-\renewcommand{\doublerulesepcolor}[2][named]{}
+\LWR@expandableformatted{arrayrulecolornexttoken}
+
+\newcommand{\LWR@HTML@doublerulesepcolor}[2][named]{}
+
+\LWR@expandableformatted{doublerulesepcolor}
+
+\newcommand{\LWR@HTML@doublerulesepcolornexttoken}[2][named]{\LWR@getmynexttoken}
-\renewcommand{\LWR@HTMLdoublerulesepcolor}[2][named]{\LWR@getmynexttoken}
+\LWR@expandableformatted{doublerulesepcolornexttoken}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ellipsis.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ellipsis.sty
index 2e9a077363d..5e646ec6dcf 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ellipsis.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ellipsis.sty
@@ -22,6 +22,8 @@
\newcommand{\ellipsisgap}{0.1em}
+\newcommand*{\midwordellipsis}{\,\textellipsis\,}
+
\endinput
%%
%% End of file `lwarp-ellipsis.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
index bac6611c7de..16b4229c91b 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
@@ -34,13 +34,13 @@
\DeclareDocumentCommand{\epigraph}{m m}
{
-\begin{LWR@BlockClassWP}{\LWR@origmbox{text-align:right}}{}{epigraph}
+\begin{LWR@BlockClassWP}{\LWR@print@mbox{text-align:right}}{}{epigraph}
\qitem{#1}{#2}
\end{LWR@BlockClassWP}
}
\DeclareDocumentEnvironment{epigraphs}{}
-{\LWR@BlockClassWP{\LWR@origmbox{text-align:right}}{}{epigraph}}
+{\LWR@BlockClassWP{\LWR@print@mbox{text-align:right}}{}{epigraph}}
{\endLWR@BlockClassWP}
\newenvironment*{flushepinormal}{}{}
\@ifclassloaded{memoir}{
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty
new file mode 100644
index 00000000000..a5b1afe8c3a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-errata.sty
@@ -0,0 +1,89 @@
+%%
+%% This is file `lwarp-errata.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `errata')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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.
+
+\StartDefiningMath
+
+\LWR@ProvidesPackagePass{errata}[2006/11/12]
+
+\xpatchcmd{\erratumAdd}
+ {$_a^{\arabic{erratum}}$}
+ {\textsubscript{a}\textsuperscript{\arabic{erratum}}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, erratumAdd macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratumDelete}
+ {$_d^{\arabic{erratum}}$}
+ {\textsubscript{d}\textsuperscript{\arabic{erratum}}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, erratumDelete macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratumReplace}
+ {$_r^{\arabic{erratum}}$}
+ {\textsubscript{r}\textsuperscript{\arabic{erratum}}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, erratumReplace macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratum}
+ {$_a$}
+ {\textsubscript{a}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, eDelete macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratum}
+ {$_d^{\@thefnmark}$}
+ {\textsubscript{d}\textsuperscript{\@thefnmark}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, eDelete macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\xpatchcmd{\erratum}
+ {$_r^{\@thefnmark}$}
+ {\textsubscript{r}\textsuperscript{\@thefnmark}}
+ {}
+ {
+ \PackageError{lwarp}
+ {Unable to patch the erratum package, eReplace macro}
+ {Please contact the author of the lwarp package.}
+ }
+
+\preto\PrintErrata{\LWR@orignewpage}
+
+\StopDefiningMath
+
+\endinput
+%%
+%% End of file `lwarp-errata.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
index 8d7469b0057..3e38b6cd48d 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
@@ -17,28 +17,35 @@
%% version 2005/12/01 or later.
-\LWR@ProvidesPackageDrop{float}[2016/03/04]
+\LWR@ProvidesPackageDrop{float}[2001/11/08]
+\newcommand*{\LWR@floatstyle}{plain}
+
\NewDocumentCommand{\newfloat}{m m m o}{%
\IfValueTF{#4}%
{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}%
{\DeclareFloatingEnvironment[fileext=#3]{#1}}%
+\csedef{LWR@floatstyle@#1}{\LWR@floatstyle}%
\cslet{listof#1s}\relax%
\cslet{listof#1es}\relax%
+\cslet{l@#1}\relax%
}
\NewDocumentCommand{\floatname}{m +m}{%
-\SetupFloatingEnvironment{#1}{name=#2}%
+ \SetupFloatingEnvironment{#1}{name=#2}%
}
\newcommand*{\floatplacement}[2]{%
-\SetupFloatingEnvironment{#1}{placement=#2}%
+ \SetupFloatingEnvironment{#1}{placement=#2}%
}
-\newcommand{\floatstyle}[1]{}
+\newcommand{\floatstyle}[1]{%
+ \def\LWR@floatstyle{#1}%
+}
\NewDocumentCommand{\restylefloat}{s m}{%
+ \csedef{LWR@floatstyle@#2}{\LWR@floatstyle}%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-glossary.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-glossary.sty
new file mode 100644
index 00000000000..1da608fc3cf
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-glossary.sty
@@ -0,0 +1,21 @@
+%%
+%% This is file `lwarp-glossary.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `glossary')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@loadnever{glossary}{glossaries}
+\endinput
+%%
+%% End of file `lwarp-glossary.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index dca1348eca7..6a8c37a1207 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -297,10 +297,8 @@ img src="%
\define@key{krotbox}{x}{}
\define@key{krotbox}{y}{}
\define@key{krotbox}{units}{}
-\LetLtxMacro\LWR@origrotatebox\rotatebox
-
\AtBeginDocument{
-\RenewDocumentCommand{\rotatebox}{O{} m +m}{%
+\NewDocumentCommand{\LWR@HTML@rotatebox}{O{} m +m}{%
\renewcommand*{\LWR@rotboxorigin}{}
\setkeys{krotbox}{#1}%
\LWR@htmltagc{span style="display: inline-block; %
@@ -315,12 +313,12 @@ img src="%
\LWR@htmltagc{/span}%
\end{LWR@nestspan}%
}
-}% AtBeginDocument
+\LWR@formatted{rotatebox}
-\LetLtxMacro\LWR@origscalebox\scalebox
+}% AtBeginDocument
\AtBeginDocument{
-\RenewDocumentCommand{\scalebox}{m o m}{%
+\NewDocumentCommand{\LWR@HTML@scalebox}{m o m}{%
\LWR@htmltagc{span style="display: inline-block; %
\LWR@scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
\LWR@scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
@@ -331,19 +329,29 @@ img src="%
\LWR@htmltagc{/span}%
\end{LWR@nestspan}%
}
-}% AtBeginDocument
+\LWR@formatted{scalebox}
-\let\LWR@origreflectbox\reflectbox
+}% AtBeginDocument
\AtBeginDocument{
-\renewcommand{\reflectbox}[1]{\scalebox{-1}[1]{#1}}
-}
-\LetLtxMacro\LWR@origresizebox\resizebox
+\newcommand{\LWR@HTML@reflectbox}[1]{%
+\scalebox{-1}[1]{#1}%
+}% \reflectbox
+
+\LWR@formatted{reflectbox}
+
+}% AtBeginDocument
\AtBeginDocument{
-\renewcommand{\resizebox}[3]{#3}
+
+\NewDocumentCommand{\LWR@HTML@resizebox}{s m m m}{%
+#4%
}
+
+\LWR@formatted{resizebox}
+
+}% AtBeginDocument
\endinput
%%
%% End of file `lwarp-graphics.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty
index 76f1b1cc37b..1699410e0d4 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
-\LWR@ProvidesPackagePass{graphicx}
+\LWR@ProvidesPackagePass{graphicx}[2017/06/01]
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty
index c8c0aa40793..d9151d0884c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty
@@ -30,8 +30,8 @@
{
\LWR@findhangingleftmargin%
\BlockClass[%
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
- \LWR@origmbox{text-indent:-\LWR@printlength{\hangingindent}}%
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
+ \LWR@print@mbox{text-indent:-\LWR@printlength{\hangingindent}}%
]%
{hangingpar}%
}
@@ -43,11 +43,11 @@
\renewcommand*{\LWR@printopenlist}{%
\LWR@findhangingleftmargin%
ul style="%
- \LWR@origmbox{list-style-type:none;} % extra space
- \LWR@origmbox{%
+ \LWR@print@mbox{list-style-type:none;} % extra space
+ \LWR@print@mbox{%
margin-left:\LWR@printlength{\LWR@templengthone}%
} ; % extra space
- \LWR@origmbox{%
+ \LWR@print@mbox{%
text-indent:-\LWR@printlength{\hangingindent}%
}%
"%
@@ -68,8 +68,8 @@
{%
\BlockClass[%
\LWR@findhangingleftmargin%
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
- \LWR@origmbox{text-indent:-\LWR@printlength{\hangingindent}}%
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ; %
+ \LWR@print@mbox{text-indent:-\LWR@printlength{\hangingindent}}%
]{labeledpar}#2%
}
{\endBlockClass}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty
index 2125c8b5b0b..d0532f9afee 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty
@@ -28,8 +28,8 @@
\newenvironment*{hangparas}[2]
{%
\BlockClass[%
- \LWR@origmbox{margin-left:\LWR@printlength{#1}} ; %
- \LWR@origmbox{text-indent:-\LWR@printlength{#1}}%
+ \LWR@print@mbox{margin-left:\LWR@printlength{#1}} ; %
+ \LWR@print@mbox{text-indent:-\LWR@printlength{#1}}%
]%
{hangingpar}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
index 471402b46fc..0e07bb2eec9 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
@@ -65,7 +65,7 @@
\newcommand{\LWR@hyperreffinish}[1]{%
\begingroup%
-\LetLtxMacro\ref\LWR@origref%{} syntax highlighting
+\RenewDocumentCommand{\ref}{}{\LWR@ref@ignorestar}%
#1%
\endgroup%
\LWR@htmltag{/a}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ltablex.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ltablex.sty
new file mode 100644
index 00000000000..f847e68a514
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ltablex.sty
@@ -0,0 +1,36 @@
+%%
+%% This is file `lwarp-ltablex.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `ltablex')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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.
+
+
+\RequirePackage{tabularx}
+
+\LWR@ProvidesPackageDrop{ltablex}
+
+\DeclareDocumentEnvironment{tabularx}{m o m}
+{\longtable{#3}}
+{\endlongtable}
+
+\DeclareDocumentEnvironment{tabularx*}{m o m}
+{\longtable{#3}}
+{\endlongtable}
+
+\newcommand*{\keepXColumns}{}
+\newcommand*{\convertXColumns}{}
+\endinput
+%%
+%% End of file `lwarp-ltablex.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-marginnote.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-marginnote.sty
index 1b378f126da..5109a2a9d36 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-marginnote.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-marginnote.sty
@@ -16,7 +16,7 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{marginnote}
-\NewDocumentCommand{\marginnote}{o +m o}{\marginpar{#2}}
+\NewDocumentCommand{\marginnote}{+o +m o}{\marginpar{#2}}
\newcommand*{\marginnoteleftadjust}{}
\newcommand*{\marginnoterightadjust}{}
\newcommand*{\marginnotetextwidth}{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
index 201d4e1fa7e..1e466a76d67 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
@@ -68,9 +68,9 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
{box-shadow: none ;}
\LWR@orignewline
"}
-\LetLtxMacro\hspace\LWR@orighspace%
-\LetLtxMacro\rule\LWR@origrule%
-\LetLtxMacro\makebox\LWR@origmakebox%
+\LWR@select@print@hspace%
+\renewcommand*{\rule}{\LWR@print@rule}
+\LetLtxMacro\makebox\LWR@print@makebox%
\LWR@startpars%
\LWR@traceinfo{LWR@mdframedstart done}%
}
@@ -134,13 +134,6 @@ background:
\LWR@mdfprintcolor{frametitlerulecolor}
; \LWR@orignewline
}{}%
-border-radius:
-\setlength{\LWR@titleroundcorner}
- {\maxof{\mdf@roundcorner@length-\mdf@linewidth@length}{0pt}}
- \LWR@printlength{\LWR@titleroundcorner}
- \LWR@printlength{\LWR@titleroundcorner}
- 0pt 0pt
- \LWR@orignewline
" \LWR@orignewline
}% span
\begin{LWR@nestspan}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty
index 3db01cc4288..960b79ce4b7 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{midpage}
\newenvironment{midpage}
-{\begin{BlockClass}[\LWR@origmbox{margin-top:6ex} ; \LWR@origmbox{margin-bottom:6ex}]{midpage}}
+{\begin{BlockClass}[\LWR@print@mbox{margin-top:6ex} ; \LWR@print@mbox{margin-bottom:6ex}]{midpage}}
{\end{BlockClass}}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
index fe5c77919ec..28dc558d3bb 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
@@ -17,22 +17,22 @@
%% version 2005/12/01 or later.
+\LetLtxMacro\multirow\relax
\LWR@ProvidesPackagePass{multirow}
-\LetLtxMacro\LWR@origmultirow\multirow
\newcommand{\LWR@multirowborder}{}
-\RenewDocumentCommand{\multirow}{O{c} m o m o +m}%
+\NewDocumentCommand{\LWR@HTML@multirow}{O{c} m o m o +m}%
{%
-\LWR@traceinfo{*** multirow #1 #2 #4}%
+\LWR@traceinfo{*** LWR@HTML@multirow #1 #2 #4}%
\LWR@maybenewtablerow%
\LWR@tabularleftedge%
\LWR@htmltag{td rowspan="#2" %
\IfValueT{#1}{%
-\ifstrequal{#1}{b}{style="\LWR@origmbox{vertical-align:bottom}" }{}%
-\ifstrequal{#1}{t}{style="\LWR@origmbox{vertical-align:top}" }{}%
+\ifstrequal{#1}{b}{style="\LWR@print@mbox{vertical-align:bottom}" }{}%
+\ifstrequal{#1}{t}{style="\LWR@print@mbox{vertical-align:top}" }{}%
}%
\ifdefvoid{\LWR@multirowborder}{}{%
-style="\LWR@origmbox{border-\LWR@multirowborder:} 2px dotted black ; %
-\LWR@origmbox{padding-\LWR@multirowborder:} 2px" %
+style="\LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; %
+\LWR@print@mbox{padding-\LWR@multirowborder:} 2px" %
}%
class="td%
\StrChar{\LWR@tablecolspec}{\arabic{LWR@tablecolindex}}%
@@ -51,9 +51,13 @@ class="td%
\LWR@stoppars%
\global\boolfalse{LWR@intabularmetadata}%
\renewcommand{\LWR@multirowborder}{}%
-\LWR@traceinfo{*** multirow done}%
+\LWR@traceinfo{*** LWR@HTML@multirow done}%
}%
-\NewDocumentCommand{\multicolumnrow}{m m O{} m O{} m O{} +m}{%
+
+\LWR@formatted{multirow}
+\AtBeginDocument{
+
+\NewExpandableDocumentCommand{\LWR@HTML@multicolumnrow}{m m O{} m O{} m O{} +m}{%
\LWR@tabularhtmlcolumns{\arabic{LWR@tablecolindex}}{#1}
\begingroup%
\LetLtxMacro{\\}{\LWR@endofline}%
@@ -63,10 +67,10 @@ class="td%
\addtocounter{LWR@tablecolindex}{-1}%
\booltrue{LWR@skipatbang}%
}
-\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\multirow\LWR@origmultirow%
-\renewcommand{\multicolumnrow}{\LWR@origmulticolumnrow}%
-}
+
+\LWR@expandableformatted{multicolumnrow}
+
+}% \AtBeginDocument
\endinput
%%
%% End of file `lwarp-multirow.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
index 1f17398031e..03a10225b09 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
@@ -180,7 +180,7 @@
\newcommand{\LWR@inctheorem}{%
\addtocounter{LWR@thisautoid}{1}%
\LWR@stoppars%
-\LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
\LWR@startpars%
}
\gdef\newtheoremstyle#1#2#3{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty
index 1e910514fe9..12507113ccb 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-quoting.sty
@@ -24,7 +24,7 @@
{
\PackageError{lwarp}
{Unable to patch the quoting package}
- {Please contact the author of lwarp.}
+ {Please contact the author of the lwarp package.}
}
\xpatchcmd{\endquoting}{\quo@endtext}
{\quo@endtext\end{LWR@blocktextcurrentfont}}
@@ -32,7 +32,7 @@
{
\PackageError{lwarp}
{Unable to patch the quoting package}
- {Please contact the author of lwarp.}
+ {Please contact the author of the lwarp package.}
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
index d3a8e5e2444..2cb38b2edb8 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
@@ -28,8 +28,12 @@
\newcommand*{\LWR@setrealscriptsalign}[1]{%
\renewcommand*{\LWR@realscriptsalign}{}%
-\ifthenelse{\equal{#1}{c}}{\renewcommand{\LWR@realscriptsalign}{\LWR@origmbox{text-align:center} ; }}{}%
-\ifthenelse{\equal{#1}{r}}{\renewcommand{\LWR@realscriptsalign}{\LWR@origmbox{text-align:right} ; }}{}%
+\ifthenelse{\equal{#1}{c}}{%
+ \renewcommand{\LWR@realscriptsalign}{\LWR@print@mbox{text-align:center} ; }%
+}{}%
+\ifthenelse{\equal{#1}{r}}{%
+ \renewcommand{\LWR@realscriptsalign}{\LWR@print@mbox{text-align:right} ; }%
+}{}%
}
\DeclareDocumentCommand \textsubsuperscript {s O{l} mm} {%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty
new file mode 100644
index 00000000000..8b9f58362aa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-register.sty
@@ -0,0 +1,40 @@
+%%
+%% This is file `lwarp-register.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `register')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@ProvidesPackagePass{register}
+
+\xpatchcmd{\register}
+ {\centering}
+ {\begin{center}\begin{lateximage}[-register-~\packagediagramname]}
+ {\typeout{Patch register success.}}
+ {\typeout{Patch register failure.}}
+
+\xpatchcmd{\endregister}
+ {\leftskip}
+ {%
+ \end{lateximage}\end{center}%
+ \leftskip%
+ }%
+ {\typeout{Patch endregister success.}}
+ {\typeout{Patch endregister failure.}}
+
+\setlength{\regWidth}{5in}
+
+\endinput
+%%
+%% End of file `lwarp-register.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty
index 809d42dbae3..8c807659fbc 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
-\LWR@ProvidesPackageDrop{rotfloat}
+\LWR@ProvidesPackageDrop{rotfloat}[2004/01/04]
\RequirePackage{float}
\RenewDocumentCommand{\newfloat}{m m m o}{%
@@ -27,12 +27,15 @@
}%
{%
\DeclareFloatingEnvironment[fileext=#3]{#1}%
- \DeclareFloatingEnvironment[fileext=#3]{sideways#1}%
}%
\csletcs{sideways#1}{#1}%
\csletcs{endsideways#1}{end#1}%
+\csedef{LWR@floatstyle@#1}{\LWR@floatstyle}%
+\csedef{LWR@floatstyle@sideways#1}{\LWR@floatstyle}%
\cslet{listof#1s}\relax%
\cslet{listof#1es}\relax%
+\cslet{listofsideways#1s}\relax%
+\cslet{listofsideways#1es}\relax%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-scrextend.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-scrextend.sty
index 277804e8f0d..3e67d4dc2c1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-scrextend.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-scrextend.sty
@@ -78,12 +78,12 @@
\DeclareDocumentCommand{\raggedfootnote}{}{}
\DeclareDocumentCommand{\dictum}{o m}{
-\begin{LWR@BlockClassWP}{\LWR@origmbox{text-align:right}}{}{dictum}
+\begin{LWR@BlockClassWP}{\LWR@print@mbox{text-align:right}}{}{dictum}
#2
\IfValueT{#1}
{
\ifbool{FormatWP}
- {\begin{BlockClass}[\LWR@origmbox{border-top:} 1px solid gray]{dictumauthor}}
+ {\begin{BlockClass}[\LWR@print@mbox{border-top:} 1px solid gray]{dictumauthor}}
{\begin{BlockClass}{dictumauthor}}
\dictumauthorformat{#1}
\end{BlockClass}
@@ -123,15 +123,15 @@
\ifblank{#2}
{
\begin{BlockClass}[
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthtwo}} ;
- \LWR@origmbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthtwo}} ;
+ \LWR@print@mbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
]{addmargin}
}
{
\setlength{\LWR@templengthone}{#2}
\begin{BlockClass}[
- \LWR@origmbox{margin-left:\LWR@printlength{\LWR@templengthone}} ;
- \LWR@origmbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
+ \LWR@print@mbox{margin-left:\LWR@printlength{\LWR@templengthone}} ;
+ \LWR@print@mbox{margin-right:\LWR@printlength{\LWR@templengthtwo}}
]{addmargin}
}
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
index a8714119c7c..34b6190c005 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
@@ -68,7 +68,7 @@
\int_new:c { c__siunitx_math #1 _int }
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\hbox_set:Nn \l__siunitx_tmp_box
{
\ensuremath
@@ -86,7 +86,7 @@
\cs_new_protected:Npn \__siunitx_combined_output:n #1 {
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_if:NTF \l__siunitx_number_parse_bool
{
\tl_clear:N \l__siunitx_number_out_tl
@@ -172,7 +172,7 @@
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueF {#1}
{ \keys_set:nn { siunitx } {#1} }
@@ -184,7 +184,7 @@
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueF {#1}
{ \keys_set:nn { siunitx } {#1} }
@@ -195,7 +195,7 @@
\RenewDocumentCommand \ang { o > { \SplitArgument { 2 } { ; } } m } {
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\IfNoValueF {#1}
{ \keys_set:nn { siunitx } {#1} }
\__siunitx_angle_output:nnn #2
@@ -206,7 +206,7 @@
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueTF {#1}
{ \__siunitx_unit_output:nn {#2} { } }
@@ -222,7 +222,7 @@
\leavevmode
\group_begin:% lwarp
\LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp
- \LetLtxMacro\mbox\LWR@origmbox% lwarp
+ \LetLtxMacro\mbox\LWR@print@mbox% lwarp
\bool_set_false:N \l__siunitx_font_set_bool
\IfNoValueTF {#1}
{ \__siunitx_range_unit:nnnn {#4} { } {#2} {#3} }
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
index 0c90b0e23d7..62deae06142 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
@@ -34,8 +34,8 @@
\appto\endpgfpicture{\end{lateximage}}
-\LetLtxMacro\pgfutil@minipage\LWR@origminipage
-\let\pgfutil@endminipage\LWR@origendminipage
+\LetLtxMacro\pgfutil@minipage\LWR@print@minipage
+\let\pgfutil@endminipage\endLWR@print@minipage
\let\pgfutil@raggedleft\LWR@origraggedleft
\let\pgfutil@raggedright\LWR@origraggedright
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-trimclip.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-trimclip.sty
new file mode 100644
index 00000000000..40d104cbafa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-trimclip.sty
@@ -0,0 +1,35 @@
+%%
+%% This is file `lwarp-trimclip.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `trimclip')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@ProvidesPackageDrop{trimclip}
+\csdef{trimbox}{\@ifstar\@gobble\@gobble}
+\csletcs{trimbox*}{trimbox}
+\def\endtrimbox{}
+\csletcs{endtrimbox*}{endtrimbox}
+
+\csletcs{clipbox}{trimbox}
+\csletcs{clipbox*}{trimbox}
+\csletcs{endclipbox}{endtrimbox}
+\csletcs{endclipbox*}{endtrimbox}
+
+\csletcs{marginbox}{trimbox}
+\csletcs{marginbox*}{trimbox}
+\csletcs{endmarginbox}{endtrimbox}
+\csletcs{endmarginbox*}{endtrimbox}
+\endinput
+%%
+%% End of file `lwarp-trimclip.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty
new file mode 100644
index 00000000000..bfd2c5d11fb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-vowel.sty
@@ -0,0 +1,33 @@
+%%
+%% This is file `lwarp-vowel.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `vowel')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@ProvidesPackagePass{vowel}
+
+\renewenvironment{vowel}[1][]
+ {%
+ \begin{lateximage}[(-vowel-~\packagediagramname)]%
+ \@vowel[#1]%
+ }
+ {%
+ \@@vowel%
+ \end{lateximage}%
+ }
+
+\endinput
+%%
+%% End of file `lwarp-vowel.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
index b5dafa63d0d..07a28b02ccd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
@@ -20,21 +20,11 @@
\LWR@ProvidesPackagePass{xcolor}
\begin{warpHTML}
-\LetLtxMacro\LWRprint@textcolor\textcolor
-\LetLtxMacro\LWRprint@pagecolor\pagecolor
-\LetLtxMacro\LWRprint@nopagecolor\nopagecolor
-\LetLtxMacro\LWRprint@colorbox\colorbox
-\LetLtxMacro\LWRprint@colorboxBlock\colorbox
-\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
-\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
-\LetLtxMacro\LWRorigprint@boxframe\boxframe
+\LetLtxMacro\LWR@print@pagecolor\pagecolor
+\LetLtxMacro\LWR@print@nopagecolor\nopagecolor
\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\textcolor\LWRprint@textcolor%
-\LetLtxMacro\pagecolor\LWRprint@pagecolor%
-\LetLtxMacro\nopagecolor\LWRprint@nopagecolor%
-\LetLtxMacro\colorbox\LWRprint@colorbox%
-\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
-\LetLtxMacro\boxframe\LWRorigprint@boxframe%
+\LetLtxMacro\pagecolor\LWR@print@pagecolor%
+\LetLtxMacro\nopagecolor\LWR@print@nopagecolor%
}
\renewcommand*{\LWR@findcurrenttextcolor}{%
\protect\colorlet{LWR@current@color}{.}%
@@ -76,7 +66,7 @@
border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; %
padding:\LWR@printlength{\fboxsep}%
}
-\RenewDocumentCommand{\textcolor}{o m m}{%
+\NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{%
\begingroup%
\IfValueTF{#1}{%
\color[#1]{#2}%
@@ -98,11 +88,13 @@ padding:\LWR@printlength{\fboxsep}%
\endgroup%
}
+\LWR@formatted{textcolor}
+
\renewcommand*{\pagecolor}[2][named]{}
\renewcommand*{\nopagecolor}{}
-\RenewDocumentCommand{\colorbox}{O{named} m +m}{%
+\NewDocumentCommand{\LWR@HTML@colorbox}{O{named} m +m}{%
\begingroup%
\LWR@FBcancel%
\InlineClass[%
@@ -112,7 +104,11 @@ padding:\LWR@printlength{\fboxsep}%
\endgroup%
}
-\NewDocumentCommand{\colorboxBlock}{O{named} m +m}{%
+\AtBeginDocument{
+\LWR@formatted{colorbox}
+}
+
+\NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{%
\begingroup%
\LWR@FBcancel%
\begin{BlockClass}[%
@@ -124,7 +120,11 @@ padding:\LWR@printlength{\fboxsep}%
\endgroup%
}
-\RenewDocumentCommand{\fcolorbox}{O{named} m O{named} m +m}{%
+\AtBeginDocument{
+\LWR@formatted{colorboxBlock}
+}
+
+\NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{named} m +m}{%
\LWR@traceinfo{HTML fcolorbox #2 #4}%
\begingroup%
\LWR@FBcancel%
@@ -144,7 +144,11 @@ padding:\LWR@printlength{\fboxsep}%
\endgroup%
}
-\NewDocumentCommand{\fcolorboxBlock}{O{named} m O{named} m +m}{%
+\AtBeginDocument{
+\LWR@formatted{fcolorbox}
+}
+
+\NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{named} m +m}{%
\LWR@traceinfo{HTML fcolorboxBlock #2 #4}%
\begingroup%
\LWR@FBcancel%
@@ -170,6 +174,10 @@ padding:\LWR@printlength{\fboxsep}%
\LWR@traceinfo{HTML fcolorboxBlock done}%
}
+\AtBeginDocument{
+\LWR@formatted{fcolorboxBlock}
+}
+
\NewDocumentCommand{\LWR@subfcolorminipage}{m m m m}{%
\begin{BlockClass}[%
#3%
@@ -178,7 +186,7 @@ padding:\LWR@printlength{\fboxsep}%
width:\LWR@printlength{\LWR@tempwidth}%
]{fcolorminipage}%
}
-\NewDocumentEnvironment{fcolorminipage}{O{named} m O{named} m O{c} o o m}
+\NewDocumentEnvironment{LWR@HTML@fcolorminipage}{O{named} m O{named} m O{c} o o m}
{%
\LWR@FBcancel%
\setlength{\LWR@tempwidth}{#8}%
@@ -193,12 +201,17 @@ width:\LWR@printlength{\LWR@tempwidth}%
}%
}
{\end{BlockClass}}
-\renewcommand*{\boxframe}[3]{%
+
+\AtBeginDocument{
+\LWR@formattedenv{fcolorminipage}
+}
+\newcommand*{\LWR@HTML@boxframe}[3]{%
{%
\setlength{\LWR@tempwidth}{#1}%
\setlength{\LWR@tempheight}{#2}%
\addtolength{\LWR@tempheight}{#3}%
\LWR@forceminwidth{\fboxrule}%
+\LWR@findcurrenttextcolor%
\InlineClass[%
display:inline-block ; %
border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; %
@@ -207,6 +220,8 @@ height:\LWR@printlength{\LWR@tempheight}%
]{boxframe}{}%
}%
}
+
+\LWR@formatted{boxframe}
\newcommand*{\LWR@xcolortempcolor}{}
\def\rowc@l@rs[#1]#2#3#4%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xellipsis.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xellipsis.sty
new file mode 100644
index 00000000000..0d0caad9d86
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xellipsis.sty
@@ -0,0 +1,53 @@
+%%
+%% This is file `lwarp-xellipsis.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `xellipsis')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@ProvidesPackagePass{xellipsis}
+
+\newcommand*{\LWR@xellipsespace}[1]{%
+\ifdim#1=0pt\else%
+ \ifdim#1<\fontdimen2\font%
+ \,%
+ \else%
+ ~%
+ \fi%
+\fi%
+}
+
+\def\xelip{%
+\mbox{%
+ \LWR@xellipsespace{\xelipprebef}%
+ \xelipprechar%
+ \LWR@xellipsespace{\xelippreaft}%
+ \LWR@xellipsespace{\xelipbef}%
+ \xelipchar%
+ \xel@loopi = 1%
+ \loop\ifnum\xelipnum>\xel@loopi%
+ \advance\xel@loopi by1%
+ \LWR@xellipsespace{\xelipgap}%
+ \xelipchar%
+ \repeat%
+ \LWR@xellipsespace{\xelipaft}%
+ \LWR@xellipsespace{\xelippostbef}%
+ \xelippostchar%
+ \LWR@xellipsespace{\xelippostaft}%
+}%
+}%
+
+\endinput
+%%
+%% End of file `lwarp-xellipsis.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
index 9744eb1546d..d82834964ad 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
@@ -38,18 +38,16 @@
\LWR@htmltagc{/span}%
\endLWR@nestspan%
}
-\NewDocumentCommand{\LWR@noscalebox}{m o m}{#3}
-
\DeclareInstance{xfrac}{default}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -59,13 +57,13 @@ scaling = false
\DeclareInstance{xfrac}{lmr}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -75,13 +73,13 @@ scaling = false
\DeclareInstance{xfrac}{lmss}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
@@ -91,13 +89,13 @@ scaling = false
\DeclareInstance{xfrac}{lmtt}{text}{
numerator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart\textsuperscript{#1}\,\LWR@htmlsmallfontend%
\endgroup%
},
denominator-format = {%
\begingroup%
-\LetLtxMacro{\scalebox}{\LWR@noscalebox}%
+\RenewDocumentCommand{\scalebox}{m o m}{##3}%
\LWR@htmlsmallfontstart{}\,#1\LWR@htmlsmallfontend%
\endgroup%
},
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xltabular.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xltabular.sty
new file mode 100644
index 00000000000..7a4ad2b39ef
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xltabular.sty
@@ -0,0 +1,29 @@
+%%
+%% This is file `lwarp-xltabular.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `xltabular')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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.
+
+
+\RequirePackage{tabularx}
+
+\LWR@ProvidesPackageDrop{xltabular}
+
+\DeclareDocumentEnvironment{xltabular}{o m m}
+{\longtable{#3}}
+{\endlongtable}
+\endinput
+%%
+%% End of file `lwarp-xltabular.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty
new file mode 100644
index 00000000000..274a299126a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xpiano.sty
@@ -0,0 +1,41 @@
+%%
+%% This is file `lwarp-xpiano.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `xpiano')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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@ProvidesPackagePass{xpiano}
+
+\ExplSyntaxOn
+\NewDocumentCommand{\LWR@print@keyboard}{ O{}m }
+{
+\xpiano_keyboard:nn { #1 } { #2 }
+}
+
+\NewDocumentCommand{\LWR@HTML@keyboard}{ O{}m }
+{
+\begin{lateximage}*
+ [-xpiano-~\packagediagramname{}: \detokenize\expandafter{#2}]
+ [\detokenize\expandafter{#1}]
+\xpiano_keyboard:nn { #1 } { #2 }
+\end{lateximage}
+}
+\ExplSyntaxOff
+
+\LWR@formatted{keyboard}
+
+\endinput
+%%
+%% End of file `lwarp-xpiano.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
index 153ae8015f3..03fe67998e5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
@@ -20,14 +20,14 @@
\AtBeginDocument{
-\preto{\xy}{\begin{lateximage}[(xy)]}
+\preto{\xy}{\begin{lateximage}[(-xy-~\packagediagramname)]}
\appto{\endxy}{\end{lateximage}}
\@ifundefined{xymatrix}{}{
\LetLtxMacro\LWR@origxymatrix\xymatrix
\renewcommand{\xymatrix}[1]{%
-\begin{lateximage}[(xymatrix)]
+\begin{lateximage}[(-xy- xymatrix \packagediagramname)]
\LWR@origxymatrix{#1}
\end{lateximage}
}
@@ -37,7 +37,7 @@
\LetLtxMacro\LWR@origxygraph\xygraph
\renewcommand{\xygraph}[1]{%
-\begin{lateximage}[(xygraph)]
+\begin{lateximage}[(-xy- xygraph \packagediagramname)]
\LWR@origxygraph{#1}
\end{lateximage}
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 6d24427a28d..15e1819cb54 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}
- [2018/05/12 v0.56 Allows LaTeX to directly produce HTML5 output.]
+ [2018/06/06 v0.57 Allows LaTeX to directly produce HTML5 output.]
@@ -264,6 +264,7 @@ For a possible alternative, see package(s) #2.}
\LWR@earlyloadnever{boxedminipage}{boxedminipage2e}
\LWR@earlyloadnever{caption2}{caption}
\LWR@earlyloadnever{fancyheadings}{fancyhdr}
+\LWR@earlyloadnever{glossary}{glossaries}
\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx}
\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
\LWR@loadafter{a4}
@@ -274,7 +275,10 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{acronym}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
+\LWR@loadafter{ae}
+\LWR@loadafter{aecc}
\LWR@loadafter{afterpage}
+\LWR@loadafter{algorithm2e}
\LWR@loadafter{algorithmicx}
\LWR@loadafter{alltt}
\LWR@loadafter{amsmath}
@@ -299,6 +303,8 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{bytefield}
\LWR@loadafter{cancel}
\LWR@loadafter{caption}
+\LWR@loadafter{caption2}
+\LWR@loadafter{ccaption}
\LWR@loadafter{changebar}
\LWR@notmemoirloadafter{changepage}
\LWR@notmemoirloadafter{chngpage}
@@ -333,12 +339,14 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{epigraph}
\LWR@loadafter{epstopdf}
\LWR@loadafter{epstopdf-base}
+\LWR@loadafter{errata}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
\LWR@loadafter{extramarks}
\LWR@loadafter{fancybox}
\LWR@loadafter{fancyhdr}
+\LWR@loadafter{fancyheadings}
\LWR@loadafter{fancyref}
\LWR@loadafter{fancyvrb}
\LWR@loadafter{figcaps}
@@ -368,6 +376,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{fwlw}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
+\LWR@loadafter{glossary}
\LWR@loadafter{grffile}
\LWR@loadafter{grid}
\LWR@loadafter{gridset}
@@ -391,6 +400,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{listings}
\LWR@loadafter{longtable}
\LWR@loadafter{lscape}
+\LWR@loadafter{ltablex}
\LWR@loadafter{ltcaption}
\LWR@loadafter{ltxgrid}
\LWR@loadafter{ltxtable}
@@ -446,6 +456,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{quoting}
\LWR@loadafter{ragged2e}
\LWR@loadafter{realscripts}
+\LWR@loadafter{register}
\LWR@loadafter{relsize}
\LWR@loadafter{resizegather}
\LWR@loadafter{romanbar}
@@ -477,6 +488,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{subfig}
\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
+\LWR@loadafter{t1inc}
\LWR@loadafter{tabls}
\LWR@notmemoirloadafter{tabularx}
\LWR@loadafter{tabulary}
@@ -497,6 +509,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
\LWR@loadafter{transparent}
+\LWR@loadafter{trimclip}
\LWR@loadafter{trivfloat}
\LWR@loadafter{turnthepage}
\LWR@loadafter{ulem}
@@ -507,14 +520,19 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{verse}
\LWR@loadafter{vertbars}
\LWR@loadafter{vmargin}
+\LWR@loadafter{vowel}
\LWR@loadafter{vwcol}
\LWR@loadafter{wallpaper}
+\LWR@loadafter{wasysym}
\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
\LWR@loadafter{xcolor}
+\LWR@loadafter{xellipsis}
\LWR@loadafter{xfrac}
+\LWR@loadafter{xltabular}
\LWR@loadafter{xltxtra}
\LWR@loadafter{xmpincl}
+\LWR@loadafter{xpiano}
\LWR@loadafter{xtab}
\LWR@loadafter{xurl}
\LWR@loadafter{xy}
@@ -645,7 +663,7 @@ top=1in,bottom=1in,%
\begin{warpHTML}
-\LetLtxMacro{\LWR@origRequirePackage}{\RequirePackage}
+\LetLtxMacro\LWR@origRequirePackage\RequirePackage
\newcommand*{\LWR@requirepackagenames}{}
@@ -706,7 +724,7 @@ top=1in,bottom=1in,%
{\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}%
}%
}
-\LetLtxMacro{\usepackage}{\RequirePackage}
+\LetLtxMacro\usepackage\RequirePackage
\NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{
\PackageInfo{lwarp}{Using package `#1' and adding lwarp modifications, including options,}%
@@ -830,7 +848,6 @@ top=1in,bottom=1in,%
\ifbool{LWR@tracinglwarp}%
{%
\typeout{*** lwarp: #1}%
- % \PackageInfo{lwarp}{#1 : }%
}%
{}%
}
@@ -848,6 +865,63 @@ top=1in,bottom=1in,%
\end{warpall}
+
+
+
+\begin{warpHTML}
+\newcommand*{\LWR@formatting}{HTML}
+\newcommand*{\LWR@formatted}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ }{}%
+ \ifcsundef{#1}{%
+ \expandafter\newrobustcmd\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }{%
+ \expandafter\renewrobustcmd\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }%
+}
+\newcommand*{\LWR@expandableformatted}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ }{}%
+ \ifcsundef{#1}{%
+ \expandafter\newcommand\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }{%
+ \expandafter\renewcommand\csname #1\endcsname{%
+ \csuse{LWR@\LWR@formatting @#1}%
+ }%
+ }%
+}
+\newcommand*{\LWR@formattedenv}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ \csletcs{endLWR@print@#1}{end#1}%
+ }{}%
+ \DeclareDocumentEnvironment{#1}{}%
+ {\csuse{LWR@\LWR@formatting @#1}}%
+ {\csuse{endLWR@\LWR@formatting @#1}}%
+}
+\newcommand*{\LWR@expandableformattedenv}[1]{%
+ \ifcsundef{LWR@print@#1}{%
+ \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
+ \csname#1\endcsname%
+ \csletcs{endLWR@print@#1}{end#1}%
+ }{}%
+ \DeclareExpandableDocumentEnvironment{#1}{}%
+ {\csuse{LWR@\LWR@formatting @#1}}%
+ {\csuse{endLWR@\LWR@formatting @#1}}%
+}
+\end{warpHTML}
+
\begin{warpall}
\newbool{FormatEPUB}
\boolfalse{FormatEPUB}
@@ -939,8 +1013,6 @@ top=1in,bottom=1in,%
\begin{warpHTML}
-\LetLtxMacro\LWR@origmbox\mbox
-\LetLtxMacro\LWR@origmakebox\makebox
\chardef\LWR@origpound=`\#
\let\LWR@origcomma\,
\let\LWR@origthinspace\thinspace
@@ -948,17 +1020,13 @@ top=1in,bottom=1in,%
\let\LWR@origenskip\enskip
\let\LWR@origquad\quad
\let\LWR@origqquad\qquad
-
-\let\LWR@orighspace\hspace
\let\LWR@orighfill\hfill
\let\LWR@orighfil\hfil
-\let\LWR@origvspace\vspace
\let\LWR@orighss\hss
\let\LWR@origllap\llap
\let\LWR@origrlap\rlap
\let\LWR@orighfilneg\hfilneg
-\let\LWR@origrule\rule
\let\LWR@orighrulefill\hrulefill
\let\LWR@origdotfill\dotfill
@@ -978,29 +1046,29 @@ top=1in,bottom=1in,%
\let\LWR@orighuge\huge
\let\LWR@origHuge\Huge
-\LetLtxMacro{\LWR@origtextrm}{\textrm}
-\LetLtxMacro{\LWR@origtextsf}{\textsf}
-\LetLtxMacro{\LWR@origtexttt}{\texttt}
-\LetLtxMacro{\LWR@origtextnormal}{\textnormal}
-\LetLtxMacro{\LWR@origtextbf}{\textbf}
-\LetLtxMacro{\LWR@origtextmd}{\textmd}
-\LetLtxMacro{\LWR@origtextit}{\textit}
-\LetLtxMacro{\LWR@origtextsl}{\textsl}
-\LetLtxMacro{\LWR@origtextsc}{\textsc}
-\LetLtxMacro{\LWR@origtextup}{\textup}
-\LetLtxMacro{\LWR@origemph}{\emph}
-
-\LetLtxMacro{\LWR@origrmfamily}{\rmfamily}
-\LetLtxMacro{\LWR@origsffamily}{\sffamily}
-\LetLtxMacro{\LWR@origttfamily}{\ttfamily}
-\LetLtxMacro{\LWR@origbfseries}{\bfseries}
-\LetLtxMacro{\LWR@origmdseries}{\mdseries}
-\LetLtxMacro{\LWR@origupshape}{\upshape}
-\LetLtxMacro{\LWR@origslshape}{\slshape}
-\LetLtxMacro{\LWR@origscshape}{\scshape}
-\LetLtxMacro{\LWR@origitshape}{\itshape}
-\LetLtxMacro{\LWR@origem}{\em}
-\LetLtxMacro{\LWR@orignormalfont}{\normalfont}
+\LetLtxMacro\LWR@origtextrm\textrm
+\LetLtxMacro\LWR@origtextsf\textsf
+\LetLtxMacro\LWR@origtexttt\texttt
+\LetLtxMacro\LWR@origtextnormal\textnormal
+\LetLtxMacro\LWR@origtextbf\textbf
+\LetLtxMacro\LWR@origtextmd\textmd
+\LetLtxMacro\LWR@origtextit\textit
+\LetLtxMacro\LWR@origtextsl\textsl
+\LetLtxMacro\LWR@origtextsc\textsc
+\LetLtxMacro\LWR@origtextup\textup
+\LetLtxMacro\LWR@origemph\emph
+
+\LetLtxMacro\LWR@origrmfamily\rmfamily
+\LetLtxMacro\LWR@origsffamily\sffamily
+\LetLtxMacro\LWR@origttfamily\ttfamily
+\LetLtxMacro\LWR@origbfseries\bfseries
+\LetLtxMacro\LWR@origmdseries\mdseries
+\LetLtxMacro\LWR@origupshape\upshape
+\LetLtxMacro\LWR@origslshape\slshape
+\LetLtxMacro\LWR@origscshape\scshape
+\LetLtxMacro\LWR@origitshape\itshape
+\LetLtxMacro\LWR@origem\em
+\LetLtxMacro\LWR@orignormalfont\normalfont
\let\LWR@origraggedright\raggedright
\let\LWR@origonecolumn\onecolumn
@@ -1025,10 +1093,6 @@ top=1in,bottom=1in,%
\let\LWR@origthispagestyle\thispagestyle
\LetLtxMacro\LWR@origpagenumbering\pagenumbering
-\LetLtxMacro\LWR@origminipage\minipage
-\let\LWR@origendminipage\endminipage
-\LetLtxMacro{\LWR@origparbox}{\parbox}
-
\let\LWR@orignewline\newline
\AtBeginDocument{% in case packages change definition
@@ -1051,7 +1115,7 @@ top=1in,bottom=1in,%
\let\LWR@origpar\par
-\LetLtxMacro{\LWR@origfootnote}{\footnote}
+\LetLtxMacro\LWR@origfootnote\footnote
\let\LWR@orig@mpfootnotetext\@mpfootnotetext
\let\LWR@origclearpage\clearpage
@@ -1065,15 +1129,15 @@ top=1in,bottom=1in,%
\begin{warpHTML}
\AtBeginDocument{
-\LetLtxMacro{\LWR@origt}{\t}
+\LetLtxMacro\LWR@origt\t
\ifPDFTeX
-\LetLtxMacro{\LWR@origequalaccent}{\=}
-\LetLtxMacro{\LWR@origdotaccent}{\.}
-\LetLtxMacro{\LWR@origu}{\u}
-\LetLtxMacro{\LWR@origv}{\v}
-\LetLtxMacro{\LWR@origc}{\c}
-\LetLtxMacro{\LWR@origd}{\d}
-\LetLtxMacro{\LWR@origb}{\b}
+\LetLtxMacro\LWR@origequalaccent\=
+\LetLtxMacro\LWR@origdotaccent\.
+\LetLtxMacro\LWR@origu\u
+\LetLtxMacro\LWR@origv\v
+\LetLtxMacro\LWR@origc\c
+\LetLtxMacro\LWR@origd\d
+\LetLtxMacro\LWR@origb\b
\renewcommand*{\=}[1]{#1\HTMLunicode{0305}}
\renewcommand*{\.}[1]{#1\HTMLunicode{0307}}
\renewcommand*{\u}[1]{#1\HTMLunicode{0306}}
@@ -1086,18 +1150,18 @@ top=1in,bottom=1in,%
\renewcommand*{\t}[1]{\LWR@t#1}
\ifPDFTeX
\newcommand*{\LWR@restoreorigaccents}{%
-\LetLtxMacro{\=}{\LWR@origequalaccent}%
-\LetLtxMacro{\.}{\LWR@origdotaccent}%
-\LetLtxMacro{\u}{\LWR@origu}%
-\LetLtxMacro{\v}{\LWR@origu}%
-\LetLtxMacro{\t}{\LWR@origt}%
-\LetLtxMacro{\c}{\LWR@origc}%
-\LetLtxMacro{\d}{\LWR@origd}%
-\LetLtxMacro{\b}{\LWR@origb}%
+\LetLtxMacro\=\LWR@origequalaccent%
+\LetLtxMacro\.\LWR@origdotaccent%
+\LetLtxMacro\u\LWR@origu%
+\LetLtxMacro\v\LWR@origu%
+\LetLtxMacro\t\LWR@origt%
+\LetLtxMacro\c\LWR@origc%
+\LetLtxMacro\d\LWR@origd%
+\LetLtxMacro\b\LWR@origb%
}%
\else% XeLaTeX, LuaLaTeX:
\newcommand*{\LWR@restoreorigaccents}{%
-\LetLtxMacro{\t}{\LWR@origt}%
+\LetLtxMacro\t\LWR@origt%
}%
\fi%
}% AtBeginDocument
@@ -1973,7 +2037,7 @@ img.logoimage{
}
figure {
- margin: 3ex auto 3ex auto ;
+ margin: 5ex auto 5ex auto ;
padding: 1ex 1em 1ex 1em ;
overflow-x: auto ;
}
@@ -2036,6 +2100,27 @@ figure div.floatrow div.minipage figcaption {
background: none ;
}
+/* For packages such as float, rotfloat, and algorithm2e: */
+
+figure.boxed, figure.boxruled {
+ border: 1px solid black ;
+}
+
+figure.ruled {
+ border-top: 1px solid black ;
+ border-bottom: 1px solid black ;
+ border-left: 0px ;
+ border-right: 0px ;
+ border-radius: 0px ;
+ background: none ;
+ box-shadow: none ;
+}
+
+figure.ruled figcaption, figure.boxruled figcaption {
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+}
+
table {
margin: 1ex auto 1ex auto ;
border-collapse: separate ;
@@ -2315,7 +2400,32 @@ div.multicols { -webkit-columns: 3 380px ;
-moz-columns: 3 380px ; columns: 3 380px ; }
div.multicols p {margin-top: 0ex}
-/* Used to support algorithmicx: */
+/* Used for algorithm2e: */
+div.alg2evline{
+ margin-left: 1em ;
+ padding-left: 1em ;
+ border-left: 1px solid black ;
+ border-radius: 0px 0px 0px 1ex ;
+}
+
+div.alg2evsline{
+ margin-left: 1em ;
+ padding-left: 1em ;
+ border-left: 1px solid black ;
+}
+
+div.alg2enoline{
+ margin-left: 1em ;
+ padding-left: 1em ;
+}
+
+span.alg2elinenumber{
+ margin-right: .5em ;
+ font-size: 50% ;
+ color: red ;
+}
+
+/* Used for algorithmicx: */
span.floatright { float: right ; }
/* Native LaTeX theorems: */
@@ -2880,7 +2990,7 @@ div.fancyvrblabel{
}
figure {
- margin: 3ex 5% 3ex 5% ;
+ margin: 5ex 5% 5ex 5% ;
padding: 1ex 1em 1ex 1em ;
background-color: #fffcf5 ;
overflow-x: auto ;
@@ -3117,15 +3227,16 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Copyright 2016-2018 Brian Dunn
--- Print the usage of the lwarpmk command:
-
-printversion = "v0.56"
+printversion = "v0.57"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
end
function printusage ()
+--
+-- Print the usage of the lwarpmk command:
+--
print ( [[
lwarpmk print [project]: Compile the print version if necessary.
@@ -3153,9 +3264,10 @@ lwarpmk --help: Print this help message.
printconf ()
end
--- Print the format of the configuration file lwarpmk.conf:
-
function printconf ()
+--
+-- Print the format of the configuration file lwarpmk.conf:
+--
print ( [[
An example lwarpmk.conf or <project>.lwarpmkconf project file:
--
@@ -3177,11 +3289,12 @@ Values must be in upright "quotes".
]] ) ;
end
+function splitfile (destfile,sourcefile)
+--
-- Split one large sourcefile into a number of files,
-- starting with destfile.
-- The file is split at each occurance of <!--|Start file|newfilename|*
-
-function splitfile (destfile,sourcefile)
+--
print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
local sfile = io.open(sourcefile)
io.output(destfile)
@@ -3198,20 +3311,25 @@ end -- do
io.close(sfile)
end -- function
--- Incorrect value, so print an error and exit.
-
function cvalueerror ( line, linenum , cvalue )
+--
+-- Incorrect value, so print an error and exit.
+--
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print (
+ "lwarpmk: incorrect variable value \"" .. cvalue ..
+ "\" in lwarpmk.conf.\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
--- Load settings from the project's "lwarpmk.conf" file:
-
function loadconf ()
+--
+-- Load settings from the project's "lwarpmk.conf" file:
+--
-- Default configuration filename:
local conffile = "lwarpmk.conf"
-- Optional configuration filename:
@@ -3233,7 +3351,10 @@ if (lfs.attributes(conffile,"mode")==nil) then
print ("lwarpmk: recompile using pdflatex, xelatex, or lualatex,")
print ("lwarpmk: then try using lwarpmk again.")
if ( arg[2] ~= nil ) then
- print ("lwarpmk: (\"" .. arg[2] .. "\" does not appear to be a project name.)")
+ print (
+ "lwarpmk: (\"" .. arg[2] ..
+ "\" does not appear to be a project name.)"
+ )
end
print ("lwarpmk: ===")
printhelp () ;
@@ -3286,7 +3407,10 @@ elseif ( cvarname == "pdftotextenc" ) then pdftotextenc = cvalue
else
print ("lwarpmk: ===")
print ("lwarpmk: " .. linenum .. " : " .. line ) ;
- print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print (
+ "lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " ..
+ conffile ..".\n"
+ ) ;
print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
@@ -3318,7 +3442,7 @@ if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
opquote= "\'"
cmdgroupopenname = " ( "
cmdgroupclosename = " ) "
- seqname = " ; "
+ seqname = " && "
bgname = " &"
elseif opsystem=="Windows" then -- For Windows
rmname = "DEL"
@@ -3347,15 +3471,31 @@ end
end -- loadconf
+function executecheckerror ( executecommands , errormessage )
+--
+-- Execute an operating system call,
+-- and maybe exit with an error message.
+--
+local err
+err = os.execute ( executecommands )
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. errormessage )
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
+end -- executecheckerror
+
function refreshdate ()
os.execute(touchnamepre .. " " .. sourcename .. ".tex " .. touchnamepost)
end
+function reruntoget (filesource)
+--
-- Scan the LaTeX log file for the phrase "Rerun to get",
-- indicating that the file should be compiled again.
-- Return true if found.
-
-function reruntoget (filesource)
+--
local fsource = io.open(filesource)
for line in fsource:lines() do
if ( string.find(line,"Rerun to get") ~= nil ) then
@@ -3367,10 +3507,11 @@ io.close(fsource)
return false
end
+function onetime (fsuffix)
+--
-- Compile one time, return true if should compile again.
-- fsuffix is "" for print, "_html" for HTML output.
-
-function onetime (fsuffix)
+--
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -3378,20 +3519,18 @@ if ( shellescape == "true" ) then
else
thisshellescape = " "
end
-err = os.execute(latexname .. thisshellescape .. sourcename..fsuffix)
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+executecheckerror (
+ latexname .. thisshellescape .. sourcename..fsuffix ,
+ "Compile error."
+)
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
+function manytimes (fsuffix)
+--
-- Compile up to five times.
-- fsuffix is "" for print, "_html" for HTML output
-
-function manytimes (fsuffix)
+--
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
if onetime(fsuffix) == true then
@@ -3400,9 +3539,10 @@ if onetime(fsuffix) == true then
end end end end end
end
--- Exit if the given file does not exist.
-
function verifyfileexists (filename)
+--
+-- Exit if the given file does not exist.
+--
if (lfs.attributes ( filename , "modification" ) == nil ) then
print ("lwarpmk: ===")
print ("lwarpmk: " .. filename .. " not found." ) ;
@@ -3411,9 +3551,10 @@ if (lfs.attributes ( filename , "modification" ) == nil ) then
end
end
--- Convert <project>_html.pdf into HTML files:
-
function pdftohtml ()
+--
+-- Convert <project>_html.pdf into HTML files:
+--
-- Convert to text:
print ("lwarpmk: Converting " .. sourcename
.."_html.pdf to " .. sourcename .. "_html.html")
@@ -3423,9 +3564,11 @@ os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
+function removeaux ()
+--
-- Remove auxiliary files:
-- All aux files are removed since there may be many bbl*.aux files.
-function removeaux ()
+--
os.execute ( rmname .. " *.aux " ..
sourcename ..".toc " .. sourcename .. "_html.toc " ..
sourcename ..".lof " .. sourcename .. "_html.lof " ..
@@ -3438,10 +3581,12 @@ os.execute ( rmname .. " *.aux " ..
)
end
+function checkhtmlpdfexists ()
+--
-- Error if the HTML document does not exist.
--- The lateximages are drawn from the HTML PDF verison of the document,
+-- The lateximages are drawn from the HTML PDF version of the document,
-- so "lwarpmk html" must be done before "lwarpmk limages".
-function checkhtmlpdfexists ()
+--
local htmlpdffile = io.open(sourcename .. "_html.pdf", "r")
if ( htmlpdffile == nil ) then
print ("")
@@ -3454,8 +3599,10 @@ end
io.close (htmlpdffile)
end -- checkhtmlpdfexists
--- Warning of a missing lateximages.txt file:
function warnlimages ()
+--
+-- Warning of a missing lateximages.txt file:
+--
print ("lwarpmk: ===")
print ("lwarpmk: \"lateximages.txt\" does not exist.")
print ("lwarpmk: Your project does not use SVG math or other lateximages,")
@@ -3468,9 +3615,11 @@ function warnlimages ()
print ("lwarpmk: ===")
end -- warnlimages
+function checklimages ()
+--
-- Check lateximages.txt to see if need to recompile first.
-- If any entry has a page number of zero, then there were incorrect images.
-function checklimages ()
+--
print ("lwarpmk: Checking for a valid lateximages.txt file.")
local limagesfile = io.open("lateximages.txt", "r")
if ( limagesfile == nil ) then
@@ -3502,90 +3651,33 @@ if ( pagezerowarning ) then
print ("lwarpmk: ===")
os.exit(1) ;
end -- pagezerowarning
-end -- checklateximages
+end -- checklimages
--- Create lateximages based on lateximages.txt:
-function createlateximages ()
--- See if the document must be recompiled first:
-checklimages ()
--- See if the print version exists:
-checkhtmlpdfexists ()
--- Attempt to create the lateximages:
-print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt", "r")
-if ( limagesfile == nil ) then
- warnlateximages ()
- 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 from lwarp_one_limage.txt:
-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")
- print (" lwarp_one_limage.txt to lwarp_one_limage.cmd")
- print ("lwarpmk: ===")
- os.exit(1) ;
- end
-end -- create lwarp_one_limage.cmd
--- Track the number of parallel processes
-numimageprocesses = 0
--- Track warning to recompile if find a page 0
-pagezerowarning = false
--- Scan lateximages.txt
-for line in limagesfile:lines() do
--- lwimgpage is the page number in the PDF which has the image
--- 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 if the page number is 0:
-if ( lwimgpage == "0" ) then
- pagezerowarning = true
-else
--- 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(
-cmdgroupopenname ..
-"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
- sourcename .."_html.pdf " ..
- "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
- seqname ..
--- Crop the image:
-"pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
- seqname ..
--- Convert the image to svg:
-"pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
- "lateximages" .. dirslash .. lwimgname ..".svg" ..
- seqname ..
--- Remove the temporary files:
-rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
-rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
-cmdgroupclosename .. " >/dev/null " .. bgname
+function createuniximage ( lwimgfullname )
+--
+-- Create one lateximage for Unix / Linux / Mac OS.
+--
+executecheckerror (
+ cmdgroupopenname ..
+ "pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
+ -- Crop the image:
+ "pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" ..
+ lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
+ -- Convert the image to svg:
+ "pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
+ -- Remove the temporary files:
+ rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+ rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+ cmdgroupclosename .. " >/dev/null " .. bgname
+ ,
+ "File error trying to convert " .. lwimgfullname
)
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
@@ -3593,10 +3685,14 @@ numimageprocesses = numimageprocesses + 1
if ( numimageprocesses > 32 ) then
numimageprocesses = 0
print ( "lwarpmk: waiting" )
- err = os.execute ( "wait" )
+ executecheckerror ( "wait" , "File error trying to wait.")
end
-elseif opsystem=="Windows" then
--- For Windows
+end -- createuniximage
+
+function createwindowsimage ( lwimgfullname )
+--
+-- Create one lateximage for Windows.
+--
-- Every 32 images, wait for completion at below normal priority,
-- allowing other image tasks to catch up.
numimageprocesses = numimageprocesses + 1
@@ -3608,30 +3704,94 @@ else
thiswaitcommand = ""
end
-- Execute the image generation command
-err = os.execute (
+executecheckerror (
"start /B " .. thiswaitcommand .. " \"\" lwarp_one_limage " ..
lwimgpage .. " " ..
lwimghash .. " " ..
lwimgname .. " " ..
sourcename .. " <nul >nul"
+ ,
+ "File error trying to create image."
)
-end -- Windows
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: File error trying to create one lateximage.")
- print ("lwarpmk: ===")
+end -- createwindowsimage
+
+function createonelateximage ( line )
+--
+-- Given the next line of lateximages.txt, convert a single image.
+--
+-- lwimgpage is the page number in the PDF which has the image
+-- 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 if the page number is 0:
+ if ( lwimgpage == "0" ) then
+ pagezerowarning = true
+ else
+ -- 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:
+ executecheckerror (
+ newtouchname .. " " .. lwimgfullname ,
+ "File error trying to touch " .. lwimgfullname
+ )
+ -- Separate out the image into its own single-page pdf:
+ if opsystem=="Unix" then
+ createuniximage (lwimgfullname)
+ elseif opsystem=="Windows" then
+ createwindowsimage (lwimgfullname)
+ end
+ end -- not hashed or not exists
+ end -- not page 0
+end -- not nil
+end -- createonelateximage
+
+function createlateximages ()
+--
+-- Create lateximages based on lateximages.txt:
+--
+-- See if the document must be recompiled first:
+checklimages ()
+-- See if the print version exists:
+checkhtmlpdfexists ()
+-- Attempt to create the lateximages:
+print ("lwarpmk: Creating lateximages.")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ warnlateximages ()
os.exit(1)
end
-end -- not hashed or not exists
-end -- not page 0
-end -- not nil
+-- Create the lateximages directory, ignore error if already exists
+err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd from lwarp_one_limage.txt:
+if opsystem=="Windows" then
+ executecheckerror (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd" ,
+ "File error trying to copy lwarp_one_limage.txt to lwarp_one_limage.cmd"
+ )
+end -- create lwarp_one_limage.cmd
+-- Track the number of parallel processes
+numimageprocesses = 0
+-- Track warning to recompile if find a page 0
+pagezerowarning = false
+-- Scan lateximages.txt
+for line in limagesfile:lines() do
+ createonelateximage ( line )
end -- do
io.close(limagesfile)
print ( "lwarpmk limages: ===")
print ( "lwarpmk limages: Wait a moment for the images to complete" )
-print ( "lwarpmk limages: before reloading the page." )
+print ( "lwarpmk limages: before reloading the page." )
print ( "lwarpmk limages: ===")
-print ( "lwarpmk limages: done" )
+print ( "lwarpmk limages: Done." )
if ( pagezerowarning == true ) then
print ( "lwarpmk limages: WARNING: Images will be incorrect." )
print ( "lwarpmk limages: Enter \"lwarpmk cleanlimages\", then" )
@@ -3640,9 +3800,11 @@ if ( pagezerowarning == true ) then
end -- pagezerowarning
end -- function
+function compilelatexmk ( fsuffix )
+--
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
-function compilelatexmk ( fsuffix )
+--
-- Maybe select the shell-escape option:
local thisshellescape = " "
if ( shellescape == "true" ) then
@@ -3652,7 +3814,8 @@ else
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 "
+executecheckerror (
+ "latexmk -pdf -dvi- -ps- -recorder "
.. "-e "
.. opquote
.. "$makeindex = q/" -- $
@@ -3662,19 +3825,18 @@ err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
.. " -L " .. xindylanguage .. " /"
.. opquote
.. " -pdflatex=\"" .. latexname .. thisshellescape .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
-if ( err ~= 0 ) then
- print ("lwarpmk: ===")
- print ("lwarpmk: Compile error.")
- print ("lwarpmk: ===")
- os.exit(1)
-end
+ .. sourcename..fsuffix ..".tex"
+ ,
+ "Compile error."
+)
end -- function
+function convertpdftosvg ()
+--
-- Converts PDF files to SVG files.
-- The filenames are arg[2] and up.
-- arg[1] is the command "pdftosvg".
-function convertpdftosvg ()
+--
for i = 2 , #arg do
if (lfs.attributes(arg[i],"mode")==nil) then
print ("lwarpmk: File \"" .. arg[i] .. "\" does not exist.")
@@ -3685,6 +3847,8 @@ for i = 2 , #arg do
end -- do
end --function
+-- Start of the main code: --
+
-- lwarpmk --version :
if (arg[1] == "--version") then
@@ -3721,6 +3885,8 @@ else -- not latexmk
end
end -- not latexmk
+-- lwarpmk print1:
+
elseif arg[1] == "print1" then
loadconf ()
verifyfileexists (sourcename .. ".tex") ;
@@ -3791,6 +3957,8 @@ else -- not latexmk
end
end -- not latexmk
+-- lwarpmk html1:
+
elseif arg[1] == "html1" then
loadconf ()
verifyfileexists ( sourcename .. ".tex" ) ;
@@ -3798,6 +3966,7 @@ elseif arg[1] == "html1" then
pdftohtml ()
print ("lwarpmk: Done.")
+-- lwarpmk pdftohtml:
elseif arg[1] == "pdftohtml" then
loadconf ()
pdftohtml ()
@@ -3905,6 +4074,8 @@ printhelp ()
elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
printusage ()
+-- Unknown command:
+
else
printhelp ()
print ("\nlwarpmk: ****** Unknown command \""..arg[1].."\". ******\n")
@@ -4030,6 +4201,43 @@ end -- not --version
\end{warpHTML}
+\begin{warpall}
+\newcommand{\StartDefiningTabulars}{%
+\LWR@traceinfo{StartDefiningTabulars}%
+\warpHTMLonly{\catcode`\&=\active}%
+}
+\newcommand{\StopDefiningTabulars}{%
+\LWR@traceinfo{StopDefiningTabulars}%
+\warpHTMLonly{\catcode`\&=4}%
+}
+
+\newbool{LWR@mathmacro}
+\boolfalse{LWR@mathmacro}
+
+\newcommand{\StartDefiningMath}{%
+\LWR@traceinfo{StartDefiningMath}%
+\warpHTMLonly{\catcode`\$=\active}%
+}
+\newcommand{\StopDefiningMath}{%
+\LWR@traceinfo{StopDefiningMath}%
+\warpHTMLonly{\catcode`\$=3}% math shift
+}
+
+\end{warpall}
+
+\begin{warpall}
+\newbool{LWR@dynamicmath}
+\boolfalse{LWR@dynamicmath}
+\newcommand{\StartDynamicMath}{%
+\LWR@traceinfo{StartDynamicMath}%
+\booltrue{LWR@dynamicmath}%
+}
+\newcommand{\StopDynamicMath}{%
+\LWR@traceinfo{StopDynamicMath}%
+\boolfalse{LWR@dynamicmath}%
+}
+\end{warpall}
+
\begin{warpHTML}
@@ -4138,9 +4346,7 @@ end -- not --version
\begin{warpHTML}
\newcommand*{\LinkHome}{%
-\LWR@subhyperrefclass{%
-\HomeHTMLFilename.html}%
-{Home}{linkhome}%
+\LWR@subhyperrefclass{\HomeHTMLFilename.html}{Home}{linkhome}%
}
\newcommand*{\LWR@topnavigation}{
@@ -4376,7 +4582,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\LWR@origmbox{\LWR@origtextless{}!{-}{-}}%
+\LWR@print@mbox{\LWR@origtextless{}!{-}{-}}%
\endgroup%
}%
}
@@ -4386,7 +4592,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\LWR@origmbox{{-}{-}\LWR@origtextgreater}%
+\LWR@print@mbox{{-}{-}\LWR@origtextgreater}%
\endgroup%
}%
}
@@ -4463,38 +4669,51 @@ end -- not --version
\end{warpHTML}
+\begin{warpprint}
+\NewDocumentEnvironment{BlockClass}{o m}{}{}%
+\end{warpprint}
\begin{warpHTML}
-\NewDocumentEnvironment{BlockClass}{o m}%
+\NewDocumentEnvironment{LWR@print@BlockClass}{o m}{}{}%
+\NewDocumentEnvironment{LWR@HTML@BlockClass}{o m}%
{%
\LWR@origpar%
\LWR@htmldivclass[#1]{#2}%
}
{\LWR@htmldivclassend{#2}}
+
+\LWR@formattedenv{BlockClass}
\end{warpHTML}
-\begin{warpprint}
-\NewDocumentEnvironment{BlockClass}{o m}{}{}%
-\end{warpprint}
+\begin{warpall}
+\newcommand{\BlockClassSingle}[2]{#2}
+\end{warpall}
\begin{warpHTML}
-\newcommand{\BlockClassSingle}[2]{%
+\newcommand{\LWR@HTML@BlockClassSingle}[2]{%
\LWR@origpar%
\LWR@htmlelementclassline{div}{#1}{#2}%
}
+
+\LWR@formatted{BlockClassSingle}
\end{warpHTML}
+
\begin{warpprint}
-\newcommand{\BlockClassSingle}[2]{#2}
+\NewDocumentCommand{\InlineClass}{o m +m}{#3}%
\end{warpprint}
-
\begin{warpHTML}
-\NewDocumentCommand{\InlineClass}{o m +m}{%
-\LWR@htmlspanclass[#1]{#2}{#3}%
+\NewDocumentCommand{\LWR@print@InlineClass}{o m +m}{#3}%
+
+\NewDocumentCommand{\LWR@HTML@InlineClass}{o m +m}{%
+ \LWR@htmlspanclass[#1]{#2}{#3}%
}
+
+\LWR@formatted{InlineClass}
\end{warpHTML}
+
\begin{warpprint}
-\NewDocumentCommand{\InlineClass}{o m +m}{#3}%
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
\end{warpprint}
-
\begin{warpHTML}
-\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}%
+\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m m}{}{}%
+\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m m}%
{%
\LWR@stoppars%
\ifbool{FormatWP}%
@@ -4502,7 +4721,7 @@ end -- not --version
\addtocounter{LWR@thisautoidWP}{1}%
\LWR@htmltag{%
div class="#3" %
- id="\LWR@origmbox{autoidWP-\arabic{LWR@thisautoidWP}}"%
+ id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -4515,10 +4734,9 @@ end -- not --version
\LWR@startpars%
}
{\LWR@htmldivclassend{#3}}
+
+\LWR@formattedenv{LWR@BlockClassWP}
\end{warpHTML}
-\begin{warpprint}
-\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
-\end{warpprint}
\begin{warpHTML}
@@ -4853,7 +5071,7 @@ end -- not --version
\ifvoid\LWR@mpfootnotes\else
\LWR@forcenewpage
\begin{BlockClass}{footnotes}
- \LWR@origvspace*{\baselineskip}
+ \LWR@print@vspace*{\baselineskip}
\unvbox\LWR@mpfootnotes
\setbox\LWR@mpfootnotes=\vbox{}
\end{BlockClass}
@@ -5016,6 +5234,10 @@ end -- not --version
\(\newcommand\ensuremath[1]{##1}\)
+\(\newcommand\footnote[2][]{\text{( Footnote ##1 )}}\)
+
+\(\newcommand\footnotemark[1][]{\text{( Footnote ##1 )}}\)
+
\LWR@htmlcomment{Additional customizations for MathJax:}
\LWR@customizedMathJax
@@ -5159,7 +5381,7 @@ end -- not --version
}
\newcommand*{\LWR@createautosec}[1]{%
-\LWR@htmltag{#1 id="\LWR@origmbox{autosec-\arabic{page}}"}%
+\LWR@htmltag{#1 id="\LWR@print@mbox{autosec-\arabic{page}}"}%
}
\NewDocumentCommand{\LWR@pushoneclose}{m m}{%
@@ -5513,10 +5735,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\belowcaptionskip}{0ex}
\setlength{\abovecaptionskip}{0ex}
\renewcommand{\ps@plain}{}
-\LetLtxMacro{\LWR@origtabular}{\tabular}
-\LetLtxMacro{\LWR@origendtabular}{\endtabular}
-\LetLtxMacro{\tabular}{\LWR@tabular}
-\LetLtxMacro{\endtabular}{\endLWR@tabular}
+\LetLtxMacro\LWR@origtabular\tabular
+\LetLtxMacro\LWR@origendtabular\endtabular
+\LetLtxMacro\tabular\LWR@tabular
+\LetLtxMacro\endtabular\endLWR@tabular
\let\LWR@origcaption\caption
\let\LWR@origltx@label\ltx@label
\let\ltx@label\LWR@htmlmathlabel
@@ -5886,21 +6108,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifthenelse{\equal{#1}{}}{}{style="#1"}%
}%
\LWR@orignewline% pre
- \leavevmode\unskip\LWR@origvspace*{-#2\baselineskip}%
+ \leavevmode\unskip\LWR@print@vspace*{-#2\baselineskip}%
}{}%
\begingroup%
\LWR@origttfamily%
\LWR@origsmall%
\LWR@restoreoriglists%
\LWR@FBcancel%
-\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LWR@select@print@hspace%
}
\newcommand*{\LWR@afterendverbatim}[1]{%
\endgroup%
\par%
\ifbool{LWR@verbtags}{%
- \LWR@origvspace*{-#1\baselineskip}%
+ \LWR@print@vspace*{-#1\baselineskip}%
\noindent\LWR@htmltag{/pre}\LWR@orignewline% pre
}{}%
\LWR@startpars%
@@ -5974,7 +6196,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\newcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\newcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"}
\AtBeginDocument{
\def\@mklab#1{%
@@ -6070,7 +6292,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@itemizestart}{%
\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\renewcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\renewcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"}
\let\item\LWR@itemizeitem%
\LWR@nulllistfills%
}
@@ -6079,7 +6301,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@enumeratestart}{%
\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\renewcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\renewcommand*{\LWR@printopenlist}{ul style="\LWR@print@mbox{list-style-type:none}"}
\let\item\LWR@itemizeitem%
\LWR@nulllistfills%
}
@@ -6090,9 +6312,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@stoppars%
\LWR@setlatestname{#1}%
\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printclosedescitem}%
-\LetLtxMacro\hspace\LWR@nohspace%
+\LWR@select@html@nohspace%
\LWR@origitem[]%
-\LetLtxMacro\hspace\LWR@hspace%
+\LWR@select@html@hspace%
\LWR@htmltag{dt}#1\LWR@htmltag{/dt}%
\LWR@orignewline%
\LWR@htmltag{dd}%
@@ -6289,19 +6511,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\LWR@origampmacro&
\end{warpHTML}
-\begin{warpall}
-\newcommand{\StartDefiningTabulars}{%
-\LWR@traceinfo{StartDefiningTabulars}%
-\warpHTMLonly{\catcode`\&=\active}%
-}
-\newcommand{\EndDefiningTabulars}{%
-\LWR@traceinfo{EndDefiningTabulars}%
-\warpHTMLonly{\catcode`\&=4}%
-}
-
-\end{warpall}
\begin{warpHTML}
-
\newcommand*{\LWR@tabularampersand}{%
\LWR@traceinfo{LWR@tabularampersand}%
\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}%
@@ -6635,19 +6845,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@rowHTMLcolor}{}
\newcommand*{\LWR@cellHTMLcolor}{}
\newcommand*{\LWR@ruleHTMLcolor}{}
-\NewDocumentCommand{\LWR@HTMLcolumncolor}{O{named} m o o}{}
-
-\NewDocumentCommand{\LWR@HTMLrowcolor}{O{named} m o o}{\LWR@getmynexttoken}
-
-\NewDocumentCommand{\LWR@HTMLcellcolor}{O{named} m o o}{}
+\newcommand*{\rowcolor}{\LWR@getmynexttoken}%
\newcommand{\arrayrulecolor}[2][named]{}
-
-\newcommand{\LWR@HTMLarrayrulecolor}[2][named]{\LWR@getmynexttoken}
+\newcommand{\arrayrulecolornexttoken}[2][named]{\LWR@getmynexttoken}
\newcommand{\doublerulesepcolor}[2][named]{}
-
-\newcommand{\LWR@HTMLdoublerulesepcolor}[2][named]{\LWR@getmynexttoken}
+\newcommand{\doublerulesepcolornexttoken}[2][named]{\LWR@getmynexttoken}
\newcommand*{\LWR@maybenewtablerow}
@@ -6962,7 +7166,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@WPcell}[2]{%
\LWR@tdaddstyle%
-\LWR@origmbox{text-align:#1}; \LWR@origmbox{vertical-align:#2}%
+\LWR@print@mbox{text-align:#1}; \LWR@print@mbox{vertical-align:#2}%
}
\newcommand*{\LWR@addformatwpalignment}[1]{%
@@ -7298,8 +7502,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\IfValueT{#2}{ % rows?
rowspan="#2" %
\IfValueT{#1}{% vpos?
-\ifstrequal{#1}{b}{style="\LWR@origmbox{vertical-align:bottom}" }{}%
-\ifstrequal{#1}{t}{style="\LWR@origmbox{vertical-align:top}" }{}%
+\ifstrequal{#1}{b}{style="\LWR@print@mbox{vertical-align:bottom}" }{}%
+\ifstrequal{#1}{t}{style="\LWR@print@mbox{vertical-align:top}" }{}%
}% vpos?
}% rows?
class="td%
@@ -7374,7 +7578,8 @@ rowspan="#2" %
{%
\refstepcounter{\LTcaptype}%
\protected@edef\@currentlabel{%
- \csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+ \csuse{p@\LTcaptype}\csuse{the\LTcaptype}%
+ }%
}%
}{}%
\LWR@figcaption%
@@ -7450,31 +7655,41 @@ rowspan="#2" %
}% whiledo
}
\end{warpHTML}
+\begin{warpHTML}
+\newcommand{\multirow}[2][c]{}
+\end{warpHTML}
\begin{warpall}
\AtBeginDocument{
\@ifundefined{@xmultirow}
-{}% no version of multirow was loaded
+{
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
+ {+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
+ {}%
+}% no version of multirow was loaded
{% \@xmultirow defined, so some version of multirow was loaded
\@ifpackageloaded{multirow}{% v2.0 or newer
\@ifpackagelater{multirow}{2016/09/01}% 2016/09/27 for v2.0
{% v2.0+:
-\DeclareExpandableDocumentCommand{\LWR@origmulticolumnrow}%
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
-{\multicolumn{#1}{#2}{\@xmultirow[#3]{#4}[#5]{#6}[#7]{#8}}}%
+ {\multicolumn{#1}{#2}{\@xmultirow[#3]{#4}[#5]{#6}[#7]{#8}}}%
}
{% loaded but older, probably not executed:
-\DeclareExpandableDocumentCommand{\LWR@origmulticolumnrow}%
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
-{\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
+ {\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
}
}% packageloaded{multirow}
{% v1.6 or older did not \ProvidePackage
-\DeclareExpandableDocumentCommand{\LWR@origmulticolumnrow}%
+\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
-{\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
+ {\multicolumn{#1}{#2}{\@xmultirow{#4}[#5]{#6}[#7]{#8}}}%
}
-\providecommand*{\multicolumnrow}{\LWR@origmulticolumnrow}
-}% \@xmultirow defined, so multirow was loaded
+
+}% \@ifundefined{@xmultirow}
+
+\providecommand*{\multicolumnrow}{\LWR@print@multicolumnrow}
+
}% AtBeginDocument
\end{warpall}
\begin{warpHTML}
@@ -7602,13 +7817,13 @@ rowspan="#2" %
\begin{warpHTML}
-\newcommand*{\LWR@origtoprule}[1][]{\hline}
-\newcommand*{\LWR@origmidrule}[1][]{\hline}
-\LetLtxMacro\LWR@origcmidrule\cline
-\newcommand*{\LWR@origbottomrule}[1][]{\hline}
-\newcommand*{\LWR@origaddlinespace}[1][]{}
-\newcommand*{\LWR@origmorecmidrules}{}
-\newcommand*{\LWR@origspecialrule}[3]{\hline}
+\newcommand*{\toprule}[1][]{\hline}
+\newcommand*{\midrule}[1][]{\hline}
+\LetLtxMacro\cmidrule\cline
+\newcommand*{\bottomrule}[1][]{\hline}
+\newcommand*{\addlinespace}[1][]{}
+\newcommand*{\morecmidrules}{}
+\newcommand*{\specialrule}[3]{\hline}
\LetLtxMacro\LWR@orignoalign\noalign
\newcommand{\LWR@tabularnoalign}[1]{%
@@ -7678,11 +7893,8 @@ rowspan="#2" %
\boolfalse{LWR@tabularcelladded}%
\LWR@clearmidrules%
\LetLtxMacro{\\}{\LWR@tabularendofline}%
-\LetLtxMacro\columncolor\LWR@HTMLcolumncolor%
-\LetLtxMacro\rowcolor\LWR@HTMLrowcolor%
-\LetLtxMacro\cellcolor\LWR@HTMLcellcolor%
-\LetLtxMacro\arrayrulecolor\LWR@HTMLarrayrulecolor%
-\LetLtxMacro\doublerulesepcolor\LWR@HTMLdoublerulesepcolor%
+\LetLtxMacro\arrayrulecolor\arrayrulecolornexttoken%
+\LetLtxMacro\doublerulesepcolor\doublerulesepcolornexttoken%
\renewcommand*{\LWR@columnHTMLcolor}{}%
\renewcommand*{\LWR@rowHTMLcolor}{}%
\renewcommand*{\LWR@cellHTMLcolor}{}%
@@ -7693,44 +7905,6 @@ rowspan="#2" %
\LetLtxMacro\noalign\LWR@tabularnoalign%
\LetLtxMacro\hline\LWR@HTMLhline%
\LetLtxMacro\cline\LWR@HTMLcline%
-\DeclareDocumentCommand{\toprule}{o d()}%
- {%
- \IfValueTF{##1}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {%
- \ifbool{FormatWP}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {\booltrue{LWR@doingtbrule}}%
- }%
- \LWR@getmynexttoken}%
-\DeclareDocumentCommand{\midrule}{o d()}%
- {%
- \IfValueTF{##1}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {%
- \ifbool{FormatWP}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {\addtocounter{LWR@hlines}{1}}%
- }%
- \LWR@getmynexttoken}%
-\DeclareDocumentCommand{\cmidrule}{O{\LWR@cmidrulewidth} d() m}{%
- \LWR@docmidrule[##1](##2){##3}%
- \LWR@getmynexttoken%
-}%
-\DeclareDocumentCommand{\bottomrule}{o d()}{%
- \IfValueTF{##1}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {%
- \ifbool{FormatWP}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}}%
- {\booltrue{LWR@doingtbrule}}%
- }%
- \LWR@getmynexttoken%
-}%
-\DeclareDocumentCommand{\addlinespace}{o}{}%
-\DeclareDocumentCommand{\morecmidrules}{}{}%
-\DeclareDocumentCommand{\specialrule}{m m m d()}%
- {\LWR@docmidrule[##1](){1-\arabic{LWR@tabletotalcols}}\LWR@getmynexttoken}%
\DeclareDocumentCommand{\hdashline}{o}{%
\ifbool{FormatWP}%
{\LWR@docdashline{1-\arabic{LWR@tabletotalcols}}}%
@@ -7801,11 +7975,11 @@ rowspan="#2" %
\global\boolfalse{LWR@intabularmetadata}%
\addtocounter{LWR@tabulardepth}{-1}%
\protected\gdef&{\LWR@origampmacro}%
-\EndDefiningTabulars%
+\StopDefiningTabulars%
\LWR@traceinfo{LWR@tabular finished ending}%
}
-\EndDefiningTabulars
+\StopDefiningTabulars
\end{warpHTML}
@@ -7868,16 +8042,16 @@ rowspan="#2" %
{% pars allowed
\ifbool{LWR@doingapar}%
{% par started
- \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
}% par started
{% par not started
\LWR@stoppars%
- \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
\LWR@startpars%
}% par not started
}% pars allowed
{% pars not allowed
- \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
}% pars not allowed
}% not lateximage
}
@@ -7901,7 +8075,7 @@ rowspan="#2" %
\LWR@traceinfo{LWR@startref A: !#1!}%
\LWR@htmltag{a href="%
\LWR@traceinfo{LWR@startref B}%
-\LWR@origmbox{\LWR@htmlrefsectionfilename{#1}}%
+\LWR@print@mbox{\LWR@htmlrefsectionfilename{#1}}%
\LWR@traceinfo{LWR@startref C}%
\LWR@origpound%
\LWR@traceinfo{LWR@startref D: !#1!}%
@@ -7919,7 +8093,7 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@startref D3}%
- \LWR@origmbox{\LWR@sanitized}%
+ \LWR@print@mbox{\LWR@sanitized}%
}%
}%
\LWR@traceinfo{LWR@startref E}%
@@ -7940,6 +8114,9 @@ rowspan="#2" %
{\LWR@origref{#2}}%
{\LWR@subnewref{#2}{#2}}%
}
+\NewDocumentCommand{\LWR@ref@ignorestar}{s m}{%
+ \LWR@origref{#2}%
+}
\newcommand*{\pagerefPageFor}{see }
\NewDocumentCommand{\LWR@newpageref}{s m}{%
@@ -7969,15 +8146,17 @@ autopage-\theLWR@currentautosec%
}
}
-
-\NewDocumentCommand{\LWR@subhyperref}{m +m}{%
+\NewDocumentCommand{\LWR@subhyperref}{m}{%
\LWR@traceinfo{LWR@subhyperref !#1!}%
\LWR@sanitize{#1}%
\LWR@htmltag{%
a href="\LWR@sanitized" %
target="\_{}blank"\LWR@orignewline%
}%
-#2%
+}
+
+\newcommand{\LWR@subhyperreftext}[1]{%
+#1%
\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
@@ -7994,10 +8173,11 @@ autopage-\theLWR@currentautosec%
\LWR@ensuredoingapar%
}
-\DeclareDocumentCommand{\LWR@hrefb}{O{} m +m}{%
+\DeclareDocumentCommand{\LWR@hrefb}{O{} m}{%
\LWR@ensuredoingapar%
-\LWR@subhyperref{#2}{#3}%
-\endgroup%
+\LWR@subhyperref{#2}%
+\endgroup% restore catcodes
+\LWR@subhyperreftext%
}
\newrobustcmd*{\href}{%
@@ -8068,7 +8248,10 @@ autopage-\theLWR@currentautosec%
\booltrue{LWR@freezethisautoid}%
\begingroup%
\LWR@origraggedright%
-\LWR@htmltag{figure id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}" class="#1"}%
+\LWR@htmltag{%
+ figure id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" % space
+ class="#1 \csuse{LWR@floatstyle@#1}"%
+}%
\ifbool{FormatWP}{%
\LWR@orignewline%
\LWR@BlockClassWP{}{}{wp#1}%
@@ -8123,7 +8306,7 @@ autopage-\theLWR@currentautosec%
{
\ifbool{LWR@freezethisautoid}{}{%
\addtocounter{LWR@thisautoid}{1}%
- \LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}%
+ \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}%
\LWR@htmltag{/a}%
}%
}
@@ -8180,7 +8363,7 @@ autopage-\theLWR@currentautosec%
\LWR@htmlblocktag{figcaption}%
\ifbool{FormatWP}{%
\begin{BlockClass}[font-style:italic]{italic}
-\LWR@origvspace*{\baselineskip}
+\LWR@print@vspace*{\baselineskip}
}{}%
\LWR@traceinfo{LWR@figcaption env start: done}%
}
@@ -8232,7 +8415,7 @@ autopage-\theLWR@currentautosec%
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
\bgroup
\@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
{\egroup\LWR@LT@captionlistentry}}%
@@ -8354,6 +8537,9 @@ autopage-\theLWR@currentautosec%
\NewDocumentCommand{\listof}{m +m}{%
+\@ifundefined{l@#1}{%
+ \csdef{l@#1}[2]{\hypertocfloat{1}{#1}{\csuse{ext@#1}}{##1}{##2}}%
+}{}%
\LWR@subtableofcontents{\@nameuse{ext@#1}}{#2}
\expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname
\immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname
@@ -8406,7 +8592,7 @@ autopage-\theLWR@currentautosec%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
\LWR@startpars%
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\LWR@origpound\LWR@origmbox{autosec-#4}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\LWR@origpound\LWR@print@mbox{autosec-#4}%
}{#3}{toc#2}%
\LWR@stoppars%
}%
@@ -8435,7 +8621,7 @@ autopage-\theLWR@currentautosec%
\LWR@startpars%
\LWR@subhyperrefclass{%
\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
- \LWR@origpound\LWR@origmbox{autoid-\arabic{LWR@nextautoid}}}%
+ \LWR@origpound\LWR@print@mbox{autoid-\arabic{LWR@nextautoid}}}%
{#4}{toc#2}%
\LWR@stoppars%
}{}%
@@ -8567,14 +8753,17 @@ autopage-\theLWR@currentautosec%
\end{warpHTML}
+
\begin{warpHTML}
+
\newcommand*{\LWR@restoreorigformatting}{%
\LWR@traceinfo{LWR@restoreorigformatting}%
+\renewcommand*{\LWR@formatting}{print}%
\linespread{1}%
\LetLtxMacro\caption@begin\LWR@origcaption@begin%
\LetLtxMacro\caption@end\LWR@origcaption@end%
\let\par\LWR@origpar%
-\LetLtxMacro\ref\LWR@origref%{} syntax highlighting
+\LetLtxMacro\ref\LWR@origref% {} syntax highlighting
\let\normalsize\LWR@orignormalsize%
\let\small\LWR@origsmall%
\let\footnotesize\LWR@origfootnotesize%
@@ -8585,16 +8774,11 @@ autopage-\theLWR@currentautosec%
\let\LARGE\LWR@origLARGE%
\let\huge\LWR@orighuge%
\let\Huge\LWR@origHuge%
-\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
-\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
-\renewcommand{\BlockClassSingle}[2]{##2}%
-\LetLtxMacro\hspace\LWR@orighspace%
+\LWR@select@print@hspace%
\LetLtxMacro\hfill\LWR@orighfill%
\LetLtxMacro\hfil\LWR@orighfil%
-\LetLtxMacro\rule\LWR@origrule%
\LetLtxMacro\hrulefill\LWR@orighrulefill%
\LetLtxMacro\dotfill\LWR@origdotfill%
-\let\vspace\LWR@origvspace%
\let\hss\LWR@orighss%
\let\llap\LWR@origllap%
\let\rlap\LWR@origrlap%
@@ -8607,28 +8791,28 @@ autopage-\theLWR@currentautosec%
\let\textellipsis\LWR@origtextellipsis%
\let\textless\LWR@origtextless%
\let\textgreater\LWR@origtextgreater%
-\LetLtxMacro{\textrm}{\LWR@origtextrm}%
-\LetLtxMacro{\textsf}{\LWR@origtextsf}%
-\LetLtxMacro{\texttt}{\LWR@origtexttt}%
-\LetLtxMacro{\textbf}{\LWR@origtextbf}%
-\LetLtxMacro{\textmd}{\LWR@origtextmd}%
-\LetLtxMacro{\textit}{\LWR@origtextit}%
-\LetLtxMacro{\textsl}{\LWR@origtextsl}%
-\LetLtxMacro{\textsc}{\LWR@origtextsc}%
-\LetLtxMacro{\textup}{\LWR@origtextup}%
-\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
-\LetLtxMacro{\emph}{\LWR@origemph}%
-\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
-\LetLtxMacro{\upshape}{\LWR@origupshape}%
-\LetLtxMacro{\slshape}{\LWR@origslshape}%
-\LetLtxMacro{\scshape}{\LWR@origscshape}%
-\LetLtxMacro{\itshape}{\LWR@origitshape}%
-\LetLtxMacro{\em}{\LWR@origem}%
-\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
+\LetLtxMacro\textrm\LWR@origtextrm%
+\LetLtxMacro\textsf\LWR@origtextsf%
+\LetLtxMacro\texttt\LWR@origtexttt%
+\LetLtxMacro\textbf\LWR@origtextbf%
+\LetLtxMacro\textmd\LWR@origtextmd%
+\LetLtxMacro\textit\LWR@origtextit%
+\LetLtxMacro\textsl\LWR@origtextsl%
+\LetLtxMacro\textsc\LWR@origtextsc%
+\LetLtxMacro\textup\LWR@origtextup%
+\LetLtxMacro\textnormal\LWR@origtextnormal%
+\LetLtxMacro\emph\LWR@origemph%
+\LetLtxMacro\rmfamily\LWR@origrmfamily%
+\LetLtxMacro\sffamily\LWR@origsffamily%
+\LetLtxMacro\ttfamily\LWR@origttfamily%
+\LetLtxMacro\bfseries\LWR@origbfseries%
+\LetLtxMacro\mdseries\LWR@origmdseries%
+\LetLtxMacro\upshape\LWR@origupshape%
+\LetLtxMacro\slshape\LWR@origslshape%
+\LetLtxMacro\scshape\LWR@origscshape%
+\LetLtxMacro\itshape\LWR@origitshape%
+\LetLtxMacro\em\LWR@origem%
+\LetLtxMacro\normalfont\LWR@orignormalfont%
\let\sp\LWR@origsp%
\let\sb\LWR@origsb%
\LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
@@ -8644,30 +8828,8 @@ autopage-\theLWR@currentautosec%
\LetLtxMacro\endtabular\LWR@origendtabular%
\LetLtxMacro\noalign\LWR@orignoalign%
\LetLtxMacro\hline\LWR@orighline%
-\LetLtxMacro\toprule\LWR@origtoprule%
-\LetLtxMacro\midrule\LWR@origmidrule%
-\LetLtxMacro\cmidrule\LWR@origcmidrule%
-\LetLtxMacro\bottomrule\LWR@origbottomrule%
-\LetLtxMacro\addlinespace\LWR@origaddlinespace%
-\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
-\LetLtxMacro\specialrule\LWR@origspecialrule%
\let\newline\LWR@orignewline%
-\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
\LetLtxMacro\includegraphics\LWR@origincludegraphics%
-\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
-\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
-\let\reflectbox\LWR@origreflectbox%
-\LetLtxMacro\resizebox\LWR@origresizebox%
-\let\framebox\LWR@origframebox%
-\LetLtxMacro\mbox\LWR@origmbox%
-\LetLtxMacro\makebox\LWR@origmakebox%
-\let\fbox\LWRprint@fbox%
-\let\fboxBlock\LWRprint@fbox%
-\LetLtxMacro\fminipage\LWRprint@fminipage%
-\LetLtxMacro\endfminipage\endLWRprint@fminipage%
-\LetLtxMacro\minipage\LWR@origminipage%
-\let\endminipage\LWR@origendminipage%
-\LetLtxMacro\parbox\LWR@origparbox%
\let\TeX\LWR@origTeX%
\let\LaTeX\LWR@origLaTeX%
\let\LaTeXe\LWR@origLaTeXe%
@@ -8678,8 +8840,16 @@ autopage-\theLWR@currentautosec%
\LWR@FBcancel%
}
\end{warpHTML}
-\begin{warpHTML}
+\begin{warpall}
+
+\newcommand*{\mathimagename}{math image}
+
+\newcommand*{\packagediagramname}{diagram}
+
+\end{warpall}
+
+\begin{warpHTML}
\newcounter{LWR@externalfilecnt}
\newbool{LWR@indisplaymathimage}
@@ -8745,13 +8915,15 @@ autopage-\theLWR@currentautosec%
bool{mathjax} or
( bool{FormatWP} and bool{WPMarkMath} )
) and
- ( not test { \ifstrequal {#2} {(math image)} } )% from \ensuredmath
+ ( not test { \ifstrequal {#2} {(\mathimagename)} } ) and % from \ensuredmath
+ ( not bool{LWR@dynamicmath} )
}%
{%
+ \LWR@traceinfo{LWR@subsingledollar: Mathjax}%
{\textbackslash(\LWR@HTMLsanitize{#4}\textbackslash)}%
}% mathjax
{% not mathjax
-\LWR@traceinfo{LWR@subsingledollar: not mathjax}%
+\LWR@traceinfo{LWR@subsingledollar: NOT mathjax, or is ensuremath, or is dynamic}%
\begingroup%
\LWR@restoreorigformatting%
\RenewDocumentEnvironment{lateximage}{s o o o}{}{}% inside group
@@ -8763,7 +8935,19 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{Using font shape \LWR@f@shape}%
\csuse{LWR@orig\LWR@f@shape shape}%
\global\advance\c@LWR@lateximagedepth 1\relax%
- \global\sbox{\LWR@singledollarbox}{#4}%
+ \ifmmode%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ \else%
+ \ifbool{LWR@dynamicmath}{%
+ \ifbool{mathjax}{%
+ \global\sbox{\LWR@singledollarbox}{\LWR@origensuredmath{#4}}%
+ }{%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ }%
+ }{%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ }%
+ \fi%
\global\sbox{\LWR@singledollarbox}{%
\usebox{\LWR@singledollarbox}%
\hspace*{-10sp}%
@@ -8814,30 +8998,39 @@ autopage-\theLWR@currentautosec%
\ifdimgreater{\LWR@singledollardepth}{0.05ex}{%
\def\LWR@singledollardepthstyle{%
\ ; % extra space
- \LWR@origmbox{%
+ \LWR@print@mbox{%
vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em%
} % extra space
}%
}{%
\def\LWR@singledollardepthstyle{}%
}%
- \IfValueTF{#1}{%
- \LWR@findcurrenttextcolor% sets \LWR@tempcolor
- \begin{lateximage}*% use hashing
- [#2]% alt
- [% addl' hashing
- #3%
- FM\LWR@f@family%
- SR\LWR@f@series%
- SH\LWR@f@shape%
- CL\LWR@tempcolor%
- ]%
- [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
- }{%
+ \ifbool{LWR@dynamicmath}{%
+ \LWR@traceinfo{subsingledollar: dynamic}%
\begin{lateximage}% no hashing
- [#2]% alt
+ [(\mathimagename)]% alt tag
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ }{%
+ \LWR@traceinfo{subsingledollar: static}%
+ \IfValueTF{#1}{%
+ \LWR@findcurrenttextcolor% sets \LWR@tempcolor
+ \begin{lateximage}*% use hashing
+ [#2]% alt
+ [% addl' hashing
+ #3%
+ FM\LWR@f@family%
+ SR\LWR@f@series%
+ SH\LWR@f@shape%
+ CL\LWR@tempcolor%
+ ]%
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ }{%
+ \begin{lateximage}% no hashing
+ [#2]% alt
+ []% no add'l hashing
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
+ }%
}%
\LWR@addbaselinemarker%
\hspace*{-10sp}%
@@ -8923,7 +9116,7 @@ autopage-\theLWR@currentautosec%
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
- \LWR@subsingledollar*{(math image)}{%
+ \LWR@subsingledollar*{(\mathimagename)}{%
\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{\relax%
\LWR@origensuredmath{#1}%
@@ -8935,7 +9128,7 @@ autopage-\theLWR@currentautosec%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{\LWR@origensuredmath{#1}}%
{%
- \LWR@subsingledollar*{(math image)}{%
+ \LWR@subsingledollar*{(\mathimagename)}{%
\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{%
\LWR@origensuredmath{#1}%
@@ -9684,7 +9877,7 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{lateximage: about to create a new page}%
\LWR@orignewpage%
\LWR@traceinfo{lateximage: about to create minipage}%
- \LWR@origminipage{6in}%
+ \LWR@print@minipage{6in}%
\csuse{LWR@orig\LateximageFontSizeName}%
\LWR@traceinfo{lateximage: about to temporarily restore formatting}%
\LWR@restoreorigformatting%
@@ -9721,10 +9914,10 @@ autopage-\theLWR@currentautosec%
}%
{% end of outer-most lateximage
\LWR@traceinfo{lateximage: ending outer-most lateximage}%
- \LWR@origendminipage%
+ \endLWR@print@minipage%
\LWR@orignewpage%
\LWR@origscriptsize%
- \LWR@origvspace*{.5\baselineskip}%
+ \LWR@print@vspace*{.5\baselineskip}%
\LWR@htmlclosecomment%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
\IfBooleanTF{#1}% starred
@@ -9732,14 +9925,14 @@ autopage-\theLWR@currentautosec%
\LWR@subinlineimage[#2]{lateximage}%
{%
lateximages\OSPathSymbol%
- \LWR@origmbox{\LWR@hashedname}%
+ \LWR@print@mbox{\LWR@hashedname}%
}{svg}{#4}%
}% hash
{% no hash
\LWR@subinlineimage[#2]{lateximage}%
{%
lateximages\OSPathSymbol%
- \LWR@origmbox{lateximage-\theLWR@externalfilecnt}%
+ \LWR@print@mbox{lateximage-\theLWR@externalfilecnt}%
}{svg}{#4}%
}% no hash
\LWR@ensuredoingapar%
@@ -9770,7 +9963,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\LWR@origmbox{text-align:center}]{center}}
+{\BlockClass[\LWR@print@mbox{text-align:center}]{center}}
{\BlockClass{center}}
}
{\endBlockClass}
@@ -9779,7 +9972,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\LWR@origmbox{text-align:right}]{flushright}}
+{\BlockClass[\LWR@print@mbox{text-align:right}]{flushright}}
{\BlockClass{flushright}}
}
{\endBlockClass}
@@ -9788,7 +9981,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\LWR@origmbox{text-align:left}]{flushleft}}
+{\BlockClass[\LWR@print@mbox{text-align:left}]{flushleft}}
{\BlockClass{flushleft}}
}
{\endBlockClass}
@@ -9880,16 +10073,12 @@ autopage-\theLWR@currentautosec%
\@ifpackageloaded{xcolor}{
\LWR@traceinfo{patching xcolor}
\LetLtxMacro\colorboxBlock\colorbox
-\warpprintonly{
-\LetLtxMacro\LWRprint@colorboxBlock\colorbox
-\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
-\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
-}
+\LetLtxMacro\LWR@orig@print@fcolorbox\fcolorbox
\newsavebox{\LWR@colorminipagebox}
-\DeclareDocumentCommand{\LWRprint@fcolorbox}{o m o m +m}{%
-\LWR@traceinfo{LWRprint@fcolorbox #2 #4}%
+\NewDocumentCommand{\LWR@print@fcolorbox}{o m o m +m}{%
+\LWR@traceinfo{LWR@print@fcolorbox #2 #4}%
\begin{lrbox}{\LWR@colorminipagebox}%
#5%
\end{lrbox}%
@@ -9910,20 +10099,23 @@ autopage-\theLWR@currentautosec%
\IfValueTF{#1}%
{%
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}%
{% no value #1
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}% no value #1
}% #4 not none
-\LWR@traceinfo{LWRprint@fcolorbox done}%
+\LWR@traceinfo{LWR@print@fcolorbox done}%
}
-\LetLtxMacro\LWRprint@fcolorboxBlock\LWRprint@fcolorbox
-\NewDocumentEnvironment{LWRprint@fcolorminipage}{o m o m O{c} O{} o m}
+\renewcommand*{\fcolorbox}{\LWR@print@fcolorbox}
+\newcommand*{\LWR@print@fcolorboxBlock}{\LWR@print@fcolorbox}
+\newcommand*{\fcolorboxBlock}{\LWR@print@fcolorboxBlock}
+
+\NewDocumentEnvironment{LWR@print@fcolorminipage}{o m o m O{c} O{} o m}
{%
\LWR@traceinfo{*** fcolorminipage: #2 #4 #8}%
\begin{lrbox}{\LWR@colorminipagebox}%
@@ -9950,31 +10142,21 @@ autopage-\theLWR@currentautosec%
\IfValueTF{#1}%
{%
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}%
{% no value #1
\IfValueTF{#3}%
- {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
}% no value #1
}% #4 not none
\LWR@traceinfo{*** finished end fcolorminipage}%
}
-\newcommand*{\LWR@restoreorigprintxcolor}{%
-\LWR@traceinfo{LWR@restoreorigprintxcolor}%
-\LetLtxMacro\colorboxBlock\LWRprint@colorboxBlock%
-\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
-\LetLtxMacro\fcolorboxBlock\LWRprint@fcolorboxBlock%
-\LetLtxMacro\fcolorminipage\LWRprint@fcolorminipage%
-\LetLtxMacro\endfcolorminipage\endLWRprint@fcolorminipage%
-}
-
-\appto\LWR@restoreorigformatting{%
-\LWR@restoreorigprintxcolor%
-}
-\warpprintonly{\LWR@restoreorigprintxcolor}
+\newenvironment*{fcolorminipage}
+ {\LWR@print@fcolorminipage}
+ {\endLWR@print@fcolorminipage}
\LWR@traceinfo{xcolor patches done}
}{}% xcolor loaded
@@ -10014,7 +10196,7 @@ autopage-\theLWR@currentautosec%
\renewcommand*{\@@@setcref}[2]{#1{\ref{#2}}{}{}}
}{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\cref\space will fail.
}%
}
@@ -10036,7 +10218,7 @@ autopage-\theLWR@currentautosec%
}
}{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\crefrange\space will fail.
}
}
@@ -10064,7 +10246,7 @@ autopage-\theLWR@currentautosec%
}
{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\cpageref\space will fail.
}
}
@@ -10093,7 +10275,7 @@ autopage-\theLWR@currentautosec%
}
{
\PackageWarning{lwarp-cleveref}{
- Unknown verison of cleveref.
+ Unknown version of cleveref.
\protect\cpagerefrange\space will fail.
}
}
@@ -10140,7 +10322,7 @@ autopage-\theLWR@currentautosec%
\begin{warpHTML}
\newbool{LWR@minipagethispar}
\boolfalse{LWR@minipagethispar}
-\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
+\NewDocumentEnvironment{LWR@HTML@minipage}{O{t} o O{t} m}
{%
\LWR@traceinfo{minipage}%
\begingroup
@@ -10161,18 +10343,21 @@ autopage-\theLWR@currentautosec%
\ifbool{FormatWP}{%
\addtocounter{LWR@thisautoidWP}{1}%
-\LWR@htmltag{div id="\LWR@origmbox{autoidWP-\arabic{LWR@thisautoidWP}}" class="wpminipage"}%
+\LWR@htmltag{%
+ div id="\LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}" %
+ class="wpminipage"%
+}%
}{}%
\LWR@traceinfo{minipage: creating div class}%
\LWR@htmltag{div class="minipage" style="%
-\ifthenelse{\equal{#1}{t}}{\LWR@origmbox{vertical-align:bottom} ; }{}%
-\ifthenelse{\equal{#1}{c}}{\LWR@origmbox{vertical-align:middle} ; }{}%
-\ifthenelse{\equal{#1}{b}}{\LWR@origmbox{vertical-align:top} ; }{}%
-\ifthenelse{\equal{#3}{t}}{\LWR@origmbox{justify-content:flex-start} ; }{}%
-\ifthenelse{\equal{#3}{c}}{\LWR@origmbox{justify-content:center} ; }{}%
-\ifthenelse{\equal{#3}{b}}{\LWR@origmbox{justify-content:flex-end} ; }{}%
-\ifthenelse{\equal{#3}{s}}{\LWR@origmbox{justify-content:space-between} ; }{}%
+\ifthenelse{\equal{#1}{t}}{\LWR@print@mbox{vertical-align:bottom} ; }{}%
+\ifthenelse{\equal{#1}{c}}{\LWR@print@mbox{vertical-align:middle} ; }{}%
+\ifthenelse{\equal{#1}{b}}{\LWR@print@mbox{vertical-align:top} ; }{}%
+\ifthenelse{\equal{#3}{t}}{\LWR@print@mbox{justify-content:flex-start} ; }{}%
+\ifthenelse{\equal{#3}{c}}{\LWR@print@mbox{justify-content:center} ; }{}%
+\ifthenelse{\equal{#3}{b}}{\LWR@print@mbox{justify-content:flex-end} ; }{}%
+\ifthenelse{\equal{#3}{s}}{\LWR@print@mbox{justify-content:space-between} ; }{}%
\LWR@traceinfo{minipage: about to print the width of \LWR@printlength{\LWR@minipagewidth}}%
\ifbool{LWR@minipagefullwidth}%
{\boolfalse{LWR@minipagefullwidth}}%
@@ -10223,15 +10408,21 @@ autopage-\theLWR@currentautosec%
\global\booltrue{LWR@minipagethispar}%
\LWR@traceinfo{LWR@minipage: done}%
}
-\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
+
+\LWR@formattedenv{minipage}
+\NewDocumentCommand{\LWR@HTML@parbox}{O{t} o O{t} m +m}
{
\LWR@traceinfo{parbox of width #4}%
\begin{minipage}[#1][#2][#3]{#4}%
#5
\end{minipage}%
}
-\renewcommand*{\mbox}[1]{#1}
-\RenewDocumentCommand{\makebox}{d() o o m}{%
+
+\LWR@formatted{parbox}
+\newcommand*{\LWR@HTML@mbox}[1]{#1}
+
+\LWR@formatted{mbox}
+\NewDocumentCommand{\LWR@HTML@makebox}{d() o o m}{%
\IfValueTF{#2}%
{%
{% scope
@@ -10241,8 +10432,8 @@ autopage-\theLWR@currentautosec%
\ifstrequal{#3}{s}{\def\LWR@align{justify}}{}%
\setlength{\LWR@tempwidth}{#2}%
\InlineClass[%
- \LWR@origmbox{display:inline-block} ; %
- \LWR@origmbox{text-align}:\LWR@align\ ; %
+ \LWR@print@mbox{display:inline-block} ; %
+ \LWR@print@mbox{text-align}:\LWR@align\ ; %
width:\LWR@printlength{\LWR@tempwidth}%
]%
{makebox}%
@@ -10251,11 +10442,15 @@ autopage-\theLWR@currentautosec%
}%
{#4}% no width
}
+
+\LWR@formatted{makebox}
\LetLtxMacro\LWR@origframebox\framebox
-\RenewDocumentCommand{\framebox}{o o m}{%
+\NewDocumentCommand{\LWR@HTML@framebox}{o o m}{%
\fbox{\makebox[#1][#2]{#3}}%
}
+
+\LWR@formatted{framebox}
\newlength{\LWR@atleastonept}
\newcommand*{\LWR@forceminwidth}[1]{%
@@ -10272,17 +10467,20 @@ autopage-\theLWR@currentautosec%
border:\LWR@printlength{\LWR@atleastonept} solid black ; %
padding:\LWR@printlength{\fboxsep}%
}
-\let\LWRprint@fbox\fbox
-\newcommand{\LWRhtml@fbox}[1]{%
+\newcommand{\LWR@HTML@fbox}[1]{%
\LWR@traceinfo{HTML fbox}%
\LWR@forceminwidth{\fboxrule}%
\InlineClass[%
\LWR@blackborderpadding%
]{fbox}{#1}
}
-\AtBeginDocument{\let\fbox\LWRhtml@fbox}
-
-\newcommand{\fboxBlock}[1]{%
+\AtBeginDocument{\LWR@formatted{fbox}}
+\end{warpHTML}
+\begin{warpall}
+\let\fboxBlock\fbox
+\end{warpall}
+\begin{warpHTML}
+\newcommand{\LWR@HTML@fboxBlock}[1]{%
\LWR@forceminwidth{\fboxrule}%
\begin{BlockClass}[%
\LWR@blackborderpadding%
@@ -10291,34 +10489,14 @@ padding:\LWR@printlength{\fboxsep}%
\end{BlockClass}
}
-\NewDocumentEnvironment{fminipage}{O{t} o O{t} m}
-{%
-\LWR@traceinfo{fminipage #1 #2 #3 #4}%
-\LWR@forceminwidth{\fboxrule}%
-\setlength{\LWR@tempwidth}{#4}%
-\IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}%
-\begin{BlockClass}[%
-\LWR@blackborderpadding ; %
-\IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }%
-width:\LWR@printlength{\LWR@tempwidth}%
-]{fminipage}%
-}
-{%
-\end{BlockClass}%
-\LWR@traceinfo{fminipage done}%
-}
-\LetLtxMacro{\LWR@origraisebox}{\raisebox}
-
-\RenewDocumentCommand{\raisebox}{m o o m}{%
-#4%
-}
+\LWR@formatted{fboxBlock}
\end{warpHTML}
-
\begin{warpall}
+
\newsavebox{\LWR@fminipagebox}
-\NewDocumentEnvironment{LWRprint@fminipage}{O{t} o O{t} m}
+\NewDocumentEnvironment{LWR@print@fminipage}{O{t} o O{t} m}
{%
\IfValueTF{#3}%
{\def\LWR@thisalign{#3}}
@@ -10338,15 +10516,40 @@ width:\LWR@printlength{\LWR@tempwidth}%
\endminipage%
}
+\newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage}
+
\end{warpall}
-\begin{warpprint}
-\let\fboxBlock\fbox
+\begin{warpHTML}
+
+\NewDocumentEnvironment{LWR@HTML@fminipage}{O{t} o O{t} m}
+{%
+\LWR@traceinfo{fminipage #1 #2 #3 #4}%
+\LWR@forceminwidth{\fboxrule}%
+\setlength{\LWR@tempwidth}{#4}%
+\IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}%
+\begin{BlockClass}[%
+\LWR@blackborderpadding ; %
+\IfValueT{#2}{height:\LWR@printlength{\LWR@tempheight} ; }%
+width:\LWR@printlength{\LWR@tempwidth}%
+]{fminipage}%
+}
+{%
+\end{BlockClass}%
+\LWR@traceinfo{fminipage done}%
+}
+
+\LWR@formattedenv{fminipage}
+\end{warpHTML}
+\begin{warpHTML}
-\LetLtxMacro{\fminipage}{\LWRprint@fminipage}
-\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}
+\NewDocumentCommand{\LWR@HTML@raisebox}{m o o m}{%
+#4%
+}
-\end{warpprint}
+\LWR@formatted{raisebox}
+
+\end{warpHTML}
\begin{warpHTML}
@@ -10360,18 +10563,18 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}}
\DeclareRobustCommand{\LWR@nullemph}[1]{#1}
-\LetLtxMacro{\emph}{\LWR@HTMLemph}
+\LetLtxMacro\emph\LWR@HTMLemph
\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{%
\LWR@HTMLtextstyle{font-weight:normal}{textmd}{#1}%
}
\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1}
-\LetLtxMacro{\textmd}{\LWR@HTMLtextmd}
+\LetLtxMacro\textmd\LWR@HTMLtextmd
\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}}
\DeclareRobustCommand{\LWR@nulltextbf}[1]{#1}
-\LetLtxMacro{\textbf}{\LWR@HTMLtextbf}
+\LetLtxMacro\textbf\LWR@HTMLtextbf
\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{%
\LWR@HTMLtextstyle{font-family:serif}{textrm}{#1}%
@@ -10379,17 +10582,17 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
-\LetLtxMacro{\textrm}{\LWR@HTMLtextrm}
+\LetLtxMacro\textrm\LWR@HTMLtextrm
\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{%
\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}%
}
\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
-\LetLtxMacro{\textsf}{\LWR@HTMLtextsf}
+\LetLtxMacro\textsf\LWR@HTMLtextsf
\DeclareRobustCommand{\LWR@HTMLtexttt}[1]{\LWR@htmlspan{kbd}{#1}}
\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1}
-\LetLtxMacro{\texttt}{\LWR@HTMLtexttt}
+\LetLtxMacro\texttt\LWR@HTMLtexttt
\DeclareRobustCommand{\LWR@HTMLtextup}[1]{%
\LWR@HTMLtextstyle{font-variant:normal}{textup}{#1}%
@@ -10397,11 +10600,11 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextup}[1]{#1}
-\LetLtxMacro{\textup}{\LWR@HTMLtextup}
+\LetLtxMacro\textup\LWR@HTMLtextup
\DeclareRobustCommand{\LWR@HTMLtextit}[1]{\LWR@htmlspan{i}{#1}}
\DeclareRobustCommand{\LWR@nulltextit}[1]{#1}
-\LetLtxMacro{\textit}{\LWR@HTMLtextit}
+\LetLtxMacro\textit\LWR@HTMLtextit
\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{%
\LWR@HTMLtextstyle{font-variant:small-caps}{textsc}{#1}%
@@ -10409,7 +10612,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
-\LetLtxMacro{\textsc}{\LWR@HTMLtextsc}
+\LetLtxMacro\textsc\LWR@HTMLtextsc
\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{%
\LWR@HTMLtextstyle{font-style:oblique}{textsl}{#1}%
@@ -10417,11 +10620,11 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
-\LetLtxMacro{\textsl}{\LWR@HTMLtextsl}
+\LetLtxMacro\textsl\LWR@HTMLtextsl
\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
\DeclareRobustCommand{\LWR@nulltextnormal}[1]{#1}
-\LetLtxMacro{\textnormal}{\LWR@HTMLtextnormal}
+\LetLtxMacro\textnormal\LWR@HTMLtextnormal
\DeclareRobustCommand{\LWR@nullrmfamily}{}
\DeclareRobustCommand{\LWR@nullsffamily}{}
@@ -10436,28 +10639,28 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nullnormalfont}{}
\newcommand*{\LWR@nullfonts}{%
-\LetLtxMacro{\emph}{\LWR@nullemph}%
-\LetLtxMacro{\textmd}{\LWR@nulltextmd}%
-\LetLtxMacro{\textbf}{\LWR@nulltextbf}%
-\LetLtxMacro{\textrm}{\LWR@nulltextrm}%
-\LetLtxMacro{\textsf}{\LWR@nulltextsf}%
-\LetLtxMacro{\texttt}{\LWR@nulltexttt}%
-\LetLtxMacro{\textup}{\LWR@nulltextup}%
-\LetLtxMacro{\textit}{\LWR@nulltextit}%
-\LetLtxMacro{\textsc}{\LWR@nulltextsc}%
-\LetLtxMacro{\textsl}{\LWR@nulltextsl}%
-\LetLtxMacro{\textnormal}{\LWR@nulltextnormal}%
-\LetLtxMacro{\rmfamily}{\LWR@nullrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@nullsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@nullttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@nullbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@nullmdseries}%
-\LetLtxMacro{\upshape}{\LWR@nullupshape}%
-\LetLtxMacro{\slshape}{\LWR@nullslshape}%
-\LetLtxMacro{\scshape}{\LWR@nullscshape}%
-\LetLtxMacro{\itshape}{\LWR@nullitshape}%
-\LetLtxMacro{\em}{\LWR@nullem}%
-\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
+\LetLtxMacro\emph\LWR@nullemph%
+\LetLtxMacro\textmd\LWR@nulltextmd%
+\LetLtxMacro\textbf\LWR@nulltextbf%
+\LetLtxMacro\textrm\LWR@nulltextrm%
+\LetLtxMacro\textsf\LWR@nulltextsf%
+\LetLtxMacro\texttt\LWR@nulltexttt%
+\LetLtxMacro\textup\LWR@nulltextup%
+\LetLtxMacro\textit\LWR@nulltextit%
+\LetLtxMacro\textsc\LWR@nulltextsc%
+\LetLtxMacro\textsl\LWR@nulltextsl%
+\LetLtxMacro\textnormal\LWR@nulltextnormal%
+\LetLtxMacro\rmfamily\LWR@nullrmfamily%
+\LetLtxMacro\sffamily\LWR@nullsffamily%
+\LetLtxMacro\ttfamily\LWR@nullttfamily%
+\LetLtxMacro\bfseries\LWR@nullbfseries%
+\LetLtxMacro\mdseries\LWR@nullmdseries%
+\LetLtxMacro\upshape\LWR@nullupshape%
+\LetLtxMacro\slshape\LWR@nullslshape%
+\LetLtxMacro\scshape\LWR@nullscshape%
+\LetLtxMacro\itshape\LWR@nullitshape%
+\LetLtxMacro\em\LWR@nullem%
+\LetLtxMacro\normalfont\LWR@nullnormalfont%
\renewcommand*{\,}{-}%
\renewcommand*{~}{-}%
\renewcommand*{\newline}{ }%
@@ -10638,8 +10841,9 @@ width:\LWR@printlength{\LWR@tempwidth}%
\newlength{\LWR@tempheight}
\newlength{\LWR@tempraise}
-\NewDocumentCommand{\LWR@hspace}{s m}{%
-\setlength{\LWR@tempwidth}{#2}%
+\newcommand{\LWR@select@html@hspace}{%
+\RenewDocumentCommand{\hspace}{s m}{%
+\setlength{\LWR@tempwidth}{##2}%
\ifnum\gluestretchorder\LWR@tempwidth>0%
\setlength{\LWR@tempwidth}{2em}%
\fi%
@@ -10665,13 +10869,21 @@ width:\LWR@printlength{\LWR@tempwidth}%
}%
\LWR@minipagestartpars%
}% width not 0
+}%
+}
+\newcommand{\LWR@select@html@nohspace}{%
+ \RenewDocumentCommand{\hspace}{s m}{}%
+}
+
+\newcommand*{\LWR@select@print@hspace}{%
+ \renewrobustcmd\hspace{\@ifstar\@hspacer\@hspace}%
}
-\NewDocumentCommand{\LWR@nohspace}{s m}{}
-\LetLtxMacro\hspace\LWR@hspace
+\LWR@select@html@hspace
+
+\NewDocumentCommand{\LWR@HTML@vspace}{s m}{}
-\NewDocumentCommand{\LWR@vspace}{s m}{}
-\LetLtxMacro\vspace\LWR@vspace
+\LWR@formatted{vspace}
\renewcommand*{\linebreak}[1][]{\newline}
@@ -10686,7 +10898,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\RenewDocumentCommand{\enlargethispage}{s m}{}
\renewcommand*{\clearpage}{}
\renewcommand*{\cleardoublepage}{}
-\NewDocumentCommand{\LWR@rule}{o m m}{%
+\newcommand*{\LWR@HTML@rule}[3][]{%
\setlength{\LWR@tempwidth}{#2}%
\ifthenelse{\lengthtest{\LWR@tempwidth=0pt}}
{}% zero- width
@@ -10703,13 +10915,15 @@ width:\LWR@printlength{\LWR@tempwidth}%
}%
{\setlength{\LWR@tempheight}{1pt}}{}%
\LWR@minipagestoppars%
+ \LWR@findcurrenttextcolor%
\LWR@htmltagc{%
span
style="%
\ifbool{FormatWP}{}{background:\LWR@currenttextcolor ; }%
width:\LWR@printlength{\LWR@tempwidth} ; %
height:\LWR@printlength{\LWR@tempheight} ; %
- \IfValueT{#1}%
+ \ifblank{#1}%
+ {}%
{%
\setlength{\LWR@tempraise}{0pt-#1}%
\setlength{\LWR@tempraise}{\LWR@tempraise*2}%
@@ -10734,8 +10948,8 @@ width:\LWR@printlength{\LWR@tempwidth}%
\LWR@minipagestartpars%
}% non-zero width
}
-\renewrobustcmd{\rule}{\LWR@rule}
+\LWR@formatted{rule}
\end{warpHTML}