texlive[46804] trunk: lwarp (3mar18)
commits+karl at tug.org
commits+karl at tug.org
Sat Mar 3 22:54:38 CET 2018
Revision: 46804
http://tug.org/svn/texlive?view=revision&revision=46804
Author: karl
Date: 2018-03-03 22:54:38 +0100 (Sat, 03 Mar 2018)
Log Message:
-----------
lwarp (3mar18)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
Added Paths:
-----------
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2018-03-03 21:54:38 UTC (rev 46804)
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.49"
+printversion = "v0.50"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -27,7 +27,7 @@
For use with latexmk or a Makefile:
Convert project_html.pdf to project_html.html and
individual HTML files.
-lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
+lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -67,10 +67,12 @@
io.output(destfile)
for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
-if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
-io.output(newfilename) ;
-else -- not a splitpoint
-io.write (line .. "\n") ;
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then
+ -- split the file
+ io.output(newfilename) ;
+else
+ -- not a splitpoint
+ io.write (line .. "\n") ;
end
end -- do
io.close(sfile)
@@ -79,8 +81,10 @@
-- Incorrect value, so print an error and exit.
function cvalueerror ( line, linenum , cvalue )
- print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
@@ -97,11 +101,14 @@
-- Default xdyfile:
xdyfile = "lwarp.xdy"
-- Verify the file exists:
-if (lfs.attributes(conffile,"mode")==nil) then -- file not exists
-print("lwarpmk: " .. conffile .." does not exist.")
-print("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
-printhelp () ;
-os.exit(1) -- exit the entire lwarpmk script
+if (lfs.attributes(conffile,"mode")==nil) then
+ -- file not exists
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. conffile .." does not exist.")
+ print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
+ print ("lwarpmk: ===")
+ printhelp () ;
+ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
@@ -113,11 +120,13 @@
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
if ( i == nil ) then
-print ( linenum .. " : " .. line ) ;
-print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
-printconf () ;
-os.exit(1) ;
-end
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
+ os.exit(1) ;
+end -- nil
if ( cvarname == "opsystem" ) then
-- Verify choice of opsystem:
if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
@@ -143,39 +152,65 @@
elseif ( cvarname == "language" ) then language = cvalue
elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue
else
-print ( linenum .. " : " .. line ) ;
-print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
-printconf () ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
os.exit(1) ;
-end
+end -- cvarname
end -- do scan lines
io.close(cfile)
end -- file exists
+-- Error if sourcename is "lwarp".
+-- This could happen if a local copy of lwarp has recently been recompiled.
+if sourcename=="lwarp" then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Lwarp has recently been recompiled in this directory,")
+ print ("lwarpmk: and \"lwarpmk.conf\" is no longer set for your own project.")
+ print ("lwarpmk: Recompile your own project using pdf/lua/xelatex <projectname>.")
+ print ("lwarpmk: After a recompile, \"lwarpmk.conf\" will be set for your project,")
+ print ("lwarpmk: and you may again use lwarpmk.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end -- sourcename of "lwarp"
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
-rmname = "rm"
-mvname = "mv"
-touchnamepre = "touch"
-touchnamepost = ""
-dirslash = "/"
-opquote= "\'"
+ rmname = "rm"
+ mvname = "mv"
+ cpname = "cp"
+ touchnamepre = "touch"
+ touchnamepost = ""
+ newtouchname = "touch"
+ dirslash = "/"
+ opquote= "\'"
+ cmdgroupopenname = " ( "
+ cmdgroupclosename = " ) "
+ seqname = " ; "
+ bgname = " &"
elseif opsystem=="Windows" then -- For Windows
-rmname = "DEL"
-mvname = "MOVE"
-touchnamepre = "COPY /b"
-touchnamepost = "+,,"
-dirslash = "\\"
-opquote= "\""
+ rmname = "DEL"
+ mvname = "MOVE"
+ cpname = "COPY"
+ touchnamepre = "COPY /b"
+ touchnamepost = "+,,"
+ newtouchname = "echo empty >"
+ dirslash = "\\"
+ opquote= "\""
+ cmdgroupopenname = ""
+ cmdgroupclosename = ""
+ seqname = " & "
+ bgname = ""
else print ( "lwarpmk: Select Unix or Windows for opsystem" )
end --- for Windows
-- set xindycmd according to pdflatex vs xelatex/lualatex:
if ( latexname == "pdflatex" ) then
-xindycmd = "texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
else
-xindycmd = "xindy -M texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "xindy -M texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
end
end -- loadconf
@@ -194,8 +229,8 @@
if ( string.find(line,"Rerun to get") ~= nil ) then
io.close(fsource)
return true
-end
-end
+end -- if
+end -- do
io.close(fsource)
return false
end
@@ -205,10 +240,13 @@
function onetime (fsuffix)
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
-err = os.execute(
--- "echo " ..
- latexname .. " " .. sourcename..fsuffix )
-if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+err = os.execute(latexname .. " " .. sourcename..fsuffix)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
@@ -228,8 +266,10 @@
function verifyfileexists (filename)
if (lfs.attributes ( filename , "modification" ) == nil ) then
-print ( "lwarpmk: " .. filename .. " not found." ) ;
-os.exit (1) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. filename .. " not found." ) ;
+ print ("lwarpmk: ===")
+ os.exit (1) ;
end
end
@@ -236,86 +276,155 @@
-- Convert <project>_html.pdf into HTML files:
function pdftohtml ()
- -- Convert to text:
- print ("lwarpmk: Converting " .. sourcename
- .."_html.pdf to " .. sourcename .. "_html.html")
- os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
- .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
- -- Split the result into individual HTML files:
- splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+-- Convert to text:
+print ("lwarpmk: Converting " .. sourcename
+ .."_html.pdf to " .. sourcename .. "_html.html")
+os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
+ .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+-- Split the result into individual HTML files:
+splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
-- Remove auxiliary files:
function removeaux ()
- os.execute ( rmname .. " " ..
- sourcename ..".aux " .. sourcename .. "_html.aux " ..
- sourcename ..".toc " .. sourcename .. "_html.toc " ..
- sourcename ..".lof " .. sourcename .. "_html.lof " ..
- sourcename ..".lot " .. sourcename .. "_html.lot " ..
- sourcename ..".idx " .. sourcename .. "_html.idx " ..
- sourcename ..".ind " .. sourcename .. "_html.ind " ..
- sourcename ..".log " .. sourcename .. "_html.log " ..
- sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
- "*_html_inc.*"
- )
+os.execute ( rmname .. " " ..
+ sourcename ..".aux " .. sourcename .. "_html.aux " ..
+ sourcename ..".toc " .. sourcename .. "_html.toc " ..
+ sourcename ..".lof " .. sourcename .. "_html.lof " ..
+ sourcename ..".lot " .. sourcename .. "_html.lot " ..
+ sourcename ..".idx " .. sourcename .. "_html.idx " ..
+ sourcename ..".ind " .. sourcename .. "_html.ind " ..
+ sourcename ..".log " .. sourcename .. "_html.log " ..
+ sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ "*_html_inc.*"
+ )
end
-- Create lateximages based on lateximages.txt:
function createlateximages ()
print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \"lateximages.txt\" does not exist.")
+ print ("lwarpmk: Your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: or the file has been deleted somehow.")
+ print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,")
+ print ("lwarpmk: and recreate \"lateximages.txt\".")
+ print ("lwarpmk: If your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: then \"lateximages.txt\" will never exist, and")
+ print ("lwarpmk: \"lwarpmk limages\" will not be necessary.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd:
+if opsystem=="Windows" then
+ err = os.execute (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd"
+ )
+ if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd")
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+ end
+end -- create lwarp_one_limage.cmd
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
--- lwimgnum is the sequential lateximage number to assign for the image
-i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|")
+-- lwimghash is true if this filename is a hash
+-- lwimgname is the lateximage filename root to assign for the image
+i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
+-- Skip is this image is hashed and already exists:
+local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
+if (
+ (lwimghash ~= "true") or
+ (lfs.attributes(lwimgfullname,"mode")==nil) -- file not exists
+)
+then -- not hashed or not exists:
+-- Print the name of the file being generated:
+print ( "lwarpmk: " .. lwimgname )
+-- Touch/create the dest so that only once instance tries to build it:
+err = os.execute(newtouchname .. " " .. lwimgfullname)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to touch " .. lwimgfullname)
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+end
-- Separate out the image into its own single-page pdf:
+if opsystem=="Unix" then
+-- For Unix / Linux / Mac OS:
err = os.execute(
-"pdfseparate -f " .. lwimgpage .. " -l " ..
- lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf")
+-- print (
+cmdgroupopenname ..
+"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
-- Crop the image:
-err = os.execute(
-"pdfcrop lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
-- Convert the image to svg:
-err = os.execute(
-"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
--- Move the result into lateximages/:
-err = os.execute(
-mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash )
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
-- Remove the temporary files:
-err = os.execute(
-rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+cmdgroupclosename .. " >/dev/null " .. bgname
+)
+elseif opsystem=="Windows" then
+-- For Windows
+err = os.execute (
+ "start /b \"\" lwarp_one_limage " ..
+ lwimgpage .. " " ..
+ lwimghash .. " " ..
+ lwimgname .. " " ..
+ sourcename .. " <nul >nul"
+)
+end -- Windows
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to create one lateximage.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end -- not hashed or not exists
+end -- not nil
end -- do
io.close(limagesfile)
+print ( "lwarpmk limages: done" )
end -- function
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
function compilelatexmk ( fsuffix )
- -- The recorder option is required to detect changes in <project>.tex
- -- while we are loading <project>_html.tex.
- err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
- .. "-e "
- .. opquote
- .. "$makeindex = q/" -- $
- .. xindycmd
- .. " -M " .. xdyfile
- .. " -L " .. language .. " /"
- .. opquote
- .. " -pdflatex=\"" .. latexname .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
- if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+-- The recorder option is required to detect changes in <project>.tex
+-- while we are loading <project>_html.tex.
+err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
+ .. "-e "
+ .. opquote
+ .. "$makeindex = q/" -- $
+ .. xindycmd
+ .. " -M " .. xdyfile
+ .. " -L " .. language .. " /"
+ .. opquote
+ .. " -pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename..fsuffix ..".tex" ) ;
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end
-- lwarpmk --version :
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2018-03-03 21:54:38 UTC (rev 46804)
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.49 README.txt
+LaTeX lwarp package v0.50 README.txt
Files included are:
Modified: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2018-03-03 21:54:38 UTC (rev 46804)
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.49"
+printversion = "v0.50"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -27,7 +27,7 @@
For use with latexmk or a Makefile:
Convert project_html.pdf to project_html.html and
individual HTML files.
-lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
+lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -67,10 +67,12 @@
io.output(destfile)
for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
-if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
-io.output(newfilename) ;
-else -- not a splitpoint
-io.write (line .. "\n") ;
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then
+ -- split the file
+ io.output(newfilename) ;
+else
+ -- not a splitpoint
+ io.write (line .. "\n") ;
end
end -- do
io.close(sfile)
@@ -79,8 +81,10 @@
-- Incorrect value, so print an error and exit.
function cvalueerror ( line, linenum , cvalue )
- print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
@@ -97,11 +101,14 @@
-- Default xdyfile:
xdyfile = "lwarp.xdy"
-- Verify the file exists:
-if (lfs.attributes(conffile,"mode")==nil) then -- file not exists
-print("lwarpmk: " .. conffile .." does not exist.")
-print("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
-printhelp () ;
-os.exit(1) -- exit the entire lwarpmk script
+if (lfs.attributes(conffile,"mode")==nil) then
+ -- file not exists
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. conffile .." does not exist.")
+ print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
+ print ("lwarpmk: ===")
+ printhelp () ;
+ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
@@ -113,11 +120,13 @@
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
if ( i == nil ) then
-print ( linenum .. " : " .. line ) ;
-print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
-printconf () ;
-os.exit(1) ;
-end
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
+ os.exit(1) ;
+end -- nil
if ( cvarname == "opsystem" ) then
-- Verify choice of opsystem:
if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
@@ -143,39 +152,65 @@
elseif ( cvarname == "language" ) then language = cvalue
elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue
else
-print ( linenum .. " : " .. line ) ;
-print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
-printconf () ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
os.exit(1) ;
-end
+end -- cvarname
end -- do scan lines
io.close(cfile)
end -- file exists
+-- Error if sourcename is "lwarp".
+-- This could happen if a local copy of lwarp has recently been recompiled.
+if sourcename=="lwarp" then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Lwarp has recently been recompiled in this directory,")
+ print ("lwarpmk: and \"lwarpmk.conf\" is no longer set for your own project.")
+ print ("lwarpmk: Recompile your own project using pdf/lua/xelatex <projectname>.")
+ print ("lwarpmk: After a recompile, \"lwarpmk.conf\" will be set for your project,")
+ print ("lwarpmk: and you may again use lwarpmk.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end -- sourcename of "lwarp"
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
-rmname = "rm"
-mvname = "mv"
-touchnamepre = "touch"
-touchnamepost = ""
-dirslash = "/"
-opquote= "\'"
+ rmname = "rm"
+ mvname = "mv"
+ cpname = "cp"
+ touchnamepre = "touch"
+ touchnamepost = ""
+ newtouchname = "touch"
+ dirslash = "/"
+ opquote= "\'"
+ cmdgroupopenname = " ( "
+ cmdgroupclosename = " ) "
+ seqname = " ; "
+ bgname = " &"
elseif opsystem=="Windows" then -- For Windows
-rmname = "DEL"
-mvname = "MOVE"
-touchnamepre = "COPY /b"
-touchnamepost = "+,,"
-dirslash = "\\"
-opquote= "\""
+ rmname = "DEL"
+ mvname = "MOVE"
+ cpname = "COPY"
+ touchnamepre = "COPY /b"
+ touchnamepost = "+,,"
+ newtouchname = "echo empty >"
+ dirslash = "\\"
+ opquote= "\""
+ cmdgroupopenname = ""
+ cmdgroupclosename = ""
+ seqname = " & "
+ bgname = ""
else print ( "lwarpmk: Select Unix or Windows for opsystem" )
end --- for Windows
-- set xindycmd according to pdflatex vs xelatex/lualatex:
if ( latexname == "pdflatex" ) then
-xindycmd = "texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
else
-xindycmd = "xindy -M texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "xindy -M texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
end
end -- loadconf
@@ -194,8 +229,8 @@
if ( string.find(line,"Rerun to get") ~= nil ) then
io.close(fsource)
return true
-end
-end
+end -- if
+end -- do
io.close(fsource)
return false
end
@@ -205,10 +240,13 @@
function onetime (fsuffix)
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
-err = os.execute(
--- "echo " ..
- latexname .. " " .. sourcename..fsuffix )
-if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+err = os.execute(latexname .. " " .. sourcename..fsuffix)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
@@ -228,8 +266,10 @@
function verifyfileexists (filename)
if (lfs.attributes ( filename , "modification" ) == nil ) then
-print ( "lwarpmk: " .. filename .. " not found." ) ;
-os.exit (1) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. filename .. " not found." ) ;
+ print ("lwarpmk: ===")
+ os.exit (1) ;
end
end
@@ -236,86 +276,155 @@
-- Convert <project>_html.pdf into HTML files:
function pdftohtml ()
- -- Convert to text:
- print ("lwarpmk: Converting " .. sourcename
- .."_html.pdf to " .. sourcename .. "_html.html")
- os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
- .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
- -- Split the result into individual HTML files:
- splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+-- Convert to text:
+print ("lwarpmk: Converting " .. sourcename
+ .."_html.pdf to " .. sourcename .. "_html.html")
+os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
+ .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+-- Split the result into individual HTML files:
+splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
-- Remove auxiliary files:
function removeaux ()
- os.execute ( rmname .. " " ..
- sourcename ..".aux " .. sourcename .. "_html.aux " ..
- sourcename ..".toc " .. sourcename .. "_html.toc " ..
- sourcename ..".lof " .. sourcename .. "_html.lof " ..
- sourcename ..".lot " .. sourcename .. "_html.lot " ..
- sourcename ..".idx " .. sourcename .. "_html.idx " ..
- sourcename ..".ind " .. sourcename .. "_html.ind " ..
- sourcename ..".log " .. sourcename .. "_html.log " ..
- sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
- "*_html_inc.*"
- )
+os.execute ( rmname .. " " ..
+ sourcename ..".aux " .. sourcename .. "_html.aux " ..
+ sourcename ..".toc " .. sourcename .. "_html.toc " ..
+ sourcename ..".lof " .. sourcename .. "_html.lof " ..
+ sourcename ..".lot " .. sourcename .. "_html.lot " ..
+ sourcename ..".idx " .. sourcename .. "_html.idx " ..
+ sourcename ..".ind " .. sourcename .. "_html.ind " ..
+ sourcename ..".log " .. sourcename .. "_html.log " ..
+ sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ "*_html_inc.*"
+ )
end
-- Create lateximages based on lateximages.txt:
function createlateximages ()
print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \"lateximages.txt\" does not exist.")
+ print ("lwarpmk: Your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: or the file has been deleted somehow.")
+ print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,")
+ print ("lwarpmk: and recreate \"lateximages.txt\".")
+ print ("lwarpmk: If your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: then \"lateximages.txt\" will never exist, and")
+ print ("lwarpmk: \"lwarpmk limages\" will not be necessary.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd:
+if opsystem=="Windows" then
+ err = os.execute (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd"
+ )
+ if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd")
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+ end
+end -- create lwarp_one_limage.cmd
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
--- lwimgnum is the sequential lateximage number to assign for the image
-i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|")
+-- lwimghash is true if this filename is a hash
+-- lwimgname is the lateximage filename root to assign for the image
+i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
+-- Skip is this image is hashed and already exists:
+local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
+if (
+ (lwimghash ~= "true") or
+ (lfs.attributes(lwimgfullname,"mode")==nil) -- file not exists
+)
+then -- not hashed or not exists:
+-- Print the name of the file being generated:
+print ( "lwarpmk: " .. lwimgname )
+-- Touch/create the dest so that only once instance tries to build it:
+err = os.execute(newtouchname .. " " .. lwimgfullname)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to touch " .. lwimgfullname)
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+end
-- Separate out the image into its own single-page pdf:
+if opsystem=="Unix" then
+-- For Unix / Linux / Mac OS:
err = os.execute(
-"pdfseparate -f " .. lwimgpage .. " -l " ..
- lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf")
+-- print (
+cmdgroupopenname ..
+"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
-- Crop the image:
-err = os.execute(
-"pdfcrop lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
-- Convert the image to svg:
-err = os.execute(
-"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
--- Move the result into lateximages/:
-err = os.execute(
-mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash )
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
-- Remove the temporary files:
-err = os.execute(
-rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+cmdgroupclosename .. " >/dev/null " .. bgname
+)
+elseif opsystem=="Windows" then
+-- For Windows
+err = os.execute (
+ "start /b \"\" lwarp_one_limage " ..
+ lwimgpage .. " " ..
+ lwimghash .. " " ..
+ lwimgname .. " " ..
+ sourcename .. " <nul >nul"
+)
+end -- Windows
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to create one lateximage.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end -- not hashed or not exists
+end -- not nil
end -- do
io.close(limagesfile)
+print ( "lwarpmk limages: done" )
end -- function
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
function compilelatexmk ( fsuffix )
- -- The recorder option is required to detect changes in <project>.tex
- -- while we are loading <project>_html.tex.
- err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
- .. "-e "
- .. opquote
- .. "$makeindex = q/" -- $
- .. xindycmd
- .. " -M " .. xdyfile
- .. " -L " .. language .. " /"
- .. opquote
- .. " -pdflatex=\"" .. latexname .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
- if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+-- The recorder option is required to detect changes in <project>.tex
+-- while we are loading <project>_html.tex.
+err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
+ .. "-e "
+ .. opquote
+ .. "$makeindex = q/" -- $
+ .. xindycmd
+ .. " -M " .. xdyfile
+ .. " -L " .. language .. " /"
+ .. opquote
+ .. " -pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename..fsuffix ..".tex" ) ;
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end
-- lwarpmk --version :
Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2018-03-03 21:54:38 UTC (rev 46804)
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2018/02/19 v0.49 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2018/03/03 v0.50 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -132,12 +132,6 @@
\usepackage{comment}
\excludecomment{testing}
-
-% \usepackage{morefloats}
-% \usepackage{marginfix}
-
-
-
\usepackage{tocloft}
\renewcommand{\cftpartfont}{\Large\bfseries}
\setlength{\cftsecnumwidth}{2.5em}
@@ -271,14 +265,14 @@
\providerobustcmd*{\lmacro}[1]{\textbackslash#1}
-\providerobustcmd*{\cmds}[1]{\texttt{#1}}
-\providerobustcmd*{\env}[1]{\texttt{#1}}
-\providerobustcmd*{\ctr}[1]{\texttt{#1}}
-\providerobustcmd*{\pkg}[1]{\textsf{#1}}
-\providerobustcmd*{\prog}[1]{\textsf{#1}}
-\providerobustcmd*{\progcode}[1]{\texttt{#1}}
-\providerobustcmd*{\optn}[1]{\texttt{#1}}
-\providerobustcmd*{\filenm}[1]{\texttt{#1}}
+\providerobustcmd*{\cmds}[1]{\mbox{\texttt{#1}}}
+\providerobustcmd*{\env}[1]{\mbox{\texttt{#1}}}
+\providerobustcmd*{\ctr}[1]{\mbox{\texttt{#1}}}
+\providerobustcmd*{\pkg}[1]{\mbox{\textsf{#1}}}
+\providerobustcmd*{\prog}[1]{\mbox{\textsf{#1}}}
+\providerobustcmd*{\progcode}[1]{\mbox{\texttt{#1}}}
+\providerobustcmd*{\optn}[1]{\mbox{\texttt{#1}}}
+\providerobustcmd*{\filenm}[1]{\mbox{\texttt{#1}}}
\providerobustcmd*{\brand}[1]{\textsc{#1}}
@@ -287,6 +281,8 @@
\newrobustcmd{\attribute}[1]{\texttt{#1}}
\newrobustcmd{\UI}[1]{\textbf{\textsf{#1}}}
+\newrobustcmd{\supregistered}{\textsuperscript{\textregistered}}
+
\newrobustcmd{\TOC}{\acro{TOC}}
\newrobustcmd{\LOF}{\acro{LOF}}
\newrobustcmd{\LOT}{\acro{LOT}}
@@ -422,6 +418,21 @@
code apply to the generation of \HTML, print, or both forms of output.
}
+\newcommand{\limitssectioningmath}{%
+When using \SVG\ math in sectioning commands, \watchout[math in \cs{section}]
+use \cs{(} and \cs{)} to delimit math
+instead of \$:
+\begin{sourcedisplay}
+\cs{section}\{Section name with math \cs{(}1+2=3\cs{)}\}
+\end{sourcedisplay}
+\index{section>math in heading}
+\index{math>in section heading}
+}
+
+\newcommand{\limitssectioning}{%
+\limitssectioningmath
+}
+
\newcommand{\limitscpageref}{\pkg{cleveref} and \pkg{varioref} are supported,
\watchout[\pkg{cleveref} page numbers]
but printed page numbers do not map to \HTML,
@@ -460,7 +471,7 @@
If using the \optn{number} option with file splits,
\watchout[missing \acro{TOC}]
be sure to place the table of contents before the abstract.
-The number option causes a section break which
+The \optn{number} option causes a section break which
may cause a file split, which would put a table of contents out
of the home page if it is after the abstract.
}
@@ -480,9 +491,9 @@
}
\newcommand{\limitsappendix}{%
-During \HTML\ conversion, the option \texttt{toc} without
+During \HTML\ conversion, the option \optn{toc} without
\watchout[incorrect \acro{TOC} link]
-the option \texttt{page} results in a \acro{TOC} link to
+the option \optn{page} results in a \acro{TOC} link to
whichever section was before the \texttt{appendices} environment.
It is recommended to use both \texttt{toc} and also \texttt{page} at the same time.
}
@@ -678,7 +689,7 @@
are not supported.
Many \pkg{textcomp} symbols are not supported by many fonts.
-\watchout[Missing symbols]
+\watchout[missing symbols]
Try using more complete fonts in the \CSS, but expect to see gaps in coverage.
}
@@ -842,22 +853,18 @@
as \SVG\ graphics or using the \brand{MathJax} JavaScript display engine.
\index{JavaScript>MathJax}
-In its current implementation,
-\margintag{SVG files}
-rendering math as images creates a new \SVG\ file for each expression.
-In text with many references to math variables,
-this can result in a large number of files with
-duplicate content.
-In the future, some method of content-based naming and check-summing
-may be used to remove the need for duplicate files.
+Rendering math as images creates a new \SVG\ file for each expression, \margintag{SVG files}
+except that an MD5 hash is used to combine identical duplicates of the same
+inline math expression into a single file, which must be converted to \SVG\ only once.
+Display math is still handled as individual files, since it may contain labels
+or references which are likely to change.
-Another approach could be
-\margintag{SVG inline}
-to in-line the \SVG\ files directly into the \HTML.
+The \SVG\ images are currently stored separately, \margintag{SVG inline}
+but they could be encoded in-line directly into the \HTML\ document.
This may reduce the number of files and potentially speed loading the images,
but slows the display of the rest of the document before the images are loaded.
-Others converters have used \PNG\ files,
+Others \LaTeX-to-\HTML\ converters have used \PNG\ files,
\margintag{PNG files}
sometimes pre-scaled for print resolution but displayed
on-screen at a scaled down size. This allows high-quality print output at the expense
@@ -946,7 +953,7 @@
\margintag{footnotes in math}
\item Math appearing inside a lateximage,
\margintag{lateximage}
- and therefore also inside a \tikz{} or \env{picture}
+ and therefore also inside a \tikz\ or \env{picture}
environment, is rendered as SVG math even if \brand{MathJax} is used in the rest of the document.
\item Usage of \pkg{siunitx} inside a math equation
\margintag{siunitx}
@@ -1007,7 +1014,7 @@
\index{equation>miss-numbered}%
\index{split>miss-numbered}%
\index{AMSmath>split miss-numbered}
-when the option \texttt{thref} is used. \pkg{lwarp} does not share
+when the option \optn{thref} is used. \pkg{lwarp} does not share
this bug, so equations with \cs{split}, etc, are numbered correctly
with \pkg{lwarp}'s \HTML\ output, but not with the print output.
It is recommended to use \pkg{cleveref} instead of \pkg{ntheorem}'s
@@ -1029,7 +1036,7 @@
\cs{includegraphics}\{filename\} \% print:.pdf, HTML:.svg or other
\end{sourcedisplay}
For print output, \pkg{lwarp} will automatically choose the \texttt{.pdf} if available,
-other some other format otherwise.
+or some other format otherwise.
For \HTML, one of the other formats is used instead.
\DescribeProgram{pdftocairo}
@@ -1099,6 +1106,8 @@
}
\newcommand{\limitssvgimages}{%
+\limitssectioningmath
+
When a math expression, \texttt{picture}, or \tikz\ environment is added or
\watchout[Adding/removing]
removed, the \SVG\ images must be re-created with \texttt{lwarpmk limages}
@@ -1116,9 +1125,10 @@
the math exactly as \LaTeX\ would, but has the disadvantage of requiring
an individual file for each math expression.
\watchout[Lots of files!]
-There is no attempt at
-reusing the same file each time the same expression occurs, so each
-time \texttt{\$x\$} is used, for example, yet another file is created.
+For inline math, \pkg{lwarp} uses an MD5 hash on its \LaTeX\ source
+to combine multiple instances of identical inline expressions into a single image file,
+but display math and other environments such as \env{picture} and \tikz\ require
+one image file each.
For a document with a large amount of math,
see \cref{sec:tutorialmathjax} to use \brand{MathJax} instead.
}
@@ -1757,11 +1767,11 @@
}
\newcommand{\limitskeyfloat}{%
-If placing a \cs{keyfig}[H] inside a \env{keywrap},
+If placing a \cs{keyfig}\texttt{[H]} inside a \env{keywrap},
\watchout[\env{keywrap}]
use an absolute width for
\cs{keyfig}, instead of \texttt{lw}-proportional widths.
-(The [H] option forces the use of a minipage, which internally adjusts for
+(The \optn{[H]} option forces the use of a minipage, which internally adjusts for
a virtual 6-inch wide minipage, which then corrupts the \optn{lw} option.)
}
@@ -1782,7 +1792,7 @@
\newcommand{\limitsnicefrac}{%
\pkg{units} and \pkg{nicefrac} work as-is with \pkg{lwarp}, but
\brand{MathJax} does not have an extension for \pkg{units} or \pkg{nicefrac}.
-These packages do work with \pkg{lwarp}'s option \texttt{svgmath}.
+These packages do work with \pkg{lwarp}'s option \optn{svgmath}.
}
@@ -1915,7 +1925,7 @@
%<*package>
% \fi
%
-% \CheckSum{21061}
+% \CheckSum{21481}
%
% \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
@@ -2006,6 +2016,7 @@
% \changes{v0.47}{2018/01/30}{\ 2018/01/30}
% \changes{v0.48}{2018/02/14}{\ 2018/02/14}
% \changes{v0.49}{2018/02/19}{\ 2018/02/19}
+% \changes{v0.50}{2018/03/03}{\ 2018/03/03}
@@ -2199,6 +2210,37 @@
% For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
%
% \begin{description}
+% \item[v0.50:] \
+% \begin{itemize}
+% \item \SVG\ math and other \env{lateximage}s now are
+% converted to \SVG\ using \margintag{\SVG\ math}
+% parallel background tasks, utilizing all available \acro{CPU} cores.
+% \item Inline \SVG\ math image file names now are MD5 hashes made from
+% their source \LaTeX\ code.
+% Identical inline math expressions, such as multiple instance of \$x\$,
+% now share a single image file.
+% This reduces the number of images to store, transmit, process, and display.
+% Each image file is only converted to \SVG\ a single time, and reused if it
+% already exists.
+% Display math and other forms of \SVG\ image such as \env{picture} and
+% \tikz\ still use individual image files which are recreated each time
+% |lwarpmk limages| is run.
+% \item Fixes: SVG math and/or \cs{underline} in a sectioning file name.
+% \item Improved \SVG\ display math and tags.
+% \item Improved \SVG\ math and \pkg{siunitx} \attribute{alt} tags.
+% \item Improved \pkg{siunitx} units.
+% \item Fix: \cs{ensuremath} with MathJax now creates a \env{lateximage}.
+% \item Fix: \cs{centering}, etc. in \SVG\ math, \env{lateximage}, \tikz.
+% \item Fix: Made various macros robust,
+% additionally fixing \pkg{authblk}.\margintag{misc. fixes}
+% \item Fix: \pkg{ntheorem} if neither \optn{standard} nor \optn{amsthm} selected.
+% \item Fix: \pkg{listings}: Improved column alignment.
+% \item Fix: Load \pkg{fontspec} if necessary.
+% \item Added \pkg{xy}, \pkg{epstopdf}, \pkg{diagbox}, \pkg{pbox}, \margintag{packages}
+% \pkg{bytefield}, \pkg{axodraw2}, \pkg{phfqit},
+% \pkg{schemata},
+% \pkg{dblfloatfix}, \pkg{nonfloat}, \pkg{morefloats}.
+% \end{itemize}
% \item[v0.49:] \
% \begin{itemize}
% \item Added \pkg{xcolor} \cs{rowcolors}.\margintag{tabular}
@@ -2211,6 +2253,7 @@
% \pkg{lineno}, \pkg{fnlineno}, \pkg{figsize}, \pkg{hypdestopt}, \pkg{pagegrid},
% \pkg{pdfrender}, \pkg{luacolor}, \pkg{resizegather}.
% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.48:] \
% \begin{itemize}
% \item Added some documentation
@@ -2265,7 +2308,7 @@
% \needspace{2\baselineskip}
% \item[v0.45:] \
% \begin{itemize}
-% \item Improved MikTeX install instructions.\margintag{docs}
+% \item Improved \prog{MikTeX} install instructions.\margintag{docs}
% \item Improved graphics and \pkg{epstopdf} instructions.
% \item Updates to the \nameref{sec:introduction}.
% \item Added \pkg{memoir}, \pkg{memhfixc}.
@@ -2365,7 +2408,7 @@
% marks around minipages, at the table of contents,
% at the \acro{LOF} and \acro{LOT}, and whether to
% print math as \LaTeX\ source for copy/paste into the
-% LibreOffice Writer TeXMaths extension.
+% \prog{LibreOffice Writer TeXMaths} extension.
% \item Improved formatting for numerous objects.
% See \cref{sec:wordprocessorconversion}.
% \end{itemize}
@@ -2615,7 +2658,7 @@
% and while also using the |&| character inside the definition.
% This may include the use inside conditional expressions.
% \item Several math environments were incorrectly placed inline.
-% Also, for \pkg{amsmath} with \SVG\ math, the |fleqn| option has been removed,
+% Also, for \pkg{amsmath} with \SVG\ math, the \optn{fleqn} option has been removed,
% resulting in improved spacing for aligned equations.
% \item Bug fixes; see the changelog.
% \end{itemize}
@@ -2643,7 +2686,7 @@
% \end{sourcedisplay}
%
% The \pkg{lwarp} package now produces the configuration files during
-% print output, and also accepts the option |lwarpmk| if desired.
+% print output, and also accepts the option \optn{lwarpmk} if desired.
%
% \item A number of macros
% \watchout[HTML setup changes.]
@@ -2693,7 +2736,7 @@
% \item The old file |lwarp_html.xdy| may be deleted.
% \end{enumerate}
%
-% \item The new \pkg{lwarp} package option |xdyFilename| may be used to tell
+% \item The new \pkg{lwarp} package option optn{xdyFilename} may be used to tell
% \prog{lwarpmk} to use a custom |.xdy| file instead of |lwarp.xdy|.
% See \cref{sec:modifyxindy}.
%
@@ -2703,7 +2746,7 @@
% as well as glossary.
% \item Print mode without \prog{latexmk} now uses \prog{xindy} instead of \prog{makeindex}.
% \item \prog{texindy}/\prog{xindy} usage depends on \prog{pdflatex} vs \prog{xelatex}, \prog{lualatex}.
-% \item For \prog{pdflatex} and \prog{texindy}, the |-C utf8| option is used. This is
+% \item For \prog{pdflatex} and \prog{texindy}, the \optn{-C utf8} option is used. This is
% supported in modern distributions, but a customized |lwarpmk.lua| may
% need to be created for use with older distributions.
% \end{itemize}
@@ -2714,9 +2757,9 @@
%
% \item[v0.29:] \
% \begin{itemize}
-% \item Add: |lwarpmklang| option for \pkg{lwarp-newproject} and \pkg{lwarp}.
+% \item Add: \optn{lwarpmklang} option for \pkg{lwarp-newproject} and \pkg{lwarp}.
% Sets the language to use while processing the glossary.
-% (As of v0.30, this has been changed to the |IndexLanguage| option.)
+% (As of v0.30, this has been changed to the \optn{IndexLanguage} option.)
% \item Fix: \cs{includegraphics} when no optional arguments.
% \end{itemize}
% \item[v0.28:] \
@@ -2834,7 +2877,7 @@
% ^^A \item \pkg{lwarp} now tries to auto-detect the operating system,
% ^^A and \cs{warpOSwindows} is only needed if the auto-detection
% ^^A fails to detect \brand{Windows}. (As of v0.30, \cs{warpOSwindows} has been converted to
-% ^^A the |OSWindows| option.)
+% ^^A the \optn{OSWindows} option.)
% ^^A \item Tabular column types |@|, |>|, and |<| are now supported.
% ^^A \item |BlockClass| and \cs{InlineClass} add an optional style.
% ^^A \item The |sidebar| and |example| environments have been moved to the
@@ -2843,7 +2886,7 @@
% ^^A \needspace{2\baselineskip}
% ^^A \item[v0.19:] \
% ^^A \begin{itemize}
-% ^^A \item \brand{MathJax} now may be used to display math via the |mathjax| option.
+% ^^A \item \brand{MathJax} now may be used to display math via the \optn{mathjax} option.
% ^^A See \cref{sec:loading,sec:limitsmath}.
% ^^A To use \brand{MathJax} with a pre-existing project,
% ^^A \watchout
@@ -2911,16 +2954,17 @@
% occasional user intervention is required in certain cases.
%
% As a package running directly in \LaTeX, \pkg{lwarp} has some advantages over
-% other methods of \HTML\ conversion. A deeper level of \TeX\ understanding is
-% of course possible, as \TeX\ itself is still in use.
+% other methods of \HTML\ conversion. \TeX\ itself is still used, allowing a
+% wider range of \TeX\ trickery to be understood.
% Lua expressions are still available with \LuaTeX.
% Entire categories of
-% \LaTeX\ packages work as-is when used with \pkg{lwarp}: definitions, file handling,
-% utilities, internal data structures and calculations,
+% \LaTeX\ packages work as-is when used with \pkg{lwarp}:
+% definitions, file handling, utilities, internal data structures and calculations,
+% specialized math-mode typesetting for various fields of science and engineering,
% and anything generating plain-text output.
% Blocks of \PDF\ output may be automatically converted to \SVG\ images
% while using the same font and spacing as the original print document,
-% directly supporting \tikz\ and \env{picture},
+% directly supporting \tikz\ and \env{picture}.
% Numerous packages are easily adapted for \HTML\ versions, either
% by loading and patching the originals, or by creating nullified or emulated
% replacements, and all without resorting to external programming.
@@ -2927,11 +2971,11 @@
% As a result, several hundred packages have already been adapted (\cref{tab:supported}), and
% an uncounted number more work as-is.
%
-% Packages have been selected according to several criteria: importance,
+% Packages have been selected according to several criteria: perceived importance,
% popularity lists, recent CTAN updates, CTAN topics, mention in other packages, support by other
% \HTML\ conversion methods,
% and from sample documents taken from public archives\footnote{An amazing number of
-% decades-old packages are still in modern use.}.
+% decades-old packages are still in use today.}.
%
% \rulebreak
%
@@ -2944,14 +2988,15 @@
% \prog{pdflatex}, \prog{xelatex}, or \prog{lualatex} may be used,
% allowing \pkg{lwarp} to process the usual image formats.
% While generating \HTML\ output, \SVG\ files are used in place of \PDF.
-% Other formats such as \JPG\ are used as-is.
+% Other formats such as \PNG\ and \JPG\ are used as-is.
%
% SVG images may be used for math,
-% and are also used for \env{picture}, and \tikz{} environments.
-% This format has better browser and e-book support than \MathML\ (as of this writing),
+% and are also used for \env{picture}, \tikz, and similar environments.
+% The \SVG\ format has better browser and e-book support
+% than \MathML\ (as of this writing),
% while still allowing for high-quality display and printing of images
% (again, subject to potentially
-% bug-ridden\footnote{Firefox has had an on-again/off-again bug
+% bug-ridden\footnote{\brand{Firefox} has had an on-again/off-again bug
% for quite some time regareding printing \SVG{}s at high resolution.} browser
% support).
%
@@ -2963,15 +3008,20 @@
% particular opinion on the matter, except to say that in this case \LaTeX{} is much easier to implement!}
% Custom \LaTeX{} macros may be used as-is in math expressions, since the math is evaluated
% entirely inside \LaTeX.
+% An MD5 hash is used to combine multiple instances of the same inline math expression
+% into a single image file, which then needs to be converted to \SVG\ only a single time.
%
% The \brand{MathJax} JavaScript display engine may be selected
% for math display instead of using \SVG\ images.
% Subject to browser support and Internet access,
% \brand{MathJax} allows an \HTML\ page to display
-% math without relying on a large number of external image files.\footnote{One \SVG\ image
-% file per math expression. A commmon scientific paper can easily run into several thousand
-% files, depending on how often something like \$x\$ is used.
-% In testing one sample document it appears that hashing would only reduce the number in half.}
+% math without relying on a large number of
+% external image files.\footnote{One \SVG\ image
+% file per math expression, except that duplicate inline math expressions are combined
+% into a single file according to the MD5 hash function of its contents.
+% A common scientific paper can easily include several thousand files,
+% and in one case the MD5 hash cut the number of files in half and the rendering
+% time by 30\%.}
% \pkg{lwarp} maintains \LaTeX\ control for cross-referencing
% and equation numbering, and attempts to force \brand{MathJax} to tag equations accordingly.
%
@@ -3102,10 +3152,23 @@
% Theorems: & Native \LaTeX\ theorems,
% \pkg{theorem}, \pkg{amsthm}, \pkg{ntheorem}. \\
%
-% Additional math: & \pkg{delarray}, \pkg{bm}, math fonts via \SVG\ images, \pkg{resizegather}. \\
+% Additional math: & Math fonts via \SVG\ images, \pkg{resizegather}.
+% As-is: \pkg{delarray}, \pkg{bm}, \pkg{braket}, etc. \\
%
+% \midrule
+%
% Units and fractions: & \pkg{siunitx}, \pkg{xfrac}, \pkg{nicefrac}, \pkg{units} \\
%
+% Science and engineering: &
+% \pkg{listings}, \pkg{algorithmicx}, \pkg{bytefield}, \pkg{axodraw2},
+% \pkg{phfqit}.
+% Tested to work with SVG math: \pkg{physics}, \pkg{slashed},
+% \pkg{heppennames}, \pkg{hepnicenames},
+% \pkg{simpler-wick}, \pkg{linop}, \pkg{blochsphere}, etc.
+% \emph{(Math-mode packages generally work as-is with \SVG\ math.)} \\
+%
+% Liberal arts: & \pkg{schemata} \\
+%
% \midrule
%
% Floats: & Appear where declared.
@@ -3112,7 +3175,8 @@
% \pkg{float}, \pkg{rotfloat}, \pkg{newfloat}, \pkg{caption} and \pkg{subcaption},
% \pkg{subfig}, \pkg{subfigure}, \pkg{capt-of}, \pkg{placeins}, \pkg{trivfloat}, \pkg{floatrow},
% \pkg{subfloat}, \pkg{keyfloat}, \pkg{wrapfig}, \pkg{cutwin}, \pkg{floatflt},
-% \pkg{flafter}, \pkg{fltrace}, \pkg{endfloat}, \pkg{hypcap}, \pkg{stfloats}. \\
+% \pkg{flafter}, \pkg{fltrace}, \pkg{endfloat}, \pkg{hypcap}, \pkg{stfloats},
+% \pkg{fix2col}, \pkg{dblfloatfix}, \pkg{nonfloat}, \pkg{morefloats}. \\
%
% \midrule
%
@@ -3120,7 +3184,7 @@
% \env{tabular} environment, \pkg{array}, \pkg{tabularx}, \pkg{tabulary},
% \pkg{threeparttable}, \pkg{multirow},
% \pkg{longtable}, \pkg{supertabular}, \pkg{xtab}, \pkg{ltxtable},
-% \pkg{booktabs}, \pkg{colortbl}.\\
+% \pkg{booktabs}, \pkg{colortbl}, \pkg{bigdelim}, \pkg{diagbox}.\\
%
% \midrule
%
@@ -3131,8 +3195,8 @@
% are accepted as well.
% \cs{rotatebox} and \cs{scalebox} are supported as well as \HTML\ can handle.
% \pkg{rotating} is emulated but all objects are unrotated.
-% \pkg{picture} and \pkg{tikz} are converted to an \SVG\ image.
-% \pkg{grffile}, \pkg{overpic}, \pkg{figsize}. \\
+% \pkg{picture}, \pkg{tikz}, and \pkg{xy} are converted to an \SVG\ image.
+% \pkg{grffile}, \pkg{epstopdf}, \pkg{overpic}, \pkg{figsize}. \\
%
%
% \midrule
@@ -3153,8 +3217,8 @@
%
% Environments: & Standard \LaTeX{} environments. \\
%
-% \env{minipage}: & Some \HTMLfive-imposed limitations.
-% Nested minipages are supported. \\
+% \env{minipage}, \cs{parbox}: & Some \HTMLfive-imposed limitations.
+% Nested minipages are supported. \pkg{pbox}.\\
%
% Quotations: & \pkg{verse}, \pkg{csquotes}, \pkg{epigraph} \\
%
@@ -3216,7 +3280,9 @@
% \pkg{fileerr},
% \pkg{somedefs},
% \pkg{trace},
-% \pkg{xspace}. \\
+% \pkg{xspace}.
+% Also, any math-only packages, including specialized typesetting for
+% various fields of science and engineering. \\
%
% \bottomrule
%
@@ -3298,7 +3364,7 @@
% \end{description}
%
% \subsubsection{Asciidoctor-LaTeX}
-% The Asciidoctor-LaTeX project is adding additional \LaTeX{}-related features.
+% The Asciidoctor-LaTeX project is developing additional \LaTeX{}-related features.
% \begin{description}
% \item [Asciidoctor-LateX:] ~ \\
% \url{http://www.noteshare.io/book/asciidoctor-latex-manual} \\
@@ -3322,8 +3388,8 @@
% have advanced through the years in their abilities
% to represent math with a \LaTeX-ish input syntax, unicode math fonts,
% and high-quality output, and also generate \HTML\ with varying success.
-% See recent developments in Microsoft\,\textregistered{} Word\,\textregistered{}
-% and LibreOffice\,\texttrademark{} Writer.
+% See recent developments in \brand{Microsoft}\,\supregistered\ \prog{Word}\,\supregistered{}
+% and \brand{LibreOffice}\,\texttrademark\ \prog{Writer}.
%
% \subsection{Commercial systems}
%
@@ -3331,9 +3397,9 @@
% \DescribeProgram{Adobe} \DescribeProgram{FrameMaker}
% \DescribeProgram{InDesign} \DescribeProgram{Flare} \DescribeProgram{Madcap}
% abilities have been advancing in the areas of typesetting, cross-referencing, and \HTML\ generation.
-% See Adobe\,\textregistered{} FrameMaker\,\textregistered{},
-% Adobe InDesign\,\textregistered{},
-% and Madcap Flare\,\texttrademark{}.
+% See \brand{Adobe}\,\supregistered{} \prog{FrameMaker}\,\supregistered{},
+% \brand{Adobe} \prog{InDesign}\,\supregistered,
+% and \brand{Madcap} \prog{Flare}\,\texttrademark.
%
% \subsection{Comparisons}
% \index{markup languages}
@@ -3452,7 +3518,7 @@
%
% From \brand{Poppler}: \url{poppler.freedesktop.org}.
%
-% For \brand{MacOS}\textregistered, see
+% For \brand{MacOS}\supregistered, see
% \url{https://brew.sh/}, install \prog{Homebrew}, then
% \userentry{brew install poppler}
%
@@ -3502,8 +3568,8 @@
% \item [MiK\TeX:] If using MiK\TeX:
% \begin{enumerate}
% \item To install \pkg{lwarp} the first time,
-% use the \pkg{MikTeX Package Manager (Admin)}.
-% \item To update \pkg{lwarp}, use \pkg{MikTeX Update (Admin)}.
+% use the \prog{MikTeX Package Manager (Admin)}.
+% \item To update \pkg{lwarp}, use \prog{MikTeX Update (Admin)}.
% \item Either way, also update the package \pkg{miktex-misc}, which will install and
% update the \prog{lwarpmk} executable.
% \end{enumerate}
@@ -3927,6 +3993,10 @@
% This file should not be modified by the user.
% A custom file may be used instead, if necessary.
%
+% \item [|lwarp\_one\_limage.txt|:] For \brand{Windows} only.
+% Used to process \SVG\ images in the background. Copied to
+% |lwarp_one_limage.cmd| when images are generated.
+%
% \item [|lwarp\_mathjax.txt|:] Inserted into the \HTML\ files when
% \brand{MathJax} is used to display math.
% This file should not be modified by the user.
@@ -4074,8 +4144,8 @@
% By default \pkg{lwarp} represents math as \SVG\ images with
% \margintag{math as \SVG\ images}
% the \LaTeX\ source included in \attribute{alt} attributes. In this way,
-% the math displays as it was drawn by \LaTeX, and the \LaTeX\ source
-% may be copied and pasted into some other document.
+% the math is displayed as it was drawn by \LaTeX, and the \LaTeX\ source
+% may be copied and pasted into other documents.
%
% \pkg{lwarp} uses the same mechanism for \env{picture} and \tikz\ environments.
% \margintag{\env{picture} and \tikz}
@@ -4104,7 +4174,7 @@
% \margintag{math with \brand{MathJax}}
%
% \begin{enumerate}
-% \item In the tutorial's source code, uncomment the |mathjax| package option for \pkg{lwarp}:
+% \item In the tutorial's source code, uncomment the \optn{mathjax} package option for \pkg{lwarp}:
% \begin{sourcedisplay}
% mathjax, \% Use MathJax to display math.
% \end{sourcedisplay}
@@ -4165,7 +4235,7 @@
% and recompile as needed.
%
% \begin{enumerate}
-% \item In the tutorial's source code uncomment the |latexmk| option for the
+% \item In the tutorial's source code uncomment the \optn{latexmk} option for the
% \pkg{lwarp} package:
% \begin{sourcedisplay}
% latexmk, \% Use latexmk to compile.
@@ -4238,7 +4308,7 @@
%
% \DescribeOption{IndexLanguage}
% To assign a language to be used while processing the index and glossary,
-% use the |IndexLanguage| option:
+% use the \optn{IndexLanguage} option:
% \index{language>glossary}
% \index{language>index}
% \index{glossary>language}
@@ -4473,13 +4543,13 @@
% While using \prog{xelatex} or \prog{lualatex}, \prog{xindy} is used for the index.
% Everything is handled in UTF-8 encoding, and should work as expected.
%
-% While using \prog{pdflatex}, the \prog{texindy} program is used with the |-C utf8| option,
+% While using \prog{pdflatex}, the \prog{texindy} program is used with the \optn{-C utf8} option,
% which is newly supported in recent distributions of \LaTeX. This option correctly
% sorts index entries into headings while using Latin languages, but will not work
% well with others. \XeLaTeX\ or \LuaLaTeX\ are recommended for non-Latin languages.
%
% For an older distribution of \LaTeX, it may be necessary to generate a local version of
-% |lwarpmk.lua| and modify it to remove the |-C utf8| option from the texindy call.
+% |lwarpmk.lua| and modify it to remove the \optn{-C utf8} option from the \prog{texindy} call.
% See \cref{sec:modifylwarpmk}.
%
%
@@ -4524,12 +4594,12 @@
% \DescribeOption{warpprint}
% \DescribeOption{warpHTML}
% Usually controlled by \prog{lwarpmk}, and not set in the document.
-% Select the |warpprint| option to generate print output (default),
-% or the |warpHTML| option to generate \HTMLfive{} output.
+% Select the \optn{warpprint} option to generate print output (default),
+% or the \optn{warpHTML} option to generate \HTMLfive\ output.
% The default is print output, so the print version may be
% compiled with the usual \prog{pdflatex}, etc.
% When \pkg{lwarp} is loaded in print mode, it creates
-% |<project>_html.tex|, which sets the |warpHTML| option before calling
+% |<project>_html.tex|, which sets the \optn{warpHTML} option before calling
% the user's source code |<project>.tex|. In this way, |<project>.tex|
% can |\usepackage{lwarp}| without any options to create a printed version,
% while |<project>_html.tex| will create an \HTML\ version.
@@ -4631,7 +4701,7 @@
% causing the
% homepage to be the file |index.html|. Underscores are allowed in
% \margintag{filename underscores}
-% |HomeHTMLFilename| and |HTMLFilename| options, but may need to be escaped
+% \optn{HomeHTMLFilename} and \optn{HTMLFilename} options, but may need to be escaped
% elsewhere, such as when appearing in a list:
% \index{underscore>filename}\index{file>underscore}
% \changes{v0.24}{2017/03/13}{Docs: Filename underscore.}
@@ -4751,8 +4821,12 @@
% \ItemDescribeBoolean{FileSectionNames} \DescribeDefault{true}
% If true, web page filenames are derived from a sanitized version
% of the section names. If false, web pages are numbered.
-% Either way, the |HTMLFilename| option is used as a prefix.
+% Either way, the \optn{HTMLFilename} option is used as a prefix.
% See \cref{sec:filenameexamples} for examples of naming and numbering \HTML\ files.
+% The user must ensure that filenames are unique after begin sanitized. \watchout[Unique filename!]
+% For example, math in the section name is removed before creating the filename,
+% so the rest of the filename must be sufficiently unique to avoid name collisions.
+% \index{file>unique names}
%
% \ItemDescribeCounter{FootnoteDepth} \DescribeDefault{5}
% Determines where to place pending footnotes.
@@ -5220,7 +5294,7 @@
% \end{Verbatim}
% This line creates the hyperlinks for the \HTML\ index. During print output
% \cs{hyperindexref} becomes a null function.
-% \item In the document source use the |xdyFilename| option for \pkg{lwarp}:
+% \item In the document source use the \optn{xdyFilename} option for \pkg{lwarp}:
% \DescribeOption{xdyFilename}
% \begin{Verbatim}[gobble=2,tabsize=4]
% \usepackage[
@@ -5251,9 +5325,13 @@
% for a smooth conversion to both \HTML\ and print-formatted outputs:
%
%
+% \subsection{Sectioning}
+%
+% \limitssectioning
+%
+%
% \subsection{Formatting}
%
-%
% \subsubsection{Text formatting}
%
% \limitstext
@@ -5908,7 +5986,7 @@
%
% \pkg{lwarp} may be told to modify its \HTML\ output to make it
% easier to import the \HTML\ document into a word processor.
-% At the time of this writing, it seems that LibreOffice works best at
+% At the time of this writing, it seems that \brand{LibreOffice} works best at
% preserving table layout, but it still has some limitations, such as
% an inability to automatically assign figure and table
% frames and captions according to user-selected \HTML\ classes.
@@ -5945,7 +6023,7 @@
% \item If using a class without chapters, \cs{section} and lower are
% shifted up in level for the \HTML\ heading tags. The \CSS\ has
% not been changed, so the section heading formats will not match the normal
-% \HTML\ output, but when imported to LibreOffice Writer the higher
+% \HTML\ output, but when imported to \prog{LibreOffice Writer} the higher
% section headings will import as \UI{Heading~1} for the title, \UI{Heading~2}
% for \cs{section}, etc.
% \item Headers, footers, and navigation are removed at file splits.
@@ -5957,17 +6035,17 @@
% but they are no longer useful when the document has been
% imported into a word processor.
% \item An additional \element{div} with an \attribute{id} encapsulates
-% each float and minipage, which on import into LibreOffice Writer
+% each float and minipage, which on import into \prog{LibreOffice Writer}
% causes a thin frame to appear around the text block for each.
% \item Float captions are given an explicit italic formatting.
-% \item Tabular rule borders are made explicit for LibreOffice Writer.
-% LibreOffice displays a light border around each cell while editing,
+% \item Tabular rule borders are made explicit for \prog{LibreOffice Writer}.
+% \brand{LibreOffice} displays a light border around each cell while editing,
% even those which have no border when printed,
% and \pkg{lwarp} also uses a light border for thin rules,
% so it will be best to judge the results using
-% the print preview instead of while editing in LibreOffice.
+% the print preview instead of while editing in \brand{LibreOffice}.
% \item \cs{includegraphics} and \SVG\ math width and height
-% are made explicit for LibreOffice.
+% are made explicit for \brand{LibreOffice}.
% \item \cs{hspace} is approximated by a number of \cs{quad}s,
% and rules are approximated by a number of underscores.
% \item Explicit \HTML\ styles are given to:
@@ -6082,7 +6160,7 @@
% \newcommand{\describeWPMarkMath}{
% While formatting for word processors,
% prints math as \LaTeX\ code instead of creating \SVG\ images or \brand{MathJax}.
-% This is useful for cut/paste into the LibreOffice Writer TeXMaths extension.
+% This is useful for cut/paste into the \prog{LibreOffice Writer TeXMaths} extension.
% }
%
% \DescribeBoolean{WPMarkMath} \DescribeDefault{false}
@@ -6096,10 +6174,10 @@
% \begin{sourcedisplay}
% \cs{usepackage}\{siunitx\}
% \end{sourcedisplay}
-% in the TeXMaths preamble.
+% in the \prog{TeXMaths} preamble.
% Equation numbering is problematic for \AmS\ math environments.
% \end{docsidebar}
-% \index{siunitx>with TeXMaths}
+% \index{siunitx>with \prog{TeXMaths}}
% \index{math>word processor conversion}
%
%
@@ -6107,7 +6185,7 @@
% While formatting for word processors,
% |true| sets the document title to \element{h1}, which is expected for \HTML\ documents,
% but also causes the lower-level section headings to start at \UI{Heading 2} when
-% imported into LibreOffice.
+% imported into \brand{LibreOffice}.
% Set to |false| to cause the title to be plain text, and the section headings
% to begin at \UI{Heading 1}.
%
@@ -6161,25 +6239,25 @@
% \index{word processor>conversion recommendations}
% \index{LibreOffice>conversion recommendations}
%
-% For use with LibreOffice Writer, it is recommended to:
+% For use with \prog{LibreOffice Writer}, it is recommended to:
% \margintag{TOC, LOF, LOT}
% \begin{enumerate}[nosep]
% \item Set \cs{booltrue}\{FormatWP\}.
% \item Set \cs{booltrue}\{WPMarkTOC\} and \cs{boolfalse}\{WPMarkLOFT\}.
% \item Use \pkg{lwarp} to generate the \HTML\ document.
-% \item Copy/paste from the \HTML\ document into an empty LibreOffice Writer document.
-% \item Manually insert a LibreOffice \acro{TOC} in the LibreOffice document.
+% \item Copy/paste from the \HTML\ document into an empty \prog{LibreOffice Writer} document.
+% \item Manually insert a \brand{LibreOffice} \acro{TOC} in the \brand{LibreOffice} document.
% \item Manually add frames around each float, adding a caption which is cut/pasted from
% each float's simulated caption.
% \item Manually create cross references.
% \end{enumerate}
-% This process yields a document with an actual LibreOffice Table of Contents,
+% This process yields a document with an actual \brand{LibreOffice} Table of Contents,
% but a simulated List of Figures and List of Tables.
%
% For \pkg{siunitx}, remember to adjust the preamble as mentioned above.
% \margintag{siunitx}
%
-% LibreOffice has options in the View menu to turn on/off the display of
+% \brand{LibreOffice} has options in the \UI{View} menu to turn on/off the display of
% \margintag{LO view border options}
% thin borders around table cells and text objects.
%
@@ -6186,14 +6264,14 @@
%
% \subsection{Limitations}
%
-% Floats and captions are not explicitly converted to LibreOffice floats with their
-% own captions. Floats are surrounded by a thin frame in the LibreOffice editor,
-% and may be marked with |WPMarkFloats|, but are not given a proper LibreOffice
+% Floats and captions are not explicitly converted to \brand{LibreOffice} floats with their
+% own captions. Floats are surrounded by a thin frame in the \brand{LibreOffice} editor,
+% and may be marked with |WPMarkFloats|, but are not given a proper \brand{LibreOffice}
% object frame.
% Captions are given an explicit italic formatting,
-% but not a proper LibreOffice paragraph style.
+% but not a proper \brand{LibreOffice} paragraph style.
%
-% Cross references are not actual LibreOffice linked cross references.
+% Cross references are not actual \brand{LibreOffice} linked cross references.
%
% The List of Figures and List of Tables are not linked.
% The pasted pseudo \acro{LOF} and \acro{LOT} match the numbering
@@ -6204,7 +6282,7 @@
% SVG math is recommended when using the \AmS\ environments, which may have
% multiple numbered equations per object.
%
-% As of when last checked, LibreOffice ignores the following:
+% As of when last checked, \brand{LibreOffice} ignores the following:
% \begin{itemize}
% \item Minipage alignment.
% \item Tabular cell vertical alignment.
@@ -6388,10 +6466,10 @@
% A project-local copy of |lwarpmk.lua| may be generated, modified, and then used to
% compile documents:
% \begin{enumerate}
-% \item Add the |lwarpmk| option to the \pkg{lwarp} package.
+% \item Add the \optn{lwarpmk} option to the \pkg{lwarp} package.
% \item Recompile the printed version of the document.
-% The |lwarpmk| option causes \pkg{lwarp} to create a local copy of |lwarpmk.lua|
-% \item The |lwarpmk| option may now be removed from the \pkg{lwarp} package.
+% The \optn{lwarpmk} option causes \pkg{lwarp} to create a local copy of |lwarpmk.lua|
+% \item The \optn{lwarpmk} option may now be removed from the \pkg{lwarp} package.
% \item Copy and rename |lwarpmk.lua| to a new file such as |mymake.lua|.
% \item Modify |mymake.lua| as desired.
% \item If necessary, make |mymake.lua| executable.
@@ -6501,6 +6579,8 @@
% \begin{itemize}
% \item See the warning regarding changes to the \HTML\ settings
% at \cref{sec:htmlsettings}.
+% \item Ensure that the filenames are unique after math and short words are removed.
+% See \optn{FileSectionNames} at \cref{sec:htmlsettings}.
% \end{itemize}
%
% \item [Missing / incorrect cross-references:] ~
@@ -6746,8 +6826,23 @@
%
% \section{Detecting the \TeX\ Engine — pdflatex, lualatex, xelatex}
%
+% \changes{v0.16}{2016/04/07}{Added XeLaTeX, LuaLaTeX support.}
+% See: \url{http://tex.stackexchange.com/a/47579}.
+%
+% Detects \XeTeX{} and \LuaLaTeX:
+% \index{XeLaTeX>detection}\index{LuaLaTeX>detection}
% \begin{macrocode}
\RequirePackage{iftex}
+\newif\ifxetexorluatex
+\ifXeTeX
+ \xetexorluatextrue
+\else
+ \ifLuaTeX
+ \xetexorluatextrue
+ \else
+ \xetexorluatexfalse
+ \fi
+\fi
\ifLuaTeX
\RequirePackage{luatex85}% until the geometry package is updated
@@ -6755,6 +6850,35 @@
% \end{macrocode}
%
%
+% \section{MD5 hashing}
+%
+% The MD5 hash is used for \env{lateximage} filenames for \SVG\ math.
+%
+% \begin{macrocode}
+\newcommand{\LWR at mdfive}[1]{%
+\PackageError{lwarp}
+{No MD5 macro was found.}
+{Lwarp must find the macros pdfmdfivesum or mdfivesum.}
+}
+
+\ifPDFTeX
+\let\LWR at mdfive\pdfmdfivesum
+\fi
+
+\ifLuaTeX
+\RequirePackage{pdftexcmds}
+\let\LWR at mdfive\pdf at mdfivesum
+\fi
+
+\ifXeTeX
+\@ifundefined{pdffivesum}{}
+ {\let\LWR at mdfive\pdfmdfivesum}
+\@ifundefined{mdfivesum}{}
+ {\let\LWR at mdfive\mdfivesum}
+\fi
+% \end{macrocode}
+%
+%
% \section{pdfLaTeX T1 and UTF8 encoding}
%
% When using pdf\LaTeX, \pkg{lwarp} required T1 and UTF8 encoding.
@@ -6883,7 +7007,7 @@
%
% \subsection{Common portability code}
%
-% \DescribeBoolean{usingOSWindows} Set if the |OSWindows| option is used.
+% \DescribeBoolean{usingOSWindows} Set if the \optn{OSWindows} option is used.
% \begin{macrocode}
\newbool{usingOSWindows}
\boolfalse{usingOSWindows}
@@ -6907,7 +7031,7 @@
% \begin{macro}{\LWR at setOSWindows}
% Set defaults for the \brand{MS-Windows} operating system.
% \pkg{lwarp} attempts to auto-detect the operatings system,
-% and the |OSWindows| option may also be used to force
+% and the \optn{OSWindows} option may also be used to force
% \brand{MS-Windows} compatibility.
%
% \changes{v0.20}{2016/12/19}{Auto-detects operating system.}
@@ -6922,7 +7046,7 @@
% \end{macro}
%
% Test for windows during compile. The user may also specify
-% |OSWindows| package option in case this test fails.
+% \optn{OSWindows} package option in case this test fails.
% \begin{macrocode}
\ifwindows
\LWR at setOSWindows
@@ -6973,7 +7097,8 @@
%
%
% \DescribeOption{warpprint}
-% If the |warpprint| option is given, boolean |warpingprint| is true and boolean |warpingHTML| is false,
+% If the \optn{warpprint} option is given,
+% boolean |warpingprint| is true and boolean |warpingHTML| is false,
% and may be used for \cs{ifbool} tests.
%
%
@@ -6989,7 +7114,8 @@
% Anything in the |warpHTML| environment will be generated for \HTML\ output only.
%
% \DescribeOption{warpHTML}
-% If the |warpHTML| option is given, boolean |warpingHTML| is true and boolean |warpingprint| is false,
+% If the \optn{warpHTML} option is given,
+% boolean |warpingHTML| is true and boolean |warpingprint| is false,
% and may be used for \cs{ifbool} tests.
%
% \begin{macrocode}
@@ -7008,10 +7134,11 @@
%
% \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax}
% \DescribeOption{mathsvg}
-% Option |mathsvg| selects \SVG\ math display:
-% \index{math>mathsvg option}
-% \index{SVG>mathsvg option}
-% If the |mathsvg| option is given, boolean |mathjax| is false, and may be used for \cs{ifbool} tests.
+% Option \optn{mathsvg} selects \SVG\ math display:
+% \index{math>\optn{mathsvg} option}
+% \index{SVG>\optn{mathsvg} option}
+% If the \optn{mathsvg} option is given, boolean |mathjax| is false,
+% and may be used for \cs{ifbool} tests.
% \begin{macrocode}
\DeclareVoidOption{mathsvg}{%
\PackageInfo{lwarp}{Using option 'mathsvg'}
@@ -7020,10 +7147,10 @@
% \end{macrocode}
%
% \DescribeOption{mathjax}
-% Option |mathjax| selects \brand{MathJax} math display:
-% \index{math>mathjax option}
-% \index{MathJax>mathjax option}
-% If the |mathjax| option is given, boolean |mathjax| is true, may be used for \cs{ifbool} tests.
+% Option \optn{mathjax} selects \brand{MathJax} math display:
+% \index{math>\optn{mathjax} option}
+% \index{MathJax>\optn{mathjax} option}
+% If the \optn{mathjax} option is given, boolean |mathjax| is true, may be used for \cs{ifbool} tests.
% \begin{macrocode}
\DeclareVoidOption{mathjax}{%
\PackageInfo{lwarp}{Using option 'mathjax'}
@@ -7034,7 +7161,7 @@
% \DescribeOption{BaseJobname}
-% Option |BaseJobname| sets the \cs{BaseJobname} for this document.
+% Option \optn{BaseJobname} sets the \cs{BaseJobname} for this document.
%
% This is the \cs{jobname} of the printed version, even if currently
% compiling the \HTML\ version.
@@ -7079,7 +7206,7 @@
% Useful for archiving for future use.
% This file may be made executable and acts just like \prog{lwarpmk}.
%
-% If |lwarpmk| option, creates a local copy of |lwarpmk.lua|:
+% If \optn{lwarpmk} option, creates a local copy of |lwarpmk.lua|:
% \begin{macrocode}
\newbool{LWR at creatinglwarpmk}
\boolfalse{LWR at creatinglwarpmk}
@@ -7136,7 +7263,7 @@
% \DescribeOption{latexmk}
-% Option |latexmk| tells \prog{lwarpmk} to use \prog{latexmk} when compiling documents.
+% Option \optn{latexmk} tells \prog{lwarpmk} to use \prog{latexmk} when compiling documents.
%
% \changes{v0.30}{2017/04/29}{Option \prog{latexmk} replaces macro \cs{UseLatexmk}.}
%
@@ -7401,6 +7528,7 @@
\LWR at notmemoirloadafter{array}
% \LWR at loadafter{atbegshi}% used by morewrites
\LWR at loadafter{authblk}
+\LWR at loadafter{axodraw2}
\LWR at loadafter{backref}
\LWR at loadafter{balance}
\LWR at loadafter{bigdelim}
@@ -7411,6 +7539,7 @@
\LWR at loadafter{boxedminipage}
\LWR at loadafter{boxedminipage2e}
\LWR at loadafter{breakurl}
+\LWR at loadafter{bytefield}
\LWR at loadafter{cancel}
\LWR at loadafter{caption}
\LWR at notmemoirloadafter{ccaption}
@@ -7426,8 +7555,10 @@
\LWR at notmemoirloadafter{crop}
\LWR at loadafter{cuted}
\LWR at loadafter{cutwin}
+\LWR at loadafter{dblfloatfix}
\LWR at loadafter{dblfnote}
\LWR at notmemoirloadafter{dcolumn}
+\LWR at loadafter{diagbox}
\LWR at loadafter{draftwatermark}
\LWR at loadafter{easy-todo}
\LWR at loadafter{ebook}
@@ -7439,6 +7570,7 @@
\LWR at notmemoirloadafter{enumerate}
\LWR at loadafter{enumitem}
\LWR at notmemoirloadafter{epigraph}
+\LWR at loadafter{epstopdf}
\LWR at loadafter{eso-pic}
\LWR at loadafter{everypage}
\LWR at loadafter{everyshi}
@@ -7513,6 +7645,7 @@
\LWR at loadafter{microtype}
\LWR at loadafter{midfloat}
\LWR at loadafter{midpage}
+\LWR at loadafter{morefloats}
\LWR at notmemoirloadafter{moreverb}
% morewrites must be loaded before lwarp
\LWR at notmemoirloadafter{mparhack}
@@ -7526,6 +7659,7 @@
\LWR at loadafter{newtxmath}
% newunicodechar must be loaded before lwarp
\LWR at notmemoirloadafter{nextpage}
+\LWR at loadafter{nonfloat}
\LWR at loadafter{nonumonpart}
\LWR at loadafter{nopageno}
\LWR at loadafter{nowidow}
@@ -7536,10 +7670,12 @@
\LWR at loadafter{pagesel}
\LWR at loadafter{paralist}
\LWR at notmemoirloadafter{parskip}
+\LWR at loadafter{pbox}
\LWR at loadafter{pdfrender}
\LWR at loadafter{pdflscape}
\LWR at loadafter{pdfsync}
\LWR at loadafter{pfnote}
+\LWR at loadafter{phfqit}
\LWR at loadafter{placeins}
\LWR at loadafter{prelim2e}
\LWR at loadafter{prettyref}
@@ -7555,6 +7691,7 @@
\LWR at loadafter{rotfloat}
\LWR at loadafter{savetrees}
% \LWR at loadafter{scalefnt}% loaded by babel-french
+\LWR at loadafter{schemata}
\LWR at loadafter{scrextend}
\LWR at loadafter{scrhack}
\LWR at loadafter{scrlayer}
@@ -7621,6 +7758,7 @@
\LWR at loadafter{xmpincl}
\LWR at loadafter{xtab}
\LWR at loadafter{xurl}
+\LWR at loadafter{xy}
\LWR at loadafter{zwpagelayout}
% \end{macrocode}
@@ -7637,43 +7775,6 @@
% \HTML\ output. Some of them are also automatically loaded when
% generating print output, but some are not.
%
-% In the document preamble, create a \env{warpprint} environment, and place
-% inside it any of the following packages which are required and which
-% are labeled as ``Print: OK to Load in a \env{warpprint} environment''.
-% Those packages which are labeled as ``Print: Pre-Loaded''
-% need not be placed into the document preamble.
-
-
-
-% \codeall
-% \begin{macrocode}
-\begin{warpall}
-% \end{macrocode}
-
-
-% \changes{v0.16}{2016/04/07}{Added XeLaTeX, LuaLaTeX support.}
-% See: \url{http://tex.stackexchange.com/a/47579}.
-
-% Detects \XeTeX{} and \LuaLaTeX:
-% \index{XeLaTeX>detection}\index{LuaLaTeX>detection}
-% \begin{macrocode}
-\RequirePackage{iftex}
-\newif\ifxetexorluatex
-\ifXeTeX
- \xetexorluatextrue
-\else
- \ifLuaTeX
- \xetexorluatextrue
- \else
- \xetexorluatexfalse
- \fi
-\fi
-% \end{macrocode}
-
-% \begin{macrocode}
-\end{warpall}
-% \end{macrocode}
-
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
@@ -7692,9 +7793,16 @@
% ^^A % \index{font>during conversion}
% ^^A % For \XeLaTeX{} and \LuaLaTeX, uses DejaVu Serif for enhanced Cyrillic and Greek coverage.
% ^^A % \index{Unicode>XeLaTeX \& LuaLaTeX}
+% ^^A
+% ^^A
+%
+% Load \pkg{fontspec} if necessary:
+% \changes{v0.50}{2018/02/24}{Fix: Load \pkg{fontspec} if necessary.}
% \begin{macrocode}
\ifxetexorluatex
-% ^^A \usepackage[no-math]{fontspec}
+\@ifpackageloaded{fontspec}{}{
+\usepackage[no-math]{fontspec}
+}
% \end{macrocode}
% ^^A \defaultfontfeatures{Ligatures=Common}
% ^^A \setmainfont{DejaVu Serif}
@@ -8086,20 +8194,22 @@
% Equation numbers are placed to the left for \HTML.
%
% \pkg{newtxmath} automatically loads \pkg{amsmath},
-% so the options |leqno| and |fleqn| are passed beforehand to be
+% so the option \optn{leqno} is passed beforehand to be
% picked up both here and by \pkg{newtxmath} if it is used.
% \changes{v0.16}{2016/04/11}{Fix: newtxmath compatibility.}
% \changes{v0.33}{2016/06/21}{\pkg{amsmath}: Removed \optn{fleqn} option.}
%
+% ^^A *8* remove leqno and references
% \begin{macrocode}
-\PassOptionsToPackage{leqno}{amsmath}
+% \PassOptionsToPackage{leqno}{amsmath}% disabled to test centered display math
\RequirePackage{amsmath}
% \end{macrocode}
%
% Patches to allow \cs{eqref} inside a caption:
% \changes{v0.49}{2018/02/18}{\pkg{amsmath}: Fix: Patches for \cs{eqref}.}
+% \changes{v0.50}{2018/03/02}{\pkg{amsmath}: Fix: Upright tags for \SVG math.}
% \begin{macrocode}
-\def\maketag@@@#1{#1}
+\def\maketag@@@#1{\text{#1}}
\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip)}}
% \end{macrocode}
@@ -8878,7 +8988,15 @@
}
\LetLtxMacro\LWR at origunderline\underline
-
+% \end{macrocode}
+%
+% \changes{v0.50}{2018/02/22}{Fix: \cs{centering}, etc. in \SVG\ math, \env{lateximage}, \tikz.}
+% \begin{macrocode}
+\let\LWR at origraggedright\raggedright
+\let\LWR at origraggedleft\raggedleft
+\let\LWR at origcentering\centering
+% \end{macrocode}
+% \begin{macrocode}
\let\LWR at orignewpage\newpage
\let\LWR at origpagestyle\pagestyle
@@ -9062,7 +9180,7 @@
% executing\\
% \hspace*{2ex} |pdflatex <project.tex>|,\\
% or similar for \prog{xelatex} or \prog{lualatex}, in print-document generation mode,
-% which is the default unless the |warpHTML| option is given.
+% which is the default unless the \optn{warpHTML} option is given.
% |lwarpmk.conf| is then used by the utility \prog{lwarpmk}.
%
% An example |lwarpmk.conf|:
@@ -9163,6 +9281,7 @@
% \changes{v0.26}{2017/03/30}{\filenm{lwarp.css}: Improved responsive
% \attribute{marginpar} and \attribute{marginblock}.}
% \changes{v0.30}{2017/04/26}{Fix: \filenm{*.css} files only written in print mode.}
+% \changes{v0.50}{2018/03/02}{\filenm{lwarp.css}: Improved \SVG\ display math centering.}
%
% ^^A *lwarp.css
% \begin{macrocode}
@@ -9265,7 +9384,27 @@
text-decoration-skip ;
}
+span.overline {
+ text-decoration: overline ;
+ text-decoration-skip ;
+}
+/* for diagbox */
+div.diagboxtitleN { border-bottom: 1px solid gray }
+div.diagboxtitleS { border-top: 1px solid gray }
+
+div.diagboxE {
+ padding-left: 2em ;
+ text-align: right ;
+}
+
+div.diagboxW {
+ padding-right: 2em ;
+ text-align: left ;
+}
+
+
+
/* For realscripts */
.supsubscript {
display: inline-block;
@@ -9627,6 +9766,37 @@
}
+div.displaymath {
+ text-align: center ;
+}
+
+div.displaymathnumbered {
+ text-align: right ;
+ margin-left: 5% ;
+ margin-right: 5% ;
+ min-width: 2.5in ;
+}
+
+ at media all and (min-width: 400px) {
+ div.displaymathnumbered {
+ margin-left: 10% ;
+ margin-right: 10% ;
+ }
+}
+
+ at media all and (min-width: 800px) {
+ div.displaymathnumbered {
+ margin-right: 20% ;
+ }
+}
+
+ at media all and (min-width: 1200px) {
+ div.displaymathnumbered {
+ margin-right: 30% ;
+ }
+}
+
+
.inlineprogramlisting {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
"Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
@@ -10674,6 +10844,8 @@
border-radius: 1ex ;
}
+table div.minipage { background: none ; border: none ; }
+
div.framebox div.minipage {border:none ; background:none}
section.textbody > div.minipage {
@@ -11074,7 +11246,42 @@
% \end{macrocode}
+% \subsection{lwarp\_one\_limage.cmd}
+%
+% \DescribeFile{lwarp_one_limage.cmd}
+% Used by \pkg{lwarp} to help make \env{lateximage}s when using \brand{Windows}.
+%
+% This must be present when compiling the project,
+% but does not need to be present when distributing
+% the resulting \HTML\ files.
+%
+% The arguments are each of the three fields from \filenm{lateximages.txt},
+% and also the base name of the source file.
+%
+% \prog{MikTeX} does not allow file \filenm{lwarp\_one\_limage.cmd} to be
+% created directly by \prog{lwarpmk}, so \filenm{lwarp\_one\_limage.txt} is created instead,
+% then copied to \filenm{lwarp\_one\_limage.cmd} by \prog{lwarpmk}.
+% This occurs each time \prog{lwarpmk} used to create \env{lateximage}s.
+%
+% \changes{v0.50}{2018/02/27}{\filenm{lwarp\_one\_limage.txt}: Added.}
+%
+% ^^A *lwarp_one_limage.txt
+% \begin{macrocode}
+\begin{warpprint}
+\begin{filecontents*}{lwarp_one_limage.txt}
+ at echo off
+pdfseparate -f %1 -l %1 %4_html.pdf lateximages\lateximagetemp-%%d.pdf"
+pdfcrop lateximages\lateximagetemp-%1.pdf lateximages\%3.pdf
+pdftocairo -svg lateximages\%3.pdf lateximages\%3.svg
+del lateximages\%3.pdf
+del lateximages\lateximagetemp-%1.pdf"
+exit
+\end{filecontents*}
+\end{warpprint}
+% \end{macrocode}
+
+
% \subsection{lwarp\_mathjax.txt}
% \DescribeFile{lwarp_mathjax.txt}
@@ -11203,7 +11410,7 @@
% \subsection{lwarpmk option}
-% The following is only generated if the |lwarpmk| option
+% The following is only generated if the \optn{lwarpmk} option
% was given to \pkg{lwarp}.
% \begin{macrocode}
\begin{LWR at createlwarpmk}
@@ -11226,6 +11433,11 @@
% \changes{v0.37}{2017/08/19}{\prog{lwarpmk}: Removes additional \HTML\ \filenm{aux} files.}
% \changes{v0.38}{2017/08/24}{\prog{lwarpmk}: Added \cmds{print1} and \cmds{html1} actions.}
% \changes{v0.47}{2018/01/24}{\prog{lwarpmk}: \prog{pdfcrop}: Removed \optn{hires} option for improved crop accuracy.}
+% \changes{v0.50}{2018/02/22}{\prog{lwarpmk}: MD5 hash avoids duplicate \SVG\ math.}
+% \changes{v0.50}{2018/02/27}{\prog{lwarpmk}: Multiprocess support making lateximages.}
+% \changes{v0.50}{2018/02/28}{\prog{lwarpmk}: Error if \filenm{lateximages.txt} does not exist.}
+% \changes{v0.50}{2018/02/28}{\prog{lwarpmk}: Error if \filenm{lwarpmk.conf} points to \pkg{lwarp}.}
+% \changes{v0.50}{2018/02/28}{\prog{lwarpmk}: Improved error messages.}
%
% ^^A *lwarpmk.lua
% \begin{macrocode}
@@ -11236,7 +11448,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.49"
+printversion = "v0.50"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -11259,7 +11471,7 @@
For use with latexmk or a Makefile:
Convert project_html.pdf to project_html.html and
individual HTML files.
-lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
+lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -11300,10 +11512,12 @@
io.output(destfile)
for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
-if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
-io.output(newfilename) ;
-else -- not a splitpoint
-io.write (line .. "\n") ;
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then
+ -- split the file
+ io.output(newfilename) ;
+else
+ -- not a splitpoint
+ io.write (line .. "\n") ;
end
end -- do
io.close(sfile)
@@ -11312,8 +11526,10 @@
-- Incorrect value, so print an error and exit.
function cvalueerror ( line, linenum , cvalue )
- print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
@@ -11330,11 +11546,14 @@
-- Default xdyfile:
xdyfile = "lwarp.xdy"
-- Verify the file exists:
-if (lfs.attributes(conffile,"mode")==nil) then -- file not exists
-print("lwarpmk: " .. conffile .." does not exist.")
-print("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
-printhelp () ;
-os.exit(1) -- exit the entire lwarpmk script
+if (lfs.attributes(conffile,"mode")==nil) then
+ -- file not exists
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. conffile .." does not exist.")
+ print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
+ print ("lwarpmk: ===")
+ printhelp () ;
+ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
@@ -11346,11 +11565,13 @@
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
if ( i == nil ) then
-print ( linenum .. " : " .. line ) ;
-print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
-printconf () ;
-os.exit(1) ;
-end
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
+ os.exit(1) ;
+end -- nil
if ( cvarname == "opsystem" ) then
-- Verify choice of opsystem:
if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
@@ -11376,39 +11597,65 @@
elseif ( cvarname == "language" ) then language = cvalue
elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue
else
-print ( linenum .. " : " .. line ) ;
-print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
-printconf () ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
os.exit(1) ;
-end
+end -- cvarname
end -- do scan lines
io.close(cfile)
end -- file exists
+-- Error if sourcename is "lwarp".
+-- This could happen if a local copy of lwarp has recently been recompiled.
+if sourcename=="lwarp" then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Lwarp has recently been recompiled in this directory,")
+ print ("lwarpmk: and \"lwarpmk.conf\" is no longer set for your own project.")
+ print ("lwarpmk: Recompile your own project using pdf/lua/xelatex <projectname>.")
+ print ("lwarpmk: After a recompile, \"lwarpmk.conf\" will be set for your project,")
+ print ("lwarpmk: and you may again use lwarpmk.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end -- sourcename of "lwarp"
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
-rmname = "rm"
-mvname = "mv"
-touchnamepre = "touch"
-touchnamepost = ""
-dirslash = "/"
-opquote= "\'"
+ rmname = "rm"
+ mvname = "mv"
+ cpname = "cp"
+ touchnamepre = "touch"
+ touchnamepost = ""
+ newtouchname = "touch"
+ dirslash = "/"
+ opquote= "\'"
+ cmdgroupopenname = " ( "
+ cmdgroupclosename = " ) "
+ seqname = " ; "
+ bgname = " &"
elseif opsystem=="Windows" then -- For Windows
-rmname = "DEL"
-mvname = "MOVE"
-touchnamepre = "COPY /b"
-touchnamepost = "+,,"
-dirslash = "\\"
-opquote= "\""
+ rmname = "DEL"
+ mvname = "MOVE"
+ cpname = "COPY"
+ touchnamepre = "COPY /b"
+ touchnamepost = "+,,"
+ newtouchname = "echo empty >"
+ dirslash = "\\"
+ opquote= "\""
+ cmdgroupopenname = ""
+ cmdgroupclosename = ""
+ seqname = " & "
+ bgname = ""
else print ( "lwarpmk: Select Unix or Windows for opsystem" )
end --- for Windows
-- set xindycmd according to pdflatex vs xelatex/lualatex:
if ( latexname == "pdflatex" ) then
-xindycmd = "texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
else
-xindycmd = "xindy -M texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "xindy -M texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
end
end -- loadconf
@@ -11429,8 +11676,8 @@
if ( string.find(line,"Rerun to get") ~= nil ) then
io.close(fsource)
return true
-end
-end
+end -- if
+end -- do
io.close(fsource)
return false
end
@@ -11441,10 +11688,13 @@
function onetime (fsuffix)
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
-err = os.execute(
--- "echo " ..
- latexname .. " " .. sourcename..fsuffix )
-if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+err = os.execute(latexname .. " " .. sourcename..fsuffix)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
@@ -11465,8 +11715,10 @@
function verifyfileexists (filename)
if (lfs.attributes ( filename , "modification" ) == nil ) then
-print ( "lwarpmk: " .. filename .. " not found." ) ;
-os.exit (1) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. filename .. " not found." ) ;
+ print ("lwarpmk: ===")
+ os.exit (1) ;
end
end
@@ -11474,13 +11726,13 @@
-- Convert <project>_html.pdf into HTML files:
function pdftohtml ()
- -- Convert to text:
- print ("lwarpmk: Converting " .. sourcename
- .."_html.pdf to " .. sourcename .. "_html.html")
- os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
- .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
- -- Split the result into individual HTML files:
- splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+-- Convert to text:
+print ("lwarpmk: Converting " .. sourcename
+ .."_html.pdf to " .. sourcename .. "_html.html")
+os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
+ .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+-- Split the result into individual HTML files:
+splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
@@ -11487,57 +11739,119 @@
-- Remove auxiliary files:
function removeaux ()
- os.execute ( rmname .. " " ..
- sourcename ..".aux " .. sourcename .. "_html.aux " ..
- sourcename ..".toc " .. sourcename .. "_html.toc " ..
- sourcename ..".lof " .. sourcename .. "_html.lof " ..
- sourcename ..".lot " .. sourcename .. "_html.lot " ..
- sourcename ..".idx " .. sourcename .. "_html.idx " ..
- sourcename ..".ind " .. sourcename .. "_html.ind " ..
- sourcename ..".log " .. sourcename .. "_html.log " ..
- sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
- "*_html_inc.*"
- )
+os.execute ( rmname .. " " ..
+ sourcename ..".aux " .. sourcename .. "_html.aux " ..
+ sourcename ..".toc " .. sourcename .. "_html.toc " ..
+ sourcename ..".lof " .. sourcename .. "_html.lof " ..
+ sourcename ..".lot " .. sourcename .. "_html.lot " ..
+ sourcename ..".idx " .. sourcename .. "_html.idx " ..
+ sourcename ..".ind " .. sourcename .. "_html.ind " ..
+ sourcename ..".log " .. sourcename .. "_html.log " ..
+ sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ "*_html_inc.*"
+ )
end
-
-
-- Create lateximages based on lateximages.txt:
function createlateximages ()
print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \"lateximages.txt\" does not exist.")
+ print ("lwarpmk: Your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: or the file has been deleted somehow.")
+ print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,")
+ print ("lwarpmk: and recreate \"lateximages.txt\".")
+ print ("lwarpmk: If your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: then \"lateximages.txt\" will never exist, and")
+ print ("lwarpmk: \"lwarpmk limages\" will not be necessary.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd:
+if opsystem=="Windows" then
+ err = os.execute (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd"
+ )
+ if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd")
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+ end
+end -- create lwarp_one_limage.cmd
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
--- lwimgnum is the sequential lateximage number to assign for the image
-i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|")
+-- lwimghash is true if this filename is a hash
+-- lwimgname is the lateximage filename root to assign for the image
+i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
+-- Skip is this image is hashed and already exists:
+local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
+if (
+ (lwimghash ~= "true") or
+ (lfs.attributes(lwimgfullname,"mode")==nil) -- file not exists
+)
+then -- not hashed or not exists:
+-- Print the name of the file being generated:
+print ( "lwarpmk: " .. lwimgname )
+-- Touch/create the dest so that only once instance tries to build it:
+err = os.execute(newtouchname .. " " .. lwimgfullname)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to touch " .. lwimgfullname)
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+end
-- Separate out the image into its own single-page pdf:
+if opsystem=="Unix" then
+-- For Unix / Linux / Mac OS:
err = os.execute(
-"pdfseparate -f " .. lwimgpage .. " -l " ..
- lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf")
+-- print (
+cmdgroupopenname ..
+"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
-- Crop the image:
-err = os.execute(
-"pdfcrop lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
-- Convert the image to svg:
-err = os.execute(
-"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
--- Move the result into lateximages/:
-err = os.execute(
-mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash )
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
-- Remove the temporary files:
-err = os.execute(
-rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+cmdgroupclosename .. " >/dev/null " .. bgname
+)
+elseif opsystem=="Windows" then
+-- For Windows
+err = os.execute (
+ "start /b \"\" lwarp_one_limage " ..
+ lwimgpage .. " " ..
+ lwimghash .. " " ..
+ lwimgname .. " " ..
+ sourcename .. " <nul >nul"
+)
+end -- Windows
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to create one lateximage.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end -- not hashed or not exists
+end -- not nil
end -- do
io.close(limagesfile)
+print ( "lwarpmk limages: done" )
end -- function
@@ -11544,20 +11858,25 @@
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
function compilelatexmk ( fsuffix )
- -- The recorder option is required to detect changes in <project>.tex
- -- while we are loading <project>_html.tex.
- err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
- .. "-e "
- .. opquote
- .. "$makeindex = q/" -- $
- .. xindycmd
- .. " -M " .. xdyfile
- .. " -L " .. language .. " /"
- .. opquote
- .. " -pdflatex=\"" .. latexname .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
- if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+-- The recorder option is required to detect changes in <project>.tex
+-- while we are loading <project>_html.tex.
+err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
+ .. "-e "
+ .. opquote
+ .. "$makeindex = q/" -- $
+ .. xindycmd
+ .. " -M " .. xdyfile
+ .. " -L " .. language .. " /"
+ .. opquote
+ .. " -pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename..fsuffix ..".tex" ) ;
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end
@@ -12251,10 +12570,18 @@
% \begin{macro}{\LWR at htmlrefsectionfilename} \marg{label}
%
% Prints the filename for the given label
+%
+% \changes{v0.50}{2018/02/20}{Fix: SVG math in a section name.}
% \begin{macrocode}
\newcommand*{\LWR at htmlrefsectionfilename}[1]{%
\LWR at traceinfo{LWR at htmlrefsectionfilename: !\detokenize{#1}!}%
+% \end{macrocode}
+% \cs{LWR at nullfonts} to allow math in a section name.
+% \begin{macrocode}
+\begingroup%
+\LWR at nullfonts%
\LWR at htmlsectionfilename{\LWR at htmlfileref{#1}}%
+\endgroup%
\LWR at traceinfo{LWR at htmlrefsectionfilename: done}%
}
% \end{macrocode}
@@ -12636,6 +12963,7 @@
#1%
\protect\LWR at origtextgreater%
\endgroup%
+\LWR at traceinfo{LWR at htmltagc: done}%
}%
}
% \end{macrocode}
@@ -12963,7 +13291,10 @@
% \begin{macrocode}
\begin{warpHTML}
\NewDocumentEnvironment{BlockClass}{o m}%
-{\LWR at htmldivclass[#1]{#2}}
+{%
+ \LWR at origpar%
+ \LWR at htmldivclass[#1]{#2}%
+}
{\LWR at htmldivclassend{#2}}
\end{warpHTML}
% \end{macrocode}
@@ -12986,6 +13317,7 @@
% \begin{macrocode}
\begin{warpHTML}
\newcommand{\BlockClassSingle}[2]{%
+\LWR at origpar%
\LWR at htmlelementclassline{div}{#1}{#2}%
}
\end{warpHTML}
@@ -13798,8 +14130,9 @@
\color at begingroup%
% \end{macrocode}
% Use \HTML\ superscripts even inside a \env{lateximage}:
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
- \renewcommand{\textsuperscript}[1]{\LWR at htmlspan{sup}{##1}}%
+ \renewrobustcmd{\textsuperscript}[1]{\LWR at htmlspan{sup}{##1}}%
% \end{macrocode}
% Use paragraph tags if in a tabular data cell or a \env{lateximage}:
% \begin{macrocode}
@@ -14145,7 +14478,7 @@
\newcommand*{\LWR at filenamenoblanks}[1]{%
\begingroup
% \end{macrocode}
-
+%
% Locally temporarily disable direct-formatting commands,
% not used in filenames:
% \begin{macrocode}
@@ -14152,10 +14485,10 @@
\LWR at nullfonts%
\renewcommand*{\LWR at htmltagc}[1]{}%
% \end{macrocode}
+%
% Replaces common symbols and short words with hyphens:
-%
% \begin{macrocode}
-\LWR at traceinfo{LWR at filenamenoblanks \#1: !#1!}%
+% \LWR at traceinfo{LWR at filenamenoblanks \#1: !#1!}%
\edef\LWR at thisnewfilename{#1}%
\LWR at traceinfo{LWR at filenamenoblanks edef: !\LWR at thisnewfilename!}%
\fullexpandarg%
@@ -14279,7 +14612,7 @@
% navigation, side TOC, header, and starts the text body.
% \begin{macrocode}
\newcommand*{\LWR at newhtmlfile}[1]{
-\LWR at traceinfo{LWR at newhtmlfile: !#1!}
+\LWR at traceinfo{LWR at newhtmlfile}
% \end{macrocode}
% At the bottom of the ending file:
@@ -14337,12 +14670,20 @@
% where to split the files apart.
% Uses pipe-separated fields for |split_html.gawk|.
% Uses monospaced font with ligatures disabled for everything except the title.
+%
+% \changes{v0.50}{2018/02/20}{Fix: SVG math in a section name.}
% \begin{macrocode}
\LWR at traceinfo{LWR at newhtmlfile: about to print start file}%
+% \end{macrocode}
+% \cs{LWR at nullfonts} to allow math in a section name.
+% \begin{macrocode}
+\begingroup%
+\LWR at nullfonts%
\LWR at htmlblockcomment{%
|Start file|%
\LWR at htmlsectionfilename{\LWR at thisfilename}|%
}
+\endgroup%
% \end{macrocode}
% At the top of the starting file:
@@ -15151,14 +15492,11 @@
% Locally temporarily disable direct-formatting commands:
% \begin{macrocode}
\begingroup
-\LWR at traceinfo{LWR at filestart: A}
\LWR at nullfonts
-\LWR at traceinfo{LWR at filestart: B}
% \end{macrocode}
% Create the page's \HTML\ header:
% \begin{macrocode}
\LWR at htmltag{!DOCTYPE html}\LWR at orignewline
-\LWR at traceinfo{LWR at filestart: C}
% \end{macrocode}
% The language is user-adjustable:
% \begin{macrocode}
@@ -16438,8 +16776,13 @@
% Use a mono-spaced font to preserve horizontal positioning.
% If horizontal alignment is important for the user, use a mono-spaced font
% in the \CSS\ for the |verse| class.
+% \changes{v0.50}{2018/03/02}{Improved column alignment.}
% \begin{macrocode}
\begingroup%
+% \end{macrocode}
+% \changes{v0.50}{2018/03/02}{Improved column alignment.}
+% \begin{macrocode}
+\LWR at orignormalsize%
\LWR at origttfamily%
% \end{macrocode}
% Since inside a \element{pre}, restore the original list processing:
@@ -19653,7 +19996,7 @@
%
% If not |\@ifpackageloaded{multirow}| but \cs{@xmultirow} is defined,
% then this must be v1.6 or earlier, which did not |\ProvidesPackage{multirow}|,
-% and did not have the |vposn| option.
+% and did not have the \optn{vposn} option.
%
% \begin{macrocode}
{% v1.6 or older did not \ProvidePackage
@@ -20524,7 +20867,7 @@
%
% \begin{macro}{\LWR at htmlfileref} \marg{label}
% \changes{v0.24}{2017/03/13}{Fix: Index links while \cs{tracinglwarp}.}
-% Returns the file number for this label:
+% Returns the file number or name for this label:
% \begin{macrocode}
\newcommand*{\LWR at htmlfileref}[1]{%
% \end{macrocode}
@@ -20946,7 +21289,6 @@
% \marg{filename} \marg{extension} \marg{style}
%
% \changes{v0.18}{2016/05/18}{Surpress extra space.}
-%
% \begin{macrocode}
\newcommand*{\LWR at subinlineimage}[5][]{%
\ifblank{#1}%
@@ -21122,7 +21464,7 @@
% \DescribeCounter{LWR at thisautoidWP}
% A sequential counter for all word processor conversion \element{div}s.
-% This is used to convince LibreOffice to form a frame around this element.
+% This is used to convince \brand{LibreOffice} to form a frame around this element.
% \changes{v0.45}{2017/12/09}{Separate \ctr{LWR at thisautoidWP} for word processor \element{div}s.}
% \begin{macrocode}
\newcounter{LWR at thisautoidWP}
@@ -22222,7 +22564,13 @@
\let\rlap\LWR at origrlap%
\let\hfilneg\LWR at orighfilneg%
% \end{macrocode}
+% \changes{v0.50}{2018/02/22}{Fix: \cs{centering}, etc. in \SVG\ math, \env{lateximage}, \tikz.}
% \begin{macrocode}
+\let\raggedright\LWR at origraggedright
+\let\raggedleft\LWR at origraggedleft
+\let\centering\LWR at origcentering
+% \end{macrocode}
+% \begin{macrocode}
\let\,\LWR at origcomma% disable HTML short unbreakable space
\let\textellipsis\LWR at origtextellipsis%
\let\textless\LWR at origtextless%
@@ -22419,13 +22767,21 @@
% \end{macrocode}
% For SVG, print the math inside a \env{lateximage},
% with an \element{alt} tag of the \LaTeX\ code:
+% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
+% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \begin{macrocode}
{% not mathjax
+ \begin{BlockClass}{displaymath}
\begin{lateximage}%
- [\textbackslash{[} \LWR at HTMLsanitize{#1} \textbackslash{]}]%
+ [%
+ \textbackslash{[} % extra space
+ \LWR at HTMLsanitize{#1} % extra space
+ \textbackslash{]}%
+ ]%
\LWR at origdollar\LWR at origdollar#1\LWR at origdollar\LWR at origdollar%
\end{lateximage}%
+ \end{BlockClass}
}% not mathjax
}%
@@ -22434,25 +22790,45 @@
%
%
%
-% \begin{macro}{\LWR at singledollar}
-% Redefine the single dollar sign to place math inside a \env{lateximage}, or use \brand{MathJax}:
+% \begin{macro}{\LWR at subsingledollar} \marg{alt text} \marg{math expression}
+% Redefine the single dollar sign to place math inside a \env{lateximage},
+% or use \brand{MathJax}:
+% If the \attribute{alt} text is empty, the math expression is used
+% for the \attribute{alt} text.
%
% \changes{v0.19}{2016/05/25}{\brand{MathJax} support.}
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} print LaTeX expression.}
% \changes{v0.47}{2018/01/24}{Added \SVG\ math image baseline adjust and em sizing.}
+% \changes{v0.50}{2018/02/23}{Fix: Use \env{lateximage} even if MathJax.}
+% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
% \begin{macrocode}
\newlength{\LWR at singledollarwidth}
\newlength{\LWR at singledollarheight}
\newlength{\LWR at singledollardepth}
-\protected\gdef\LWR at subsingledollar#1{%
+\protected\gdef\LWR at subsingledollar#1#2{%
\begingroup%
-\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
% \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|''.
+% 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, print the math expression.
+% \begin{macrocode}
+\ifboolexpr{%
+ (
+ bool{mathjax} or
+ ( bool{FormatWP} and bool{WPMarkMath} )
+ ) and
+ ( not test { \ifstrequal {#1} {math image} } )
+}%
+% \end{macrocode}
% For \brand{MathJax}, print the math between |\(| and |\)|:
% \begin{macrocode}
{%
- {\textbackslash(\LWR at HTMLsanitize{#1}\textbackslash)}%
+ {\textbackslash(\LWR at HTMLsanitize{#2}\textbackslash)}%
}% mathjax
% \end{macrocode}
% For SVG, print the math inside a \env{lateximage},
@@ -22466,13 +22842,13 @@
\LWR at restoreorigformatting%
\LWR at orignormalsize%
\global\setlength{\LWR at singledollardepth}{\depthof{%
- \LWR at origdollar#1\LWR at origdollar%
+ \LWR at origdollar#2\LWR at origdollar%
}*\real{.8}}%
\global\setlength{\LWR at singledollarwidth}{\widthof{%
- \LWR at origdollar#1\LWR at origdollar%
+ \LWR at origdollar#2\LWR at origdollar%
}*\real{.8}}%
\global\setlength{\LWR at singledollarheight}{\totalheightof{%
- \LWR at origdollar#1\LWR at origdollar%
+ \LWR at origdollar#2\LWR at origdollar%
}*\real{.8}}%
% \end{macrocode}
% \changes{v0.49}{2018/02/18}{Fix: Incorrect \PDF\ output size corrupted \HTML.}
@@ -22485,28 +22861,28 @@
% user's selected font size.
% Start with the larger of width or height:
% \begin{macrocode}
-% \ifdimgreater{\LWR at singledollarwidth}{\LWR at singledollarheight}{%
-% \def\LWR at singledollarstyle{%
-% width:\LWR at convertto{em}{\the\LWR at singledollarwidth} em%
-% }%
-% }{%
+ \ifdimgreater{\LWR at singledollarwidth}{\LWR at singledollarheight}{%
\def\LWR at singledollarstyle{%
+ width:\LWR at convertto{em}{\the\LWR at singledollarwidth} em%
+ }%
+ }{%
+ \def\LWR at singledollarstyle{%
height:\LWR at convertto{em}{\the\LWR at singledollarheight }em%
}%
-% }%
+ }%
% \end{macrocode}
% If narrow width, use the height. Single-letter variables look best if they all are
% scaled according to height.
% \begin{macrocode}
-% \ifdimless{\LWR at singledollarwidth}{.8em}%
-% {%
-% \def\LWR at singledollarstyle{%
-% height:\LWR at convertto{em}{\the\LWR at singledollarheight }em%
-% }%
-% }%
-% {}%
+ \ifdimless{\LWR at singledollarwidth}{.8em}%
+ {%
+ \def\LWR at singledollarstyle{%
+ height:\LWR at convertto{em}{\the\LWR at singledollarheight }em%
+ }%
+ }%
+ {}%
% \end{macrocode}
-% If extremely thin, use the width:
+% If extremely wide and short, use the width:
% \begin{macrocode}
\ifdimless{\LWR at singledollarheight}{.3em}%
{%
@@ -22521,7 +22897,10 @@
% \begin{macrocode}
\ifdimgreater{\LWR at singledollardepth}{0.01em}{%
\def\LWR at singledollardepthstyle{%
- \ ; \LWR at origmbox{vertical-align:-\LWR at convertto{em}{\the\LWR at singledollardepth} em} %
+ \ ; % extra space
+ \LWR at origmbox{%
+ vertical-align:-\LWR at convertto{em}{\the\LWR at singledollardepth} em%
+ } % extra space
}%
}{%
\def\LWR at singledollardepthstyle{}%
@@ -22529,18 +22908,34 @@
% \end{macrocode}
% Create the \env{lateximage} using the alternate tag and the computed
% size and depth.
+% The star causes \env{lateximage} to use an MD5 hash as the filename.
+% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
% \begin{macrocode}
- \begin{lateximage}%
- [\textbackslash( \LWR at HTMLsanitize{#1} \textbackslash)]%
- [\LWR at singledollarstyle \LWR at singledollardepthstyle]%
- \LWR at origdollar#1\LWR at origdollar%
+ \ifblank{#1}{%
+ \begin{lateximage}*%
+ [%
+ \textbackslash( %
+ \LWR at HTMLsanitize{#2} % extra space
+ \textbackslash)%
+ ]%
+ [\LWR at singledollarstyle \LWR at singledollardepthstyle]%
+ }{%
+ \begin{lateximage}%
+ [#1]%
+ [\LWR at singledollarstyle \LWR at singledollardepthstyle]%
+ }%
+ \LWR at origdollar#2\LWR at origdollar%
\end{lateximage}%
}%
\endgroup%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at singledollar} \marg{alt text} \marg{math expression}
+% \begin{macrocode}
\protected\gdef\LWR at singledollar#1${%
-\LWR at subsingledollar{#1}%
+\LWR at subsingledollar{}{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -22560,19 +22955,39 @@
-% \begin{macro}{\@ensuredmath} \marg{expression} Not yet adapted to \pkg{lwarp}.
+% \begin{macro}{\@ensuredmath} \marg{expression}
%
% \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.}
-%
+% \changes{v0.50}{2018/02/23}{Fix: Use \env{lateximage} even if MathJax.}
+% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
% \begin{macrocode}
\LetLtxMacro\LWR at origensuredmath\@ensuredmath
\renewcommand{\@ensuredmath}[1]{%
+\ifbool{mathjax}{%
+% \end{macrocode}
+% If MathJax, a \env{lateximage} is used, since \cs{ensuremath} is
+% often used for complex \TeX\ expressions which MathJax may not render.
+% \begin{macrocode}
+% \begin{lateximage}[math image]
+% \LWR at origensuredmath{#1}
+% \end{lateximage}
+ \LWR at subsingledollar{math image}{\relax#1}%
+}{% SVG math
+% \end{macrocode}
+% If already inside a \env{lateximage} in math mode, continue as-is.
+% \begin{macrocode}
\ifmmode%
\LWR at origensuredmath{#1}%
\else%
- \LWR at subsingledollar{\relax#1}%
+% \end{macrocode}
+% Create an inline math \env{lateximage},
+% but don't use the expression as the \attribute{alt} tag, since
+% the expression may be complex internal code used to draw a math expression.
+% \begin{macrocode}
+ \LWR at subsingledollar{math image}{\relax#1}%
\fi%
+}%
}
% \end{macrocode}
% \end{macro}
@@ -22797,10 +23212,14 @@
{% not mathjax
% \end{macrocode}
% Begin the \env{lateximage} with an \element{alt} tag containing the math source:
+% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \begin{macrocode}
- \begin{lateximage}[(\LWR at equationtag) \textbackslash{begin\{equation\}} %
- \LWR at HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} %
- \textbackslash{end\{equation\}}]% alt tag
+ \begin{BlockClass}{displaymathnumbered}
+ \begin{lateximage}[%
+ (\LWR at equationtag) \textbackslash{begin\{equation\}} % extra space
+ \LWR at HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} % extra space
+ \textbackslash{end\{equation\}}%
+ ]% alt tag
% \end{macrocode}
% Create the actual \LaTeX-formatted equation inside
% the |lateximage| using the contents of the environment.
@@ -22809,6 +23228,7 @@
\BODY% contents collected by NewEnviron
\LWR at origendequation
\end{lateximage}%
+ \end{BlockClass}
}% not mathjax
% \end{macrocode}
@@ -23027,7 +23447,9 @@
% For numbered \SVG\ equations, first create a \env{lateximage} with
% an \attribute{alt} attribute containing sanitized copy of the source code:
% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
+% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \begin{macrocode}
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[(\LWR at startingequationtag--\LWR at equationtag)
\LWR at addmathjax{eqnarray}{\BODY}]
% \end{macrocode}
@@ -23037,11 +23459,14 @@
\BODY
\LWR at origendeqnarray
\end{lateximage}
+ \end{BlockClass}
}%
{% not LWR at numbereqnarray
% \end{macrocode}
% If not numbered, do the same, but an extra \cs{nonumber} seems to be required:
+% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \begin{macrocode}
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at addmathjax{eqnarray*}{\BODY}]
\LWR at origeqnarray
\BODY
@@ -23048,6 +23473,7 @@
\nonumber
\LWR at origendeqnarray
\end{lateximage}
+ \end{BlockClass}
}% LWR at numbereqnarray
}% not mathjax
% \end{macrocode}
@@ -23078,7 +23504,8 @@
%
% The following \AmS\ environments are more easily patched in-place:
%
-% \changes{v0.44}{2017/11/16}{\pkg{AMS environments}: Fix: Groups for lateximages.}
+% \changes{v0.44}{2017/11/16}{AMS environments: Fix: Groups for \env{lateximage}s.}
+% \changes{v0.50}{2018/03/01}{AMS environments: Improved \SVG\ math display.}
%
% \begin{environment}{multline}
% \begin{macrocode}
@@ -23091,6 +23518,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{multline}]
}
}
@@ -23103,7 +23531,7 @@
\boolfalse{LWR at amsmultline}
\LWR at addmathjax{multline}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23121,6 +23549,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{multline*}]
}
}
@@ -23133,7 +23562,7 @@
\boolfalse{LWR at amsmultline}
\LWR at addmathjax{multline*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -23152,6 +23581,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{gather}]
}
}
@@ -23163,7 +23593,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{gather}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23180,6 +23610,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{gather*}]
}
}
@@ -23191,7 +23622,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{gather*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23209,6 +23640,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{align}]
}
}
@@ -23220,7 +23652,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{align}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23238,6 +23670,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{align*}]
}
}
@@ -23249,7 +23682,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{align*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23267,6 +23700,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{flalign}]
}
}
@@ -23278,7 +23712,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{flalign}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23296,6 +23730,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{flalign*}]
}
}
@@ -23307,7 +23742,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{flalign*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
% \end{macrocode}
@@ -23590,7 +24025,7 @@
% \subsection{HTML \element{alt} tags}
-% \begin{macro}{\LWR at amsmathbody} \marg{envname}
+% \begin{macro}{\LWR at amsmathbody} \marg{envname} \qquad
% For use inside the optional argument to a \env{lateximage}
% to add the contents of a AMS math environment to the \element{alt} tag.
%
@@ -23599,7 +24034,7 @@
% \begin{macrocode}
\newcommand*{\LWR at amsmathbody}[1]
{%
-\textbackslash\{begin\}\{#1\} %
+\textbackslash\{begin\}\{#1\} % extra space
\LWR at HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
\textbackslash\{end\}\{#1\}%
}
@@ -23606,7 +24041,7 @@
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\LWR at amsmathbodynumbered} \marg{envname}
+% \begin{macro}{\LWR at amsmathbodynumbered} \marg{envname} \qquad
% For use inside the optional argument to a \env{lateximage}
% to add the contents of a AMS math environment to the \element{alt} tag,
% prefixed by the equation numbers.
@@ -23618,8 +24053,8 @@
{%
\ifnumcomp{\value{LWR at startingequation}}{=}{\value{equation}}%
{(\LWR at equationtag)}%
-{(\LWR at startingequationtag--\LWR at equationtag)} %
-\LWR at amsmathbody{#1} %
+{(\LWR at startingequationtag--\LWR at equationtag)} % extra space
+\LWR at amsmathbody{#1} % extra space
}
% \end{macrocode}
% \end{macro}
@@ -23627,8 +24062,18 @@
% \subsection{\env{lateximage}}
-% \begin{environment}{lateximage} \oarg{\element{alt} tag} \oarg{CSS style}
+% \begin{environment}{lateximage} * \oarg{\element{alt} tag} \oarg{CSS style}
%
+% Typesets the contents and then renders the result as an \SVG\ file.
+%
+% The optional \element{alt} tag is included in the \HTML\ code for use with copy/paste.
+%
+% The starred version also uses the \element{alt} tag to create an MD5 hash which is
+% used as the image's filename. This is used for \SVG\ math expressions, and
+% may also be of some use for the document creator.
+% The use of the hash for the filename means that identical expressions will all share a
+% single file, and the file must be converted to \SVG\ only a single time.
+%
% \changes{v0.18}{2016/05/18}{Surpress extra space.}
% \changes{v0.18}{2016/05/18}{pdfcrop: -{}-hires added.}
% \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.}
@@ -23644,7 +24089,7 @@
% \begin{macrocode}
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{O{image}O{}}
+\NewDocumentEnvironment{lateximage}{s O{image} O{}}
{%
\LWR at traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
% \end{macrocode}
@@ -23704,11 +24149,24 @@
class="lateximagesource"}%
% \end{macrocode}
% Write instructions to the |lateximages.txt| file:
+% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
% \begin{macrocode}
\LWR at traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR at lateximagesfile{%
- |\arabic{LWR at LIpage}|\arabic{LWR at externalfilecnt}|%
- }%
+ \IfBooleanTF{#1}% starred
+ {% hash
+ \LWR at traceinfo{lateximage: hash true}%
+ \edef\LWR at hashedname{\LWR at mdfive{\detokenize\expandafter{#2}}}%
+ \LWR at traceinfo{lateximage: hash is \LWR at hashedname}%
+ \immediate\write\LWR at lateximagesfile{%
+ |\arabic{LWR at LIpage}|true|\LWR at hashedname|%
+ }%
+ }% hash
+ {% no hash
+ \LWR at traceinfo{lateximage: hash false}%
+ \immediate\write\LWR at lateximagesfile{%
+ |\arabic{LWR at LIpage}|false|lateximage-\arabic{LWR at externalfilecnt}|%
+ }%
+ }% no hash
% \end{macrocode}
% Place an open comment tag.
% This will hide any traces of the lateximage \PDF\ page which were picked up by
@@ -23752,6 +24210,7 @@
\LWR at traceinfo{lateximage: finished creating the label}%
% \end{macrocode}
% Enable print-mode math functions:
+% \changes{v0.50}{2018/02/20}{Fix: SVG math in a section name.}
% \begin{macrocode}
\LetLtxMacro$\LWR at origdollar%
\catcode`\$=3% math shift
@@ -23797,9 +24256,23 @@
% \end{macrocode}
% Create a link to the lateximage, allowing its natural height:
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
+% \changes{v0.50}{2018/02/22}{MD5 hash avoids duplicate \SVG\ math.}
% \begin{macrocode}
- \LWR at subinlineimage[#1]{lateximage}%
- {lateximages\OSPathSymbol{}\LWR at origmbox{lateximage-\theLWR at externalfilecnt}}{svg}{#2}%
+ \IfBooleanTF{#1}% starred
+ {% hash
+ \LWR at subinlineimage[#2]{lateximage}%
+ {%
+ lateximages\OSPathSymbol%
+ \LWR at origmbox{\LWR at hashedname}%
+ }{svg}{#3}%
+ }% hash
+ {% no hash
+ \LWR at subinlineimage[#2]{lateximage}%
+ {%
+ lateximages\OSPathSymbol%
+ \LWR at origmbox{lateximage-\theLWR at externalfilecnt}%
+ }{svg}{#3}%
+ }% no hash
% \end{macrocode}
% Be sure that are doing a paragraph:
% \begin{macrocode}
@@ -23835,7 +24308,7 @@
%
% \changes{v0.48}{2018/02/02}{Print mode boxed to natural width.}
% \begin{macrocode}
-\NewDocumentEnvironment{lateximage}{o o}
+\NewDocumentEnvironment{lateximage}{s o o}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
% \end{macrocode}
@@ -23988,14 +24461,30 @@
% Options for siunitx:
+% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved units.}
% \begin{macrocode}
+\newrobustcmd{\LWR at siunitx@textcelsius}{\HTMLentity{deg}C}
+\newrobustcmd{\LWR at siunitx@textdegree}{\HTMLentity{deg}}
+\newrobustcmd{\LWR at siunitx@textprime}{\HTMLunicode{2032}}
+\newrobustcmd{\LWR at siunitx@textdblprime}{\HTMLunicode{2033}}
+\newrobustcmd{\LWR at siunitx@textplanckbar}{\text{\HTMLunicode{0127}}}
+
+\appto\LWR at restoreorigformatting{
+\renewrobustcmd{\LWR at siunitx@textcelsius}{\text{\ensuremath{^\circ}C}}
+\renewrobustcmd{\LWR at siunitx@textdegree}{\text{\ensuremath{^\circ}}}
+\renewrobustcmd{\LWR at siunitx@textprime}{\text{\ensuremath{^\prime}}}
+\renewrobustcmd{\LWR at siunitx@textdblprime}{\text{\ensuremath{^{\prime\prime}}}}
+\renewrobustcmd{\LWR at siunitx@textplanckbar}{\text{\ensuremath{\hbar}}}
+}
+
\PassOptionsToPackage{
detect-mode=true,
per-mode=symbol, % fraction is not seen by pdftotext
-% text-celsius = {\protect\LWRsiunitx at degree{}C},
-% text-degree = {\protect\LWRsiunitx at degree},
+ text-celsius = {\LWR at siunitx@textcelsius},
+ text-degree = {\LWR at siunitx@textdegree},
+ text-arcminute = {\LWR at siunitx@textprime} ,
+ text-arcsecond = {\LWR at siunitx@textdblprime} ,
}{siunitx}
-
% \end{macrocode}
% \begin{macrocode}
@@ -24552,7 +25041,8 @@
% \label{sec:footnotesminipageplaced}
%
%
-% \DescribeBoolean{LWR at minipagefullwidth} Should the next minipage have no \HTML\ |width|?
+% \DescribeBoolean{LWR at minipagefullwidth} Should the next minipage
+% have no \HTML\ |width|?
% \begin{macrocode}
\newbool{LWR at minipagefullwidth}
\boolfalse{LWR at minipagefullwidth}
@@ -25132,7 +25622,7 @@
% \begin{macro}{\LWR at HTMLtextstyle} \marg{FormatWP style} \marg{class} \marg{text}
%
% If |FormatWP|, adds an explicit style to the text span class.
-% This is used by LibreOffice to mark its imported text using the given style.
+% This is used by \brand{LibreOffice} to mark its imported text using the given style.
% \changes{v0.42}{2017/10/20}{Added.}
% \begin{macrocode}
\DeclareRobustCommand{\LWR at HTMLtextstyle}[3]{%
@@ -25279,6 +25769,12 @@
% \begin{macro}{\LWR at nullfonts} Removes formatting during filename operations.
+%
+% \textcolor{red}{Use only inside a group.}\watchout
+%
+% The following are \emph{not} made robust,
+% since they must be expanded to their nullified versions.
+%
% \changes{v0.34}{2017/08/05}{Improved font control.}
% \changes{v0.36}{2017/08/15}{Fix: Filenames while using \brand{MathJax}.}
% \changes{v0.40}{2017/09/21}{Fix: Long arguments for expandable command.}
@@ -25308,9 +25804,15 @@
\LetLtxMacro{\itshape}{\LWR at nullitshape}%
\LetLtxMacro{\em}{\LWR at nullem}%
\LetLtxMacro{\normalfont}{\LWR at nullnormalfont}%
+% \end{macrocode}
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
+% \begin{macrocode}
\renewcommand*{\,}{-}%
\renewcommand*{~}{-}%
+\renewcommand*{\newline}{ }%
\renewcommand*{\textellipsis}{-}%
+% \end{macrocode}
+% \begin{macrocode}
\renewcommand*{\HTMLunicode}[1]{-}%
\renewcommand*{\HTMLentity}[1]{-}%
% \end{macrocode}
@@ -25317,14 +25819,25 @@
% Ampersand becomes ``and'', which is a short word and is then removed from the filename.
% \begin{macrocode}
\renewcommand*{\&}{and}%
+% \end{macrocode}
+% \begin{macrocode}
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
-\LetLtxMacro\underline\LWR at origunderline%
+% \end{macrocode}
+% \changes{v0.50}{2018/02/20}{Fix: \cs{underline} in sectioning file name.}
+% \begin{macrocode}
+\renewcommand{\underline}[1]{##1}%
+% \end{macrocode}
+% \begin{macrocode}
\RenewDocumentCommand{\LWR at htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
\DeclareRobustCommand{\LWR at HTMLtextstyle}[3]{##3}%
-\DeclareRobustCommand{\LWR at subsingledollar}[1]{}%
-\renewcommand*{\newline}{ }%
+% \end{macrocode}
+% Nullify math macros.
+% \begin{macrocode}
+\def\(##1\){}%
+\def\[##1\]{}%
+\renewcommand{\LWR at subsingledollar}[2]{}
}
% \end{macrocode}
% \end{macro}
@@ -25359,57 +25872,59 @@
% \end{macro}
% \changes{v0.48}{2018/02/02}{Improved font control.}
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
+%
% \begin{macro}{\mdseries}
% \begin{macrocode}
-\renewcommand*{\mdseries}{\renewcommand*{\LWR at f@series}{md}}
+\renewrobustcmd*{\mdseries}{\renewcommand*{\LWR at f@series}{md}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\bfseries}
% \begin{macrocode}
-\renewcommand*{\bfseries}{\renewcommand*{\LWR at f@series}{bf}}
+\renewrobustcmd*{\bfseries}{\renewcommand*{\LWR at f@series}{bf}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\rmfamily}
% \begin{macrocode}
-\renewcommand*{\rmfamily}{\renewcommand*{\LWR at f@family}{rm}}
+\renewrobustcmd*{\rmfamily}{\renewcommand*{\LWR at f@family}{rm}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\sffamily}
% \begin{macrocode}
-\renewcommand*{\sffamily}{\renewcommand*{\LWR at f@family}{sf}}
+\renewrobustcmd*{\sffamily}{\renewcommand*{\LWR at f@family}{sf}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ttfamily}
% \begin{macrocode}
-\renewcommand*{\ttfamily}{\renewcommand*{\LWR at f@family}{tt}}
+\renewrobustcmd*{\ttfamily}{\renewcommand*{\LWR at f@family}{tt}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\upshape}
% \begin{macrocode}
-\renewcommand*{\upshape}{\renewcommand*{\LWR at f@shape}{up}}
+\renewrobustcmd*{\upshape}{\renewcommand*{\LWR at f@shape}{up}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\itshape}
% \begin{macrocode}
-\renewcommand*{\itshape}{\renewcommand*{\LWR at f@shape}{it}}
+\renewrobustcmd*{\itshape}{\renewcommand*{\LWR at f@shape}{it}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\scshape}
% \begin{macrocode}
-\renewcommand*{\scshape}{\renewcommand*{\LWR at f@shape}{sc}}
+\renewrobustcmd*{\scshape}{\renewcommand*{\LWR at f@shape}{sc}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\normalfont}
% \begin{macrocode}
-\renewcommand*{\normalfont}{\rmfamily\mdseries\upshape}
+\renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape}
% \end{macrocode}
% \end{macro}
@@ -25433,8 +25948,9 @@
% \begin{macro}{\textsuperscript} \marg{text}
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
-\renewcommand{\textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
+\renewrobustcmd{\textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
% \end{macrocode}
% \end{macro}
@@ -25446,9 +25962,10 @@
% \end{macro}
% \begin{macro}{\textsubscript} \marg{text}
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
\AtBeginDocument{
-\renewcommand{\textsubscript}[1]{\LWR at htmlspan{sub}{#1}}
+\renewrobustcmd{\textsubscript}[1]{\LWR at htmlspan{sub}{#1}}
}
% \end{macrocode}
% \end{macro}
@@ -25499,7 +26016,19 @@
% \end{macro}
+% \begin{macro}{\LWR at overline} \marg{text}
+% \changes{v0.50}{2018/02/21}{Added.}
% \begin{macrocode}
+\newcommand{\LWR at overline}[1]{%
+\LWR at HTMLtextstyle%
+ {text-decoration:overline;text-decoration-skip}%
+ {overline}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
@@ -25531,16 +26060,16 @@
% \end{macrocode}
% Direct-formatting font sizes are ignored:
% \begin{macrocode}
-\renewcommand*{\normalsize}{}
-\renewcommand*{\small}{}
-\renewcommand*{\footnotesize}{}
-\renewcommand*{\scriptsize}{}
-\renewcommand*{\tiny}{}
-\renewcommand*{\large}{}
-\renewcommand*{\Large}{}
-\renewcommand*{\LARGE}{}
-\renewcommand*{\huge}{}
-\renewcommand*{\Huge}{}
+\renewrobustcmd*{\normalsize}{}
+\renewrobustcmd*{\small}{}
+\renewrobustcmd*{\footnotesize}{}
+\renewrobustcmd*{\scriptsize}{}
+\renewrobustcmd*{\tiny}{}
+\renewrobustcmd*{\large}{}
+\renewrobustcmd*{\Large}{}
+\renewrobustcmd*{\LARGE}{}
+\renewrobustcmd*{\huge}{}
+\renewrobustcmd*{\Huge}{}
% \end{macrocode}
%
% \changes{v0.49}{2018/02/18}{Fix: Adapt to classes.}
@@ -25589,9 +26118,10 @@
% \begin{macro}{\newline}
% Uses the \HTML\ \element{br /} element.
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
-\newcommand*{\LWR at newlinebr}{\unskip\LWR at htmltag{br /}\LWR at orignewline}%
-\let\newline\LWR at newlinebr
+\newrobustcmd*{\LWR at newlinebr}{\unskip\LWR at htmltag{br /}\LWR at orignewline}%
+\LetLtxMacro\newline\LWR at newlinebr
% \end{macrocode}
% \end{macro}
@@ -25747,7 +26277,7 @@
% \begin{macrocode}
{%
\LWR at htmltagc{%
- span style="width:\LWR at printlength{\LWR at tempwidth}; %
+ span style="width:\LWR at printlength{\LWR at tempwidth}; % extra space
display:inline-block"%
}%
% \end{macrocode}
@@ -25807,8 +26337,9 @@
%
%
% \begin{macro}{\vspace} * \marg{length} Nullified.
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
-\let\vspace\LWR at vspace
+\LetLtxMacro\vspace\LWR at vspace
% \end{macrocode}
% \end{macro}
@@ -25985,11 +26516,13 @@
%
%
% \begin{macro}{\rule} \oarg{raise} \marg{width} \marg{height}
-% \changes{v0.19}{2016/06/01}{Added}
%
% Handles special minipage \& horizontal space interactions.
+%
+% \changes{v0.19}{2016/06/01}{Added}
+% \changes{v0.50}{2018/02/20}{Robustify macros.}
% \begin{macrocode}
-\renewcommand{\rule}{\LWR at rule}
+\renewrobustcmd{\rule}{\LWR at rule}
% \end{macrocode}
% \end{macro}
@@ -26280,7 +26813,7 @@
%
% \begin{itemize}
% \item \TeX\ is a trademark of American Mathematical Society.
-% \item \brand{Adobe}® and \brand{Adobe Framemaker}® are either registered trademarks or
+% \item \brand{Adobe}® and \brand{Adobe} \prog{Framemaker}® are either registered trademarks or
% trademarks of \brand{Adobe Systems Incorporated} in the United States and/or other countries.
% \item \brand{Linux}® is the registered trademark of Linus Torvalds in the U.S.\ and other countries.
% \item \brand{Mac\,OS}® is a trademark of \brand{Apple Inc.}
@@ -27510,9 +28043,42 @@
%
%
%
+% \iffalse
+%<*axodraw2>
+% \fi
%
+% \part{lwarp-axodraw2.sty}
+
+% \section{axodraw2}
%
+% \credits{John C. Collins, J.A.M. Vermaseren}
+%
+% \DescribePackage{axodraw2}
+% \pkg{axodraw2} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.50}{2018/02/22}{\pkg{axodraw2}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{axodraw2}
+% \end{macrocode}
+
+% \begin{macrocode}
+\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[axopicture]}
+
+\AfterEndEnvironment{axopicture}{\end{lateximage}}
+% \end{macrocode}
+
% \iffalse
+%</axodraw2>
+% \fi
+%
+%
+%
+%
+%
+% \iffalse
%<*backref>
% \fi
%
@@ -27538,7 +28104,7 @@
\LWR at ProvidesPackagePass{backref}
% \end{macrocode}
-% Force the |hyperref| option:
+% Force the \optn{hyperref} option:
% \begin{macrocode}
\def\backref{}\let\backrefxxx\hyper at section@backref
% \end{macrocode}
@@ -27928,6 +28494,39 @@
%
%
% \iffalse
+%<*bytefield>
+% \fi
+%
+% \part{lwarp-bytefield.sty}
+
+% \section{bytefield}
+%
+% \credits{Scott Pakin}
+%
+% \DescribePackage{bytefield}
+% \pkg{bytefield} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.50}{2018/02/22}{\pkg{bytefield}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{bytefield}
+% \end{macrocode}
+
+% \begin{macrocode}
+\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[bytefield]}
+
+\AfterEndEnvironment{bytefield}{\end{lateximage}}
+% \end{macrocode}
+
+% \iffalse
+%</bytefield>
+% \fi
+%
+%
+%
+% \iffalse
%<*cancel>
% \fi
%
@@ -27943,6 +28542,7 @@
% \codehtml
%
% \begin{macrocode}
+\LWR at origRequirePackage{lwarp-xcolor}% for \convertcolorspec
\LWR at ProvidesPackagePass{cancel}
% \end{macrocode}
%
@@ -28783,6 +29383,32 @@
%
%
% \iffalse
+%<*dblfloatfix>
+% \fi
+%
+% \part{lwarp-dblfloatfix.sty}
+%
+% \section{dblfloatfix}
+%
+% \DescribePackage{dblfloatfix}
+% \pkg{dblfloatfix} is ignored.
+%
+% \changes{v0.50}{2018/02/20}{\pkg{dblfloatfix}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{dblfloatfix}
+% \end{macrocode}
+%
+% \iffalse
+%</dblfloatfix>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*dblfnote>
% \fi
%
@@ -28848,6 +29474,121 @@
%
%
% \iffalse
+%<*diagbox>
+% \fi
+%
+% \part{lwarp-diagbox.sty}
+
+% \section{diagbox}
+%
+% \credits{Leo Liu}
+%
+% \DescribePackage{diagbox}
+% \pkg{diagbox} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.50}{2018/02/21}{\pkg{diagbox}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{diagbox}
+% \end{macrocode}
+%
+% To restore print-mode inside a \env{lateximage}:
+% \begin{macrocode}
+\LetLtxMacro\LWR at origdiagbox@double\diagbox at double
+\LetLtxMacro\LWR at origdiagbox@triple\diagbox at triple
+
+\appto\LWR at restoreorigformatting{
+\LetLtxMacro\diagbox at double\LWR at origdiagbox@double
+\LetLtxMacro\diagbox at triple\LWR at origdiagbox@triple
+}
+% \end{macrocode}
+
+% \begin{noindmacro}{\LWR at diagbox@AB} \marg{E/W} \marg{A} \marg{E/W} \marg{B}
+% \begin{macrocode}
+\newcommand{\LWR at diagbox@AB}[4]{
+\begingroup%
+\LetLtxMacro\\\newline%
+\BlockClassSingle{diagbox#1}{#2}%
+\BlockClassSingle{diagbox#3}{#4}%
+\endgroup%
+\LWR at stoppars%
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\LWR at diagboxNW} \marg{A} \marg{B}
+% \begin{macrocode}
+\newcommand{\LWR at diagboxNW}[2]{%
+\LWR at diagbox@AB{E}{#2}{W}{#1}%
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+% Likewise for NE, SW, SE:
+% \begin{macrocode}
+\newcommand{\LWR at diagboxNE}[2]{%
+\LWR at diagbox@AB{W}{#1}{E}{#2}%
+}
+
+\let\LWR at diagboxSW\LWR at diagboxNE
+\let\LWR at diagboxSE\LWR at diagboxNW
+% \end{macrocode}
+
+% \begin{noindmacro}{\diagbox at double} \marg{keys} \marg{A} \marg{B}
+% \begin{macrocode}
+\def\diagbox at double#1#2#3{%
+\setkeys{diagbox}{dir=NW,#1}%
+\csuse{LWR at diagbox\diagbox at dir}{#2}{#3}%
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\LWR at diagboxTNW} \marg{title} \marg{A} \marg{B}
+% \begin{macrocode}
+\newcommand{\LWR at diagboxTNW}[3]{%
+\BlockClassSingle{diagboxtitleN}{#1}
+\LWR at diagboxNW{#2}{#3}
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+% Likewise for NE, SW, SE:
+% \begin{macrocode}
+\newcommand{\LWR at diagboxTNE}[3]{%
+\BlockClassSingle{diagboxtitleN}{#1}
+\LWR at diagboxNE{#2}{#3}
+}
+
+\newcommand{\LWR at diagboxTSW}[3]{%
+\LWR at diagboxSW{#2}{#3}
+\BlockClassSingle{diagboxtitleS}{#1}
+}
+
+\newcommand{\LWR at diagboxTSE}[3]{%
+\LWR at diagboxSE{#2}{#3}
+\BlockClassSingle{diagboxtitleS}{#1}
+}
+% \end{macrocode}
+%
+% \begin{noindmacro}{\diagbox at triple} \marg{keys} \marg{A} \marg{T} \marg{B}
+% \begin{macrocode}
+\def\diagbox at triple#1#2#3#4{%
+\setkeys{diagbox}{dir=NW,#1}%
+\csuse{LWR at diagboxT\diagbox at dir}{#3}{#2}{#4}%
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
+% \iffalse
+%</diagbox>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*draftwatermark>
% \fi
@@ -29384,9 +30125,43 @@
%
%
%
+% \iffalse
+%<*epstopdf>
+% \fi
%
+% \part{lwarp-epstopdf.sty}
%
+% \section{epstopdf}
+%
+% \DescribePackage{epstopdf}
+% \pkg{epstopdf} is ignored.
+%
+% Filenames should be used without a suffix so that
+% \SVG, \PNG, or \JPG\ versions of the file will be used for \HTML\ output.
+%
+% \changes{v0.50}{2018/02/21}{\pkg{epstopdf}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{epstopdf}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\epstopdfsetup}[1]{}
+\newcommand*{\epstopdfcall}[1]{}
+\newcommand*{\epstopdfDeclareGraphicsRule}[4]{}
+% \end{macrocode}
+%
% \iffalse
+%</epstopdf>
+% \fi
+%
+%
+%
+%
+%
+% \iffalse
%<*eso-pic>
% \fi
%
@@ -29834,9 +30609,9 @@
\LWR at ProvidesPackagePass{fancyref}
% \end{macrocode}
%
-% To remove the |margin| option, if \cs{fancyrefhook} is anything
-% other than the |paren| option, then force it to the default instead.
-% (Comparing to the |margin| option was not possible since \pkg{lwarp} has
+% To remove the \optn{margin} option, if \cs{fancyrefhook} is anything
+% other than the \optn{paren} option, then force it to the default instead.
+% (Comparing to the \optn{margin} option was not possible since \pkg{lwarp} has
% revised the meaning of \cs{mbox} so the comparison failed.)
% \begin{macrocode}
\newcommand*{\LWRfref at parenfancyrefhook}[1]{(#1)}
@@ -29908,6 +30683,7 @@
% \codehtml
% \begin{macrocode}
\RequirePackage{xcolor}% for \convertcolorspec
+
\LWR at ProvidesPackagePass{fancyvrb}
% \end{macrocode}
%
@@ -30332,7 +31108,7 @@
% \end{macrocode}
%
% Restore \pkg{lwarp}'s version of \cs{@wrindex},
-% ignoring the \pkg{fixme} package's |target| option:
+% ignoring the \pkg{fixme} package's \optn{target} option:
% \begin{macrocode}
\let\@wrindex\LWR at wrindex
% \end{macrocode}
@@ -30598,7 +31374,7 @@
\setlength{\LWR at templengthone}{#3}%
\LWR at BlockClassWP{%
float:right; %
- width:\LWR at printlength{\LWR at templengthone}; %
+ width:\LWR at printlength{\LWR at templengthone}; % extra space
margin:10pt%
}{%
width:\LWR at printlength{\LWR at templengthone}%
@@ -31925,7 +32701,7 @@
% Used to store the user's selected dimensions and \HTML\ class.
%
-% The class defaults to ``inlineimage'' unless changed by a |class=xyx| option.
+% The class defaults to ``inlineimage'' unless changed by a \optn{class=xyx} option.
% \begin{macrocode}
\newlength{\LWR at igwidth}
\newlength{\LWR at igheight}
@@ -31980,7 +32756,7 @@
% Default to use the converted fixed length given:
% \begin{macrocode}
\renewcommand*{\LWR at igheightstyle}{%
- height:\LWR at printlength{\LWR at igheight} %
+ height:\LWR at printlength{\LWR at igheight} % extra space
}%
% \end{macrocode}
% If ex or em dimensions were given, use those instead:
@@ -32095,24 +32871,32 @@
\boolfalse{LWR at infloatrow}
% \end{macrocode}
+% \begin{macro}{\LWR at opacity} For \HTML, used only for \cs{includegraphics}.
+%
% \cs{LWR at opacity} may be set by the \pkg{transparent} package.
-% For \HTML\ it is only used for \cs{includegraphics}.
% \begin{macrocode}
\def\LWR at opacity{1}
% \end{macrocode}
+% \end{macro}
-% Used to determine the actual image size if needed:
+% \begin{macro}{\LWR at imagesizebox}
+% Used to determine the actual image size if needed.
% \begin{macrocode}
\newsavebox{\LWR at imagesizebox}
% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Gin at setfile} Sets the parsed filename.
% \begin{macrocode}
\let\LWR at origGin@setfile\Gin at setfile
% \end{macrocode}
+% \end{macro}
+% \DescribeKey[Gin]{class} \CSS\ class for the image.
+%
% Define the new class key for the print-mode version of \cs{includegraphics},
% which is enabled inside a \env{lateximage}.
% \changes{v0.42}{2017/10/24}{\pkg{includegraphics}: Fix: Class key.}
@@ -32286,15 +33070,15 @@
{\LWR at origtilde{} transform-origin: \LWR at originnames{\LWR at igorigin}; \LWR at orignewline}{}%
\ifthenelse{\NOT\equal{\LWR at igangle}{}}%
{%
-\LWR at rotstyle{-ms-}{\LWR at igangle} %
-\LWR at rotstyle{-webkit-}{\LWR at igangle} %
+\LWR at rotstyle{-ms-}{\LWR at igangle} % extra space
+\LWR at rotstyle{-webkit-}{\LWR at igangle} % extra space
\LWR at rotstyle{}{\LWR at igangle %
}}{}%
\ifthenelse{\NOT\equal{\LWR at igxscale}{1}\OR%
\NOT\equal{\LWR at igyscale}{1}}%
-{\LWR at scalestyle{-ms-}{\LWR at igxscale}{\LWR at igyscale} %
-\LWR at scalestyle{-webkit-}{\LWR at igxscale}{\LWR at igyscale} %
-\LWR at scalestyle{}{\LWR at igxscale}{\LWR at igyscale}}{} %
+{\LWR at scalestyle{-ms-}{\LWR at igxscale}{\LWR at igyscale} % extra space
+\LWR at scalestyle{-webkit-}{\LWR at igxscale}{\LWR at igyscale} % extra space
+\LWR at scalestyle{}{\LWR at igxscale}{\LWR at igyscale}}{} % extra space
%
\ifthenelse{\NOT\equal{\LWR at opacity}{1}}%
{opacity:\LWR at opacity; }%
@@ -32321,10 +33105,8 @@
% Handles width and height, converted to fixed width and heights.
-% Converts any |.pdf| references to |.svg| for \HTML\
+% The user should always use no file suffix in the document source.
-% The user should always refer to |.pdf| in the document source.
-
% \begin{macrocode}
\AtBeginDocument{
@@ -32427,9 +33209,9 @@
% \end{macrocode}
% Print the rotation information:
% \begin{macrocode}
-\LWR at rotstyle{-ms-}{#2} %
-\LWR at rotstyle{-webkit-}{#2} %
-\LWR at rotstyle{}{#2} %
+\LWR at rotstyle{-ms-}{#2} % extra space
+\LWR at rotstyle{-webkit-}{#2} % extra space
+\LWR at rotstyle{}{#2} % extra space
"}\LWR at orignewline%
% \end{macrocode}
% Print the text to be rotated:
@@ -32459,9 +33241,9 @@
% \end{macrocode}
% Print the scaling information:
% \begin{macrocode}
-\LWR at scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
-\LWR at scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
-\LWR at scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
+\LWR at scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
+\LWR at scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
+\LWR at scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
"}%
% \end{macrocode}
% Print the text to be scaled:
@@ -32623,9 +33405,15 @@
\renewcommand*{\LWR at printcloselist}{\LWR at printcloseitemize}%
\renewcommand*{\LWR at printopenlist}{%
\LWR at findhangingleftmargin%
- ul style="\LWR at origmbox{list-style-type:none;} %
- \LWR at origmbox{margin-left:\LWR at printlength{\LWR at templengthone}} ; %
- \LWR at origmbox{text-indent:-\LWR at printlength{\hangingindent}}"%
+ ul style="%
+ \LWR at origmbox{list-style-type:none;} % extra space
+ \LWR at origmbox{%
+ margin-left:\LWR at printlength{\LWR at templengthone}%
+ } ; % extra space
+ \LWR at origmbox{%
+ text-indent:-\LWR at printlength{\hangingindent}%
+ }%
+ "%
}%
\let\item\LWR at itemizeitem%
\list{}{}%
@@ -33588,7 +34376,7 @@
\LWR at ensuredoingapar%
\setlength{\LWR at templengthone}{#1}%
\begin{LWR at BlockClassWP}{%
- float:right; width:\LWR at printlength{\LWR at templengthone}; %
+ float:right; width:\LWR at printlength{\LWR at templengthone}; % extra space
margin:10pt%
}%
{%
@@ -33743,7 +34531,7 @@
% \cs{lettrine} \oarg{keys} \marg{letter} \marg{additional text}
% \begin{macrocode}
\DeclareDocumentCommand{\lettrine}{o m m}{%
-\InlineClass{lettrine}{#2}\InlineClass{lettrinetext}{#3} %
+\InlineClass{lettrine}{#2}\InlineClass{lettrinetext}{#3} % extra space
}
\newcounter{DefaultLines}
@@ -34006,6 +34794,11 @@
% ^^A \hspace*{3em}how-to-pass-an-optional-argument-to-\\
% ^^A \hspace*{3em}an-environment-with-verbatim-content}}
%
+% Force flexible columns:
+% \changes{v0.50}{2018/03/02}{\pkg{listings}: Force flexible columns.}
+% \begin{macrocode}
+\lst at column@flexible
+% \end{macrocode}
%
%
% Patches to embed listings inside |pre| tags:
@@ -34764,6 +35557,7 @@
% \codehtml
% \begin{macrocode}
\RequirePackage{xcolor}% for \convertcolorspec
+
\LWR at ProvidesPackageDrop{mdframed}
% \end{macrocode}
%
@@ -35534,8 +36328,33 @@
%
%
%
+% \iffalse
+%<*morefloats>
+% \fi
%
+% \part{lwarp-morefloats.sty}
+%
+% \section{morefloats}
+%
+% \DescribePackage{morefloats}
+% \pkg{morefloats} is ignored.
+%
+% \changes{v0.50}{2018/02/22}{\pkg{morefloats}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{morefloats}
+% \end{macrocode}
+%
% \iffalse
+%</morefloats>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*moreverb>
% \fi
%
@@ -36240,6 +37059,40 @@
%
%
% \iffalse
+%<*nonfloat>
+% \fi
+%
+% \part{lwarp-nonfloat.sty}
+%
+% \section{nonfloat}
+%
+% \credits{Kai Rascher}
+%
+% \DescribePackage{nonfloat}
+% \pkg{nonfloat} is emulated.
+%
+% \changes{v0.50}{2018/02/21}{\pkg{nonfloat}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{nonfloat}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\LetLtxMacro\topcaption\caption
+\newcommand{\figcaption}{\def\@captype{figure}\caption}
+\newcommand{\tabcaption}{\def\@captype{table}\topcaption}
+\newenvironment{narrow}[2]{}{}
+% \end{macrocode}
+%
+% \iffalse
+%</nonfloat>
+% \fi
+%
+%
+%
+% \iffalse
%<*nonumonpart>
% \fi
%
@@ -36422,7 +37275,6 @@
\DeclareOption{amsmath}{}
\DeclareOption{hyperref}{}
-
\LWR at ProvidesPackagePass{ntheorem}
% \end{macrocode}
%
@@ -36744,6 +37596,11 @@
% The following standard configuration is renewed using the new \CSS:
% \begin{macrocode}
\ifbool{LWR at ntheoremamsthm}{}{%
+% \end{macrocode}
+% \changes{v0.50}{2018/03/01}{\pkg{ntheorem}: Fix: Not \optn{standard} nor \optn{amsthm} selected.}
+% \begin{macrocode}
+\ifx\thm at usestd\@undefined
+\else
\theoremnumbering{arabic}
\theoremstyle{plain}
\RequirePackage{latexsym}
@@ -36789,6 +37646,7 @@
\qedsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
\theoremsymbol{}
+\fi
}% not amsthm
% \end{macrocode}
%
@@ -36795,7 +37653,7 @@
%
% \subsection{\pkg{amsthm} option}
%
-% Only if the |amsthm| option was given:
+% Only if the \optn{amsthm} option was given:
% \begin{macrocode}
\ifbool{LWR at ntheoremamsthm}{
@@ -37224,9 +38082,51 @@
%
%
%
+% \iffalse
+%<*pbox>
+% \fi
%
+% \part{lwarp-pbox.sty}
%
+% \section{pbox}
+%
+% \credits{Simon Law}
+%
+% \DescribePackage{pbox}
+% \pkg{pbox} is emulated.
+%
+% \changes{v0.50}{2018/02/21}{\pkg{pbox}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{pbox}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\pbox}{O{t} o O{t} m +m}{%
+\booltrue{LWR at minipagefullwidth}%
+\parbox[#1][#2][#3]{#4}{#5}%
+}
+
+\newcommand{\settominwidth}[3][\columnwidth]{%
+\settowidth{#2}{#3}%
+}
+
+\newcommand{\widthofpbox}[1]{%
+\widthof{#1}%
+}
+% \end{macrocode}
+%
% \iffalse
+%</pbox>
+% \fi
+%
+%
+%
+%
+%
+% \iffalse
%<*pdflscape>
% \fi
%
@@ -37349,9 +38249,50 @@
%
%
%
+% \iffalse
+%<*phfqit>
+% \fi
%
+% \part{lwarp-phfqit.sty}
+
+% \section{phfqit}
%
+% \credits{Philippe Faist}
+%
+% \DescribePackage{phfqit}
+% \pkg{phfqit} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.50}{2018/02/22}{\pkg{phfqit}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{phfqit}
+% \end{macrocode}
+
+% \begin{macrocode}
+\LetLtxMacro\LWR at origbitstring\bitstring
+
+\renewcommand\bitstring[1]{%
+\InlineClass[%
+ text-decoration: overline underline ;
+]{bitstring}{#1}%
+% \phfqit at bitstring{#1}%
+}
+
+\appto{\LWR at restoreorigformatting}{
+\LetLtxMacro\bitstring\LWR at origbitstring
+}
+% \end{macrocode}
+
% \iffalse
+%</phfqit>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*placeins>
% \fi
%
@@ -38039,6 +38980,52 @@
%
%
% \iffalse
+%<*schemata>
+% \fi
+%
+% \part{lwarp-schemata.sty}
+
+% \section{schemata}
+%
+% \credits{Charles P. Schaum}
+%
+% \DescribePackage{schemata}
+% \pkg{schemata} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.50}{2018/02/23}{\pkg{schemata}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{schemata}
+% \end{macrocode}
+
+% \begin{macrocode}
+\LetLtxMacro\LWR at schemata@origschema\schema
+\LetLtxMacro\LWR at schemata@origSchema\Schema
+
+\renewcommand{\schema}[3][open]{%
+\begin{lateximage}%
+\LWR at orignormalsize
+\LWR at schemata@origschema[#1]{#2}{#3}%
+\end{lateximage}%
+}
+
+\renewcommand{\Schema}[5][open]{%
+\begin{lateximage}%
+\LWR at orignormalsize
+\LWR at schemata@origSchema[#1]{#2}{#3}{#4}{#5}%
+\end{lateximage}%
+}
+% \end{macrocode}
+
+% \iffalse
+%</schemata>
+% \fi
+%
+%
+%
+% \iffalse
%<*scrextend>
% \fi
%
@@ -38955,13 +39942,17 @@
% \changes{v0.36}{2017/08/17}{\pkg{siunitx}: Improved symbol support.}
% \changes{v0.37}{2017/08/17}{\pkg{siunitx}: Improved symbol support.}
% \changes{v0.38}{2017/08/26}{\pkg{siunitx}: Removed from \pkg{lwarp} core.}
+% \changes{v0.50}{2018/10/23}{\pkg{siunitx}: Fix: Loads \pkg{xcolor}.}
%
% \codehtml
%
% \begin{macrocode}
+\RequirePackage{xcolor}% for \convertcolorspec
+
\LWR at ProvidesPackagePass{siunitx}
% \end{macrocode}
+% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved units.}
% \begin{macrocode}
\AtBeginDocument{% in case textcomp was not loaded
\DeclareSIUnit\bohr{\textit{a}\textsubscript{0}}
@@ -38969,6 +39960,7 @@
\DeclareSIUnit\elementarycharge{\textit{e}}
\DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
+\DeclareSIUnit\planckbar{\LWR at siunitx@textplanckbar}
}% AtBeginDocument
% \end{macrocode}
%
@@ -39054,11 +40046,14 @@
{
\__siunitx_unit_output_pre_print:
% \end{macrocode}
-% For |parse-numbers=false|, since \cs{ensuredmath} was restored to its original:
+% For |parse-numbers=false|:
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Improved \SVG\ math.}
+% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved \SVG\ math \attribute{alt} tags.}
% \begin{macrocode}
% \__siunitx_print:nn { number } { \ensuremath {#1} }
- \LWR at subsingledollar{\__siunitx_print:nn { number } { #1 }}% lwarp
+ \LWR at subsingledollar{% lwarp
+ \textbackslash( \LWR at HTMLsanitize{#1} \textbackslash)% lwarp
+ }{\__siunitx_print:nn { number } { #1 }}% lwarp
% \end{macrocode}
% \begin{macrocode}
\__siunitx_unit_output_print:
@@ -39081,7 +40076,6 @@
\l__siunitx_number_denominator_tl
\__siunitx_number_output_single_aux:
}
-%
% \end{macrocode}
% For units, the fraction code is replaced by the symbol code:
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Changes fraction to symbol.}
@@ -39101,9 +40095,48 @@
\tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_per_symbol_tl
\tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_unit_denominator_tl
}
-
-
-
+% \end{macrocode}
+% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved units.}
+% \begin{macrocode}
+\cs_undefine:N \__siunitx_angle_print_astronomy_aux:
+\cs_new_protected:Npn \__siunitx_angle_print_astronomy_aux: {
+ \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-integer }
+ \l__siunitx_tmpa_tl
+ { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl }
+ \ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}% lwarp
+ {% lateximage
+ \hbox_set:Nn \l__siunitx_angle_marker_box
+ {
+ \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } }
+ }
+ \hbox_set:Nn \l__siunitx_angle_unit_box
+ {
+ \__siunitx_print:nV { unit } \l__siunitx_unit_tl
+ \skip_horizontal:n { -\scriptspace }
+ }
+ \__siunitx_angle_print_astronomy_aux:n { marker }
+ \__siunitx_angle_print_astronomy_aux:n { unit }
+ \hbox_set:Nn \l__siunitx_angle_marker_box
+ {
+ \box_use:N \l__siunitx_angle_marker_box
+ \box_use:N \l__siunitx_angle_unit_box
+ }
+ \dim_compare:nNnTF
+ { \l__siunitx_angle_marker_dim } > { \l__siunitx_angle_unit_dim }
+ { \__siunitx_angle_print_astronomy_marker: }
+ { \__siunitx_angle_print_astronomy_unit: }
+ }% lateximage
+ {% not a lateximage
+ \__siunitx_print:nV { unit } \l__siunitx_unit_tl
+ \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } }
+ }% not a lateximage
+ \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-decimal }
+ \l__siunitx_tmpa_tl
+ { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl }
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
\RenewDocumentCommand \num { o m } {
\leavevmode
\group_begin:% lwarp
@@ -40803,7 +41836,7 @@
\begin{lateximage}%
\ifbool{LWR at tikzbabel}% Test for Tikz version v3.0.0
{}%
-{\catcode`\$=3} % dollar sign is math shift
+{\catcode`\$=3}% dollar sign is math shift
}
\AfterEndEnvironment{tikzpicture}{%
@@ -43056,7 +44089,7 @@
%
% \changes{v0.49}{2018/02/16}{\pkg{vwcol}: Added.}
%
-% The |width| option is ignored.
+% The \optn{width} option is ignored.
% All \env{vwcol} environments adjust to 1--3 equal-width columns, depening on the
% width of the browser window.
%
@@ -44395,7 +45428,70 @@
%
%
%
+%
+%
% \iffalse
+%<*xy>
+% \fi
+%
+% \part{lwarp-xy.sty}
+
+% \section{xy}
+%
+% \credits{Kristoffer H. Rose, Ross Moore}
+%
+% \DescribePackage{xy}
+% \pkg{xy} is patched for use by \pkg{lwarp}.
+%
+% \cs{xypolygon} must be used inside the \env{xy} environment, \watchout
+% or inside \cs{xy} \dots \cs{endxy}.
+%
+% \changes{v0.50}{2018/02/21}{\pkg{xy}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{xy}
+% \end{macrocode}
+
+% \begin{macrocode}
+\AtBeginDocument{
+
+\preto{\xy}{\begin{lateximage}[xy image]}
+\appto{\endxy}{\end{lateximage}}
+
+\@ifundefined{xymatrix}{}{
+\LetLtxMacro\LWR at origxymatrix\xymatrix
+
+\renewcommand{\xymatrix}[1]{%
+\begin{lateximage}[xymatrix]
+\LWR at origxymatrix{#1}
+\end{lateximage}
+}
+}
+
+\@ifundefined{xygraph}{}{
+\LetLtxMacro\LWR at origxygraph\xygraph
+
+\renewcommand{\xygraph}[1]{%
+\begin{lateximage}[xygraph]
+\LWR at origxygraph{#1}
+\end{lateximage}
+}
+}
+
+}
+% \end{macrocode}
+
+% \iffalse
+%</xy>
+% \fi
+%
+%
+%
+%
+%
+% \iffalse
%<*zwpagelayout>
% \fi
%
Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins 2018-03-03 21:54:38 UTC (rev 46804)
@@ -52,6 +52,7 @@
\file{lwarp-array.sty}{\from{lwarp.dtx}{array}}
\file{lwarp-atbegshi.sty}{\from{lwarp.dtx}{atbegshi}}
\file{lwarp-authblk.sty}{\from{lwarp.dtx}{authblk}}
+\file{lwarp-axodraw2.sty}{\from{lwarp.dtx}{axodraw2}}
\file{lwarp-backref.sty}{\from{lwarp.dtx}{backref}}
\file{lwarp-balance.sty}{\from{lwarp.dtx}{balance}}
\file{lwarp-bigdelim.sty}{\from{lwarp.dtx}{bigdelim}}
@@ -62,6 +63,7 @@
\file{lwarp-boxedminipage.sty}{\from{lwarp.dtx}{boxedminipage}}
\file{lwarp-boxedminipage2e.sty}{\from{lwarp.dtx}{boxedminipage2e}}
\file{lwarp-breakurl.sty}{\from{lwarp.dtx}{breakurl}}
+\file{lwarp-bytefield.sty}{\from{lwarp.dtx}{bytefield}}
\file{lwarp-cancel.sty}{\from{lwarp.dtx}{cancel}}
\file{lwarp-caption.sty}{\from{lwarp.dtx}{caption}}
\file{lwarp-caption2.sty}{\from{lwarp.dtx}{caption2}}
@@ -78,8 +80,10 @@
\file{lwarp-crop.sty}{\from{lwarp.dtx}{crop}}
\file{lwarp-cuted.sty}{\from{lwarp.dtx}{cuted}}
\file{lwarp-cutwin.sty}{\from{lwarp.dtx}{cutwin}}
+\file{lwarp-dblfloatfix.sty}{\from{lwarp.dtx}{dblfloatfix}}
\file{lwarp-dblfnote.sty}{\from{lwarp.dtx}{dblfnote}}
\file{lwarp-dcolumn.sty}{\from{lwarp.dtx}{dcolumn}}
+\file{lwarp-diagbox.sty}{\from{lwarp.dtx}{diagbox}}
\file{lwarp-draftwatermark.sty}{\from{lwarp.dtx}{draftwatermark}}
\file{lwarp-easy-todo.sty}{\from{lwarp.dtx}{easy-todo}}
\file{lwarp-ebook.sty}{\from{lwarp.dtx}{ebook}}
@@ -91,6 +95,7 @@
\file{lwarp-enumerate.sty}{\from{lwarp.dtx}{enumerate}}
\file{lwarp-enumitem.sty}{\from{lwarp.dtx}{enumitem}}
\file{lwarp-epigraph.sty}{\from{lwarp.dtx}{epigraph}}
+\file{lwarp-epstopdf.sty}{\from{lwarp.dtx}{epstopdf}}
\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}}
@@ -166,6 +171,7 @@
\file{lwarp-microtype.sty}{\from{lwarp.dtx}{microtype}}
\file{lwarp-midfloat.sty}{\from{lwarp.dtx}{midfloat}}
\file{lwarp-midpage.sty}{\from{lwarp.dtx}{midpage}}
+\file{lwarp-morefloats.sty}{\from{lwarp.dtx}{morefloats}}
\file{lwarp-moreverb.sty}{\from{lwarp.dtx}{moreverb}}
\file{lwarp-morewrites.sty}{\from{lwarp.dtx}{morewrites}}
\file{lwarp-mparhack.sty}{\from{lwarp.dtx}{mparhack}}
@@ -178,6 +184,7 @@
\file{lwarp-newclude.sty}{\from{lwarp.dtx}{newclude}}
\file{lwarp-newunicodechar.sty}{\from{lwarp.dtx}{newunicodechar}}
\file{lwarp-nextpage.sty}{\from{lwarp.dtx}{nextpage}}
+\file{lwarp-nonfloat.sty}{\from{lwarp.dtx}{nonfloat}}
\file{lwarp-nonumonpart.sty}{\from{lwarp.dtx}{nonumonpart}}
\file{lwarp-nopageno.sty}{\from{lwarp.dtx}{nopageno}}
\file{lwarp-nowidow.sty}{\from{lwarp.dtx}{nowidow}}
@@ -188,10 +195,12 @@
\file{lwarp-pagesel.sty}{\from{lwarp.dtx}{pagesel}}
\file{lwarp-paralist.sty}{\from{lwarp.dtx}{paralist}}
\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}}
+\file{lwarp-pbox.sty}{\from{lwarp.dtx}{pbox}}
\file{lwarp-pdfrender.sty}{\from{lwarp.dtx}{pdfrender}}
\file{lwarp-pdflscape.sty}{\from{lwarp.dtx}{pdflscape}}
\file{lwarp-pdfsync.sty}{\from{lwarp.dtx}{pdfsync}}
\file{lwarp-pfnote.sty}{\from{lwarp.dtx}{pfnote}}
+\file{lwarp-phfqit.sty}{\from{lwarp.dtx}{phfqit}}
\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}}
\file{lwarp-prelim2e.sty}{\from{lwarp.dtx}{prelim2e}}
\file{lwarp-prettyref.sty}{\from{lwarp.dtx}{prettyref}}
@@ -207,6 +216,7 @@
\file{lwarp-rotfloat.sty}{\from{lwarp.dtx}{rotfloat}}
\file{lwarp-savetrees.sty}{\from{lwarp.dtx}{savetrees}}
\file{lwarp-scalefnt.sty}{\from{lwarp.dtx}{scalefnt}}
+\file{lwarp-schemata.sty}{\from{lwarp.dtx}{schemata}}
\file{lwarp-scrextend.sty}{\from{lwarp.dtx}{scrextend}}
\file{lwarp-scrhack.sty}{\from{lwarp.dtx}{scrhack}}
\file{lwarp-scrlayer.sty}{\from{lwarp.dtx}{scrlayer}}
@@ -271,6 +281,7 @@
\file{lwarp-xmpincl.sty}{\from{lwarp.dtx}{xmpincl}}
\file{lwarp-xtab.sty}{\from{lwarp.dtx}{xtab}}
\file{lwarp-xurl.sty}{\from{lwarp.dtx}{xurl}}
+\file{lwarp-xy.sty}{\from{lwarp.dtx}{xy}}
\file{lwarp-zwpagelayout.sty}{\from{lwarp.dtx}{zwpagelayout}}
\file{lwarp-patch-komascript.sty}{\from{lwarp.dtx}{patch-komascript}}
\file{lwarp-patch-memoir.sty}{\from{lwarp.dtx}{patch-memoir}}
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,27 @@
+%%
+%% This is file `lwarp-axodraw2.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `axodraw2')
+%% 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 at ProvidesPackagePass{axodraw2}
+
+\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[axopicture]}
+
+\AfterEndEnvironment{axopicture}{\end{lateximage}}
+
+\endinput
+%%
+%% End of file `lwarp-axodraw2.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,27 @@
+%%
+%% This is file `lwarp-bytefield.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `bytefield')
+%% 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 at ProvidesPackagePass{bytefield}
+
+\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[bytefield]}
+
+\AfterEndEnvironment{bytefield}{\end{lateximage}}
+
+\endinput
+%%
+%% End of file `lwarp-bytefield.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -15,6 +15,7 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
+\LWR at origRequirePackage{lwarp-xcolor}% for \convertcolorspec
\LWR at ProvidesPackagePass{cancel}
\LetLtxMacro\LWR at origcancel\cancel
\LetLtxMacro\LWR at origbcancel\bcancel
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,21 @@
+%%
+%% This is file `lwarp-dblfloatfix.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `dblfloatfix')
+%% 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 at ProvidesPackageDrop{dblfloatfix}
+\endinput
+%%
+%% End of file `lwarp-dblfloatfix.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-dblfloatfix.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,78 @@
+%%
+%% This is file `lwarp-diagbox.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `diagbox')
+%% 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 at ProvidesPackagePass{diagbox}
+\LetLtxMacro\LWR at origdiagbox@double\diagbox at double
+\LetLtxMacro\LWR at origdiagbox@triple\diagbox at triple
+
+\appto\LWR at restoreorigformatting{
+\LetLtxMacro\diagbox at double\LWR at origdiagbox@double
+\LetLtxMacro\diagbox at triple\LWR at origdiagbox@triple
+}
+
+\newcommand{\LWR at diagbox@AB}[4]{
+\begingroup%
+\LetLtxMacro\\\newline%
+\BlockClassSingle{diagbox#1}{#2}%
+\BlockClassSingle{diagbox#3}{#4}%
+\endgroup%
+\LWR at stoppars%
+}
+
+\newcommand{\LWR at diagboxNW}[2]{%
+\LWR at diagbox@AB{E}{#2}{W}{#1}%
+}
+
+\newcommand{\LWR at diagboxNE}[2]{%
+\LWR at diagbox@AB{W}{#1}{E}{#2}%
+}
+
+\let\LWR at diagboxSW\LWR at diagboxNE
+\let\LWR at diagboxSE\LWR at diagboxNW
+
+\def\diagbox at double#1#2#3{%
+\setkeys{diagbox}{dir=NW,#1}%
+\csuse{LWR at diagbox\diagbox at dir}{#2}{#3}%
+}
+
+\newcommand{\LWR at diagboxTNW}[3]{%
+\BlockClassSingle{diagboxtitleN}{#1}
+\LWR at diagboxNW{#2}{#3}
+}
+
+\newcommand{\LWR at diagboxTNE}[3]{%
+\BlockClassSingle{diagboxtitleN}{#1}
+\LWR at diagboxNE{#2}{#3}
+}
+
+\newcommand{\LWR at diagboxTSW}[3]{%
+\LWR at diagboxSW{#2}{#3}
+\BlockClassSingle{diagboxtitleS}{#1}
+}
+
+\newcommand{\LWR at diagboxTSE}[3]{%
+\LWR at diagboxSE{#2}{#3}
+\BlockClassSingle{diagboxtitleS}{#1}
+}
+\def\diagbox at triple#1#2#3#4{%
+\setkeys{diagbox}{dir=NW,#1}%
+\csuse{LWR at diagboxT\diagbox at dir}{#3}{#2}{#4}%
+}
+\endinput
+%%
+%% End of file `lwarp-diagbox.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,24 @@
+%%
+%% This is file `lwarp-epstopdf.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `epstopdf')
+%% 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 at ProvidesPackageDrop{epstopdf}
+\newcommand*{\epstopdfsetup}[1]{}
+\newcommand*{\epstopdfcall}[1]{}
+\newcommand*{\epstopdfDeclareGraphicsRule}[4]{}
+\endinput
+%%
+%% End of file `lwarp-epstopdf.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -16,6 +16,7 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\RequirePackage{xcolor}% for \convertcolorspec
+
\LWR at ProvidesPackagePass{fancyvrb}
\begin{warpHTML}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -21,7 +21,7 @@
\setlength{\LWR at templengthone}{#3}%
\LWR at BlockClassWP{%
float:right; %
- width:\LWR at printlength{\LWR at templengthone}; %
+ width:\LWR at printlength{\LWR at templengthone}; % extra space
margin:10pt%
}{%
width:\LWR at printlength{\LWR at templengthone}%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -64,7 +64,7 @@
\ifthenelse{\lengthtest{\LWR at igheight > 0pt}}%
{%
\renewcommand*{\LWR at igheightstyle}{%
- height:\LWR at printlength{\LWR at igheight} %
+ height:\LWR at printlength{\LWR at igheight} % extra space
}%
\IfEndWith{#1}{ex}%
{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes ex
@@ -234,15 +234,15 @@
{\LWR at origtilde{} transform-origin: \LWR at originnames{\LWR at igorigin}; \LWR at orignewline}{}%
\ifthenelse{\NOT\equal{\LWR at igangle}{}}%
{%
-\LWR at rotstyle{-ms-}{\LWR at igangle} %
-\LWR at rotstyle{-webkit-}{\LWR at igangle} %
+\LWR at rotstyle{-ms-}{\LWR at igangle} % extra space
+\LWR at rotstyle{-webkit-}{\LWR at igangle} % extra space
\LWR at rotstyle{}{\LWR at igangle %
}}{}%
\ifthenelse{\NOT\equal{\LWR at igxscale}{1}\OR%
\NOT\equal{\LWR at igyscale}{1}}%
-{\LWR at scalestyle{-ms-}{\LWR at igxscale}{\LWR at igyscale} %
-\LWR at scalestyle{-webkit-}{\LWR at igxscale}{\LWR at igyscale} %
-\LWR at scalestyle{}{\LWR at igxscale}{\LWR at igyscale}}{} %
+{\LWR at scalestyle{-ms-}{\LWR at igxscale}{\LWR at igyscale} % extra space
+\LWR at scalestyle{-webkit-}{\LWR at igxscale}{\LWR at igyscale} % extra space
+\LWR at scalestyle{}{\LWR at igxscale}{\LWR at igyscale}}{} % extra space
\ifthenelse{\NOT\equal{\LWR at opacity}{1}}%
{opacity:\LWR at opacity; }%
{}%
@@ -257,7 +257,6 @@
-
\AtBeginDocument{
\LWR at traceinfo{Patching includegraphics.}
@@ -302,9 +301,9 @@
\LWR at htmltagc{span style="display: inline-block; %
\ifthenelse{\NOT\equal{\LWR at rotboxorigin}{}}%
{transform-origin: \LWR at originnames{\LWR at rotboxorigin};\LWR at origtilde}{}%
-\LWR at rotstyle{-ms-}{#2} %
-\LWR at rotstyle{-webkit-}{#2} %
-\LWR at rotstyle{}{#2} %
+\LWR at rotstyle{-ms-}{#2} % extra space
+\LWR at rotstyle{-webkit-}{#2} % extra space
+\LWR at rotstyle{}{#2} % extra space
"}\LWR at orignewline%
\begin{LWR at nestspan}%
#3%
@@ -318,9 +317,9 @@
\AtBeginDocument{
\RenewDocumentCommand{\scalebox}{m o m}{%
\LWR at htmltagc{span style="display: inline-block; %
-\LWR at scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
-\LWR at scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
-\LWR at scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
+\LWR at scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
+\LWR at scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
+\LWR at scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} % extra space
"}%
\begin{LWR at nestspan}%
#3%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hang.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -42,9 +42,15 @@
\renewcommand*{\LWR at printcloselist}{\LWR at printcloseitemize}%
\renewcommand*{\LWR at printopenlist}{%
\LWR at findhangingleftmargin%
- ul style="\LWR at origmbox{list-style-type:none;} %
- \LWR at origmbox{margin-left:\LWR at printlength{\LWR at templengthone}} ; %
- \LWR at origmbox{text-indent:-\LWR at printlength{\hangingindent}}"%
+ ul style="%
+ \LWR at origmbox{list-style-type:none;} % extra space
+ \LWR at origmbox{%
+ margin-left:\LWR at printlength{\LWR at templengthone}%
+ } ; % extra space
+ \LWR at origmbox{%
+ text-indent:-\LWR at printlength{\hangingindent}%
+ }%
+ "%
}%
\let\item\LWR at itemizeitem%
\list{}{}%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -82,7 +82,7 @@
\LWR at ensuredoingapar%
\setlength{\LWR at templengthone}{#1}%
\begin{LWR at BlockClassWP}{%
- float:right; width:\LWR at printlength{\LWR at templengthone}; %
+ float:right; width:\LWR at printlength{\LWR at templengthone}; % extra space
margin:10pt%
}%
{%
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-lettrine.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR at ProvidesPackageDrop{lettrine}
\DeclareDocumentCommand{\lettrine}{o m m}{%
-\InlineClass{lettrine}{#2}\InlineClass{lettrinetext}{#3} %
+\InlineClass{lettrine}{#2}\InlineClass{lettrinetext}{#3} % extra space
}
\newcounter{DefaultLines}
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -20,6 +20,7 @@
\begin{warpHTML}
\LWR at ProvidesPackagePass{listings}
+\lst at column@flexible
\let\LWR at origlst@Init\lst at Init
\let\LWR at origlst@DeInit\lst at DeInit
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -18,6 +18,7 @@
\RequirePackage{xcolor}% for \convertcolorspec
+
\LWR at ProvidesPackageDrop{mdframed}
\LWR at origRequirePackage{amsthm}
\LWR at origRequirePackage[framemethod=none]{mdframed}
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,21 @@
+%%
+%% This is file `lwarp-morefloats.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `morefloats')
+%% 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 at ProvidesPackageDrop{morefloats}
+\endinput
+%%
+%% End of file `lwarp-morefloats.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-morefloats.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,25 @@
+%%
+%% This is file `lwarp-nonfloat.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `nonfloat')
+%% 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 at ProvidesPackageDrop{nonfloat}
+\LetLtxMacro\topcaption\caption
+\newcommand{\figcaption}{\def\@captype{figure}\caption}
+\newcommand{\tabcaption}{\def\@captype{table}\topcaption}
+\newenvironment{narrow}[2]{}{}
+\endinput
+%%
+%% End of file `lwarp-nonfloat.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nonfloat.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -281,6 +281,8 @@
\InlineClass{theoremheadersc}{##1\ (##3)\theorem at separator}]}
}% not amsthm
\ifbool{LWR at ntheoremamsthm}{}{%
+\ifx\thm at usestd\@undefined
+\else
\theoremnumbering{arabic}
\theoremstyle{plain}
\RequirePackage{latexsym}
@@ -326,6 +328,7 @@
\qedsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
\theoremsymbol{}
+\fi
}% not amsthm
\ifbool{LWR at ntheoremamsthm}{
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,33 @@
+%%
+%% This is file `lwarp-pbox.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `pbox')
+%% 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 at ProvidesPackageDrop{pbox}
+\NewDocumentCommand{\pbox}{O{t} o O{t} m +m}{%
+\booltrue{LWR at minipagefullwidth}%
+\parbox[#1][#2][#3]{#4}{#5}%
+}
+
+\newcommand{\settominwidth}[3][\columnwidth]{%
+\settowidth{#2}{#3}%
+}
+
+\newcommand{\widthofpbox}[1]{%
+\widthof{#1}%
+}
+\endinput
+%%
+%% End of file `lwarp-pbox.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pbox.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,35 @@
+%%
+%% This is file `lwarp-phfqit.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `phfqit')
+%% 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 at ProvidesPackagePass{phfqit}
+
+\LetLtxMacro\LWR at origbitstring\bitstring
+
+\renewcommand\bitstring[1]{%
+\InlineClass[%
+ text-decoration: overline underline ;
+]{bitstring}{#1}%
+}
+
+\appto{\LWR at restoreorigformatting}{
+\LetLtxMacro\bitstring\LWR at origbitstring
+}
+
+\endinput
+%%
+%% End of file `lwarp-phfqit.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,40 @@
+%%
+%% This is file `lwarp-schemata.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `schemata')
+%% 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 at ProvidesPackagePass{schemata}
+
+\LetLtxMacro\LWR at schemata@origschema\schema
+\LetLtxMacro\LWR at schemata@origSchema\Schema
+
+\renewcommand{\schema}[3][open]{%
+\begin{lateximage}%
+\LWR at orignormalsize
+\LWR at schemata@origschema[#1]{#2}{#3}%
+\end{lateximage}%
+}
+
+\renewcommand{\Schema}[5][open]{%
+\begin{lateximage}%
+\LWR at orignormalsize
+\LWR at schemata@origSchema[#1]{#2}{#3}{#4}{#5}%
+\end{lateximage}%
+}
+
+\endinput
+%%
+%% End of file `lwarp-schemata.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-schemata.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -16,6 +16,8 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
+\RequirePackage{xcolor}% for \convertcolorspec
+
\LWR at ProvidesPackagePass{siunitx}
\AtBeginDocument{% in case textcomp was not loaded
@@ -24,6 +26,7 @@
\DeclareSIUnit\elementarycharge{\textit{e}}
\DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
+\DeclareSIUnit\planckbar{\LWR at siunitx@textplanckbar}
}% AtBeginDocument
\ExplSyntaxOn
@@ -92,7 +95,9 @@
}
{
\__siunitx_unit_output_pre_print:
- \LWR at subsingledollar{\__siunitx_print:nn { number } { #1 }}% lwarp
+ \LWR at subsingledollar{% lwarp
+ \textbackslash( \LWR at HTMLsanitize{#1} \textbackslash)% lwarp
+ }{\__siunitx_print:nn { number } { #1 }}% lwarp
\__siunitx_unit_output_print:
}
\group_end:% lwarp
@@ -123,7 +128,42 @@
\tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_per_symbol_tl
\tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_unit_denominator_tl
}
-
+\cs_undefine:N \__siunitx_angle_print_astronomy_aux:
+\cs_new_protected:Npn \__siunitx_angle_print_astronomy_aux: {
+ \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-integer }
+ \l__siunitx_tmpa_tl
+ { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl }
+ \ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}% lwarp
+ {% lateximage
+ \hbox_set:Nn \l__siunitx_angle_marker_box
+ {
+ \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } }
+ }
+ \hbox_set:Nn \l__siunitx_angle_unit_box
+ {
+ \__siunitx_print:nV { unit } \l__siunitx_unit_tl
+ \skip_horizontal:n { -\scriptspace }
+ }
+ \__siunitx_angle_print_astronomy_aux:n { marker }
+ \__siunitx_angle_print_astronomy_aux:n { unit }
+ \hbox_set:Nn \l__siunitx_angle_marker_box
+ {
+ \box_use:N \l__siunitx_angle_marker_box
+ \box_use:N \l__siunitx_angle_unit_box
+ }
+ \dim_compare:nNnTF
+ { \l__siunitx_angle_marker_dim } > { \l__siunitx_angle_unit_dim }
+ { \__siunitx_angle_print_astronomy_marker: }
+ { \__siunitx_angle_print_astronomy_unit: }
+ }% lateximage
+ {% not a lateximage
+ \__siunitx_print:nV { unit } \l__siunitx_unit_tl
+ \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } }
+ }% not a lateximage
+ \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-decimal }
+ \l__siunitx_tmpa_tl
+ { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl }
+}
\RenewDocumentCommand \num { o m } {
\leavevmode
\group_begin:% lwarp
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -29,7 +29,7 @@
\begin{lateximage}%
\ifbool{LWR at tikzbabel}% Test for Tikz version v3.0.0
{}%
-{\catcode`\$=3} % dollar sign is math shift
+{\catcode`\$=3}% dollar sign is math shift
}
\AfterEndEnvironment{tikzpicture}{%
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -0,0 +1,50 @@
+%%
+%% This is file `lwarp-xy.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `xy')
+%% 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 at ProvidesPackagePass{xy}
+
+\AtBeginDocument{
+
+\preto{\xy}{\begin{lateximage}[xy image]}
+\appto{\endxy}{\end{lateximage}}
+
+\@ifundefined{xymatrix}{}{
+\LetLtxMacro\LWR at origxymatrix\xymatrix
+
+\renewcommand{\xymatrix}[1]{%
+\begin{lateximage}[xymatrix]
+\LWR at origxymatrix{#1}
+\end{lateximage}
+}
+}
+
+\@ifundefined{xygraph}{}{
+\LetLtxMacro\LWR at origxygraph\xygraph
+
+\renewcommand{\xygraph}[1]{%
+\begin{lateximage}[xygraph]
+\LWR at origxygraph{#1}
+\end{lateximage}
+}
+}
+
+}
+
+\endinput
+%%
+%% End of file `lwarp-xy.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2018-03-03 21:54:03 UTC (rev 46803)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2018-03-03 21:54:38 UTC (rev 46804)
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2018/02/19 v0.49 Allows LaTeX to directly produce HTML5 output.]
+ [2018/03/03 v0.50 Allows LaTeX to directly produce HTML5 output.]
@@ -24,11 +24,42 @@
\RequirePackage{iftex}
+\newif\ifxetexorluatex
+\ifXeTeX
+ \xetexorluatextrue
+\else
+ \ifLuaTeX
+ \xetexorluatextrue
+ \else
+ \xetexorluatexfalse
+ \fi
+\fi
\ifLuaTeX
\RequirePackage{luatex85}% until the geometry package is updated
\fi
+\newcommand{\LWR at mdfive}[1]{%
+\PackageError{lwarp}
+{No MD5 macro was found.}
+{Lwarp must find the macros pdfmdfivesum or mdfivesum.}
+}
+
\ifPDFTeX
+\let\LWR at mdfive\pdfmdfivesum
+\fi
+
+\ifLuaTeX
+\RequirePackage{pdftexcmds}
+\let\LWR at mdfive\pdf at mdfivesum
+\fi
+
+\ifXeTeX
+\@ifundefined{pdffivesum}{}
+ {\let\LWR at mdfive\pdfmdfivesum}
+\@ifundefined{mdfivesum}{}
+ {\let\LWR at mdfive\mdfivesum}
+\fi
+\ifPDFTeX
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\fi
@@ -225,6 +256,7 @@
\LWR at loadafter{arabicfront}
\LWR at notmemoirloadafter{array}
\LWR at loadafter{authblk}
+\LWR at loadafter{axodraw2}
\LWR at loadafter{backref}
\LWR at loadafter{balance}
\LWR at loadafter{bigdelim}
@@ -235,6 +267,7 @@
\LWR at loadafter{boxedminipage}
\LWR at loadafter{boxedminipage2e}
\LWR at loadafter{breakurl}
+\LWR at loadafter{bytefield}
\LWR at loadafter{cancel}
\LWR at loadafter{caption}
\LWR at notmemoirloadafter{ccaption}
@@ -250,8 +283,10 @@
\LWR at notmemoirloadafter{crop}
\LWR at loadafter{cuted}
\LWR at loadafter{cutwin}
+\LWR at loadafter{dblfloatfix}
\LWR at loadafter{dblfnote}
\LWR at notmemoirloadafter{dcolumn}
+\LWR at loadafter{diagbox}
\LWR at loadafter{draftwatermark}
\LWR at loadafter{easy-todo}
\LWR at loadafter{ebook}
@@ -263,6 +298,7 @@
\LWR at notmemoirloadafter{enumerate}
\LWR at loadafter{enumitem}
\LWR at notmemoirloadafter{epigraph}
+\LWR at loadafter{epstopdf}
\LWR at loadafter{eso-pic}
\LWR at loadafter{everypage}
\LWR at loadafter{everyshi}
@@ -332,6 +368,7 @@
\LWR at loadafter{microtype}
\LWR at loadafter{midfloat}
\LWR at loadafter{midpage}
+\LWR at loadafter{morefloats}
\LWR at notmemoirloadafter{moreverb}
\LWR at notmemoirloadafter{mparhack}
\LWR at loadafter{multirow}
@@ -341,6 +378,7 @@
\LWR at notmemoirloadafter{needspace}
\LWR at loadafter{newtxmath}
\LWR at notmemoirloadafter{nextpage}
+\LWR at loadafter{nonfloat}
\LWR at loadafter{nonumonpart}
\LWR at loadafter{nopageno}
\LWR at loadafter{nowidow}
@@ -351,10 +389,12 @@
\LWR at loadafter{pagesel}
\LWR at loadafter{paralist}
\LWR at notmemoirloadafter{parskip}
+\LWR at loadafter{pbox}
\LWR at loadafter{pdfrender}
\LWR at loadafter{pdflscape}
\LWR at loadafter{pdfsync}
\LWR at loadafter{pfnote}
+\LWR at loadafter{phfqit}
\LWR at loadafter{placeins}
\LWR at loadafter{prelim2e}
\LWR at loadafter{prettyref}
@@ -369,6 +409,7 @@
\LWR at loadafter{rotating}
\LWR at loadafter{rotfloat}
\LWR at loadafter{savetrees}
+\LWR at loadafter{schemata}
\LWR at loadafter{scrextend}
\LWR at loadafter{scrhack}
\LWR at loadafter{scrlayer}
@@ -429,29 +470,15 @@
\LWR at loadafter{xmpincl}
\LWR at loadafter{xtab}
\LWR at loadafter{xurl}
+\LWR at loadafter{xy}
\LWR at loadafter{zwpagelayout}
-
-\begin{warpall}
-
-
-\RequirePackage{iftex}
-\newif\ifxetexorluatex
-\ifXeTeX
- \xetexorluatextrue
-\else
- \ifLuaTeX
- \xetexorluatextrue
- \else
- \xetexorluatexfalse
- \fi
-\fi
-
-\end{warpall}
-
\begin{warpHTML}
\ifxetexorluatex
+\@ifpackageloaded{fontspec}{}{
+\usepackage[no-math]{fontspec}
+}
\defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}}
\defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}}
\defaultfontfeatures[\ttfamily]{Ligatures=NoCommon}
@@ -546,9 +573,8 @@
\RequirePackage{zref}
-\PassOptionsToPackage{leqno}{amsmath}
\RequirePackage{amsmath}
-\def\maketag@@@#1{#1}
+\def\maketag@@@#1{\text{#1}}
\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip)}}
@@ -946,7 +972,9 @@
}
\LetLtxMacro\LWR at origunderline\underline
-
+\let\LWR at origraggedright\raggedright
+\let\LWR at origraggedleft\raggedleft
+\let\LWR at origcentering\centering
\let\LWR at orignewpage\newpage
\let\LWR at origpagestyle\pagestyle
@@ -1203,6 +1231,25 @@
text-decoration-skip ;
}
+span.overline {
+ text-decoration: overline ;
+ text-decoration-skip ;
+}
+
+/* for diagbox */
+div.diagboxtitleN { border-bottom: 1px solid gray }
+div.diagboxtitleS { border-top: 1px solid gray }
+
+div.diagboxE {
+ padding-left: 2em ;
+ text-align: right ;
+}
+
+div.diagboxW {
+ padding-right: 2em ;
+ text-align: left ;
+}
+
/* For realscripts */
.supsubscript {
display: inline-block;
@@ -1551,6 +1598,36 @@
border-bottom: 1px solid silver ;
}
+div.displaymath {
+ text-align: center ;
+}
+
+div.displaymathnumbered {
+ text-align: right ;
+ margin-left: 5% ;
+ margin-right: 5% ;
+ min-width: 2.5in ;
+}
+
+ at media all and (min-width: 400px) {
+ div.displaymathnumbered {
+ margin-left: 10% ;
+ margin-right: 10% ;
+ }
+}
+
+ at media all and (min-width: 800px) {
+ div.displaymathnumbered {
+ margin-right: 20% ;
+ }
+}
+
+ at media all and (min-width: 1200px) {
+ div.displaymathnumbered {
+ margin-right: 30% ;
+ }
+}
+
.inlineprogramlisting {
font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
"Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
@@ -2518,6 +2595,8 @@
border-radius: 1ex ;
}
+table div.minipage { background: none ; border: none ; }
+
div.framebox div.minipage {border:none ; background:none}
section.textbody > div.minipage {
@@ -2852,7 +2931,19 @@
\end{filecontents*}
\end{warpprint}
+\begin{warpprint}
+\begin{filecontents*}{lwarp_one_limage.txt}
+ at echo off
+pdfseparate -f %1 -l %1 %4_html.pdf lateximages\lateximagetemp-%%d.pdf"
+pdfcrop lateximages\lateximagetemp-%1.pdf lateximages\%3.pdf
+pdftocairo -svg lateximages\%3.pdf lateximages\%3.svg
+del lateximages\%3.pdf
+del lateximages\lateximagetemp-%1.pdf"
+exit
+\end{filecontents*}
+\end{warpprint}
+
\begin{warpprint}
\begin{filecontents*}{lwarp_mathjax.txt}
<!-- https://groups.google.com/forum/#!topic/
@@ -2966,7 +3057,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.49"
+printversion = "v0.50"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -2989,7 +3080,7 @@
For use with latexmk or a Makefile:
Convert project_html.pdf to project_html.html and
individual HTML files.
-lwarpmk clean [project]: Remove project.aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
+lwarpmk clean [project]: Remove .aux, .toc, .lof/t, .idx, .ind, .log, *_html_inc.*, .gl*
lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
lwarpmk -h: Print this help message.
lwarpmk --help: Print this help message.
@@ -3029,10 +3120,12 @@
io.output(destfile)
for line in sfile:lines() do
i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ;
-if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file
-io.output(newfilename) ;
-else -- not a splitpoint
-io.write (line .. "\n") ;
+if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then
+ -- split the file
+ io.output(newfilename) ;
+else
+ -- not a splitpoint
+ io.write (line .. "\n") ;
end
end -- do
io.close(sfile)
@@ -3041,8 +3134,10 @@
-- Incorrect value, so print an error and exit.
function cvalueerror ( line, linenum , cvalue )
- print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ print ("lwarpmk: ===")
printconf () ;
os.exit(1) ;
end
@@ -3059,11 +3154,14 @@
-- Default xdyfile:
xdyfile = "lwarp.xdy"
-- Verify the file exists:
-if (lfs.attributes(conffile,"mode")==nil) then -- file not exists
-print("lwarpmk: " .. conffile .." does not exist.")
-print("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
-printhelp () ;
-os.exit(1) -- exit the entire lwarpmk script
+if (lfs.attributes(conffile,"mode")==nil) then
+ -- file not exists
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. conffile .." does not exist.")
+ print ("lwarpmk: " .. arg[2] .. " does not appear to be a project name.\n")
+ print ("lwarpmk: ===")
+ printhelp () ;
+ os.exit(1) -- exit the entire lwarpmk script
else -- file exists
-- Read the file:
print ("lwarpmk: Reading " .. conffile ..".")
@@ -3075,11 +3173,13 @@
i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ;
-- Error if incorrect enclosing characters:
if ( i == nil ) then
-print ( linenum .. " : " .. line ) ;
-print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
-printconf () ;
-os.exit(1) ;
-end
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
+ os.exit(1) ;
+end -- nil
if ( cvarname == "opsystem" ) then
-- Verify choice of opsystem:
if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
@@ -3105,39 +3205,65 @@
elseif ( cvarname == "language" ) then language = cvalue
elseif ( cvarname == "xdyfile" ) then xdyfile = cvalue
else
-print ( linenum .. " : " .. line ) ;
-print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
-printconf () ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. linenum .. " : " .. line ) ;
+ print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+ print ("lwarpmk: ===")
+ printconf () ;
os.exit(1) ;
-end
+end -- cvarname
end -- do scan lines
io.close(cfile)
end -- file exists
+-- Error if sourcename is "lwarp".
+-- This could happen if a local copy of lwarp has recently been recompiled.
+if sourcename=="lwarp" then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Lwarp has recently been recompiled in this directory,")
+ print ("lwarpmk: and \"lwarpmk.conf\" is no longer set for your own project.")
+ print ("lwarpmk: Recompile your own project using pdf/lua/xelatex <projectname>.")
+ print ("lwarpmk: After a recompile, \"lwarpmk.conf\" will be set for your project,")
+ print ("lwarpmk: and you may again use lwarpmk.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end -- sourcename of "lwarp"
-- Select some operating-system commands:
if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
-rmname = "rm"
-mvname = "mv"
-touchnamepre = "touch"
-touchnamepost = ""
-dirslash = "/"
-opquote= "\'"
+ rmname = "rm"
+ mvname = "mv"
+ cpname = "cp"
+ touchnamepre = "touch"
+ touchnamepost = ""
+ newtouchname = "touch"
+ dirslash = "/"
+ opquote= "\'"
+ cmdgroupopenname = " ( "
+ cmdgroupclosename = " ) "
+ seqname = " ; "
+ bgname = " &"
elseif opsystem=="Windows" then -- For Windows
-rmname = "DEL"
-mvname = "MOVE"
-touchnamepre = "COPY /b"
-touchnamepost = "+,,"
-dirslash = "\\"
-opquote= "\""
+ rmname = "DEL"
+ mvname = "MOVE"
+ cpname = "COPY"
+ touchnamepre = "COPY /b"
+ touchnamepost = "+,,"
+ newtouchname = "echo empty >"
+ dirslash = "\\"
+ opquote= "\""
+ cmdgroupopenname = ""
+ cmdgroupclosename = ""
+ seqname = " & "
+ bgname = ""
else print ( "lwarpmk: Select Unix or Windows for opsystem" )
end --- for Windows
-- set xindycmd according to pdflatex vs xelatex/lualatex:
if ( latexname == "pdflatex" ) then
-xindycmd = "texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
else
-xindycmd = "xindy -M texindy -C utf8"
-glossarycmd = "xindy -C utf8"
+ xindycmd = "xindy -M texindy -C utf8"
+ glossarycmd = "xindy -C utf8"
end
end -- loadconf
@@ -3156,8 +3282,8 @@
if ( string.find(line,"Rerun to get") ~= nil ) then
io.close(fsource)
return true
-end
-end
+end -- if
+end -- do
io.close(fsource)
return false
end
@@ -3167,10 +3293,13 @@
function onetime (fsuffix)
print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
-err = os.execute(
--- "echo " ..
- latexname .. " " .. sourcename..fsuffix )
-if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+err = os.execute(latexname .. " " .. sourcename..fsuffix)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
end
@@ -3190,8 +3319,10 @@
function verifyfileexists (filename)
if (lfs.attributes ( filename , "modification" ) == nil ) then
-print ( "lwarpmk: " .. filename .. " not found." ) ;
-os.exit (1) ;
+ print ("lwarpmk: ===")
+ print ("lwarpmk: " .. filename .. " not found." ) ;
+ print ("lwarpmk: ===")
+ os.exit (1) ;
end
end
@@ -3198,86 +3329,155 @@
-- Convert <project>_html.pdf into HTML files:
function pdftohtml ()
- -- Convert to text:
- print ("lwarpmk: Converting " .. sourcename
- .."_html.pdf to " .. sourcename .. "_html.html")
- os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
- .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
- -- Split the result into individual HTML files:
- splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+-- Convert to text:
+print ("lwarpmk: Converting " .. sourcename
+ .."_html.pdf to " .. sourcename .. "_html.html")
+os.execute("pdftotext -enc UTF-8 -nopgbrk -layout "
+ .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+-- Split the result into individual HTML files:
+splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
-- Remove auxiliary files:
function removeaux ()
- os.execute ( rmname .. " " ..
- sourcename ..".aux " .. sourcename .. "_html.aux " ..
- sourcename ..".toc " .. sourcename .. "_html.toc " ..
- sourcename ..".lof " .. sourcename .. "_html.lof " ..
- sourcename ..".lot " .. sourcename .. "_html.lot " ..
- sourcename ..".idx " .. sourcename .. "_html.idx " ..
- sourcename ..".ind " .. sourcename .. "_html.ind " ..
- sourcename ..".log " .. sourcename .. "_html.log " ..
- sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
- "*_html_inc.*"
- )
+os.execute ( rmname .. " " ..
+ sourcename ..".aux " .. sourcename .. "_html.aux " ..
+ sourcename ..".toc " .. sourcename .. "_html.toc " ..
+ sourcename ..".lof " .. sourcename .. "_html.lof " ..
+ sourcename ..".lot " .. sourcename .. "_html.lot " ..
+ sourcename ..".idx " .. sourcename .. "_html.idx " ..
+ sourcename ..".ind " .. sourcename .. "_html.ind " ..
+ sourcename ..".log " .. sourcename .. "_html.log " ..
+ sourcename ..".gl* " .. sourcename .. "_html.gl* " ..
+ "*_html_inc.*"
+ )
end
-- Create lateximages based on lateximages.txt:
function createlateximages ()
print ("lwarpmk: Creating lateximages.")
-local limagesfile = io.open("lateximages.txt")
+local limagesfile = io.open("lateximages.txt", "r")
+if ( limagesfile == nil ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: \"lateximages.txt\" does not exist.")
+ print ("lwarpmk: Your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: or the file has been deleted somehow.")
+ print ("lwarpmk: Use \"lwarpmk html\" to recompile your project,")
+ print ("lwarpmk: and recreate \"lateximages.txt\".")
+ print ("lwarpmk: If your project does not use SVG math or other lateximages,")
+ print ("lwarpmk: then \"lateximages.txt\" will never exist, and")
+ print ("lwarpmk: \"lwarpmk limages\" will not be necessary.")
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Create the lateximages directory, ignore error if already exists
err = os.execute("mkdir lateximages")
+-- For Windows, create lwarp_one_limage.cmd:
+if opsystem=="Windows" then
+ err = os.execute (
+ cpname .. " lwarp_one_limage.txt lwarp_one_limage.cmd"
+ )
+ if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to copy to lwarp_one_limage.cmd")
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+ end
+end -- create lwarp_one_limage.cmd
-- Scan lateximages.txt
for line in limagesfile:lines() do
-- lwimgpage is the page number in the PDF which has the image
--- lwimgnum is the sequential lateximage number to assign for the image
-i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|")
+-- lwimghash is true if this filename is a hash
+-- lwimgname is the lateximage filename root to assign for the image
+i,j,lwimgpage,lwimghash,lwimgname = string.find (line,"|(.*)|(.*)|(.*)|")
-- For each entry:
if ( (i~=nil) ) then
+-- Skip is this image is hashed and already exists:
+local lwimgfullname = "lateximages" .. dirslash .. lwimgname .. ".svg"
+if (
+ (lwimghash ~= "true") or
+ (lfs.attributes(lwimgfullname,"mode")==nil) -- file not exists
+)
+then -- not hashed or not exists:
+-- Print the name of the file being generated:
+print ( "lwarpmk: " .. lwimgname )
+-- Touch/create the dest so that only once instance tries to build it:
+err = os.execute(newtouchname .. " " .. lwimgfullname)
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to touch " .. lwimgfullname)
+ print ("lwarpmk: ===")
+ os.exit(1) ;
+end
-- Separate out the image into its own single-page pdf:
+if opsystem=="Unix" then
+-- For Unix / Linux / Mac OS:
err = os.execute(
-"pdfseparate -f " .. lwimgpage .. " -l " ..
- lwimgpage .. " " .. sourcename .."_html.pdf lateximagetemp-%d.pdf")
+-- print (
+cmdgroupopenname ..
+"pdfseparate -f " .. lwimgpage .. " -l " .. lwimgpage .. " " ..
+ sourcename .."_html.pdf " ..
+ "lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
+ seqname ..
-- Crop the image:
-err = os.execute(
-"pdfcrop lateximagetemp-" .. lwimgpage ..".pdf lateximage-" .. lwimgnum ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname .. ".pdf" ..
+ seqname ..
-- Convert the image to svg:
-err = os.execute(
-"pdftocairo -svg lateximage-" .. lwimgnum ..".pdf lateximage-" .. lwimgnum ..".svg")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
--- Move the result into lateximages/:
-err = os.execute(
-mvname .. " lateximage-" .. lwimgnum ..".svg lateximages" .. dirslash )
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+ "lateximages" .. dirslash .. lwimgname ..".svg" ..
+ seqname ..
-- Remove the temporary files:
-err = os.execute(
-rmname .. " lateximage-" .. lwimgnum ..".pdf lateximagetemp-" .. lwimgpage ..".pdf")
-if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end
+rmname .. " lateximages" .. dirslash .. lwimgname .. ".pdf" .. seqname ..
+rmname .. " lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf" ..
+cmdgroupclosename .. " >/dev/null " .. bgname
+)
+elseif opsystem=="Windows" then
+-- For Windows
+err = os.execute (
+ "start /b \"\" lwarp_one_limage " ..
+ lwimgpage .. " " ..
+ lwimghash .. " " ..
+ lwimgname .. " " ..
+ sourcename .. " <nul >nul"
+)
+end -- Windows
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: File error trying to create one lateximage.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end -- not hashed or not exists
+end -- not nil
end -- do
io.close(limagesfile)
+print ( "lwarpmk limages: done" )
end -- function
-- Use latexmk to compile source and index:
-- fsuffix is "" for print, or "_html" for HTML
function compilelatexmk ( fsuffix )
- -- The recorder option is required to detect changes in <project>.tex
- -- while we are loading <project>_html.tex.
- err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
- .. "-e "
- .. opquote
- .. "$makeindex = q/" -- $
- .. xindycmd
- .. " -M " .. xdyfile
- .. " -L " .. language .. " /"
- .. opquote
- .. " -pdflatex=\"" .. latexname .." %O %S\" "
- .. sourcename..fsuffix ..".tex" ) ;
- if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+-- The recorder option is required to detect changes in <project>.tex
+-- while we are loading <project>_html.tex.
+err=os.execute ( "latexmk -pdf -dvi- -ps- -recorder "
+ .. "-e "
+ .. opquote
+ .. "$makeindex = q/" -- $
+ .. xindycmd
+ .. " -M " .. xdyfile
+ .. " -L " .. language .. " /"
+ .. opquote
+ .. " -pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename..fsuffix ..".tex" ) ;
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Compile error.")
+ print ("lwarpmk: ===")
+ os.exit(1)
end
+end
-- lwarpmk --version :
@@ -3701,7 +3901,10 @@
\newcommand*{\LWR at htmlrefsectionfilename}[1]{%
\LWR at traceinfo{LWR at htmlrefsectionfilename: !\detokenize{#1}!}%
+\begingroup%
+\LWR at nullfonts%
\LWR at htmlsectionfilename{\LWR at htmlfileref{#1}}%
+\endgroup%
\LWR at traceinfo{LWR at htmlrefsectionfilename: done}%
}
@@ -3880,6 +4083,7 @@
#1%
\protect\LWR at origtextgreater%
\endgroup%
+\LWR at traceinfo{LWR at htmltagc: done}%
}%
}
@@ -4039,7 +4243,10 @@
\begin{warpHTML}
\NewDocumentEnvironment{BlockClass}{o m}%
-{\LWR at htmldivclass[#1]{#2}}
+{%
+ \LWR at origpar%
+ \LWR at htmldivclass[#1]{#2}%
+}
{\LWR at htmldivclassend{#2}}
\end{warpHTML}
\begin{warpprint}
@@ -4047,6 +4254,7 @@
\end{warpprint}
\begin{warpHTML}
\newcommand{\BlockClassSingle}[2]{%
+\LWR at origpar%
\LWR at htmlelementclassline{div}{#1}{#2}%
}
\end{warpHTML}
@@ -4339,7 +4547,7 @@
\csname p at footnote\endcsname\@thefnmark%
}% @currentlabel
\color at begingroup%
- \renewcommand{\textsuperscript}[1]{\LWR at htmlspan{sup}{##1}}%
+ \renewrobustcmd{\textsuperscript}[1]{\LWR at htmlspan{sup}{##1}}%
\ifthenelse{%
\boolean{LWR at doingstartpars} \AND%
\cnttest{\value{LWR at lateximagedepth}}{=}{0}%
@@ -4480,10 +4688,8 @@
\newcommand*{\LWR at filenamenoblanks}[1]{%
\begingroup
-
\LWR at nullfonts%
\renewcommand*{\LWR at htmltagc}[1]{}%
-\LWR at traceinfo{LWR at filenamenoblanks \#1: !#1!}%
\edef\LWR at thisnewfilename{#1}%
\LWR at traceinfo{LWR at filenamenoblanks edef: !\LWR at thisnewfilename!}%
\fullexpandarg%
@@ -4561,7 +4767,7 @@
}
\newcommand*{\LWR at newhtmlfile}[1]{
-\LWR at traceinfo{LWR at newhtmlfile: !#1!}
+\LWR at traceinfo{LWR at newhtmlfile}
\LWR at htmlelementclassend{section}{textbody}
@@ -4593,10 +4799,13 @@
{\renewcommand*{\LWR at thisfilename}{\arabic{LWR at htmlfilenumber}}}
\LWR at traceinfo{LWR at newhtmlfile: about to print start file}%
+\begingroup%
+\LWR at nullfonts%
\LWR at htmlblockcomment{%
|Start file|%
\LWR at htmlsectionfilename{\LWR at thisfilename}|%
}
+\endgroup%
\LWR at stoppars
@@ -4944,11 +5153,8 @@
\newcommand*{\LWR at filestart}[1]{
\LWR at traceinfo{LWR at filestart}
\begingroup
-\LWR at traceinfo{LWR at filestart: A}
\LWR at nullfonts
-\LWR at traceinfo{LWR at filestart: B}
\LWR at htmltag{!DOCTYPE html}\LWR at orignewline
-\LWR at traceinfo{LWR at filestart: C}
\LWR at htmltag{html lang="\LWR at currentHTMLLanguage"}\LWR at orignewline
\LWR at htmltag{head}\LWR at orignewline
\LWR at htmltag{meta charset="UTF-8" /}\LWR at orignewline
@@ -5392,6 +5598,7 @@
}\LWR at orignewline% pre
}{}%
\begingroup%
+\LWR at orignormalsize%
\LWR at origttfamily%
\LWR at restoreoriglists%
\LWR at FBcancel%
@@ -7735,6 +7942,9 @@
\let\llap\LWR at origllap%
\let\rlap\LWR at origrlap%
\let\hfilneg\LWR at orighfilneg%
+\let\raggedright\LWR at origraggedright
+\let\raggedleft\LWR at origraggedleft
+\let\centering\LWR at origcentering
\let\,\LWR at origcomma% disable HTML short unbreakable space
\let\textellipsis\LWR at origtextellipsis%
\let\textless\LWR at origtextless%
@@ -7847,10 +8057,16 @@
}% mathjax
{% not mathjax
+ \begin{BlockClass}{displaymath}
\begin{lateximage}%
- [\textbackslash{[} \LWR at HTMLsanitize{#1} \textbackslash{]}]%
+ [%
+ \textbackslash{[} % extra space
+ \LWR at HTMLsanitize{#1} % extra space
+ \textbackslash{]}%
+ ]%
\LWR at origdollar\LWR at origdollar#1\LWR at origdollar\LWR at origdollar%
\end{lateximage}%
+ \end{BlockClass}
}% not mathjax
}%
@@ -7858,28 +8074,47 @@
\newlength{\LWR at singledollarheight}
\newlength{\LWR at singledollardepth}
-\protected\gdef\LWR at subsingledollar#1{%
+\protected\gdef\LWR at subsingledollar#1#2{%
\begingroup%
-\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+\ifboolexpr{%
+ (
+ bool{mathjax} or
+ ( bool{FormatWP} and bool{WPMarkMath} )
+ ) and
+ ( not test { \ifstrequal {#1} {math image} } )
+}%
{%
- {\textbackslash(\LWR at HTMLsanitize{#1}\textbackslash)}%
+ {\textbackslash(\LWR at HTMLsanitize{#2}\textbackslash)}%
}% mathjax
{% not mathjax
\LWR at restoreorigformatting%
\LWR at orignormalsize%
\global\setlength{\LWR at singledollardepth}{\depthof{%
- \LWR at origdollar#1\LWR at origdollar%
+ \LWR at origdollar#2\LWR at origdollar%
}*\real{.8}}%
\global\setlength{\LWR at singledollarwidth}{\widthof{%
- \LWR at origdollar#1\LWR at origdollar%
+ \LWR at origdollar#2\LWR at origdollar%
}*\real{.8}}%
\global\setlength{\LWR at singledollarheight}{\totalheightof{%
- \LWR at origdollar#1\LWR at origdollar%
+ \LWR at origdollar#2\LWR at origdollar%
}*\real{.8}}%
\LWR at origscriptsize%
+ \ifdimgreater{\LWR at singledollarwidth}{\LWR at singledollarheight}{%
\def\LWR at singledollarstyle{%
+ width:\LWR at convertto{em}{\the\LWR at singledollarwidth} em%
+ }%
+ }{%
+ \def\LWR at singledollarstyle{%
height:\LWR at convertto{em}{\the\LWR at singledollarheight }em%
}%
+ }%
+ \ifdimless{\LWR at singledollarwidth}{.8em}%
+ {%
+ \def\LWR at singledollarstyle{%
+ height:\LWR at convertto{em}{\the\LWR at singledollarheight }em%
+ }%
+ }%
+ {}%
\ifdimless{\LWR at singledollarheight}{.3em}%
{%
\def\LWR at singledollarstyle{%
@@ -7889,15 +8124,28 @@
{}%
\ifdimgreater{\LWR at singledollardepth}{0.01em}{%
\def\LWR at singledollardepthstyle{%
- \ ; \LWR at origmbox{vertical-align:-\LWR at convertto{em}{\the\LWR at singledollardepth} em} %
+ \ ; % extra space
+ \LWR at origmbox{%
+ vertical-align:-\LWR at convertto{em}{\the\LWR at singledollardepth} em%
+ } % extra space
}%
}{%
\def\LWR at singledollardepthstyle{}%
}%
- \begin{lateximage}%
- [\textbackslash( \LWR at HTMLsanitize{#1} \textbackslash)]%
- [\LWR at singledollarstyle \LWR at singledollardepthstyle]%
- \LWR at origdollar#1\LWR at origdollar%
+ \ifblank{#1}{%
+ \begin{lateximage}*%
+ [%
+ \textbackslash( %
+ \LWR at HTMLsanitize{#2} % extra space
+ \textbackslash)%
+ ]%
+ [\LWR at singledollarstyle \LWR at singledollardepthstyle]%
+ }{%
+ \begin{lateximage}%
+ [#1]%
+ [\LWR at singledollarstyle \LWR at singledollardepthstyle]%
+ }%
+ \LWR at origdollar#2\LWR at origdollar%
\end{lateximage}%
}%
\endgroup%
@@ -7904,7 +8152,7 @@
}
\protected\gdef\LWR at singledollar#1${%
-\LWR at subsingledollar{#1}%
+\LWR at subsingledollar{}{#1}%
}
\protected\gdef\(#1\){$#1$}
@@ -7915,11 +8163,15 @@
\LetLtxMacro\LWR at origensuredmath\@ensuredmath
\renewcommand{\@ensuredmath}[1]{%
+\ifbool{mathjax}{%
+ \LWR at subsingledollar{math image}{\relax#1}%
+}{% SVG math
\ifmmode%
\LWR at origensuredmath{#1}%
\else%
- \LWR at subsingledollar{\relax#1}%
+ \LWR at subsingledollar{math image}{\relax#1}%
\fi%
+}%
}
\let\math\relax
@@ -7987,13 +8239,17 @@
\LWR at hidelatexequation{equation}{\BODY}
}
{% not mathjax
- \begin{lateximage}[(\LWR at equationtag) \textbackslash{begin\{equation\}} %
- \LWR at HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} %
- \textbackslash{end\{equation\}}]% alt tag
+ \begin{BlockClass}{displaymathnumbered}
+ \begin{lateximage}[%
+ (\LWR at equationtag) \textbackslash{begin\{equation\}} % extra space
+ \LWR at HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} % extra space
+ \textbackslash{end\{equation\}}%
+ ]% alt tag
\LWR at origequation
\BODY% contents collected by NewEnviron
\LWR at origendequation
\end{lateximage}%
+ \end{BlockClass}
}% not mathjax
}[%
@@ -8072,6 +8328,7 @@
{% not mathjax
\ifbool{LWR at numbereqnarray}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[(\LWR at startingequationtag--\LWR at equationtag)
\LWR at addmathjax{eqnarray}{\BODY}]
\LWR at origeqnarray
@@ -8078,8 +8335,10 @@
\BODY
\LWR at origendeqnarray
\end{lateximage}
+ \end{BlockClass}
}%
{% not LWR at numbereqnarray
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at addmathjax{eqnarray*}{\BODY}]
\LWR at origeqnarray
\BODY
@@ -8086,6 +8345,7 @@
\nonumber
\LWR at origendeqnarray
\end{lateximage}
+ \end{BlockClass}
}% LWR at numbereqnarray
}% not mathjax
\booltrue{LWR at numbereqnarray}
@@ -8106,6 +8366,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{multline}]
}
}
@@ -8118,7 +8379,7 @@
\boolfalse{LWR at amsmultline}
\LWR at addmathjax{multline}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8131,6 +8392,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{multline*}]
}
}
@@ -8143,7 +8405,7 @@
\boolfalse{LWR at amsmultline}
\LWR at addmathjax{multline*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8157,6 +8419,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{gather}]
}
}
@@ -8168,7 +8431,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{gather}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8181,6 +8444,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{gather*}]
}
}
@@ -8192,7 +8456,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{gather*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8205,6 +8469,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{align}]
}
}
@@ -8216,7 +8481,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{align}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8229,6 +8494,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{align*}]
}
}
@@ -8240,7 +8506,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{align*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8253,6 +8519,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymathnumbered}
\begin{lateximage}[\LWR at amsmathbodynumbered{flalign}]
}
}
@@ -8264,7 +8531,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{flalign}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8277,6 +8544,7 @@
\LWR at beginhideamsmath
}
{
+ \begin{BlockClass}{displaymath}
\begin{lateximage}[\LWR at amsmathbody{flalign*}]
}
}
@@ -8288,7 +8556,7 @@
\LWR at endhideamsmath
\LWR at addmathjax{flalign*}{\the\@envbody}
}
-{\end{lateximage}}
+{\end{lateximage}\end{BlockClass}}
}
@@ -8411,7 +8679,7 @@
\newcommand*{\LWR at amsmathbody}[1]
{%
-\textbackslash\{begin\}\{#1\} %
+\textbackslash\{begin\}\{#1\} % extra space
\LWR at HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
\textbackslash\{end\}\{#1\}%
}
@@ -8420,14 +8688,14 @@
{%
\ifnumcomp{\value{LWR at startingequation}}{=}{\value{equation}}%
{(\LWR at equationtag)}%
-{(\LWR at startingequationtag--\LWR at equationtag)} %
-\LWR at amsmathbody{#1} %
+{(\LWR at startingequationtag--\LWR at equationtag)} % extra space
+\LWR at amsmathbody{#1} % extra space
}
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{O{image}O{}}
+\NewDocumentEnvironment{lateximage}{s O{image} O{}}
{%
\LWR at traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{0}}%
@@ -8451,9 +8719,21 @@
\LWR at htmltag{span id="lateximage\arabic{LWR at lateximagenumber}" %
class="lateximagesource"}%
\LWR at traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR at lateximagesfile{%
- |\arabic{LWR at LIpage}|\arabic{LWR at externalfilecnt}|%
- }%
+ \IfBooleanTF{#1}% starred
+ {% hash
+ \LWR at traceinfo{lateximage: hash true}%
+ \edef\LWR at hashedname{\LWR at mdfive{\detokenize\expandafter{#2}}}%
+ \LWR at traceinfo{lateximage: hash is \LWR at hashedname}%
+ \immediate\write\LWR at lateximagesfile{%
+ |\arabic{LWR at LIpage}|true|\LWR at hashedname|%
+ }%
+ }% hash
+ {% no hash
+ \LWR at traceinfo{lateximage: hash false}%
+ \immediate\write\LWR at lateximagesfile{%
+ |\arabic{LWR at LIpage}|false|lateximage-\arabic{LWR at externalfilecnt}|%
+ }%
+ }% no hash
\LWR at traceinfo{lateximage: about to create open comment}%
\LWR at htmlopencomment%
\addtocounter{LWR at lateximagedepth}{1}%
@@ -8490,8 +8770,21 @@
\LWR at origvspace*{.5\baselineskip}%
\LWR at htmlclosecomment%
\LWR at traceinfo{lateximage: The page after the image is \arabic{page}}%
- \LWR at subinlineimage[#1]{lateximage}%
- {lateximages\OSPathSymbol{}\LWR at origmbox{lateximage-\theLWR at externalfilecnt}}{svg}{#2}%
+ \IfBooleanTF{#1}% starred
+ {% hash
+ \LWR at subinlineimage[#2]{lateximage}%
+ {%
+ lateximages\OSPathSymbol%
+ \LWR at origmbox{\LWR at hashedname}%
+ }{svg}{#3}%
+ }% hash
+ {% no hash
+ \LWR at subinlineimage[#2]{lateximage}%
+ {%
+ lateximages\OSPathSymbol%
+ \LWR at origmbox{lateximage-\theLWR at externalfilecnt}%
+ }{svg}{#3}%
+ }% no hash
\LWR at ensuredoingapar%
\LWR at htmltag{/span}%
\ifbool{HTMLDebugComments}{%
@@ -8506,7 +8799,7 @@
\begin{warpprint}
-\NewDocumentEnvironment{lateximage}{o o}
+\NewDocumentEnvironment{lateximage}{s o o}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
@@ -8570,12 +8863,29 @@
\begin{warpHTML}
+\newrobustcmd{\LWR at siunitx@textcelsius}{\HTMLentity{deg}C}
+\newrobustcmd{\LWR at siunitx@textdegree}{\HTMLentity{deg}}
+\newrobustcmd{\LWR at siunitx@textprime}{\HTMLunicode{2032}}
+\newrobustcmd{\LWR at siunitx@textdblprime}{\HTMLunicode{2033}}
+\newrobustcmd{\LWR at siunitx@textplanckbar}{\text{\HTMLunicode{0127}}}
+
+\appto\LWR at restoreorigformatting{
+\renewrobustcmd{\LWR at siunitx@textcelsius}{\text{\ensuremath{^\circ}C}}
+\renewrobustcmd{\LWR at siunitx@textdegree}{\text{\ensuremath{^\circ}}}
+\renewrobustcmd{\LWR at siunitx@textprime}{\text{\ensuremath{^\prime}}}
+\renewrobustcmd{\LWR at siunitx@textdblprime}{\text{\ensuremath{^{\prime\prime}}}}
+\renewrobustcmd{\LWR at siunitx@textplanckbar}{\text{\ensuremath{\hbar}}}
+}
+
\PassOptionsToPackage{
detect-mode=true,
per-mode=symbol, % fraction is not seen by pdftotext
+ text-celsius = {\LWR at siunitx@textcelsius},
+ text-degree = {\LWR at siunitx@textdegree},
+ text-arcminute = {\LWR at siunitx@textprime} ,
+ text-arcsecond = {\LWR at siunitx@textdblprime} ,
}{siunitx}
-
\end{warpHTML}
\begin{warpprint}
@@ -9157,6 +9467,7 @@
\LetLtxMacro{\normalfont}{\LWR at nullnormalfont}%
\renewcommand*{\,}{-}%
\renewcommand*{~}{-}%
+\renewcommand*{\newline}{ }%
\renewcommand*{\textellipsis}{-}%
\renewcommand*{\HTMLunicode}[1]{-}%
\renewcommand*{\HTMLentity}[1]{-}%
@@ -9163,12 +9474,13 @@
\renewcommand*{\&}{and}%
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
-\LetLtxMacro\underline\LWR at origunderline%
+\renewcommand{\underline}[1]{##1}%
\RenewDocumentCommand{\LWR at htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
\DeclareRobustCommand{\LWR at HTMLtextstyle}[3]{##3}%
-\DeclareRobustCommand{\LWR at subsingledollar}[1]{}%
-\renewcommand*{\newline}{ }%
+\def\(##1\){}%
+\def\[##1\]{}%
+\renewcommand{\LWR at subsingledollar}[2]{}
}
@@ -9186,23 +9498,23 @@
}%
}
-\renewcommand*{\mdseries}{\renewcommand*{\LWR at f@series}{md}}
+\renewrobustcmd*{\mdseries}{\renewcommand*{\LWR at f@series}{md}}
-\renewcommand*{\bfseries}{\renewcommand*{\LWR at f@series}{bf}}
+\renewrobustcmd*{\bfseries}{\renewcommand*{\LWR at f@series}{bf}}
-\renewcommand*{\rmfamily}{\renewcommand*{\LWR at f@family}{rm}}
+\renewrobustcmd*{\rmfamily}{\renewcommand*{\LWR at f@family}{rm}}
-\renewcommand*{\sffamily}{\renewcommand*{\LWR at f@family}{sf}}
+\renewrobustcmd*{\sffamily}{\renewcommand*{\LWR at f@family}{sf}}
-\renewcommand*{\ttfamily}{\renewcommand*{\LWR at f@family}{tt}}
+\renewrobustcmd*{\ttfamily}{\renewcommand*{\LWR at f@family}{tt}}
-\renewcommand*{\upshape}{\renewcommand*{\LWR at f@shape}{up}}
+\renewrobustcmd*{\upshape}{\renewcommand*{\LWR at f@shape}{up}}
-\renewcommand*{\itshape}{\renewcommand*{\LWR at f@shape}{it}}
+\renewrobustcmd*{\itshape}{\renewcommand*{\LWR at f@shape}{it}}
-\renewcommand*{\scshape}{\renewcommand*{\LWR at f@shape}{sc}}
+\renewrobustcmd*{\scshape}{\renewcommand*{\LWR at f@shape}{sc}}
-\renewcommand*{\normalfont}{\rmfamily\mdseries\upshape}
+\renewrobustcmd*{\normalfont}{\rmfamily\mdseries\upshape}
\renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}}
@@ -9210,12 +9522,12 @@
\renewcommand{\sb}[1]{\text{<sub>#1</sub>}{}}
-\renewcommand{\textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
+\renewrobustcmd{\textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
\renewcommand{\@textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
\AtBeginDocument{
-\renewcommand{\textsubscript}[1]{\LWR at htmlspan{sub}{#1}}
+\renewrobustcmd{\textsubscript}[1]{\LWR at htmlspan{sub}{#1}}
}
\AtBeginDocument{
@@ -9232,6 +9544,12 @@
{underline}{#1}%
}
+\newcommand{\LWR at overline}[1]{%
+\LWR at HTMLtextstyle%
+ {text-decoration:overline;text-decoration-skip}%
+ {overline}{#1}%
+}
+
\end{warpHTML}
@@ -9243,16 +9561,16 @@
\renewrobustcmd*{~}{\HTMLentity{nbsp}}
\renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}}
-\renewcommand*{\normalsize}{}
-\renewcommand*{\small}{}
-\renewcommand*{\footnotesize}{}
-\renewcommand*{\scriptsize}{}
-\renewcommand*{\tiny}{}
-\renewcommand*{\large}{}
-\renewcommand*{\Large}{}
-\renewcommand*{\LARGE}{}
-\renewcommand*{\huge}{}
-\renewcommand*{\Huge}{}
+\renewrobustcmd*{\normalsize}{}
+\renewrobustcmd*{\small}{}
+\renewrobustcmd*{\footnotesize}{}
+\renewrobustcmd*{\scriptsize}{}
+\renewrobustcmd*{\tiny}{}
+\renewrobustcmd*{\large}{}
+\renewrobustcmd*{\Large}{}
+\renewrobustcmd*{\LARGE}{}
+\renewrobustcmd*{\huge}{}
+\renewrobustcmd*{\Huge}{}
\DeclareDocumentCommand{\onecolumn}{}{}
\DeclareDocumentCommand{\twocolumn}{O{}}{
@@ -9271,8 +9589,8 @@
}
-\newcommand*{\LWR at newlinebr}{\unskip\LWR at htmltag{br /}\LWR at orignewline}%
-\let\newline\LWR at newlinebr
+\newrobustcmd*{\LWR at newlinebr}{\unskip\LWR at htmltag{br /}\LWR at orignewline}%
+\LetLtxMacro\newline\LWR at newlinebr
\LetLtxMacro\LWR at origendofline\\
\NewDocumentCommand{\LWR at endofline}{s o}
@@ -9319,7 +9637,7 @@
}%
{%
\LWR at htmltagc{%
- span style="width:\LWR at printlength{\LWR at tempwidth}; %
+ span style="width:\LWR at printlength{\LWR at tempwidth}; % extra space
display:inline-block"%
}%
\ifbool{FormatWP}{%
@@ -9339,7 +9657,7 @@
\LetLtxMacro{\hspace}{\LWR at hspace}
\NewDocumentCommand{\LWR at vspace}{s m}{}
-\let\vspace\LWR at vspace
+\LetLtxMacro\vspace\LWR at vspace
\renewcommand*{\linebreak}[1][]{\newline}
@@ -9403,7 +9721,7 @@
\LWR at minipagestartpars%
}% non-zero width
}
-\renewcommand{\rule}{\LWR at rule}
+\renewrobustcmd{\rule}{\LWR at rule}
\end{warpHTML}
More information about the tex-live-commits
mailing list