texlive[43292] trunk: lwarp (10feb17)
commits+karl at tug.org
commits+karl at tug.org
Wed Feb 22 00:44:01 CET 2017
Revision: 43292
http://tug.org/svn/texlive?view=revision&revision=43292
Author: karl
Date: 2017-02-22 00:44:01 +0100 (Wed, 22 Feb 2017)
Log Message:
-----------
lwarp (10feb17)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/Makefile.am
trunk/Build/source/texk/texlive/linked_scripts/Makefile.in
trunk/Build/source/texk/texlive/linked_scripts/scripts.lst
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-htmlxml.tlpsrc
Added Paths:
-----------
trunk/Build/source/texk/texlive/linked_scripts/lwarp/
trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
trunk/Master/bin/amd64-freebsd/lwarpmk
trunk/Master/bin/amd64-netbsd/lwarpmk
trunk/Master/bin/armel-linux/lwarpmk
trunk/Master/bin/armhf-linux/lwarpmk
trunk/Master/bin/i386-cygwin/lwarpmk
trunk/Master/bin/i386-freebsd/lwarpmk
trunk/Master/bin/i386-linux/lwarpmk
trunk/Master/bin/i386-netbsd/lwarpmk
trunk/Master/bin/i386-solaris/lwarpmk
trunk/Master/bin/powerpc-linux/lwarpmk
trunk/Master/bin/sparc-solaris/lwarpmk
trunk/Master/bin/universal-darwin/lwarpmk
trunk/Master/bin/win32/lwarpmk.exe
trunk/Master/bin/x86_64-cygwin/lwarpmk
trunk/Master/bin/x86_64-darwin/lwarpmk
trunk/Master/bin/x86_64-linux/lwarpmk
trunk/Master/bin/x86_64-solaris/lwarpmk
trunk/Master/texmf-dist/doc/latex/lwarp/
trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
trunk/Master/texmf-dist/scripts/lwarp/
trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
trunk/Master/texmf-dist/source/latex/lwarp/
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/
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-afterpage.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bookmark.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-draftwatermark.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-eso-pic.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-everypage.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-extramarks.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-letterspace.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nowidow.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pagenote.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-placeins.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ragged2e.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-rotating.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-textpos.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-trivfloat.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wallpaper.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
trunk/Master/tlpkg/tlpsrc/lwarp.tlpsrc
Modified: trunk/Build/source/texk/texlive/linked_scripts/Makefile.am
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/Makefile.am 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Build/source/texk/texlive/linked_scripts/Makefile.am 2017-02-21 23:44:01 UTC (rev 43292)
@@ -136,6 +136,7 @@
lilyglyphs/lily-rebuild-pdfs.py \
ltximg/ltximg.pl \
luaotfload/luaotfload-tool.lua \
+ lwarp/lwarpmk.lua \
m-tx/m-tx.lua \
makedtx/makedtx.pl \
make4ht/make4ht \
Modified: trunk/Build/source/texk/texlive/linked_scripts/Makefile.in
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/Makefile.in 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Build/source/texk/texlive/linked_scripts/Makefile.in 2017-02-21 23:44:01 UTC (rev 43292)
@@ -351,6 +351,7 @@
lilyglyphs/lily-rebuild-pdfs.py \
ltximg/ltximg.pl \
luaotfload/luaotfload-tool.lua \
+ lwarp/lwarpmk.lua \
m-tx/m-tx.lua \
makedtx/makedtx.pl \
make4ht/make4ht \
Added: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua (rev 0)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,384 @@
+#!/usr/bin/env texlua
+
+-- Copyright 2016 Brian Dunn
+
+-- Print the usage of the lwarpmk command:
+
+printversion = "v0.20"
+
+function printhelp ()
+print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
+end
+
+function printusage ()
+print ( [[
+
+lwarpmk print [project]: Compile a print version.
+lwarpmk printindex [project]: Process the index for the print version.
+lwarpmk html [project]: Compile an HTML version.
+lwarpmk htmlindex [project]: Process the index for the html version.
+lwarpmk again [project]: Touch the source code to trigger recompiles.
+lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
+lwarpmk pdftohtml [project]:
+ For use with latexmk or a Makefile:
+ Convert project_html.pdf to project_html.html and
+ individual HTML files.
+lwarpmk clean [project]: Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk -h: Print this help message.
+lwarpmk --help: Print this help message.
+
+]] )
+printconf ()
+end
+
+-- Print the format of the configuration file lwarpmk.conf:
+
+function printconf ()
+print ( [[
+An example lwarpmk.conf or <project>.lwarpmkconf project file:
+--
+opsystem = "Unix" (or "Windows")
+latexname = "pdflatex" (or "lualatex", or "xelatex")
+sourcename = "projectname" (the source-code filename w/o .tex)
+homehtmlfilename = "index" (or perhaps the project name)
+htmlfilename = "" (or "projectname" - filename prefix)
+uselatexmk = "false" (or "true" to use latexmk to build PDFs)
+--
+Filenames must contain only letters, numbers, underscore, or dash.
+Values must be in "quotes".
+
+]] ) ;
+end
+
+-- Split one large sourcefile into a number of files,
+-- starting with destfile.
+-- The file is split at each occurance of <!--|Start file|newfilename|*
+
+function splitfile (destfile,sourcefile)
+print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
+io.input(sourcefile)
+io.output(destfile)
+for line in io.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") ;
+end
+end -- do
+end -- function
+
+-- Incorrect value, so print an error and exit.
+
+function cvalueerror ( line, linenum , cvalue )
+ print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ printconf () ;
+ os.exit(1) ;
+end
+
+-- Load settings from the project's "lwarpmk.conf" file:
+
+function loadconf ()
+-- Default configuration filename:
+local conffile = "lwarpmk.conf"
+-- Optional configuration filename:
+if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end
+-- 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
+else -- file exists
+-- Read the file:
+print ("lwarpmk: Reading " .. conffile ..".")
+io.input(conffile) ;
+-- Scan each line:
+local linenum = 0
+for line in io.lines() do -- scan lines
+linenum = linenum + 1
+i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w-_]*)\"") ;
+-- Error if incorrect enclosing characters:
+if ( i == nil ) then
+print ( linenum .. " : " .. line ) ;
+print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+if ( cvarname == "opsystem" ) then
+ -- Verify choice of opsystem:
+ if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
+ opsystem = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "latexname" ) then
+ -- Verify choice of LaTeX compiler:
+ if (
+ (cvalue == "pdflatex") or
+ (cvalue == "xelatex") or
+ (cvalue == "lualatex")
+ ) then
+ latexname = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "sourcename" ) then sourcename = cvalue
+elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue
+elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue
+elseif ( cvarname == "uselatexmk" ) then uselatexmk = cvalue
+else
+print ( linenum .. " : " .. line ) ;
+print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+end -- do scan lines
+end -- file exists
+-- Select some operating-system commands:
+if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
+rmname = "rm"
+touchname = "touch"
+chmodcmd = "chmod u+x lateximages.sh"
+lateximagesname = "./lateximages.sh"
+elseif opsystem=="Windows" then -- For Windows
+rmname = "DEL"
+touchname = "TOUCH"
+chmodcmd = ""
+lateximagesname = "lateximages.cmd"
+else print ( "lwarpmk: Select Unix or Windows for opsystem" )
+end --- for Windows
+end -- loadconf
+
+-- Scan the LaTeX log file for the phrase "Rerun to get",
+-- indicating that the file should be compiled again.
+-- Return true if found.
+
+function reruntoget (filesource)
+io.input(filesource)
+for line in io.lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+end
+return false
+end
+
+-- Compile one time, return true if should compile again.
+-- fsuffix is "" for print, "_html" for HTML output.
+
+function onetime (fsuffix)
+print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
+err = os.execute(
+-- "echo " ..
+ latexname .. " " .. sourcename..fsuffix )
+if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
+end
+
+-- Compile up to five times.
+-- fsuffix is "" for print, "_html" for HTML output
+
+function manytimes (fsuffix)
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+end end end end end
+end
+
+-- Exit if the given file does not exist.
+
+function verifyfileexists (filename)
+if (lfs.attributes ( filename , "modification" ) == nil ) then
+print ( "lwarpmk: " .. filename .. " not found." ) ;
+os.exit (1) ;
+end
+end
+
+-- Convert <project>_html.pdf into HTML files:
+
+function pdftohtml ()
+ -- Convert to text:
+ print ("lwarpmk: Converting " .. sourcename .."_html.pdf to " .. sourcename .. "_html.html")
+ os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+ -- Split the result into individual HTML files:
+ splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+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 "
+ )
+end
+
+-- lwarpmk --version :
+
+if (arg[1] == "--version") then
+print ( "lwarpmk: " .. printversion )
+
+else -- not -- version
+
+-- print intro:
+
+print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+
+-- lwarpmk print:
+
+if arg[1] == "print" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ os.execute ( "latexmk -pdf -dvi- -ps- -pdflatex=\"" .. latexname .." %O %S\" " .. sourcename ..".tex" ) ;
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists (sourcename .. ".tex") ;
+ -- See if up to date:
+ if (
+ ( lfs.attributes ( sourcename .. ".pdf" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( sourcename .. ".pdf" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("")
+ print ("lwarpmk: Done.") ;
+ else
+ print ("lwarpmk: " .. sourcename .. ".pdf is up to date.") ;
+ end
+end -- not latexmk
+
+-- lwarp printindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "printindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. ".idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk html:
+
+elseif arg[1] == "html" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ -- 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 '$makeindex = q/texindy -M lwarp_html.xdy/' "
+ .. "-pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename .."_html.tex" ) ;
+ if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists ( sourcename .. ".tex" ) ;
+ -- See if exists and is up to date:
+ if (
+ ( lfs.attributes ( homehtmlfilename .. ".html" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( homehtmlfilename .. ".html" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("_html")
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+ else
+ print ("lwarpmk: " .. homehtmlfilename .. ".html is up to date.")
+ end
+end -- not latexmk
+
+elseif arg[1] == "pdftohtml" then
+ loadconf ()
+ pdftohtml ()
+
+-- lwarpmk htmlindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "htmlindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. "_html.idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk limages:
+-- Make the lateximages command file executable,
+-- execute it to create the images,
+-- then touch the source to trigger a recompile.
+
+elseif arg[1] == "limages" then
+loadconf ()
+print ("lwarpmk: Processing images.")
+os.execute(chmodcmd)
+os.execute(lateximagesname)
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk again:
+-- Touch the source to trigger a recompile.
+
+elseif arg[1] == "again" then
+loadconf ()
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk clean:
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+
+elseif arg[1] == "clean" then
+loadconf ()
+removeaux ()
+print ("lwarpmk: Done.")
+
+-- lwarpmk cleanall
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+-- and also project.pdf, *.html
+
+elseif arg[1] == "cleanall" then
+loadconf ()
+removeaux ()
+os.execute ( rmname .. " " ..
+ sourcename .. ".pdf " .. sourcename .. "_html.pdf " ..
+ "*.html"
+ )
+print ("lwarpmk: Done.")
+
+-- lwarpmk with no argument :
+
+elseif (arg[1] == nil) then
+printhelp ()
+
+-- lwarpmk -h or lwarpmk --help :
+
+elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
+printusage ()
+
+else
+print ("lwarpmk: Unknown command \""..arg[1].."\".\n")
+printhelp ()
+end
+
+end -- not --version
Property changes on: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/texlive/linked_scripts/scripts.lst
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/scripts.lst 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Build/source/texk/texlive/linked_scripts/scripts.lst 2017-02-21 23:44:01 UTC (rev 43292)
@@ -81,6 +81,7 @@
lilyglyphs/lily-rebuild-pdfs.py
ltximg/ltximg.pl
luaotfload/luaotfload-tool.lua
+lwarp/lwarpmk.lua
m-tx/m-tx.lua
makedtx/makedtx.pl
make4ht/make4ht
Added: trunk/Master/bin/amd64-freebsd/lwarpmk
===================================================================
--- trunk/Master/bin/amd64-freebsd/lwarpmk (rev 0)
+++ trunk/Master/bin/amd64-freebsd/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/amd64-freebsd/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/amd64-netbsd/lwarpmk
===================================================================
--- trunk/Master/bin/amd64-netbsd/lwarpmk (rev 0)
+++ trunk/Master/bin/amd64-netbsd/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/amd64-netbsd/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/armel-linux/lwarpmk
===================================================================
--- trunk/Master/bin/armel-linux/lwarpmk (rev 0)
+++ trunk/Master/bin/armel-linux/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/armel-linux/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/armhf-linux/lwarpmk
===================================================================
--- trunk/Master/bin/armhf-linux/lwarpmk (rev 0)
+++ trunk/Master/bin/armhf-linux/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/armhf-linux/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-cygwin/lwarpmk
===================================================================
--- trunk/Master/bin/i386-cygwin/lwarpmk (rev 0)
+++ trunk/Master/bin/i386-cygwin/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/i386-cygwin/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-freebsd/lwarpmk
===================================================================
--- trunk/Master/bin/i386-freebsd/lwarpmk (rev 0)
+++ trunk/Master/bin/i386-freebsd/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/i386-freebsd/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-linux/lwarpmk
===================================================================
--- trunk/Master/bin/i386-linux/lwarpmk (rev 0)
+++ trunk/Master/bin/i386-linux/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/i386-linux/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-netbsd/lwarpmk
===================================================================
--- trunk/Master/bin/i386-netbsd/lwarpmk (rev 0)
+++ trunk/Master/bin/i386-netbsd/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/i386-netbsd/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-solaris/lwarpmk
===================================================================
--- trunk/Master/bin/i386-solaris/lwarpmk (rev 0)
+++ trunk/Master/bin/i386-solaris/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/i386-solaris/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/powerpc-linux/lwarpmk
===================================================================
--- trunk/Master/bin/powerpc-linux/lwarpmk (rev 0)
+++ trunk/Master/bin/powerpc-linux/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/powerpc-linux/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/sparc-solaris/lwarpmk
===================================================================
--- trunk/Master/bin/sparc-solaris/lwarpmk (rev 0)
+++ trunk/Master/bin/sparc-solaris/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/sparc-solaris/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/universal-darwin/lwarpmk
===================================================================
--- trunk/Master/bin/universal-darwin/lwarpmk (rev 0)
+++ trunk/Master/bin/universal-darwin/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/universal-darwin/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/win32/lwarpmk.exe
===================================================================
(Binary files differ)
Index: trunk/Master/bin/win32/lwarpmk.exe
===================================================================
--- trunk/Master/bin/win32/lwarpmk.exe 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Master/bin/win32/lwarpmk.exe 2017-02-21 23:44:01 UTC (rev 43292)
Property changes on: trunk/Master/bin/win32/lwarpmk.exe
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/bin/x86_64-cygwin/lwarpmk
===================================================================
--- trunk/Master/bin/x86_64-cygwin/lwarpmk (rev 0)
+++ trunk/Master/bin/x86_64-cygwin/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/x86_64-cygwin/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-darwin/lwarpmk
===================================================================
--- trunk/Master/bin/x86_64-darwin/lwarpmk (rev 0)
+++ trunk/Master/bin/x86_64-darwin/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/x86_64-darwin/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-linux/lwarpmk
===================================================================
--- trunk/Master/bin/x86_64-linux/lwarpmk (rev 0)
+++ trunk/Master/bin/x86_64-linux/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/x86_64-linux/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-solaris/lwarpmk
===================================================================
--- trunk/Master/bin/x86_64-solaris/lwarpmk (rev 0)
+++ trunk/Master/bin/x86_64-solaris/lwarpmk 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/lwarp/lwarpmk.lua
\ No newline at end of file
Property changes on: trunk/Master/bin/x86_64-solaris/lwarpmk
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,40 @@
+
+LaTeX lwarp package v0.20 README.txt
+
+Files included are:
+
+lwarp.pdf: The documentation.
+lwarpmk.lua: A utility program which compiles print or HTML versions.
+lwarp.dtx: The documented source code.
+lwarp.ins: The documentaiton driver.
+
+Derived by compiling lwarp.ins:
+lwarp.sty: The lwarp package.
+lwarp-newproject.sty: Locally generates configuration files per project.
+lwarp-*.sty: Numerous compatibility files for other packages.
+
+
+The documentation includes a file listing "tutorial.tex" which may be
+copy/pasted from the documentation into an editor.
+
+
+NOTE:
+For a TeX distribution, an executable called "lwarpmk" should
+be created which is a copy of or which calls the "lwarpmk.lua" script.
+See the installation instructions in the documentation.
+
+
+License:
+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.
+
+
+Copyright 2016 Brian Dunn
+
+Homepage: http://BDTechConcepts.com
+Email: bd at BDTechConcepts.com
Added: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf 2017-02-21 23:44:01 UTC (rev 43292)
Property changes on: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua (rev 0)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,384 @@
+#!/usr/bin/env texlua
+
+-- Copyright 2016 Brian Dunn
+
+-- Print the usage of the lwarpmk command:
+
+printversion = "v0.20"
+
+function printhelp ()
+print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
+end
+
+function printusage ()
+print ( [[
+
+lwarpmk print [project]: Compile a print version.
+lwarpmk printindex [project]: Process the index for the print version.
+lwarpmk html [project]: Compile an HTML version.
+lwarpmk htmlindex [project]: Process the index for the html version.
+lwarpmk again [project]: Touch the source code to trigger recompiles.
+lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
+lwarpmk pdftohtml [project]:
+ For use with latexmk or a Makefile:
+ Convert project_html.pdf to project_html.html and
+ individual HTML files.
+lwarpmk clean [project]: Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk -h: Print this help message.
+lwarpmk --help: Print this help message.
+
+]] )
+printconf ()
+end
+
+-- Print the format of the configuration file lwarpmk.conf:
+
+function printconf ()
+print ( [[
+An example lwarpmk.conf or <project>.lwarpmkconf project file:
+--
+opsystem = "Unix" (or "Windows")
+latexname = "pdflatex" (or "lualatex", or "xelatex")
+sourcename = "projectname" (the source-code filename w/o .tex)
+homehtmlfilename = "index" (or perhaps the project name)
+htmlfilename = "" (or "projectname" - filename prefix)
+uselatexmk = "false" (or "true" to use latexmk to build PDFs)
+--
+Filenames must contain only letters, numbers, underscore, or dash.
+Values must be in "quotes".
+
+]] ) ;
+end
+
+-- Split one large sourcefile into a number of files,
+-- starting with destfile.
+-- The file is split at each occurance of <!--|Start file|newfilename|*
+
+function splitfile (destfile,sourcefile)
+print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
+io.input(sourcefile)
+io.output(destfile)
+for line in io.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") ;
+end
+end -- do
+end -- function
+
+-- Incorrect value, so print an error and exit.
+
+function cvalueerror ( line, linenum , cvalue )
+ print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ printconf () ;
+ os.exit(1) ;
+end
+
+-- Load settings from the project's "lwarpmk.conf" file:
+
+function loadconf ()
+-- Default configuration filename:
+local conffile = "lwarpmk.conf"
+-- Optional configuration filename:
+if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end
+-- 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
+else -- file exists
+-- Read the file:
+print ("lwarpmk: Reading " .. conffile ..".")
+io.input(conffile) ;
+-- Scan each line:
+local linenum = 0
+for line in io.lines() do -- scan lines
+linenum = linenum + 1
+i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w-_]*)\"") ;
+-- Error if incorrect enclosing characters:
+if ( i == nil ) then
+print ( linenum .. " : " .. line ) ;
+print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+if ( cvarname == "opsystem" ) then
+ -- Verify choice of opsystem:
+ if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
+ opsystem = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "latexname" ) then
+ -- Verify choice of LaTeX compiler:
+ if (
+ (cvalue == "pdflatex") or
+ (cvalue == "xelatex") or
+ (cvalue == "lualatex")
+ ) then
+ latexname = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "sourcename" ) then sourcename = cvalue
+elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue
+elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue
+elseif ( cvarname == "uselatexmk" ) then uselatexmk = cvalue
+else
+print ( linenum .. " : " .. line ) ;
+print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+end -- do scan lines
+end -- file exists
+-- Select some operating-system commands:
+if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
+rmname = "rm"
+touchname = "touch"
+chmodcmd = "chmod u+x lateximages.sh"
+lateximagesname = "./lateximages.sh"
+elseif opsystem=="Windows" then -- For Windows
+rmname = "DEL"
+touchname = "TOUCH"
+chmodcmd = ""
+lateximagesname = "lateximages.cmd"
+else print ( "lwarpmk: Select Unix or Windows for opsystem" )
+end --- for Windows
+end -- loadconf
+
+-- Scan the LaTeX log file for the phrase "Rerun to get",
+-- indicating that the file should be compiled again.
+-- Return true if found.
+
+function reruntoget (filesource)
+io.input(filesource)
+for line in io.lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+end
+return false
+end
+
+-- Compile one time, return true if should compile again.
+-- fsuffix is "" for print, "_html" for HTML output.
+
+function onetime (fsuffix)
+print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
+err = os.execute(
+-- "echo " ..
+ latexname .. " " .. sourcename..fsuffix )
+if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
+end
+
+-- Compile up to five times.
+-- fsuffix is "" for print, "_html" for HTML output
+
+function manytimes (fsuffix)
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+end end end end end
+end
+
+-- Exit if the given file does not exist.
+
+function verifyfileexists (filename)
+if (lfs.attributes ( filename , "modification" ) == nil ) then
+print ( "lwarpmk: " .. filename .. " not found." ) ;
+os.exit (1) ;
+end
+end
+
+-- Convert <project>_html.pdf into HTML files:
+
+function pdftohtml ()
+ -- Convert to text:
+ print ("lwarpmk: Converting " .. sourcename .."_html.pdf to " .. sourcename .. "_html.html")
+ os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+ -- Split the result into individual HTML files:
+ splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+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 "
+ )
+end
+
+-- lwarpmk --version :
+
+if (arg[1] == "--version") then
+print ( "lwarpmk: " .. printversion )
+
+else -- not -- version
+
+-- print intro:
+
+print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+
+-- lwarpmk print:
+
+if arg[1] == "print" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ os.execute ( "latexmk -pdf -dvi- -ps- -pdflatex=\"" .. latexname .." %O %S\" " .. sourcename ..".tex" ) ;
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists (sourcename .. ".tex") ;
+ -- See if up to date:
+ if (
+ ( lfs.attributes ( sourcename .. ".pdf" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( sourcename .. ".pdf" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("")
+ print ("lwarpmk: Done.") ;
+ else
+ print ("lwarpmk: " .. sourcename .. ".pdf is up to date.") ;
+ end
+end -- not latexmk
+
+-- lwarp printindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "printindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. ".idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk html:
+
+elseif arg[1] == "html" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ -- 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 '$makeindex = q/texindy -M lwarp_html.xdy/' "
+ .. "-pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename .."_html.tex" ) ;
+ if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists ( sourcename .. ".tex" ) ;
+ -- See if exists and is up to date:
+ if (
+ ( lfs.attributes ( homehtmlfilename .. ".html" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( homehtmlfilename .. ".html" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("_html")
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+ else
+ print ("lwarpmk: " .. homehtmlfilename .. ".html is up to date.")
+ end
+end -- not latexmk
+
+elseif arg[1] == "pdftohtml" then
+ loadconf ()
+ pdftohtml ()
+
+-- lwarpmk htmlindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "htmlindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. "_html.idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk limages:
+-- Make the lateximages command file executable,
+-- execute it to create the images,
+-- then touch the source to trigger a recompile.
+
+elseif arg[1] == "limages" then
+loadconf ()
+print ("lwarpmk: Processing images.")
+os.execute(chmodcmd)
+os.execute(lateximagesname)
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk again:
+-- Touch the source to trigger a recompile.
+
+elseif arg[1] == "again" then
+loadconf ()
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk clean:
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+
+elseif arg[1] == "clean" then
+loadconf ()
+removeaux ()
+print ("lwarpmk: Done.")
+
+-- lwarpmk cleanall
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+-- and also project.pdf, *.html
+
+elseif arg[1] == "cleanall" then
+loadconf ()
+removeaux ()
+os.execute ( rmname .. " " ..
+ sourcename .. ".pdf " .. sourcename .. "_html.pdf " ..
+ "*.html"
+ )
+print ("lwarpmk: Done.")
+
+-- lwarpmk with no argument :
+
+elseif (arg[1] == nil) then
+printhelp ()
+
+-- lwarpmk -h or lwarpmk --help :
+
+elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
+printusage ()
+
+else
+print ("lwarpmk: Unknown command \""..arg[1].."\".\n")
+printhelp ()
+end
+
+end -- not --version
Property changes on: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,21225 @@
+%
+% \iffalse meta-comment
+%
+% Copyright 2016 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.
+%
+% \fi
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{lwarp}
+%<package> [2017/02/09 v0.20 Allows LaTeX to directly produce HTML5 output.]
+%
+%<*driver>
+\documentclass{ltxdoc}
+
+\usepackage{lmodern}
+% \usepackage{libertine}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage{textcomp} % provides \degree, \textquotesingle, \textmu
+
+\usepackage{newunicodechar}
+\newunicodechar{ff}{ff}
+\newunicodechar{fi}{fi}
+\newunicodechar{fl}{fl}
+\newunicodechar{ffi}{ffi}
+\newunicodechar{ffl}{ffl}
+% \newunicodechar{°}{\degree}
+\newunicodechar{ρ}{\ensuremath{\rho}}
+\newunicodechar{⨯}{\texttimes}
+\newunicodechar{⁄}{\textfractionsolidus}
+% \newunicodechar{®}{\textregistered}
+% \newunicodechar{©}{\textcopyright}
+\newunicodechar{—}{---}
+\newunicodechar{–}{--}
+% \newunicodechar{”}{''}
+% \newunicodechar{“}{``}
+% \newunicodechar{§}{\S}
+% \newunicodechar{¶}{\P}
+% \newunicodechar{†}{\dag}
+\newunicodechar{‡}{\ddag}
+\newunicodechar{Á}{\'{A}}
+\newunicodechar{è}{\`{e}}
+\newunicodechar{ø}{\o{}}
+\newunicodechar{Æ}{\AE{}}
+\newunicodechar{â}{\^{a}}
+\newunicodechar{ô}{\^{o}}
+\newunicodechar{Ô}{\^{O}}
+\newunicodechar{ê}{\^{e}}
+
+\usepackage{microtype}
+
+\usepackage[all,defaultlines=2]{nowidow}
+\usepackage{needspace}
+
+
+\usepackage[log-declarations=false]{xparse}
+
+\usepackage[svgnames]{xcolor}
+\definecolor{myurlcolor}{rgb}{0,0,.7}
+\definecolor{mylinkcolor}{rgb}{.7,0,0}
+\definecolor{codecolor}{rgb}{0,.4,.2}
+\definecolor{overviewcolor}{rgb}{0,.2,.4}
+
+
+\usepackage{graphicx}
+\graphicspath{{images/}}
+
+\usepackage{enumitem}
+
+\usepackage{array}
+\usepackage{longtable}
+\usepackage{booktabs}
+
+\usepackage[normalem]{ulem}
+
+\usepackage{fancyvrb}
+
+\usepackage{capt-of}
+
+\usepackage{comment}
+\excludecomment{testing}
+
+
+
+% \usepackage{morefloats}
+% \usepackage{marginfix}
+
+\usepackage{tocloft}
+\renewcommand{\cftpartfont}{\Large\bfseries}
+\setlength{\cftsecnumwidth}{2.5em}
+\setlength{\cftsubsecnumwidth}{3em}
+\setlength{\cftsubsubsecindent}{2.8em}
+\setlength{\cftsubsubsecnumwidth}{4em}
+
+
+\usepackage{titleps}
+
+\newpagestyle{pageheadfoot}{
+ \headrule
+ \sethead{\pkg{lwarp}}{}{\thepage}
+% \renewcommand{\makefootrule}{\rule[2.5ex]{\linewidth}{.4pt}}
+ \setfoot{}{}{}
+}
+
+\pagestyle{pageheadfoot}
+
+
+
+
+\usepackage{dtxdescribe}
+
+\newcommand{\ItemDescribeMacro}[1]{\item[\cmd{#1}:]\DescribeMacro{#1}}
+\newcommand{\ItemDescribeEnv}[1]{\item[\env{#1}:]\DescribeEnv{#1}}
+\newcommand{\ItemDescribeCounter}[1]{\item[\texttt{#1}:]\DescribeCounter{#1}}
+\newcommand{\ItemDescribeBoolean}[1]{\item[\texttt{#1}:]\DescribeBoolean{#1}}
+
+
+\usepackage[lwarpmk]{lwarp-newproject}
+\usepackage{lwarp}
+
+
+
+\usepackage[pdftex,bookmarks=true,hidelinks,%
+colorlinks,linkcolor=mylinkcolor,urlcolor=myurlcolor,%
+pageanchor=true,hyperindex=true,
+]{hyperref}
+
+\hypersetup{%
+pdfinfo={%
+Title={LaTeX lwarp package},%
+Author={Brian Dunn},%
+Subject={LaTeX to HTML conversion},%
+Keywords={LaTeX, HTML, conversion}%
+}}
+
+
+\usepackage{cleveref}
+
+
+\renewcommand{\partname}{Package}
+\renewcommand*{\thepart}{\arabic{part}}
+
+
+\newcommand{\lmacro}[1]{\textbackslash#1}
+\newcommand{\cmds}[1]{\texttt{#1}}
+\newcommand{\env}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{\textsf{#1}}
+\newcommand{\acro}[1]{\textsc{\lowercase{#1}}}
+
+
+
+
+
+
+
+\newcommand{\codehtml}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML output:~}}}\vspace{-5.25ex}}
+\newcommand{\codeprint}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for PRINT output:~}}}\vspace{-5.25ex}}
+\newcommand{\codeall}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML \& PRINT:~}}}\vspace{-5.25ex}}
+
+\newcommand{\tikz}{Ti\textit{k}z}
+\newcommand{\htmlfive}{\acro{HTML}\oldstylenums{5}}
+\newcommand{\cssthree}{\acro{CSS}\oldstylenums{3}}
+
+\newcommand{\goesto}{$\Rightarrow$}
+
+\newcommand{\userentry}[1]{%
+\par
+\smallskip
+\hspace*{2em}{\footnotesize Enter~$\Rightarrow$}\quad\texttt{#1}
+\smallskip
+}
+
+\newenvironment{docsidebar}[1][]
+{\hfill\minipage{.9\linewidth}\raggedright#1\smallskip\hrule\medskip}
+{\smallskip\hrule\endminipage\hspace*{\fill}\bigskip}
+
+% \makeatletter
+% \newcommand{\watchout}[1][]{%
+% \@bsphack%
+% \marginpar{\raggedleft\textcolor{blue!70!black}{#1} \quad \includegraphics[height=3ex]{symbol_warning.pdf}}
+% \@esphack%
+% }
+% \makeatother
+
+\newcommand{\pdflatexonly}{
+\textcolor{red}{Only pre-loaded if \texttt{pdflatex} is being used.}
+\marginpar{\raggedleft\textcolor{blue!70!black}{\texttt{pdflatex} only:}}
+}
+
+% \newcommand{\margintag}[1]{%
+% \marginpar{\raggedleft\textcolor{blue!70!black}{#1}}%
+% }
+
+
+% The following text is used in multiple places in the documentation:
+
+\newcommand{\documentationnotes}{
+The following sections document the actual implementation of the \pkg{lwarp} package.
+
+The small numbers at the left end of a line refer to line numbers
+\margintag{line numbers}
+in the \texttt{lwarp.sty} file.
+
+Blue-colored tags in the left margin
+\margintag{subjects}
+aid in quickly identifying the subject of each paragraph.
+
+Black-colored tags in the left marign are used to
+\margintag{objects}
+identify programming objects such as files, packages,
+environments, booleans, and counters.
+Items without a tag are command macros.
+Each of these also appears in the index as
+\margintag{index entries}
+individual entries, and are also listed together under ``files'', ``packages'', ``environments'',
+``booleans'', and ``counters''.
+
+Special warnings are marked with a warning icon.
+\watchout[warnings]
+
+\codehtml\vspace*{5.25ex}\ignorespaces
+\codeprint\vspace*{5.25ex}\ignorespaces
+\codeall\vspace*{5.25ex}\ignorespaces
+Green-colored tags in the left margin show which sections of source
+code apply to the generation of \acro{HTML}, print, or both forms of output.
+}
+
+\newcommand{\limitstext}{\cs{textbf}, etc.\ are supported,
+but \cs{bfseries}, etc.\ are not yet supported.}
+
+\newcommand{\limitsverse}{%
+\DescribeMacro{\attrib}
+The documentation for the \pkg{verse} and \pkg{memoir} packages suggest
+defining an \cs{attrib} command, which may already exist in current documents,
+but it will only work for print output.
+\pkg{lwarp} provides \cs{attribution}, which
+works for both print and \acro{HTML} output. To combine the two so that
+\cs{attrib} is used for print and \cs{attribution} is used for \acro{HTML}:
+
+\begin{docsidebar}
+\ttfamily
+\cs{begin}\{warpHTML\}
+
+\cs{let}\cs{attrib}\cs{attribution}
+
+\cs{end}\{warpHTML\}
+\end{docsidebar}
+
+\DescribeLength{vleftskip}
+\DescribeLength{vleftmargini}
+These lengths are used by \pkg{verse} and \pkg{memoir} to control the left margin,
+and they may already be set by the user for print output. New lengths
+ \DescribeLength{HTMLvleftskip}\DescribeLength{HTMLleftmargini}
+\cs{HTMLvleftskip} and \cs{HTMLleftmargini} are provided to control the
+margins in \acro{HTML} output. These new lengths may be set by the user
+before any \env{verse} environment, and persist until they are manually changed again.
+One reason to change \cs{HTMLleftmargini} is if there is a wide
+\cs{flagverse} in use, such as the word ``Chorus'', in which case the value of
+\cs{HTMLleftmargini} should be set to a wide enough length to contain ``Chorus''.
+The default is wide enough for a stanza number.
+
+Horizontal spacing relies on \texttt{pdftotext}'s ability to discern the
+\texttt{-layout} of the
+text in the \acro{HTML}-tagged \acro{PDF} output. For some settings of
+\cs{HTMLleftmargini} or \cs{HTMLleftskip} the horizontal alignment may not work out
+exactly, in which case a label may be shifted by one space.
+}
+
+
+\newcommand{\limitslateximagefontsize}{%
+The size of the math and text used
+\margintag{SVG image font size}
+in the \acro{SVG} image may be adjusted
+\index{font>size --- lateximage}%
+\index{font>size --- math, SVG}%
+\index{math>font size --- SVG}%
+\index{lateximages>font size}%
+by setting \cs{LateximageFontSizeName} to a font size name --- \emph{without the backslash}, for ex: \\
+\hspace*{.5in}\texttt{\cs{renewcommand}\{\cs{LateximageFontSizeName}\}\{\textcolor{red}{large}\}}
+}
+
+
+\newcommand{\limitsmath}{%
+Math may be rendered as \acro{SVG} graphics or using the \textsc{MathJax} JavaScript display engine.
+\index{JavaScript>MathJax}
+
+For \acro{SVG} math,
+\margintag{SVG math option}
+math is rendered as usual by \LaTeX{} into the initial \acro{PDF} file using the
+\index{math>SVG summary}%
+\index{SVG>math summary}%
+current font\footnote{See \cref{sec:xfrac} regarding fonts and fractions.},
+then is captured from the \acro{PDF} and converted to \acro{SVG} graphics
+via a number of utility programs.
+The \acro{SVG} format is a scalable-vector web format, so math may be typeset by \LaTeX{}
+with its fine control and precision, then displayed or printed at any size,
+depending on (sometimes broken) browser support.
+An \acro{HTML} \texttt{ALT} tag carries the \LaTeX{} code which generated the
+math, allowing copy/paste of the \LaTeX{} math expression into other documents.
+
+\limitslateximagefontsize
+
+As currently implemented,
+\margintag{SVG files}
+each instance of math creates a new \acro{SVG} file. 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 checksumming
+may be used to remove the need for duplicate files.
+
+Another approach would be
+\margintag{SVG inline}
+to in-line the \acro{SVG} files directly into the \acro{HTML}.
+This avoids having a large number of files and potentially speeds loading the images,
+but dis-allows the possibility of sharing one file among many instances without
+user intervention.
+
+Others have used \acro{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
+of larger files, but \acro{SVG} files are also larger as well.
+
+Conversion to Math\acro{ML} might be a better approach,
+\margintag{MathML}
+among other things
+allowing a more compact representation of math than \acro{SVG} drawings.
+Problems with Math\acro{ML} include limited browser support and some
+issues with the fine control of the appearance of the result.
+
+The popular MathJax alternative (\url{mathjax.org}) may be used to display math.
+\margintag{MathJax math option}
+\DescribeProgram{MathJax}
+\index{math>MathJax summary}
+\index{MathJax>summary}
+
+When MathJax is enabled, math is rendered twice:
+\begin{enumerate}
+\item As regular \LaTeX\ \acro{PDF} output placed inside an \acro{HTML} comment, allowing
+equation numbering and cross referencing to be almost entirely under the control of \LaTeX, and
+\item As detokenized printed \LaTeX{} commands placed directly into the \acro{HTML} output
+for interpretation by the MathJax display scripts. An additional script is used to
+pre-set the equation number format and value according to the current \LaTeX\ values,
+and the MathJax cross-referencing system is ignored in favor of the \LaTeX\ internal system,
+seamlessly integrating with the rest of the \LaTeX\ code.
+\end{enumerate}
+
+Limitations when using MathJax include:
+\margintag{MathJax limitations}
+\DescribeProgram{MathJax}
+\begin{itemize}
+\item In document classes which have chapters,
+ \margintag{chapter numbers}%
+ \index{MathJax>tagged equations}%
+ \index{tagged equations>Mathjax}%
+ \cs{tag}ged equations have the chapter number prepended in \acro{HTML} output, unlike \LaTeX.
+ \cs{tag*} equations (correctly) do not.
+ This may be improved with future versions of the MathJax support script.
+
+ \href{https://groups.google.com/forum/\#!topic/mathjax-users/jUtewUcE2bY}
+ {\texttt{https://groups.google.com/forum/\#!topic/\\
+ \hspace*{2em}mathjax-users/jUtewUcE2bY}}
+
+\item MathJax itself does not support subequations.
+ \margintag{subequations}
+\index{MathJax>subequations}%
+\index{subequations>MathJax}%
+ This may be improved by parsing the \LaTeX{}
+ math expression to manually insert tags, but this has not yet been done.
+\item Footnotes inside equations are not yet supported while using MathJax.
+ \margintag{footnotes in math}
+\item Math appearing inside a lateximage,
+ \margintag{lateximage}
+ and therefore also inside a \tikz{} or \env{picture}
+ environment, is rendered as SVG math even if MathJax is used in the rest of the document.
+\item Usage of \pkg{siunitx} inside a math equation
+ \margintag{siunitx}
+ is supported via a third-party MathJax extension.
+ While inside a math expression, do not use \cs{SI} or \cs{si} inside \cs{text},
+ where it will be rendered as normal text.
+ \watchout[siunitx inside an equation]
+
+ \href{https://github.com/mathjax/MathJax-third-party-extensions/tree/master/siunitx}
+ {\texttt{https://github.com/mathjax/MathJax-third-party-extensions/\\
+ \hspace*{2em}tree/master/siunitx}}
+
+\item MathJax does not automatically support custom \LaTeX{} macros,
+ \margintag{\LaTeX{} macros}
+ but they may be set up by the user.
+\end{itemize}
+}
+
+\newcommand{\limitsgraphics}{%
+\cs{graphicspath} only works for a single directory;
+\margintag{\cs{graphicspath}}
+all graphics must be in this directory.
+
+For \cs{includegraphics}, avoid \texttt{px} and \% units for width and height, or
+\margintag{units}
+enclose them inside \env{warpHTML} environments.
+For font-proportional image sizes, use \texttt{ex} or \texttt{em}.
+For fixed-sized images, use
+\texttt{cm}, \texttt{mm}, \texttt{in}, \texttt{pt}, or \texttt{pc}.
+Using the keys \cmds{width=.5\lmacro{linewidth}},
+or similar for \cmds{\lmacro{textwidth}} or \cmds{\lmacro{textheight}}
+to give fixed-sized images proportional to a 6 by 9 inch text area.
+
+\cs{includegraphics} accepts \texttt{width} and \texttt{height},
+\margintag{options}
+\texttt{origin}, \texttt{rotate} and \texttt{scale},
+plus a new \texttt{class} key.
+
+With \acro{HTML} output, \cs{includegraphics} accepts an optional
+\margintag{\acro{HTML} class}
+\texttt{class=xyz} keyval combination, and if this is given then
+the \acro{HTML} output will include that class for the image.
+The class is ignored for print output.
+
+For \cs{includegraphics} the user should provide both \texttt{.pdf} and \texttt{.svg}
+images, but always refer to
+\watchout[image file types]
+\texttt{.pdf} images in the document source.
+All \cs{includegraphics} references to \texttt{.pdf} will automatically
+be changed to \texttt{.svg} for \acro{HTML} output, and will be left as \texttt{.pdf} for print output.
+Images may also be \texttt{.jpg} and \texttt{.png}, and will be used as-is for either output.
+
+\cs{rotatebox} accepts the optional \texttt{origin} key.
+\margintag{\cs{rotatebox}}
+
+\cs{rotatebox}, \cs{scalebox}, and \cs{reflectbox} depend on modern browser
+support.
+\watchout[browser support]
+The \cssthree{} standard declares that when an object is transformed
+the whitespace which they occupied is preserved,
+unlike \LaTeX{}, so expect some
+ugly results for scaling and rotating.
+}
+
+\newcommand{\limitsxcolor}{%
+Color definitions, models, and mixing are fully supported
+\margintag{support}
+without any changes required.
+
+Colored tables are ignored. Use \acro{CSS} to style tables.
+\margintag{tables}
+
+\cs{textcolor}, \cs{colorbox}, and \cs{fcolorbox} are supported.
+\margintag{colored text and boxes}
+
+\cs{color} and \cs{pagecolor} are ignored.
+Use \acro{CSS} or \cs{textcolor} where possible.
+\margintag{\cs{color} and \cs{pagecolor}}
+}
+
+\newcommand{\limitstabular}{%
+\begin{itemize}
+\item Vertical rules are not yet supported.
+ \margintag{column types}
+
+\item \texttt{*} in a column specification is not used (so far).
+ Repeat the column type the correct number of times.
+
+\item Multirow and multicolumn cannot be used at the same time.
+ \watchout[\cs{multirow} \& \cs{multicolumn}]
+ (No rectangular holes wider than one column or taller than one row.)
+
+\item For multirow, insert \cs{mrowcell} into any empty multi-row cells.
+ This will be a null function for the print output, and is a placeholder for
+ \watchout[\cs{multirow}]
+ parsing the table for \acro{HTML} output.
+
+\item If a multirow reaches to the bottom of a table,
+ and \cs{bottomrule} does not go over to that edge,
+ \margintag{\cs{multirow} with rules}
+ try adding a line of empty cells below the \cs{bottomrule}.
+ This may be a browser bug.
+ \changes{v0.19}{2016/05/28}{Docs: \env{multirow} browser bug workaround.}
+
+\item If a \cs{midrule} is desired after the last row,
+ \margintag{rule at last row}
+ an additional row of blank cells must be used.
+
+\item Multiple paragraphs in one cell of a p, b, m column
+ must have \cs{newline} between paragraphs.
+ \watchout[paragraphs]
+
+\item \cs{cmidrule} does not support width or trim options
+ due to \acro{CSS} limitations.
+ \margintag{\cs{cmidrule} width, trim}
+
+\item For \pkg{longtable}, place headings and footings which
+ \margintag{\env{longtable} headings}
+ do not apply to \acro{HTML} inside \cs{warpprintonly\{\}}.
+
+\item For \cs{toprule} and \cs{bottomrule},
+ when combined with a \env{warpprint} or \env{warpHTML} environment,
+ \watchout[\cs{warpprintonly}]
+ if a ``misplaced \cs{noalign}'' error occurs,
+ change \\
+ \hspace*{.375in}\cmds{This \& That \cs{endhead}} \\
+ to \\
+ \hspace*{.375in}\cmds{\cs{warpprintonly}\{This \& That \cs{endhead}\}} \\
+ and likewise with the other \cs{end} headings.
+ Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \acro{HTML} output.
+
+\item For S columns (from the \pkg{siunitx} package),
+ \watchout[S columns]
+ while producing print output,
+ anything non-numeric must be placed
+ inside \{ \} braces, including commands such as \cs{multirow}.
+ While producing \acro{HTML} output, though, anything placed inside
+ braces is not seen by \pkg{lwarp}'s tabular handling algorithm.
+ To resolve this problem, make a copy of the row, with one version
+ for print output, containing the extra braces, and another version
+ for \acro{HTML} output, without the extra braces, such as: \\
+ \hspace*{.375in} \cs{warpprintonly}\{\texttt{1 \& 2 \& \textcolor{red}{\{}\cs{multirow}\{2\}\{2cm\}\{Text\}\textcolor{red}{\}} \& 3 \textbackslash\textbackslash\}} \\
+ \hspace*{.375in} \cs{warpHTMLonly}\{\texttt{1 \& 2 \& \cs{multirow}\{2\}\{2cm\}\{Text\} \& 3 \textbackslash\textbackslash\}}
+
+\end{itemize}
+}
+
+\newcommand{\limitsminipage}{%
+Minipages and parboxes will be placed side-by-side in \acro{HTML}
+unless you place a \cs{newline} between them.
+\margintag{placement}
+
+A line of text with an inline minipage
+\margintag{inline}
+or parbox will have the minipage or parbox placed onto its own line,
+because a paragraph is a block element and cannot be made \texttt{inline-block}.
+
+There is limited support for minipages inside an \acro{HTML} |span|.
+\margintag{in a span}
+An \acro{HTML} |div| cannot appear inside a |span|.
+While in a |span|, minipages and parboxes are ignored.
+Use \cs{newline} or \cs{par} for an \acro{HTML} break.
+
+When using \cs{linewidth}, \cs{textwidth}, and \cs{textheight},
+\margintag{size}
+widths and heights are scaled proportionally to a 6\texttimes{}9 inch text area.
+
+A new macro \cs{minipagefullwidth} requests
+\margintag{full-width minipages}
+that the next minipage be generated
+without an \acro{HTML} \texttt{width} tag, allowing it to be the full width of
+the display rather than the fixed width given.
+
+Nested minipages adopt their parent's text alignment in \acro{HTML},
+whereas in regular \LaTeX{} \acro{PDF} output they do not.
+\watchout[text alignment]
+Use a \env{flushleft} or similar environment in the child minipage
+to force a text alignment.
+}
+
+\newcommand{\limitsmdframed}{%
+Most basic functionality is supported, including
+\margintag{support}
+frame background colors and single-border colors and thickness,
+title and subtitle background colors and borders and thickness,
+border radius, and shadow.
+CSS classes are created for \pkg{mdframed} environments and frame titles.
+
+Only load \pkg{mdframed} in a \env{warpprint} environment.
+\pkg{lwarp} pre-loads \pkg{mdframed} in HTML with \texttt{framemethod=none}.
+\watchout[loading]
+
+For title font, use\\
+ \hspace*{.25in}\texttt{frametitlefont=\cs{textbf},}\\
+\margintag{font}%
+instead of\\
+ \hspace*{.25in}\texttt{frametitlefont=\cs{bfseries},}\\
+where \cs{textbf} must appear just before the comma and will receive the
+following text as its argument (since the text happens to be between braces
+in the \pkg{mdframed} source).
+Since \pkg{lwarp} does not support \cs{bfseries} and friends,
+only one font selection may be made at a time.
+
+\texttt{theoremtitlefont} is not supported, since the following text is not
+\margintag{theoremtitlefont}
+in braces in the \pkg{mdframed} source.
+
+Footnotes are currently placed at the bottom of the \acro{HTML} page.
+\margintag{footnotes}
+
+\texttt{userdefinedwidth} and \texttt{align} are currently ignored.
+\margintag{ignored options}
+}
+
+\newcommand{\limitscaption}{%
+To ensure proper float numbering, set caption positions
+such as:
+
+\hspace*{2em} \texttt{\cs{captionsetup}[table]\{position=top\}} \\
+\hspace*{2em} \texttt{\cs{captionsetup}[figure]\{position=bottom\}}
+
+Similarly for \texttt{subtable}, \texttt{subfigure},
+and \texttt{longtable}.
+}
+
+\newcommand{\limitscombiningfloats}{%
+If using \cs{newfloat}, \pkg{trivfloat}, and/or
+\pkg{algorithmicx} together, see \cref{sec:combiningfloats}.
+\watchout[package conflicts]
+}
+
+\newcommand{\limitssubfig}{%
+At present, subfigures before the enclosing figure/table's \cs{caption}
+\margintag{LOF/LOT}
+would appear in the List of Figures/Tables before the enclosing figure/table,
+therefore \pkg{lwarp} does not place subfigures in the LOF/LOT.
+
+In the document source, use \cs{hfill} and \cs{hspace*}
+\margintag{horizontal spacing}
+between subfigures to spread them
+apart horizontally. The use of other forms of whitespace may
+cause paragraph tags to be generated, resulting in subfigures
+appearing on the following lines instead of all on a single line.
+}
+
+\newcommand{\limitsfloatrow}{%
+The emulation of \pkg{floatrow} does not support \cs{FBwidth} or \cs{FBheight}.
+These values are pre-set to \texttt{.3\cs{linewidth}} and \texttt{2in}.
+\watchout[\cs{FBwidth}, \cs{FBheight}]
+Possible solutions include:
+\begin{itemize}
+\item Use fixed lengths. \pkg{lwarp} will scale the \acro{HTML} lengths appropriately.
+\item Use \env{warpprint} and \env{warpHTML} environments to select appropriate
+ values for each case.
+\item Inside a \env{warpHTML} environment, manually change
+ \cs{FBwidth} or \cs{FBheight} before the \cs{ffigbox} or \cs{ttabbox}.
+ Use \cs{FBwidth} or \cs{FBheight} normally afterwards; it will be used as
+ expected in print output, and will use your custom-selected value in \acro{HTML}
+ output. This custom value will be used repeatedly,
+ until it is manually changed to a new value.
+\end{itemize}
+}
+
+\newcommand{\limitssiunitx}{%
+Do not use \cmds{per-mode=fraction}, which cannot be seen by the final \cmds{pdftotext} conversion.
+\watchout[per-mode]
+}
+
+\newcommand{\limitstikz}{%
+For recent versions of \tikz{} (v3.0.0 --- 2013/12/20 and later), include in the document
+\watchout[preamble]
+preamble: \\
+\hspace*{.25in} \texttt{\cs{usetikzlibrary\{babel\}} \% v3.0.0 and up}
+
+For older versions of \tikz{} without the \tikz{} \texttt{babel} library,
+\pkg{lwarp} automatically handles the catcode change for the \$ math shift.
+}
+
+
+\newcommand{\limitsbabelone}{%
+If using \pkg{babel} with French, use \\
+\hspace*{.25in}\cs{frenchbsetup\{StandardLists=true\}} \\
+\watchout[French]%
+to preserve the special \acro{HTML} and \pkg{enumitem} list handling.
+}
+
+\newcommand{\limitsbabeltwo}{%
+Also, when French is used, the caption separator is
+\margintag{\cs{CaptionSeparator}}
+changed to a dash. The following may be used to restore it to a colon: \\
+\hspace*{.25in}%
+\texttt{\cs{renewcommand}*\{\cs{CaptionSeparator}\}\{:\textasciitilde\}}
+}
+
+\newcommand{\limitsnewclude}{%
+\pkg{newclude} modifies \cs{label} in a non-adaptive way, so
+\pkg{newclude} must be loaded before \pkg{lwarp} is loaded.
+\watchout[loading]
+
+\begin{docsidebar}[Ex:]
+\cs{documentclass\{article\}} \\
+\ldots <font setup> \\
+\cs{usepackage\{newclude\}} \\
+\cs{usepackage[warpHTML]\{lwarp\}} \\
+\ldots
+\end{docsidebar}
+}
+
+\newcommand{\limitsnewtxmath}{%
+\pkg{newtxmath} must be loaded after \pkg{lwarp}.
+\watchout[loading]
+}
+
+\newcommand{\limitsenumitem}{%
+\pkg{enumitem} is pre-loaded during \acro{HTML} output.
+\margintag{enumitem}
+Many of the spacing options are rendered irrelevant by \cmds{pdftotext} and
+\acro{HTML}. Numbering, labels, and \cs{newlist} function correctly.
+}
+
+\newcommand{\osportabilityusage}{%
+\pkg{lwarp} tries to detect which operating system is being used.
+
+If \textsc{MS-Windows} is not correctly detected,
+\DescribeProgram{MS-Windows} \DescribeProgram{Windows}
+use the command \cs{warpOSwindows} in the document
+\DescribeMacro{\warpOSwindows}
+preamble after \pkg{lwarp} is loaded. This modifies the
+creation of the \\ \hspace*{2em}\texttt{lateximages.sh} or \texttt{lateximages.cmd} \\
+batch file, which is an operating-system-specific shell script used to take
+individual pages of the \LaTeX{} \acro{PDF} output and
+convert and store them in individual \acro{SVG} files.
+}
+
+
+\setlength{\marginparsep}{1em}
+\setlength{\marginparpush}{.7ex}
+\setlength{\parindent}{0em}
+\setlength{\parskip}{2ex}
+\setlength{\IndexMin}{40ex}
+
+
+\setcounter{IndexColumns}{2}
+
+\DisableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{lwarp.dtx}
+\end{document}
+%</driver>
+
+% \fi
+
+
+% \iffalse
+%<*package>
+% \fi
+%
+% \CheckSum{8260}
+%
+% \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
+% Lower-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
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+
+%
+% \changes{v0.10}{2016/03/08}{\ 2016/03/08 Initial version}
+% \changes{v0.11}{2016/03/11}{\ 2016/03/11}
+% \changes{v0.11}{2016/03/10}{Test Suite: limages and index in README.txt}
+% \changes{v0.11}{2016/03/11}{Test Suite: MS-Windows in README.txt}
+% \changes{v0.12}{2016/03/14}{\ 2016/03/14}
+% \changes{v0.12}{2016/03/14}{Global: Uses \textbackslash{}p@(type) in float captions.}
+% \changes{v0.12}{2016/03/14}{Test Suite: Sub-figures}
+% \changes{v0.13}{2016/03/24}{\ 2016/03/24}
+% \changes{v0.13}{2016/03/23}{Test Suite: Ordinals, Subcaption}
+% \changes{v0.13}{2016/03/24}{Removed package: subfig}
+% \changes{v0.14}{2016/03/31}{\ 2016/03/31}
+% \changes{v0.14}{2016/03/29}{Test Suite: Assigned cleveref name for Test Float.}
+% \changes{v0.14}{2016/03/31}{Test Suite: Floatrow}
+% \changes{v0.15}{2016/04/06}{\ 2016/04/06}
+% \changes{v0.15}{2016/03/31}{Files: lwarp\_formal.css added.}
+% \changes{v0.15}{2016/03/31}{Test Suite: test\_suite\_formal.css file added.}
+% \changes{v0.16}{2016/04/11}{\ 2016/04/11}
+% \changes{v0.16}{2016/04/07}{Test Suite: Supports XeLaTeX, LuaLaTeX.}
+% \changes{v0.16}{2016/04/08}{Test Suite: Lwarp no longer selects fonts.}
+% \changes{v0.16}{2016/04/08}{Removed package: suffix}
+% \changes{v0.17}{2016/04/14}{\ 2016/04/14}
+% \changes{v0.17}{2016/04/14}{Test Suite: Mdframed}
+% \changes{v0.17}{2016/04/14}{Test Suite: Fix: Print-version front-matter page numbers.}
+% \changes{v0.18}{2016/05/19}{\ 2016/05/19}
+% \changes{v0.18}{2016/04/23}{Files: lwarp.css and lwarp\_formal.css: Improved responsive design.}
+% \changes{v0.18}{2016/04/23}{File: lwarp.css: Improved TOC outline display.}
+% \changes{v0.18}{2016/05/13}{Test Suite: Verse package}
+% \changes{v0.19}{2016/06/08}{\ 2016/06/08}
+% \changes{v0.19}{2016/05/25}{File: \texttt{lwarp\_mathjax.txt} added.}
+% \changes{v0.19}{2016/06/01}{File: lwarp.css: \texttt{tnoteitemheader} added}
+% \changes{v0.20}{2017/02/09}{\ 2017/02/09}
+% \changes{v0.20}{2016/06/27}{Test Suite: HTML meta descriptions.}
+% \changes{v0.20}{2016/09/19}{File: lwarp.css: Minor fixes for validation.}
+% \changes{v0.20}{2016/12/08}{Docs: Improved index.}
+% \changes{v0.20}{2016/12/17}{File: lwarpmk used to compile print, HTML, indexes, and lateximages.}
+% \changes{v0.20}{2016/12/17}{Removed reliance on make, grep, gawk.}
+% \changes{v0.20}{2016/12/17}{Parallel versions of aux files for print/HTML.}
+% \changes{v0.20}{2017/01/03}{Moved sidebar and example code to test suite.}
+% \changes{v0.20}{2017/01/25}{\pkg{caption} and \pkg{subcaption} supported.}
+
+
+
+
+% \GetFileInfo{lwarp.sty}
+%
+% \DoNotIndex{\newcommand,\renewcommand,\addtocounter,\begin,\end,\begingroup,\endgroup}
+% \DoNotIndex{\global,\ifbool,\ifthenelse,\isequivalentto,\let}
+% \DoNotIndex{\booltrue,\boolfalse}
+% \expandafter\DoNotIndex\expandafter{\detokenize{\(,\),\,,\\,\#,\$,\%,\^,\_,\~,\ ,\&,\{,\}}}
+%
+%
+% \thispagestyle{empty}
+%
+% \begin{center}
+% \vfill
+% \includegraphics[width=.3\linewidth]{lwarp_logo.pdf}
+% \vfill
+% {\Huge The \textbf{lwarp} package}
+%
+% \fileversion{} --- \filedate
+%
+% \bigskip
+%
+% {\Large \textup{\LaTeX{} to HTML5}}
+%
+% \bigskip
+%
+% {\small\copyright{} 2016} Brian Dunn\\ \small \texttt{bd at BDTechConcepts.com}
+%
+% \bigskip
+%
+%
+% ^^A % \title{The \pkg{lwarp} package\thanks{This document
+% ^^A % corresponds to \pkg{lwarp}~\fileversion,
+% ^^A % dated \filedate.}}
+% ^^A % \author{{\small\copyright{} 2016} Brian Dunn\\ \small \texttt{bd at BDTechConcepts.com}}
+% ^^A % \published{}
+% ^^A % \subtitle{\textup{\LaTeX{} to HTML5}}
+% ^^A %
+% ^^A % \maketitle
+%
+% \vfill
+%
+% \begin{abstract}
+% \noindent
+% The \pkg{lwarp} package causes \LaTeX\ to directly produce \htmlfive\ output,
+% using external utility programs only for the final conversion of text and images.
+% Math may be represented by \acro{SVG} files or MathJax.
+%
+% Documents may be produced by \LaTeX, \LuaLaTeX, or \XeLaTeX.
+% A TexLua script removes the need for system utilities such as |make| and |gawk|,
+% and also supports |xindy| and |latexmk|. Configuration is automatic at the
+% first manual compile.
+%
+% Print and \acro{HTML} versions of each document may coexist, each with its own
+% set of auxiliary files. Support files are self-generated on request.
+%
+% A modular package-loading system uses the \pkg{lwarp} version of a package for
+% \acro{HTML} when available.
+% Several dozen \LaTeX\ packages are supported with these high-level source
+% compatibility replacements.
+%
+% A tutorial is provided to quickly introduce the user to the major components
+% of the package.
+%
+%
+% \vfill
+%
+% \begin{center}
+% \textcolor{blue}{To update existing projects, see \cref{sec:updates},
+% \nameref{sec:updates}.}
+%
+% \vfill
+%
+% \begin{minipage}{\linewidth}
+% \raggedright
+% \textcolor{red!30!black}{\bfseries
+% Note that this is still a ``beta'' version of \pkg{lwarp},
+% and some things may change in response to user feedback and
+% further project development.
+% }
+% \end{minipage}
+%
+% \end{center}
+% \end{abstract}
+%
+% \vspace*{\fill}
+% \vspace*{\fill}
+% \vspace*{\fill}
+%
+% \end{center}
+%
+% \clearpage
+%
+%
+% \tableofcontents
+%
+% \clearpage
+% \listoffigures
+% \listoftables
+%
+%
+% \thispagestyle{pageheadfoot}
+%
+% \clearpage
+%
+% \part{lwarp.sty}
+%
+% \section{Updates}
+% \label{sec:updates}
+%
+% For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
+%
+% \begin{description}
+% \item[v0.20:] \
+% \begin{itemize}
+% \item The |makefile| and related infrastructure
+% has been replaced by the |lwarpmk| utility.
+% This provides increased portability, reduced dependencies,
+% and much simpler installation and setup.
+% \item The |lwarp-newproject| package is now used to locally create
+% support files.
+% \item The print and \acro{HTML} versions of a document may co-exist with their
+% own sets of auxiliary files.
+% \item Package handling is now controlled by a modular system which
+% looks for and loads an |lwarp-<package>| version if available.
+% \item High-level source compatibility is provided for all supported
+% packages, almost totally eliminating the need
+% for |warpprint| and |warpHTML| environments.
+% \item A large number of additional packages are supported.
+% \item A new tutorial is included in the documentation, and
+% many obsolete sections have been removed.
+% \item \cs{NewHTMLdescription} sets the \acro{HTML} meta description tag for each file.
+% See \cref{sec:htmldescription}.
+% \item \cs{HTMLFileName} may now be empty, allowing filenames without a prefix.
+% Lwarp no longer automatically appends a |-| character.
+% \watchout
+% For existing projects, add a |-| to the end of \cs{HTMLFileName}.
+% \item \cs{HomeHTMLFileName} and \cs{HTMLFileName} no longer use
+% escaped underscore\watchout\
+% characters. Underscores may be used in filenames as-is.
+% \item \pkg{lwarp} now tries to auto-detect the operating system,
+% and \cs{warpOSwindows} is only needed if the auto-detection
+% fails to detect Windows.
+% \item Tabular column types |@|, |>|, and |<| are now supported.
+% \item |BlockClass| and \cs{InlineClass} add an optional style.
+% \item The |sidebar| and |example| environments have been moved to the
+% test suite, and are no longer included in \pkg{lwarp}.
+% \end{itemize}
+% \item[v0.19:] \
+% \begin{itemize}
+% \item \textsc{MathJax} now may be used to display math via the |mathjax| option.
+% See \cref{sec:loading,sec:limitsmath}.
+% To use MathJax with a pre-existing project,
+% \watchout
+% copy or link the file |lwarp_mathjax.txt| to the project's directory.
+% \item \cs{rule} added, supporting width, height, raise, \cs{textcolor}.
+% \item \cs{LateximageFontSizeName} provides user-adjustable font size for math
+% and \env{lateximage}s.
+% \item \cs{minipagefullwidth} requests that the next minipage be
+% full-width in \acro{HTML}, but still the assigned width in print.
+% \item \env{minipage} improved side-by-side rendering.
+% \item CSS class |tablenotes| is provided for table note items.
+% \item \cs{warpprintonly} replaces \cs{rowprintedonly},
+% and \cs{warpHTMLonly} is added. These behave like the \env{warpprint}
+% \watchout
+% and \env{warpHTML} environments, and are generally useful, so they replace
+% the previously table-specific syntax.
+% \item \pkg{cleveref} is loaded \cs{AtEndPreamble} for improved reliability.
+% See \cref{sec:cleveref}.
+% \item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \acro{HTML}.
+% \item \tikz\ improved catcode handling.
+% \end{itemize}
+% \item[v0.18:] \
+% \begin{itemize}
+% \item The \pkg{verse} package and the verse-related commands from
+% the \pkg{memoir} package are now supported.
+% \item Responsive web design has been improved for the sideTOC.
+% \item \cs{includegraphics} now maintains relative sized for em, ex, and \%.
+% \end{itemize}
+% \item[v0.17:] \
+% \begin{itemize}
+% \item \pkg{mdframed} package is supported.
+% \end{itemize}
+% \item[v0.16:] \
+% \begin{itemize}
+% \item Font and input encoding are now controlled by the user, and
+% \pkg{lwarp} is loaded after fonts have been selected.
+% \item Support for \XeLaTeX{} and \LuaLaTeX. See \cref{sec:fonts}.
+% \end{itemize}
+% \end{description}
+%
+% \clearpage
+%
+% \section{Introduction}
+% \changes{v0.19}{2016/05/25}{Introduction: MathJax support mentioned.}
+%
+% The \pkg{lwarp} project aims to allow a rich \LaTeX{} document to be converted to a reasonable \acro{HTML}
+% interpretation. No attempt has been made to force \LaTeX{} to provide for every
+% \acro{HTML}-related possibility, and \acro{HTML} cannot exactly render every possible \LaTeX{} concept.
+% Where compromise is necessary, it is desirable to allow the print output to remain
+% typographically rich, and compromise only in the \acro{HTML} conversion.
+%
+% Several ``modern'' features of \htmlfive, \cssthree, and \acro{SVG}
+% are employed to allow a fairly feature-rich document
+% without relying on the use of Javascript.
+% Limited testing on older browsers show that these new features
+% degrade gracefully, although the \acro{SVG} format
+% for math may not be available on small cell phones.
+%
+% |pdflatex|, |xelatex|, or |lualatex| is used, allowing \pkg{lwarp} to process the usual image formats.
+% While generating \acro{HTML} output, \acro{SVG} files are used in placed of \acro{PDF}.
+% Other formats such as \acro{JPG} are used as-is.
+%
+% \acro{SVG} images may be used for math,
+% and are also used for \env{picture}, and \tikz{} environments,
+% as this format has
+% better browser and e-book support than Math\acro{ML} (as of this writing),
+% while still allowing for the high-quality display and printing of images (again, subject to potentially
+% bug-ridden\footnote{Firefox has had an on-again/off-again bug for quite some time regareding
+% printing \acro{SVG}s at high resolution.} browser
+% support).\footnote{Aside --- The author, being a programmer, believes in the movement towards
+% ``logical punctuation''. (Look it up.)
+%
+% Aside to the aside --- The author also believes that space should be on
+% either side of an em-dash, employing the symbol as a separator rather than something looking
+% like a chemical \textbf{bond---as} shown here, but is willing to abide by
+% Chicago style when necessary.}
+% Further, \acro{SVG} images allow math to be presented with
+% the same precise formatting as in the print version.
+% Math is accompanied by ALT tags holding the \LaTeX{} source for the expression, allowing it to be
+% copy/pasted into other documents.\footnote{There seems to be some debate as to whether
+% Math\acro{ML} is actually an improvement over \LaTeX{} for sharing math. The author has no
+% 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.
+%
+% The \textsc{MathJax} JavaScript display engine may be selected
+% for math display instead of using \acro{SVG} images.
+% Subject to browser support and Internet access,
+% MathJax allows an \acro{HTML} page to display
+% math without relying on a large number of external image files,
+% one per math expression. \pkg{lwarp} maintains \LaTeX\ control for cross-referencing
+% and equation numbering\,/\,formatting.
+%
+% \hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill}
+%
+% The \pkg{lwarp} package allows \LaTeX{} to directly generate \htmlfive{} tags from a \LaTeX{}
+% source document, with only minor intervention on the user's part.
+% A |texlua| program called |lwarpmk| is used to process either the print or \acro{HTML}
+% version of the document. A few external utility programs are used to finish
+% the conversion from a \LaTeX{}-generated \acro{PDF} file which happens to have \htmlfive{} tags,
+% to a number of \htmlfive{} plain-text files and accompanying images.
+%
+% A special |lwarp-newproject| package is used to set up the auxiliary files necessary for
+% the \acro{HTML} conversion. Included is a parallel version of the user's source document,
+% |<sourcename>-html.tex|, which selects \acro{HTML} output and then inputs the user's own source.
+% This process allows both the printed and \acro{HTML} versions to co-exist side-by-side,
+% each with their own auxiliary files.
+%
+% When requesting packages during \acro{HTML} conversion,
+% |lwarp| first looks to see if it has its own modified version
+% to use instead of the usual \LaTeX\ version. These |lwarp-packagename.sty| files contain
+% code used to emulate or replace functions for \acro{HTML} output.
+%
+% Enough functionality is provided to convert a typical article containing technical content.
+% Not every package has been tested, but many of the most useful ones are known to work,
+% either as-is or through emulation with replacement code. (See \cref{tab:supported} on
+% page \pageref{tab:supported}.)
+%
+%
+% \subsection{Supported packages and features}
+% \changes{v0.15}{2016/04/05}{Docs: Moved the supported functions table to the introduction.}
+%
+% \Cref{tab:supported} lists the various \LaTeX{} packages and macros which may be used.
+% \emph{Supported} means that the package or macro may be used as-is,
+% perhaps with minor limitations.
+% \emph{Emulated} means that the original package or macro is not used, but similar
+% functionality is provided in a way which is intended to be compatible with the
+% user's \LaTeX{} code.
+% \emph{Ignored} means that the package is not used, but nullified user-level macros
+% and related counters, lengths, etc.\ are provided for source-level compatibility.
+%
+% Any package listed in \cref{tab:supported} probably works with little or no change to the
+% user's source code.
+% Special environments are provided to mark blocks of code which are for
+% print only, \acro{HTML} only, or both, should it be necessary.
+%
+% \clearpage
+%
+% \renewcommand{\arraystretch}{1.5}
+%
+% \begin{longtable}{>{\raggedright}m{.3\linewidth}m{.6\linewidth}}
+% \caption{\protect\LaTeX--HTML generation ---
+% \protect\pkg{lwarp} package ---
+% Supported functions\label{tab:supported}} \endfirsthead
+% \warpprintonly{\multicolumn{2}{c}{\pkg{lwarp} Supported Functions --- continued} \\
+% Package or Macro & Status \\ \toprule \endhead}
+% \toprule
+% Package or Macro & Status \\
+% \midrule
+% Engines: & pdf\LaTeX, \XeLaTeX, \LuaLaTeX \\
+% \midrule
+% Classes: & \pkg{book}, \pkg{report}, or \pkg{article}. \pkg{memoir} is planned. \\
+% \midrule
+% Sectioning: & Supported, with hyperlinks.
+% Honors \cmds{tocdepth} and \cmds{secnumdepth}.
+% Adds \cmds{filedepth} for splitting the \acro{HTML} output.
+% Files may be numbered sequentially or named according to section name.
+% Common short words and punctuation is removed from the filenames. \\
+% \pkg{titlesec} & Ignored. \\
+% Table of Contents, Figures, Tables: & Supported, with hyperlinks. \\
+% \cs{maketitle}, \env{titlepage}, \pkg{titling}: & Supported, with optional
+% \pkg{titling}-based commands for published and subtitle. \\
+% \pkg{titletoc} & Ignored. \\
+% \pkg{tocloft} & Ignored, with support for \cs{newlistof} and \cs{ctfchapterprecis}.\\
+% \pkg{abstract}: & Supported \\
+% \midrule
+% Cross-references: & Emulated, with hyperlinks. \\
+% \pkg{cleverref}: & Supported, including ranges and lists, with hyperlinks. \\
+% \pkg{nameref}: & Emulated \\
+% \pkg{hyperref}: & Emulated.
+% \acro{HTML} hyperlinks are generated for \acro{TOC}, \acro{LOF}, \acro{LOT},
+% \cs{nameref}, \cs{ref},
+% the \pkg{cleveref} commands, and index entries.\\
+% \pkg{bookmark}: & Emulated. \\
+% \midrule
+% Footnotes: & Supported, emulated as pagenotes per \acro{HTML} page. \\
+% \pkg{pagenote}: & Supported. \\
+% Indexing: & \cmds{texindy} is used, with hyperlinks. \\
+% Bibliography: & Supported, without hyperlinks so far. \\
+% \midrule
+% \pkg{babel}: & Supported. \\
+% \midrule
+% Math: & Supported. Converted to \acro{SVG} images with \acro{HTML} \cmds{ALT} tags containing the
+% \LaTeX{} source for the math expression.
+% MathJax supported as an alternative.
+% \AmS{} environments are supported.
+% User-defined macros are available during converson,
+% due to native \LaTeX{} processing.\\
+% \midrule
+% Floats: & Supported, appear where declared.
+% \pkg{float} is emulated, \pkg{newfloat} is supported,
+% \pkg{caption} and \pkg{subcaption} are supported,
+% \pkg{capt-of} is supported,
+% \pkg{placeins} is ignored,
+% \pkg{trivfloat} is supported, \pkg{floatrow} is emulated,
+% \pkg{keyfloat} is supported, \pkg{wrapfig} is emulated. \\
+% \midrule
+% \env{tabular}: & Emulated.
+% \cs{multirow} and \cs{multicolumn} are available, but cannot
+% be used at the same time.
+% Nested tables are not supported. \\
+% \pkg{multirow}: & Emulated. \\
+% \pkg{longtable}: & Emulated. Converted to a tabular. Captions supported.
+% Extra headings and \cs{kill} lines must be enclosed in
+% \cs{warpprintonly\{\}} \\
+% \cmidrule{2-2}
+% \pkg{booktabs}: & Emulated. \cs{toprule} and \cs{bottomrule}
+% form black rules, \cs{midrule} forms silver rules, as demonstrated on
+% this table.
+% \cs{cmidrule}, demonstrated at this line, does not use width or trim options. \\
+% \cmidrule{2-2}
+% \pkg{threeparttable}: & Emulated \\
+% \midrule
+% \pkg{geometry}: & Ignored. \\
+% \pkg{titleps}: & Used by \pkg{lwarp}, but emulated for the user. \\
+% \pkg{fancyhdr}: & Ignored. \\
+% \pkg{extramarks}: & Ignored. \\
+% \pkg{afterpage}, \pkg{draftwatermark}, \pkg{eso-pic},
+% \pkg{everypage}, \pkg{wallpaper}: & Ignored. \\
+% \midrule
+% \pkg{graphics}, \pkg{graphicx}: & Emulated.
+% \cs{includegraphics} supports \cmds{width}, \cmds{height},
+% \cmds{origin}, \cmds{angle}, and \cmds{scale} tags, and adds \cmds{class}.
+% References to \acro{PDF} files are changed to \acro{SVG}, other image types
+% are accepted as well.
+% \cs{rotatebox} and \cs{scalebox} are supported as well as \acro{HTML} can handle. \\
+% \pkg{rotating}: & Emulated. All objects are displayed unrotated. \\
+% \midrule
+% Lists: & Supported \\
+% \pkg{enumitem}: & Supported, although spacing is still controlled by \acro{CSS}. \\
+% \midrule
+% Environments: & Standard \LaTeX{} environments are supported. \\
+% \pkg{theorem}: & Supported, with added \acro{CSS} tags. \\
+% \pkg{epigraph}: & Emulated \\
+% \pkg{csquotes}: & Supported \\
+% \pkg{verse} and \pkg{memoir}'s verse-related macros & Supported \\
+% \pkg{picture} and \pkg{tikz}: & Converted to an \acro{SVG} image. \\
+% \env{minipage}: & Supported with some \acro{HTML}5-imposed limitations.
+% Nested minipages are supported.
+% Footnotes appear at the bottom of the \acro{HTML} page. \\
+% \pkg{fancyvrb}: & Supported except for verbatim footnotes. \\
+% \pkg{alltt}, \pkg{listings}: & Supported \\
+% \pkg{algorithmicx}: & Supported \\
+% \pkg{mdframed}: & Supported \\
+% \pkg{multicol}: & Emulated, with \acro{CSS}3.
+% Converted to up to three columns with an optional heading,
+% per browser support. Single-column if unsupported.\\
+% \midrule
+% \pkg{siunitx}: & Supported except for \cmds{per-mode=fraction}. \\
+% \pkg{xfrac}: & Supported \\
+% \midrule
+% Direct formatting: & \cs{emph}, \cs{textsuperscript},
+% \cs{textbf}, etc are supported.
+% \cs{bfseries}, etc.\ are not yet supported. \\
+% Ordinals: & \pkg{nth}, \pkg{fmtcount}, and \pkg{engord} are supported. \\
+% Text ligatures: & Ligatures for symbols are supported.
+% Ligatures for f, q, t are intentionally turned off
+% because many simpler browsers do not display them correctly.
+% Modern full-featured browsers re-create these ligatures on-the-fly.\\
+% Horizontal space: &
+% \acro{HTML} output for thin-unbreakable, unbreakable,
+% \cs{enskip}, \cs{quad}, \cs{qquad}, \cs{hspace}. \\
+% Rules: & \cs{rule} with width, height, raise, text color. \\
+% \pkg{placeins}, \pkg{setspace}, \pkg{needspace}: & Ignored. \\
+% \pkg{textpos}: & Emulated. \\
+% \pkg{nowidow}: & Ignored. \\
+% \pkg{microtype}, \pkg{letterspace}: & Ignored.
+% \pkg{microtype} is used to disable ligatures. \\
+% \acro{HTML} reserved characters: & \cs{\&}, \cs{textless}, and
+% \cs{textgreater} are converted to \acro{HTML} entities. \\
+% \midrule
+% \pkg{xcolor}: & \textcolor{DarkGreen}{Supported}.
+% Full package color names, any color models,
+% and \textcolor{Goldenrod}{mixing} is
+% converted to hex web colors via \cs{convertcolorspec}.
+% Patched commands are
+% \textcolor{Maroon}{\cs{textcolor}},
+% \colorbox{LightSteelBlue}{\cs{colorbox}},
+% and \fcolorbox{red}{NavajoWhite}{\cs{fcolorbox}}.
+% \cs{pagecolor} is not supported. \\
+% \midrule
+% \pkg{CJKutf8}: & Supported \\
+% \midrule
+% Where: & \\
+% \textbf{Supported:} & The existing \LaTeX{} package is used. \\
+% \textbf{Emulated:} & The \LaTeX{} package is not used, but some/all of its
+% functions are emulated. Null functions, lengths, and counters are provided
+% for source compatibility. \\
+% \textbf{Ignored:} & The \LaTeX{} package is not used, but null functions
+% are provided for source compatibility. \\
+% \bottomrule
+% \end{longtable}
+%
+%
+% \clearpage
+%
+% \section{Alternatives}
+%
+% Summarized below are several other ways to convert a \LaTeX{} or other document to \acro{HTML}.
+% Where an existing \LaTeX{} document is to be converted to \acro{HTML}, \pkg{lwarp} may be
+% a good choice. For new projects with a large number of documents, it may be worth
+% investigating the alternatives before decided which path to take.
+%
+% \subsection{TeX4ht}
+%
+% \url{http://tug.org/tex4ht/}\DescribeProgram{TeX4ht}
+%
+% This system uses native \LaTeX{} processing to produce a DVI file containing special commands,
+% and then uses additional post-processing for the \acro{HTML} conversion by way of numerous configuration
+% files.
+% In some cases, \pkg{lwarp} provides a better \acro{HTML} conversion, and it
+% supports a different set of packages.
+% TeX4ht produces several other forms of output beyond \acro{HTML}.
+%
+% \subsection{Translators}
+%
+% These systems use external programs to translate a subset of \LaTeX{} syntax into \acro{HTML}:
+% \begin{description}
+% \item [H\textsuperscript{E}v\textsuperscript{E}a:] \url{http://hevea.inria.fr/}
+% \DescribeProgram{Hevea}
+% \item [T\textsubscript{T}H:] \url{http://hutchinson.belmont.ma.us/tth/}
+% \DescribeProgram{TtH}
+% \item [GELLMU:] \url{http://www.albany.edu/~hammond/gellmu/}
+% \DescribeProgram{GELLMU}
+% \item [LaTeXML:] \url{http://dlmf.nist.gov/LaTeXML/}
+% \DescribeProgram{LaTeXML}
+% \item [Plastex:] \url{https://github.com/tiarno/plastex}
+% \DescribeProgram{Plastex}
+% \item [LaTeX2html:] \url{http://www.latex2html.org/} \\
+% and \url{http://ctan.org/pkg/latex2html}.
+% \DescribeProgram{LaTeX2html}
+% \end{description}
+%
+% \subsection{AsciiDoc}
+%
+% AsciiDoc is one of the most capable markup languages, providing enough features to produce
+% the typical technical-writing document with cross-references,
+% and it writes \LaTeX{} and \acro{HTML}.
+% \begin{description}
+% \item [Asciidoctor:] \url{http://asciidoctor.org/} (More active.)\DescribeProgram{AsciiDoc}
+% \item [AsciiDoc:] \url{http://asciidoc.org/} (The original version.)\DescribeProgram{AsciiDoctor}
+% \end{description}
+%
+% The Asciidoctor-LaTeX project is adding additional \LaTeX{}-related features.
+% \begin{description}
+% \item [Asciidoctor-LateX:] ~ \\
+% \url{http://www.noteshare.io/book/asciidoctor-latex-manual} \\
+% \url{https://github.com/asciidoctor/asciidoctor-latex}
+% \DescribeProgram{Asciidoctor-LaTeX}
+% \end{description}
+%
+% \subsection{Pandoc}
+% \DescribeProgram{Pandoc}
+%
+% A markup system which also reads and writes \LaTeX{} and \acro{HTML}.
+% \begin{description}
+% \item [Pandoc:] \url{http://pandoc.org/}
+% \end{description}
+%
+% (Watch for improvements in cross-references to figures and tables.)
+%
+% \subsection{Word Processors}
+%
+% It should be noted that the popular word processors
+% \DescribeProgram{Word}\DescribeProgram{LibreOffice}\DescribeProgram{OpenOffice}
+% 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.
+%
+% \subsection{Commercial Systems}
+%
+% Likewise, several professional systems exist whose
+% \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\,\textregistered{} InDesign\,\textregistered{},
+% and Madcap Flare\,\texttrademark{}.
+%
+% \subsection{Comparisons}
+% \index{markup languages}
+%
+% AsciiDoc, Pandoc, and various other markup languages typically have a syntax which tries to be
+% natural and human-readable, but the use of advanced features tends to require
+% many combinations of special characters, resulting in a complicated mess of syntax.
+% By contrast, \LaTeX{} spells things out in readable words but takes longer to type, although
+% integrated editors exist which can provide faster entry and a graphic user interface.
+% For those functions which are covered by the typical markup language
+% it is arguable that \LaTeX{} is comparably easy to learn, while \LaTeX{} provides many more advanced
+% features where needed, along with a large number of pre-existing packages which provide solutions
+% to numerous common tasks.
+%
+% Text-based document-markup systems share some of the advantages of \LaTeX{} vs.\ a typical word
+% processor. Documents formats are stable. The documents themselves are portable,
+% work well with revision control,
+% do not crash or become corrupted, and are easily generated under program control.
+% Formatting commands are visible,
+% cross-referencing is automatic, and editing is responsive.
+% Search/replace with regular expressions provides a powerful tool for
+% the manipulation of both document contents and structure.
+% Markup systems and some commercial systems allow printed output
+% through a \LaTeX{} back end, yielding high-quality results especially when the \LaTeX{}
+% template is adjusted, but they lose the ability to use \LaTeX{} macros and
+% other \LaTeX{} source-document features.
+%
+% The effort required to customize the output of each markup system varies.
+% For print output, \LaTeX{} configuration
+% files are usually used. For HTML output, a \acro{CSS} file will be available, but additional
+% configuration may require editing some form of control file with a different syntax, such as XML.
+% In the case of \pkg{lwarp}, CSS is used, and much HTML output is adjusted
+% through the usual \LaTeX{} optional macro parameters,
+% but further customization may require patching \LaTeX{} code.
+%
+% The popular word processors and professional document systems each has a large
+% base of after-market support including pre-designed styles and templates, and often include
+% content-management systems for topic reuse.
+%
+%
+%
+%
+% \clearpage
+%
+% \section{Installation}
+%
+% \Cref{tab:utility} shows the tools which are used for
+% the \LaTeX\ to \acro{HTML} conversion.
+% In most cases, these will be available via the
+% standard package-installation tools.
+%
+% \index{utility>programs}
+% \index{programs>utility}
+%
+% \vfill
+%
+% \begin{minipage}{\linewidth}
+% \captionof{table}{Required software programs\label{tab:utility}}
+% \hrule
+% \begin{description}
+%
+% \item[Provided by your \LaTeX\ distribution:] \
+%
+% From \TeX{}Live: \url{http://tug.org/texlive/}.
+%
+% \begin{description}
+%
+% \item[\LaTeX:] |pdflatex|, |xelatex|, or |lualatex|.
+% \DescribeProgram[requirement]{pdfLaTeX}
+% \DescribeProgram[requirement]{XeLaTeX}
+% \DescribeProgram[requirement]{LuaLaTeX}
+%
+% \item[The \pkg{lwarp} package:] This package.
+%
+% \item[The \pkg{lwarp-newproject} package:] Accompanies \pkg{lwarp}, and used
+% to create configuration files.
+%
+% \item[The |lwarpmk| utility:] Provided along with this package. This
+% should be an operating-system executable in the same way that
+% |pdflatex| or |latexmk| is. It is possible to have the
+% \pkg{lwarp-newproject} package generate a local copy of |lwarpmk|
+% called |lwarpmk.lua|.
+% See \cref{sec:genlatexmk}.
+%
+% \item[luatex:] Used by the |lwarpmk| program to simplify and automate document generation.
+%
+% \item [xindy:] The \pkg{xindy} package is used by \pkg{lwarp} to create
+% indexes. On a MiK\TeX\ system this may have to be acquired separately,
+% but it is part of the regular installer as of mid 2015.
+%
+% \item[latexmk:] Optionally used by |lwarpmk| to compile \LaTeX\ code.
+% On a MiK\TeX\ system, Perl may need to be installed first.
+%
+% \item[pdfcrop:] Used to pull images out of the \LaTeX{} \acro{PDF}.
+% \DescribeProgram[requirement]{pdfcrop}
+%
+% \end{description}
+%
+% \item[Extra packages provided with your operating sytem:] \
+%
+% From Poppler: \url{poppler.freedesktop.org}.
+%
+% \begin{description}
+%
+% \item[pdftotext:] Used to convert \acro{PDF} to text.
+% \DescribeProgram[requirement]{pdftotext}\index{Poppler}
+%
+% \item[pdfseparate:] Used to pull images out of the \LaTeX{} \acro{PDF}.
+% \DescribeProgram[requirement]{pdfseparate}
+%
+% \item[pdftocairo:] Used to convert images to \acro{SVG}.
+% \DescribeProgram[requirement]{pdftocairo}
+%
+% \end{description}
+%
+% \item[Automatically downloaded from the internet as required:] \
+% \begin{description}
+%
+% \item[MathJax:] Optionally used to display math.
+% Automatically loaded from the MathJax website when needed. \\
+% From: \url{mathjax.org}
+% \DescribeProgram[requirement]{MathJax}
+%
+% \end{description}
+% \end{description}
+%
+% \hrule
+% \end{minipage}
+%
+% \subsection{Installing the \protect\pkg{lwarp} package}
+%
+% There are several ways to install \pkg{lwarp}. These are listed here
+% with the preferred methods listed first:
+%
+% \begin{description}
+% \raggedright
+%
+% \item [Pre-installed:] Try entering into a command line:
+% \userentry{lwarpmk} \\
+% If the |lwarpmk| help message appears, then \pkg{lwarp} is already installed.
+%
+% \item [\TeX\ Live:]If using a \TeX\ Live distribution,
+% try installing via |tlmgr|:
+% \userentry{tlmgr install lwarp}
+%
+% \item [MiK\TeX:] If using MiK\TeX, try using the package installer.
+%
+% \item [Operating-system package:] The operating-system package manager may
+% already have |lwarp|, perhaps as part of a set of \TeX-related packages.
+%
+% \item [CTAN TDS archive:] \pkg{lwarp} may be downloaded from the Comprehensive \TeX\ Archive:
+% \begin{enumerate}
+% \item See \url{http://ctan.org/pkg/lwarp} for the \pkg{lwarp} package.
+% \item Download the TDS archive: |lwarp.tds.zip|
+% \item Find the \TeX\ |local| directory:
+% \begin{description}
+% \item[\TeX\ Live:] \
+%
+% \userentry{kpsewhich -var-value TEXMFLOCAL}
+% \item[MiKTeX:] \
+%
+% In the ``Settings'' window, ``Roots'' tab, look for a local TDS root.
+% \end{description}
+% This should be something like: \\
+% \hspace*{2em}|/usr/local/texlive/texmf-local/|
+% \item Unpack the archive in the TDS local directory.
+% \item Renew the cache:
+% \userentry{mktexlsr} \quad —\,or\,—
+% \userentry{texhash}
+% \end{enumerate}
+%
+% \item[CTAN \texttt{.dtx} and \texttt{.ins} files:] Another form of \TeX\ package
+% is the |.dtx| and |.ins| source files. These files are used to create
+% the documentation and |.sty| files.
+%
+% \begin{enumerate}
+% \item See \url{http://ctan.org/pkg/lwarp} for the \pkg{lwarp} package.
+% \item Download the zip archive |lwarp.zip| into your own |lwarp| directory.
+% \item Unpack |lwarp.zip|.
+% \item Locate the contents |lwarp.dtx| and |lwarp.ins|
+% \item Create the documentation: \userentry{pdflatex lwarp.dtx} (several times)
+% \item Create the |.sty| files: \userentry{pdflatex lwarp.ins}
+% \item Copy the |.sty| files somewhere such as the \TeX\ Live local tree
+% found in the previous CTAN TDS section, under the subdirectory: \\
+% \hspace*{2em}|<texlocal>/tex/latex/local/lwarp|
+% \item Copy the documentation |lwarp.pdf| to a |source| directory in the local tree,
+% such as: \\
+% \hspace*{2em}|<texlocal>/doc/local/lwarp|
+% \item Renew the cache:
+% \userentry{mktexlsr} \quad —\,or\,—
+% \userentry{texhash}
+% \item See \cref{sec:locallwarpmk} to generate your local copy of |lwarpmk|.
+% \item Once the local version of |lwarpmk.lua| is installed, it may be made
+% available system-wide as per \cref{sec:installlwarpmk}.
+% \end{enumerate}
+% \item[Project-local CTAN \texttt{.dtx} and \texttt{.ins} files:] The
+% |.dtx| and |.ins| files may be downloaded to a project
+% directory, then compiled right there, alongside the
+% document source files. The resultant |*.sty| and |lwarpmk.lua| files
+% may be used as-is, so long as they are in the same directory
+% as the document source. This approach is especially useful if
+% you would like to temporarily test\margintag{Just testing!}\
+% \pkg{lwarp} before deciding whether to permanently install it.
+% \end{description}
+%
+% \subsection{Installing the \protect\texttt{lwarpmk} utility}
+% \label{sec:installlwarpmk}
+%
+% {\small
+% (Note: It is possible to use a local copy of |lwarpmk| instead of
+% installing it system-wide.
+% See \cref{sec:locallwarpmk}.)
+% }
+%
+% After the \pkg{lwarp} package is installed,
+% you may need to setup the |lwarpmk| utility:
+% \begin{enumerate}
+% \item At a command line, try executing |lwarpmk|. If the help message
+% appears, then |lwarpmk| is already set up.
+% \item Locate the file |lwarpmk.lua|, which should be in the |scripts| directory
+% of the TDS tree. On a \TeX\ Live system you may use \userentry{kpsewhich lwarpmk.lua}
+% \item Create |lwarpmk|:
+% \begin{description}
+% \item [The easy way:] Copy |lwarpmk.lua| to wherever |pdflatex| is located.
+% For Unix, rename |lwarpmk.lua| to |lwarpmk| and make it executable.
+% \item [Unix:] Create a symbolic link and make it executable:
+% \begin{enumerate}
+% \item Locate the \TeX\ Live binaries:
+% \userentry{kpsewhich -var-value TEXMFROOT} \\
+% This will be something like: \\
+% \hspace*{2em}|/usr/local/texlive/<year>| \\
+% The binaries are then located in the |bin/<arch>| directory
+% under the root: \\
+% \hspace*{2em}|/usr/local/texlive/<year>/bin/<architecture>/| \\
+% In this directory you will find programs
+% such as |pdflatex| and |makeindex|.
+% \item In the binaries directory,
+% create a new symbolic link from the binaries directory to |lwarpmk.lua|:
+% \userentry{ln -s <pathtolwarpmk.lua> lwarpmk}
+% \item Make the link executable:
+% \userentry{chmod 0755 lwarpmk}
+% \end{enumerate}
+% \item [Windows \TeX\ Live:] Create a new |lwarpmk.exe| file:
+% \begin{enumerate}
+% \item Locate the \TeX\ Live binaries as shown above for Unix.
+% \item In the binaries directory, make a \emph{copy} of |runscript.exe|
+% and call it |lwarpmk.exe|
+% \end{enumerate}
+% \item [Windows MiK\TeX:] Copy |lwarpmk.lua| to a folder in the executable |PATH|:
+% \begin{enumerate}
+% \item Locate the binaries. These will be in a directory such as: \\
+% \hspace*{2em}|C:\Program Files\MiKTeX 2.9\miktex\bin| \\
+% In this directory you will find programs
+% such as |pdflatex| and |makeindex|.
+% \item Copy |lwarpmk.lua| to this directory.
+% \end{enumerate}
+% \end{description}
+% \end{enumerate}
+%
+% \subsubsection{Using a local copy of \protect\pkg{lwarpmk}}
+% \label{sec:locallwarpmk}
+% It is also possible to use a local version of |lwarpmk|:
+% \begin{enumerate}
+% \item When compiling the tutorial in \cref{sec:tutorial},
+% use the |lwarpmk| option for the \pkg{lwarp-newproject} package: \\
+% \hspace*{2em}|\usepackage[lwarpmk]{lwarp-newproject}|
+% \item When the tutorial is compiled with |pdflatex|, the file |lwarpmk.lua|
+% will be generated along with the other configuration files.
+% \item |lwarpmk.lua| may be used for this project:
+% \begin{description}
+% \item[Unix:] \
+% \begin{enumerate}
+% \item Make |lwarpmk.lua| executable: \userentry{chmod 0755 lwarpmk.lua}
+% \item Compile documents with \\
+% \hspace*{2em} |./lwarpmk.lua html| \\
+% \hspace*{2em} |./lwarpmk.lua print| \quad etc.
+% \item It may be useful to rename or link to a version without the |.lua| suffix.
+% \end{enumerate}
+% \item[Windows:] \
+%
+% Compile documents with \\
+% \hspace*{2em} |lwarpmk html| \\
+% \hspace*{2em} |lwarpmk print| \quad etc.
+% \end{description}
+% \end{enumerate}
+%
+%
+% \subsection{Installing additional utilities}
+%
+% The \TeX\ utilities |latexmk| and |pdfcrop| may require
+% the installation of additional \TeX-relatex operating-system packages.
+%
+% The tools from the \textsc{Poppler} project should be provided by your
+% operating system's package-installation tools.
+%
+% To test for the existence of the additional utilities, try:
+% \userentry{luatex --version}
+% \userentry{xindy --version}
+% \userentry{latexmk --version}
+% \userentry{pdfcrop --version}
+% \userentry{pdftotext -v}
+% \userentry{pdfseparate --version}
+% \userentry{pdftocairo -v}
+%
+%
+%
+%
+% \clearpage
+%
+% \section{Tutorial}
+% \label{sec:tutorial}
+%
+% This section shows an example of how to create an \pkg{lwarp} document.
+%
+%
+% \subsection{Starting a new project}
+%
+% \begin{enumerate}
+%
+% \item Create a new project directory called |tutorial|.
+%
+% \item Inside the |tutorial| directory,
+% create a new file called |tutorial.tex|, as seen in \cref{fig:tutorial}.
+% This may be copied/pasted from this documentation directly into your own editor.
+%
+% \item Compile the project: \userentry{pdflatex tutorial.tex}
+% \quad (several times)
+%
+% (|xelatex| or |lualatex| may be used as well.)
+%
+% \end{enumerate}
+%
+%
+% A number of new files are created when |tutorial.tex| is compiled, as
+% shown in \cref{fig:newprojectfiles}. These files are created by
+% the |lwarp-newproject| package.
+%
+% (Two of the new files are configuration files for the helper program |lwarpmk|.
+% Whenever a print version of the document is created while the |lwarp-newproject|
+% package is used, the configuration files for |lwarpmk| are updated to
+% record the operating system, \LaTeX\ program (|pdflatex|, |xelatex|, or |lualatex|),
+% the filenames of the source code and \acro{HTML} output, and whether
+% the additional helper program |latexmk| will be used to compile the document.)
+%
+%
+%
+% \clearpage
+%
+% \begingroup
+% \captionof{figure}{tutorial.tex listing}
+% \label{fig:tutorial}
+%
+% \begin{center}
+% \footnotesize
+% \textcolor{red}{Note: There are two pages!}
+% \end{center}
+%
+% \begin{verbatim}
+% \documentclass{book}
+%
+% \usepackage{iftex}
+%
+% % --- LOAD FONT SELECTION AND ENCODING BEFORE LOADING LWARP ---
+% \ifPDFTeX
+% \usepackage{lmodern} % pdflatex
+% \usepackage[T1]{fontenc}
+% \usepackage[utf8]{inputenc}
+% \else
+% \usepackage{fontspec} % XeLaTeX or LuaLaTeX
+% \fi
+%
+% % --- HTML FILENAME AND LATEXMK SETTINGS ---
+% % \newcommand{\HomeHTMLFilename}{index} % Filename of the homepage.
+% % \newcommand{\HTMLFileName}{node-} % Filename prefix of other pages.
+% % \newcommand{\UseLatexmk}{true}% Uncomment to use latexmk
+%
+% % --- LWARP IS LOADED NEXT ---
+% \usepackage{lwarp-newproject} % Possibly with the [lwarpmk] option.
+% \usepackage{lwarp}
+% % \boolfalse{FileSectionNames} % If false, numbers the files.
+%
+% % --- OTHER PACKAGES ARE LOADED AFTER LWARP ---
+% \usepackage{makeidx} \makeindex
+% \usepackage{xcolor}
+%
+% \usepackage{hyperref,cleveref} % LOAD THESE LAST!
+%
+% % --- LATEX AND HTML CUSTOMIZATION ---
+% \title{The Lwarp Tutorial}
+% \author{Some Author}
+% \setcounter{tocdepth}{2} % Include subsections in the TOC.
+% \setcounter{secnumdepth}{2} % Number down to subsections.
+% \setcounter{FileDepth}{1} % Split HTML files at sections
+% \booltrue{CombineHigherDepths} % Combine parts/chapters/sections
+% \setcounter{SideTOCDepth}{1} % Include subsections in the sideTOC
+% \SetFirstPageTop{Name and \fbox{HOMEPAGE LOGO}}
+% \SetPageTop{\fbox{LOGO}}
+% \SetPageBottom{Contact Information and Copyright}
+% \NewCSS{lwarp_sagebrush.css}
+%
+% \begin{document}
+% \maketitle % (or a titlepage environment)
+% % --- An abstract may be placed here. ---
+% \tableofcontents \listoffigures % --- MUST BE BEFORE THE FIRST SECTION.
+%
+% \chapter{First chapter}
+% \section{A section}
+% This is some text which is indexed.\index{Some text.}
+%
+% \subsection{A subsection}
+% See \cref{fig:withtext}.
+% \begin{figure}\begin{center}
+% \fbox{\textcolor{blue!50!green}{Text in a figure.}}
+% \caption{A figure with text\label{fig:withtext}}
+% \end{center}\end{figure}
+%
+% \section{Some math}
+% Inline math: $r = r_0 + vt - \frac{1}{2}at^2$
+% \begin{equation}
+% a^2 + b^2 = c^2
+% \end{equation}
+%
+% \printindex
+% \end{document}
+% \end{verbatim}
+% \endgroup
+%
+%
+% \begin{table}
+% \caption{Files created in a new project\label{fig:newprojectfiles}}
+% \begin{description}
+%
+% \item [|tutorial.pdf|:] The \acro{PDF} output from \LaTeX.
+%
+% \item [|tutorial\_html.tex|:] A small |.tex| file used to create
+% a parallel \acro{HTML} version of the document, which co-exists with usual
+% the \acro{PDF} version, and which will have its
+% own auxiliary files. In this way, both \acro{PDF} and \acro{HTML}
+% documents may co-exist side-by-side.
+%
+% \item [Auxiliary files:] The usual \LaTeX\ files |tutorial.aux|, |tutorial.log|.
+% When an \acro{HTML} version of the document is created, |_html| versions
+% of the auxiliary files will also be generated.
+%
+% \item [|lwarpmk.conf|:] A configuration file for |lwarpmk|,
+% which is used to automate the compilation of \acro{PDF} or \acro{HTML}
+% versions of the document.
+%
+% \item [|tutorial.lwarpmkconf|:] Another configuration file used by |lwarpmk|,
+% which is only useful if you wish to have several projects
+% residing in the same directory.
+%
+% \item [|.css files|:] |lwarp.css|, |lwarp_formal.css|, |lwarp_sagebrush.css|
+% These files are standard for \pkg{lwarp}, and are not meant to be modified
+% by the user.
+%
+% \item [|sample\_project.css|:] An example of a user-customized \acro{CSS} file,
+% which may be used for project-specific changes to the \pkg{lwarp} defaults.
+%
+% \item [|lwarp\_html.xdy|:] Used by \pkg{lwarp} while creating an index.
+% This file should not need to be modified by the user.
+%
+% \item [|lwarp\_mathjax.txt|:] Inserted into the \acro{HTML} files when
+% |MathJax| is used to display math.
+% This file should not need to be modified by the user.
+%
+% \item [|comment.cut|:] A temporary file used by \pkg{lwarp} to
+% conditionally process blocks of text. This file may be ignored.
+% \end{description}
+%
+% \hrule \medskip
+% \label{sec:genlatexmk}
+% When the |lwarpmk| option is given to the \pkg{lwarp-newproject} package:
+% \begin{description}
+% \item [|lwarpmk.lua|:] A local copy of the |lwarpmk| utility.
+%
+% On Unix-related operating systems this file must be made executable: \\
+% \hspace*{2em} |chmod u+x lwarpmk.lua|
+%
+% This may be useful to have to archive with a project for future use.
+% \end{description}
+% \end{table}
+%
+%
+%
+% \clearpage
+%
+% \subsection{Compiling the print version with \texttt{lwarpmk}}
+%
+% The |lwarpmk| utility program is used to compile either the printed or
+% the \acro{HTML} version of the document.
+%
+% |lwarpmk print| is used to recompile a printed version of the document.
+%
+% \begin{enumerate}
+%
+% \item Re-compile the print version: \userentry{lwarpmk print}
+%
+% |lwarpmk| prints an introduction then checks to see if the document
+% must be recompiled. If it seems that the files are up-to-date, then
+% |lwarpmk| informs you of that fact and then exits.
+%
+% \item Make a small change in the original document,
+% such as adding a space character.
+%
+% \item Recompile again. \userentry{lwarpmk print}
+%
+% The document is recompiled when a change is seen in the source.
+% Several compilations may be necessary to resolve cross-references.
+%
+% \item Force a recompile to occur.
+%
+% \userentry{lwarpmk again}
+% \userentry{lwarpmk print}
+%
+% |lwarpmk again| updates the date code for the file,
+% triggering a recompile the next time the document is made.\footnote{
+% Although, when using the utility |latexmk| (introduced later), the changed date is
+% ignored and an actual change in contents must occur to cause a recompile.}
+%
+% \item Process the index.
+% \userentry{lwarpmk printindex}
+%
+% \item Recompile again to include the index.
+% \userentry{lwarpmk print}
+%
+% \end{enumerate}
+%
+% Note that the \acro{HTML} customization commands are ignored while making the
+% print version.
+%
+%
+% \clearpage
+%
+% \subsection{Compiling the HTML version with \texttt{lwarpmk}}
+%
+% |lwarpmk html| is used to recompile an \acro{HTML} version of the document.
+%
+% \begin{enumerate}
+% \item Compile the \acro{HTML} version:
+% \userentry{lwarpmk html}
+%
+% \begin{enumerate}
+% \item |lwarpmk| uses \LaTeX\ to process |tutorial_html.tex|
+% to create \\
+% |tutorial_html.pdf|.
+% \item |pdftotext| is then used to convert into the file |tutorial_html.html|.
+% This file is a plain-text file containing \acro{HTML} tags and
+% content for the entire document.
+% \item |lwarpmk| manually splits |tutorial_html.html| into
+% individual \acro{HTML} files according to the \acro{HTML} settings.
+% For this tutorial, the result is |tutorial.html| (the home page),
+% along with |First-chapter.html|\footnote{
+% \texttt{First-chapter.html}
+% also contains the first section, even though the second
+% section is its own \acro{HTML} page. This behavior is
+% controlled by the boolean \texttt{CombineHigherDepths}.},
+% |Some-math.html|, and the document's
+% index in |_Index.html|.\footnote{\texttt{index.html} is commonly
+% used as a homepage, so the document index is in \texttt{\_Index.html}.}
+% \end{enumerate}
+%
+% \item View the homepage in a web browser.
+%
+% \qquad Open the file |tutorial.html| in a web browser.
+%
+% Note that math is still displayed as its plain-text \LaTeX\ source
+% \margintag{math}
+% until the
+% images of the math expressions have not yet been generated. Math may be
+% displayed as \acro{SVG} images or by a MathJax script, as seen in
+% \cref{sec:tutorialsvgmath,sec:tutorialmathjax}.
+%
+% \item Force a recompile:
+% \userentry{lwarpmk again}
+% \userentry{lwarpmk html}
+% \userentry{lwarpmk print}
+%
+% \item Process the \acro{HTML} index and recompile:
+% \userentry{lwarpmk htmlindex}
+% \userentry{lwarpmk html}
+%
+% |_Index.html|, is updated for the new \LaTeX\ index.
+%
+% \item Reload the web page to see the added index.
+% \end{enumerate}
+%
+%
+%
+% \clearpage
+%
+% \subsection{Generating the SVG images}
+% \label{sec:tutorialsvgmath}
+%
+% By default \pkg{lwarp} represents math as \acro{SVG} images with
+% \margintag{math as \acro{SVG} images}
+% the \LaTeX\ source included in |alt| tags. 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.
+%
+% \pkg{lwarp} uses the same mechanism for |picture| and \tikz\ environments.
+% \margintag{\env{picture} and \tikz}
+%
+% \begin{enumerate}
+% \item Create the \acro{SVG} images:
+% \userentry{lwarpmk limages}
+% \userentry{lwarpmk html}
+%
+% \item Move to the tutorial's math page and reload.
+%
+% \item The math images are displayed using the same font and formatting
+% as the printed version.
+%
+% \item Copy/paste a math expression into a text editor to see the \LaTeX\ source.
+% \end{enumerate}
+%
+% When a math expression, |picture|, or \tikz\ environment is added or
+% \watchout[Adding/removing]
+% removed, the \acro{SVG} images must be re-created with |lwarpmk limages|
+% to maintain the proper image file sequence numbers.
+%
+% Expressing math as \acro{SVG} images has the advantage of representing
+% 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 \$x\$ is used, for example, yet another file is created.
+% For a document with a large amount of math,
+% see \cref{sec:tutorialmathjax} to use MathJax instead.
+%
+% \clearpage
+%
+% \subsection{Using MathJax for math}
+% \label{sec:tutorialmathjax}
+%
+% Math may also be represented using the MathJax Javascript project.
+% \margintag{math with MathJax}
+%
+% \begin{enumerate}
+% \item In the tutorial's source code, change \\
+% \hspace*{2em} |\usepackage{lwarp}| \\
+% \hspace*{3em} to \\
+% \hspace*{2em} |\usepackage[mathjax]{lwarp}|
+%
+% \item Recompile \userentry{lwarpmk html}
+%
+% \item Reload the math page.
+% \end{enumerate}
+%
+% MathJax requires web access unless a local copy of MathJax is available,
+% \watchout[MathJax requirements]
+% and it also requires that Javascript is enabled for the web page.
+% The math is rendered by MathJax. Right-click on math to see several
+% options for rendering, and for copying the \LaTeX\ source.
+%
+% While using MathJax has many advantages, it may not be able to represent
+% complex expressions or spacing adjustments as well as \LaTeX.
+%
+%
+%
+% \clearpage
+% \subsection{Changing the CSS style}
+%
+% \DescribeMacro{\NewCSS}
+% \cs{NewCSS} may be used to choose which |.css| file is used to display
+% each section of the web page. Use \cs{NewCSS} before |\begin{document}|
+% to assign the style of the home page.
+% If different parts of the website should have different styles,
+% call \cs{NewCSS} again before each section heading which creates a new file.
+%
+% The styles provided by \pkg{lwarp} include:
+% \begin{description}
+% \item[|lwarp.css|:] A default style if \cs{NewCSS} is not used. This
+% style is comparable to a plain \LaTeX\ document.
+% To set this style, you may use |\NewCSS{lwarp.css}|, or no \cs{NewCSS} call at all.
+% \item[|lwarp\_formal.css|:] A formal style with a serif fonts and a traditional
+% look.
+% \item[|lwarp\_sagebrush.css|:] A style with muted colors, gradient backgrounds,
+% additional borders, and rounded corners.
+% \end{description}
+%
+% To see each style in use, change the \cs{NewCSS} entry in the tutorial
+% |lwarpmk html|, and then reload the webpage.
+%
+% A customized style may also be created.
+% \margintag{Custom \acro{CSS}}
+% For each new project a file
+% called |sample_project.css| is generated. This may be renamed to
+% |<project>.css| then used by assigning |\NewCSS{<project>.css|.
+%
+% Note that |sample_project.css| is overwritten whenever \pkg{lwarp-newproject}
+% is loaded in print mode.
+% It is therefore important to rename the file \watchout[Rename it!]
+% to something like |<project>.css| before
+% using it, so that your own changes are not overwritten.
+%
+% |<project>.css| has an entry which loads |lwarp.css|, and this
+% entry may be changed to load |lwarp_formal.css| or |lwarp_sagebrush.css| if
+% desired. Additional changes to the \acro{CSS} may be made by making entries
+% later in the |<project>.css| file.
+%
+% \clearpage
+%
+% \subsection{Customizing the HTML output}
+% \label{sec:htmlsettings}
+% \index{settings>HTML conversion}
+% \index{HTML>conversion settings}
+%
+% Several settings may be used to customize the \acro{HTML} output.
+% Watch for the correct placement of each!\watchout[Placement!]
+%
+% Note that if changes are made,
+% \watchout[Changes!]
+% it is best to first use |lwarpmk clearall| to
+% clear all the \acro{HTML}, \acro{PDF}, and auxiliary files.
+% Also, if \cs{HomeHTMLFilename}, \cs{HTMLFileName}, or \cs{UseLatexmk} are
+% changed, it is necessary to reenable the |lwarp-newproject| package and
+% then recompile the print version in order to recreate the configuration
+% files for |lwarpmk|.
+%
+% \begin{description}
+%
+% \item[Placed in the preamble just before \pkg{lwarp} is loaded:] \
+%
+% \begin{description}
+%
+% \ItemDescribeMacro{\HomeHTMLFilename} Filename of the homepage, without
+% the ``|.html|'' suffix.
+% Defaults to the \cs{BaseJobname}. A common setting is: \\
+% \hspace*{2em}|\newcommand{HomeHTMLFilename}{index}| \\
+% causing the
+% homepage to be the file |index.html|. Underscores are allowed in filenames.
+%
+% \ItemDescribeMacro{\HTMLFileName} A filename prefix for the rest of the \acro{HTML} web pages.
+% Useful for numbered web pages with a common prefix. May be empty.
+%
+% \ItemDescribeMacro{\UseLatexmk} A macro which controls whether
+% \pkg{lwarp} uses |latexmk| to
+% compile the document. This setting is written to |lwarpmk|'s configuration
+% files. Defaults to false. Set to true with: \\
+% \hspace*{2em}|\newcommand*{\UseLatexmk}{true}|
+%
+% \end{description}
+%
+% \item[Placed in the preamble before \texttt{\cs{begin}\{document\}}:] \
+%
+% \begin{description}
+%
+% \ItemDescribeCounter{tocdepth} Sectioning depth of the table of contents.
+% See \cref{sec:stackdepths} for a list of \LaTeX{} stack depths.
+%
+% \ItemDescribeCounter{SideTOCDepth} Sectioning depth of the side\acro{TOC}.
+% Defaults to 1, causing the sidetoc to show sections but not subsections.
+%
+% Each subpage of the website has its own small table of contents
+% \margintag{sideTOC}
+% on the side (the ``side\acro{TOC}''). Its depth is set by |SideTOCDepth|.
+% This side\acro{TOC} is only shown if the web page is wide enough.
+% When using a narrow web browser window,
+% ``responsive web design'' is used to show the side\acro{TOC} at the top of the
+% page and a link back to ``Home'' at the bottom.
+%
+% \label{sec:filedepth}
+% It is recommended to set: \\
+% \hspace*{.25in} |SideTOCDepth|\,=\,|FileDepth|, or \\
+% \hspace*{.25in} |SideTOCDepth|\,=\,|FileDepth|+1
+%
+% If |SideTOCDepth|\,<\,|FileDepth|, web pages will be inaccessible via the
+% side\acro{TOC}. \watchout
+% \index{files>inaccessible}
+% \index{pages>inacessible}
+% \index{missing sections}
+% \index{section>missing}
+%
+% \ItemDescribeCounter{FileDepth} Sectioning depth of file splits.
+% Defaults to -5, causing the entire \acro{HTML} website to be one single file.
+% \begin{itemize}
+% \item To place the entire file into one \acro{HTML} page, use: \\
+% \hspace*{.25in}|\setcounter{FileDepth}{-5}}|
+% \item To split the \acro{HTML} file at \cs{section} depth, use: \\
+% \hspace*{.25in}|\setcounter{FileDepth}{1}}|
+% \item To ensure that the \acro{HTML} pages/files are accessible:
+% \watchout\\
+% Place a \cs{tableofcontents} somewhere before the first section
+% break (therefore in the ``home page''), and set |tocdepth|\,>=\,|FileDepth|.
+% \index{files>inaccessible}
+% \index{pages>inacessible}
+% \index{missing sections}
+% \index{section>missing}
+% \end{itemize}
+%
+% \ItemDescribeBoolean{CombineHigherDepths} Combine a higher section with
+% its first lower subsections, down to the |FileDepth|.
+% Defaults to true. Set to false to simulate the concept of a chapter
+% opening on its own page, for example.
+%
+% The file splits are controlled by the counter |FileDepth| and
+% the boolean |CombineHigherDepths|.
+% Setting |FileDepth| to 0 splits the file
+% at chapters, 1 at sections, etc. |CombineHigherDepths| controls whether
+% to combine pages at levels higher than the chosen |FileDepth|, such as
+% in this tutorial where the page which opens the chapter also contains the
+% first section.
+% Be careful to set |tocdepth| and |SideTOCDepth| to allow
+% \watchout[Inaccesible pages!]
+% access to each page of the website. Set |tocdepth| and |SideTOCDepth| to be
+% greater than or equal to |FileDepth|.
+%
+% When making changes to the file structure,
+% \watchout[Lost in an old page!]
+% it is possible to end up
+% with the web browser pointing to an old file which is no longer in use.
+% When this occurs, changes to the web site will not appear in the browser,
+% even if reloading the page, because that page is no longer in use.
+% It is best to return to the home page, clean the files (|lwarpmk cleanall|),
+% change |FileDepth| and/or |CombineHigherDepths|, then finally recompile and
+% renavigate to the desired page using the new file structure.
+%
+% \ItemDescribeBoolean{FileSectionNames} If true, web page filenames are
+% derived from a sanitized version of the section names. If false, web pages
+% are numbered. Either way, the \cs{HTMLFileName} is prefixed.
+%
+% Example HTML filenames:
+% \changes{v0.20}{2016/09/11}{Docs: Examples for generating HTML file names.}
+% \label{sec:filenameexamples}
+% \margintag{HTML filenames}
+% \index{HTML>filename generation}
+% \begin{description}
+% \item[Numbered HTML nodes:] \
+%
+% Example: Homepage |index.html|, and |node-1|, |node-2|.
+% (See \cs{SetHTMLFileNumber} to number grouped by chapter, for example.)
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \newcommand{\HomeHTMLFileName}{index}
+% \newcommand{\HTMLFileName}{node-}
+% \usepackage{lwarp}
+% \boolfalse{FileSectionNames}
+% \end{Verbatim}
+%
+% \item[Named HTML sections, no prefix:] \
+%
+% Example: |index.html|, and |About.html|, |Products.html|
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \newcommand{\HomeHTMLFileName}{index}
+% \newcommand{\HTMLFileName}{}
+% \usepackage{lwarp}
+% \booltrue{FileSectionNames}
+% \end{Verbatim}
+%
+% \item[Named HTML sections, with prefix:] \
+%
+% Example: Homepage |mywebsite.html|, and additional pages such
+% as |mywebsite-About.html|, etc.
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \newcommand{\HomeHTMLFileName}{mywebsite}
+% \newcommand{\HTMLFileName}{mywebsite-}
+% \usepackage{lwarp}
+% \booltrue{FileSectionNames}
+% \end{Verbatim}
+% \end{description}
+%
+% \ItemDescribeMacro{\abstractname} The name of the abstract. This may also be over-written
+% by the \pkg{babel} package. Defaults to ``Abstract''.
+%
+% \ItemDescribeMacro{\MetaLanguage} The \acro{HTML} language meta header.
+% Defaults to {en-US}.
+%
+% \ItemDescribeMacro{\SetFirstPageTop} \marg{contents} \quad
+% A user-definable custom action applied
+% to the top of the home page. Useful for logos, etc.
+% Defaults empty.
+% Ignored in print output.
+%
+% \ItemDescribeMacro{\SetPageTop} \marg{contents} \quad
+% A user-definable custom action applied to
+% the top of pages other than the home page. Useful for logos, etc.
+% Defaults empty.
+% |\LinkHome| may be used to place a link back to the homepage.
+% Ignored in print output.
+%
+% \ItemDescribeMacro{\SetPageBottom} \marg{contents} \quad
+% A user-definable custom action applied to the
+% bottom of each web page.
+% Useful for authors, copyright notices, contact information, etc.
+% Defaults empty.
+% |\LinkHome| may be used to place a link back to the homepage.
+% Ignored in print output.
+%
+% \end{description}
+%
+% \item[Placed in the home page before the first section break:] \
+%
+% \begin{description}
+% \ItemDescribeMacro{\tableofcontents}
+% Used to place a table of contents on the home page.
+% This command must be used before the first file split, so that a way is
+% available to navigate to other files from the homepage.
+%
+% Links to each chapter/section are provided, as selected by |tocdepth|.
+% \end{description}
+%
+%
+% \item[Placed before any sectioning command which causes a file break:] \
+%
+% \begin{description}
+% \ItemDescribeMacro{\NewCSS} \marg{filename.css} \quad
+% Sets the \acro{CSS} file to use for the following
+% files. May be changed before each each sectioning command which would
+% cause a file split.
+%
+% The \acro{CSS} styles of the web pages are set by the \cs{NewCSS} command.
+% If \cs{NewCSS} is not used, a default plain style is used to mimic printed
+% \LaTeX\ output. |lwarp_sagebrush.css| is a semi-fancy colored style as shown
+% in this tutorial. Change it to |lwarp_formal.css| for a more formal look,
+% or comment out the \cs{NewCSS} command to see the default.
+% \cs{NewCSS} may be used before each file break to set the \acro{CSS} for
+% individual pagess of the website.
+%
+% \ItemDescribeMacro{\NewHTMLdescription} \marg{description} \quad
+% Sets the \acro{HTML} description tag for
+% the following files. May be changed before each each sectioning command which would
+% cause a file split.
+% \end{description}
+%
+% \needspace{2\baselineskip}
+% \item[Placed in the document wherever necessary:] \
+%
+% \begin{description}
+% \ItemDescribeEnv{warpprint} An environment which is only used
+% while generating print output. Place here anything which does not
+% apply to \acro{HTML} and which may cause problems with \pkg{lwarp}.
+% If \pkg{lwarp} knows about and emulates or supports
+% a package then its related macros, lengths, counters, etc. probably won't have
+% to be placed inside a \env{warpprint} environment, but unknown packages
+% may cause problems which may be isolated from \pkg{lwarp} using this environment.
+%
+% \ItemDescribeEnv{warpHTML} An environment which is only used
+% while generating \acro{HTML} output. This is useful for website logos and
+% other items which have no purpose in printed output.
+%
+% \ItemDescribeMacro{\warpprintonly} \marg{contents} \quad
+% A macro version of the \env{warpprint} environment.
+%
+% \ItemDescribeMacro{\warpHTMLonly} \marg{contents} \quad
+% A macro version of the \env{warpHTML} environment.
+% \end{description}
+%
+% \end{description}
+%
+%
+% \clearpage
+%
+% \subsection{Using \texttt{latexmk}}
+%
+% |latexmk| is a \LaTeX\ utility used to monitor changes in source files
+% and recompile as needed.
+%
+% \begin{enumerate}
+% \item In the tutorial's source code, at ``HTML FILENAME AND LATEXMK SETTINGS'',
+% insert the line: \\
+% \hspace*{2em}|\newcommand{\UseLatexmk}{true}|
+%
+% \item Directly recompile the printed version of the document.
+% \userentry{pdflatex tutorial.tex} \watchout[NOT \texttt{lwarpmk}!] \\
+% \hspace*{2em}(Or |xelatex| or |lualatex|)
+%
+% \begin{sloppy}
+% \pkg{lwarp} updates its own configuration files (|lwarpmk.conf| and \newline
+% |tutorial.lwarpmkconf|) whenever the printed version of the document
+% is compiled. These configuration files remember that |lwarpmk| should
+% use |latexmk| to compile the document.
+% \end{sloppy}
+%
+% \item Recompile the document.
+% \userentry{lwarpmk print} \quad and/or
+% \userentry{lwarpmk html}
+% \end{enumerate}
+%
+% Changes are detected by comparing checksums
+% rather than modification times, so |lwarpmk again| will not trigger a
+% recompile, but |latexmk| has a much better awareness of changes than
+% the |lwarpmk| utility does and it is likely to correctly know when to
+% recompile. A recompile may be forced by making a small change to the source.
+%
+%
+% \clearpage
+%
+% \subsection{Using XeLaTeX or LuaLaTeX}
+%
+% \XeLaTeX\ or \LuaLaTeX\ may be used instead of \LaTeX.
+%
+% \begin{enumerate}
+%
+% \item Remove the auxiliary files for the project:
+% \userentry{lwarpmk cleanall}
+%
+% \item Be sure that \\
+% \hspace*{2em} |\usepackage{lwarp-newproject}| \\
+% is still enabled in |tutorial.tex|.
+%
+% \item Use |xelatex| or |lualatex| to recompile the printed version.
+% \userentry{xelatex tutorial.tex} \quad -or-
+% \userentry{lualatex tutorial.tex}
+%
+% When the recompile occurs and \pkg{lwarp-newproject} is loaded,
+% the configuration files for |lwarpmk| are modified to remember
+% which \TeX\ engine was used. \XeLaTeX\ or \LuaLaTeX\ will be used for
+% future runs of |lwarpmk|.
+%
+% \item To recompile the document:
+% \userentry{lwarpmk print} \quad -and-
+% \userentry{lwarpmk html}
+%
+% \item Also rememeber to update the indexes and recompile again.
+% \end{enumerate}
+%
+%
+% \clearpage
+%
+% \subsection{Cleaning auxiliary files}
+%
+% To remove the auxiliary files |.aux|, |.toc|, |.lof|, |.lot|, |.idx|, |.ind|, and
+% |.log|:
+% \userentry{lwarpmk clean}
+%
+%
+% \subsection{Cleaning auxiliary and output files}
+%
+% To remove the auxiliary files, and also remove the |.pdf| and |.html| files:
+% \userentry{lwarpmk cleanall}
+%
+%
+% \subsection{Processing multiple projects in the same directory}
+%
+% It is possible to have several projects in the same directory.
+% |lwarpmk| has an optional parameter which is the document to compile.
+%
+% To create each project:
+% \userentry{pdflatex project\_a}
+% \userentry{pdflatex project\_b}
+%
+% Each project is given its own configuration file: \\
+% \hspace*{2em}|project_a.lwarpmkconf|, |project_b.lwarpmkconf|
+%
+% To compile each project with |lwarkmk|:
+% \userentry{lwarpmk print project\_a}
+% \userentry{lwarpmk html project\_b}
+%
+%
+% \subsection{Using the \texttt{make} utility}
+%
+% |lwarpmk| has an action which may be useful for integration with the
+% common |make| utility:\\
+% \hspace*{2em}|lwarpmk pdftohtml [project]|
+%
+% |make| may be used to compile the code to \acro{PDF} with \acro{HTML}
+% tags (|project_html.pdf|), then |lwarpmk| may be used to
+% convert each target to \acro{HTML} files.
+%
+%
+% \clearpage
+%
+% \section{Additional details}
+%
+% \label{sec:usage}
+%
+%
+%
+% \subsection{Font and UTF-8 support}
+% \label{sec:fonts}
+% \index{font>selection}
+% \index{Unicode>selection}
+% \index{UTF-8>selection}
+% \changes{v0.16}{2016/04/08}{Docs: Font and UTF-8 support.}
+% \changes{v0.16}{2016/04/08}{Lwarp no longer selects fonts.}
+%
+% \pkg{lwarp} uses |pdftotext| to convert \acro{PDF} output into UTF-8-encoded
+% text. This process requires that UTF-8 information be embedded in the \acro{PDF}
+% file, which usually prevents the use of bit-mapped fonts.
+% \index{font>bitmapped}
+%
+% While using |pdflatex|, if no font-related package is specified, the default
+% \margintag{vector fonts}
+% bit-mapped Computer Modern font is used,
+% \margintag{Computer Modern}%
+% \index{font>Computer Modern}\index{Computer Modern}%
+% \watchout%
+% so simply add \\
+% \hspace*{.25in}|usepackage{lmodern}| \\
+% to the preamble to enable the related vector font instead, or use\\
+% \hspace*{.25in}|\usepackage{dejavu}|
+%
+% \index{Deja Vu}%
+% \index{font>Deja Vu}%
+% \index{Unicode>enhanced coverage}%
+% \index{UTF-8>enhanced coverage}%
+% or other other font packages, which may provide an increased coverage of Unicode mappings.
+% Avoid bit-mapped fonts.
+%
+% \XeLaTeX{} and \LuaLaTeX{} users must use the \pkg{fontspec} package.
+% \watchout
+% Do NOT use \pkg{fontenc}!
+%
+% Place \pkg{fontspec} or \pkg{fontenc} and other font and UTF-8 related commands
+% after the |\documentclass| command and before |\usepackage{lwarp}|:
+%
+% \begin{enumerate}
+% \item |documentclass{article/book/report}| goes here, followed by any of:
+% \item Font and UTF-8 related commands:
+% \begin{itemize}
+% \item For \XeLaTeX{} or \LuaLaTeX:
+% \begin{itemize}
+% \item \pkg{fontspec} and font choices
+% \DescribePackage{fontspec}
+%
+% \medskip
+% \pkg{lwarp} sets the following to turn off \TeX{} ligatures during
+% \margintag{ligatures}
+% the generation of \acro{HTML} tags, and turn off common ligatures
+% in regular text, since older browsers may not display them correctly
+% and newer browsers can automatically re-create them.
+% \index{ligatures}\index{font>ligatures}
+% \vspace{-1ex}
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4,frame=lines]
+% \defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}}
+% \defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}}
+% \defaultfontfeatures[\ttfamily]{Ligatures=NoCommon}
+% \end{Verbatim}
+% \end{itemize}
+% \item For |pdflatex|:
+% \begin{itemize}
+% \item \pkg{lmodern} or other font-related packages
+% \DescribePackage{lmodern}
+% \index{font>packages}
+% \item \pkg{fontenc}
+% \DescribePackage{fontenc}
+% \item \pkg{inputenc}
+% \DescribePackage{inputenc}
+% \item \pkg{newunicodechar}
+% \DescribePackage{newunicodechar}
+% \item |\input glyphtounicode.tex|
+% \DescribeFile{glyphtounicode}
+% \item |\input glyphtounicode-cmr.tex% from the pdfx package|
+% \item |\pdfgentounicode=1|
+% \item \pkg{cmap}
+% \DescribePackage{cmap}
+% \item \pkg{textcomp}
+% \DescribePackage{textcomp}
+% \item \pkg{microtype} is automatically used by \pkg{lwarp}
+% \DescribePackage{microtype}
+% to turn off f,q,t,T,Q ligatures for the same
+% \margintag{ligatures}
+% browser-related reasons shown above. Also, the monospaced font is used
+% during \acro{HTML} tag generation to turn off \TeX{} ligatures.
+% \index{ligatures}\index{font>ligatures}
+% \end{itemize}
+% \end{itemize}
+% \item |\usepackage{lwarp}| (\cref{sec:loading}) goes after any of the above, followed by:
+% \item \ldots{} the rest of the preamble and the main document.
+% \end{enumerate}
+%
+% \subsection{\protect\pkg{lwarp} package loading and options}
+% \label{sec:loading}
+% \index{settings>lwarp package options}
+%
+% \pkg{lwarp} supports |book|, |report|, and |article| classes.
+%
+% Load the \pkg{lwarp} package immediately after the font and UTF-8 setup commands.
+% \changes{v0.16}{2016/04/08}{Docs: Moved location of \cs{usepackage\{lwarp\}}.}
+% \changes{v0.19}{2016/05/25}{Docs: Math options.}
+% \DescribePackage{lwarp}
+% \index{lwarp>loading}\index{lwarp>options}
+%
+% \DescribeOption[lwarp]{warpprint}
+% \DescribeOption[lwarp]{warpHTML}
+% Select the |warpprint| option to generate print output (default),
+% or the |warpHTML| option to generate \htmlfive{} output.
+% The default is print output, so the print version may be
+% compiled with the usual |pdflatex|, etc.
+% When \pkg{lwarp-newproject} is loaded in print mode, it creates
+% |<project>_html.tex|, which sets the |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.
+%
+% \DescribeOption[lwarp]{mathsvg}
+% \DescribeOption[lwarp]{mathjax}
+% For math display, select |mathsvg| (default), or |mathjax|.
+% For more information about the math options, see \cref{sec:limitsmath}.
+%
+%
+% \subsection{Selecting the operating system}
+% \label{sec:OSportabilityusage}
+% \changes{v0.11}{2016/03/11}{Added section: Selecting the operating system.}
+%
+% \osportabilityusage
+%
+%
+% \subsection{Selecting actions for print or HTML output}
+% \label{sec:selectingoutput}
+% \index{settings>selecting output}
+% \changes{v0.15}{2016/04/05}{Docs: Clarify print/HTML output.}
+%
+% The following environments and macros are used to select actions which only apply
+% to either traditional \LaTeX{} print-formatted PDF generation,
+% or to \acro{HTML} generation.
+%
+% For most of built-in \LaTeX\ and many additional packages
+% there is user-level source code support or emulation,
+% so no special handling will be required.
+% For those cases which \pkg{lwarp} does not handle by itself, the
+% following environments and macros may be used to isolate sections
+% of code for print-only or \acro{HTML}-only.
+%
+% These environments are also useful for creating a special version of
+% the titlepage for print and another for \acro{HTML}.
+
+% \DescribeEnv{warpHTML}
+% Anything which is to be done only for \htmlfive{} output
+% is surrounded by a |warpHTML| environment:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \begin{warpHTML}
+% ... something to be done only during HTML generation
+% \end{warpHTML}
+% \end{Verbatim}
+%
+% \DescribeEnv{warpprint}
+% Anything which is to be done only for print output
+% is surrounded by a |warpprint| environment:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \begin{warpprint}
+% ... something to be done only during traditional PDF generation
+% \end{warpprint}
+% \end{Verbatim}
+%
+% \DescribeEnv{warpall}
+% Anything which is to be done for any output
+% may be surrounded by a |warpall| environment. Doing so is optional.
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \begin{warpall}
+% ... something to be done during print PDF or HTML output
+% \end{warpall}
+% \end{Verbatim}
+%
+%
+% Macros are also provided for print-only or \acro{HTML}-only code:
+%
+% \DescribeMacro{\warpprintonly} \marg{actions}
+%
+% Performs the given actions only when print output is being generated.
+%
+% \DescribeMacro{\warpHTMLonly} \marg{actions}
+%
+% Performs the given actions only when \acro{HTML} output is being generated.
+%
+%
+%
+% \subsection{Commands to be placed into the \env{warpprint} environment}
+% \label{sec:printcommands}
+%
+% \changes{v0.14}{2016/03/26}{Docs: Commands into a warpprint environment.}
+%
+% Certain print-related commands should always be placed
+% inside a \env{warpprint} environment, or may need other special handling.
+% These are unrelated to \acro{HTML} output, but are hard to isolate automatically.
+% For example:
+%
+% \begin{itemize}
+% \item Paragraph formatting: \cs{parindent} \cs{parskip}
+% \item Variable spaces such as \cs{vspace}. \cs{hfill} is turned into a \cs{quad}.
+% Fixed spaces such as \cs{quad} are emulated correctly.
+% \item Manual page positions such as the \pkg{textpos} package, which is
+% emulated but only in a limited way.
+% \end{itemize}
+%
+% Some packages require additional setup commands. Where these packages are emulated
+% for \acro{HTML}, setup commands may work for the emulated \acro{HTML} output as well as for print
+% output. See the details for each package in this document for more information.
+%
+% Also see \cref{sec:troubleshooting}: \nameref{sec:troubleshooting}.
+%
+%
+% \subsection{Commands for a successful HTML conversion}
+% \label{sec:successfulcommands}
+% \index{HTML>commands for a successful conversion}
+%
+% \changes{v0.14}{2016/03/26}{Docs: Commands for a successful HTML conversion.}
+%
+% Some commonly-used \LaTeX{} expressions should be modified to allow
+% for a smooth conversion to both \acro{HTML} and print-formatted outputs:
+%
+% \begin{description}
+% \item [\cs{bfseries}, etc:] Use \cs{textbf} instead.
+% \item [\cs{centering}, \cs{raggedright}, \cs{raggedleft}:] ~
+%
+% Use the environments \env{center}, \env{flushright}, \env{flushleft} instead.
+%
+% \item [Superscripts and other non-math uses of math mode:] ~
+%
+% Use \cs{textsuperscript\{x\}} instead of |$^{x}$|
+%
+% \item [Empty \cs{item} followed by a new line of text or a nested list:] \
+%
+% Use a trailing backslash: |\item[label] \|
+% \index{item, list, empty}\index{list item, empty}
+%
+% \item [\cs{fbox} around a minipage:] ~
+%
+% \cs{fbox} can only be used around inline items during
+% \acro{HTML} output.
+%
+% For an \cs{fbox} around a minipage, you may:
+% \index{fbox>around a minipage}
+% \index{minipage>in an \cs{fbox}}
+% \begin{itemize}
+% \item Place the \cs{fbox} command and
+% its closing brace inside \env{warpprint} environments.
+% \item Use \cs{mdframed} instead.
+% ^^A \item Use the \env{example} or \env{sidebar} environments.
+% \item Use a custom environment to create a sidebar,
+% containing a \env{BlockClass} environment
+% with custom \acro{CSS} formatting,
+% and |\warpprintonly{\hrule}| command:
+% \begin{Verbatim}[gobble=2,frame=lines]
+% \begin{BlockClass}{frameminipage}% ignored in print output
+% % use CSS to format div class ``framedminipage''
+% \warpprintonly{\hrule} % only appears in print output
+% Contents
+% \warpprintonly{\hrule} % only appears in print output
+% \end{BlockClass}
+% \end{Verbatim}
+% \end{itemize}
+% \end{description}
+%
+% Also see \cref{sec:troubleshooting}: \nameref{sec:troubleshooting}.
+%
+%
+%
+%
+% \subsection{Title page}
+% \label{sec:settitle}
+% \index{settings>title page}
+%
+% In the preamble, place an additional block of code to set the following:
+% \vspace{-2em}
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \title{Document Title} % One line only
+% \subtitle{Optional Document Subtitle \\ with optional multiple lines}
+% \author{Author One\affiliation{Affiliation One} \and
+% Author Two\affiliation{Affiliation Two} }
+% \date{Optional date}
+% \published{Optional Journal Name \\ Optional multiple lines}
+% \end{Verbatim}
+%
+% The title is used in the meta tags in the \acro{HTML} files, and the rest are used
+% in |\maketitle|.
+%
+%
+% \DescribeMacro{\maketitle}
+% Use |\maketitle| just after the |\begin{document}|, as this will establish
+% the title of the homepage. Optionally, use a |titlepage| environment instead.
+%
+% \DescribeEnv{titlepage}
+% The \env{titlepage} environment may be used to hold a custom title page.
+% The titlepage will be set in a div class |titlepage|, and \cs{printtitle}, etc.\ may be used
+% inside this environment.
+%
+% \DescribeEnv{titlingpage}
+% Another form of custom title page, where \cs{maketitle} is allowed, and
+% additional information may be included as well.
+%
+% \DescribeMacro{\title} \marg{title}
+
+% Avoid newlines in the |\title|; these will interfere with the
+% file break and \acro{CSS} detection.
+% \watchout
+% Use the |\subtitle| command instead.
+% In \acro{HTML}, the title will appear in a heading ``h1''.
+%
+% \DescribeMacro{\author} \marg{author}
+%
+% In |\author|, use |\protect| before formatting commands such as |\textsc|.
+% \watchout
+% In \acro{HTML}, the author will appear in a div class |author|.
+% \cs{affiliation} is a new addition to \pkg{lwarp}.
+%
+% \DescribeMacro{\date} \marg{date}
+%
+% |\date| works as expected.
+% In \acro{HTML}, this will appear in a div class ``titledate''.
+%
+% \DescribeMacro{\subtitle} \marg{subtitle}
+%
+% A new command which sets a subtitle. Newlines are allowed.
+% The default is empty.
+% In \acro{HTML}, this will appear in a div class ``subtitle''.
+%
+% \DescribeMacro{\published} \marg{published}
+%
+% A new command which sets a publisher.
+% The default is empty.
+% In \acro{HTML}, this will appear in a div class ``published''.
+%
+%
+% \DescribeMacro{\thanks} \marg{text}
+%
+% \cs{thanks} are allowed in the titlepage fields, and will be rendered
+% as \acro{HTML} notes at the bottom of the title page.
+%
+%
+% \subsection{HTML page meta descriptions}
+%
+% \label{sec:htmldescription}
+% \index{HTML>meta tag>description}
+% \index{description>HTML meta tag}
+% \index{meta tag, HTML>description}
+% \DescribeMacro{\NewHTMLdescription} \marg{A description of the web page.}
+% \quad The default is no description.
+%
+% Each page of \acro{HTML} output should have its own \acro{HTML} meta description,
+% which usually shows up in web search results,
+% \margintag{limitations}
+% is limited to around
+% 150 characters in length, and should not include the \acro{ASCII} double quote character (").
+%
+% Use \cs{NewHTMLdescription}
+% \margintag{placement}
+% just before |\begin{document}| to set the description of the home page,
+% and also just before each sectioning command such as \cs{chapter} or \cs{section}
+% where a new file will be generated, depending on |FileDepth|. For example, if |FileDepth| is 1,
+% use \cs{NewHTMLdescription} just before each \cs{section} command, and that description will be
+% placed inside the \acro{HTML} page for that \cs{section}. The same descrition will be used for
+% all following \acro{HTML} files as well, until reset by a new \cs{NewHTMLdescription}. It is best
+% to use a unique description for each \acro{HTML} file.
+%
+% To disable the generation of \acro{HTML} description meta tags,
+% \margintag{disabling}
+% use:\\
+% \hspace*{1em} |\NewCSSdescription{}|
+%
+%
+% \subsection{CSS}
+%
+% \label{sec:projectcss}
+% \DescribeFile{lwarp.css}\DescribeFile{project.css}\DescribeFile{sample_project.css}\label{sec:lwarpcss}It is best
+% to make a local project-specific \acro{CSS} file such as |project.css|, containing only
+% things which are different from |lwarp.css|.
+% |project.css| should refer to |lwarp.css| as follows:
+% \index{CSS>project-specific changes}\index{CSS>lwarp.css}
+% \index{settings>\acro{CSS} project-specific}
+% \vspace{-2ex}
+% \VerbatimInput[frame=lines]{sample_project.css}
+%
+% An example file called |sample_project.css| is provided, and may be renamed |project.css|.
+%
+% \label{sec:setcss}
+%
+% \DescribeMacro{\NewCSS}
+% For each section at which \acro{HTML} files are split,
+% |\NewCSS| may be used before the sectioning command to select a \acro{CSS} file for that and all
+% following sections. This may be changed numerous times throughout the file, resulting in
+% different \acro{HTML} pages having different \acro{CSS} files assigned.
+% \index{CSS>file selection}
+% \index{CSS>per HTML page}
+% \index{settings>CSS selection}
+%
+%
+%
+% \subsection{Special cases and limitations}
+% \label{sec:limitations}
+%
+% \subsubsection{Text formatting}
+%
+% \limitstext
+%
+%
+% \subsubsection{Verse and Memoir packages}
+%
+% \limitsverse
+%
+%
+% \subsubsection{Math}
+% \label{sec:limitsmath}
+%
+% \limitsmath
+%
+% For an example of using custom \LaTeX\ macros with MathJax,
+% \margintag{custom MathJax macros}
+% see page \pageref{ex:mathjaxmacros}.
+%
+%
+% \subsubsection{Graphics}
+%
+% \limitsgraphics
+%
+%
+% \subsubsection{Xcolor}
+%
+% \limitsxcolor
+%
+%
+% \subsubsection{\tikz}
+%
+% \limitstikz
+%
+% See \cref{sec:tikz}.
+%
+%
+% \subsubsection{Tabular}
+%
+% \limitstabular
+%
+%
+% \subsubsection{Minipages}
+%
+% \limitsminipage
+%
+% \subsubsection{Mdframed}
+%
+% \limitsmdframed
+%
+% \subsubsection{\pkg{float}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together}
+%
+% \limitscombiningfloats
+%
+%
+% \subsubsection{\pkg{caption} and \pkg{subcaption} packages}
+%
+% \limitscaption
+%
+%
+% \subsubsection{\pkg{subfig} package}
+%
+% \limitssubfig
+%
+%
+% \subsubsection{\pkg{floatrow} package}
+%
+% \limitsfloatrow
+%
+%
+% \subsubsection{\pkg{siunitx} package}
+% \DescribePackage{siunitx}
+%
+% \limitssiunitx
+%
+%
+% \subsubsection{\pkg{newclude} package}
+% \DescribePackage{newclude}
+% \changes{v0.14}{2016/03/29}{Docs: Newclude limitations.}
+%
+% \limitsnewclude
+%
+%
+% \subsubsection{\pkg{newtxmath} package}
+% \DescribePackage{newtxmath}
+%
+% \limitsnewtxmath
+%
+%
+% \subsubsection{\pkg{babel} package}
+% \DescribePackage{babel}
+%
+% \limitsbabelone
+%
+% \limitsbabeltwo
+%
+%
+% \subsubsection{\pkg{enumitem} package}
+% \DescribePackage{enumitem}
+%
+% \limitsenumitem
+%
+%
+%
+%
+% \section{Expanding the code base}
+% \pagestyle{pageheadfoot}
+%
+% Purely text-based packages probably will work as-is when generating
+% \acro{HTML}.
+%
+% Look to existing code for ideas on how to expand into new code.
+%
+% An environment may be converted to a |lateximage| then displayed
+% with an image of the resulting \LaTeX{} output.
+% See \cref{sec:picture} for an example of the |picture| environment.
+%
+% To create a custom \acro{HTML} block or inline \acro{CSS} class,
+% see \cref{sec:highlevelclasses}.
+%
+% \subsection{Creating an lwarp version of a package}
+%
+% When creating \acro{HTML},
+% \pkg{lwarp} redefines the \cs{usepackage} and \cs{RequirePackage}
+% macros such that it first looks to see if a |lwarp-<packagename>.sty|
+% version exists. If so, the \pkg{lwarp} version is used instead.
+% This modular system allows the users to create their own
+% versions of packages for \pkg{lwarp} to use for \acro{HTML}, simply by creating
+% a new package with a |lwarp-| prefix. If placed in the local
+% directory along with the source code, it will be seen by that project
+% alone. If placed alongside the other |lwarp-| packages where \TeX\
+% can see it, then the user's new package will be seen by any documents
+% using \pkg{lwarp}.
+%
+% An |lwarp-<packagename>.sty| package is only used during \acro{HTML}
+% generation. Its purpose is to pretend to be the original package,
+% while modify anything necessary to create a successful \acro{HTML} conversion.
+% For many packages it is sufficient to simply provide nullified macros,
+% lengths, counters, etc. for anything which the original package does,
+% while passing the raw text on to be typeset. See the pre-existing
+% |lwarp-| packages for examples.
+%
+% Note that anything the user might expect of the original package
+% must be replaced or emulated by the new |lwarp-| package, including
+% package options, user-adjustable counters, lengths, and booleans, and
+% conditional behaviors.
+%
+% Each |lwarp-| package should first call either \cs{LWR at ProvidesPackageDrop}
+% or \cs{LWR at ProvidesPackagePass}. If dropped, the original print-version
+% package is ignored, and only the |lwarp-| version is used.
+% Use this where the original print version is useless for \acro{HTML}.
+% If passed, the original package is loaded first, with the supplied options, then
+% the |lwarp-| version continues loading as well. Use this when \acro{HTML}
+% output only requires some modifications of the original package.
+% For a case where the original package is usable as-is, there is no
+% need to create a |lwarp-| version.
+%
+%
+%
+%
+%
+% \section{Troubleshooting}
+% \label{sec:troubleshooting}
+% \index{FAQ}\index{Frequently Asked Questions}\index{bugs}
+% \index{troubleshooting}\index{problems}\index{error messages}
+% \index{debugging}
+%
+% \subsection{Using the \protect\texttt{lwarp.sty} package}
+%
+% Also see: \\
+% \Cref{sec:successfulcommands}: \nameref{sec:successfulcommands} \\
+% \Cref{sec:printcommands}: \nameref{sec:printcommands} \\
+% \Cref{sec:limitations}: \nameref{sec:limitations}
+%
+% \changes{v0.14}{2016/03/26}{Docs: Troubleshooting cross-references.}
+% \changes{v0.16}{2016/04/08}{Docs: Text not converting.}
+%
+% \begin{description}
+%
+% \item [Text is not converting:] ~
+% \begin{itemize}
+% \item Font-related UTF-8 information must be embedded in the \acro{PDF} file.
+% See \cref{sec:fonts} regarding vector fonts.
+% \end{itemize}
+%
+% \item [Undefined HTML settings:] \
+% \item See the warning regarding the placement of the \acro{HTML} settings
+% at \cref{sec:htmlsettings}.
+%
+% \item [Obscure error messages:] ~
+% \begin{itemize}
+% \item Be sure that a print version of the document compiles and
+% that your document's \LaTeX{} code is correct, before attempting
+% to generate an \acro{HTML} version.
+% \end{itemize}
+%
+% \item [Missing sections:] ~
+% \begin{itemize}
+% \item See \cref{sec:filedepth} regarding the
+% |FileDepth| and |SideTOCDepth| counters,
+% and the use of \cs{tableofcontents} in the home page.
+% \end{itemize}
+%
+% \item [Missing HTML files:] \
+% \item See the warning regarding changes to the \acro{HTML} settings
+% at \cref{sec:htmlsettings}.
+%
+% \item [Missing / incorrect cross-references:] ~
+% \index{cross-references>missing or incorrect}
+% \begin{itemize}
+% \item Use |lwarpmk again| followed
+% by |lwarpmk html| or |lwarpmk print| to compile the document one more time.
+% \end{itemize}
+%
+% \item [Em-dashes or En-dashes in listing captions and titles:] \
+%
+% Use \XeLaTeX\ or \LuaLaTeX.
+%
+% \item [Floats out of sequence:] ~
+% \begin{description}
+% \item [Mixed ``Here'' and floating:] Floats [H]ere and regular floats may
+% become out of order. \cs{clearpage} if necessary.
+% \item [Caption setup:] With \cs{captionsetup} set the positions for
+% the captions |above| or |below| to match their use in the source code.
+% \end{description}
+%
+% \item [Print document contains HTML tags:] ~
+% \begin{itemize}
+% \item Be sure that the document
+% selects |\usepackage[warpprint]{lwarp}| instead of |[warpHTML]|.
+% \end{itemize}
+
+% \item [HTML document contains a single unformatted print
+% document:] ~
+% \begin{itemize}
+% \item Be sure that the document
+% selects |\usepackage[warpHTML]{lwarp}| instead of |[warpprint]|.
+% \end{itemize}
+%
+% \item [Images are appearing in strange places:] ~
+% \index{images>in strange places}
+% \begin{itemize}
+% \item |lwarpmk limages| to refresh the |lateximage| images.
+% \end{itemize}
+%
+% \item [``Leaders not followed by proper glue'':] This can be caused by
+% a missing |l@<floattype>| or |l@<sectiontype>| definition.
+% See \pkg{lwarp}'s definitions for examples.
+%
+% \item [Plain-looking document:] ~
+% \begin{itemize}
+% \item The document's \acro{CSS} stylesheet may not be available, or may be
+% linked incorrectly. Verify any \cs{NewCSS} statements point to
+% a valid \acro{CSS} file.
+% \end{itemize}
+%
+% \item [Broken fragments of HTML:] ~
+% \begin{itemize}
+% \item Check the \acro{PDF} file used to create \acro{HTML}
+% to see if the tags overflowed the margin.
+% (This is why such large page size and margins are used.)
+% \end{itemize}
+%
+% \item [Changes do not seem to be taking effect:] ~
+% \begin{itemize}
+% \item Be sure to |lwarpmk clean|, recompile, then start by reloading the home page.
+% You may have been looking at an older version of the document.
+% If you changed a section name, you may have been looking at
+% the file for the old name.
+% \item See the warning regarding changes to the \acro{HTML} settings
+% at \cref{sec:htmlsettings}.
+% \item Verify that the proper \acro{CSS} is actually being used.
+% \item The browser may compensate for some subtle changes, such as
+% automatically generating ligatures, reflowing text, etc.
+% \end{itemize}
+%
+% \item [Un-matched conditional compiles:] ~
+% \begin{itemize}
+% \item Verify the proper |begin|/|end| of |warpprint|, |warpHTML|, and |warpall| environments.
+% \end{itemize}
+%
+% \end{description}
+%
+%
+% \subsubsection{Debug tracing output}
+%
+% \DescribeMacro{\tracinglwarp}
+% When \cs{tracinglwarp} is used, \pkg{lwarp} will add extra
+% tracing messages to the |.log| file. The last several messages
+% may help track down errors.
+%
+% Place \cs{tracinglwarp} just after |\usepackage{lwarp}| to
+% activate tracing.
+%
+%
+%
+%
+% \subsection{Compiling the \protect\texttt{lwarp.dtx} file}
+%
+% \begin{description}
+% \item [Illogical error messages caused by an out-of-sync |lwarp.sty| file:] ~
+% \begin{enumerate}
+% \item Delete the |lwarp.sty| file.
+% \item |pdflatex lwarp.ins| to generate a new |lwarp.sty| file.
+% \item |pdflatex lwarp.dtx| to recompile the |lwarp.pdf| documentation.
+% \end{enumerate}
+%
+% \item [Un-nested environments:]~
+%
+% Be sure to properly nest:
+% \begin{itemize}
+% \item |\begin{macrocode}| and |\end{macrocode}|
+% \item |\begin{macro}| and |\end{macro}|
+% \item |\begin{environment}| and |\end{environment}|
+% \end{itemize}
+% \end{description}
+%
+%
+%
+%
+% \StopEventually{\PrintChanges\PrintIndex}
+%
+%
+%
+%
+% \section{Implementation}
+%
+%
+% This package is perhaps best described as a large collection of smaller
+% individual technical challenges,
+% in many cases solved through a number of \sout{crude hacks} clever tricks.
+% Reference sources are
+% given for many of the solutions, and a quick internet search will provide
+% additional possibilities.
+%
+% Judgement calls were made, and are often commented. Improvements are possible.
+% The author is open to ideas and suggestions.
+%
+% Packages were patched for re-use where they provided significant functionality.
+% Examples include \pkg{xcolor} with its color models and conversion to \acro{HTML}
+% color output, and \pkg{siunitx} which provides many number and unit-formatting
+% options, almost all of which are available in pure-text form, and thus
+% easily used by \cmds{pdftotext}.
+%
+% Packages were emulated where their primary purpose was visual formatting which is not
+% relevent to \acro{HTML} output. For example, packages related to sectioning
+% are already patched by numerous other packages, creating a difficult number of
+% combinations to try to support, and yet in \acro{HTML} output all of the
+% formatting is thrown away, so these packages are merely emulated.
+%
+% Packages with graphical output are allowed as-is, but must be nested inside a
+% \env{lateximage} environment to preserve the graphics.
+%
+% There is still room to improve the factoring of the code, and doing so will become
+% important if support for other output formats is added. Rather than wait until the
+% code is pristine, the author felt it best to publish early and accept input before
+% pushing on towards a perhaps less-than-ideal solution.
+%
+%
+% Testing has primarily been done with the Iceweasel/Firefox browser.
+%
+%
+% \section{Stack depths}
+% \label{sec:stackdepths}
+% \index{HTML>headings}
+% \index{section>depths}\index{stack depths}
+%
+% Stacks are created to track depth inside the \LaTeX{} document structure.
+% This depth is translated to \acro{HTML} headings as shown
+% in \cref{tab:depthsheadings}.
+% ``Depth'' here is not
+% depth in the traditional computer-science stack-usage sense, but rather a
+% representation of the nesting depth inside the \LaTeX{} document structure.
+%
+% When starting a new section, the program first must close out any existing
+% sections and lists of a deeper level to keep the \acro{HTML} tags nested correctly.
+%
+% \begin{table}
+% \caption{Section depths and HTML headings\label{tab:depthsheadings}}
+% \begin{tabular}{lcl}
+% \toprule
+% Section & \parbox[c]{.35in}{\LaTeX{} depth} & \acro{HTML} headings \\
+% \midrule
+% title of the entire website & & h1 \\
+% none & -5 & new for this package \\
+% book & -2 & \textbf{not yet used} \\
+% part & -1 & h2 \\
+% chapter & 0 & h3 \\
+% section & 1 & h4 \\
+% subsection & 2 & h5 \\
+% subsubsection & 3 & h6 \\
+% paragraph & 4 & span class = "paragraph" \\
+% subparagraph & 5 & span class = "subparagraph" \\
+% listitem & 7 & new for this package, used for list items \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% Support for the \pkg{memoir} package will require the addition of a \cmds{book}
+% level, which will push the \acro{HTML} headings down a step, and also cause \cmds{subsubsection}
+% to become a \cmds{div} due to a limit of six \acro{HTML} headings.
+%
+% It is possible to use \htmlfive{} \cmds{section} and \cmds{H1} for all levels,
+% but this may not be well-recognized by older browsers.
+%
+% \clearpage
+%
+%
+%
+% \section{Source Code}
+% This is where the documented source code for \pkg{lwarp} begins,
+% continuing through the following sections all the way to the
+% change log and index at the end of this document.
+%
+% \index{numbers>left margin}\index{line numbers}
+% \index{margin>numbers}\index{margin>tags}
+% \documentationnotes
+% \index{warning icon}\index{danger icon}\index{icon>warning}
+% \index{for>HTML output}\index{for>PRINT output}\index{for>HTML \& PRINT}
+% \changes{v0.15}{2016/04/05}{Docs: Added warning icons for items needing
+% special attention.}
+%
+% \vfill
+%
+% \begin{center}
+% \pkg{lwarp} source code begins on the following page.
+% \end{center}
+%
+%
+%
+% \clearpage
+%
+%
+%
+% \section{Detecting the \TeX\ Engine — pdflatex, lualatex, xelatex}
+%
+% \begin{macrocode}
+\RequirePackage{iftex}
+
+\ifLuaTeX
+\RequirePackage{luatex85}% until the geometry package is updated
+\fi
+% \end{macrocode}
+%
+%
+%
+% \section{Unicode Input Characters}
+% \changes{v0.18}{2016/05/17}{PDF Unicode input characters.}
+% \index{Unicode>input characters}
+%
+% \codeall
+%
+% If using |pdflatex|, convert a minimal set of Unicode characters.
+% Additional characters may be defined by the user, as needed.
+%
+% If using and of |pdflatex|, |xelatex|, or |lualatex|, \cs{texttimes} is
+% declared for a common multiply symbol.
+% \begin{macrocode}
+
+\RequirePackage{newunicodechar}
+
+\newunicodechar{⨯}{\texttimes}
+
+\ifPDFTeX
+\newunicodechar{ff}{ff}
+\newunicodechar{fi}{fi}
+\newunicodechar{fl}{fl}
+\newunicodechar{ffi}{ffi}
+\newunicodechar{ffl}{ffl}
+\newunicodechar{—}{---}
+\newunicodechar{–}{--}
+% \end{macrocode}
+% In verbatim text in PDFTex, preserve upright quotes.
+% \begin{macrocode}
+\RequirePackage{upquote}
+\else
+\fi
+% \end{macrocode}
+%
+%
+%
+% \section{Handling package options}
+% \label{sec:handlingpackageoptions}
+%
+%
+% \DescribePackage{etoolbox}
+% Provides |\ifbool| and other functions.
+%
+% \begin{macrocode}
+\RequirePackage{etoolbox}[2011/01/03]
+% requires v2.6 for \BeforeBeginEnvironment, etc.
+% \end{macrocode}
+
+
+% \DescribePackage{ifplatform}
+% Provides \cs{ifwindows} to try to automatically detect
+% Windows OS.
+%
+% \begin{macrocode}
+\RequirePackage{ifplatform}% sense op-system platform
+% \end{macrocode}
+%
+%
+% \DescribePackage{comment}
+% Provides conditional code blocks.
+%
+% \begin{macrocode}
+\RequirePackage{comment}
+\excludecomment{testing}
+% \end{macrocode}
+
+
+
+% \DescribePackage{kvoptions}
+% Allows key/value package options.
+% \begin{macrocode}
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{family=LWR,prefix=LWR@}
+% \end{macrocode}
+
+
+% \DescribeBoolean{warpingprint}
+% \DescribeBoolean{warpingHTML}
+% \DescribeBoolean{mathjax}
+% Set to true/false depending on the package option selections for
+% print/\acro{HTML} output and mathsvg/mathjax:
+% \begin{macrocode}
+\newbool{warpingprint}
+\newbool{warpingHTML}
+\newbool{mathjax}
+% \end{macrocode}
+
+
+% \begin{macro}{\warpprintonly} \marg{contents}
+%
+% Only process the contents if producing printed output.
+% \changes{v0.19}{2016/06/06}{Replaces \cs{rowprintedonly}.}
+% \begin{macrocode}
+\newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\warpHTMLonly} \marg{contents}
+%
+% Only process the contents if producing \acro{HTML} output.
+% \changes{v0.19}{2016/06/06}{Added.}
+% \begin{macrocode}
+\newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{environment}{warpall}
+% Anything in the |warpall| environment will be generated for print or \acro{HTML} outputs.
+% \begin{macrocode}
+\includecomment{warpall}
+% \end{macrocode}
+% \end{environment}
+
+
+
+
+% \begin{environment}{warpprint}
+% Anything in the |warpprint| environment will be generated for print output only.
+%
+% \DescribeOption[lwarp]{warpprint}
+% If the |warpprint| option is given, boolean |warpingprint| is true and boolean |warpingHTML| is false,
+% and may be used for |\ifbool| tests.
+%
+% \begin{macrocode}
+\DeclareVoidOption{warpprint}{%
+\PackageInfo{lwarp}{Using option 'warpprint'}
+\includecomment{warpprint}%
+\excludecomment{warpHTML}%
+\booltrue{warpingprint}%
+\boolfalse{warpingHTML}%
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{environment}{warpHTML}
+% Anything in the |warpHTML| environment will be generated for \acro{HTML} output only.
+%
+% \DescribeOption[lwarp]{warpHTML}
+% If the |warpHTML| option is given, boolean |warpingHTML| is true and boolean |warpingprint| is false,
+% and may be used for |\ifbool| tests.
+%
+% \begin{macrocode}
+\DeclareVoidOption{warpHTML}{%
+\PackageInfo{lwarp}{Using option 'warpHTML'}
+\excludecomment{warpprint}%
+\includecomment{warpHTML}%
+\booltrue{warpingHTML}%
+\boolfalse{warpingprint}%
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+
+
+%
+% \changes{v0.19}{2016/05/25}{Options: mathsvg and mathjax}
+% \DescribeOption[lwarp]{mathsvg}
+% Option |mathsvg| selects \acro{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 |\ifbool| tests.
+% \begin{macrocode}
+\DeclareVoidOption{mathsvg}{%
+\PackageInfo{lwarp}{Using option 'mathsvg'}
+\boolfalse{mathjax}%
+}
+% \end{macrocode}
+%
+% \DescribeOption[lwarp]{mathjax}
+% Option |mathjax| selects 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 |\ifbool| tests.
+% \begin{macrocode}
+\DeclareVoidOption{mathjax}{%
+\PackageInfo{lwarp}{Using option 'mathjax'}
+\booltrue{mathjax}%
+}
+% \end{macrocode}
+
+% \DescribeOption[lwarp]{BaseJobname}
+% Option |BaseJobname| sets the \cs{BaseJobname} for this document.
+%
+% This is the \cs{jobname} of the printed version, even if currently
+% compiling the \acro{HTML} version.
+% I.e. this is the \cs{jobname} without |_html| appended.
+% This is used to set \cs{HomeHTMLFileName} if the user did not provide one.
+% \begin{macrocode}
+\DeclareStringOption[\jobname]{BaseJobname}
+% \end{macrocode}
+
+
+
+% The default is print output,
+% and \acro{SVG} math if the user chose \acro{HTML} output.
+% \begin{macrocode}
+\includecomment{warpprint}%
+\excludecomment{warpHTML}%
+\booltrue{warpingprint}%
+\boolfalse{warpingHTML}%
+\boolfalse{mathjax}%
+
+
+% \ExecuteOptions{warpprint,mathsvg}
+
+\ProcessKeyvalOptions*\relax
+% \end{macrocode}
+
+
+% Assign the \cs{BaseJobname} if the user hasn't provided one:
+% \begin{macrocode}
+\providecommand*{\BaseJobname}{\LWR at BaseJobname}
+% \end{macrocode}
+
+
+
+% \begin{macro}{\@nameedef} \marg{name} \marg{defn}
+%
+% Expands |<defn>| before assigning to |<name>|
+% \begin{macrocode}
+\def\@nameedef#1{\expandafter\edef\csname #1\endcsname}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \section{Required packages}
+% \label{sec:requiredpackages}
+% \index{packages>required}
+% \changes{v0.16}{2016/04/08}{Lwarp no longer selects fonts.}
+
+% These packages are automatically loaded by \pkg{lwarp} when generating
+% \acro{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}
+% \end{macrocode}
+% ^^A
+% ^^A
+% ^^A % For \XeTeX{} or \LuaLaTeX, use \pkg{fontspec}.
+% ^^A % \marginpar{\textcolor{blue}{\XeTeX{} or \LuaLaTeX{} only:}}
+% ^^A %
+% ^^A % See:\\
+% ^^A % \href
+% ^^A % {http://tex.stackexchange.com/questions/2984/frequently-loaded-packages-differences-between-pdflatex-and-xelatex}
+% ^^A % {http://tex.stackexchange.com/questions/2984/\\
+% ^^A % \hspace*{.25in}frequently-loaded-packages-differences-between-pdflatex-and-xelatex}
+% ^^A %
+% ^^A % \index{font>during conversion}
+% ^^A % For \XeLaTeX{} and \LuaLaTeX, uses DejaVu Serif for enhanced Cyrillic and Greek coverage.
+% ^^A % \index{Unicode>XeLaTeX \& LuaLaTeX}
+% \begin{macrocode}
+\ifxetexorluatex
+% ^^A \usepackage[no-math]{fontspec}
+% \end{macrocode}
+% ^^A \defaultfontfeatures{Ligatures=Common}
+% ^^A \setmainfont{DejaVu Serif}
+% ^^A \setsansfont{DejaVu Sans}
+% ^^A \setmonofont{DejaVu Sans Mono}
+% The monospaced font is used for \acro{HTML} tags,
+% so turn off its TeX ligatures and common ligatures:
+% \begin{macrocode}
+\defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}}
+\defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}}
+\defaultfontfeatures[\ttfamily]{Ligatures=NoCommon}
+\else
+% \end{macrocode}
+% ^^A % For |pdflatex|, use \pkg{fontenc} and \pkg{lmodern}:
+% ^^A % \marginpar{\textcolor{blue}{|pdflatex| only:}}
+% ^^A % \index{Unicode>pdfLaTeX}
+% ^^A % \index{pdfLaTeX>Unicode support}
+% ^^A % \begin{macrocode}
+% ^^A \RequirePDFTeX % error if not pdflatex
+% ^^A
+% ^^A \input glyphtounicode.tex
+% ^^A \input glyphtounicode-cmr.tex% from the pdfx package
+% ^^A \pdfgentounicode=1
+% ^^A
+% ^^A \usepackage{cmap}% help map Russian to unicode
+% ^^A \defaulthyphenchar=127%
+% ^^A % \end{macrocode}
+% ^^A
+% ^^A % \DescribePackage{lmodern}
+% ^^A %
+% ^^A % \pdflatexonly
+% ^^A %
+% ^^A % |pdftotext| works better with a vector font.
+% ^^A % This font choice does not control the HTML file, but it does appear in the
+% ^^A % images generated from math expressions.
+% ^^A % \begin{macrocode}
+% ^^A \RequirePackage{lmodern}
+% ^^A % \end{macrocode}
+% ^^A
+% ^^A
+% ^^A % \DescribePackage{fontenc}
+% ^^A %
+% ^^A % \pdflatexonly
+% ^^A %
+% ^^A % \begin{macrocode}
+% ^^A \RequirePackage[T1]{fontenc}
+% ^^A % \end{macrocode}
+% ^^A
+% ^^A
+% ^^A % \DescribePackage{inputenc}
+% ^^A %
+% ^^A % \pdflatexonly
+% ^^A %
+% ^^A % \begin{macrocode}
+% ^^A \RequirePackage[utf8]{inputenc}
+% ^^A % \end{macrocode}
+% ^^A
+
+
+% \DescribePackage{microtype}
+% \changes{v0.18}{2016/05/18}{Microtype disabled during HTML generation}
+%
+% \pdflatexonly
+%
+% Older browsers don't
+% \index{ligatures}
+% display ligatures.
+% \margintag{ligatures}
+% Turn off letter ligatures, keeping
+% \LaTeX{} dash and quote ligatures, which may fail on older browers
+% but at least won't corrupt written words.
+% \begin{macrocode}
+\RequirePackage {microtype}
+
+\microtypesetup{
+ protrusion=false,
+ expansion=false,
+ tracking=false,
+ kerning=false,
+ spacing=false}
+
+\DisableLigatures[f,q,t,T,Q]{encoding = *,family = *}
+% \end{macrocode}
+% ^^A
+% ^^A
+% ^^A % \DescribePackage{newunicodechar}
+% ^^A %
+% ^^A %
+% ^^A % \pdflatexonly
+% ^^A %
+% ^^A % Note that the font used by the source code listing may not correctly display the
+% ^^A % \watchout
+% ^^A % actual Unicode character contained in the \cs{newunicode\{\}} expression.
+% ^^A % The listing printout may not display ligatures or the dashes correctly.
+% ^^A % \begin{macrocode}
+% ^^A \RequirePackage{newunicodechar}
+% ^^A \newunicodechar{Í}{\IeC {\'I}}
+% ^^A \newunicodechar{ff}{ff}% ligatures
+% ^^A \newunicodechar{fi}{fi}
+% ^^A \newunicodechar{fl}{fl}
+% ^^A \newunicodechar{ffi}{ffi}
+% ^^A \newunicodechar{ffl}{ffl}
+% ^^A %% \newunicodechar{°}{\degree}
+% ^^A \newunicodechar{ρ}{\ensuremath{\rho}}
+% ^^A \newunicodechar{⨯}{\texttimes}
+% ^^A %% \newunicodechar{®}{\textregistered}
+% ^^A %% \newunicodechar{©}{\textcopyright}
+% ^^A \newunicodechar{—}{---}% emdash
+% ^^A \newunicodechar{–}{--}% endash
+% ^^A %% \newunicodechar{”}{''}% closing quote
+% ^^A %% \newunicodechar{“}{``}% opening quote
+% ^^A %% \newunicodechar{§}{\S}
+% ^^A %% \newunicodechar{¶}{\P}
+% ^^A %% \newunicodechar{†}{\dag}
+% ^^A %% \newunicodechar{‡}{\ddag}
+% ^^A % \end{macrocode}
+% ^^A
+% ^^A
+% ^^A % \DescribePackage{textcomp}
+% ^^A %
+% ^^A %
+% ^^A % \pdflatexonly
+% ^^A %
+% ^^A % Provides \cs{degree}, \cs{textquotesingle}, \cs{textmu}.
+% ^^A % \begin{macrocode}
+% ^^A \RequirePackage{textcomp}
+% ^^A % \end{macrocode}
+% ^^A
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+% ^^A % \marginpar{\textcolor{blue}{End of \XeLaTeX, \LuaLaTeX, |pdflatex| choices.}}
+% ^^A
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \DescribePackage{geometry}
+% Tactics to avoid unwanted page breaks and margin overflow:
+% \begin{itemize}
+% \item Uses a very long and wide page to minimize page breaks and margin overflow.
+% \item Will also use a scriptsize font.
+% \item Also uses extra space at the margin to avoid \acro{HTML} tag overflow off the page.
+% \item Will also force a new page before environments.
+% \end{itemize}
+%
+% \changes{v0.20}{2017/01/12}{Page geometry set to 6in wide with large margins.}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\RequirePackage[paperheight=190in,paperwidth=20in,%
+left=7in,right=7in,%
+top=1in,bottom=1in,%
+]{geometry}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \DescribePackage{xparse}
+%
+% \LaTeX{}3 command argument parsing
+% ^^A \RequirePackage[log-declarations=false]{xparse}
+% \begin{macrocode}
+\RequirePackage{xparse}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \DescribePackage{expl3}
+%
+% \LaTeX{}3 programming
+% \begin{macrocode}
+\RequirePackage{expl3}
+% \end{macrocode}
+
+% ^^A % \DescribePackage{l3regex}
+% ^^A %
+% ^^A % \LaTeX{}3 regular expression handling
+% ^^A % \begin{macrocode}
+% ^^A \RequirePackage{l3regex}
+% ^^A % \end{macrocode}
+
+
+
+% ^^A % \begin{macro}{\EmulatesPackage} \marg{pkg name} \oarg{yyyy/mm/dd and comments}
+% ^^A %
+% ^^A % Similar to \cs{ProvidesPackage}. Used where the \pkg{lwarp} package emulates
+% ^^A % other packages.
+% ^^A % For example, \pkg{trivfloat} wants to load \pkg{float}, which is emulated by \pkg{lwarp}.
+% ^^A % Since |\EmulatesPackage{float}| is declared by \pkg{lwarp},
+% ^^A % \pkg{trivfloat} will not load \pkg{float} on its own.
+% ^^A % Doing so would have over-written the \pkg{lwarp} emulation.
+% ^^A %
+% ^^A % Do not use \cs{EmulatesPackage} for packages which are patched by other
+% ^^A % \watchout
+% ^^A % packages. The emulated code cannot be patched correctly.
+% ^^A %
+% ^^A % \begin{macrocode}
+% ^^A \NewDocumentCommand{\EmulatesPackage}{m O{}}{%
+% ^^A \expandafter\xdef\csname ver@#1.sty\endcsname{#2 ---
+% ^^A Emulated by package \@currname.}
+% ^^A }
+% ^^A \@onlypreamble\EmulatesPackage
+% ^^A % \end{macrocode}
+% ^^A % \end{macro}
+% ^^A
+
+
+% \DescribePackage{gettitlestring}
+%
+% Used to emulate \cs{nameref}.
+% \begin{macrocode}
+\RequirePackage{gettitlestring}
+% \end{macrocode}
+
+
+% \DescribePackage{everyhook}
+%
+% \pkg{everyhook} is used to patch paragraph handling.
+% \begin{macrocode}
+\RequirePackage{everyhook}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \DescribePackage{fancyvrb}
+%
+% Used for Verbatim, verse.
+% \begin{macrocode}
+\RequirePackage{fancyvrb}
+% \end{macrocode}
+
+
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \DescribePackage{xifthen}
+% \begin{macrocode}
+\RequirePackage{xifthen}
+% \end{macrocode}
+
+
+% \DescribePackage{xstring}
+% \begin{macrocode}
+\RequirePackage{xstring}
+% \end{macrocode}
+
+
+% \DescribePackage{makeidx}
+% \begin{macrocode}
+\RequirePackage{makeidx}
+\makeindex
+% \end{macrocode}
+
+
+% \DescribePackage{calc}
+% \begin{macrocode}
+\RequirePackage{calc}
+% \end{macrocode}
+
+
+% \DescribePackage{newfloat}
+% \begin{macrocode}
+\RequirePackage{newfloat}
+% \end{macrocode}
+
+% \DescribePackage{caption}
+% \begin{macrocode}
+\RequirePackage{caption}
+% \end{macrocode}
+
+% \DescribePackage{subcaption}
+% \begin{macrocode}
+\RequirePackage{subcaption}
+% \end{macrocode}
+
+
+% \DescribePackage{enumitem}
+%
+% \pkg{enumitem} is patched to support |\newlist| with \acro{HTML}.
+% \begin{macrocode}
+\RequirePackage{enumitem}
+\setlist[itemize]{leftmargin=0em}
+\setlist[enumerate]{leftmargin=0em}
+\setlist[description]{leftmargin=0em}
+% \end{macrocode}
+
+
+% \DescribePackage{pagenote}
+%
+% Used to convert footnotes into pagenotes.
+% \begin{macrocode}
+\RequirePackage[continuous]{pagenote}
+\makepagenote
+\let\LWR at origmakepagenote\makepagenote
+\let\LWR at origprintnotes\printnotes
+\let\LWR at origpagenote\pagenote
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \DescribePackage{titling}
+%
+% Used for |\maketitle| and the title page. See \cref{sec:titles}.
+% \begin{macrocode}
+\RequirePackage{titling}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \DescribePackage{zref}
+%
+% Used for cross-references.
+% \begin{macrocode}
+\RequirePackage{zref}
+% \end{macrocode}
+
+
+% \DescribePackage{amsmath}
+% \changes{v0.16}{2016/04/09}{Fix: amsmath options clash}
+%
+% Equation numbers are placed to the left for \acro{HTML}.
+%
+% \pkg{newtxmath} automatically loads \pkg{amsmath},
+% so the options |leqno| and |fleqn| are 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.}
+%
+% \begin{macrocode}
+\PassOptionsToPackage{leqno,fleqn}{amsmath}
+\RequirePackage{amsmath}
+% \end{macrocode}
+
+
+% \DescribePackage{environ}
+%
+% Used to encapsulate math environments for re-use in \acro{HTML} ALT text.
+%
+% \begin{macrocode}
+\RequirePackage{environ}
+% \end{macrocode}
+
+
+
+
+
+
+
+% \DescribePackage{titleps}
+% \changes{v0.19}{2016/05/27}{titleps: null \cs{pagestyle} and \cs{thispagestyle} for HTML.}
+%
+% Used to place an \acro{HTML} comment into the footer of a page below the footnotes.
+% This comment is used for |lateximage| environments, including math.
+%
+% The |nopatches| option prevents titleps from trying to patch sectioning commands.
+%
+% \cs{pagestyle} and \cs{thispagestyle} are nullified for \acro{HTML} output.
+%
+% \begin{macrocode}
+\RequirePackage[nopatches]{titleps}
+% \end{macrocode}
+%
+% \begin{macro}{\pagestyle} \marg{style}
+% \begin{macrocode}
+\let\LWR at origpagestyle\pagestyle
+\renewcommand*{\pagestyle}[1]{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thispagestyle} \marg{style}
+% \begin{macrocode}
+\let\LWR at origthispagestyle\thispagestyle
+\renewcommand*{\thispagestyle}[1]{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pagenumbering} \marg{commands}
+% \begin{macrocode}
+\let\LWR at origpagenumbering\pagenumbering
+\renewcommand*{\pagenumbering}[1]{}
+% \end{macrocode}
+% \end{macro}
+%
+
+
+% \DescribePackage{xfrac}
+%
+% Patched for \acro{HTML} use.
+% See \cref{sec:xfrac}.
+
+% \begin{macrocode}
+\RequirePackage{xfrac}
+% \end{macrocode}
+
+%
+% Used to convert lengths for image width/height options.
+%
+% \begin{macrocode}
+\RequirePackage{printlen}
+% \end{macrocode}
+
+
+
+
+
+
+
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Loading Packages}
+%
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% Remember the original \cs{RequirePackage}:
+% \begin{macrocode}
+\let\LWR at origRequirePackage\RequirePackage
+% \end{macrocode}
+
+% \begin{macro}{\LWR at requirepackagenames} Stores the list of required package names.
+% \begin{macrocode}
+\newcommand*{\LWR at requirepackagenames}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at findword} \oarg{1: separator} \marg{2: list}
+% \marg{3: index} \oarg{4: destination}
+%
+% Note that argument 4 is passed directly to \cs{StrBetween}.
+% \begin{macrocode}
+\newcommand*\LWR at findword[3][,]{%
+ \StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at lookforpackagename} \marg{index}
+% If this is a package name, re-direct it to the \pkg{lwarp} version
+% by renaming it |lwarp-| followed by the original name.
+% \begin{macrocode}
+\newcommand*{\LWR at lookforpackagename}[1]{
+% \end{macrocode}
+% Find the n'th package name from the list:
+% \begin{macrocode}
+\LWR at findword{\LWR at requirepackagenames}{#1}[\LWR at strresult]
+% \end{macrocode}
+% See if the package name was found:
+% \begin{macrocode}
+\IfStrEq{\LWR at strresult}{}
+{}% no filename
+{% yes filename
+% \end{macrocode}
+% If found, and if an \pkg{lwarp}-equivalent name exists, use |lwarp-|* instead.
+% \begin{macrocode}
+\IfFileExists{lwarp-\LWR at strresult.sty}
+{% latex_html_ file found
+ \StrSubstitute
+ {\LWR at requirepackagenames}
+ {\LWR at strresult}
+ {lwarp-\LWR at strresult}[\LWR at requirepackagenames]
+}
+{}% no latex_html_* file
+}% yes filename
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\RequirePackage} \oarg{1: options} \marg{2: package names} \oarg{3: version}
+%
+% For each of many package names in a comma-separated list,
+% if an \pkg{lwarp} version of a package exists,
+% select it instead of the \LaTeX\ version.
+%
+% \begin{macrocode}
+\RenewDocumentCommand{\RequirePackage}{o m o}{%
+% \end{macrocode}
+% Redirect up to nine names:
+% \begin{macrocode}
+\renewcommand*{\LWR at requirepackagenames}{#2}
+\LWR at lookforpackagename{1}
+\LWR at lookforpackagename{2}
+\LWR at lookforpackagename{3}
+\LWR at lookforpackagename{4}
+\LWR at lookforpackagename{5}
+\LWR at lookforpackagename{6}
+\LWR at lookforpackagename{7}
+\LWR at lookforpackagename{8}
+\LWR at lookforpackagename{9}
+% \end{macrocode}
+% \cs{RequirePackage} depending on the options and version:
+% \begin{macrocode}
+\IfValueTF{#1}
+{% options given
+ \IfValueTF{#3}% version given?
+ {\LWR at origRequirePackage[#1]{\LWR at requirepackagenames}[#3]}
+ {\LWR at origRequirePackage[#1]{\LWR at requirepackagenames}}
+}
+{% no options given
+ \IfValueTF{#3}% version given?
+ {\LWR at origRequirePackage{\LWR at requirepackagenames}[#3]}
+ {\LWR at origRequirePackage{\LWR at requirepackagenames}}
+}
+}
+\let\usepackage\RequirePackage
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\LWR at ProvidesPackagePass} \marg{pkgname} \oarg{version}
+%
+% Provides a new package which passes its options to the original.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at ProvidesPackagePass}{m o}{
+\PackageInfo{lwarp}{Using the lwarp version of package `#1', including options,}%
+\IfValueTF{#2}
+{\ProvidesPackage{lwarp-#1}[#2]}
+{\ProvidesPackage{lwarp-#1}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{#1}}
+\ProcessOptions\relax
+
+\IfValueTF{#2}
+{\LWR at origRequirePackage{#1}[#2]}
+{\LWR at origRequirePackage{#1}}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\LWR at ProvidesPackageDrop} \marg{pkgname} \oarg{version}
+%
+% Provides a new package which drops/discards its options.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at ProvidesPackageDrop}{m o}{
+\PackageInfo{lwarp}{Using the lwarp version of package `#1', discarding options,}%
+\IfValueTF{#2}
+{\ProvidesPackage{lwarp-#1}[#2]}
+{\ProvidesPackage{lwarp-#1}}
+\DeclareOption*{}
+\ProcessOptions\relax
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{Copying a file}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at copyfile} \marg{source filename} \marg{destination filename}
+%
+% Used to copy the |.toc| file to |.sidetoc| to re-print the \acro{TOC} in
+% the side\acro{TOC} navigation pane.
+% \begin{macrocode}
+\newcommand*{\LWR at copyfile}[2]{%
+\newwrite\copyfile % open the file to write to
+\immediate\openout\copyfile=#2
+\newread\file % open the file to read from
+\openin\file=#1
+\begingroup\endlinechar=-1
+\makeatletter
+\loop\unless\ifeof\file
+ \read\file to\fileline % Read one line and store it into \fileline
+% \fileline\par % print the content into the pdf
+% print the content:
+ \immediate\write\copyfile{\unexpanded\expandafter{\fileline}}%
+\repeat
+\closeout\copyfile
+\endgroup
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \section{Debugging messages}
+
+% \DescribeBoolean{LWR at tracinglwarp} True if tracing is turned on.
+% \begin{macrocode}
+\newbool{LWR at tracinglwarp}
+% \end{macrocode}
+%
+% \begin{macro}{\tracinglwarp} Turns on the debug tracing messages.
+% \changes{v0.20}{2017/02/07}{Added.}
+% \begin{macrocode}
+\newcommand{\tracinglwarp}{\booltrue{LWR at tracinglwarp}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at traceinfo} \marg{text} \quad If tracing is turned on, writes
+% the text to the |.log| file.
+% \begin{macrocode}
+\newcommand{\LWR at traceinfo}[1]{%
+\ifbool{LWR at tracinglwarp}%
+{\PackageInfo{lwarp}{#1 : }}%
+{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \section{Remembering original formatting macros}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% Remember original definitions of formatting commands.
+% Will be changed to \acro{HTML} commands for most uses.
+% Will be temporarily restored to original meaning inside any lateximage environment.
+% Also nullify unused commands.
+% \begin{macrocode}
+\let\LWR at origtextit\textit
+\let\LWR at origtextbf\textbf
+\let\LWR at origtexttt\texttt
+\let\LWR at origtextsc\textsc
+\let\LWR at origtextsf\textsf
+\let\LWR at origtextrm\textrm
+\let\LWR at origbfseries\bfseries
+\let\LWR at origrmfamily\rmfamily
+\let\LWR at origttfamily\ttfamily
+\let\LWR at orignormalfont\normalfont
+
+\let\LWR at origraggedright\raggedright
+\let\LWR at origonecolumn\onecolumn
+
+\let\LWR at origtextsuperscript\textsuperscript
+\let\LWR at origtextsubscript\textsubscript
+
+\let\LWR at origscriptsize\scriptsize
+
+\let\LWR at orignewpage\newpage
+
+\let\LWR at origminipage\minipage
+\let\LWR at origendminipage\endminipage
+
+\let\LWR at orignewline\newline
+
+\let\LWR at origitem\item
+
+\let\LWR at origpar\par
+
+
+\let\LWR at origfootnote\footnote
+\let\LWR at orig@mpfootnotetext\@mpfootnotetext
+
+\let\LWR at origclearpage\clearpage
+\let\clearpage\relax
+\let\cleardoublepage\relax
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{Operating-System portability}
+% \label{sec:OSportability}
+% \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.}
+%
+% \osportabilityusage
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+%
+% \subsection{Common portability code}
+%
+% \DescribeBoolean{usingOSwindows}Set if \cs{warpOSwindows}.
+% \begin{macrocode}
+\newbool{usingOSwindows}
+\boolfalse{usingOSwindows}
+% \end{macrocode}
+
+%
+% \subsection{Unix, Linux, and Mac\,OS}
+
+% \begin{macro}{\OSPathSymbol}
+% Symbol used to separate directories in a path.
+% \begin{macrocode}
+\newcommand*{\OSPathSymbol}{/}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\OSmkdir}
+% The make-directory command.
+% \begin{macrocode}
+\newcommand*{\OSmkdir}{mkdir } % trailing space is required
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\OSrm}
+% The remove-file command.
+% \begin{macrocode}
+\newcommand*{\OSrm}{rm }
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\OSmv}
+% The move-file command.
+% \begin{macrocode}
+\newcommand*{\OSmv}{mv }
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\OSShellPath}
+% Path to the command-line shell.
+% \begin{macrocode}
+\newcommand*{\OSShellPath}{/bin/sh}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{MS-Windows}
+
+% For MS-Windows:
+%
+% \begin{macro}{\warpOSwindows}
+% Set defaults for the MS-Windows operating system.
+% \pkg{lwarp} attempts to auto-detect the operatings system,
+% so \cs{warpOSwindows} may not be necessary.
+%
+% \changes{v0.20}{2016/12/19}{Auto-detects operating system.}
+%
+% \begin{macrocode}
+\newcommand*{\warpOSwindows}
+{
+\booltrue{usingOSwindows}
+\renewcommand*{\OSPathSymbol}{\@backslashchar}
+\renewcommand*{\OSmkdir}{MD }
+\renewcommand*{\OSrm}{DEL }
+\renewcommand*{\OSmv}{MOVE }
+}
+% \end{macrocode}
+% Test for windows during compile. The user may also specify
+% \cs{warpOSwindows} later in case this test fails.
+% \begin{macrocode}
+\ifwindows
+\warpOSwindows
+\fi
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+
+% \section{Stacks}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+
+% Stacks are used to remember how to close sections and list items.
+% Before a new section is started, previously nested sections and items must
+% be closed out (un-nested) in proper order.
+% Note that starting a new section may close several levels of previously
+% \watchout
+% nested items at the same time.
+% For example, starting a new |\section| would close any currently open
+% subsection, subsubsection, and paragraph.
+% General environments are not nested on the stack since they have their own close
+% mechanism. List environments are nested, and items inside those environments
+% are nested one level deeper still.
+% List environments may be nested inside other list environments, and list items
+% are nested inside list environments as well. Thus, the stack may have items
+% which are not necessarily in order, since a description may contain an enumerate,
+% for example.
+% Depths to be recorded in |\LWR at closedepthone|, etc.
+
+% \subsection{Assigning depths}
+
+% initial depths for empty stack entries:
+% \begin{macrocode}
+\newcommand*{\LWR at depthnone}{-5}
+% \end{macrocode}
+% all sectioning depths are deeper than |LWR at depthfinished|:
+% \begin{macrocode}
+\newcommand*{\LWR at depthfinished}{-4}
+\newcommand*{\LWR at depthpart}{-1}
+\newcommand*{\LWR at depthchapter}{0}
+\newcommand*{\LWR at depthsection}{1}
+\newcommand*{\LWR at depthsubsection}{2}
+\newcommand*{\LWR at depthsubsubsection}{3}
+\newcommand*{\LWR at depthparagraph}{4}
+\newcommand*{\LWR at depthsubparagraph}{5}
+% \end{macrocode}
+% used by |\itemize|, |\enumerate|, |\description|:
+% \begin{macrocode}
+\newcommand*{\LWR at depthlist}{6}
+% \end{macrocode}
+% used by |\item|:
+% \begin{macrocode}
+\newcommand*{\LWR at depthlistitem}{7}
+% \end{macrocode}
+
+% \subsection{Closing actions}
+
+% A stack to record the action to take to close each nesting level:
+% Add more levels of stack if necessary for a very deeply nested document,
+% adding to |\pushclose| and |\popclose| as well.
+% \begin{macrocode}
+\newcommand*{\LWR at closeone}{}% top of the stack
+\newcommand*{\LWR at closetwo}{}
+\newcommand*{\LWR at closethree}{}
+\newcommand*{\LWR at closefour}{}
+\newcommand*{\LWR at closefive}{}
+\newcommand*{\LWR at closesix}{}
+\newcommand*{\LWR at closeseven}{}
+\newcommand*{\LWR at closeeight}{}
+\newcommand*{\LWR at closenine}{}
+\newcommand*{\LWR at closeten}{}
+\newcommand*{\LWR at closeeleven}{}
+\newcommand*{\LWR at closetwelve}{}
+% \end{macrocode}
+
+% \subsection{Closing depths}
+
+% A stack to record the depth of each level:
+%
+% Note that nested LaTeX structures may push depths which are non-sequential.
+% \watchout
+
+% \begin{docsidebar}[Ex:]
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4]
+% \begin{itemize}
+% \item{A}
+% \begin{description}
+% \item{B}
+% \end{description}
+% \end{itemize}
+% \end{Verbatim}
+% \end{docsidebar}
+
+% \begin{macrocode}
+\newcommand*{\LWR at closedepthone}{\LWR at depthnone}% top of the stack
+\newcommand*{\LWR at closedepthtwo}{\LWR at depthnone}
+\newcommand*{\LWR at closedepththree}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthfour}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthfive}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthsix}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthseven}{\LWR at depthnone}
+\newcommand*{\LWR at closedeptheight}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthnine}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthten}{\LWR at depthnone}
+\newcommand*{\LWR at closedeptheleven}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthtwelve}{\LWR at depthnone}
+% \end{macrocode}
+
+% \subsection{Pushing and popping the stack}
+
+% \begin{macro}{\pushclose} \marg{action} \marg{depth}
+
+% Pushes one return action and its LaTeX depth onto the stacks.
+% \begin{macrocode}
+\NewDocumentCommand{\pushclose}{m m}
+{
+\let\LWR at closetwelve\LWR at closeeleven
+\let\LWR at closeeleven\LWR at closeten
+\let\LWR at closeten\LWR at closenine
+\let\LWR at closenine\LWR at closeeight
+\let\LWR at closeeight\LWR at closeseven
+\let\LWR at closeseven\LWR at closesix
+\let\LWR at closesix\LWR at closefive
+\let\LWR at closefive\LWR at closefour
+\let\LWR at closefour\LWR at closethree
+\let\LWR at closethree\LWR at closetwo
+\let\LWR at closetwo\LWR at closeone
+\let\LWR at closeone#1
+\let\LWR at closedepthtwelve\LWR at closedeptheleven
+\let\LWR at closedepthelevel\LWR at closedepthten
+\let\LWR at closedepthten\LWR at closedepthnine
+\let\LWR at closedepthnine\LWR at closedeptheight
+\let\LWR at closedeptheight\LWR at closedepthseven
+\let\LWR at closedepthseven\LWR at closedepthsix
+\let\LWR at closedepthsix\LWR at closedepthfive
+\let\LWR at closedepthfive\LWR at closedepthfour
+\let\LWR at closedepthfour\LWR at closedepththree
+\let\LWR at closedepththree\LWR at closedepthtwo
+\let\LWR at closedepthtwo\LWR at closedepthone
+\let\LWR at closedepthone#2
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\popclose}
+
+% Pops one action and its depth off the stacks.
+% \begin{macrocode}
+\newcommand*{\popclose}
+{
+\let\LWR at closeone\LWR at closetwo
+\let\LWR at closetwo\LWR at closethree
+\let\LWR at closethree\LWR at closefour
+\let\LWR at closefour\LWR at closefive
+\let\LWR at closefive\LWR at closesix
+\let\LWR at closesix\LWR at closeseven
+\let\LWR at closeseven\LWR at closeeight
+\let\LWR at closeeight\LWR at closenine
+\let\LWR at closenine\LWR at closeten
+\let\LWR at closeten\LWR at closeeleven
+\let\LWR at closeeleven\LWR at closetwelve
+\let\LWR at closedepthone\LWR at closedepthtwo
+\let\LWR at closedepthtwo\LWR at closedepththree
+\let\LWR at closedepththree\LWR at closedepthfour
+\let\LWR at closedepthfour\LWR at closedepthfive
+\let\LWR at closedepthfive\LWR at closedepthsix
+\let\LWR at closedepthsix\LWR at closedepthseven
+\let\LWR at closedepthseven\LWR at closedeptheight
+\let\LWR at closedeptheight\LWR at closedepthnine
+\let\LWR at closedepthnine\LWR at closedepthten
+\let\LWR at closedepthten\LWR at closedeptheleven
+\let\LWR at closedeptheleven\LWR at closedepthtwelve
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{Data arrays}
+% \label{sec:dataarray}
+%
+% These macros are similar to the \pkg{arrayjobx} package, except
+% that \cs{LWR at setexparray}'s argument is expanded only once when assigned.
+%
+% |name| has no backslash, |index| can be a number or a text name,
+% and an empty |value| must be |\relax| instead of empty.
+%
+% To assign an empty value: \\
+% \hspace*{2em}|\LWR at setexparray{name}{index}{\relax}|
+%
+% \changes{v0.20}{2017/01/07}{Added single-expansion data arrays.}
+%
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \begin{macro}{\LWR at setexparray} \marg{name} \marg{index} \marg{contents}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at setexparray}{m m m}{%
+\expandafter\edef\csname #1#2\endcsname{\expandonce#3}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at getexparray} \marg{name} \marg{index}
+% \begin{macrocode}
+\newcommand*{\LWR at getexparray}[2]{\csuse{#1#2}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{HTML entities}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \acro{HTML} entites and \acro{HTML} Unicode entities:
+% \begin{macrocode}
+\let\LWR at origampersand\&
+% \end{macrocode}
+% \begin{macro}{\HTMLentity} \marg{entitytag}
+% \begin{macrocode}
+\newcommand*{\HTMLentity}[1]{\LWR at origampersand#1;}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\HTMLunicode} \marg{hex\_unicode}
+% \begin{macrocode}
+\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \DescribeMacro{\&}
+% \begin{macrocode}
+\renewcommand*{\&}{\HTMLentity{amp}}
+% \end{macrocode}
+
+% \begin{macro}{\textless}
+% \begin{macro}{\textgreater}
+% \begin{macrocode}
+\let\LWR at origtextless\textless
+\renewcommand*{\textless}{\HTMLentity{lt}}
+
+\let\LWR at origtextgreater\textgreater
+\renewcommand*{\textgreater}{\HTMLentity{gt}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{HTML filename generation}
+%
+
+% The filename of the homepage is set to |\HomeHTMLFileName.html|.
+% The filenames of additional sections start with |\HTMLFileName|, to which is
+% appended a section number or a simplified section name, depending on |FileSectionNames|.
+%
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+
+% \begin{macro}{\BaseJobname}
+% The \cs{jobname} of the printed version, even if currently
+% compiling the \acro{HTML} version.
+% I.e. this is the \cs{jobname} without |_html| appended.
+% This is used to set \cs{HomeHTMLFileName} if the user did not provide one.
+% \begin{macrocode}
+\providecommand*{\BaseJobname}{\jobname}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\HTMLFileName}
+% \changes{v0.19}{2016/05/28}{Docs: Escape filename underscores.}
+% \changes{v0.20}{2016/12/18}{No longer escape underscores.}
+% The prefix for all generated \acro{HTML} files other than the home page,
+% defaulting to empty. See \cref{sec:filenameexamples}.
+%
+% \begin{macrocode}
+\providecommand*{\HTMLFileName}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\HomeHTMLFileName}
+% \changes{v0.19}{2016/05/28}{Docs: Escape filename underscores.}
+% \changes{v0.20}{2016/12/18}{No longer escape underscores.}
+% The filename of the home page, defaulting to the \cs{BaseJobname}.
+% See \cref{sec:filenameexamples}.
+%
+% \begin{macrocode}
+\providecommand*{\HomeHTMLFileName}{\BaseJobname}
+% \end{macrocode}
+% \end{macro}
+%
+
+% \begin{macro}{\SetHTMLFileNumber} \marg{number}
+%
+% \changes{v0.20}{2016/09/11}{Add: Control file numbers.}
+% Sets the file number for the next
+% file to be generated. 0 is the home page.
+% Use just before the next sectioning command, and set it to one less than the
+% desired number of the next section.
+% May be used to generate numbered groups of nodes
+% such as 100+ for one chapter, 200+ for another chapter, etc.
+% \begin{macrocode}
+\newcommand*{\SetHTMLFileNumber}[1]{%
+\setcounter{LWR at htmlfilenumber}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \DescribeBoolean{FileSectionNames}
+% Selects how to create \acro{HTML} file names.
+%
+% Defaults to use section names in the filenames.
+% \begin{macrocode}
+\newbool{FileSectionNames}
+\booltrue{FileSectionNames}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \DescribeCounter{LWR at htmlfilenumber}
+% Records the number of each \acro{HTML} file as it is being created.
+% Number 0 is the home page.
+% \begin{macrocode}
+\newcounter{LWR at htmlfilenumber}
+\setcounter{LWR at htmlfilenumber}{0}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at htmlsectionfilename} \marg{htmlfilenumber or name}
+%
+% \changes{v0.14}{2016/03/28}{Fix: Links to home page.}
+% \changes{v0.17}{2016/04/11}{Fix: Links when entire doc is one HTML page.}
+% \changes{v0.20}{2016/09/11}{HTMLFileName: removed additional trailing '-', and may be empty.}
+% \changes{v0.20}{2016/09/11}{Sections called ``Index'' or ``index'' have an underscore
+% prepended to their filenames if no prefix.}
+%
+% Prints the filename for a given section: |\HTMLFileName{}filenumber/name.html|
+% \begin{macrocode}
+\newcommand*{\LWR at htmlsectionfilename}[1]{%
+\LWR at traceinfo{LWR at htmlsectionfilename A}%
+% \end{macrocode}
+% Section 0 or empty is given the home filename.
+% The filename must be detokenized for underscores.
+% \begin{macrocode}
+\LWR at traceinfo{about to assign temp}%
+\edef\LWR at tempone{#1}%
+\LWR at traceinfo{about to compare with ??}%
+\ifthenelse{\equal{\LWR at tempone}{??}}%
+{%
+\LWR at traceinfo{found ??}%
+}{%
+\LWR at traceinfo{not found ??}%
+}%
+\LWR at traceinfo{about to compare with zero or empty}%
+\ifthenelse{%
+\equal{\LWR at tempone}{0}%
+\OR \equal{\LWR at tempone}{}%
+\OR \equal{\LWR at tempone}{??}%
+}%
+{%
+\LWR at traceinfo{LWR at htmlsectionfilename B \HomeHTMLFileName.html}%
+\HomeHTMLFileName.html%
+}%
+% \end{macrocode}
+% For a \LaTeX\ section named ``Index'' or ``index'' without a prefix, create a filename
+% with a leading underscore to avoid colliding with the HTML filename |index.html|:
+% \begin{macrocode}
+{%
+\LWR at traceinfo{LWR at htmlsectionfilename C}%
+\ifthenelse{%
+\equal{\HTMLFileName}{} \AND \equal{\LWR at tempone}{Index} \OR \equal{\LWR at tempone}{index}%
+}%
+{\_#1.html}%
+% \end{macrocode}
+% Otherwise, create a filename with the chosen prefix:
+% \begin{macrocode}
+{\HTMLFileName#1.html}%
+}%
+\LWR at traceinfo{LWR at htmlsectionfilename Z}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmlrefsectionfilename} \marg{label}
+%
+% Prints the filename for the given label
+% \begin{macrocode}
+\newcommand*{\LWR at htmlrefsectionfilename}[1]{%
+\LWR at traceinfo{LWR at htmlrefsectionfilename A: !#1!}%
+\LWR at htmlsectionfilename{\LWR at htmlfileref{#1}}%
+\LWR at traceinfo{LWR at htmlrefsectionfilename B}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{Homepage link}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\LinkHome}
+% |\LinkHome| may be used wherever you wish to place a link back to the homepage.
+% The filename must be detokenized for underscores.
+% \begin{macrocode}
+\newcommand*{\LinkHome}{%
+\LWR at subhyperrefclass{%
+\HomeHTMLFileName.html}%
+{Home}{linkhome}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at topnavigation}
+%
+% Creates a link to the homepage at the top of the page for use when the window is too
+% narrow for the sidetoc.
+% \begin{macrocode}
+\newcommand*{\LWR at topnavigation}{
+\LWR at htmlelementclassline{nav}{topnavigation}{\LinkHome}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at botnavigation}
+%
+% Creates a link to the homepage at the bottom of the page for use when the window is too
+% narrow for the sidetoc.
+% \begin{macrocode}
+\newcommand*{\LWR at botnavigation}{
+\LWR at htmlelementclassline{nav}{botnavigation}{\LinkHome}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{\textbackslash{}PrintStack diagnostic tool}
+
+% Diagnostics tool:
+% Prints the LaTeX nesting depth values for the stack levels.
+% Must have |\LWR at startpars| active while printing the stack, so |\PrintStack| may
+% \watchout
+% be called from anywhere in the normal text flow.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\PrintStack} Prints the closedepth stack.
+% \begin{macrocode}
+\newcommand*{\PrintStack}{
+\LWR at startpars
+\LWR at closedepthone{} \LWR at closedepthtwo{} \LWR at closedepththree{}
+\LWR at closedepthfour{} \LWR at closedepthfive{} \LWR at closedepthsix{}
+\LWR at closedepthseven{} \LWR at closedeptheight{} \LWR at closedepthnine{}
+\LWR at closedepthten{} \LWR at closedeptheleven{} \LWR at closedepthtwelve{}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \section{Closing stack levels}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% Close one nested level:
+% \begin{macrocode}
+\newcommand*{\LWR at closeoneprevious}{%
+
+\LWR at closeone{}
+
+\popclose{}
+}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at closeprevious} \marg{depth}
+% Close everything up to the given depth:
+% \begin{macrocode}
+\newcommand*{\LWR at closeprevious}[1]{
+% \end{macrocode}
+% Close any pending paragraph:
+% \begin{macrocode}
+\LWR at stoppars
+% \end{macrocode}
+% Close anything nested deeper than the desired depth:
+% \begin{macrocode}
+\whiledo{\not\(\LWR at closedepthone<#1\)}{\LWR at closeoneprevious}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{HTML tags, spans, divs, elements}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{Mapping \LaTeX{} Sections to HTML Sections}
+
+% \begin{macrocode}
+\newcommand*{\LWR at tagpart}{h2}
+\newcommand*{\LWR at tagpartend}{/h2}
+\newcommand*{\LWR at tagchapter}{h3}
+\newcommand*{\LWR at tagchapterend}{/h3}
+\newcommand*{\LWR at tagsection}{h4}
+\newcommand*{\LWR at tagsectionend}{/h4}
+\newcommand*{\LWR at tagsubsection}{h5}
+\newcommand*{\LWR at tagsubsectionend}{/h5}
+\newcommand*{\LWR at tagsubsubsection}{h6}
+\newcommand*{\LWR at tagsubsubsectionend}{/h6}
+\newcommand*{\LWR at tagparagraph}{span class="paragraph"{}}
+\newcommand*{\LWR at tagparagraphend}{/span}
+\newcommand*{\LWR at tagsubparagraph}{span class="subparagraph"{}}
+\newcommand*{\LWR at tagsubparagraphend}{/span}
+
+\newcommand*{\LWR at tagregularparagraph}{p}
+% \end{macrocode}
+
+
+% \subsection{HTML tags}
+
+% \begin{macro}{\LWR at htmltagc} \marg{tag}
+% Break ligatures in \acro{HTML} tags.
+%
+%|\protect| is in case the tag appears in TOC, LOF, LOT.
+% \begin{macrocode}
+\newcommand*{\LWR at htmltagc}[1]{%
+{%
+\LWR at origttfamily%
+% \protect\LWR at origtexttt{%
+% \protect\LWR at origtextbf{%
+\LWR at origtextless#1\LWR at origtextgreater%
+% }%
+% }%
+}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+
+% \begin{environment}{LWR at nestspan} Disable \env{minipage}, \cs{parbox} inside a |span|.
+%
+% |\begin{LWR at nestspan}| must follow the opening |<span>| tag to allow
+% \watchout
+% a paragraph to start if the span is at the beginning of a new paragraph.
+%
+% |\end{LWR at nestspan}| must follow the |/span| or an extra |<p>| may appear.
+% \watchout
+%
+% \changes{v0.20}{2016/12/24}{Fix: Minipages inside a span.}
+%
+% \begin{macrocode}
+\newenvironment*{LWR at nestspan}
+{%
+\addtocounter{LWR at spandepth}{1}%
+\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+}%
+{\addtocounter{LWR at spandepth}{-1}}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{macro}{\LWR at htmlspan} \marg{tag} \marg{text}
+%
+% \cs{LWR at spandepth} is used to ensure that paragraph tags are not
+% generated inside a span. The exact sequence of when to add and subtract
+% \watchout
+% the counter is important to correctly handle the paragraph tags before
+% and after the span.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at htmlspan}{m +m}{%
+\LWR at ensuredoingapar%
+\LWR at htmltagc{#1}%
+\begin{LWR at nestspan}%
+#2%
+\LWR at htmltagc{/#1}%
+\end{LWR at nestspan}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at htmlspanclass} \marg{class} \oarg{style} \marg{text}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at htmlspanclass}{m o +m}{%
+\LWR at ensuredoingapar%
+\LWR at subhtmlelementclass{span}{#1}[#2]%
+\begin{LWR at nestspan}%
+#3%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at htmltag} \marg{tag}
+
+% print an HTML tag: \textless{}tag\textgreater{}
+% \begin{macrocode}
+\newcommand*{\LWR at htmltagb}[1]{%
+\LWR at htmltagc{#1}%
+\endgroup%
+}
+
+\newcommand*{\LWR at htmltag}{%
+\begingroup\catcode`\_=12
+\LWR at htmltagb%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Block tags and comments}
+
+% In the following, |\origtexttt| breaks ligatures, which may not be used for \acro{HTML} codes:
+%
+% \begin{macro}{\LWR at htmlopencomment}
+% \begin{macro}{\LWR at htmlclosecomment}
+% \begin{macrocode}
+\newcommand*{\LWR at htmlopencomment}{%
+% \LWR at origtexttt{\LWR at origtextbf{\LWR at origtextless{}!{-}{-}}}%
+\begingroup\LWR at origttfamily\LWR at origtextless{}!{-}{-}\endgroup%
+}
+
+\newcommand*{\LWR at htmlclosecomment}{%
+% \LWR at origtexttt{\LWR at origtextbf{{-}{-}\LWR at origtextgreater{}}}%
+\begingroup\LWR at origttfamily{-}{-}\LWR at origtextgreater{}\endgroup%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmlcomment} \marg{comment}
+% \begin{macrocode}
+\newcommand{\LWR at htmlcomment}[1]{%
+\LWR at htmlopencomment{}%
+\LWR at origtextrm{#1}%
+\LWR at htmlclosecomment{}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at htmlblockcomment} \marg{comment}
+% \begin{macrocode}
+\newcommand{\LWR at htmlblockcommentb}[1]
+{\LWR at stoppars\LWR at htmlcomment{#1}\LWR at startpars\endgroup}
+
+\newcommand{\LWR at htmlblockcomment}
+{%
+\begingroup\catcode`\_=12%
+\LWR at htmlblockcommentb%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmlblocktag} \marg{tag} print a stand-alone \acro{HTML} tag
+% \begin{macrocode}
+\newcommand*{\LWR at htmlblocktag}[1]{%
+\LWR at stoppars%
+\LWR at htmltag{#1}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmlblocktagcomment} \marg{tag} \marg{HTML comment}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at htmlblocktagcomment}{m +m}{%
+\LWR at stoppars%
+\LWR at htmltag{#1}\LWR at htmlcomment{#2}\LWR at orignewline%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Div class and element class}
+
+
+% \begin{macro}{\LWR at subhtmlelementclass} \marg{element} \marg{class} \oarg{style}
+%
+% Factored and reused in several places.
+%
+% \changes{v0.20}{2017/01/17}{Factored code.}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at subhtmlelementclass}{m m o}{%
+\IfValueTF{#3}%
+{% option
+\ifthenelse{\equal{#3}{}}%
+{\LWR at htmltag{#1 class="#2"}}% empty option
+{\LWR at htmltag{#1 class="#2" style="#3"}}% non-empty option
+}% option
+{\LWR at htmltag{#1 class="#2"}}% no option
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at htmlelementclass} \marg{element} \marg{class} \oarg{style}
+%
+% \changes{v0.20}{2017/01/17}{Added optional style.}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at htmlelementclass}{m m o}{%
+\LWR at stoppars%
+\LWR at subhtmlelementclass{#1}{#2}[#3]%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at htmlelementclassend} \marg{element} \marg{class}
+% \begin{macrocode}
+\newcommand*{\LWR at htmlelementclassend}[2]{%
+\LWR at stoppars%
+\LWR at htmltag{/#1}%
+\LWR at htmlcomment{End of #1 ``#2''}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmldivclass} \marg{class} \oarg{style}
+%
+% \changes{v0.20}{2017/01/17}{Added optional style.}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at htmldivclass}{m o}{%
+\LWR at htmlelementclass{div}{#1}[#2]%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmldivclassend} \marg{class}
+% \begin{macrocode}
+\newcommand*{\LWR at htmldivclassend}[1]{%
+\LWR at htmlelementclassend{div}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Single-line elements}
+
+% A single-line element, without a paragraph tag for the line of text:
+
+% \begin{macro}{\LWR at htmlelementclassline}
+% \marg{element} \marg{class} \oarg{style} \marg{text}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at htmlelementclassline}{m m o +m}{%
+\LWR at stoppars
+\LWR at subhtmlelementclass{#1}{#2}[#3]%
+#4%
+\LWR at htmltag{/#1}
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+
+% \subsection{HTML5 semantic elements}
+
+
+% \begin{macro}{\LWR at htmlelement} \marg{element}
+% \begin{macrocode}
+\newcommand*{\LWR at htmlelement}[1]{%
+\LWR at htmlblocktag{#1}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at htmlelementend} \marg{element}
+% \begin{macrocode}
+\newcommand*{\LWR at htmlelementend}[1]{%
+\LWR at stoppars
+\LWR at htmltag{/#1}
+\LWR at startpars
+}
+
+\end{warpHTML}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \subsection{High-level block and inline classes}
+% \label{sec:highlevelclasses}
+%
+
+% These are high-level commands which allow the creation of
+% arbitrary block or inline
+% sections which may be formatted with \acro{CSS}.
+
+% For other direct-formatting commands, see \cref{sec:directformatting}.
+
+
+% \begin{environment}{BlockClass} \marg{class} \oarg{style} \quad
+% High-level interface for div classes.
+%
+% \qquad Ex: |\begin{BlockClass}{class}| text |\end{BlockClass}|
+%
+% \changes{v0.20}{2017/01/03}{Renamed from "blockclass".}
+% \changes{v0.20}{2017/01/17}{Added optional style.}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\NewDocumentEnvironment{BlockClass}{m o}
+{
+\LWR at htmldivclass{#1}[#2]
+}
+{
+\LWR at htmldivclassend{#1}
+}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\NewDocumentEnvironment{BlockClass}{m o}{}{}
+\end{warpprint}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{macro}{\BlockClassSingle} \marg{class} \marg{text} \quad
+% A single-line |div|, without a paragraph tag for the line of text.
+%
+% \changes{v0.20}{2017/01/03}{Renamed from "LWR at htmldivclassline".}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\newcommand{\BlockClassSingle}[2]{%
+\LWR at htmlelementclassline{div}{#1}{#2}%
+}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand{\BlockClassSingle}[2]{#2}
+\end{warpprint}
+% \end{macrocode}
+%
+% \end{macro}
+
+
+% \begin{macro}{\InlineClass} \marg{class} \oarg{style} \marg{text} \quad
+% High-level interface for inline span classes.
+%
+% \changes{v0.20}{2017/01/03}{Renamed from "inlineclass".}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\NewDocumentCommand{\InlineClass}{m o m}{%
+\LWR at htmlspanclass{#1}[#2]{#3}%
+}
+\end{warpHTML}
+% \end{macrocode}
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\NewDocumentCommand{\InlineClass}{m o m}{#3}
+\end{warpprint}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Closing HTML tags}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% Sections H1, H2, etc.\ do not need a closing \acro{HTML} tag, but we add a comment for readability:
+% \begin{macrocode}
+\newcommand*{\LWR at printclosepart}
+ {\LWR at htmlcomment{Closing part}}
+\newcommand*{\LWR at printclosechapter}
+ {\LWR at htmlcomment{Closing chapter}}
+\newcommand*{\LWR at printclosesection}
+ {\LWR at htmlcomment{Closing section}}
+\newcommand*{\LWR at printclosesubsection}
+ {\LWR at htmlcomment{Closing subsection}}
+\newcommand*{\LWR at printclosesubsubsection}
+ {\LWR at htmlcomment{Closing subsubsection}}
+\newcommand*{\LWR at printcloseparagraph}
+ {\LWR at htmlcomment{Closing paragraph}}
+\newcommand*{\LWR at printclosesubparagraph}
+ {\LWR at htmlcomment{Closing subparagraph}}
+% \end{macrocode}
+
+% Lists require closing \acro{HTML} tags:
+% \begin{macrocode}
+\newcommand*{\LWR at printcloselistitem}
+ {\LWR at htmltag{/li}}
+\newcommand*{\LWR at printclosedescitem}
+ {\LWR at htmltag{/dd}}
+\newcommand*{\LWR at printcloseitemize}
+ {\LWR at htmltag{/ul}}
+\newcommand*{\LWR at printcloseenumerate}
+ {\LWR at htmltag{/ol}}
+\newcommand*{\LWR at printclosedescription}
+ {\LWR at htmltag{/dl}}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Paragraph handling}
+% \label{sec:parhanding}
+%
+% These commands generate the HTML paragraph tags when allowed and
+% required.
+%
+% Paragraph tags are or are not allowed depending on many conditions.
+% \Cref{sec:parstartstop} has high-level commands which allow
+% paragraph-tag generation to start/stop.
+% Even when allowed (\cs{LWR at doingstartpars}),
+% tags are not generated until a \LaTeX{} paragraph
+% is being used (\cs{LWR at doingapar}).
+% |LWR at lateximagedepth| is used to prevent nesting tags inside
+% a |lateximage|.
+% |LWR at spandepth| is used to prevent nesting paragraph tags inside
+% a paragraph, which became important inside \cs{fbox} commands and other spans.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \DescribeCounter{LWR at spandepth}
+% Do not create paragraph tags inside of an \acro{HTML} span.
+% \begin{macrocode}
+\newcounter{LWR at spandepth}
+\setcounter{LWR at spandepth}{0}
+% \end{macrocode}
+
+
+% \DescribeBoolean{LWR at doingstartpars}
+% Tells whether paragraphs may be generated.
+% \begin{macrocode}
+\newbool{LWR at doingstartpars}
+\boolfalse{LWR at doingstartpars}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR at doingapar}
+% Tells whether have actually generated and are currently processing paragraph text.
+% \begin{macrocode}
+\newbool{LWR at doingapar}
+\global\boolfalse{LWR at doingapar}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at ensuredoingapar}
+% If are about to print something visible, and
+% if allowed to start a new paragraph,
+% ensure that are |LWR at doingapar|, so that paragraph tags are placed:
+% \begin{macrocode}
+\newcommand*{\LWR at ensuredoingapar}{%
+\ifbool{LWR at doingstartpars}%
+{\global\booltrue{LWR at doingapar}}%
+{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at openparagraph}
+% \begin{macrocode}
+\newcommand*{\LWR at openparagraph}
+{%
+% \end{macrocode}
+% See if paragraph handling is enabled:
+% \begin{macrocode}
+\ifbool{LWR at doingstartpars}%
+{% handling pars
+% \end{macrocode}
+% See if have already started a \env{lateximage} or a |span|.
+% If so, do not generate nested paragraph tags.
+% \begin{macrocode}
+\ifthenelse{%
+\cnttest{\value{LWR at lateximagedepth}}{>}{0} \OR%
+\cnttest{\value{LWR at spandepth}}{>}{0}%
+}% nested par tags?
+% \end{macrocode}
+% If so: Do nothing if already started a \env{lateximage} page. Cannot nest a \env{lateximage}.
+% Also do nothing if already inside a |span|. Do not nest paragraph tags
+% inside a |span|.
+% \begin{macrocode}
+{}% no nested par tags
+% \end{macrocode}
+% Else: No \env{lateximage} or |span| has been started yet,
+% so it's OK to generate paragraph tags.
+% \begin{macrocode}
+{% yes nest par tags
+\LWR at htmltagc{\LWR at tagregularparagraph}%
+% \end{macrocode}
+% Manually indent item list labels to avoid left margin intrustion:
+%
+% \LaTeX{} default list environments use |\@itemdepth| and |\@enumdepth|, but
+% \pkg{lwarp} uses the \pkg{enumitem} package, which uses |\@listdepth|.
+%
+% See if are nested inside an item list:
+% \begin{macrocode}
+\ifnumcomp{\@listdepth}{>}{0}%
+{%
+% \end{macrocode}
+% If so, leave some horizontal room in the \LaTeX{} \acro{PDF} output for list labels:
+% \begin{macrocode}
+\LWR at orighspace{1in}%
+}{}%
+% \end{macrocode}
+% Now have started a paragraph.
+% \begin{macrocode}
+\global\booltrue{LWR at doingapar}%
+% \end{macrocode}
+% At the endof each paragraph,
+% generate closing tag and do regular |/par| stuff.
+% (Attempting to use the \pkg{everyhook} |cr| hook
+% for \cs{LWR at closeparagraph} does not work well.)
+% \begin{macrocode}
+\let\par\LWR at closeparagraph%
+}% end of yes nest par tags
+}% end of handling pars
+{}% not handling pars
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\LWR at closeparagraph}
+% \changes{v0.20}{2017/01/17}{No break tags in the start/end of a tabular.}
+% \changes{v0.20}{2017/01/17}{\cs{unskip} extra spaces.}
+% \begin{macrocode}
+\newcommand*{\LWR at closeparagraph}
+{%
+% \end{macrocode}
+% See if paragraph handling is enabled:
+% \begin{macrocode}
+\ifbool{LWR at doingapar}%
+% \end{macrocode}
+% If currently in paragraph mode:
+% \begin{macrocode}
+{% handling pars
+% \end{macrocode}
+% See if already started a \env{lateximage} or a |span|:
+% \begin{macrocode}
+\ifthenelse{%
+\cnttest{\value{LWR at lateximagedepth}}{>}{0} \OR%
+\cnttest{\value{LWR at spandepth}}{>}{0}%
+}%
+% \end{macrocode}
+% Do nothing if already started a \env{lateximage} or a |span|,
+% but add a parbreak if in a span but not a \env{lateximage}.
+% \begin{macrocode}
+{% no nested par tags
+\ifthenelse{%
+\cnttest{\value{LWR at spandepth}}{>}{0}%
+\AND%
+\cnttest{\value{LWR at lateximagedepth}}{=}{0}%
+}%
+{%
+\ifbool{LWR at intabularmetadata}{}{\unskip\LWR at htmltagc{br /}}%
+}%
+{}%
+}% no nested par tags
+% \end{macrocode}
+% If have not already started a \env{lateximage} or a |span|:
+% \begin{macrocode}
+{% yes nest par tags
+% \end{macrocode}
+% Print a closing tag:
+% \begin{macrocode}
+\unskip%
+\LWR at htmltagc{/\LWR at tagregularparagraph}%
+% \end{macrocode}
+% No longer doing a paragraph:
+% \begin{macrocode}
+\global\boolfalse{LWR at doingapar}%
+% Disable the special \env{minipage} \& \cs{hspace} interaction
+% until a new minipage is found:
+% \begin{macrocode}
+\global\boolfalse{LWR at minipagethispar}%
+}% end of yes nest par tags
+}% end of handling pars
+% \end{macrocode}
+% Add a parbreak if in a span,
+% but not in a table outside a row:
+% \begin{macrocode}
+{% not handling pars
+\ifthenelse{\cnttest{\value{LWR at spandepth}}{>}{0}}%
+{\ifbool{LWR at intabularmetadata}{}{\unskip\LWR at htmltagc{br /}}}%
+{}%
+}% not handling pars
+% \end{macrocode}
+% Finish with regular paragraph processing
+% \begin{macrocode}
+\LWR at origpar%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \section{Paragraph start/stop handling}
+% \label{sec:parstartstop}
+% These commands allow/disallow the generation of \acro{HTML}
+% paragraph tags.
+%
+% \Cref{sec:parhanding} has the commands which actually generate
+% the tags.
+%
+% The |everyhook| package is used to generate the opening
+% paragraph tags. The closing tags are generated by |\par|.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at startpars}
+% Begin handling \acro{HTML} paragraphs.
+% This allows an \acro{HTML} paragraph to start, but one has not yet begun.
+% \begin{macrocode}
+\newcommand*{\LWR at startpars}%
+{%
+% \end{macrocode}
+% See if currently handling \acro{HTML} paragraphs:
+% \begin{macrocode}
+\ifbool{LWR at doingstartpars}%
+% \end{macrocode}
+% If already in paragraph mode, do nothing.
+% \begin{macrocode}
+{}%
+% \end{macrocode}
+% If not currently in paragraph mode:
+% \begin{macrocode}
+{%
+% \end{macrocode}
+% At the start of each paragraph, generate an opening tag:
+% \begin{macrocode}
+\PushPreHook{par}{\LWR at openparagraph}%
+% \end{macrocode}
+% At the end of each paragraph, generate closing tag and do regular |/par| actions:
+% \begin{macrocode}
+\let\par\LWR at closeparagraph
+
+}% an intentionally blank line
+% \end{macrocode}
+% Are now handling paragraphs, but have not yet actually started one:
+% \begin{macrocode}
+\global\setbool{LWR at doingstartpars}{true}%
+% \end{macrocode}
+% No <par> tag yet to undo:
+% \begin{macrocode}
+\global\boolfalse{LWR at doingapar}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at stoppars}
+% Stop handling \acro{HTML} paragraphs.
+% Any currently open \acro{HTML} paragraph is closed, and no more will be opened.
+% \begin{macrocode}
+\newcommand*{\LWR at stoppars}%
+{%
+% \end{macrocode}
+% See if currently handling \acro{HTML} paragraphs:
+% \begin{macrocode}
+\ifbool{LWR at doingapar}%
+% \end{macrocode}
+% if currently in an \acro{HTML} paragraph:
+% \begin{macrocode}
+{%
+% \end{macrocode}
+% Print a closing tag:
+% \begin{macrocode}
+\unskip%
+\LWR at htmltagc{/\LWR at tagregularparagraph}%
+% \end{macrocode}
+% No longer have an open HTML paragraph:
+% \begin{macrocode}
+\global\boolfalse{LWR at doingapar}%
+% \end{macrocode}
+% Disable the special \env{minipage} \& \cs{hspace} interaction
+% until a new minipage is found:
+% \begin{macrocode}
+\global\boolfalse{LWR at minipagethispar}
+
+}% an intentionally blank line
+% \end{macrocode}
+% If was not in an \acro{HTML} paragraph:
+% \begin{macrocode}
+{}%
+% \end{macrocode}
+% See if currently allowing \acro{HTML} paragraphs:
+% \begin{macrocode}
+\ifbool{LWR at doingstartpars}%
+% \end{macrocode}
+% If so: clear the |par| hook to no longer catch paragraphs:
+% \begin{macrocode}
+{%
+\ClearPreHook{par}%
+}%
+% \end{macrocode}
+% Else: do nothing
+% \begin{macrocode}
+{}%
+% \end{macrocode}
+% no longer in paragraph mode
+% \begin{macrocode}
+\global\setbool{LWR at doingstartpars}{false}%
+% \end{macrocode}
+% no |<p>| tag to undo:
+% \begin{macrocode}
+\global\boolfalse{LWR at doingapar}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{Page headers and footers}
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% In the following, catcode is manually changes back and forth
+% without groups, since new macros are being defined which must
+% not be contained within the groups.
+% \begin{macrocode}
+\newcommand{\LWR at firstpagetop}{} % for the home page alone
+\newcommand{\LWR at pagetop}{} % for all other pages
+\newcommand{\LWR at pagebottom}{}
+
+\newcommand{\LWR at setfirstpagetopb}[1]{%
+\renewcommand{\LWR at firstpagetop}{#1}
+\catcode`\_=8
+}
+% \end{macrocode}
+% \begin{macro}{\SetFirstPageTop} \marg{text and logos}
+% \begin{macrocode}
+\newcommand{\SetFirstPageTop}{%
+\catcode`\_=12
+\LWR at setfirstpagetopb
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand{\LWR at setpagetopb}[1]{%
+\renewcommand{\LWR at pagetop}{#1}
+\catcode`\_=8
+}
+% \end{macrocode}
+% \begin{macro}{\SetPageTop} \marg{text and logos}
+% \begin{macrocode}
+\newcommand{\SetPageTop}{%
+\catcode`\_=12
+\LWR at setpagetopb
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand{\LWR at setpagebottomb}[1]{%
+\renewcommand{\LWR at pagebottom}{#1}
+\catcode`\_=8
+}
+% \end{macrocode}
+% \begin{macro}{\SetPageBottom} \marg{text and logos}
+% \begin{macrocode}
+\newcommand{\SetPageBottom}{%
+\catcode`\_=12
+\LWR at setpagebottomb
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+% \section{CSS}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at currentcss} The \acro{CSS} filename to use.
+% This may be changed mid-document using \cs{NewCSS},
+% allowing different \acro{CSS} files to be used
+% for different sections of the document.
+
+% \begin{macrocode}
+\newcommand*{\LWR at currentcss}{lwarp.css}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\NewCSS} \marg{new-css-filename.css}
+%
+% Assigns the \acro{CSS} file to be used by the following \acro{HTML} pages.
+% \begin{macrocode}
+\newcommand*{\LWR at newcssb}[1]{%
+\renewcommand*{\LWR at currentcss}{#1}
+\catcode`\_=8
+}
+
+\newcommand*{\NewCSS}{
+\catcode`\_=12
+\LWR at newcssb
+}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand*{\NewCSS}[1]{}
+\end{warpprint}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \section{HTML meta description}
+% \changes{v0.20}{2016/06/27}{Added \cs{NewHTMLdescription}.}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at currentHTMLdescription} The \acro{HTML} meta description to use.
+%
+% This is placed inside an \acro{HTML} meta tag at the start of each file.
+% This may be changed mid-document using \cs{NewHTMLdescription},
+% allowing different \acro{HTML} descriptions to be used
+% for different sections of the document.
+%
+% Do not use double quotes, and do not exceed 150 characters.
+
+% \begin{macrocode}
+\newcommand{\LWR at currentHTMLdescription}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\NewHTMLdescription} \marg{New \acro{HTML} meta description.}
+%
+% Assigns the \acro{HTML} file's description meta tag
+% \index{HTML>meta tag>description}
+% \index{description>HTML meta tag}
+% \index{meta tag, HTML>description}
+% \begin{macrocode}
+\newcommand{\NewHTMLdescription}[1]{%
+\renewcommand{\LWR at currentHTMLdescription}{#1}
+}
+
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand{\NewHTMLdescription}[1]{}
+\end{warpprint}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \section{Footnotes}
+% \label{sec:footnotes}
+%
+% \index{footnotes}
+%
+%
+% Several kinds of footnotes are used: in a regular page, in a minipage, or
+% as thanks in the titlepage. Each of these is handle differently.
+%
+% \subsection{Regular page footnotes}
+% In \LaTeXe{} printed documents, footnotes are placed at the bottom of the printed page.
+% For \acro{HTML}, footnotes will be replaced by page notes
+% using the \pkg{pagenote} package.
+% Footnotes will then appear at the bottom of the \acro{HTML} page.
+%
+% See \cref{sec:footnotesregular} for the implementation.
+%
+% \subsection{Minipage footnotes}
+% See \cref{sec:footnotesminipage} for minipage footnotes.
+%
+% \subsection{Titlepage thanks}
+% See \cref{sec:titlehtml} for titlepage footnotes.
+%
+%
+% \subsection{Regular page footnote implementation}
+% \label{sec:footnotesregular}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% Delayed in case the user's preamble loaded and adjusted \pkg{pagenote}:
+% \begin{macrocode}
+\AtEndPreamble{
+% \end{macrocode}
+
+
+% \begin{macro}{\notedivision}
+%
+% Prints the footnote heading at the end of the page.
+% \begin{macrocode}
+\renewcommand*{\notedivision}
+ {\BlockClassSingle{footnoteheader}{}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{docsidebar}[To print the word ``Notes:'' at the top of the footnotes:]
+% \begin{Verbatim}[gobble=2,obeytabs,tabsize=4]
+% \renewcommand*{\notedivision}| \\
+% {\BlockClassSingle{footnoteheader}{Notes:}}
+% \end{Verbatim}
+% \end{docsidebar}
+
+% \begin{macro}{\pagenotesubhead} \marg{num} \marg{title}
+%
+% Don't print page note headings in \acro{HTML} page notes.
+% \begin{macrocode}
+\renewcommand{\pagenotesubhead}[2]{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\footnote} \oarg{id} \marg{text}
+% Footnotes now become page notes.
+% \begin{macrocode}
+\let\footnote\LWR at origpagenote
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\notenuminnotes} \marg{number}
+%
+% Sets the page notes to use superscripts to match standard classes.
+% \begin{macrocode}
+\renewcommand{\notenuminnotes}[1]{%
+ \textsuperscript{#1} }
+% \end{macrocode}
+% \end{macro}
+
+
+%\begin{macro}{\noteentry} \marg{1: note number} \marg{2: id} \marg{3: text} \marg{4: pagenum}
+%
+% \changes{v0.14}{2016/03/28}{Fix for label inside a footnote.}
+%
+% \begin{macrocode}
+\let\LWR at orignoteentry\noteentry
+\renewcommand{\noteentry}[4]{%
+% \end{macrocode}
+% \DescribeMacro{\@currentlabel}
+% \DescribeMacro{\cref at currentlabel}
+% A label may be used inside a note, so the proper \cs{@currentlabel} must be set
+% inside a group. Likewise for \pkg{cleveref}'s \cs{cref at currentlabel}.
+% \begin{macrocode}
+\begingroup%
+\renewcommand*{\@currentlabel}{#1}%
+\renewcommand*{\cref at currentlabel}{[pagenote][#1][]{#1}}%
+% \end{macrocode}
+% Re-use \pkg{pageref}'s code, with an extra endgroup:
+% \begin{macrocode}
+\LWR at orignoteentry{#1}{#2}{#3}{#4}%
+\endgroup%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at printpendingnotes}
+% Prints the page notes at the end of the section.
+% \begin{macrocode}
+\newcommand*{\LWR at printpendingnotes}{
+% \end{macrocode}
+% If there are footnotes to print, open a new |div| and print the notes.
+% \begin{macrocode}
+\ifthenelse{\cnttest{\value{pagenote}}{>}{0}}%
+{
+\begin{BlockClass}{footnotes}
+% \end{macrocode}
+% Print any pending endnotes, allowing new endnotes to accumulate.
+% \begin{macrocode}
+\LWR at origprintnotes*
+% \end{macrocode}
+% Start over with new page notes.
+% \begin{macrocode}
+\setcounter{pagenote}{0}
+\end{BlockClass}
+}
+{}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+}% \AtEndPreamble
+% \end{macrocode}
+
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{Marginpars}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\marginpar} \oarg{left} \marg{right}
+\renewcommand{\marginpar}[2][]{%
+\LWR at htmlspanclass{marginpar}{#2}%
+}
+% \end{macro}
+%
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \section{Splitting HTML files}
+%
+% \begin{itemize}
+% \item Files are split according to |FileDepth| and |CombineHigherDepths|.
+% \item Filenames are sanitized by |\LWR at filenamenoblanks|.
+% \item |\LWR at newhtmlfile| finishes an \acro{HTML} page,
+% adds a comment to tell where and how to split the file,
+% then starts a new \acro{HTML} page.
+% \end{itemize}
+
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \DescribeCounter{FileDepth} \marg{section depth} determines how deeply
+% to break into new \acro{HTML} files, similar to |tocdepth|.
+% The default of -5 produces one large \acro{HTML} file.
+% \begin{macrocode}
+\newcounter{FileDepth}
+\setcounter{FileDepth}{-5}
+% \end{macrocode}
+
+
+% \DescribeBoolean{CombineHigherDepths} Combile higher-level sections
+% together into one file?
+% \begin{macrocode}
+\newbool{CombineHigherDepths}
+\booltrue{CombineHigherDepths}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at thisfilename}
+% The currently-active filename or number.
+% \begin{macrocode}
+\newcommand*{\LWR at thisfilename}{}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at thisnewfilename}
+% The filename being sanitized.
+% \begin{macrocode}
+\newcommand*{\LWR at thisnewfilename}{}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at filenamenoblanks} \marg{filename}
+%
+% Convert blanks into dashes, removes short words,
+% store result in \\ |\LWR at thisfilename|.
+%
+% Be sure that this does not result in filename collisions!
+% \watchout
+% Use the optional TOC caption entry parameter for formatting.
+% Remember to |\protect| \LaTeX{} commands which appear in
+% section names and TOC captions.
+% \begin{macrocode}
+\newcommand*{\LWR at filenamenoblanks}[1]{%
+\begingroup
+% \end{macrocode}
+
+% Locally temporarily disable direct-formatting commands,
+% not used in filenames:
+% \begin{macrocode}
+\renewcommand*{\HTMLunicode}[1]{}
+\renewcommand*{\HTMLentity}[1]{##1}
+\renewcommand*{\LWR at htmltagc}[1]{}
+\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3}
+% \end{macrocode}
+% Ampersand becomes ``and'', which is a short word and is then removed from the filename.
+% \begin{macrocode}
+\renewcommand*{\&}{and}
+\renewcommand{\textit}[1]{##1}
+\renewcommand{\textsc}[1]{##1}
+\renewcommand{\textsl}[1]{##1}
+\renewcommand{\textbf}[1]{##1}
+\renewcommand{\texttt}[1]{##1}
+\renewcommand{\textsf}[1]{##1}
+\renewcommand{\textrm}[1]{##1}
+\renewcommand{\textsuperscript}[1]{##1}
+\renewcommand{\textsubscript}[1]{##1}
+% \end{macrocode}
+% Replaces common symbols and short words with hyphens:
+%
+% \begin{macrocode}
+\edef\LWR at thisnewfilename{#1}
+\fullexpandarg
+% \end{macrocode}
+% Convert spaces into hyphens:
+% \begin{macrocode}
+\StrSubstitute{\LWR at thisnewfilename}{ }{-}[\LWR at thisnewfilename]
+% \end{macrocode}
+% Convert punctutation into hyphens:
+% ^^A \StrSubstitute{\LWR at thisnewfilename}{é}{e}[\LWR at thisnewfilename]
+% \begin{macrocode}
+\StrSubstitute{\LWR at thisnewfilename}{,}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{'}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\LWR at origampersand}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{+}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{,}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{/}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{:}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{;}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{=}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{?}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{@}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{"}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\textless}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\textgreater}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\#}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\%}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\{}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\}}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{|}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\textbackslash}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{^}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{~{}}{-}[\LWR at thisnewfilename]
+% "~{}" for babel
+\StrSubstitute{\LWR at thisnewfilename}{[}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{]}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{`}{-}[\LWR at thisnewfilename]
+% \end{macrocode}
+% Convert short words:
+% \begin{macrocode}
+\StrSubstitute{\LWR at thisnewfilename}{-s-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-S-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-a-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-A-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-an-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-AN-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-to-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-TO-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-by-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-BY-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-of-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-OF-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-and-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-AND-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-for-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-FOR-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-the-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-THE-}{-}[\LWR at thisnewfilename]
+% \end{macrocode}
+% Convert multiple hyphens:
+% \begin{macrocode}
+\StrSubstitute{\LWR at thisnewfilename}{-----}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{----}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{---}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{--}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{—}{-}[\LWR at thisnewfilename]
+% emdash
+\StrSubstitute{\LWR at thisnewfilename}{–}{-}[\LWR at thisnewfilename]
+% endash
+\global\let\LWR at thisfilename\LWR at thisnewfilename% return a global result
+\endgroup
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\LWR at newhtmlfile} \marg{section name}
+% \changes{v0.18}{2016/04/23}{Sidetoc after title, improving responsive design.}
+%
+% Finishes the current \acro{HTML} page with footnotes, footer, navigation,
+% then starts a new \acro{HTML} page with an \acro{HTML} comment telling where to
+% split the page and what the new filename and \acro{CSS} are, then adds
+% navigation, side TOC, header, and starts the text body.
+% \begin{macrocode}
+\newcommand*{\LWR at newhtmlfile}[1]{
+% \end{macrocode}
+
+% At the bottom of the ending file:
+
+% \begin{macrocode}
+\LWR at htmlelementclassend{section}{textbody}
+
+\LWR at printpendingnotes
+
+\LWR at htmlelement{footer}
+
+\LWR at pagebottom
+
+\LWR at htmlelementend{footer}
+% \end{macrocode}
+
+% No bottom navigation if are finishing the home page:
+% Presumably has a table-of-contents printed.
+% \begin{macrocode}
+\ifnumcomp{\value{LWR at htmlfilenumber}}{>}{0}{\LWR at botnavigation}{}
+% \end{macrocode}
+
+% End of this \acro{HTML} file:
+% \begin{macrocode}
+\LWR at stoppars
+\LWR at htmltag{/body}\LWR at orignewline
+\LWR at htmltag{/html}\LWR at orignewline
+
+\addtocounter{LWR at htmlfilenumber}{1}%
+% \end{macrocode}
+
+% If using a filename, create a version without blanks.
+% The filename without blanks will be placed into \cs{LWR at thisfilename}.
+% If not using a filename, the file number will be used instead.
+% \changes{v0.12}{2016/03/13}{Bugfix: TOC with numbered files.}
+% \begin{macrocode}
+\ifbool{FileSectionNames}%
+{\LWR at filenamenoblanks{#1}}
+{\renewcommand*{\LWR at thisfilename}{\theLWR at htmlfilenumber}}
+% \end{macrocode}
+
+% Include an \acro{HTML} comment to instruct lwarpmk
+% 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.
+% \begin{macrocode}
+\LWR at htmlblockcomment{%
+\LWR at origtexttt{|Start file|%
+\LWR at htmlsectionfilename{\LWR at thisfilename}|}%
+}
+% \end{macrocode}
+
+
+% At the top of the starting file:
+% \begin{macrocode}
+\LWR at stoppars
+
+\LWR at filestart{ — #1}% there is an EMdash in front of the #1
+
+\LWR at topnavigation
+
+\LWR at htmlelement{header}
+
+\LWR at pagetop
+
+\LWR at htmlelementend{header}
+
+\LWR at printthetitle
+
+\LWR at sidetoc
+
+\LWR at htmlelementclass{section}{textbody}
+
+\LWR at stoppars
+
+\setcounter{LWR at latestautopage}{\value{page}}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{Sectioning}
+
+%
+% Sectioning and cross-references have been emulated from scratch, rather
+% than try to patch several layers of existing \LaTeX{} code and packages.
+% Formatting is handled by \acro{CSS}, so the emulated code has much less
+% work to do than the print versions.
+%
+% Section names and the resulting filenames with accented characters
+% \margintag{Unicode}
+% are partially supported, depending on the ability of
+% |pdflatex| to generate characters and |pdftotext| to read them.
+% If extra symbols appear in the text,
+% \watchout
+% it may be that |pdflatex| is actually producing a symbol over or under a
+% character, resulting in |pdftotext| picking up the accent symbol separately.
+%
+% \XeLaTeX{} and \LuaLaTeX{} directly support accented section and file names.
+% \index{accents}\index{Unicode>file \& section names}\index{UTF-8>file \& section names}
+% \index{XeLaTeX>file \& section names}
+% \index{LuaLaTeX>file \& section names}
+%
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%
+% \subsection{Book class commands}
+%
+%
+% \begin{macro}{\mainmatter}
+%
+% Declare the main matter section of the document. Does not reset the page number,
+% \watchout
+% which must be consecutive arabic numbers for the \acro{HTML} conversion.
+% \begin{macrocode}
+\newbool{LWR at mainmatter}
+\DeclareDocumentCommand{\mainmatter}{}{%
+\booltrue{LWR at mainmatter}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\frontmatter}
+%
+% Declare the front matter section of the document,
+% using arabic numbering for the internal numbering. Does not reset the page number.
+% \begin{macrocode}
+\DeclareDocumentCommand{\frontmatter}{}{%
+\boolfalse{LWR at mainmatter}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\backmatter}
+%
+% Declare the back matter section of the document. Does not reset the page number.
+% \begin{macrocode}
+\DeclareDocumentCommand{\backmatter}{}{%
+\boolfalse{LWR at mainmatter}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Sectioning support macros}
+%
+% \begin{macro}{\LWR at sectionumber} \marg{section type}
+%
+% Typeset a section number and its trailing space with CSS formatting:
+% \begin{macrocode}
+\newcommand*{\LWR at sectionnumber}[1]{%
+\InlineClass{sectionnumber}{#1} %
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeObject{autosec} A tag used by the TOC and index.
+%
+% \begin{macro}{\LWR at createautosec} \marg{section type}
+%
+% Create an autosection tag.
+% \begin{macrocode}
+\newcommand*{\LWR at createautosec}[1]{%
+\LWR at htmltag{#1 id="autosec-\thepage"{}}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\LWR at pushoneclose} \marg{depth} \marg{printclose}
+% Stacks the new sectioning level's closing tag,
+% to be used when this section is closed some time later.
+%
+% |\LWR at stoppars| must be executed first.
+% \watchout
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at pushoneclose}{m m}{\pushclose{#2}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at startnewdepth} \marg{depth} \marg{printclose}
+%
+% Closes currently stacked tags of a lesser level,
+% then opens the new nesting level by saving this new sectioning
+% level's closing tag for later use.
+%
+% |\LWR at stoppars| must be executed first.
+% \watchout
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at startnewdepth}{m m}{%
+% \end{macrocode}
+% Close any stacked sections up to this new one.
+% \begin{macrocode}
+\LWR at closeprevious{#1}%
+% \end{macrocode}
+% Push a new section depth:
+% \begin{macrocode}
+\LWR at pushoneclose{#1}{#2}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \DescribeCounter{LWR at prevFileDepth} Remembers the previous |LWR at FileDepth|.
+%
+% Initialized to a deep level so that any section will trigger a new \acro{HTML}
+% page after the home page.
+% \begin{macrocode}
+\newcounter{LWR at prevFileDepth}
+\setcounter{LWR at prevFileDepth}{\LWR at depthsubparagraph}
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\LWR at section} * \oarg{TOC name} \marg{name} \marg{sectiontype}
+%
+% \changes{v0.20}{2017/01/09}{Combined higher-level sections together into files.}
+%
+% The common actions for the high-level sectioning commands.
+% \begin{macrocode}
+\DeclareDocumentCommand{\LWR at section}{m m m m}{%
+\LWR at traceinfo{LWR at section}%
+\LWR at stoppars%
+% \end{macrocode}
+% Cancel special \env{minipage} horizontal space interaction:
+% \begin{macrocode}
+\global\boolfalse{LWR at minipagethispar}%
+% \end{macrocode}
+% Generate a new LaTeX page so that TOC and index page number points to the section:
+% \begin{macrocode}
+\LWR at orignewpage%
+
+% \end{macrocode}
+% Start a new \acro{HTML} file if not starred, and is a shallow sectioning depth:
+% \begin{macrocode}
+\LWR at traceinfo{LWR at section: testing about to start a new HTML file}%
+\IfBooleanTF{#1}{}{% not starred
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{FileDepth}}%
+\AND%
+\(%
+\NOT\boolean{CombineHigherDepths}\OR%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{LWR at prevFileDepth}}%
+\)%
+}%
+% \end{macrocode}
+% If so: start a new \acro{HTML} file:
+% \begin{macrocode}
+{% new file
+\LWR at traceinfo{LWR at section: new HTML file}%
+% \end{macrocode}
+% See if there was an optional TOC name entry:
+% \begin{macrocode}
+\IfNoValueTF{#2}%
+% \end{macrocode}
+% If no optional entry
+% \begin{macrocode}
+{\LWR at newhtmlfile{#3}}%
+% \end{macrocode}
+% If yes an optional entry
+% \begin{macrocode}
+{\LWR at newhtmlfile{#2}}%
+}% new file
+% \end{macrocode}
+% Else: No new \acro{HTML} file:
+% \begin{macrocode}
+{}% not new file
+}% not starred
+% \end{macrocode}
+% Remember this section's name for \cs{nameref}:
+% \begin{macrocode}
+\LWR at traceinfo{LWR at section: about to LWR at setlatestname}%
+\IfValueTF{#2}{\LWR at setlatestname{#2}}{\LWR at setlatestname{#3}}%
+% \end{macrocode}
+% Print an opening comment with the level and the name;
+% ex: ``section'' ``Introduction''
+% \begin{macrocode}
+
+\LWR at htmlcomment{Opening #4 ``#3''{}}
+
+% \end{macrocode}
+% For inline sections paragraph and subparagraph, start a new paragraph now:
+% \begin{macrocode}
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{>=}{\LWR at depthparagraph}%
+}%
+{\LWR at startpars}
+{}
+% \end{macrocode}
+% Create the opening tag with an autosec:
+% \begin{macrocode}
+\LWR at createautosec{\csuse{LWR at tag#4}}%
+% \end{macrocode}
+% If not starred, step counter and add to TOC:
+% \begin{macrocode}
+\IfBooleanTF{#1}%
+{}% starred
+{% not starred
+% \end{macrocode}
+% Only add a numbered TOC entry if section number is not too deep:
+% \begin{macrocode}
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{secnumdepth}}%
+}%
+{% if secnumdepth
+% \end{macrocode}
+% If in the main matter, step the counter and add the TOC entry.
+% For |article| class, \pkg{lwarp} assumes that all is mainmatter.
+% \begin{macrocode}
+\LWR at traceinfo{LWR at section: about to test main matter}%
+\ifbool{LWR at mainmatter}%
+{%
+\LWR at traceinfo{LWR at section: yes mainmatter}%
+\refstepcounter{#4}%
+% \end{macrocode}
+% Add main matter numbered TOC entry with the TOC name or the regular name:
+% \begin{macrocode}
+\LWR at traceinfo{LWR at section: about to addcontentsline}%
+\addcontentsline{toc}{#4}%
+{\protect\LWR at sectionnumber{\csuse{the#4}}%
+\IfValueTF{#2}{#2}{#3}}%
+\LWR at traceinfo{LWR at section: finished addcontentsline}%
+}% end of if main matter
+% \end{macrocode}
+% If not main matter, add unnumbered TOC name or regular name:
+% \begin{macrocode}
+{% not main matter
+\LWR at traceinfo{LWR at section: no main matter}%
+\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
+}% end of not main matter
+}% end of secnumdepth
+% \end{macrocode}
+% Deeper than secnumdepth, so add an unnumbered TOC entry:
+% \begin{macrocode}
+{%
+\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
+}%
+% \end{macrocode}
+% For part, print the section type:
+% \begin{macrocode}
+\ifbool{LWR at mainmatter}%
+{%
+\ifthenelse{%
+\(\cnttest{\csuse{LWR at depth#4}}{<=}%
+{\value{secnumdepth}}\) \AND
+\(\cnttest{\csuse{LWR at depth#4}}{<=}{\LWR at depthpart}\)
+}%
+{\csuse{#4name}~{}}%
+{}%
+% \end{macrocode}
+% Print the section number:
+% \begin{macrocode}
+\LWR at traceinfo{LWR at section: about to print section number}%
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{secnumdepth}}%
+}%
+{\protect\LWR at sectionnumber{\csuse{the#4}}}%
+{}%
+\LWR at traceinfo{LWR at section: finished print section number}%
+}{}%
+}% end of not starred
+% \end{macrocode}
+% Print the section name:
+% \begin{macrocode}
+#3
+% \end{macrocode}
+% close the heading tag, such as /H2
+% \begin{macrocode}
+\LWR at htmltag{\csuse{LWR at tag#4end}}%
+% \end{macrocode}
+% Generate a \LaTeX{} label:
+% \begin{macrocode}
+\label{autopage-\thepage}%
+% \end{macrocode}
+% Start paragraph handing unless is an inline paragraph or subparagraph:
+% \begin{macrocode}
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<}{\LWR at depthparagraph}}%
+{\LWR at startpars}%
+{}%
+% \end{macrocode}
+% If not starred, remember the previous depth to
+% possibly trigger a new \acro{HTML} page.
+%
+% A starred section does not trigger a new \acro{HTML} page at the beginning
+% of this macro, so it should not affect it here at the end either.
+% This became an issue when a \cs{listoftables} was tested in the middle of
+% the document. The \cs{chapter*} for the list was not allowing
+% a new \acro{HTML} page for the section following it
+% while |CombineHigherDepths| was true.
+% \begin{macrocode}
+\IfBooleanTF{#1}{}{% not starred
+\setcounter{LWR at prevFileDepth}{\csuse{LWR at depth#4}}%
+}% not starred
+\LWR at traceinfo{LWR at section: done}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \subsection{\textbackslash{}section and friends}
+
+% \begin{macro}{\part} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\@ifundefined{chapter}
+{}
+{%
+\DeclareDocumentCommand{\part}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthpart}{\LWR at printclosepart}%
+
+\LWR at section{#1}{#2}{#3}{part}%
+}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\chapter} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\@ifundefined{chapter}
+{}
+{%
+\DeclareDocumentCommand{\chapter}{s o m}{%
+\LWR at traceinfo{chapter #3}%
+\LWR at stoppars%
+\LWR at startnewdepth{\LWR at depthchapter}{\LWR at printclosechapter}%
+
+\LWR at traceinfo{chapter: about to LWR at section}%
+\LWR at section{#1}{#2}{#3}{chapter}%
+\LWR at traceinfo{chapter: done}%
+}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\section} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\DeclareDocumentCommand{\section}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsection}{\LWR at printclosesection}%
+
+\LWR at section{#1}{#2}{#3}{section}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\subsection} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\DeclareDocumentCommand{\subsection}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsubsection}{\LWR at printclosesubsection}%
+
+\LWR at section{#1}{#2}{#3}{subsection}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\subsubsection} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\DeclareDocumentCommand{\subsubsection}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsubsubsection}%
+{\LWR at printclosesubsubsection}%
+
+\LWR at section{#1}{#2}{#3}{subsubsection}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\paragraph} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\DeclareDocumentCommand{\paragraph}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthparagraph}{\LWR at printcloseparagraph}%
+
+\LWR at section{#1}{#2}{#3}{paragraph}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\subparagraph} * \oarg{TOC name} \marg{name}
+% \begin{macrocode}
+\DeclareDocumentCommand{\subparagraph}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsubparagraph}{\LWR at printclosesubparagraph}%
+
+\LWR at section{#1}{#2}{#3}{subparagraph}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Starting a new file}
+% \label{sec:startingfile}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\MetaLanguage} Default language for the \acro{HTML} |lang| tag.
+% \index{language HTML metadata}
+% \begin{macrocode}
+\newcommand*{\MetaLanguage}{en-US}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at filestart} \marg{title\_suffix}
+% Creates the opening \acro{HTML} tags.
+% \changes{v0.19}{2016/05/25}{lwarp\_mathjax.txt loaded.}
+% \changes{v0.20}{2016/06/27}{Adds meta description.}
+%
+% \begin{macrocode}
+\newcommand*{\LWR at filestart}[1]{
+% \end{macrocode}
+% Locally temporarily disable direct-formatting commands:
+% \begin{macrocode}
+\begingroup
+\renewcommand{\textit}[1]{##1}% not used in filenames
+\renewcommand{\textsc}[1]{##1}
+\renewcommand{\textsl}[1]{##1}
+\renewcommand{\textbf}[1]{##1}
+\renewcommand{\texttt}[1]{##1}
+\renewcommand{\textsf}[1]{##1}
+\renewcommand{\textrm}[1]{##1}
+\renewcommand{\textsuperscript}[1]{##1}
+\renewcommand{\textsubscript}[1]{##1}
+\renewcommand*{\HTMLunicode}[1]{}
+\renewcommand*{\HTMLentity}[1]{}
+\RenewDocumentCommand{\LWR at htmlspanclass}{m o +m}{##3}
+\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3}
+% \end{macrocode}
+% Create the page's \acro{HTML} header:
+% \begin{macrocode}
+\LWR at htmltag{!DOCTYPE html}\LWR at orignewline
+% \end{macrocode}
+% The language is user-adjustable:
+% \begin{macrocode}
+\LWR at htmltag{html lang="\MetaLanguage"{}}\LWR at orignewline
+% \end{macrocode}
+% Start of the meta data:
+% \begin{macrocode}
+\LWR at htmltag{head}\LWR at orignewline
+% \end{macrocode}
+% Charset is fixed at UTF-8:
+% \begin{macrocode}
+\LWR at htmltag{meta charset="UTF-8" /}\LWR at orignewline
+% \end{macrocode}
+% \pkg{lwarp} is the generator:
+% \index{HTML>meta tag>generator}
+% \index{generator>HTML meta tag}
+% \index{meta tag, HTML>generator}
+% \begin{macrocode}
+\LWR at htmltag{meta name="generator" content="LaTeX lwarp package" /}%
+ \LWR at orignewline
+% \end{macrocode}
+% If there is a description, add it now:
+% \begin{macrocode}
+\ifdefempty{\LWR at currentHTMLdescription}{}{%
+\LWR at htmltag{%
+meta name="description" content="\LWR at currentHTMLdescription" /}%
+ \LWR at orignewline
+}%
+% \end{macrocode}
+% Mobile-friendly viewport:
+% \index{HTML>meta tag>viewport}
+% \index{viewport>HTML meta tag}
+% \index{meta tag, HTML>viewport}
+% \begin{macrocode}
+\LWR at htmltag{meta name="viewport" %
+content="width=device-width, initial-scale=1.0" /}%
+ \LWR at orignewline
+% \end{macrocode}
+% IE patch:
+% \begin{macrocode}
+\LWR at htmltag{!{-}{-}[if lt IE 9]}\LWR at orignewline
+\LWR at htmltag{%
+script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}
+\LWR at htmltag{/script}\LWR at orignewline
+\LWR at htmltag{![endif]{-}{-}}\LWR at orignewline
+% \end{macrocode}
+% The page's title:
+% \begin{macrocode}
+\LWR at htmltag{title}\thetitle#1\LWR at htmltag{/title}\LWR at orignewline
+% \end{macrocode}
+% The page's stylesheet:
+% \begin{macrocode}
+\LWR at htmltag{%
+link rel="stylesheet" type="text/css" href="\LWR at currentcss" /}%
+\LWR at orignewline
+% \end{macrocode}
+% Optional MathJax support. The \acro{HTML} tags must be turned off
+% during the verbatim input, and the paragraph handling which was
+% turned on at the end of verbatim input must be immediately turned off
+% again.
+% \begin{macrocode}
+\ifbool{mathjax}%
+{%
+\boolfalse{LWR at verbtags}
+\VerbatimInput{lwarp_mathjax.txt}%
+\booltrue{LWR at verbtags}
+\LWR at stoppars
+}% end of mathjax
+{}%
+% \end{macrocode}
+% End of the header:
+% \begin{macrocode}
+\LWR at htmltag{/head}\LWR at orignewline
+% \end{macrocode}
+% Start of the body:
+% \begin{macrocode}
+\LWR at htmltag{body}\LWR at orignewline
+\endgroup
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+% \section{Starting HTML output}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at LwarpStart}
+% \changes{v0.19}{2016/06/01}{Enabled \textbackslash\textbackslash{} equal to \cs{newline}.}
+% Executed at the beginning of the entire document.
+% \begin{macrocode}
+\newcommand*{\LWR at LwarpStart}
+{%
+% \end{macrocode}
+% Expand and detokenize \cs{HomeHTMLFileName} and \cs{HTMLFileName}:
+% \begin{macrocode}
+\edef\LWR at strresult{\HomeHTMLFileName}
+\edef\HomeHTMLFileName{\detokenize\expandafter{\LWR at strresult}}
+\edef\LWR at strresult{\HTMLFileName}
+\edef\HTMLFileName{\detokenize\expandafter{\LWR at strresult}}
+% \end{macrocode}
+% Force onecolumn:
+% \begin{macrocode}
+\LWR at origonecolumn%
+% \end{macrocode}
+% Reduce chance of line overflow in verbatim environments:
+% \begin{macrocode}
+\LWR at origscriptsize%
+% \end{macrocode}
+% In \acro{PDF} output, don't allow line breaks to interfere with \acro{HTML} tags:
+% \begin{macrocode}
+\LWR at origraggedright%
+\let\\\LWR at endofline%
+% \end{macrocode}
+% Spread the lines for |pdftotext| to read them well:
+% \begin{macrocode}
+\linespread{1.3}%
+% \end{macrocode}
+% For |pdftotext| to reliably identify paragraph splits:
+% \begin{macrocode}
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{2ex}
+% \end{macrocode}
+%
+% For the |lateximages| command file:
+%
+% \begin{macrocode}
+\ifbool{usingOSwindows}
+{% Windows:
+\immediate\openout\LWR at file=lateximages.cmd
+}
+{% Unix:
+\immediate\openout\LWR at file=lateximages.sh
+\immediate\write\LWR at file{\LWR at hashmark!\OSShellPath}
+}
+% \end{macrocode}
+% The first action of the command file is to create the
+% |lateximages| directory:
+% \begin{macrocode}
+\immediate\write\LWR at file{\OSmkdir lateximages\OSPathSymbol}
+% \end{macrocode}
+%
+% Removes space after the caption in the \acro{HTML}:
+% \begin{macrocode}
+\setlength{\belowcaptionskip}{-3ex}
+% \end{macrocode}
+% Redefine the plain page style to be empty when used by index pages:
+% \begin{macrocode}
+\renewcommand{\ps at plain}{}
+% \end{macrocode}
+% Not used in the \acro{HTML} environment:
+% \DescribeMacro{\centering}
+% \DescribeMacro{\raggedleft}
+% \DescribeMacro{\raggedright}
+% \begin{macrocode}
+\renewcommand*{\centering}{}
+\renewcommand*{\raggedleft}{}
+\renewcommand*{\raggedright}{}
+% \end{macrocode}
+% Plug in some new actions.
+% This is done just before the document start
+% so that they won't be over-written by some other package.
+% \changes{v0.13}{2016/03/23}{\cs{up} and \cs{fup}}
+%
+% Tabular:
+% \begin{macrocode}
+\let\LWR at origtabular\tabular
+\let\LWR at origendtabular\endtabular
+\let\tabular\LWR at tabular
+\let\endtabular\endLWR at tabular
+% \end{macrocode}
+% Float captions:
+% \begin{macrocode}
+\let\LWR at origcaption\caption
+% \end{macrocode}
+%
+% Labels:
+% \cs{ltx at label} is used in \pkg{amsmath} environments and is also
+% patched by \pkg{cleveref}.
+% \index{label>in HTML}
+% \margintag{Label in \acro{HTML}}
+% \changes{v0.20}{2017/01/30}{Fix: math cross references.}
+% \begin{macrocode}
+\let\ltx at label\LWR at htmlmathlabel
+% \end{macrocode}
+% Logos:
+% \begin{macrocode}
+\let\TeX\LWR at TeX
+\let\LaTeX\LWR at LaTeX
+\let\LuaTeX\LWR at LuaTeX
+\let\LuaLaTeX\LWR at LuaLaTeX
+\let\XeTeX\LWR at XeTeX
+\let\XeLaTeX\LWR at XeLaTeX
+\let\ConTeXt\LWR at ConTeXt
+% \end{macrocode}
+% Graphics:
+% \begin{macrocode}
+\let\textcolor\LWR at textcolor
+\let\pagecolor\LWR at pagecolor
+\let\colorbox\LWR at colorbox
+\let\fcolorbox\LWR at fcolorbox
+\let\rotatebox\LWR at rotatebox
+\let\scalebox\LWR at scalebox
+\let\reflectbox\LWR at reflectbox
+% \end{macrocode}
+% Not yet started any paragraph handling:
+% \begin{macrocode}
+\global\boolfalse{LWR at doingapar}
+\global\boolfalse{LWR at doingstartpars}
+% \end{macrocode}
+% Start a new \acro{HTML} file and a header:
+% \begin{macrocode}
+\LWR at filestart{}
+\LWR at htmltag{header}\LWR at orignewline
+\LWR at startpars
+\LWR at firstpagetop
+\LWR at stoppars
+\LWR at htmltag{/header}\LWR at orignewline
+\LWR at htmltag{section class="textbody"{}}
+\LWR at origpagestyle{empty}
+% \end{macrocode}
+% Document and page settings:
+% \begin{macrocode}
+\mainmatter
+\LWR at origpagenumbering{arabic}
+% \end{macrocode}
+% Set default titlepage thanks footnote marks. See \cref{sec:titlehtml}.
+% \begin{macrocode}
+\if at titlepage
+ \thanksmarkseries{arabic}
+\else
+ \thanksmarkseries{fnsymbol}
+\fi
+% \end{macrocode}
+%
+% Initial default patch for fancyvrb:
+% \begin{macrocode}
+\fvset{frame=none}%
+% \end{macrocode}
+%
+% The ampersand is redefined active, and acts depending
+% on whether it is inside a tabular.
+% \begin{macrocode}
+\catcode`\&=\active
+% \end{macrocode}
+% Allow \acro{HTML} paragraphs to begin:
+% \begin{macrocode}
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Ending HTML output}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at requesttoc} \marg{boolean} \marg{suffix}
+% \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.}
+% Requests that a toc, lof, or lot be generated.
+
+% \begin{macrocode}
+\newcommand*{\LWR at requesttoc}[2]{%
+\ifbool{#1}
+{
+\expandafter\newwrite\csuse{tf@#2}
+\immediate\openout \csuse{tf@#2} \jobname.#2\relax
+}{}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at LwarpEnd}
+% Final stop of all \acro{HTML} output:
+% \begin{macrocode}
+\newcommand*{\LWR at LwarpEnd}
+{
+\LWR at stoppars
+\LWR at closeprevious{\LWR at depthfinished}
+% \end{macrocode}
+% At the bottom of the ending file:
+
+% Close the textbody:
+% \begin{macrocode}
+\LWR at htmlelementclassend{section}{textbody}
+% \end{macrocode}
+% Print any pending footnotes:
+% \begin{macrocode}
+\LWR at printpendingnotes
+% \end{macrocode}
+% Create the footer:
+% \begin{macrocode}
+\LWR at htmlelement{footer}
+
+\LWR at pagebottom
+
+\LWR at htmlelementend{footer}
+% \end{macrocode}
+
+% No bottom navigation if are finishing the home page: \\
+% Presumably has a table-of-contents printed.
+% \begin{macrocode}
+\ifnumcomp{\value{LWR at htmlfilenumber}}{>}{0}{\LWR at botnavigation}{}
+% \end{macrocode}
+% \begin{macrocode}
+\LWR at stoppars% final stop of all paragraphs
+% \end{macrocode}
+% Finish the HTML file:
+% \begin{macrocode}
+\LWR at htmltag{/body}\LWR at orignewline
+\LWR at htmltag{/html}\LWR at orignewline
+% \end{macrocode}
+% Seems to be required sometimes:
+% \begin{macrocode}
+\LWR at orignewpage
+% \end{macrocode}
+% For \env{lateximage} commands:
+% \begin{macrocode}
+\immediate\closeout\LWR at file
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+% \section{Titles and the \protect\pkg{titling} package}
+% \label{sec:titles}
+% Supports and extends the \pkg{titling} package.
+%
+% Additional functions include \cs{published} and \cs{subtitle}, and the
+% \cs{author} command has an additional \cs{affiliation} command to provide
+% an affiliation and other additional information for each author in the
+% title page. The affiliation information is removed when using \cs{theauthor}
+% in the main text.
+%
+% The \pkg{titling} package maintains the definitions of \cs{thetitle},
+% \cs{theauthor}, etc., after the title has been typeset.
+% These commands are to be used to refer to the document's title
+% and author, etc., in the main text.
+% These definitions
+% have the \cs{thanks} and \cs{affiliation} removed, and for author the
+% \cs{and} is replaced to generate a simple inline list of authors separated
+% by commas.
+%
+% \cs{printtitle}, \cs{printauthor}, etc., are provided for use inside
+% the \env{titlepage} or \env{titlingpage} environments, and these retain
+% the \cs{thanks} and \cs{affiliation}.
+%
+% Several additional hooks are provided in addition to \pkg{titling}:
+% \begin{description}
+% \ItemDescribeMacro{\maketitlehookaa} Between ``published'' and the title.
+% \ItemDescribeMacro{\maketitlehookaaa} Between the title and the subtitle.
+% \ItemDescribeMacro{\prepublished} Before the ``published'' field.
+% \ItemDescribeMacro{\postpublished} After the ``published'' field.
+% \ItemDescribeMacro{\presubtitle} Before the subtitle.
+% \ItemDescribeMacro{\postsubtitle} After the subtitle.
+% \end{description}
+%
+% \DescribeMacro{\printthanks}
+% \cs{printthanks} has been added to force the printing of thanks inside
+% a \env{titlingpage} environment when \cs{maketitle} is not used.
+%
+% Inside a \cs{titlepage} or \cs{titlingpage} environment, use
+% \cs{thanks} for footnotes, do not use \cs{footnote}.
+% \watchout[No footnotes!]
+%
+% At the end of the \env{titlingpage} environment, footnote marks are forced to
+% reset to zero.
+%
+% Inside a \env{titlingpage} environment with the |article| document class,
+% thanks marks will be |fnsymbol| instead of |arabic|. |arabic| is usually
+% used when inside \env{titlepage} environments where the title page is
+% on its own page, but is not automatically used
+% inside a \env{titlingpage} environment.
+%
+% To force the thanks marks to
+% be |arabic|:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \begin{titlingpage}
+% \thanksmarkseries{arabic}
+% ...
+% \end{Verbatim}
+%
+%
+%
+% \subsection{Setting the title, etc.}
+%
+% The following provide setting commands for both \acro{HTML} and print outputs.
+%
+% \DescribeMacro{@published}
+% \DescribeMacro{@title}
+% \DescribeMacro{@subtitle}
+% \DescribeMacro{@author}
+% \DescribeMacro{@date}
+% \cs{@title}, \cs{@subtitle}, \cs{@author}, etc.\ store the values
+% as originally assigned, including any \cs{thanks}, \cs{and}, or \cs{affiliation}.
+% These are low-level macros intended to be used by other macros
+% only inside a \env{titlepage} or \env{titlingpage},
+% and are used by \cs{maketitle}.
+% The author is printed inside a single-column table,
+% which becomes multiple single-column tables if multiples authors are included.
+%
+% \DescribeMacro{\printpublished}
+% \DescribeMacro{\printtitle}
+% \DescribeMacro{\printsubtitle}
+% \DescribeMacro{\printauthor}
+% \DescribeMacro{\printdate}
+% \cs{printtitle}, \cs{printsubtitle}, etc.\ are user-level macros intended to
+% be used in \env{titlepage} and \env{titlingpage} environments in cases where
+% \cs{maketitle} is not desired. These commands preserve the \cs{thanks}, etc.,
+% and should not be used in the main text.
+% The author is printed inside a single-column table,
+% which becomes multiple single-column tables if multiples authors are included.
+%
+% \DescribeMacro{\thepublished}
+% \DescribeMacro{\thetitle}
+% \DescribeMacro{\thesubtitle}
+% \DescribeMacro{\theauthor}
+% \DescribeMacro{\thedate}
+% \cs{thetitle}, \cs{thesubtitle}, \cs{theauthor}, etc.\ are user-level
+% sanitized versions which have removed the \cs{thanks} and \cs{affiliation},
+% and \cs{and} is changed for inline text usage.
+% The author is printed inline without \cs{affiliation} or \cs{thanks},
+% with \cs{and} placing commas between multiple authors.
+% Thus, these commands are to be used in the main text whenever the user
+% wishes to refer to the document's title and such. One practical use for this
+% is to place the authors at the bottom of each \acro{HTML} page, such as:
+%
+% \DescribeMacro{\SetPageBottom} \marg{text}
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \SetPageBottom{
+% \begin{center}\textcopyright~2016 \theauthor\end{center}
+% }
+% \end{Verbatim}
+
+
+%
+% \DescribeMacro{\author} \marg{author}
+% \DescribeMacro{\and}
+% While using \cs{maketitle}, the author is treated as a single-column table
+% and the \cs{and} feature finishes the current table then starts a new one for
+% the next author. Each author thus is placed into its own table, and an
+% affiliation may be placed on its own line such as
+%
+% |\author{Name \\ Affiliation \and Second Name \\ Second Affiliation}|
+%
+% After \cs{maketitle} has completed, \cs{theauthor} retains the definition of
+% the author, but \cs{and} is changed to become a comma and a space, intending to
+% print the authors names separated by spaces. This fails when affiliations are
+% included on their own table rows.
+%
+% A solution, provide here, is to define a macro \cs{affiliation} which
+% during \cs{maketitle} starts a new table row and adds the affiliation,
+% but after \cs{maketitle} is finished \cs{affiliation} is re-defined
+% to throw away its argument, thus printing only the author names
+% when \cs{author} is later used inline.
+%
+%
+% \begin{macro}{\affiliation} \marg{text}
+%
+% Adds the affiliation to the author for use in \cs{maketitle}.
+% Nullified when later used for inline use of \cs{theauthor}.
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\newrobustcmd{\affiliation}[1]{\\ \InlineClass{affiliation}{#1}}
+\end{warpHTML}
+% \end{macrocode}
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newrobustcmd{\affiliation}[1]{\\ \textsc{\small#1}}
+\end{warpprint}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% The following are based on the original \pkg{titling} code:
+%
+%
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+% \begin{macro}{\author} \marg{text}
+%
+% Redefined to nullify \cs{affiliation}, etc.\ before printing the authors inline.
+%
+% \cs{@author} retains the entire author with its \cs{thanks}, while
+% \cs{theauthor} will have \cs{thanks} removed and \cs{and} simplified.
+% \begin{macrocode}
+\renewcommand{\author}[1]{%
+\gdef\@author{#1}
+\begingroup
+ \renewcommand{\thanks}[1]{}
+ \renewcommand{\and}{\unskip, }
+ \renewcommand{\thanksmark}[1]{}
+ \renewcommand{\thanksgap}[1]{}
+ \renewcommand{\affiliation}[1]{}
+ \protected at xdef\theauthor{#1}
+\endgroup}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\published} \marg{text}
+% \changes{v0.13}{2016/03/23}{Default to empty published.}
+% \begin{macrocode}
+\newcommand{\published}[1]{%
+\gdef\@published{#1}
+\begingroup
+ \renewcommand{\thanks}[1]{}
+ \renewcommand{\thanksmark}[1]{}
+ \renewcommand{\thanksgap}[1]{}
+ \protected at xdef\thepublished{#1}
+\endgroup
+}
+\newcommand{\@published}{}
+\newcommand{\thepublished}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subtitle} \marg{text}
+% \changes{v0.13}{2016/03/23}{Default to empty subtitle.}
+% \begin{macrocode}
+\newcommand{\subtitle}[1]{%
+\gdef\@subtitle{#1}
+\begingroup
+ \renewcommand{\thanks}[1]{}
+ \renewcommand{\thanksmark}[1]{}
+ \renewcommand{\thanksgap}[1]{}
+ \protected at xdef\thesubtitle{#1}
+\endgroup
+}
+\newcommand{\@subtitle}{}
+\newcommand{\thesubtitle}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+%
+%
+% \subsection{Changes to HTML titlepage and titlingpage}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%
+% \begin{environment}{titlepage}
+% Sets up a titlepage div with a \LaTeX{} \acro{PDF} minipage inside.
+% \begin{macrocode}
+\renewenvironment*{titlepage}
+ {\BlockClass{titlepage}\LWR at subminipage}
+ {\LWR at endsubminipage\endBlockClass}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{titlingpage}
+% \begin{macrocode}
+\renewenvironment*{titlingpage}
+{%
+% \end{macrocode}
+% Start an HTML titlepage div:
+% \begin{macrocode}
+\begin{titlepage}
+% \end{macrocode}
+% Prepare for a custom version of \cs{maketitle} inside the \env{titlingpage}:
+% \begin{macrocode}
+\LWR at maketitlesetup
+\let\maketitle\LWR at titlingmaketitle
+}
+{
+% \end{macrocode}
+% At the end of the environment,
+% end the HTML titlepage div:
+% \begin{macrocode}
+\end{titlepage}
+% \end{macrocode}
+% Reset the footnote counter:
+% \begin{macrocode}
+\@bscontmark
+}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+% \DescribeMacro{\printthanks} Forces the \cs{thanks} to be printed.
+%
+% This is necessary in a \env{titlingpage} environment
+% when \cs{maketitle} was not used.
+% \begin{macrocode}
+\newcommand*{\printthanks}{\@thanks}
+% \end{macrocode}
+%
+% \begin{environment}{titlingpage}
+% At the end of the titlingpage for both print and HTML,
+% reset footnote markers to zero.
+% \begin{macrocode}
+\AtEndEnvironment{titlingpage}{\@bscontmark}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+
+% \subsection{Printing the title, etc.\ in HTML}
+%
+% \changes{v0.20}{2017/01/21}{Enhanced \pkg{titling} support.}
+%
+% The following are for printing the title, etc.
+% in a \env{titlepage} or a \env{titlingpage}
+% in \acro{HTML}:
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%
+%
+% Patch the pre/post title/author/date to add \acro{HTML} tags,
+% then initilize:
+% \begin{macrocode}
+\newcommand{\prepublished}[1]{%
+\def\@bsprepublished{\BlockClass{published}#1}%
+}
+
+\newcommand{\postpublished}[1]{%
+\def\@bspostpublished{#1\endBlockClass}%
+}
+
+\renewcommand{\pretitle}[1]{%
+\def\@bspretitle{#1\LWR at stoppars\LWR at htmltag{h1}}%
+}
+
+\renewcommand{\posttitle}[1]{%
+\def\@bsposttitle{\LWR at htmltag{/h1}\LWR at startpars#1}%
+}
+
+\newcommand{\presubtitle}[1]{%
+\def\@bspresubtitle{\BlockClass{subtitle}#1}%
+}
+
+\newcommand{\postsubtitle}[1]{%
+\def\@bspostsubtitle{#1\endBlockClass}%
+}
+
+\renewcommand{\preauthor}[1]{%
+\def\@bspreauthor{\BlockClass{author}#1}%
+}
+
+\renewcommand{\postauthor}[1]{%
+\def\@bspostauthor{#1\endBlockClass}%
+}
+
+\renewcommand{\predate}[1]{%
+\def\@bspredate{#1\BlockClass{titledate}}%
+}
+
+\renewcommand{\postdate}[1]{%
+\def\@bspostdate{\endBlockClass#1}%
+}
+
+\prepublished{\begin{center}}
+\postpublished{\par\end{center}}
+
+\pretitle{\begin{center}}
+\posttitle{\par\end{center}}
+
+\presubtitle{\begin{center}}
+\postsubtitle{\par\end{center}}
+
+\preauthor{\begin{center}%
+\begin{tabular}[t]{c}%
+}
+\postauthor{\end{tabular}\par\end{center}}
+
+\predate{\begin{center}}
+\postdate{\par\end{center}}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\printpublished}
+% \changes{v0.15}{2015/04/05}{No div if empty.}
+% \begin{macrocode}
+\newcommand*{\printpublished}{
+\ifthenelse{\equal{\thepublished}{}}
+{}
+{
+\begin{BlockClass}{published}
+\@published
+\end{BlockClass}
+}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printtitle}
+% \begin{macrocode}
+\newcommand*{\printtitle}
+{
+\LWR at stoppars
+\LWR at htmltag{h1}%
+\@title%
+\LWR at htmltag{/h1}
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at printthetitle}
+%
+% A private version which prints the title without footnotes,
+% used to title each \acro{HTML} page.
+% \begin{macrocode}
+\newcommand*{\LWR at printthetitle}
+{
+\LWR at stoppars
+\LWR at htmltag{h1}%
+\thetitle%
+\LWR at htmltag{/h1}
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printsubtitle}
+% \changes{v0.15}{2015/04/05}{No div if empty.}
+% \begin{macrocode}
+\newcommand*{\printsubtitle}{
+\ifthenelse{\equal{\thesubtitle}{}}
+{}
+{
+\begin{BlockClass}{subtitle}
+\@subtitle
+\end{BlockClass}
+}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printauthor}
+% \begin{macrocode}
+\newcommand*{\printauthor}{
+\begin{BlockClass}{author}
+\begin{tabular}{c}\@author\end{tabular}
+\end{BlockClass}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\printdate}
+% \begin{macrocode}
+\newcommand*{\printdate}{%
+\begin{BlockClass}{titledate}
+\@date
+\end{BlockClass}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \subsection{Printing the title, etc.\ in print form}
+%
+% The following are for printing the title, etc.
+% in a \env{titlepage} or a \env{titlingpage}
+% in print form:
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+% \end{macrocode}
+
+% \changes{v0.16}{2016/04/07}{\cs{titlingpage}: Improved print-output spacing.}
+% \changes{v0.16}{2016/04/07}{Test Suite: Improved titlingpage.}
+% \begin{macro}{\printpublished}
+% \begin{macrocode}
+\newcommand*{\printpublished}{{\Large\scshape\@published}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printtitle}
+% \begin{macrocode}
+\newcommand*{\printtitle}{{\Huge\@title}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printsubtitle}
+% \begin{macrocode}
+\newcommand*{\printsubtitle}{{\Large\itshape\@subtitle\bigskip}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printauthor}
+% \begin{macrocode}
+\newcommand*{\printauthor}
+ {{\large\begin{tabular}[t]{c}\@author\end{tabular}}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\printdate}
+% \begin{macrocode}
+\newcommand*{\printdate}{{\small\textit{\@date}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{\cs{maketitle} for print output}
+%
+%
+% \DescribeMacro{\maketitle}
+% From the \pkg{titling} package, patched to add the publisher and subtitle.
+%
+% \begin{macrocode}
+\providecommand{\maketitle}{}
+\if at titlepage
+ \renewcommand{\maketitle}{\begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \@bsmarkseries
+ \def\@makefnmark{\rlap{\@textsuperscript{%
+ \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
+ \long\def\@makefntext##1{\makethanksmark ##1}
+ \null\vfil
+ \vskip 60\p@
+ \vspace*{\droptitle}
+ \maketitlehooka
+ \ifcsempty{@published}
+ {}
+ {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {\@bspretitle \@title \@bsposttitle}
+ \ifcsempty{@subtitle}
+ {}
+ {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ \maketitlehookb
+ {\@bspreauthor \@author \@bspostauthor}
+ \maketitlehookc
+ {\@bspredate \@date \@bspostdate}
+ \maketitlehookd
+ \par
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+ \@bscontmark % \setcounter{footnote}{0}%
+%%% \@bsmtitlempty
+ } % end titlepage defs
+\else
+ \renewcommand{\maketitle}{\par
+ \begingroup
+ \@bsmarkseries
+ \def\@makefnmark{\rlap{\@textsuperscript{%
+ \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
+ \long\def\@makefntext##1{\makethanksmark ##1}
+ \if at twocolumn
+ \ifnum \col at number=\@ne
+ \@maketitle
+ \else
+ \twocolumn[\@maketitle]%
+ \fi
+ \else
+ \newpage
+ \global\@topnum\z@
+ \@maketitle
+ \fi
+ \thispagestyle{plain}\@thanks
+ \endgroup
+ \@bscontmark % \setcounter{footnote}{0}%
+%%% \@bsmtitlempty
+ } % end non-titlepage
+
+ \def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \vspace*{\droptitle}
+ \maketitlehooka
+ \ifcsempty{@published}
+ {}
+ {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {\@bspretitle \@title \@bsposttitle}
+ \ifcsempty{@subtitle}
+ {}
+ {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ \maketitlehookb
+ {\@bspreauthor \@author \@bspostauthor}
+ \maketitlehookc
+ {\@bspredate \@date \@bspostdate}
+ \maketitlehookd
+ \par
+ \vskip 1.5em}
+\fi
+
+\providecommand{\maketitlehookaa}{}
+
+\providecommand{\maketitlehookaaa}{}
+
+\newcommand{\prepublished}[1]{%
+\def\@bsprepublished{#1}%
+}
+
+\newcommand{\postpublished}[1]{%
+\def\@bspostpublished{#1}%
+}
+
+\newcommand{\presubtitle}[1]{%
+\def\@bspresubtitle{#1}%
+}
+% \end{macrocode}
+%
+% \DescribeMacro{\presubtitle} Hook after printing the subtitle.
+% \begin{macrocode}
+\newcommand{\postsubtitle}[1]{%
+\def\@bspostsubtitle{#1}%
+}
+% \end{macrocode}
+%
+% Initial settings:
+%
+% \begin{macrocode}
+\if at titlepage
+\prepublished{
+\vspace*{-\baselineskip}\vspace*{-\medskipamount}\vspace*{-2em}
+\begin{center}}
+\postpublished{\par\end{center}\vskip 2em}
+
+\presubtitle{\unskip\begin{center}\unskip}
+\postsubtitle{\par\end{center}\vskip 2em}
+\else
+\prepublished{\begin{center}}
+\postpublished{\par\end{center}\vskip 0.5em}
+
+\presubtitle{\begin{center}\unskip}
+\postsubtitle{\par\end{center}\vskip 0.5em}
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\end{warpprint}
+% \end{macrocode}
+%
+%
+% \subsection{\protect\textbackslash{}maketitle for HTML output}
+% \label{sec:titlehtml}
+%
+% An \acro{HTML} div of class |titlepage| is created, inside of which
+% a \LaTeX{} \acro{PDF} minipage is generated (without \acro{HTML} tags),
+% allowing the |\thanks| footnotes to be generated immediately at the end
+% of the title page during \acro{HTML} output. This is desirable when
+% a large table of contents immediately follows the title.
+%
+% |\thanks| are a form of footnotes used in the title page.
+% See \cref{sec:footnotes} for other kinds of footnotes.
+%
+% See |\thanksmarkseries{series}|, below, to set the style of the footnote marks.
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%\begin{macro}{\LWR at maketitlesetup} Patches \cs{thanks} macros to
+% use \LaTeX{} minipage footnotes.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at maketitlesetup}{%
+% \end{macrocode}
+% Select which kind of footnote marks to use:
+% \begin{macrocode}
+\@bsmarkseries
+\@mpbsmarkseries
+% \end{macrocode}
+%
+% Redefine the footnote mark:
+%
+% \begin{macrocode}
+\def\@makefnmark{\textsuperscript{\thefootnote}}%
+% \end{macrocode}
+% \begin{center}
+% \begin{minipage}{.7\linewidth}
+% \cs{thefootnote} \goesto\ \cs{nameuse}\{arabic\}\{footnote\}, or
+%
+% \cs{thefootnote} \goesto\ \cs{nameuse}\{fnsymbol\}\{footnote\}
+% \end{minipage}
+% \end{center}
+%
+% Redefine the footnote text:
+%
+% \begin{macrocode}
+\long\def\@makefntext##1{%
+% \end{macrocode}
+% Make the footnote mark and some extra horizontal space for the tags:
+% \begin{macrocode}
+\makethanksmark \LWR at orighspace{1in}
+% \end{macrocode}
+% \begin{center}
+% \begin{minipage}{.7\linewidth}
+% \cs{makethanksmark} \goesto\ \cs{thanksfootmark} \goesto\ \cs{tamark} \goesto\
+%
+% \hfill \cs{@thefnmark} \goesto\ \cs{itshape} a (or similar)
+% \end{minipage}
+% \end{center}
+%
+% Print the text and a closing paragraph tag:
+% \begin{macrocode}
+##1\LWR at htmltagc{/\LWR at tagregularparagraph}%
+}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@fnsymbol} \marg{counter}
+%
+% Re-defined to use an \acro{HTML} entity for the double vertical bar symbol.
+% The original definition used \cs{\textbar} which was not being found by \cmds{pdftotext}.
+% \begin{macrocode}
+\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
+ \mathsection\or \mathparagraph\or \text{\HTMLunicode{2016}}\or
+ **\or \dagger\dagger \or \ddagger\ddagger \else\@ctrerr\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+%\begin{macro}{\maketitle} Creates an \acro{HTML} titlepage div
+% and typesets the title, etc.
+%
+% Code from the \pkg{titling} package is adapted, simplified, and
+% modified for \acro{HTML} output.
+%
+% \begin{macrocode}
+\renewcommand*{\maketitle}{%
+% \end{macrocode}
+% An \acro{HTML} titlepage div is used for all classes.
+% \begin{macrocode}
+\begin{titlepage}
+% \end{macrocode}
+% Set up special patches:
+% \begin{macrocode}
+\LWR at maketitlesetup
+% \end{macrocode}
+% Typeset the title, etc:
+% \begin{macrocode}
+\@maketitle
+% \end{macrocode}
+% Immediately generate any |\thanks| footnotes:
+% \begin{macrocode}
+\@thanks
+% \end{macrocode}
+% Close the \acro{HTML} titlepage div:
+% \begin{macrocode}
+\end{titlepage}
+% \end{macrocode}
+% Reset the footnote counter:
+% \begin{macrocode}
+\@bscontmark
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@maketitle} Typesets the title, etc. for \acro{HTML}:
+% \begin{macrocode}
+\DeclareDocumentCommand{\@maketitle}{}{%
+ \maketitlehooka
+ \ifcsempty{@published}
+ {}
+ {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {\@bspretitle \@title \@bsposttitle}
+ \ifcsempty{@subtitle}
+ {}
+ {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ \maketitlehookb
+ {\@bspreauthor \@author \@bspostauthor}
+ \maketitlehookc
+ {\@bspredate \@date \@bspostdate}
+ \maketitlehookd
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macrocode}
+\providecommand{\maketitlehookaa}{}
+\providecommand{\maketitlehookaaa}{}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at titlingmaketitle}
+% \cs{maketitle} for use inside an \acro{HTML} \env{titlingpage} environment.
+% \begin{macrocode}
+\newcommand*{\LWR at titlingmaketitle}{%
+% \end{macrocode}
+% Typeset the title, etc:
+% \begin{macrocode}
+\@maketitle
+% \end{macrocode}
+% Immediately generate any |\thanks| footnotes:
+% \begin{macrocode}
+\@thanks
+}
+% \end{macrocode}
+% \end{macro}
+
+
+%
+% \begin{macro}{\thanksmarkseries} \marg{series}
+%
+% Sets the type of footnote marks used by |\thanks|,
+% where type is `arabic', `roman', `fnsymbol', etc. Modified to
+% use the \LaTeX{} \acro{PDF} minipage which is included with the title page.
+% \begin{macrocode}
+\let\LWR at origthanksmarkseries\thanksmarkseries
+\renewcommand{\thanksmarkseries}[1]{%
+\def\@mpbsmarkseries{%
+\renewcommand*{\thempfootnote}{\@nameuse{#1}{mpfootnote}}}
+\LWR at origthanksmarkseries{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+% \section{Abstract}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\abstractname}
+% User-redefinable title for the abstract.
+%
+% Also over-written by the \pkg{babel} package.
+% \begin{macrocode}
+\providecommand*{\abstractname}{Abstract}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{abstract}
+% \begin{macrocode}
+\DeclareDocumentEnvironment{abstract}{}
+{
+\BlockClass{abstract}
+\BlockClassSingle{abstracttitle}{\abstractname}
+}
+{
+\endBlockClass
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+% \section{Quote and verse}
+
+% \subsection{Citations and attributions}
+
+% \begin{macro}{\attribution}
+% for use inside quote, quotation, verse:
+
+% ex: |\attribution{author name} --- \citetitle{book name}|
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\newcommand{\attribution}[1]{%
+\InlineClass{attribution}{—\,#1}}% emdash
+\end{warpHTML}
+% \end{macrocode}
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand{\attribution}[1]{\textsc{---\,#1}}
+\end{warpprint}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\citetitle}
+% for use inside quote, quotation, verse:
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\newcommand{\citetitle}[1]{%
+\InlineClass{citetitle}{—\,#1}}% emdash
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand{\citetitle}[1]{\textsl{---\,#1}}
+\end{warpprint}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \subsection{Quotes, quotations}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \begin{environment}{quote}
+% \begin{macrocode}
+\renewenvironment*{quote}
+{\LWR at htmlblocktag{blockquote}}
+{\LWR at htmlblocktag{/blockquote}}
+
+\renewenvironment*{quotation}
+{\LWR at htmlblocktag{blockquotation}}
+{\LWR at htmlblocktag{/blockquotation}}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{Verse}
+%
+% \limitsverse
+%
+% \bigskip
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+% The following lengths may be set in either print or \acro{HTML} output,
+% but are only used in \acro{HTML}.
+% This allows the user to set \cs{vleftskip} and \cs{leftmargini} for
+% print output, and optionally select different values for \acro{HTML}.
+%
+
+% \DescribeLength{HTMLvleftskip}
+% Sets \cs{vleftskip} inside a \env{verse} environment in \acro{HTML}.
+% \begin{macrocode}
+\newlength{\HTMLvleftskip}
+\setlength{\HTMLvleftskip}{1em}
+% \end{macrocode}
+
+% \DescribeLength{HTMLleftmargini}
+% Sets \cs{leftmargini} inside a \env{verse} environment in \acro{HTML}.
+% \begin{macrocode}
+\newlength{\HTMLleftmargini}
+\setlength{\HTMLleftmargini}{4.5em}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+
+%
+%
+% \begin{environment}{verse}
+% \changes{v0.18}{2016/05/13}{Supports verse, memoir packages.}
+% The \env{verse} environment will be placed inside a \acro{HTML} |pre|.
+% \begin{macrocode}
+\AfterEndPreamble{
+% \end{macrocode}
+% At the beginning of the \env{verse} environment:
+% \begin{macrocode}
+\AtBeginEnvironment{verse}
+{%
+% \end{macrocode}
+% \DescribePackage{verse}\DescribePackage{memoir}\index{memoir>verse}
+% The \pkg{verse} or \pkg{memoir} packages can place stanza numbers to the left
+% with their \cs{flagverse} command. \DescribeMacro{\flagverse}
+% Do not allow them to go into the left margin, which would cause |pdfcrop|
+% to crop the entire page further to the left:
+% \DescribeLength{vleftskip}
+% \begin{macrocode}
+\ifdef{\vleftskip}{%
+\setlength{\vleftskip}{\HTMLvleftskip}
+\setlength{\leftmargini}{\HTMLleftmargini}
+}{}
+\LWR at atbeginverbatim{verse}
+\unskip\vspace{-\baselineskip}
+}
+% \end{macrocode}
+% After the end of the \env{verse} environment, which places the |pre| tag at the
+% regular left margin:
+% \begin{macrocode}
+\AfterEndEnvironment{verse}{
+\unskip\vspace{-\baselineskip}
+\LWR at afterendverbatim
+}
+% \end{macrocode}
+% Patch to place poemtitle inside an \acro{HTML} span of class |poemtitle|:
+% \begin{macrocode}
+\ifdef{\poemtitle}{
+\DeclareDocumentCommand{\@vstypeptitle}{m}{%
+ \vspace{\beforepoemtitleskip}%
+ {\InlineClass{poemtitle}{\poemtitlefont #1}\par}%
+ \vspace{\afterpoemtitleskip}%
+ }
+}{}
+
+}
+\end{warpHTML}
+% \end{macrocode}
+% \end{environment}
+
+
+
+
+
+
+
+
+
+% \section{Verbatim}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{environment}{verbatim}
+%
+% \changes{v0.20}{2016/12/24}{Added.}
+%
+% \begin{macrocode}
+\AfterEndPreamble{
+\AtBeginEnvironment{verbatim}{\LWR at atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}}
+\AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{Fancyvrb}
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+%
+% \DescribeLength{\VerbatimHTMLWidth} Width to use in HTML Verbatim environment.
+%
+% This width is used when placing line numbers to the right.
+% Ignored during print output.
+% \begin{macrocode}
+\newlength{\VerbatimHTMLWidth}
+\setlength{\VerbatimHTMLWidth}{4in}
+\end{warpall}
+% \end{macrocode}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \DescribeBoolean{LWR at verbtags} Used to temporarily turn off verbatim tags
+% while doing \env{VerbatimInput} in the \acro{HTML} head.
+% \begin{macrocode}
+\newbool{LWR at verbtags}
+\booltrue{LWR at verbtags}
+% \end{macrocode}
+
+
+% For \cs{VerbatimFootnotes}:
+% \begin{macrocode}
+\renewcommand{\VerbatimFootnotes}{
+\PackageError{lwarp}
+{Verbatim footnotes are not yet supported by lwarp.}
+{This may be improved when lwarp uses LaTeX footnotes instead of pagenotes.}
+}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at atbeginverbatim} \marg{class}
+%
+% Encloses a verbatim environment with the given \acro{CSS} class.
+% \begin{macrocode}
+\newcommand*{\LWR at atbeginverbatim}[1]
+{%
+% \end{macrocode}
+% Avoid excessive space between lines:
+% \begin{macrocode}
+\setlength{\parskip}{0ex}%
+% \end{macrocode}
+% Stop generating \acro{HTML} paragraph tags:
+% \begin{macrocode}
+\LWR at stoppars%
+% \end{macrocode}
+% Create a new |pre| of the given class:
+% \begin{macrocode}
+\ifbool{LWR at verbtags}{\LWR at htmltag{pre class="#1"{}}}{}%
+% \end{macrocode}
+% Use a mono-spaced font to preserve horizontal positioning.
+% If horizontal alignment is important for the user, use a mono-spaced font
+% in the \acro{CSS} for the |verse| class.
+% \begin{macrocode}
+\LWR at origttfamily%
+% \end{macrocode}
+% Do not produce \acro{HTML} tags for \cs{hspace} inside a verse |par|.
+% Restore plain \LaTeX{} \cs{hspace} functionality:
+% \begin{macrocode}
+\let\hspace\LWR at orighspace%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at afterendverbatim} Finishes enclosing a verbatim environment.
+% \begin{macrocode}
+\newcommand*{\LWR at afterendverbatim}{%
+% \end{macrocode}
+% Remove excess vertical space at the end of the |pre|:
+% \begin{macrocode}
+\unskip%
+% \end{macrocode}
+% At the end of the environment, close the |pre|:
+% \begin{macrocode}
+\ifbool{LWR at verbtags}{\noindent\LWR at htmltag{/pre}
+
+}{}%
+% \end{macrocode}
+% Resume regular paragraph handling:
+% \begin{macrocode}
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at Verbatimclass} Holds the class of the following verbatim.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at Verbatimclass}{fancyvrb}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{VerbatimClass} \marg{class} \oarg{Verbatim options}
+%
+% Creates a \env{Verbatim} enclosed in a \acro{DIV} of the given class.
+% \begin{macrocode}
+\NewDocumentEnvironment{VerbatimClass}{m O{}}
+{%
+\renewcommand*{\LWR at Verbatimclass}{#1}%
+\LWR at origVerbatim[#2]%
+}
+{\endVerbatim}
+% \end{macrocode}
+% \end{environment}
+%
+% After the preamble is loaded, after any patches to \env{Verbatim}:
+% \begin{macrocode}
+\AfterEndPreamble{
+% \end{macrocode}
+%
+% Remember the original defintion of \env{Verbatim}:
+% \begin{macrocode}
+\let\LWR at origVerbatim\Verbatim
+% \end{macrocode}
+%
+%
+% \begin{environment}{Verbatim}
+%
+% Patched to place the environment in a |fancyvrb| div,
+% and the label in a |fancyvrblabel| div.
+% Also corrects the left margin for line numbers.
+% Also uses |VerbatimHTMLWidth| to control placement of line numbers on the right.
+% Aligning the right margin requires knowing the width.
+%
+% \changes{v0.20}{2016/12/24}{Added.}
+%
+% \begin{macrocode}
+\renewcommand*{\Verbatim}{%
+\renewcommand*{\LWR at Verbatimclass}{fancyvrb}%
+\LWR at origVerbatim%
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% The following patches to \env{Verbatim} are executed at the
+% start and end of the environment, depending on the choice of |frame|.
+% Original code is from the \pkg{fancyvrb} package.
+% \begin{macrocode}
+\newcommand*{\LWR at fvstartnone}{%
+% \typeout{fvstartnone}%
+\ifbool{LWR at verbtags}{\hbox to\z@{\LWR at htmltagc{div class="\LWR at Verbatimclass"}}}{}%
+\hbox to\z@{\LWR at atbeginverbatim{verbatim}}%
+}
+
+\newcommand*{\LWR at fvendnone}{%
+% \typeout{fvendnone}%
+\hbox to\z@{\LWR at afterendverbatim}%
+\ifbool{LWR at verbtags}{\hbox to\z@{\LWR at htmltagc{/div}}}{}%
+}
+
+\newcommand*{\LWR at fvstartsingle}{%
+% \typeout{fvstartsingle}%
+\LWR at fvstartnone%
+\FV at BeginListFrame@Single%
+}
+
+\newcommand*{\LWR at fvendsingle}{%
+% \typeout{fvendsingle}%
+\FV at EndListFrame@Single%
+\LWR at fvendnone%
+}
+
+\newcommand*{\LWR at fvstartline}{%
+% \typeout{fvstartline}%
+\LWR at fvstartnone%
+\FV at BeginListFrame@Lines%
+}
+
+\newcommand*{\LWR at fvendline}{%
+% \typeout{fvendline}%
+\FV at EndListFrame@Lines%
+\LWR at fvendnone%
+}
+% \end{macrocode}
+%
+% The following patches select the start/left/right/end
+% behaviors depending on |frame|.
+% Original code is from the \pkg{fancyvrb} package.
+% \begin{macrocode}
+\def\FV at Frame@none{%
+\let\FV at BeginListFrame\LWR at fvstartnone%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendnone}
+
+\def\FV at Frame@single{%
+\let\FV at BeginListFrame\LWR at fvstartsingle%
+\let\FV at LeftListFrame\FV at LeftListFrame@Single%
+\let\FV at RightListFrame\FV at RightListFrame@Single%
+\let\FV at EndListFrame\LWR at fvendsingle}
+
+\def\FV at Frame@lines{%
+\let\FV at BeginListFrame\LWR at fvstartline%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendline}
+
+\def\FV at Frame@topline{%
+\let\FV at BeginListFrame\LWR at fvstartline%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendnone}
+
+\def\FV at Frame@bottomline{%
+\let\FV at BeginListFrame\LWR at fvstartnone%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendline}
+
+\def\FV at Frame@leftline{%
+% To define the \FV at FrameFillLine macro (from \FV at BeginListFrame)
+\ifx\FancyVerbFillColor\relax%
+\let\FV at FrameFillLine\relax%
+\else%
+\@tempdima\FV at FrameRule\relax%
+\multiply\@tempdima-\tw@%
+\edef\FV at FrameFillLine{%
+{\noexpand\FancyVerbFillColor{\vrule\@width\number\@tempdima sp}%
+\kern-\number\@tempdima sp}}%
+\fi%
+\let\FV at BeginListFrame\LWR at fvstartnone%
+\let\FV at LeftListFrame\FV at LeftListFrame@Single%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendnone}
+% \end{macrocode}
+%
+% Adds the optional label to the top and bottom edges.
+% Original code is from the \pkg{fancyvrb} package.
+% \begin{macrocode}
+\def\FV at SingleFrameLine#1{%
+ \hbox to\z@{%
+% \kern\leftmargin
+ \ifnum#1=\z@\relax
+ \let\FV at Label\FV at LabelBegin
+ \else
+ \let\FV at Label\FV at LabelEnd
+ \fi
+ \ifx\FV at Label\relax
+% \FancyVerbRuleColor{\vrule \@width\linewidth \@height\FV at FrameRule}%
+ \else
+ \ifnum#1=\z@
+% \setbox\z@\hbox{\strut\enspace\FV at LabelBegin\enspace\strut}%
+ \ifx\FV at LabelPositionTopLine\relax
+ \else
+ \LWR at htmltagc{div class="fancyvrblabel"}
+ \LWR at origtextrm{\FV at LabelBegin}% \textrm preserves emdash
+ \LWR at htmltagc{/div}
+ \fi
+ \else
+% \setbox\z@\hbox{\strut\enspace\FV at LabelEnd\enspace\strut}%
+ \ifx\FV at LabelPositionBottomLine\relax
+ \else
+ \LWR at htmltagc{div class="fancyvrblabel"}
+ \LWR at origtextrm{\FV at LabelEnd}
+ \LWR at htmltagc{/div}
+ \fi
+ \fi
+
+ \fi
+ \hss
+ }
+}
+% \end{macrocode}
+%
+% Processes each line, adding optional line numbers.
+% Original code is from the \pkg{fancyvrb} package.
+% \begin{macrocode}
+\def\FV at ListProcessLine#1{%
+ \hbox to \hsize{%
+% \kern\leftmargin
+ \hbox to \VerbatimHTMLWidth {%
+ \ifcsvoid{FV at LeftListNumber}{}{\kern 2.5em}%
+ \FV at LeftListNumber%
+% \FV at LeftListFrame
+ \FancyVerbFormatLine{#1}%
+ \hss%
+% \FV at RightListFrame
+ \FV at RightListNumber%
+}%
+ \hss% required to avoid underfull hboxes
+}
+}
+% \end{macrocode}
+
+% \begin{environment}{BVerbatim}
+% \begin{macrocode}
+\AtBeginEnvironment{BVerbatim}
+{
+\LWR at atbeginverbatim{bverbatim}
+
+}
+
+\AfterEndEnvironment{BVerbatim}
+{
+\leavevmode\par\vspace{-\baselineskip}
+\LWR at afterendverbatim
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{LVerbatim} No changes required.
+% ^^A \begin{macrocode}
+% ^^A \AtBeginEnvironment{LVerbatim}
+% ^^A {
+% ^^A \LWR at atbeginverbatim{lverbatim}
+% ^^A \unskip\vspace{-\baselineskip}
+% ^^A }
+
+% ^^A \AfterEndEnvironment{LVerbatim}
+% ^^A {
+% ^^A \unskip\vspace{-\baselineskip}
+% ^^A \LWR at afterendverbatim
+% ^^A }
+% ^^A \end{macrocode}
+% \end{environment}
+
+% End of the modifications to make at the end of the preamble:
+% \begin{macrocode}
+} % \AfterEndPreamble
+% \end{macrocode}
+
+%
+% \begin{macro}{\UseVerbatim} \marg{text}
+%
+% No changes required.
+% ^^A \begin{macrocode}
+% ^^A \let\LWR at origUseVerbatim\UseVerbatim
+% ^^A
+% ^^A \renewcommand*{\UseVerbatim}[1]{%
+% ^^A \LWR at atbeginverbatim{bverbatim}%
+% ^^A \unskip\vspace{-\baselineskip}%
+% ^^A \LWR at origUseVerbatim{#1}%
+% ^^A \unskip%
+% ^^A \LWR at afterendverbatim%
+% ^^A }
+% ^^A \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{Theorems}
+%
+% \DescribeMacro{\newtheorem} \marg{text} \oarg{counter} -or- \oarg{oldname} \marg{text}
+%
+% A few minor changes are made to supply \acro{HTML} tags.
+%
+% \begin{itemize}
+% \item The entire theorem is placed into a div of class |theorem|.
+% \item The label for each theorem is placed inside a span of class |theoremlabel|.
+% \item The contents are placed inside a div of class |theoremcontents|.
+% \end{itemize}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\@begintheorem} \marg{name} \marg{number}
+% \begin{macrocode}
+\renewcommand{\@begintheorem}[2]{%
+\LWR at htmldivclass{theorem}
+\InlineClass{theoremlabel}{#1\ #2\ }
+\LWR at htmldivclass{theoremcontents}
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@opargbegintheorem} \marg{name} \marg{number} \marg{oparg}
+% \begin{macrocode}
+\renewcommand{\@opargbegintheorem}[3]{%
+\BlockClass{theorem}
+\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }
+\BlockClass{theoremcontents}
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@endtheorem}
+% \begin{macrocode}
+\renewcommand*{\@endtheorem}{%
+\endBlockClass% theoremcontents
+\endBlockClass% theorem
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{Lists}
+%
+% \limitsbabelone
+%
+% \limitsenumitem
+%
+
+% \subsection{Itemize}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macrocode}
+\let\LWR at origitem\item
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at itemizeitem} \oarg{label}
+%
+% Handles |\item| inside an itemize or enumerate.
+%
+% See |\LWR at openparagraph| where extra |\hspace| is used to
+% leave room for the label while inside a list during paragraph construction.
+% \begin{macrocode}
+\newcommand*{\LWR at itemizeitem}{%
+\LWR at stoppars%
+\LWR at startnewdepth{\LWR at depthlistitem}{\LWR at printcloselistitem{}}%
+\LWR at htmltag{li}%
+\LWR at startpars%
+\LWR at origitem%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% To have a blank item, use |\mbox{}|.
+% This forces a new line in print output, matching the new line which
+% will appear in \acro{HTML} output.
+% Ex:
+%\begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+%\begin{itemize}
+%\item \mbox{}
+% \begin{itemize}
+% ...
+%\end{Verbatim}
+
+% \begin{environment}{itemize} \oarg{enumitem options}
+% \begin{macrocode}
+\AtBeginEnvironment{itemize}{\LWR at itemizestart}
+
+\newcommand*{\LWR at itemizestart}{%
+\LWR at stoppars%
+\LWR at pushoneclose{\LWR at depthlist}{\LWR at printcloseitemize{}}%
+\LWR at htmltag{ul style="list-style-type:none"{}}%
+\LWR at startpars%
+\let\item\LWR at itemizeitem%
+}
+
+\AtEndEnvironment{itemize}{\LWR at itemizeend}
+
+\newcommand*{\LWR at itemizeend}{%
+\LWR at stoppars%
+\LWR at closeprevious{\LWR at depthlistitem}%
+\LWR at closeoneprevious{}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{environment}
+
+
+
+% \subsection{Enumerate}
+
+% An \acro{HTML} unordered list is used with customized \LaTeX-generated labels.
+
+% \begin{environment}{enumerate} \oarg{enumitem options}
+% \begin{macrocode}
+\AtBeginEnvironment{enumerate}{\LWR at enumeratestart}
+
+\newcommand*{\LWR at enumeratestart}{%
+\LWR at stoppars%
+\LWR at pushoneclose{\LWR at depthlist}{\LWR at printcloseitemize{}}%
+\LWR at htmltag{ul style="list-style-type:none"{}}%
+\LWR at startpars%
+\let\item\LWR at itemizeitem%
+}
+
+
+\AtEndEnvironment{enumerate}{\LWR at enumerateend}
+
+\newcommand*{\LWR at enumerateend}{%
+\LWR at stoppars%
+\LWR at closeprevious{\LWR at depthlistitem}%
+\LWR at closeoneprevious{}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \subsection{Description}
+
+% \begin{macro}{\LWR at descitem} \oarg{label}
+% Handles an |\item| inside a description.
+% \begin{macrocode}
+\newcommand*{\LWR at descitem}[1][]%
+{%
+\LWR at stoppars%
+\LWR at setlatestname{#1}%
+\LWR at startnewdepth{\LWR at depthlistitem}{\LWR at printclosedescitem{}}%
+\LWR at origitem[]%
+% \end{macrocode}
+% Be sure the label doesn't print to the left of the rest of the file:
+% \begin{macrocode}
+\LWR at orighspace{1in}
+\LWR at htmltag{dt}#1\LWR at htmltag{/dt}%
+\LWR at orignewline%
+\LWR at htmltag{dd}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{environment}{description} \oarg{enumitem options}
+% \begin{macrocode}
+\AtBeginEnvironment{description}{\LWR at descriptionstart}
+
+\newcommand*{\LWR at descriptionstart}{%
+\LWR at stoppars%
+\LWR at pushoneclose{\LWR at depthlist}{\LWR at printclosedescription{}}%
+\LWR at htmltag{dl}%
+\LWR at startpars%
+\let\item\LWR at descitem%
+}
+
+\AtEndEnvironment{description}{\LWR at descriptionend}
+
+\newcommand*{\LWR at descriptionend}{%
+\LWR at stoppars%
+\LWR at closeprevious{\LWR at depthlistitem}%
+\LWR at closeoneprevious{}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{macro}{\newlist} \marg{name} \marg{type} \marg{maxdepth}
+% \begin{macro}{\renewlist} \marg{name} \marg{type} \marg{maxdepth}
+%
+% For \pkg{enumitem} lists, new lists must have the start and end actions assigned to
+% the new environment. Renewed lists already have their actions assigned, and
+% thus need no changes.
+% \begin{macrocode}
+\let\LWR at orignewlist\newlist
+
+\renewcommand*{\newlist}[3]{%
+\LWR at orignewlist{#1}{#2}{#3}%
+\AtBeginEnvironment{#1}{\csuse{LWR@#2start}}%
+\AtEndEnvironment{#1}{\csuse{LWR@#2end}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+% \section{Tabular}
+%
+% This is arguably the most complicated part of the entire package.
+% Numerous tricks are employed to handle the syntax which is involved.
+%
+% Limitations:
+% \limitstabular
+%
+% \changes{v0.20}{2017/01/07}{Added @, \protect\textless, \protect\textgreater\ columns.}
+% \changes{v0.20}{2017/01/17}{Tabular: \cs{unskip} extra spaces.}
+%
+% \subsection{Token lookahead}
+
+% Used by |\LWR at futurenonspacelet| to look at the next token.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at mynexttoken}
+% \begin{macrocode}
+\newcommand\LWR at mynexttoken\relax
+% \end{macrocode}
+% \end{macro}
+
+% |\futurelet| copies the next token then executes a function to analyze
+
+% |\LWR at futurenonspacelet| does the same, but ignores intervening white space
+
+% Based on the \pkg{booktabs} style:
+
+% \begin{macro}{\LWR at futurenonspacelet}
+% \begin{macrocode}
+\def\LWR at futurenonspacelet#1{\def\LWR at cs{#1}%
+\afterassignment\LWR at fnslone\let\nexttoken= }
+\def\LWR at fnslone{\expandafter\futurelet\LWR at cs\LWR at fnsltwo}
+\def\LWR at fnsltwo{%
+\expandafter\ifx\LWR at cs\@sptoken\let\next=\@BTfnslthree%
+\else\let\next=\nexttoken\fi\next}
+\def\@BTfnslthree{\afterassignment\LWR at fnslone\let\next= }
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at getmynexttoken}
+% Looks ahead and copies the next token into |\LWR at mynexttoken|.
+% \begin{macrocode}
+\newcommand*{\LWR at getmynexttoken}{%
+% nothing must follow this next line
+\LWR at futurenonspacelet\LWR at mynexttoken\LWR at tabledatacolumntag
+}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Booleans}
+
+% \DescribeBoolean{LWR at startedrow}
+% True if should print a row tag before this column.
+% \begin{macrocode}
+\newbool{LWR at startedrow}
+\boolfalse{LWR at startedrow}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR at doinghline}
+% True if the next row will have an hline above it.
+% \begin{macrocode}
+\newbool{LWR at doinghline}
+\boolfalse{LWR at doinghline}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR at doingtbrule}
+% True if the next row will have a top/bottom rule above it.
+% \begin{macrocode}
+\newbool{LWR at doingtbrule}
+\boolfalse{LWR at doingtbrule}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR at tableparcell}
+% True if are handling a paragraph inside a table cell,
+% so must close the paragraph tag before moving on.
+% \begin{macrocode}
+\newbool{LWR at tableparcell}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR at skippingmrowcell}
+% True if are doing an empty multi-row cell,
+% and thus there is no data tag to close.
+% \begin{macrocode}
+\newbool{LWR at skippingmrowcell}
+% \end{macrocode}
+
+
+% \DescribeBoolean{LWR at intabularmetadata}
+% True if are in a tabular but not in a data cell.
+% Used to prevent extra \acro{HTML} breaks if not inside table data.
+% \begin{macrocode}
+\newbool{LWR at intabularmetadata}
+\boolfalse{LWR at intabularmetadata}
+% \end{macrocode}
+
+
+
+% \subsection{Handling \&}
+%
+% \begin{minipage}{\linewidth}
+% For technical discussion regarding problems redefining |\&|, See: \\
+% \href{http://tex.stackexchange.com/questions/11638/where-do-i-find-futurelets-nasty-behaviour-documented/11860#11860}
+% {http://tex.stackexchange.com/questions/11638/ \\ \hspace*{.25in} where-do-i-find-futurelets-nasty-behaviour-documented/11860\#11860}
+% \end{minipage}
+%
+
+% \begin{macro}{\LWR at closetabledatacell}
+% If |LWR at skippingmrowcell| then there is no data tag to close.
+% Otherwise, close any paragraphs, then close the data tag.
+% \begin{macrocode}
+\newcommand*{\LWR at closetabledatacell}{%
+\global\booltrue{LWR at intabularmetadata}%
+\ifbool{LWR at exitingtabular}{}%
+{% not exiting tabular
+\ifbool{LWR at skippingmrowcell}{}%
+{% not skippingmrowcell
+% \end{macrocode}
+% Insert any |<| then any |@| column contents:
+% \begin{macrocode}
+\unskip%
+\LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}%
+\LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
+% \end{macrocode}
+% Close paragraphs:
+% \begin{macrocode}
+\ifbool{LWR at tableparcell}{\LWR at stoppars}{}%
+\global\boolfalse{LWR at tableparcell}%
+% \end{macrocode}
+% Close the table data cell:
+% \begin{macrocode}
+\unskip\LWR at htmltag{/td}\LWR at orignewline%
+}% not skipping mrowcell
+}% not exiting tabular
+\global\boolfalse{LWR at skippingmrowcell}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% |LWR at tabulardepth| tracks whether |&| is being used inside a \env{tabular}.
+% \begin{macrocode}
+\newcounter{LWR at tabulardepth}
+\setcounter{LWR at tabulardepth}{0}
+
+% \end{macrocode}
+% When not used inside a \env{tabular}, |&| performs its original
+% function as recorded here ( with catcode 4 ).
+% \begin{macrocode}
+\def\LWR at origampmacro{&}
+% \end{macrocode}
+% See below for why the group is used.
+% \begin{macrocode}
+\begingroup
+% \end{macrocode}
+%
+% \changes{v0.15}{2016/03/31}{Ampersand (\&): Fixed handling when passed as an argument.}
+%
+% \begin{macro}{&} Will behave depending on whether it is being used inside \env{tabular}.
+%
+% |&| is redefined to test whether it is inside a tabular environment,
+% in which case it performs special processing for \acro{HTML} conversion.
+% If not, it behaves normally.
+%
+% The |\catcode| allows the |&| character to be redefined.
+% \begin{macrocode}
+\catcode`\&=\active
+
+\gdef&{%
+\ifthenelse{\cnttest{\value{LWR at tabulardepth}}{>}{0}}%
+{%
+% \end{macrocode}
+% If not skipping a multirow cell, close the current data cell.
+% \begin{macrocode}
+\unskip%
+\LWR at closetabledatacell%
+% \end{macrocode}
+% Move to the next column.
+% \begin{macrocode}
+\addtocounter{LWR at tablecolspos}{1}%
+% \end{macrocode}
+% Look at the next token to decide multi or single column data tag.
+% \begin{macrocode}
+\LWR at getmynexttoken%
+}%
+% \end{macrocode}
+% If not inside a tabular, performs the original action:
+% \begin{macrocode}
+{\LWR at origampmacro}%
+}
+\endgroup
+% \end{macrocode}
+% Outside the group, |&| is left its original catcode for now.
+%
+% \pkg{tikz} package seems to require |&| be left alone until after
+% \pkg{tikz} has been loaded.
+%
+% \cs{LWR at lwarpStart} finally makes |&| active at the beginning of the
+% \acro{HTML} conversion.
+% \end{macro}
+%
+
+
+% \subsection{Handling \protect\textbackslash\protect\textbackslash}
+
+% Inside tabular, |\\| is redefined to |\LWR at tabularendofline|
+%
+% Throws away options |\\[dim]| or |\\*|
+%
+% \begin{macro}{\LWR at tabularendofline}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at tabularendofline}{s o}
+{%
+\LWR at closetabledatacell%
+% \end{macrocode}
+% Finish the previous row:
+% \begin{macrocode}
+\LWR at htmltag{/tr}\LWR at orignewline
+\global\booltrue{LWR at intabularmetadata}
+% \end{macrocode}
+% Not yet started a table row:
+% \begin{macrocode}
+\global\boolfalse{LWR at startedrow}
+% \end{macrocode}
+% Additional setup:
+% \begin{macrocode}
+\global\boolfalse{LWR at doinghline}%
+\global\boolfalse{LWR at doingtbrule}%
+\LWR at clearmidrules%
+% \end{macrocode}
+% Start at first column:
+% \begin{macrocode}
+\setcounter{LWR at tablecolspos}{1}
+% \end{macrocode}
+% Look at the next token to decide between single column data tag
+% or a special case:
+% \begin{macrocode}
+\LWR at getmynexttoken%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Variables}
+
+% \begin{macrocode}
+\newcommand*{\LWR at colsresult}{}%temp storage for column format results
+\newcommand*{\LWR at pposition}{}
+\newcommand*{\LWR at pleft}{}
+\newcommand*{\LWR at pright}{}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at tablecolspec} Holds the parsed column specification,
+% of total width |LWR at tabletotalcols|.
+%
+% Will contain a string such as |llrrccpc|, exactly one letter per column,
+% without |@|, |>|, |<|, or the vertical pipe.
+% \begin{macrocode}
+\newcommand*{\LWR at tablecolspec}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at strresult} Holds the result of |Str| functions.
+% \begin{macrocode}
+\newcommand*{\LWR at strresult}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at origcolspec} Holds the original column specs given to \env{tabular}.
+% \begin{macrocode}
+\newcommand*{\LWR at origcolspec}{}
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeCounter{LWR at tablecolswidth}
+% Holds the width of the table specification.
+%
+% (This is not the total \# columns.)
+% \begin{macrocode}
+\newcounter{LWR at tablecolswidth}
+% \end{macrocode}
+
+
+% \DescribeCounter{LWR at tablecolspos}
+% Where are currently looking into the table column specification.
+% \begin{macrocode}
+\newcounter{LWR at tablecolspos}
+% \end{macrocode}
+
+% \DescribeCounter{LWR at tabletotalcols}
+% Holds the final number of table columns.
+% \begin{macrocode}
+\newcounter{LWR at tabletotalcols}
+% \end{macrocode}
+
+% \DescribeCounter{LWR at tabletotalcolsnext}
+% Holds the next column while parsing.
+% Is one more than |LWR at tabletotalcols|.
+% \begin{macrocode}
+\newcounter{LWR at tabletotalcolsnext}
+% \end{macrocode}
+
+% \DescribeObject{LWR at colatspec}A data array of specifications for |@| columns.
+% The leftmost's index is |leftedge|, the others are counter values.
+% See \cref{sec:dataarray}.
+%
+% \DescribeObject{LWR at colbeforespec}A data array of specifications for |>| columns.
+%
+% \DescribeObject{LWR at colafterspec}A data array of specifications for |<| columns.
+
+
+
+% \subsection{Parsing @, >, <, ! columns}
+%
+% \begin{macro}{\LWR at parseatcolumn}
+%
+% Handles |@{text}| columns.
+%
+%
+% \begin{macrocode}
+\newcommand*{\LWR at parseatcolumn}{%
+% \end{macrocode}
+% Move to the next token after the '@':
+% \begin{macrocode}
+\LWR at traceinfo{at column}%
+\addtocounter{LWR at tablecolspos}{1}%
+% \end{macrocode}
+% Read the next token into \cs{LWR at strresult}, expanding once:
+% \begin{macrocode}
+\LWR at traceinfo{about to read the next token:}%
+\expandarg%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]
+\fullexpandarg%
+% \end{macrocode}
+% Store the result into a data array, expanding once out of \cs{LWR at strresult}:
+% \begin{macrocode}
+\LWR at traceinfo{have now read the next token}%
+\ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}
+{% left edge of the table:
+\LWR at traceinfo{at the left edge}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{\LWR at strresult}%
+\LWR at traceinfo{finished with the def}%
+}%
+{% not at the left edge:
+\LWR at traceinfo{not at the left edge}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
+\LWR at traceinfo{at \theLWR at tabletotalcols: \LWR at colatspec(\theLWR at tabletotalcols)!}%
+}%
+\let\LWR at strresult\relax%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at parsebeforecolumn}
+%
+% Handles |>{text}| columns.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at parsebeforecolumn}{%
+% \end{macrocode}
+% Move to the next token after the '>':
+% \begin{macrocode}
+\addtocounter{LWR at tablecolspos}{1}%
+% \end{macrocode}
+% Read the next token, expanding once into \cs{LWR at strresult}:
+% \begin{macrocode}
+\expandarg%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\fullexpandarg%
+% \end{macrocode}
+% Store the result into a data array, expanding once out of \cs{LWR at strresult}:
+% \begin{macrocode}
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\LWR at strresult}%
+\let\LWR at strresult\relax%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at parseaftercolumn}
+%
+% Handles |<{text}| columns.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at parseaftercolumn}{%
+% \end{macrocode}
+% Move to the next token after the '<':
+% \begin{macrocode}
+\addtocounter{LWR at tablecolspos}{1}%
+% \end{macrocode}
+% Read the next token, expanding once into \cs{LWR at strresult}:
+% \begin{macrocode}
+% \StrChar{#1}{\theLWR at tablecolspos}[\LWR at strresult]
+\expandarg%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\fullexpandarg%
+% \end{macrocode}
+% Store the result into a data array, expanding once out of \cs{LWR at strresult}:
+% \begin{macrocode}
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
+\let\LWR at strresult\relax%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at parseskipcolumn}
+%
+% Handles columns to skip, such as !.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at parseskipcolumn}{%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Parsing `l', `c', or `r' columns}
+%
+% \begin{macro}{\LWR at parsenormalcolumn} \marg{thiscolumn}
+%
+% Add to the accumulated column specs, advance counters,
+% and pre-clear another column of at, before, and after specs.
+% \begin{macrocode}
+\newcommand*{\LWR at parsenormalcolumn}[1]{%
+\appto\LWR at tablecolspec{#1}%
+\addtocounter{LWR at tabletotalcols}{1}%
+\addtocounter{LWR at tabletotalcolsnext}{1}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcolsnext}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{\relax}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{Parsing `p', `m', or `b' columns}
+
+% \begin{macro}{\LWR at parsepcolumn} \marg{thiscolumn}
+% the width will be ignored
+% \begin{macrocode}
+\newcommand*{\LWR at parsepcolumn}[1]{%
+% \end{macrocode}
+% converts to the given column type
+% \begin{macrocode}
+\LWR at parsenormalcolumn{#1}%
+% \end{macrocode}
+% skips the following width
+% \begin{macrocode}
+\addtocounter{LWR at tablecolspos}{1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Parsing the column specifications}
+
+% \acro{HTML} \acro{CSS} cannot exactly match the \LaTeX{} concept of a baseline for
+% a table row.
+% \watchout
+% \Cref{tab:baseline} shows the \LaTeX{} results for various
+% vertical-alignment choices, with the baseline of the first column drawn across
+% all the columns for comparison.
+% See the |p| column specification in \cref{tab:columnconversions} for details.
+%
+% \begin{table}
+% \caption{Tabular baseline\label{tab:baseline}}
+% \index{tabular>baseline}\index{baseline>tabular}
+% \centering
+% \smallskip
+% \begin{tabular}{lp{.25in}m{.25in}b{.25in}r}
+% \toprule
+% l & p & m & b & r \\
+% \midrule
+% l \rule{1.65in}{.4pt} \hspace{-1.4in} &
+% par \newline par \newline par &
+% mid \newline mid \newline mid &
+% bot \newline bot \newline bot &
+% r \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% \Cref{tab:columnconversions} describes how each kind of column is
+% converted to \acro{HTML}.
+%
+% \begin{table}
+% \caption{Tabular \acro{HTML} column conversions\label{tab:columnconversions}}
+% \index{tabular>HTML colummn conversion}
+% \index{HTML>tabular column conversion}
+%
+% \medskip
+%
+% \hrule
+% \begin{description}[parsep=.5ex]
+% \item [l, r, c:] Converted to table cells without paragraph tags. \\
+% Uses \acro{CSS} |vertical-align:middle| so that top or bottom-aligned cells may go above or below this cell.
+% \item [p:] Converted to table cells with paragraph tags.
+% Ref: \Cref{tab:baseline},
+% \LaTeX{} places the top line of a parbox
+% aligned with the rest of the text line, so \acro{CSS} |vertical-align:bottom| is used to
+% have the \acro{HTML} result appear with the paragraph extending below the L, R, C cells at the middle, if possible.
+% This may be confusing as a P cell may not top-align with an L,R,C cell in the \acro{HTML}
+% conversion, especially in the presence of a B cell, and two P cells side-by-side will
+% be aligned at the bottom instead of the top.
+% Some adjustment of the \acro{CSS} may be desired, changing
+% |td.tdp|, |td.tdP|, |td.tdprule|, and |td.tdPrule| to |vertical-align: middle|.
+% Another possibility is to change L,R,C, and P to |vertical-align: top| and not worry
+% about the alignment of B and M cells or trying to approximate \LaTeX{} baselines.
+% \item [m:] With paragraph tags, \acro{CSS} |vertical-align:middle|.
+% \item [b:] With paragraph tags, \acro{CSS} |vertical-align:top| so that the bottom of the
+% text is closest to the middle of the text line.
+% \item [P, M, B:] Horizontally-centered versions,
+% \item [S:] Converted to 'r'. From the \pkg{siunitx} package.
+% \item [@, \textgreater{}, \textless{}:] Ignored so far.
+% \end{description}
+% \hrule
+% \end{table}
+%
+%
+% \begin{macro}{\LWR at parsetablecols} \marg{colspecs}
+%
+% Scans the column specification left to right.
+%
+% Builds \cs{LWR at tablecolspec} with the final specification,
+% one column per entry. The number of final columns is
+% stored in |LWR at tabletotalcols|.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at parsetablecols}[1]{%
+\LWR at traceinfo{LWR at parsetablecols started}%
+% \end{macrocode}
+% Remember the original supplied column spec:
+% \begin{macrocode}
+\renewcommand*{\LWR at origcolspec}{#1}%
+% \end{macrocode}
+% Clear the parsed resulting column spec:
+% \begin{macrocode}
+\renewcommand*{\LWR at tablecolspec}{}%
+% \end{macrocode}
+% Total number of columns found so far.
+% Also pre-initialize the first several columns of specs:
+% \begin{macrocode}
+\setcounter{LWR at tabletotalcols}{0}%
+\setcounter{LWR at tabletotalcolsnext}{1}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{\relax}%
+\LWR at setexparray{LWR at colatspec}{1}{\relax}%
+\LWR at setexparray{LWR at colatspec}{2}{\relax}%
+\LWR at setexparray{LWR at colatspec}{3}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{1}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{2}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{3}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{1}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{2}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{3}{\relax}%
+% \end{macrocode}
+% Starting at the first column specification:
+% \begin{macrocode}
+\setcounter{LWR at tablecolspos}{1}%
+% \end{macrocode}
+% Place the colspecs string length into \cs{LWR at strresult},
+% and remember the number of characters in the column specification:
+% \begin{macrocode}
+\LWR at traceinfo{about to StrLen}%
+\noexpandarg%
+\StrLen{#1}[\LWR at strresult]%
+\fullexpandarg%
+\LWR at traceinfo{finished StrLen}%
+\setcounter{LWR at tablecolswidth}{\LWR at strresult}%
+% \end{macrocode}
+% Scan through the column specifications:
+% \begin{macrocode}
+\whiledo{\not\value{LWR at tablecolspos}>\value{LWR at tablecolswidth}}{%
+% \end{macrocode}
+% Place the next single-character column type into \cs{LWR at strresult}:
+% \begin{macrocode}
+\noexpandarg%
+\StrChar{#1}{\theLWR at tablecolspos}[\LWR at strresult]%
+\fullexpandarg%
+% \end{macrocode}
+% Note that the parameter for a |p{spec}| column is a token list which will NOT match l,c,r,p.
+% \watchout
+% \begin{macrocode}
+\IfStrEq{\LWR at strresult}{l}{\LWR at parsenormalcolumn{l}}{}%
+\IfStrEq{\LWR at strresult}{c}{\LWR at parsenormalcolumn{c}}{}%
+\IfStrEq{\LWR at strresult}{r}{\LWR at parsenormalcolumn{r}}{}%
+\IfStrEq{\LWR at strresult}{S}{\LWR at parsenormalcolumn{r}}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{@}}{\LWR at parseatcolumn}{}%
+\IfStrEq{\LWR at strresult}{>}{\LWR at parsebeforecolumn}{}%
+\IfStrEq{\LWR at strresult}{<}{\LWR at parseaftercolumn}{}%
+\IfStrEq{\LWR at strresult}{!}{\LWR at parseskipcolumn}{}%
+\IfStrEq{\LWR at strresult}{p}{\LWR at parsepcolumn{p}}{}%
+\IfStrEq{\LWR at strresult}{m}{\LWR at parsepcolumn{m}}{}%
+\IfStrEq{\LWR at strresult}{b}{\LWR at parsepcolumn{b}}{}%
+% \end{macrocode}
+% \begin{docsidebar}
+% Many people define centered versions ``|P|'', ``|M|'', and ``|B|'': \\
+% \hspace*{1em}|\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}|
+% \end{docsidebar}
+% \begin{macrocode}
+\IfStrEq{\LWR at strresult}{P}{\LWR at parsepcolumn{P}}{}%
+\IfStrEq{\LWR at strresult}{M}{\LWR at parsepcolumn{M}}{}%
+\IfStrEq{\LWR at strresult}{B}{\LWR at parsepcolumn{B}}{}%
+\addtocounter{LWR at tablecolspos}{1}%
+}%
+}%
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Starting a new row}
+
+% \begin{macro}{\LWR at maybenewtablerow}
+%
+% If have not yet started a new table row, begin one now.
+% Creates a new row tag, adding a class for |hline| or |tbrule| if
+% necessary.
+% \begin{macrocode}
+\newcommand*{\LWR at maybenewtablerow}
+{%
+\ifbool{LWR at startedrow}%
+{}% started the row
+{% not started the row
+% \end{macrocode}
+% Remember that now have started the row:
+% \begin{macrocode}
+\global\booltrue{LWR at startedrow}%
+% \end{macrocode}
+% Create the row tag, with a class if necessary.
+% \begin{macrocode}
+\global\booltrue{LWR at intabularmetadata}%
+\ifbool{LWR at doinghline}%
+{\LWR at htmltag{tr class="hline"{}}\LWR at orignewline}%
+{% not doing hline
+\ifbool{LWR at doingtbrule}%
+{\LWR at htmltag{tr class="tbrule"{}}\LWR at orignewline}%
+{\LWR at htmltag{tr}\LWR at orignewline}%
+}% end of not doing hline
+}% end of not started the row
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \subsection{Data opening tag}
+
+% \begin{macro}{\LWR at tabledatasinglecolumntag}
+% Print a table data opening tag with style for alignment
+% \begin{macrocode}
+\newcommand*{\LWR at tabledatasinglecolumntag}%
+{%
+\LWR at maybenewtablerow%
+% \end{macrocode}
+% If have found the end of tabular command, do not create the next data cell:
+% \begin{macrocode}
+\ifbool{LWR at exitingtabular}{}%
+{% not exiting tabular
+% \end{macrocode}
+% Fetch the current column's alignment character into |\LWR at strresult|:
+% \begin{macrocode}
+\StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+% \end{macrocode}
+% print the start of a new table data cell:
+% \begin{macrocode}
+\LWR at htmltag{td class="td%
+% \end{macrocode}
+% append this column's spec:
+% \begin{macrocode}
+\LWR at strresult%
+% \end{macrocode}
+% If this column has a cmidrule, add ``rule'' to the end of the \acro{HTML} class tag:
+% \begin{macrocode}
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"{}}%
+% \end{macrocode}
+% If this is a p, m, or b column, allow paragraphs:
+% \begin{macrocode}
+\ifthenelse{%
+\equal{\LWR at strresult}{p}\OR%
+\equal{\LWR at strresult}{m}\OR%
+\equal{\LWR at strresult}{b}\OR%
+\equal{\LWR at strresult}{P}\OR%
+\equal{\LWR at strresult}{M}\OR%
+\equal{\LWR at strresult}{B}%
+}%
+{% allow pars
+\LWR at startpars%
+\global\booltrue{LWR at tableparcell}%
+}% allow pars
+{}% no pars
+% \end{macrocode}
+% Print the |@| contents before first column,
+% and then the |>| contents:
+% \begin{macrocode}
+\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
+{\LWR at getexparray{LWR at colatspec}{leftedge}}% left edge
+{}% not left edge
+\LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
+\global\boolfalse{LWR at intabularmetadata}%
+}% not exiting tabular
+}%
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Midrules}
+%
+% \DescribeObject{LWR at midrules}|LWR at midrules| is a data array
+% (\cref{sec:dataarray}) of columns containing
+% |Y| if a midrule should be created for each column.
+
+
+% \DescribeCounter{LWR at midrulecounter}
+% Indexes across the |LWR at midrules| data array.
+% \begin{macrocode}
+\newcounter{LWR at midrulecounter}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at clearmidrules}
+% Start new midrules. Called at beginning of tabular and also at |\\|.
+%
+% Clears all |LWR at midrules| markers for this line.
+% \begin{macrocode}
+\newcommand*{\LWR at clearmidrules}
+{%
+\setcounter{LWR at midrulecounter}{1}%
+\whiledo{%
+\cnttest{\value{LWR at midrulecounter}}{<=}{\value{LWR at tablecolswidth}}%
+}%
+{%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{\relax}%
+\addtocounter{LWR at midrulecounter}{1}%
+}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at subcmidrule} \oarg{width} \marg{trim} \marg{leftcolumn} \marg{rightcolumn}
+%
+% Marks |LWR at midrules| data array elements to be ``Y'' from left to right columns.
+% \begin{macrocode}
+\newcommand*{\LWR at subcmidrule}[4]{%
+\setcounter{LWR at midrulecounter}{#3}%
+\whiledo{\cnttest{\value{LWR at midrulecounter}}{<=}{#4}}%
+{%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{Y}%
+\addtocounter{LWR at midrulecounter}{1}%
+}% end of the whiledo
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at docmidrule} \oarg{width} \marg{trim} \marg{leftcolumn-rightcolumn}
+%
+% Marks |LWR at midrules}| array elements to be ``Y'' from left to right columns.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at docmidrule}{o d() >{\SplitArgument{1}{-}}m}%
+{\LWR at subcmidrule{#1}{#2}#3}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+
+% \subsection{Multicolumns}
+
+% \subsubsection{Parsing multicolumns}
+
+% \begin{macrocode}
+\newcounter{LWR at tablemulticolswidth}
+\newcounter{LWR at tablemulticolspos}
+% \end{macrocode}
+
+
+
+% \begin{macro}{\LWR at printmccoltype} \marg{colspec}
+% Print any valid column type found. Does not print |@|, |>|, or |<| columns
+% or their associated tokens.
+% \begin{macrocode}
+\newcommand*{\LWR at printmccoltype}[1]{%
+\LWR at traceinfo{lwr at printmccoltype -#1-}%
+% \end{macrocode}
+% Get one token of the column spec:
+% \begin{macrocode}
+\StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+% \end{macrocode}
+% Add to the \acro{HTML} tag depending on which column type is found:
+% \begin{macrocode}
+\IfStrEq{\LWR at strresult}{l}{l}{}%
+\IfStrEq{\LWR at strresult}{c}{c}{}%
+\IfStrEq{\LWR at strresult}{r}{r}{}%
+\IfStrEq{\LWR at strresult}{p}{p}{}%
+\IfStrEq{\LWR at strresult}{m}{m}{}%
+\IfStrEq{\LWR at strresult}{b}{b}{}%
+\IfStrEq{\LWR at strresult}{P}{P}{}%
+\IfStrEq{\LWR at strresult}{M}{M}{}%
+\IfStrEq{\LWR at strresult}{B}{B}{}%
+\IfStrEq{\LWR at strresult}{S}{r}{}%
+\LWR at traceinfo{lwr at printmccoltype done}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at multicolpartext}
+% Print the data with paragraph tags:
+% \begin{macrocode}
+\newcommand*{\LWR at multicolpartext}{%
+\LWR at startpars%
+\LWR at multicoltext%
+\LWR at stoppars%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at multicolother} \marg{colspec}
+% For |@|, |>|, |<|, print the next token without paragraph tags:
+% \begin{macrocode}
+\newcommand*{\LWR at multicolother}[1]{%
+\addtocounter{LWR at tablemulticolspos}{1}%
+\StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+\LWR at strresult%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at printmccoldata} \marg{colspec}
+% Print the data for any valid column type found.
+% \begin{macrocode}
+\newcommand*{\LWR at printmccoldata}[1]{%
+\LWR at traceinfo{lwr at printmccoldata -#1}%
+% \end{macrocode}
+% Get one token of the column spec:
+% \begin{macrocode}
+\StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+% \end{macrocode}
+% Print the text depending on which column type is found.
+% Also handles |@|, |>|, |<| as it comes to them.
+% \begin{macrocode}
+\IfStrEq{\LWR at strresult}{l}{\LWR at multicoltext}{}%
+\IfStrEq{\LWR at strresult}{c}{\LWR at multicoltext}{}%
+\IfStrEq{\LWR at strresult}{r}{\LWR at multicoltext}{}%
+\IfStrEq{\LWR at strresult}{p}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{m}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{b}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{P}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{M}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{B}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{S}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{@}}{\LWR at multicolother{#1}}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{>}}{\LWR at multicolother{#1}}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{<}}{\LWR at multicolother{#1}}{}%
+% \addtocounter{LWR at tablemulticolspos}{1}%
+% \StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+% \LWR at strresult%
+% }{}%
+\LWR at traceinfo{lwr at printmccoldata done}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macro}{\parsemulticolumnalignment}
+% \marg{1: colspec} \marg{2: printresults}
+%
+% Scan the multicolumn specification and execute the printfunction
+% for each entry.
+%
+% Note that the spec for a |p{spec}| column, or |@|, |>|, |<|, is a token list
+% which will NOT match |l|, |c|, |r|, or |p|.
+% \begin{macrocode}
+\newcommand*{\LWR at parsemulticolumnalignment}[2]{%
+\setcounter{LWR at tablemulticolspos}{1}%
+\StrLen{#1}[\LWR at strresult]%
+\setcounter{LWR at tablemulticolswidth}{\LWR at strresult}%
+% \end{macrocode}
+% Scan across the tokens in the column spec:
+% \begin{macrocode}
+\whiledo{%
+\not\value{LWR at tablemulticolspos}>\value{LWR at tablemulticolswidth}%
+}%
+{%
+% \end{macrocode}
+% Execute the assigned print function for each token in the column spec:
+% \begin{macrocode}
+#2{#1}%
+% \end{macrocode}
+% Move to the next token in the column spec:
+% \begin{macrocode}
+\addtocounter{LWR at tablemulticolspos}{1}%
+}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsubsection{High-level multicolumn interface}
+
+% \begin{macro}{\LWR at domulticolumn} \marg{1: numcols} \marg{2: colspec} \marg{3: text}
+%
+% \begin{macrocode}
+\newcommand{\LWR at multicoltext}{}
+
+\NewDocumentCommand{\LWR at domulticolumn}{m m +m}{%
+\LWR at traceinfo{lwr at domulticolumn -#1- -#2-}%
+\renewcommand{\LWR at multicoltext}{#3}%
+\LWR at maybenewtablerow%
+% \end{macrocode}
+% Begin the opening table data tag:
+% \begin{macrocode}
+\LWR at htmltag{td colspan="#1"
+ class="td%
+% \end{macrocode}
+% Print the column type:
+% \begin{macrocode}
+\LWR at parsemulticolumnalignment{#2}{\LWR at printmccoltype}%
+% \end{macrocode}
+% If this column has a cmidrule, add ``rule'' to the end of the \acro{HTML} class tag.
+%
+% If this position had a ``Y'' then add ``rule''.
+% \begin{macrocode}
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+% \end{macrocode}
+% Close the class tag's opening quote:
+% \begin{macrocode}
+"%
+}% end of the opening table data tag
+\global\boolfalse{LWR at intabularmetadata}%
+\LWR at parsemulticolumnalignment{#2}{\LWR at printmccoldata}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsubsection{Longtable captions}
+
+% \DescribeBoolean{LWR at starredlongtable}
+% Per the \pkg{caption} pacakge, step the counter if |longtable*|.
+%
+% \begin{macrocode}
+\newbool{LWR at starredlongtable}
+\boolfalse{LWR at starredlongtable}
+% \end{macrocode}
+%
+%
+% Per the \pkg{caption} package. User-redefinable float type.
+% \begin{macrocode}
+\providecommand*{\LTcaptype}{table}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\LWR at longtabledatacaptiontag} * \oarg{toc entry} \marg{caption}
+%
+% \changes{v0.20}{2017/01/08}{Fix: Pars in captions.}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at longtabledatacaptiontag}{s o +m}
+{%
+% \end{macrocode}
+% Remember the latest name for \cs{nameref}:
+% \begin{macrocode}
+\IfValueTF{#2}{% optional given?
+\ifthenelse{\equal{#2}{}}% optional empty?
+{\LWR at setlatestname{#3}}% empty
+{\LWR at setlatestname{#2}}% given and non-empty
+}% optional given
+{\LWR at setlatestname{#3}}% no optional
+% \end{macrocode}
+% create a multicolumn across all the columns
+% \begin{macrocode}
+\LWR at domulticolumn{\theLWR at tabletotalcols}{P}{% \LWR at domulticolumn
+% \IfBooleanTF{#1}% star?
+% {\IfValueTF{#2}{\LWR at origcaption*[#2]{#3}}{\LWR at origcaption*{#3}}}
+% {\IfValueTF{#2}{\LWR at origcaption[#2]{#3}}{\LWR at origcaption{#3}}}
+\IfBooleanTF{#1}% star?
+% \end{macrocode}
+% Star version, show a caption but do not make a LOT entry:
+% \begin{macrocode}
+{% yes star
+\LWR at htmlblocktag{figcaption}%
+#3%
+\LWR at htmlblocktag{/figcaption}%
+}%
+{% No star:
+% \end{macrocode}
+% Not the star version:
+%
+% Don't step the counter if |\caption[]{A caption.}|
+% \begin{macrocode}
+\ifbool{LWR at starredlongtable}%
+{%
+\ifthenelse{\equal{#2}{}}% TOC entry
+{}%
+{%
+\refstepcounter{\LTcaptype}%
+\protected at edef\@currentlabel{%
+\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+}%
+}{}%
+% \end{macrocode}
+% Create an \acro{HTML} caption. Afterwards, maybe make a LOT entry.
+% \begin{macrocode}
+\LWR at htmlblocktag{figcaption}%
+\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
+\LWR at htmlblocktag{/figcaption}%
+% \end{macrocode}
+% See if an optional caption was given:
+% \begin{macrocode}
+\ifthenelse{\equal{#2}{}}% TOC entry empty
+% \end{macrocode}
+% if the optional caption was given, but empty, do not form a TOC entry
+% \begin{macrocode}
+{}%
+% \end{macrocode}
+% If the optional caption was given, but might only be |[]|:
+% \begin{macrocode}
+{% TOC entry not empty
+\IfNoValueTF{#2}% No TOC entry?
+% \end{macrocode}
+% The optional caption is |[]|:
+% \begin{macrocode}
+{% No TOC entry
+\addcontentsline%
+{\csuse{ext@\LTcaptype}}%
+{\LTcaptype}%
+{%
+\protect\numberline%
+{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+{\ignorespaces #3\protect\relax}%
+}%
+}% end of No TOC entry
+% \end{macrocode}
+% The optional caption has text enclosed:
+% \begin{macrocode}
+{% yes TOC entry
+\addcontentsline%
+{\csuse{ext@\LTcaptype}}%
+{\LTcaptype}%
+{%
+\protect\numberline%
+{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+{\ignorespaces #2\protect\relax}%
+}%
+}% end of yes TOC entry
+}% end of TOC entry not empty
+}% end of no star
+}% end of \LWR at domulticolumn
+
+\addtocounter{LWR at tablecolspos}{\theLWR at tabletotalcols}
+\addtocounter{LWR at tablecolspos}{-1}
+
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \subsubsection{\textbackslash{}tabledatamulticolumntag}
+
+% \begin{macro}{\LWR at tabledatamulticolumntag} \marg{numcols} \marg{alignment} \marg{text}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at tabledatamulticolumntag}{m m +m}%
+{%
+\LWR at domulticolumn{#1}{#2}{#3}%
+\addtocounter{LWR at tablecolspos}{#1}%
+\addtocounter{LWR at tablecolspos}{-1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \subsection{Multirow}
+
+% \DescribePackage{multirow}
+
+
+
+% \begin{macro}{\LWR at tabledatamultirowtag}
+% \marg{numrows} \oarg{bigstruts} \marg{width} \oarg{fixup} \marg{text}
+% \changes{v0.19}{2015/05/28}{Added optional args.}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at tabledatamultirowtag}{m o m o m}%
+{%
+\LWR at maybenewtablerow%
+% \end{macrocode}
+% Print the start of a new table data cell:
+% \begin{macrocode}
+\LWR at htmltag{td rowspan="#1" class="td%
+% \end{macrocode}
+% Append this column's spec:
+% \begin{macrocode}
+\StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}%
+% \end{macrocode}
+% If this column has a cmidrule, add ``rule'' to the end of the \acro{HTML} class tag:
+% \begin{macrocode}
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"{}}
+% \end{macrocode}
+% While printing the text, redefine |\\| to generate a new line
+% \begin{macrocode}
+\begingroup \let\\\LWR at endofline #5 \endgroup
+\LWR at stoppars%
+\global\boolfalse{LWR at intabularmetadata}%
+}%
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Utility macros inside a table}
+% \begin{macrocode}
+\newcommand*{\LWR at donothing}{}
+\newcommand*{\LWR at domidrule}{\booltrue{LWR at doinghline}}
+\newcommand*{\LWR at dotbrule}{\booltrue{LWR at doingtbrule}}
+% \end{macrocode}
+
+
+% \subsection{Checking for a new table cell}
+
+% \begin{macro}{\LWR at tabledatacolumntag}
+% Open a new \acro{HTML} table cell unless the next token is for a macro
+% which does not create data, such as |\hline|, |\toprule|, etc:
+% \begin{macrocode}
+\newbool{LWR at exitingtabular}
+\newcommand*{\LWR at tabledatacolumntag}%
+{%
+% \end{macrocode}
+% \hspace*{.5in} |\show\LWR at mynexttoken| to see what tokens to look for
+% \begin{macrocode}
+% \end{macrocode}
+% If not any of the below, start a new table cell:
+% \begin{macrocode}
+\let\mynext\LWR at tabledatasinglecolumntag%
+% \end{macrocode}
+% If exiting the tabular:
+% \begin{macrocode}
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\end}}%
+{\booltrue{LWR at exitingtabular}}{}%
+% \end{macrocode}
+% \env{longtable} can have a caption in a cell
+% \begin{macrocode}
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\caption}}%
+{\let\mynext\LWR at donothing}{}%
+% \end{macrocode}
+% Look for other things which would not start a table cell:
+% \begin{macrocode}
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\multicolumn}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\multirow}}%
+{\let\mynext\LWR at donothing}{}%
+% \end{macrocode}
+% if come to an |\mrowcell|, this is a cell to be skipped over
+% \begin{macrocode}
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\mrowcell}}%
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\hline}}%
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\toprule}}%
+{%
+\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\midrule}}%
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\cmidrule}}%
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\cline}}%
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\bottomrule}}%
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\warpprintonly}}
+{\let\mynext\LWR at donothing}{}%
+%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\warpHTMLonly}}
+{\let\mynext\LWR at donothing}{}%
+% \end{macrocode}
+% no action for an |\end| token
+%
+% Add similar to the above for any other non-data tokens
+% which might appear in the table.
+%
+% Start the new table cell if was not any of the above:
+% \begin{macrocode}
+\mynext%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{\textbackslash{}mrowcell}
+
+% \begin{macro}{\mrowcell}
+% The user must insert |\mrowcell| into any multirow cells which must be skipped.
+% This command has no action during print output.
+% \watchout
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+\newcommand*{\mrowcell}{}
+\end{warpall}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \subsection{New \textbackslash{}tabular definition}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{environment}{LWR at tabular} \oarg{vertposition} \marg{colspecs}
+%
+% The new tabular environment will be |\let| in |\LWR at LwarpStart|,
+% since \pkg{siunitx} might redefine tabular in the user's document.
+% \begin{macrocode}
+\newenvironment*{LWR at tabular}[2][]
+{%
+\LWR at traceinfo{tabular started}%
+\begingroup%
+\addtocounter{LWR at tabulardepth}{1}%
+% \end{macrocode}
+% Not yet started a table row:
+% \begin{macrocode}
+\global\boolfalse{LWR at startedrow}%
+% \end{macrocode}
+% Not yet doing an hline:
+% \begin{macrocode}
+\global\boolfalse{LWR at doinghline}%
+% \end{macrocode}
+% Not yet doing a top/bottom rule:
+% \begin{macrocode}
+\global\boolfalse{LWR at doingtbrule}%
+% \end{macrocode}
+% Have not yet found the end of tabular command:
+% \begin{macrocode}
+\boolfalse{LWR at exitingtabular}%
+% \end{macrocode}
+% Create the |table| tag:
+% \begin{macrocode}
+\global\booltrue{LWR at intabularmetadata}%
+\LWR at htmlblocktag{table}%
+% \end{macrocode}
+% Parse the table columns:
+% \begin{macrocode}
+\LWR at parsetablecols{#2}%
+% \end{macrocode}
+% Table col spec is: \cs{LWR at tablecolspec} which is a string of |llccrr|, etc.
+%
+% Do not place the table inside a paragraph:
+% \begin{macrocode}
+\LWR at stoppars%
+% \end{macrocode}
+% Track column \# for setting text-align:
+% \begin{macrocode}
+\setcounter{LWR at tablecolspos}{1}%
+% \end{macrocode}
+% Start looking for midrules:
+% \begin{macrocode}
+\LWR at clearmidrules%
+% \end{macrocode}
+% |\\| becomes a macro to end the table row:
+% \begin{macrocode}
+\let\\\LWR at tabularendofline%
+% \end{macrocode}
+% The following may appear before a data cell is created,
+% so after doing their actions, we look ahead with |\LWR at getmynextoken|
+% to see if the next token might create a new data cell:
+% \begin{macrocode}
+\renewcommand*{\hline}{\LWR at domidrule\LWR at getmynexttoken}%
+\newcommand*{\midrule}{\LWR at domidrule\LWR at getmynexttoken}%
+\NewDocumentCommand{\cmidrule}{o d() m}%
+{\LWR at docmidrule[##1](##2){##3}\LWR at getmynexttoken}%
+\RenewDocumentCommand{\cline}{m}%
+{\LWR at docmidrule{##1}\LWR at getmynexttoken}%
+\newcommand*{\toprule}{\LWR at dotbrule\LWR at getmynexttoken}%
+\newcommand*{\bottomrule}{\LWR at dotbrule\LWR at getmynexttoken}%
+% \end{macrocode}
+% The following create data cells and will have no more data in this cell,
+% so we do not want to look ahead for a possible data cell,
+% so do not want to use |\LWR at getmynexttoken|.
+% \begin{macrocode}
+\let\multicolumn\LWR at tabledatamulticolumntag%
+\let\multirow\LWR at tabledatamultirowtag%
+\renewcommand*{\mrowcell}{\global\booltrue{LWR at skippingmrowcell}}%
+\let\caption\LWR at longtabledatacaptiontag%
+% \end{macrocode}
+% Reset for new processing:
+% \begin{macrocode}
+\global\boolfalse{LWR at tableparcell}%
+\global\boolfalse{LWR at skippingmrowcell}%
+% \end{macrocode}
+% Look ahead for a possible table data cell:
+% \begin{macrocode}
+\LWR at getmynexttoken%
+}%
+% \end{macrocode}
+% Ending the environment:
+% \begin{macrocode}
+{%
+\LWR at closetabledatacell%
+\LWR at htmlblocktag{/tr}%
+\LWR at htmlblocktag{/table}%
+\global\boolfalse{LWR at intabularmetadata}%
+% \end{macrocode}
+% \begin{macrocode}
+\addtocounter{LWR at tabulardepth}{-1}%
+\endgroup%
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \subsection{Array}
+% \label{sec:array}
+
+% \DescribePackage{array}
+%
+% \pkg{array} is also automatically loaded by siunitx.
+
+
+
+
+
+% \section{Cross-references}
+%
+% Sectioning commands have been emulated from scratch, so the cross-referencing
+% commands are custom-written for them.
+% Emulating both avoids several layers of patches.
+%
+% The \pkg{zref} package is used to remember section name, file, and
+% lateximage depth and number for each label.
+%
+% \Cref{tab:crossrefdata} shows the data structures related to cross-referencing.
+%
+% \changes{v0.14}{2016/03/29}{Docs: Table: Cross-referencing data structures.}
+% \changes{v0.19}{2016/05/25}{Docs: Table: Cross-referencing data structures, updated.}
+% \begin{table}
+% \caption{Cross-referencing data structures\label{tab:crossrefdata}}
+% \medskip
+% \hrule
+% \smallskip
+% \begin{description}[nosep]
+% \raggedright
+% \item [Original \LaTeX:] \hfill (print and \acro{HTML})
+% \begin{description}
+% \item [\cs{refstepcounter}:] Steps the couunter and sets \cs{@currentlabel}.
+% \item [\cs{@currentlabel}:] \cs{p@<ctr>}\cs{the<ctr>} Updated by \cs{refstepcounter}.
+% \item [\cs{label}:] Writes to the |.aux| file:
+% \qquad |\newlabel{<label>}{{\@currentlabel}{\thepage}}|
+% \item [\cs{newlabel}:] When the |.aux| file is read, sets \cs{r@<label>}.
+% \item [\cs{r@<label>}:] Set to: |{{\@currentlabel}{\thepage}}|
+% \item [\cs{ref}:] Returns the first part of \cs{r@<label>}.
+% \item [\cs{pageref}:] Returns the second part of \cs{r@<label>}.
+% \end{description}
+% \item [Added by \pkg{amsmath}:] \hfill (print and \acro{HTML})
+% \begin{description}
+% \item [\cs{label}:] Delayed until math is completed.
+% \end{description}
+% \item [Added by \pkg{lwarp}:] \hfill (\acro{HTML} only)
+% \begin{description}
+% \item [\cs{nameref}:] Emualted from \pkg{hyperref} for \pkg{lwarp}.
+% See \cref{sec:references}.
+% \item [\cs{ref} and \cs{nameref}:] Adds \acro{HTML} tags.
+% See \cref{sec:references}.
+% \end{description}
+% \item [Added by \pkg{cleverref}:] \hfill (print and \acro{HTML})
+% \begin{description}
+% \item [\cs{refstepcounter:}] Added: sets \cs{cref at currentlabel}.
+% \item [\cs{cref at currentlabel}:] (|<type>|=|<ctr>| unless an alias is used):
+% \qquad |[<type>][\arabic{<ctr>}][<parent ctrs>]{\p@<ctr>\the<ctr>}|
+% Also see \cref{sec:footnotesregular} for use with footnotes.
+% \item [\cs{label}:] Writes to the |.aux| file:
+% \qquad |\newlabel{<label>@cref}{{\cref at currentlabel}{\thepage}}|
+% \item [\cs{newlabel}:] (Unchanged.) When the |.aux| file is read, sets \cs{r@<label>@cref}.
+% \item [\cs{r@<label>@cref}:] Set to: |{{\cref at currentlabel}{\thepage}}|
+% \item [Utility functions:] See \cs{cref at getlabel}, \cs{cref at gettype},
+% \cs{cref at getcounter}, \cs{cref at getprefix}.
+% \item [Cross-referencing names:] \cs{crefname} and \cs{Crefname} assign
+% human-readable names for references to this counter type.
+% \end{description}
+% \item [Additionally patched by \pkg{lwarp}:] \hfill (\acro{HTML} only)
+% \begin{description}
+% \item [\cs{cref}, etc.:] Modified for \pkg{lwarp}.
+% See \cref{sec:cleveref}.
+% \item [\cs{label}:] Adds \acro{HTML} tags (\cref{sec:labels}),
+% plus \cs{splabel} data (\cref{sec:zrefsetup}):
+% \begin{description}
+% \item [zLWR at name:] The section name for this label.
+% \item [zLWR at htmlfilenumer:] The filenumber or name for this label.
+% \item [zLWR at lateximagedepth:] The |lateximagedepth| for this label.
+% \item [zLWR at lateximagenumber:] The |lateximagenumber| for this label.
+% \end{description}
+% \item [\cs{label} inside math:] See \cref{sec:amsmathsupport}.
+% \end{description}
+% \item [Footnotes:] See \cs{noteentry} in \cref{sec:footnotesregular}.
+% \end{description}
+% \hrule
+% \end{table}
+%
+%
+% ^^A % See:
+% ^^A %
+% ^^A % \href{http://tex.stackexchange.com/questions/85956/redefining-label-and-ref-when-using-hyperref}
+% ^^A % {\texttt{http://tex.stackexchange.com/questions/85956/redefining-label-and-ref-when-\\using-hyperref}}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{Setup}
+
+%
+%
+% \begin{macro}{\@currentlabelname}
+% To remember the most recently defined section name,
+% description, or caption, for \cs{nameref}.
+%
+% \begin{macrocode}
+\newcommand*{\@currentlabelname}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at stripperiod} \marg{text} \oarg{.}
+%
+% Removes a trailing period.
+% \begin{macrocode}
+\def\LWR at stripperiod#1.\ltx at empty#2\@nil{#1}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at setlatestname} \marg{object name}
+%
+% Removes \cs{label}, strips any final period, and remembers the result.
+% \begin{macrocode}
+\newcommand*{\LWR at setlatestname}[1]{%
+% \end{macrocode}
+% Remove \cs{label} and other commands from the name, the strip any final period.
+% See \pkg{zref-titleref} and \pkg{gettitlestring}.
+% \begin{macrocode}
+\GetTitleStringExpand{#1}%
+\edef\@currentlabelname{\detokenize\expandafter{\GetTitleStringResult}}%
+\edef\@currentlabelname{%
+\expandafter\LWR at stripperiod\@currentlabelname%
+\ltx at empty.\ltx at empty\@nil%
+}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Zref setup}
+% \label{sec:zrefsetup}
+
+% See: \\
+% \href{http://tex.stackexchange.com/questions/57194/extract-section-number-from-equation-reference}
+% {\ttfamily http://tex.stackexchange.com/questions/57194/ \\
+% \hspace*{2em}extract-section-number-from-equation-reference}
+%
+% Create a new property list called special:
+% \begin{macrocode}
+\zref at newlist{special}
+% \end{macrocode}
+% Define a new property which has the name of the most recently declared section:
+% \begin{macrocode}
+\zref at newprop{zLWR at name}{\@currentlabelname}
+% \end{macrocode}
+% Define a new property which has either a filename or a file number:
+% \begin{macrocode}
+\zref at newprop{zLWR at htmlfilenumber}{%
+\ifbool{FileSectionNames}{\LWR at thisfilename}{\theLWR at htmlfilenumber}%
+}%
+% \end{macrocode}
+% Additional properties for lateximages:
+% \begin{macrocode}
+\zref at newprop{zLWR at lateximagedepth}{\arabic{LWR at lateximagedepth}}
+\zref at newprop{zLWR at lateximagenumber}{\arabic{LWR at lateximagenumber}}
+% \end{macrocode}
+%
+% |zLWR at htmlfilenumber| property holds the file number or name
+%
+% Add a |LWR at htmlfilenumber| property, and lateximage properties to special:
+% \begin{macrocode}
+\zref at addprop{special}{zLWR at name}
+\zref at addprop{special}{zLWR at htmlfilenumber}
+\zref at addprop{special}{zLWR at lateximagedepth}
+\zref at addprop{special}{zLWR at lateximagenumber}
+% \end{macrocode}
+% Returns the selected field:
+% \begin{macrocode}
+\newcommand*{\LWR at spref}[2]{%
+\zref at extractdefault{#1}{#2}{??}}
+% \end{macrocode}
+% \begin{macro}{\LWR at nameref} \marg{label}
+% Returns the section name for this label:
+% \begin{macrocode}
+\newcommand*{\LWR at nameref}[1]{%
+\LWR at spref{#1}{zLWR at name}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at htmlfileref} \marg{label}
+% Returns the file number for this label:
+% \begin{macrocode}
+\newcommand*{\LWR at htmlfileref}[1]{%
+\LWR at traceinfo{LWR at htmlfileref A: !#1!}%
+\LWR at spref{#1}{zLWR at htmlfilenumber}%
+\LWR at traceinfo{LWR at htmlfileref B}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at lateximagedepthref} \marg{label}
+% Returns the |lateximagedepth| for this label:
+% \begin{macrocode}
+\newcommand*{\LWR at lateximagedepthref}[1]{%
+\LWR at spref{#1}{zLWR at lateximagedepth}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at lateximagenumberref} \marg{label}
+% Returns the |lateximagenumber| for this label:
+% \begin{macrocode}
+\newcommand*{\LWR at lateximagenumberref}[1]{%
+\LWR at spref{#1}{zLWR at lateximagenumber}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LWR at splabel} \marg{label}
+% Sanitize the name and then creates the label:
+% \begin{macrocode}
+\newcommand*{\LWR at splabel}[1]{%
+\LWR at setlatestname{\@currentlabelname}%
+\zref at labelbylist{#1}{special}}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \subsection{Labels}
+% \label{sec:labels}
+
+
+% \begin{macro}{\LWR at subsublabel} \marg{label} \quad
+% Creates an \acro{HTML} id tag.
+% \begin{macrocode}
+\newcommand*{\LWR at subsublabel}[1]{%
+% \end{macrocode}
+% Create an \acro{HTML} id tag unless are inside a lateximage,
+% since it would appear in the image:
+% \begin{macrocode}
+\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{0}}%
+{}%
+{% not lateximage
+% \end{macrocode}
+% If not doing a lateximage, create an \acro{HTML} ID tag:
+% (To be factored\dots)
+% \begin{macrocode}
+\ifbool{LWR at doingstartpars}%
+{% pars allowed
+\ifbool{LWR at doingapar}
+{% par started
+\LWR at htmltag{a id="#1"{}}\LWR at htmltag{/a}%
+}% par started
+{% par not started
+\LWR at stoppars%
+\LWR at htmltag{a id="#1"{}}\LWR at htmltag{/a}%
+\LWR at startpars%
+}% par not started
+}% pars allowed
+{% pars not allowed
+\LWR at htmltag{a id="#1"{}}\LWR at htmltag{/a}%
+}% pars not allowed
+}% not lateximage
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\LWR at sublabel} \marg{label}
+%
+% \cs{label} during \acro{HTML} output.
+% Creates a traditional \LaTeX\ label,
+% adds a special label with additional information,
+% and creates an \acro{HTML} id tag.
+%
+% Used by \cs{LWR at htmllabel} and \cs{LWR at htmlmathlabel}.
+% \begin{macrocode}
+\newcommand*{\LWR at sublabel}[1]{%
+% \end{macrocode}
+% Create a traditional LaTeX label, as modified by \pkg{cleveref}:
+% \begin{macrocode}
+\LWR at traceinfo{LWR at sublabel: !#1!}%
+\LWR at origlabel{#1}%
+% \end{macrocode}
+% Create a special label which holds the section number,
+% |LWR at htmlfilenumber|, |LWR at lateximagedepth|, and |LWR at lateximagenumber|:
+% \begin{macrocode}
+\LWR at traceinfo{about to splabel}%
+\LWR at traceinfo{filesectionnames is \ifbool{FileSectionNames}{true}{false}}%
+\LWR at traceinfo{LWR at thisfilename is !\LWR at thisfilename!}%
+\LWR at traceinfo{LWR at htmlfilenumber is \theLWR at htmlfilenumber}%
+\LWR at splabel{#1}%
+\LWR at subsublabel{#1}%
+\LWR at traceinfo{finished with LWR at sublabel}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\LWR at newlabel} \marg{label}
+%
+% \cs{label} during \acro{HTML} output when not in math mode,
+% removing extra spaces around the label, as done by regular \LaTeX\ \cs{label}.
+% \begin{macrocode}
+\newcommand*{\LWR at newlabel}[1]{%
+\LWR at traceinfo{lwr at newlabel: !#1!}%
+% \@bsphack%
+\LWR at sublabel{#1}%
+% \@esphack%
+\LWR at traceinfo{lwr at newlabel: done}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+
+
+
+% \subsection{References}
+% \label{sec:references}
+
+% \begin{macro}{\LWR at startref} \marg{label} \quad
+% (Common code for |\ref| and |\nameref|.)
+%
+% Open an \acro{HTML} tag reference to a filename, \# character, and a label.
+%
+% \begin{macrocode}
+\newcommand*{\LWR at startref}[1]
+{%
+\edef\LWR at lidref{\LWR at lateximagedepthref{#1}}
+% \typeout{***LWR at startref A: !#1!}%
+% \end{macrocode}
+% Create the tag:
+% \begin{macrocode}
+\LWR at htmltag{a href="%
+% \typeout{***LWR at startref B}%
+\LWR at htmlrefsectionfilename{#1}%
+% \typeout{***LWR at startref C}%
+\#%
+% \end{macrocode}
+% See if |LWR at lateximagedepth| is unknown:
+% \begin{macrocode}
+% \typeout{***LWR at startref D: !#1!}%
+\ifthenelse{\equal{\LWR at lidref}{??}}%
+% \end{macrocode}
+% ``|??|'' if |LWR at lateximagedepth| is unknown:
+% \begin{macrocode}
+{??}%
+% \end{macrocode}
+% If |LWR at lateximagedepth| is known:
+% \begin{macrocode}
+{%
+% \typeout{***LWR at startref D1}%
+% \typeout{***depthref is \LWR at lidref}%
+\ifthenelse{\cnttest{\LWR at lidref}{>}{0}}%
+{%
+% \typeout{***LWR at startref D2}%
+lateximage\LWR at lateximagenumberref{#1}%
+}%
+{%
+% \typeout{***LWR at startref D3}%
+#1%
+}%
+}%
+% \typeout{***LWR at startref E}%
+% \end{macrocode}
+% closing quote:
+% \begin{macrocode}
+"{}}%
+% \typeout{***LWR at startref F}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\ref} * \marg{label} \quad
+% Create an internal document reference link,
+% or without a link if starred per \pkg{hyperref}.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at newref}{s m}{%
+\LWR at traceinfo{LWR at newref #2}%
+\IfBooleanTF{#1}%
+{\LWR at origref{#2}}%
+{%
+\LWR at startref{#2}%
+\LWR at origref{#2}%
+\LWR at htmltag{/a}%
+}%
+}
+
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\pagerefPageFor} Text for starred page references.
+%
+% \begin{macrocode}
+\newcommand*{\pagerefPageFor}{page for}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\pageref} * \marg{label} \quad
+% Create an internal document reference,
+% or just the unlinked number if starred, per \pkg{hyperref}.
+%
+% \changes{v0.20}{2017/01/03}{Added.}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at newpageref}{s m}{%
+\IfBooleanTF{#1}%
+{(\pagerefPageFor\ \LWR at origref{#2})}%
+{(\cpageref{#2})}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\nameref} \marg{label}
+% \begin{macrocode}
+\newcommand*{\nameref}[1]{%
+\LWR at traceinfo{nameref A}%
+\LWR at startref{#1}%
+\LWR at traceinfo{nameref B}%
+\LWR at nameref{#1}%
+\LWR at traceinfo{nameref C}%
+\LWR at htmltag{/a}%
+\LWR at traceinfo{nameref D}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Hyper-references}
+%
+% Note that the code currently only sanitizes the underscore character.
+% \watchout
+% Additional characters should be rendered inert as well.
+% See the |hyperref.sty| definition of \cs{gdef}\cs{hyper at normalise} for an example.
+%
+
+% \DescribePackage{hyperref}
+
+% Do not tell other packages that \pkg{hyperref} is emulated.
+% \watchout
+% Some packages patch various commands if \pkg{hyperref} is present,
+% which will probably break something, and the emulation already handles
+% whatever may be emulated anyhow.
+%
+% Any reference to |\usepackage{hyperref}| must be placed inside a \env{warpprint} environment.
+% \watchout
+% \begin{macrocode}
+% DO NOT TELL OTHER PACKAGES TO ASSUME HYPERREF:
+% \EmulatesPackage{hyperref}[2015/08/01]% Disabled. Do not do this.
+% \end{macrocode}
+
+% Create a link with a text name:
+
+% \begin{macro}{\LWR at subhyperref} \marg{URL} \marg{text}
+% \changes{v0.18}{2016/04/14}{Improved HTML output linebreaks.}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at subhyperref}{m +m}{%
+\LWR at htmltag{a href="{#1}" target="\_{}blank"\LWR at orignewline}#2\LWR at htmltag{/a}%
+\LWR at ensuredoingapar%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at subhyperrefclass} \marg{URL} \marg{text} \marg{htmlclass}
+% \changes{v0.18}{2016/04/14}{Improved HTML output linebreaks.}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at subhyperrefclass}{m +m m}{%
+\LWR at htmltag{a href="{#1}"
+class="#3"\LWR at orignewline}#2\LWR at htmltag{/a}%
+\LWR at ensuredoingapar%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\href} \oarg{options} \marg{URL} \marg{text}
+%
+% Create a link with accompanying text:
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at hrefb}{O{} m +m}{%
+\LWR at subhyperref{#2}{#3}%
+\endgroup%
+\LWR at ensuredoingapar%
+}
+
+\newcommand{\href}{%
+\LWR at ensuredoingapar%
+\begingroup%
+\catcode`\_=12
+\LWR at hrefb%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\nolinkurl} \marg{URL}
+%
+% Print the name of the link without creating the link:
+% \begin{macrocode}
+\newcommand*{\LWR at nolinkurlb}[1]{#1\endgroup\LWR at ensuredoingapar}
+
+\newcommand{\nolinkurl}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\LWR at nolinkurlb%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\url} \marg{URL}
+%
+% Create a link whose text name is the address of the link:
+% \begin{macrocode}
+\newcommand*{\LWR at urlb}[1]{%
+\href{#1}{#1}%
+\endgroup%
+\LWR at ensuredoingapar%
+}
+
+\newcommand{\url}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\LWR at urlb%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at subinlineimage} \oarg{alttag} \marg{class}
+% \marg{filename} \marg{extension} \marg{style}
+%
+% \changes{v0.18}{2016/05/18}{Surpress extra space.}
+%
+% \begin{macrocode}
+\newcommand*{\LWR at subinlineimage}[5][]{%
+\ifthenelse{\equal{#1}{}}%
+{\LWR at htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"{}}}%
+{\LWR at htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"{}}}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \clearpage
+
+% \section{Floats}
+% \label{sec:floats}
+
+% Floats are supported, although partially through emulation.
+%
+% \Cref{tab:floatdata} shows the data structure associated with each |<type>|
+% of float.
+
+% \changes{v0.14}{2016/03/28}{Docs: Table: Float data structures.}
+% \begin{table}
+% \caption{Float data structures\label{tab:floatdata}}
+%
+% \bigskip
+% For each |<type>| of float (figure, table, etc.) there exists the following:
+%
+% \hrule
+% \begin{description}
+% \item [counter <type>:] A counter called |<type>|, such as |figure|, |table|.
+% \item [\cs{<type>name}:] Name. \cs{figurename} prints ``Figure'', etc.%
+% \item [\cs{ext@<type>}:] File extension. \cs{ext at figure} prints ``lof'', etc.
+% \item [\cs{fps@<type>}:] Placement.
+% \item [\cs{the<type>}:] Number. \cs{thetable} prints the number of the table, etc.
+% \item [\cs{p@<type>}:] Parent's number.
+% Prints the number of the [within] figure, etc.
+% \item [\cs{fnum@<type>}:] Prints the figure number for the caption. \\
+% \cs{<type>name}~\cs{the<type>}, ``Figure 123''.
+% \item [\cs{<type>}:] Starts the float environment. |\figure| or \cs{begin}|{figure}|
+% \item [\cs{end<type>}:] Ends the float environment. |\endfigure| or \cs{end}|{figure}|
+% \item [\cs{tf@<ext>}:] The \LaTeX{} file identifier for the output file.
+% \item [\texttt{LWR at have<type>}:] A boolean rememebering whether a \cs{listof} was
+% requested for a float of this type.
+% \item [File with extension lo<f,t,a-z>:] An output file containing
+% the commands to build the
+% \cs{listof}{<type>}{<name>} ``table-of-contents'' structure.
+% \item [Cross-referencing names:] For \pkg{cleveref}'s \cs{cref} and related,
+% \cs{crefname} and \cs{Crefname} assign human-readable names for references to this float type.
+% \end{description}
+% \hrule
+% \end{table}
+%
+% \cs{@makecaption} is redefined to print the float number and caption text,
+% separated by \cs{CaptionSeparator}, which works with the \pkg{babel} package to
+% adjust the caption separator according to the language. French, for example,
+% uses an en-dash instead of a colon: ``Figure 123 -- Caption text''.
+
+
+% \subsection{Float captions}
+% \label{sec:floatcaptions}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at floatbegin} \marg{type} \oarg{placement}
+%
+% Begins a \cs{newfloat} environment.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at floatbegin}{m o}{%
+\LWR at stoppars
+% \end{macrocode}
+% There is a new float, so increment the unique float counter:
+% \begin{macrocode}
+\addtocounter{LWR at thisfloat}{1}%
+\booltrue{LWR at freezethisfloat}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+% \end{macrocode}
+% Settings while inside the environment:
+% \begin{macrocode}
+\LWR at origraggedright
+% \end{macrocode}
+% Open an \acro{HTML} |figure| tag:
+% \begin{macrocode}
+\LWR at htmltag{figure id="autofloat-\arabic{LWR at thisfloat}" class="#1"}
+% \end{macrocode}
+% \begin{macrocode}
+\renewcommand*{\@captype}{#1}
+\caption at settype{#1}
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@float}
+% \begin{macro}{\@dlbfloat} Support packages which create floats directly.
+% \begin{macrocode}
+\let\@float\LWR at floatbegin
+\let\@dblfloat\LWR at floatbegin
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at floatend}
+%
+% Ends a \cs{newfloat} environment.
+% \begin{macrocode}
+\newcommand*{\LWR at floatend}{%
+\LWR at stoppars%
+\LWR at htmlelementend{figure}%
+\endgroup%
+\boolfalse{LWR at freezethisfloat}%
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\end at float}
+% \begin{macro}{\end at dlbfloat} Support packages which create floats directly.
+% \begin{macrocode}
+\let\end at float\LWR at floatend
+\let\end at dblfloat\LWR at floatend
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+
+
+% \DescribeCounter{LWR at thisfloat}
+% A sequential counter for all floats.
+% This is used to identify the float then reference it from the List of Figures and
+% List of Tables.
+% \begin{macrocode}
+\newcounter{LWR at thisfloat}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR at freezethisfloat}
+% Prevents multiple increments of \cs{LWR at thisfloat} inside a float.
+% \begin{macrocode}
+\newbool{LWR at freezethisfloat}
+\boolfalse{LWR at freezethisfloat}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at maybeincthisfloat}
+% \begin{macrocode}
+\newcommand*{\LWR at maybeincthisfloat}{%
+\ifbool{LWR at freezethisfloat}{}{\addtocounter{LWR at thisfloat}{1}}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\@captype}
+% Remembers which float type is in use.
+% \begin{macrocode}
+\newcommand*{\@captype}{}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsubsection{Caption inside a float environment}
+
+% \begin{macro}{\CaptionSeparator} How to separate the float number and the caption text.
+% \changes{v0.13}{2016/03/23}{Fix for newer babel package.}
+% \begin{macrocode}
+\AtBeginDocument{\providecommand*{\CaptionSeparator}{:~}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@makecaption} \marg{name and num} \marg{text}
+%
+% Prints the float type and number, the caption separator, and the caption text.
+% \begin{macrocode}
+\AtBeginDocument{\renewcommand{\@makecaption}[2]{#1\CaptionSeparator#2}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsubsection{Caption and LOF linking and tracking}
+
+% When a new \acro{HTML} file is marked in the \LaTeX\ \acro{PDF} file,
+% the \LaTeX\ page number at that point is stored in |LWR at latestautopage|,
+% (and the associated filename is remembered by the special \LaTeX\ labels).
+% This page number is used to generate an |autofloat| \acro{HTML} \acro{ID}
+% in the \acro{HTML} output at the start of the new \acro{HTML} file.
+% Meanwhile, there is a float counter used to generate an \acro{HTML} |autofloat|
+% \acro{ID}s at the start of the float itself in the \acro{HTML} file.
+% The |autopage| and |autofloat| values to use for each float are written to the
+% |.lof|, etc. files just before each float's entry. These values are used
+% by \cs{l at figure}, etc. to create the \acro{HTML} links in the List of Figures, etc.
+%
+% \DescribeCounter{LWR at nextautofloat} Tracks autofloat for floats.
+% \DescribeCounter{LWR at nextautopage} Tracks autopage for floats.
+%
+% These are updated per float as the |.lof| file is read.
+% \begin{macrocode}
+\newcounter{LWR at nextautofloat}
+\newcounter{LWR at nextautopage}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\LWRsetnextfloat} \marg{autopage} \marg{autofloat}
+%
+% This is written to the |.lof| file just before each float's usual entry.
+% The autopage and autofloat are remembered for \cs{l at figure} to use when
+% creating the \acro{HTML} links.
+%
+% \begin{macrocode}
+\newcommand*{\LWRsetnextfloat}[2]{%
+\setcounter{LWR at nextautopage}{#1}%
+\setcounter{LWR at nextautofloat}{#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \DescribeCounter{LWR at latestautopage}
+% Updated each time a new \acro{HTML} file is begun.
+% \cs{LWRsetnextfloat} is written with this and the autofloat
+% by the modified \cs{addcontentsline} just before each float's entry.
+% \begin{macrocode}
+\newcounter{LWR at latestautopage}% updated each new HTML file
+\setcounter{LWR at latestautopage}{1}
+% \end{macrocode}
+
+% \begin{macrocode}
+\let\LWR at origcaption@begin\caption at begin
+\let\LWR at origcaption@end\caption at end
+\let\LWR at orig@@par\@@par
+% \end{macrocode}
+
+% \begin{macro}{\LWR at caption@begin}
+% Low-level patches to create \acro{HTML} tags for captions.
+% \begin{macrocode}
+\newcommand{\LWR at caption@begin}
+{
+\LWR at traceinfo{LWR at caption@begin}%
+% \end{macrocode}
+% Keep par and minipage changes local:
+% \begin{macrocode}
+\begingroup%
+% \end{macrocode}
+% The \pkg{caption} code was not allowing the closing |par| tag:
+% \begin{macrocode}
+\renewcommand{\@@par}{\LWR at closeparagraph\LWR at orig@@par}%
+% \end{macrocode}
+% No need for a minipage inside the caption:
+% \begin{macrocode}
+\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+% \end{macrocode}
+% Enclose the original caption code inside an \acro{HTML} tag:
+% \begin{macrocode}
+\LWR at htmlblocktag{figcaption}%
+\LWR at origcaption@begin%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at caption@end}
+% Low-level patches to create \acro{HTML} tags for captions.
+% \begin{macrocode}
+\newcommand{\LWR at caption@end}
+{%
+\LWR at origcaption@end%
+% \end{macrocode}
+% Subcaptions were being over-written by the closing \acro{HTML} tag:
+% \begin{macrocode}
+\vspace*{\baselineskip}%
+% \end{macrocode}
+% Closing tag:
+% \begin{macrocode}
+\LWR at htmlblocktag{/figcaption}%
+\endgroup%
+% \leavevmode% avoid bad space factor (0) error
+\LWR at traceinfo{LWR at caption@end: done}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\caption at begin}
+% \begin{macro}{\caption at end}
+% Low-level patches to create \acro{HTML} tags for captions.
+% \begin{macrocode}
+\let\caption at begin\LWR at caption@begin
+\let\caption at end\LWR at caption@end
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+
+% \begin{macro}{\captionlistentry}
+% Tracks the float number for this caption used outside a float.
+% Patched to create an \acro{HTML} anchor.
+% \begin{macrocode}
+\let\LWR at origcaptionlistentry\captionlistentry
+
+\renewcommand*{\captionlistentry}{%
+\LWR at maybeincthisfloat%
+\LWR at ensuredoingapar%
+\LWR at htmltag{a id="autofloat-\arabic{LWR at thisfloat}"{}}\LWR at htmltag{/a}%
+\LWR at origcaptionlistentry%
+}
+
+\def\LWR at LTcaptionlistentry{%
+\LWR at ensuredoingapar%
+\LWR at htmltag{a id="autofloat-\arabic{LWR at thisfloat}"{}}\LWR at htmltag{/a}%
+ \bgroup
+ \@ifstar{\egroup\LWR at LT@captionlistentry}% gobble *
+ {\egroup\LWR at LT@captionlistentry}}%
+\def\LWR at LT@captionlistentry#1{%
+ \caption at listentry\@firstoftwo[\LTcaptype]{#1}}%
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\addcontentsline}
+% Patched to write the autopage and autofloat before each float's entry.
+% No changes if writing |.toc|.
+% \begin{macrocode}
+\let\LWR at origaddcontentsline\addcontentsline
+
+\renewcommand*{\addcontentsline}[3]{%
+\ifthenelse{\equal{#1}{toc}}{}{%
+\addtocontents{\@nameuse{ext@#2}}{%
+\protect\LWRsetnextfloat%
+{\arabic{LWR at latestautopage}}%
+{\arabic{LWR at thisfloat}}%
+}%
+}%
+\LWR at origaddcontentsline{#1}{#2}{#3}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\captionof}
+% Patched to track the float number since this is used outside a float,
+% and also create an \acro{HTML} anchor for the virtual float.
+% \begin{macrocode}
+\AtBeginDocument{
+\let\LWR at origcaptionof\captionof
+
+\renewcommand*{\captionof}{%
+\LWR at maybeincthisfloat%
+\LWR at stoppars
+\LWR at htmltag{a id="autofloat-\arabic{LWR at thisfloat}"{}}\LWR at htmltag{/a}%
+\LWR at origcaptionof%
+}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Table of Contents, LOF, LOT}
+%
+% This section controls the generation of the TOC, LOF, LOT.
+%
+% The |.toc|, |.lof|, and |.lot| files are named by the source code \cs{jobname}.
+%
+% In \acro{HTML}, the printed tables are placed inside a div of class |.toc|, |.lof|, or |.lot|.
+%
+% A ``sidetoc'' is provided which prints a subset of the TOC on the side of each page other
+% than the homepage.
+%
+% The regular \LaTeX{} infrastructure is used for TOC,
+% along with some patches to generate \acro{HTML} output.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{Reading and printing the TOC}
+
+% \begin{macro}{\LWR at myshorttoc} \marg{toc/lof/lot}
+% \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.}
+%
+% Reads in and prints the \acro{TOC}/\acro{LOF}/\acro{LOT} at the current position.
+% While doing so, makes the |@| character into a normal letter to allow
+% formatting commands in the section names.
+
+% Unlike in regular \LaTeX{}, the file is not reset after being read, since
+% the \acro{TOC} may be referred to again in each \acro{HTML} page, and is
+% used for the side\acro{TOC}.
+% \begin{macrocode}
+\newcommand*{\LWR at myshorttoc}[1]{
+\LWR at ensuredoingapar
+% \end{macrocode}
+% Only if the file exists:
+% \begin{macrocode}
+\IfFileExists{\jobname.#1}{
+% \end{macrocode}
+% Make |@| a regular letter.
+% Many of the commands in the file will have |@| characters in them, so |@|
+% \watchout
+% must be made a regular letter.
+%
+% For |pdflatex|, also change to |latin1| encoding.
+% When reading back a file with accented characters,
+% \watchout[disabled]
+% the encoding change seems to be required, rather than leaving it |utf8|.
+% \begin{macrocode}
+\begingroup
+% \ifxetexorluatex%
+% \else
+% \inputencoding{latin1}% currently disabled
+% \fi
+\makeatletter
+% \end{macrocode}
+% Read in the \acro{TOC} file:
+% \begin{macrocode}
+\@input{\jobname.#1}
+% \makeatother
+\endgroup
+}%
+{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at subtableofcontents} \marg{toc/lof/lot} \marg{sectionstarname}
+%
+% Places a TOC/LOF/LOT at the current position.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at subtableofcontents}{m m}{%
+% \end{macrocode}
+% Closes previous levels:
+% \begin{macrocode}
+\@ifundefined{chapter}
+{\LWR at closeprevious{\LWR at depthsection}}
+{\LWR at closeprevious{\LWR at depthchapter}}
+% \end{macrocode}
+% Prints any pending footnotes so that they appear above the potentially
+% large TOC:
+% \begin{macrocode}
+\LWR at printpendingnotes
+% \end{macrocode}
+% Place the list into its own chapter (if defined) or section:
+% \begin{macrocode}
+\@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}}
+% \end{macrocode}
+% Create a new \acro{HTML} |nav| containing the TOC/LOF/LOT:
+% \begin{macrocode}
+\LWR at htmlelementclass{nav}{#1}
+% \end{macrocode}
+% Create the actual list:
+% \begin{macrocode}
+\LWR at myshorttoc{#1}
+% \end{macrocode}
+% Close the |nav|:
+% \begin{macrocode}
+\LWR at htmlelementclassend{nav}{#1}
+}
+% \end{macrocode}
+% \end{macro}
+
+%
+% Patch \cs{@starttoc} to encapsulate the \acro{TOC} inside \acro{HTML} tags:
+% \begin{macrocode}
+\let\LWR at orig@starttoc\@starttoc
+
+\renewcommand{\@starttoc}[1]{
+\LWR at htmlelementclass{nav}{#1}
+\LWR at orig@starttoc{#1}
+\LWR at htmlelementclassend{nav}{#1}
+}
+% \end{macrocode}
+%
+% Patch \cs{tableofcontents}, etc. to print footnotes first.
+% \pkg{newfloat} uses \cs{listoffigures} for all future float types.
+% \begin{macrocode}
+\let\LWR at origtableofcontents\tableofcontents
+\let\LWR at origlistoffigures\listoffigures
+\let\LWR at origlistoftables\listoftables
+\renewcommand*{\tableofcontents}{%
+% \end{macrocode}
+% Copy the |.toc| file to |.sidetoc| for printing the sidetoc.
+% The original |.toc| file is renewed when \cs{tableofcontents} is finished.
+% \begin{macrocode}
+\LWR at copyfile{\jobname.toc}{\jobname.sidetoc}%
+\LWR at printpendingnotes%
+\LWR at origtableofcontents%
+}
+\renewcommand*{\listoffigures}{\LWR at printpendingnotes\LWR at origlistoffigures}
+\renewcommand*{\listoftables}{\LWR at printpendingnotes\LWR at origlistoftables}
+% \end{macrocode}
+
+
+% \subsection{High-level TOC commands}
+
+% \label{sec:listof}
+% \begin{macro}{\listof} \marg{type} \marg{title}
+%
+% Emulate the \cs{listof} command from the \pkg{float} package (\cref{sec:newfloat}).
+% Used to create lists of custom float types. Also used to redefine
+% the standard \LaTeX{} \cs{listoffigures} and \cs{listoftables} commands.
+% \begin{macrocode}
+\NewDocumentCommand{\listof}{m +m}{%
+\LWR at subtableofcontents{\@nameuse{ext@#1}}{#2}
+\expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname
+\immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname
+ \jobname.\csuse{ext@#1}\relax
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Side TOC}
+% \label{sec:sidetoc}
+
+% The ``side TOC'' is a table-of-contents positioned to the side.
+%
+% It may be renamed by redefining \cs{sidetocname}, and may contain paragraphs.
+%
+% \acro{CSS} may be used to format the sideTOC:
+%
+% \begin{docsidebar}[CSS related to sideTOC:]
+% \begin{description}[parsep=0ex]
+% \item [|nav.sidetoc|:] The entire sideTOC.
+% \item [|div.sidetoctitle|:] The title.
+% \item [|div.sidetoccontents|:] The table of contents.
+% \end{description}
+% \end{docsidebar}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \DescribeCounter{SideTOCDepth}
+% Controls how deep the side-TOC gets. Use a standard \LaTeX{} section level
+% similar to |tocdepth|.
+% \begin{macrocode}
+\newcounter{SideTOCDepth}
+\setcounter{SideTOCDepth}{1}
+% \end{macrocode}
+
+% \begin{macro}{\sidetocname}
+% Holds the default name for the sidetoc.
+%
+% \begin{macrocode}
+\newcommand{\sidetocname}{Contents}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at sidetoc}
+% Creates the actual side-TOC.
+% \begin{macrocode}
+\newcommand*{\LWR at sidetoc}{
+\LWR at stoppars
+
+% \end{macrocode}
+% The entire sideTOC is placed into a |nav| of class |sidetoc|.
+% \begin{macrocode}
+\LWR at htmlelementclass{nav}{sidetoc}
+
+\setcounter{tocdepth}{\value{SideTOCDepth}}
+
+% \end{macrocode}
+% The title is placed into a div of class |sidetoctitle|, and may
+% contain paragraphs.
+% \begin{macrocode}
+\begin{BlockClass}{sidetoctitle}
+\sidetocname
+\end{BlockClass}
+% \end{macrocode}
+% The table of contents is placed into a div of class |sidetoccontents|.
+% \begin{macrocode}
+\begin{BlockClass}{sidetoccontents}
+\LinkHome
+
+\LWR at myshorttoc{sidetoc}
+\end{BlockClass}
+\LWR at htmlelementclassend{nav}{sidetoc}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \subsection{Low-level TOC line formatting}
+
+% \begin{macro}{\numberline} \marg{number}
+%
+% (Called from each line in the |.aux|, |.lof| files.)
+%
+% Record this section number for further use:
+% \begin{macrocode}
+\renewcommand*{\numberline}[1]{%
+\LWR at sectionnumber{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\hypertoc} \marg{1: depth} \marg{2: class} \marg{3: name} \marg{4: page}
+%
+% Called by \cs{l at section}, etc. to create a hyperlink to a section.
+%
+% The autopage label is always created just after the section.
+%
+% \begin{description}
+% \item[\#1] is depth
+% \item[\#2] \acro{HTML} \acro{CSS} class is tocsection, tocsubsection, etc.
+% \item[\#3] the text of the caption
+% \item[\#4] page number
+% \end{description}
+% \begin{macrocode}
+\NewDocumentCommand{\hypertoc}{m m +m m}{%
+% \end{macrocode}
+% Respond to tocdepth:
+% \begin{macrocode}
+\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
+\LWR at startpars%
+% \end{macrocode}
+% Create an \acro{HTML} link to filename\#autosec-(page), with text of the caption,
+% of the given \acro{HTML} class.
+% \begin{macrocode}
+\LWR at subhyperrefclass{%
+\LWR at htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{#2}%
+\LWR at stoppars%
+}
+{}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\hypertocfloat} \marg{1: depth} \marg{2: class}
+% \marg{3: caption} \marg{4: page}
+%
+% \begin{description}
+% \item[\#1] is depth
+% \item[\#2] \acro{HTML} \acro{CSS} class is tocfigure, toctable
+% \item[\#3] the text of the caption
+% \item[\#4] page number
+% \end{description}
+
+% \begin{macrocode}
+\newcommand{\hypertocfloat}[4]{%
+\LWR at startpars
+% \end{macrocode}
+% Create an \acro{HTML} link to
+% filename\#autofloat-(float number), with text of the caption,
+% of the given \acro{HTML} class.
+% \begin{macrocode}
+\LWR at subhyperrefclass{%
+\LWR at htmlrefsectionfilename{autopage-\arabic{LWR at nextautopage}}%
+\#autofloat-\arabic{LWR at nextautofloat}}%
+{#3}{#2}%
+\LWR at stoppars%
+}
+% \end{macrocode}
+% \end{macro}
+
+% Automatically called by |\contentsline|:
+% \begin{macrocode}
+\renewcommand{\l at part}[2]{\hypertoc{-1}{tocpart}{#1}{#2}}
+\DeclareDocumentCommand{\l at chapter}{m m}
+ {\hypertoc{0}{tocchapter}{#1}{#2}}
+\renewcommand{\l at section}[2]{\hypertoc{1}{tocsection}{#1}{#2}}
+\renewcommand{\l at subsection}[2]{\hypertoc{2}{tocsubsection}{#1}{#2}}
+\renewcommand{\l at subsubsection}[2]
+ {\hypertoc{3}{tocsubsubsection}{#1}{#2}}
+\renewcommand{\l at paragraph}[2]{\hypertoc{4}{tocparagraph}{#1}{#2}}
+\renewcommand{\l at subparagraph}[2]{\hypertoc{5}{tocsubparagraph}{#1}{#2}}
+\renewcommand{\l at figure}[2]{\hypertocfloat{1}{tocfigure}{#1}{#2}}
+\renewcommand{\l at table}[2]{\hypertocfloat{1}{toctable}{#1}{#2}}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \section{Index}
+
+% See:\\
+% \href{http://tex.stackexchange.com/questions/187038/how-to-mention-section-number-in-index-created-by-imakeidx}
+% {\texttt{http://tex.stackexchange.com/questions/187038/\\
+% \hspace*{2em}how-to-mention-section-number-in-index-created-by-imakeidx}}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at indexsection}
+%
+% Controls whether the index will be in a section or a chapter, depending on
+% the documentclass.
+% \begin{macrocode}
+\@ifundefined{chapter}
+ {\newcommand*{\LWR at indexsection}{\section{\indexname}}}
+ {\newcommand*{\LWR at indexsection}{\chapter{\indexname}}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\printindex}
+% \begin{macrocode}
+\let\LWR at origprintindex\printindex
+
+\renewcommand*{\printindex}
+{
+\LWR at indexsection
+\LWR at startpars
+\LWR at origprintindex
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{environment}{theindex}
+% \begin{macrocode}
+\renewenvironment*{theindex}{%
+\let\item\LWR at indexitem%
+\let\subitem\LWR at indexsubitem%
+\let\subsubitem\LWR at indexsubsubitem%
+}{}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{macro}{\LWR at indexitem}
+% \begin{macrocode}
+\newcommand{\LWR at indexitem}{
+
+\InlineClass{indexitem}{}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at indexitem}
+% \begin{macrocode}
+\newcommand{\LWR at indexsubitem}{
+
+\InlineClass{indexsubitem}{}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at indexitem}
+% \begin{macrocode}
+\newcommand{\LWR at indexsubsubitem}{
+
+\InlineClass{indexsubsubitem}{}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\hyperindexref} \marg{autosecnumber}
+%
+% |\hyperindexref{web address}| is inserted into |*.ind| by
+% the xindy style file |lwarp_html.xdy|
+%
+% \changes{v0.20}{2016/12/19}{Print mode provided in case hyperref not used.}
+% \begin{macrocode}
+\newcommand*{\hyperindexref}[1]{
+\LWR at htmltag{a href="%
+% \end{macrocode}
+% Create an \acro{HTML} reference to the autosection:
+% \begin{macrocode}
+\LWR at htmlrefsectionfilename{autopage-#1}\#autosec-#1"{}}%
+% \end{macrocode}
+% Add the section number and section name, then close the tag:
+% \begin{macrocode}
+\LWR at origref{autopage-#1}\enskip\LWR at nameref{autopage-#1}%
+\LWR at htmltag{/a}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \codeprint
+%
+% A null command for print mode, in case \pkg{hyperref} was not used:
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand{\hyperindexref}[1]{#1}
+\end{warpprint}
+% \end{macrocode}
+
+
+
+
+% \section{Math}
+% \label{sec:math}
+%
+% \limitsmath
+%
+%
+% \label{ex:mathjaxmacros}
+% As an example of using custom \LaTeX\ macros with MathJax,
+% \margintag{custom MathJax macros}
+% place the following at the start of the document,
+% after |\begin{document}|:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \begin{warpHTML} % Only for HTML output,
+% \ifbool{mathjax} % and only for MathJax output:
+% {
+% \( % New macros for MathJax are placed inside a math expression:
+% \newcommand{\expval}[1]{\langle#1\rangle}
+% \newcommand{\abs}[1]{\lvert#1\rvert}
+% \)
+% }{}
+% \end{warpHTML}
+% \end{Verbatim}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+
+% \DescribeMacro{\$}
+% Plain dollar signs appearing in the \acro{HTML} output may be interpreted
+% by MathJax to be math shifts.
+% For a plain text dollar |\$|, print it inside a span to avoid
+% it being interpreted by MathJax.
+% \changes{v0.19}{2016/06/08}{Avoids MathJax.}
+% \begin{macrocode}
+\let\LWR at origtextdollar\$
+
+\renewcommand*{\$}{%
+\LWR at htmltagc{span}%
+\LWR at origtextdollar%
+\LWR at htmltagc{/span}%
+}
+% \end{macrocode}
+
+
+
+%
+% \DescribeCounter{LWR at externalfilecnt}
+% Counter for the external files which are generated and then referenced from the \acro{HTML}:
+% \begin{macrocode}
+\newcounter{LWR at externalfilecnt}
+% \end{macrocode}
+
+
+
+% \subsection{Inline and display math}
+
+% \begin{macrocode}
+\let\LWR at origdollar=$
+\let\secondorigdollar=$% balance for editor syntax highlighting
+% \end{macrocode}
+
+% \begin{macrocode}
+\let\LWR at origopenparen\(
+\let\LWR at origcloseparen\)
+% \end{macrocode}
+
+% \DescribeObject{\$}
+% \DescribeObject{\$\$}
+% Redefine the dollar sign to place math inside a \env{lateximage}, or use MathJax:
+% \begin{macrocode}
+\begingroup
+\catcode`\$=\active%
+\protected\gdef${\@ifnextchar$\LWR at doubledollar\LWR at singledollar}%
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at doubledollar}
+% \changes{v0.19}{2016/05/25}{MathJax support.}
+% Redefine the double dollar sign to place math inside a \env{lateximage}, or use MathJax:
+% \begin{macrocode}
+\gdef\LWR at doubledollar$#1$${
+\ifbool{mathjax}%
+% \end{macrocode}
+% For MathJax, print the math between |\[| and |\]|:
+% \begin{macrocode}
+{\textbackslash[\LWR at HTMLsanitize{#1}\textbackslash]}
+% \end{macrocode}
+% For SVG, print the math inside a \env{lateximage}, with an ALT tag of the \LaTeX\ code:
+% \begin{macrocode}
+{% not mathjax
+
+\begin{lateximage}%
+[\textbackslash{[} \LWR at HTMLsanitize{#1} \textbackslash{]}]%
+\LWR at origdollar\LWR at origdollar#1\LWR at origdollar\LWR at origdollar%
+\end{lateximage}
+
+}
+}%
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at singledollar}
+% \changes{v0.19}{2016/05/25}{MathJax support.}
+% Redefine the single dollar sign to place math inside a \env{lateximage}, or use MathJax:
+% \begin{macrocode}
+\gdef\LWR at singledollar#1${%
+\ifbool{mathjax}%
+% \end{macrocode}
+% For MathJax, print the math between |\(| and |\)|:
+% \begin{macrocode}
+{\textbackslash(\LWR at HTMLsanitize{#1}\textbackslash)}
+% \end{macrocode}
+% For SVG, print the math inside a \env{lateximage}, with an ALT tag of the \LaTeX\ code:
+% \begin{macrocode}
+{% not mathjax
+\begin{lateximage}%
+[\textbackslash( \LWR at HTMLsanitize{#1} \textbackslash)]%
+\LWR at origdollar#1\LWR at origdollar%
+\end{lateximage}%
+}%
+}%
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\(}
+% \begin{macro}{\)}
+% Redefine to the above dollar macros.
+% \begin{macrocode}
+\gdef\(#1\){$#1$}
+\gdef\[#1\]{$$#1$$}
+
+\endgroup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+
+% Remove the old |math| and |displaymath| environments:
+% \begin{macrocode}
+\let\math\relax
+\let\endmath\relax
+\let\displaymath\relax
+\let\enddisplaymath\relax
+% \end{macrocode}
+
+% \begin{environment}{math}
+% Set math mode then typeset the body of what was between the begin/end.
+% See the \pkg{environ} package for \cs{BODY}.
+% \begin{macrocode}
+\NewEnviron{math}{\expandafter\(\BODY\)}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{displaymath}
+% Set math mode then typeset the body of what was between the begin/end.
+% See the \pkg{environ} package for \cs{BODY}.
+% \begin{macrocode}
+\NewEnviron{displaymath}{\expandafter\[\BODY\]\@ignoretrue}
+% \end{macrocode}
+% \end{environment}
+
+% When the document begins, the dollar sign must be made active to trigger the new math macros:
+% \begin{macrocode}
+\AtBeginDocument{\catcode`\$=\active}
+% \end{macrocode}
+
+
+
+% \subsection{MathJax support}
+% \changes{v0.19}{2016/05/25}{MathJax support added.}
+%
+% \DescribeCounter{LWR at nextequation} Used to add one to compute the next equation number.
+% \begin{macrocode}
+\newcounter{LWR at nextequation}
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\LWR at syncmathjax} Sets the MathJax equation format
+% and number for the following equations.
+%
+% These MathJax commands are printed inside ``\cs{(}'' and ``\cs{)}'' characters.
+% They are printed to \acro{HTML} output, not interpreted by \LaTeX.
+% \begin{macrocode}
+\newcommand*{\LWR at syncmathjax}{%
+% \end{macrocode}
+% If using chapters, place the chapter number in front of the equation.
+% Otherwise, use the simple equation number.
+% \begin{macrocode}
+\ifcsdef{thechapter}{
+\BlockClassSingle{hidden}{
+\textbackslash(
+\textbackslash{}seteqsection \{\thechapter\}
+\textbackslash)
+}
+}
+{}% not using chapters
+
+% \end{macrocode}
+% MathJax doesn't allow setting the equation number to 1:
+% \begin{macrocode}
+\ifthenelse{\cnttest{\value{equation}}>0}
+{
+% \end{macrocode}
+% Tell MathJax that the next set of equations begins with the current \LaTeX{} equation
+% number, plus one.
+% \begin{macrocode}
+\setcounter{LWR at nextequation}{\value{equation}}
+\addtocounter{LWR at nextequation}{1}
+% \end{macrocode}
+% Place the MathJax command inside ``\cs{(}'' and ``\cs{)}'' characters,
+% to be printed to \acro{HTML}, not interpreted by \LaTeX.
+% \begin{macrocode}
+\BlockClassSingle{hidden}{
+\textbackslash(
+\textbackslash{}seteqnumber \{\arabic{LWR at nextequation}\}
+\textbackslash)
+}
+}{}% not eq > 1
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+
+% \begin{macro}{\LWR at restoremathlatexformatting}
+% While producing math, use regular \LaTeX\ formatting instead of \acro{HTML} tags.
+% \begin{macrocode}
+\newcommand*{\LWR at restoremathlatexformatting}{%
+\let\hspace\LWR at orighspace%
+\let\rule\LWR at origrule%
+\let\,\LWR at origcomma% disable HTML short unbreakable space
+\let\textit\LWR at origtextit%
+\let\textbf\LWR at origtextbf%
+\let\texttt\LWR at origtexttt%
+\let\textsc\LWR at origtextsc%
+\let\textsf\LWR at origtextsf%
+\let\textrm\LWR at origtextrm%
+\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
+\let\textsuperscript\LWR at origtextsuperscript%
+\let\textsubscript\LWR at origtextsubscript%
+\let~\LWR at origtilde%
+\let\enskip\LWR at origenskip%
+\let\quad\LWR at origquad%
+\let\qquad\LWR at origqquad%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at hidelatexequation} \marg{environment} \marg{contents}
+%
+% Creates the \LaTeX{} version of the equation
+% inside an \acro{HTML} comment.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at hidelatexequation}{m +m}{%
+% \end{macrocode}
+% Stop \acro{HTML} paragraph handling and open an \acro{HTML} comment:
+% \begin{macrocode}
+\LWR at stoppars
+\LWR at htmlopencomment
+
+% \end{macrocode}
+% Start the LaTeX math environment inside the \acro{HTML} comment:
+% \begin{macrocode}
+\begingroup
+\csuse{LWR at orig#1}
+% \end{macrocode}
+% While in the math environment,
+% restore various commands to their \LaTeX\ meanings.
+% \begin{macrocode}
+\LWR at restoremathlatexformatting
+% \end{macrocode}
+% When a label is encountered, the HTML comment is closed,
+% the label is generated in an HTML-output context,
+% then the HTML comment is opened again.
+% See \cs{LWR at htmlmathlabel} in \cref{sec:amsmathsupport}.
+%
+% Print the contents of the equation:
+% \begin{macrocode}
+#2
+% \end{macrocode}
+% End the \LaTeX{} math environment inside the \acro{HTML} comment:
+% \begin{macrocode}
+\csuse{LWR at origend#1}
+\endgroup
+
+% \end{macrocode}
+% Close the \acro{HTML} comment and resume \acro{HTML} paragraph handling:
+% \begin{macrocode}
+\LWR at htmlclosecomment
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+
+
+%
+% \begin{macro}{\LWR at addmathjax} \marg{environment} \marg{contents}
+%
+% Given the name of a math environment and its contents,
+% create a MathJax instance.
+% The contents are printed to \acro{HTML} output, not interpreted by \LaTeX.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at addmathjax}{m +m}{%
+
+% \end{macrocode}
+% Enclose the MathJax environment inside printed ``\cs{(}'' and ``\cs{)}'' characters.
+% \begin{macrocode}
+\textbackslash{}begin\{#1\}
+% \end{macrocode}
+% Print the contents, sanitizing for \acro{HTML} special characters.
+% \begin{macrocode}
+\LWR at HTMLsanitizeexpand{\detokenize\expandafter{#2}}
+% \end{macrocode}
+% Close the MathJax environment:
+% \begin{macrocode}
+\textbackslash{}end\{#1\}
+
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{Equation environment}
+%
+% Remember existing \env{equation} environment:
+% \begin{macrocode}
+\let\LWR at origequation\equation
+\let\LWR at origendequation\endequation
+% \end{macrocode}
+%
+% Remove existing \env{equation} environment:
+% \begin{macrocode}
+\let\equation\relax
+\let\endequation\relax
+% \end{macrocode}
+
+
+% \begin{environment}{equation}
+% \changes{v0.19}{2016/05/25}{MathJax support.}
+% The new \env{equation} environment is created with
+% \cs{NewEnviron} (from the \pkg{environ} package),
+% which stores the contents of its environment in a
+% macro called \cs{BODY}.
+%
+% For \acro{SVG} math output,
+% the contents are typeset using the original \env{equation}
+% inside a \env{lateximage}, along with an ALT tag
+% containing a detokenized copy of the \LaTeX\ source for
+% the math.
+%
+% For MathJax output, the contents are typeset in an
+% original \env{equation} environment placed inside a \acro{HTML}
+% comment, with special processing for \cs{label}s.
+% The contents are also printed to the \acro{HTML} output
+% for processing by the MathJax script.
+% \begin{macrocode}
+\NewEnviron{equation}{%
+
+\ifbool{mathjax}
+% \end{macrocode}
+% MathJax output:
+% \begin{macrocode}
+{
+% \end{macrocode}
+% Print commands to syncronize MathJax's equation number and format
+% to the current \LaTeX\ chapter/section and equation number:
+% \begin{macrocode}
+\LWR at syncmathjax
+% \end{macrocode}
+% Print the \LaTeX\ math inside an \acro{HTML} comment:
+% \begin{macrocode}
+\LWR at hidelatexequation{equation}{\BODY}
+}
+% \end{macrocode}
+% SVG output:
+% Create the |lateximage| along with an \acro{HTML} ALT tag
+% having an equation number, the \LaTeX{} equation environment
+% commmands, and the contents of the environment's \cs{BODY}.
+% \begin{macrocode}
+{% not mathjax
+% \end{macrocode}
+% Begin the \env{lateximage} with an ALT tag containing the math source:
+% \begin{macrocode}
+\begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
+ \LWR at HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
+ \textbackslash{end\{equation\}}]% alt tag
+% \end{macrocode}
+% Create the actual \LaTeX-formatted equation inside
+% the |lateximage| using the contents of the environment.
+% \begin{macrocode}
+\LWR at origequation
+\BODY% contents collected by NewEnviron
+\LWR at origendequation
+\end{lateximage}%
+}
+
+% \end{macrocode}
+% After the environment, if MathJax, print the math to the \acro{HTML} output
+% for MathJax processing:
+% \begin{macrocode}
+}[\ifbool{mathjax}{\LWR at addmathjax{equation}{\BODY}}{}]
+% \end{macrocode}
+% \end{environment}
+
+
+
+% \subsection{AMS Math environments}
+% \changes{v0.19}{2016/05/25}{MathJax support added.}
+%
+% \subsubsection{Support macros}
+% \label{sec:amsmathsupport}
+%
+% \DescribeBoolean{LWR at amsmultline} True if processing a multline environment.
+%
+% To compensate for \env{multline}-spefific code,
+% |LWR at amsmultline| is used to add extra horizontal space in \cs{LWR at htmlmathlabel} if
+% is used in an \pkg{amsmath} environment which is
+% not a \env{multline} environment and not an \env{equation}.
+% \begin{macrocode}
+\newbool{LWR at amsmultline}
+\boolfalse{LWR at amsmultline}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at htmlmathlabel} \marg{label}
+% \index{label>math environment}
+%
+% \cs{label} when called inside a \LaTeX{} AMS math environment's math mode
+% which is encased inside an \acro{HTML} comment
+% while creating a \acro{HTML} document.
+% \begin{macrocode}
+
+\newcommand*{\LWR at htmlmathlabel}[1]{%
+\LWR at traceinfo{LWR at htmlmathlabel #1}%
+\ifbool{mathjax}{%
+% \end{macrocode}
+% The combined \LaTeX\ \& \acro{HTML} label is printed in a \cs{text} field:
+% \begin{macrocode}
+\text{
+% \end{macrocode}
+% Shift the label over to the right side of the environment to avoid
+% over-printing the math:
+% \begin{macrocode}
+\ifbool{LWR at amsmultline}{}{\hspace*{\totwidth@}}
+% \end{macrocode}
+% Temporarily end the \acro{HTML} comment,
+% insert the \LaTeX{} \& \acro{HTML} label, then
+% resume the \acro{HTML} comment.
+% \cs{@firstofone} is required to remove extra braces
+% introduced by the \pkg{amsmath} package.)
+% \begin{macrocode}
+\LWR at htmlclosecomment\LWR at sublabel{\@firstofone#1}\LWR at htmlopencomment}%
+}%
+{\LWR at sublabel{\@firstofone#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at beginhideamsmath}
+% Starts hiding \LaTeX\ math inside an \acro{HTML} comment.
+% \begin{macrocode}
+\newcommand*{\LWR at beginhideamsmath}{
+\LWR at stoppars
+
+\LWR at htmlopencomment
+
+\begingroup
+\LWR at restoremathlatexformatting
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at endhideamsmath}
+% Ends hiding \LaTeX\ math inside an \acro{HTML} comment.
+% \begin{macrocode}
+\newcommand*{\LWR at endhideamsmath}{
+\endgroup
+
+\LWR at htmlclosecomment
+
+\LWR at startpars
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \subsubsection{Environment patches}
+% \changes{v0.19}{2016/05/25}{MathJax support added.}
+
+% The following \pkg{amsmath} environments already collect their contents
+% in \cs{@envbody} for further processing.
+%
+% For \acro{SVG} math: Each envrionment is encapsulated inside a \env{lateximage} environment,
+% along with a special |LWRAMSMATHBODY| argument
+% telling \env{lateximage} to use as the \acro{HTML} ALT tag the environment's contents which
+% were automatically captured by the \AmS{} environment.
+%
+% For MathJax: Each environment is syched with \LaTeX's equation numbers,
+% typeset with \LaTeX\ inside an \acro{HTML} comment, then
+% printed to \acro{HTML} output for MathJax to process.
+%
+
+% \begin{environment}{multline}
+% \begin{macrocode}
+\BeforeBeginEnvironment{multline}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\booltrue{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{multline}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\boolfalse{LWR at amsmultline}
+\LWR at addmathjax{multline}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{multline*}
+% \begin{macrocode}
+\BeforeBeginEnvironment{multline*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\booltrue{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{multline*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\boolfalse{LWR at amsmultline}
+\LWR at addmathjax{multline*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{gather}
+% \begin{macrocode}
+\BeforeBeginEnvironment{gather}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{gather}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{gather}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{environment}{gather*}
+% \begin{macrocode}
+\BeforeBeginEnvironment{gather*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{gather*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{gather*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{align}
+% \begin{macrocode}
+\BeforeBeginEnvironment{align}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{align}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{align}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{align*}
+% \begin{macrocode}
+\BeforeBeginEnvironment{align*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{align*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{align*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{flalign}
+% \begin{macrocode}
+\BeforeBeginEnvironment{flalign}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{flalign}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{flalign}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+
+% \begin{environment}{flalign*}
+% \begin{macrocode}
+\BeforeBeginEnvironment{flalign*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{flalign*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{flalign*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Lateximages}
+
+% A |\lateximage| is typeset on its own \acro{PDF} page inside an \acro{HTML} comment starting on the preceeding page
+% and ending on following page, and instructions are written to
+% |lateximage.sh| or |lateximages.cmd| to extract the |\lateximage| from the page of the \acro{PDF} file
+% then generate an accompanying |.svg| file image file. Meanwhile, instructions to
+% show this image are placed into the \acro{HTML} file after the comment.
+%
+% Since the |\lateximage| is placed onto its own \acro{PDF} page, which |pdftotext| will read
+% and try to convert to text, an \acro{HTML} open comment is placed onto the bottom of the current
+% page, but it must appear below any footnotes on the current page, so
+% a special page style (|LWR at commentfooterstyle|) is used.
+%
+% An \acro{HTML} span is created to hold both the \acro{HTML} comment which will have the |pdftotext| conversion,
+% and also the link to the final |.svg| image.
+%
+% \limitslateximagefontsize
+%
+%
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \DescribeObject{LWR at commentfooterstyle}
+% \begin{macrocode}
+\newpagestyle{LWR at commentfooterstyle}{
+ \sethead{}{}{}
+ \setfoot{\LWR at htmlopencomment}{}{}
+}
+% \end{macrocode}
+
+% \DescribeCounter{LWR at lateximagenumber}
+% Sequence the images.
+% \begin{macrocode}
+\newcounter{LWR at lateximagenumber}
+\setcounter{LWR at lateximagenumber}{0}
+% \end{macrocode}
+% \DescribeCounter{LWR at lateximagedepth}
+% Do not create |\lateximage| inside of |\lateximage|.
+% \begin{macrocode}
+\newcounter{LWR at lateximagedepth}
+\setcounter{LWR at lateximagedepth}{0}
+% \end{macrocode}
+
+% Declare the |\LWR at file| for writing
+% to generate file |lateximages.sh| or |lateximages.cmd|:
+% \begin{macrocode}
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+% \end{macrocode}
+% A few utility macros to write special characters:
+% \begin{macrocode}
+\edef\LWR at hashmark{\string#} % for use in \write
+\edef\LWR at percent{\@percentchar} % for use in \write
+% \end{macrocode}
+
+% \DescribeCounter{LWR at nextpage}
+% Used to count ahead to the next page:
+% \begin{macrocode}
+\newcounter{LWR at nextpage}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \begin{macro}{\LateximageFontSizeName}
+% \changes{v0.19}{2016/05/29}{Add: User-adjustable math/lateximage font size.}
+% Declares how large to write text in the |\lateximage|. The |.svg| file text size
+% should blend well with the surrounding \acro{HTML} text size.
+%
+% \emph{Do not include the leading backslash in the name.}
+% \begin{macrocode}
+\newcommand*{\LateximageFontSizeName}{normalsize}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at HTMLsanitize} \marg{text}
+%
+% Math expressions are converted to |lateximage|s, and some math environments may contain
+% ``\&'', ``\textless'', or ``\textgreater'', which should not be allowed
+% inside an \acro{HTML} ALT tag, so must convert them to \acro{HTML} entities.
+%
+% Two versions follow, depending on expansion needs.
+% There may be a better way\dots
+% \begin{macrocode}
+\newcommand{\LWR at HTMLsanitize}[1]{%
+\protect\StrSubstitute{\detokenize{#1}}%
+{\detokenize{&}}%
+{\detokenize{&}}[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{<}}%
+{\detokenize{<}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{>}}%
+{\detokenize{>}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{##}}%
+{\#}%
+[\LWR at strresult]%
+\LWR at strresult%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at HTMLsanitizeexpand} \marg{text}
+%
+% This version expands the argument before sanitizing it.
+% \begin{macrocode}
+\newcommand{\LWR at HTMLsanitizeexpand}[1]{%
+\protect\StrSubstitute{\detokenize\expandafter{#1}}%
+{\detokenize{&}}%
+{\detokenize{&}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{<}}%
+{\detokenize{<}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{>}}%
+{\detokenize{>}}%
+[\LWR at strresult]%
+\LWR at strresult%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{environment}{lateximage} \oarg{alttag}
+% \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.}
+% \begin{macrocode}
+\NewDocumentEnvironment{lateximage}{O{image}}{%
+\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{0}}%
+% \end{macrocode}
+% If nesting inside an already-existing lateximage, simply record one more level:
+% \begin{macrocode}
+{%
+\addtocounter{LWR at lateximagedepth}{1}%
+}%
+% \end{macrocode}
+% Otherwise, this is the outer-most lateximage:
+% \begin{macrocode}
+{% start of outer-most lateximage
+% \end{macrocode}
+% Starting a new lateximage:
+% \begin{macrocode}
+\addtocounter{LWR at lateximagenumber}{1}%
+% \end{macrocode}
+% While inside a lateximage, do not use mathjax:
+% \begin{macrocode}
+\boolfalse{mathjax}
+% \end{macrocode}
+% Be sure that are doing a paragraph:
+% \begin{macrocode}
+\LWR at ensuredoingapar%
+% \end{macrocode}
+% Next file:
+% \begin{macrocode}
+\addtocounter{LWR at externalfilecnt}{1}%
+% \end{macrocode}
+% Figure out what the next page number will be:
+% \begin{macrocode}
+\setcounter{LWR at nextpage}{\thepage}%
+\addtocounter{LWR at nextpage}{1}%
+% \end{macrocode}
+% Create an \acro{HTML} span which will hold the comment which contains the |pdftotext| translation
+% of the image's page, and also will hold the link to the |.svg| file:
+% \begin{macrocode}
+\LWR at htmltag{span id="lateximage\arabic{LWR at lateximagenumber}" %
+class="lateximagesource"{}} \LWR at orignewline
+% \end{macrocode}
+% Write instructions to the lateximage.sh file:
+% \begin{macrocode}
+\immediate\write\LWR at file{%
+ pdfseparate -f \theLWR at nextpage \space -l %
+ \theLWR at nextpage \space %
+ \jobname.pdf lateximagetemp-\LWR at percent d.pdf}%
+% keep the space before 'd.pdf'
+\immediate\write\LWR at file{%
+ pdfcrop --hires lateximagetemp-\theLWR at nextpage.pdf
+ lateximage-\theLWR at externalfilecnt.pdf}%
+\immediate\write\LWR at file{%
+ pdftocairo -svg lateximage-\theLWR at externalfilecnt.pdf
+ lateximage-\theLWR at externalfilecnt.svg}%
+\immediate\write\LWR at file{%
+ \OSmv lateximage-\theLWR at externalfilecnt.svg %
+ lateximages\OSPathSymbol}%
+\immediate\write\LWR at file{%
+ \OSrm lateximage-\theLWR at externalfilecnt.pdf
+ lateximagetemp-\theLWR at nextpage.pdf}%
+% \end{macrocode}
+% Place an open comment tag at the bottom of page; footnotes will be above this tag.
+% This will hide any traces of the lateximage \acro{PDF} page which were picked up by
+% |pdftotext|.
+% \begin{macrocode}
+\LWR at origthispagestyle{LWR at commentfooterstyle}%
+\addtocounter{LWR at lateximagedepth}{1}%
+% \end{macrocode}
+% Start the new \acro{PDF} page:
+% \begin{macrocode}
+\LWR at orignewpage%
+% \end{macrocode}
+% Typeset the image in a ``standard'' width page and font size:
+% \begin{macrocode}
+\LWR at origminipage{6in}%
+\csuse{LWR at orig\LateximageFontSizeName}%
+% \end{macrocode}
+% Temporarily restore formatting to its \acro{PDF} definitions:
+% Do not produce \acro{HTML} tags for \cs{hspace}, etc. inside a lateximage.
+% \begin{macrocode}
+\let\hspace\LWR at orighspace%
+\let\rule\LWR at origrule%
+\let\,\LWR at origcomma% disable HTML short unbreakable space
+\let\textit\LWR at origtextit%
+\let\textbf\LWR at origtextbf%
+\let\texttt\LWR at origtexttt%
+\let\textsc\LWR at origtextsc%
+\let\textsf\LWR at origtextsf%
+\let\textrm\LWR at origtextrm%
+\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
+\let\textsuperscript\LWR at origtextsuperscript%
+\let\textsubscript\LWR at origtextsubscript%
+\let~\LWR at origtilde%
+\let\enskip\LWR at origenskip%
+\let\quad\LWR at origquad%
+\let\qquad\LWR at origqquad%
+\let\tabular\LWR at origtabular%
+\let\endtabular\LWR at origendtabular%
+\let\newline\LWR at orignewline%
+}% end of outer-most lateximage
+}% end of \begin{lateximage}
+{% start of \end{lateximage}
+\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{1}}%
+% \end{macrocode}
+% If nesting inside an already-existing lateximage, simply record one more level:
+% \begin{macrocode}
+{%
+\addtocounter{LWR at lateximagedepth}{-1}%
+}%
+% \end{macrocode}
+% if this is the outer-most lateximage:
+% \begin{macrocode}
+{% end of outer-most lateximage
+% \end{macrocode}
+% Finish the lateximage minipage and start a new \acro{PDF} page:
+% \begin{macrocode}
+\LWR at origendminipage%
+\LWR at orignewpage%
+\LWR at origscriptsize%
+% \end{macrocode}
+% Close the \acro{HTML} comment which encapsulated any traces of the lateximage picked up by |pdftotext|:
+% \begin{macrocode}
+\LWR at htmlclosecomment{}\LWR at orignewline%
+% \end{macrocode}
+% Create a link to the lateximage, allowing its natural height:
+%
+% If the alt tag is given as ``LWRAMSMATHBODY'', then use the text collected by the
+% amsmath multline, gather, or align environments.
+% \begin{macrocode}
+\ifthenelse{\equal{#1}{LWRAMSMATHBODY}}%
+{%
+\LWR at subinlineimage[%
+\LWR at HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+]%
+{lateximage}%
+{lateximages\OSPathSymbol{}lateximage-\theLWR at externalfilecnt}%
+{svg}%
+{}%
+}%
+{%
+\LWR at subinlineimage[#1]{lateximage}%
+{lateximages\OSPathSymbol{}lateximage-\theLWR at externalfilecnt}{svg}{}%
+}%
+% \LWR at orignewline% Removed to prevent extra space.
+% \end{macrocode}
+% Be sure that are doing a paragraph:
+% \begin{macrocode}
+\LWR at ensuredoingapar%
+% \end{macrocode}
+% Close the \acro{HTML} span which has the |pdftotext| comment and also the link to the |.svg| image:
+% \begin{macrocode}
+\LWR at htmltag{/span}%
+\LWR at htmlcomment{End of lateximage}%
+% \LWR at orignewline% Removed to prevent extra space.
+% \end{macrocode}
+% Undo one lateximage level:
+% \begin{macrocode}
+\addtocounter{LWR at lateximagedepth}{-1}%
+}% end of outer-most lateximage
+}%
+\end{warpHTML}
+% \end{macrocode}
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newenvironment{lateximage}[1][]{\begingroup}{\endgroup}
+\end{warpprint}
+% \end{macrocode}
+% \end{environment}
+
+
+
+
+% \section{\env{center}, \env{flushleft}, \env{flushright}}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{environment}{center}
+% Replace \env{center} functionality with \acro{CSS} tags:
+% \begin{macrocode}
+\renewenvironment*{center}
+{\BlockClass{center}}
+{\endBlockClass}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{environment}{flushright}
+% \begin{macrocode}
+\renewenvironment*{flushright}
+{\BlockClass{flushright}}
+{\endBlockClass}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{environment}{flushleft}
+% \begin{macrocode}
+\renewenvironment*{flushleft}
+{\BlockClass{flushleft}}
+{\endBlockClass}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+
+
+
+
+
+
+% \section{Siunitx}
+% \label{sec:siunitx}
+
+% \DescribePackage{siunitx}
+%
+% \limitssiunitx
+%
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% Options for siunitx:
+% \begin{macrocode}
+\PassOptionsToPackage{
+ detect-mode=true,
+ per-mode=symbol, % fraction is not seen by pdftotext
+ text-celsius = {\HTMLentity{deg}C},
+ text-degree = {\HTMLentity{deg}},
+}{siunitx}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+% \section{Graphics}
+
+% \DescribePackage{graphics}
+%
+% \DescribePackage{graphicx}
+%
+% \index{images>graphicx package}
+%
+% \limitsgraphics
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+
+% \subsection{\cs{graphicspath}}
+
+% \begin{macro}{\graphicspath} \marg{path}
+% \begin{macrocode}
+\newcommand*{\thisgraphicspath}{{}}
+\renewcommand*{\graphicspath}[1]{\renewcommand*{\thisgraphicspath}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% ^^A \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% ^^A \DeclareGraphicsExtensions{.svg,.gif,.png,.jpg}
+% ^^A \DeclareGraphicsRule{.svg}{svg}{.png}{}
+% ^^A \end{Verbatim}
+
+% \begin{macro}{\DeclareGraphicsExtensions} \marg{list}
+% \begin{macro}{\DeclareGraphicsRule} \marg{} \marg{} \marg{} \marg{}
+% \begin{macrocode}
+\renewcommand*{\DeclareGraphicsExtensions}[1]{}
+\renewcommand*{\DeclareGraphicsRule}[4]{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+
+% \subsection{Length conversions and graphics options}
+%
+% A scaled image in \LaTeX{} by default takes only as much space
+% on the page as it
+% requires, but \acro{HTML} browsers use as much space as the
+% \watchout[whitespace]
+% original unscaled image would have taken,
+% with the scaled image over- or under-flowing the area.
+
+% \begin{macrocode}
+\renewcommand*{\unitspace}{}
+% \end{macrocode}
+
+% Used to store the user's selected dimensions and \acro{HTML} class.
+%
+% The class defaults to ``inlineimage'' unless changed by a |class=xyx| option.
+% \begin{macrocode}
+\newlength{\LWR at igwidth}
+\newlength{\LWR at igheight}
+\newcommand*{\LWR at igwidthstyle}{}
+\newcommand*{\LWR at igheightstyle}{}
+\newcommand*{\LWR at igorigin}{}
+\newcommand*{\LWR at igangle}{}
+\newcommand*{\LWR at igxscale}{1}
+\newcommand*{\LWR at igyscale}{1}
+\newcommand*{\LWR at igclass}{inlineimage}
+% \end{macrocode}
+
+% Set the actions of each of the key/value combinations for
+% \cs{includegraphics}. Many are ignored.
+%
+% If an optional width was given, set an \acro{HTML} style:
+% \begin{macrocode}
+\define at key{igraph}{width}{%
+\setlength{\LWR at igwidth}{#1}%
+\ifthenelse{\lengthtest{\LWR at igwidth > 0pt}}%
+{%
+% \end{macrocode}
+% Default to use the converted fixed length given:
+% \begin{macrocode}
+\uselengthunit{PT}%
+\renewcommand*{\LWR at igwidthstyle}{width:\rndprintlength{\LWR at igwidth}}%
+% \end{macrocode}
+% If ex or em dimensions were given, use those instead:
+% \begin{macrocode}
+\IfEndWith{#1}{ex}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes ex
+{}% not ex
+\IfEndWith{#1}{em}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes em
+{}% not em
+\IfEndWith{#1}{\%}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes percent
+{}% not percent
+\IfEndWith{#1}{px}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes px
+{}% not px
+}{}% end of length > 0pt
+}
+% \end{macrocode}
+%
+% If an optional height was given, set an \acro{HTML} style:
+% \begin{macrocode}
+\define at key{igraph}{height}{%
+\setlength{\LWR at igheight}{#1}%
+\ifthenelse{\lengthtest{\LWR at igheight > 0pt}}%
+{%
+% \end{macrocode}
+% Default to use the converted fixed length given:
+% \begin{macrocode}
+\uselengthunit{PT}%
+\renewcommand*{\LWR at igheightstyle}{%
+height:\rndprintlength{\LWR at igheight} %
+}%
+% \end{macrocode}
+% If ex or em dimensions were given, use those instead:
+% \begin{macrocode}
+\IfEndWith{#1}{ex}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes ex
+{}% not ex
+\IfEndWith{#1}{em}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes em
+{}% not em
+\IfEndWith{#1}{\%}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes percent
+{}% not percent
+\IfEndWith{#1}{px}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes px
+{}% not px
+}{}% end of length > 0pt
+}
+% \end{macrocode}
+%
+%
+% Handle origin key:
+% \begin{macrocode}
+\define at key{igraph}{origin}{%
+\renewcommand*{\LWR at igorigin}{#1}%
+}
+% \end{macrocode}
+%
+%
+% Handle angle key:
+% \begin{macrocode}
+\define at key{igraph}{angle}{\renewcommand*{\LWR at igangle}{#1}}
+% \end{macrocode}
+%
+%
+% Handle class key:
+% \begin{macrocode}
+\define at key{igraph}{class}{\renewcommand*{\LWR at igclass}{#1}}
+
+% \end{macrocode}
+% ^^A \define at key{igraph}{xscale}{\renewcommand*{\LWR at igxscale}{#1}}
+% ^^A \define at key{igraph}{yscale}{\renewcommand*{\LWR at igyscale}{#1}}
+% It appears that \pkg{graphicx} does not have separate keys for
+% |xscale| and |yscale|. |scale| adjusts both at the same time.
+% \begin{macrocode}
+\define at key{igraph}{scale}{%
+\renewcommand*{\LWR at igxscale}{#1}%
+\renewcommand*{\LWR at igyscale}{#1}}
+% \end{macrocode}
+%
+% Numerous ignored keys:
+% \begin{macrocode}
+\define at key{igraph}{bb}{}
+\define at key{igraph}{bbllx}{}
+\define at key{igraph}{bblly}{}
+\define at key{igraph}{bburx}{}
+\define at key{igraph}{bbury}{}
+\define at key{igraph}{natwidth}{}
+\define at key{igraph}{natheight}{}
+\define at key{igraph}{hiresbb}{}
+\define at key{igraph}{viewport}{}
+\define at key{igraph}{trim}{}
+\define at key{igraph}{totalheight}{}
+\define at key{igraph}{keepaspectratio}{}
+\define at key{igraph}{clip}{}
+\define at key{igraph}{draft}{}
+\define at key{igraph}{type}{}
+\define at key{igraph}{ext}{}
+\define at key{igraph}{read}{}
+\define at key{igraph}{command}{}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR at rotstyle} \marg{prefix} \marg{degrees}
+%
+% Prints the rotate style with the given prefix.
+%
+% |prefix| is |-ms-| or |-webkit-| or nothing, and is used to generate
+% three versions of the |transform:rotate| style.
+% \begin{macrocode}
+\newcommand*{\LWR at rotstyle}[2]{%
+ #1transform:rotate(-#2deg);
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at scalestyle} \marg{prefix} \marg{xscale} \marg{yscale}
+%
+% Prints the scale style with the given prefix.
+%
+% |prefix| is |-ms-| or |-webkit-| or nothing, and is used to generate
+% three versions of the |transform:scale| style.
+% \begin{macrocode}
+\newcommand*{\LWR at scalestyle}[3]{%
+ #1transform:scale(#2,#3);
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \subsection{\cs{includegraphics}}
+
+% \DescribeBoolean{LWR at infloatrow}
+% Used to compute \cs{linewidth}.
+% \begin{macrocode}
+\newbool{LWR at infloatrow}
+\boolfalse{LWR at infloatrow}
+% \end{macrocode}
+
+
+
+% \begin{macrocode}
+\newcommand*{\LWR at imageextension}{}
+\newcommand*{\LWR at expgraphicsfilename}{}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at includegraphicsb} \oarg{options} \marg{filename}
+% \changes{v0.18}{2016/04/14}{Improved HTML output linebreaks.}
+% \changes{v0.18}{2016/05/17}{Fix: \cs{linewidth}, \cs{textwidth}, \cs{textheight}
+% inside a minipage.}
+% \changes{v0.18}{2016/05/17}{em, ex, \%, px dimensions preserved.}
+% \changes{v0.18}{2016/05/17}{Add: svgz file extension.}
+% \changes{v0.20}{2016/08/20}{Fix: \cs{linewidth} in a floatrow.}
+% \changes{v0.20}{2017/01/12}{Fix: Expands filename.}
+% \begin{macrocode}
+
+\newcommand*{\LWR at includegraphicsb}[2][]
+{%
+% \end{macrocode}
+% Start the image tag on a new line, allow \acro{PDF} output word wrap:
+% \begin{macrocode}
+\LWR at origtilde \LWR at orignewline%
+% \end{macrocode}
+% Temporarily compute |\linewidth|, |\textwidth|, |\textheight| arguments with a 6x9 inch size
+% until the next |\endgroup|.
+% \begin{macrocode}
+\ifthenelse{\cnttest{\value{LWR at minipagedepth}}{=}{0}}{%
+\ifbool{LWR at infloatrow}%
+{}
+{% not in a minipage or a floatrow:
+\setlength{\linewidth}{6in}%
+\setlength{\textwidth}{6in}%
+\setlength{\textheight}{9in}%
+}%
+}{}%
+% \end{macrocode}
+% See if can find the image by adding an extension:
+%
+% Preference is |svgz|, then |svg|, |gif|, |png|, and |jpg|.
+%
+% |\detokenize\expandafter| allows underscore characters in filenames.
+%
+% \begin{macrocode}
+\edef\LWR at expgraphicsfilename{#2}
+\renewcommand*{\LWR at imageextension}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.jpg}%
+{\renewcommand*{\LWR at imageextension}{.jpg}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.JPG}%
+{\renewcommand*{\LWR at imageextension}{.JPG}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.png}%
+{\renewcommand*{\LWR at imageextension}{.png}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.PNG}%
+{\renewcommand*{\LWR at imageextension}{.PNG}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.gif}%
+{\renewcommand*{\LWR at imageextension}{.gif}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.GIF}%
+{\renewcommand*{\LWR at imageextension}{.GIF}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.svg}%
+{\renewcommand*{\LWR at imageextension}{.svg}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.SVG}%
+{\renewcommand*{\LWR at imageextension}{.SVG}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.svgz}%
+{\renewcommand*{\LWR at imageextension}{.svgz}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.SVGZ}%
+{\renewcommand*{\LWR at imageextension}{.SVGZ}}{}%
+% \end{macrocode}
+%
+% Convert a \acro{PDF} extension to \acro{SVG}, leave the result in |\LWR at strresult|:
+%
+% Must also |\detokenize| |.pdf| and |.svg| comparison strings.
+% \begin{macrocode}
+\StrSubstitute{\detokenize\expandafter{\LWR at expgraphicsfilename}}%
+{\detokenize{.pdf}}{\detokenize{.svg}}[\LWR at strresult]%
+%
+\StrSubstitute{\LWR at strresult}%
+{\detokenize{.PDF}}{\detokenize{.SVG}}[\LWR at strresult]%
+% \end{macrocode}
+% For correct em sizing during the width and height conversions:
+% \begin{macrocode}
+\large%
+% \end{macrocode}
+% Reset some defaults, possibly will be changed below if options were given:
+% \begin{macrocode}
+\setlength{\LWR at igwidth}{0pt}%
+\setlength{\LWR at igheight}{0pt}%
+\renewcommand*{\LWR at igwidthstyle}{}%
+\renewcommand*{\LWR at igheightstyle}{}%
+\renewcommand*{\LWR at igorigin}{}%
+\renewcommand*{\LWR at igangle}{}%
+\renewcommand*{\LWR at igxscale}{1}%
+\renewcommand*{\LWR at igyscale}{1}%
+\renewcommand*{\LWR at igclass}{inlineimage}%
+% \end{macrocode}
+%
+% Options are in |#1|
+%
+% \begin{macrocode}
+\setkeys{igraph}{#1}%
+% \end{macrocode}
+% Create the \acro{HTML} reference with the graphicspath, filename, extension,
+% alt tag, style, and class.
+%
+% The \cs{LWR at origtilde} adds space between tags in case this
+% is being done inside a \cs{savebox} where \cs{newline} has no effect.
+% \begin{macrocode}
+\href{\thisgraphicspath\LWR at strresult\LWR at imageextension}%
+{% start of href
+\LWR at htmltag{% start of image tags
+img src="\thisgraphicspath\LWR at strresult\LWR at imageextension" \LWR at orignewline
+\LWR at origtilde{} alt="\LWR at strresult" \LWR at orignewline
+% \end{macrocode}
+% Only include a style tag if a width, height, angle, or scale was given:
+% \begin{macrocode}
+\ifthenelse{
+ \NOT\equal{\LWR at igwidthstyle}{} \OR
+ \NOT\equal{\LWR at igheightstyle}{} \OR
+ \NOT\equal{\LWR at igorigin}{} \OR
+ \NOT\equal{\LWR at igangle}{} \OR
+ \NOT\equal{\LWR at igxscale}{1} \OR
+ \NOT\equal{\LWR at igyscale}{1}
+}%
+{\LWR at origtilde{} style="%
+\ifthenelse{\NOT\equal{\LWR at igwidthstyle}{}}%
+{\LWR at igwidthstyle;}{}%
+\ifthenelse{\NOT\equal{\LWR at igheightstyle}{}}%
+{\LWR at igheightstyle;}{}%
+\ifthenelse{\NOT\equal{\LWR at igorigin}{}}%
+{\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{}{\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 orignewline}{}%
+% \end{macrocode}
+% Set the class:
+% \begin{macrocode}
+\LWR at origtilde{} class="\LWR at igclass" \LWR at orignewline%
+}% end of image tags
+}% end of href
+\endgroup
+% \end{macrocode}
+% Return to small-sized output:
+% \begin{macrocode}
+\LWR at origscriptsize
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\includegraphics} \oarg{key=val} \marg{filename}
+
+% Handles width and height, converted to fixed width and heights.
+
+% Converts any |.pdf| references to |.svg| for \acro{HTML}
+
+% The user should always refer to |.pdf| in the document source.
+
+% \begin{macrocode}
+\renewcommand*{\includegraphics}
+{%
+% \end{macrocode}
+% This graphic should trigger an \acro{HTML} paragraph even if alone,
+% so ensure that are doing paragraph handling:
+% \begin{macrocode}
+\LWR at ensuredoingapar%
+\begingroup%
+\LWR at includegraphicsb%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+% \codeprint
+%
+% For print output, accept and then discard the new |class| key:
+% \begin{macrocode}
+\begin{warpprint}
+\define at key{Gin}{class}{}
+\end{warpprint}
+% \end{macrocode}
+
+
+% \subsection{\cs{rotatebox}, \cs{scalebox}, \cs{reflectbox}}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at rotboxorigin} Holds the origin key letters.
+% \begin{macrocode}
+\newcommand*{\LWR at rotboxorigin}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at originname} \marg{letter}
+%
+% Given one \LaTeX{} origin key value,
+% translate into an \acro{HTML} origin word:
+% \begin{macrocode}
+\newcommand*{\LWR at originname}[1]{%
+\ifthenelse{\equal{#1}{t}}{top}{}%
+\ifthenelse{\equal{#1}{b}}{bottom}{}%
+\ifthenelse{\equal{#1}{c}}{center}{}%
+\ifthenelse{\equal{#1}{l}}{left}{}%
+\ifthenelse{\equal{#1}{r}}{right}{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at originnames} \marg{letters}
+%
+% Given one- or two-letter \LaTeX{} origin key values,
+% translate into \acro{HTML} origin words:
+% \begin{macrocode}
+\newcommand*{\LWR at originnames}[1]{%
+\StrChar{#1}{1}[\LWR at strresult]%
+\LWR at originname{\LWR at strresult}
+\StrChar{#1}{2}[\LWR at strresult]%
+\LWR at originname{\LWR at strresult}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Handle the origin key for \cs{rotatebox}:
+% \begin{macrocode}
+\define at key{krotbox}{origin}{%
+\renewcommand*{\LWR at rotboxorigin}{#1}%
+}
+% \end{macrocode}
+% These keys are ignored:
+% \begin{macrocode}
+\define at key{krotbox}{x}{}
+\define at key{krotbox}{y}{}
+\define at key{krotbox}{units}{}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\rotatebox} \oarg{keyval list} \marg{angle} \marg{text}
+%
+% Will \cs{let}\cs{rotatebox}\cs{LWR at rotatebox} at \cs{LWR at LwarpStart},
+% in case \cs{rotatebox} was over-written by a later package load.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at rotatebox}{O{} m +m}{%
+% \end{macrocode}
+% Reset the origin to ``none-given'':
+% \begin{macrocode}
+\renewcommand*{\LWR at rotboxorigin}{}
+% \end{macrocode}
+% Process the optional keys, which may set \cs{LWR at rotateboxorigin}:
+% \begin{macrocode}
+\setkeys{krotbox}{#1}%
+% \end{macrocode}
+% Select |inline-block| so that \acro{HTML} will transform this span:
+% \begin{macrocode}
+\LWR at htmltagc{span style="display: inline-block;
+% \end{macrocode}
+% If an origin was given, translate and print the origin information:
+% \begin{macrocode}
+\ifthenelse{\NOT\equal{\LWR at rotboxorigin}{}}%
+{transform-origin: \LWR at originnames{\LWR at rotboxorigin};\LWR at origtilde}{}%
+% \end{macrocode}
+% Print the rotation information:
+% \begin{macrocode}
+\LWR at rotstyle{-ms-}{#2} %
+\LWR at rotstyle{-webkit-}{#2} %
+\LWR at rotstyle{}{#2} %
+"{}}\LWR at orignewline%
+% \end{macrocode}
+% Print the text to be rotated:
+% \begin{macrocode}
+\begin{LWR at nestspan}%
+#3%
+% \end{macrocode}
+% Close the span:
+% \begin{macrocode}
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\scalebox} \marg{h-scale} \oarg{v-scale} \marg{text}
+%
+% Will \cs{let}\cs{scalebox}\cs{LWR at scalebox} at \cs{LWR at LwarpStart},
+% in case \cs{scalebox} was over-written by a later package load.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at scalebox}{m o m}{%
+% \end{macrocode}
+% Select |inline-block| so that \acro{HTML} will transform this span:
+% \begin{macrocode}
+\LWR at htmltagc{span style="display: inline-block; %
+% \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}} %
+"{}}%
+% \end{macrocode}
+% Print the text to be scaled:
+% \begin{macrocode}
+\begin{LWR at nestspan}%
+#3%
+% \end{macrocode}
+% Close the span:
+% \begin{macrocode}
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\reflectbox} \marg{text}
+%
+% Will \cs{let}\cs{reflectbox}\cs{LWR at reflectbox} at \cs{LWR at LwarpStart},
+% in case \\
+% \cs{reflectbox} was over-written by a later package load.
+% \begin{macrocode}
+\newcommand{\LWR at reflectbox}[1]{\LWR at scalebox{-1}[1]{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{Null functions}
+%
+% These functions are not supported by \pkg{lwarp}'s \acro{HTML} conversion.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\resizebox} \marg{h-length} \marg{v-length} \marg{text}
+%
+% Simply prints its text argument.
+% \begin{macrocode}
+\renewcommand{\resizebox}[3]{#3}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% ^^A \RequirePackage[version=3]{mhchem}
+% ^^A
+% ^^A
+% ^^A % use before and after environment hooks
+% ^^A \let\LWR at origce\ce
+% ^^A
+% ^^A \renewcommand{\ce}[1]{
+% ^^A \begin{lateximage}
+% ^^A \LWR at origce{#1}
+% ^^A \end{lateximage}
+% ^^A }
+% ^^A
+% ^^A
+% ^^A \RequirePackage{rsphrase}
+
+
+
+
+
+% \section{Cleverref}
+% \label{sec:cleveref}
+
+% \DescribePackage{cleveref}
+% \pkg{cleveref} package is used as-is with minor patches.
+%
+% \pkg{cleveref} and the following associated macro patches are
+% \margintag{loading order}
+% automatically preloaded at the end of the preamble via \cs{AtEndPreamble}
+% and \cs{AfterEndPreamble}.
+% This is done because the \acro{HTML} conversion requires \pkg{cleveref}.
+% The user's document may not require \pkg{cleveref}, thus the user
+% may never explicitly load it, so during \acro{HTML} output \pkg{lwarp} loads it last.
+% If the user's document preamble uses \pkg{cleveref} options, or functions such as
+% \cs{crefname}, then \pkg{cleveref} may be loaded in the user's preamble near the
+% end, and \pkg{lwarp}'s additional loading of \pkg{cleveref} will have no effect.
+%
+% \Cref{tab:crossrefdata} on \pageref{tab:crossrefdata}
+% shows the data structure of the label/reference system
+% as revised by \pkg{lwarp} and \pkg{cleveref}.
+
+
+% A few patches allow \pkg{cleveref} to work as-is:
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \changes{v0.19}{2016/06/06}{cleveref: Loaded \cs{AtEndPreamble}.}
+
+
+
+%
+% \cs{AtEndPreable} forces \pkg{cleveref} to be loaded last:
+%
+% \changes{v0.14}{2016/03/29}{Pagenote: Assigned cleveref name.}
+% \changes{v0.19}{2016/06/06}{cleveref: Loaded \cs{AtEndPreamble}.}
+%
+% \begin{macrocode}
+\AtEndPreamble{
+\RequirePackage{cleveref}
+\crefname{pagenote}{note}{notes}
+}
+% \end{macrocode}
+%
+%
+% \changes{v0.20}{2017/01/05}{\pkg{cleveref} and referencing patches: Applied \cs{AfterEndPreamble}.}
+%
+% \begin{flushleft}
+% The following patches are applied after \pkg{cleveref} has loaded,
+% and after \cs{AtBeginDocument}:
+% \end{flushleft}
+% \begin{macrocode}
+\AfterEndPreamble{
+% \end{macrocode}
+
+% \begin{macro}{\@@setcref} \marg{kindofref} \marg{label}
+
+% ^^A |\@templabel| becomes the section number
+
+% ^^A original: \def\@@setcref#1#2{\cref at getlabel{#2}{\@templabel}#1{\@templabel}{}{}}
+
+% \begin{macrocode}
+\renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}}
+% \end{macrocode}
+% \end{macro}
+
+% ^^A orig:
+% ^^A \def\@@setcrefrange#1#2#3{%
+% ^^A \cref at getlabel{#2}{\@labela}%
+% ^^A \cref at getlabel{#3}{\@labelb}%
+% ^^A #1{\@labela}{\@labelb}{}{}{}{}}
+
+%\begin{macro}{\@@setcrefrange} \marg{text} \marg{label} \marg{label}
+% \begin{macrocode}
+\renewcommand{\@@setcrefrange}[3]{%
+#1{\ref{#2}}{\ref{#3}}{}{}{}{}}
+% \end{macrocode}
+% \end{macro}
+
+% ^^A orig:
+% ^^A \def\@@setcpageref#1#2{%
+% ^^A \cref at getpageref{#2}{\@temppage}#1{\@temppage}{}{}}
+
+
+
+% \begin{macro}{\cpagerefFor} Redefinable word between ``page(s)'' and the page numbers.
+%
+% \changes{v0.20}{2017/01/03}{User-redefinable word for page references.}
+%
+% \begin{macrocode}
+\newcommand*{\cpagerefFor}{for}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@@setcpageref} \marg{typeofref} \marg{label},
+% where typeofref is ``page'' or ``pages''
+%
+% \begin{macrocode}
+\renewcommand*{\@@setcpageref}[2]{%
+#1{\cpagerefFor\ \cref{#2}}{}{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% ^^A orig:
+% ^^A \def\@@setcpagerefrange#1#2#3{%
+% ^^A \cref at getpageref{#2}{\@pagea}%
+% ^^A \cref at getpageref{#3}{\@pageb}%
+% ^^A #1{\@pagea}{\@pageb}{}{}{}{}}
+
+% \begin{macrocode}
+\renewcommand{\@@setcpagerefrange}[3]{%
+#1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}}
+% \end{macrocode}
+
+% Remember and patch some label-related defintions.
+%
+% \begin{macrocode}
+\let\LWR at origlabel\label
+\let\label\LWR at newlabel
+\let\LWR at origref\ref
+\let\ref\LWR at newref% \end{ syntax highlighting
+\let\LWR at origpageref\pageref
+\let\pageref\LWR at newpageref
+
+
+}% AfterEndPreamble
+
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Picture}
+% \label{sec:picture}
+
+% \DescribeEnv{picture} The \env{picture} environment is enclosed
+% inside a \cs{lateximage}.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{environment}{picture}
+% \begin{macrocode}
+\BeforeBeginEnvironment{picture}{
+
+\lateximage}
+
+\AfterEndEnvironment{picture}{\endlateximage
+
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Tikzpicture}
+% \label{sec:tikz}
+
+% \DescribePackage{tikz}
+%
+% \DescribeEnv{tikzpicture} May be used as-is, and its contents will be
+% converted to an image.
+%
+% \limitstikz
+%
+% (\pkg{lwarp} changes the catcode of |$| for its own use.
+% \margintag{catcodes}
+% The \tikz{} |babel| library temporarily changes catcodes
+% back to normal for \tikz's use, restoring them to their
+% \pkg{lwarp} purpose while inside each \tikz{} node.)
+% \index{tikz>dollar redefined}
+% \index{tikz>catcodes}
+%
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \DescribeBoolean{LWR at tikzbabel}
+% \pkg{tikz} v3.0.0 introduced the |babel| library which handles catcode changes.
+% For older versions, \pkg{lwarp} must change |$|'s catcode itself.
+% \begin{macrocode}
+\newbool{LWR at tikzbabel}
+\boolfalse{LWR at tikzbabel}
+
+\AtBeginDocument{
+\@ifpackageloaded{tikz}{
+\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0
+{\booltrue{LWR at tikzbabel}}
+{\boolfalse{LWR at tikzbabel}}
+}{}
+}
+% \end{macrocode}
+
+
+
+% \begin{environment}{tikzpicture}
+% |tikzpicture| environment is enclosed inside a |\lateximage|.
+%
+% \changes{v0.13}{2016/03/23}{Fix dollar-redefined bug for newer package.}
+% \changes{v0.19}{2016/05/29}{Adapts to tikz version.}
+%
+% \begin{macrocode}
+\BeforeBeginEnvironment{tikzpicture}{%
+
+\lateximage
+\ifbool{LWR at tikzbabel}
+{}
+{\catcode`\$=3} % dollar sign is math shift
+}
+
+\AfterEndEnvironment{tikzpicture}{%
+\endlateximage
+
+\ifbool{LWR at tikzbabel}
+{}
+{\catcode`\$=\active}
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{Boxes and Minipages}
+%
+% A \acro{CSS} flexbox is used for minipages and parboxes,
+% allowing external and internal vertical positioning.
+%
+%
+% \limitsminipage
+%
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \subsection{Counters and lengths}
+
+% \DescribeCounter{LWR at minipagedepth}
+% Used to only reset the line width at the outermost minipage.
+% \begin{macrocode}
+\newcounter{LWR at minipagedepth}
+\setcounter{LWR at minipagedepth}{0}
+% \end{macrocode}
+
+
+%
+% \DescribeLength{LWR at minipagewidth}
+% Used to convert the width into printable units.
+% \begin{macrocode}
+\newlength{\LWR at minipagewidth}
+% \end{macrocode}
+% \DescribeLength{LWR at minipageheight}
+% Used to convert the height into printable units.
+% \begin{macrocode}
+\newlength{\LWR at minipageheight}
+% \end{macrocode}
+%
+% Remember the original definitions:
+% \begin{macrocode}
+\let\LWR at origminipage\minipage
+\let\LWR at origendminipage\endminipage
+% \end{macrocode}
+%
+%
+% \subsection{Footnote handling}
+% \label{sec:footnotesminipage}
+%
+% Also see \cref{sec:footnotes} for other forms of footnotes.
+%
+%
+%
+% \begin{macro}{\LWR at nullrule} \oarg{raise} \marg{width} \marg{height}
+%
+% Used to cancel the footnotesep rule during \acro{HTML} output.
+% This rule was causing occasional end paragraph tags to be inserted
+% for some (so far) undetermined reason, as well
+% as adding purposeless code to the \acro{HTML} output.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at nullrule}{o m m}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\LWR at makefntext} \marg{text}
+%
+% Adds a paragraph closing tag to the end of each footnote.
+% \begin{macrocode}
+\newcommand{\LWR at makefntext}[1]{%
+\begingroup%
+\let\rule\LWR at nullrule%
+\textsuperscript{\@thefnmark} #1%
+\endgroup%
+\LWR at htmltagc{/\LWR at tagregularparagraph}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LWR at makefnmark}
+% Creates an \acro{HTML} superscript footnote mark:
+% \begin{macrocode}
+\newcommand*{\LWR at makefnmark}{\textsuperscript{\@thefnmark}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+%
+% \subsection{Minipage handling}
+%
+% \begin{macro}{\LWR at endminipage}
+% Used to close a minipage.
+%
+% Copied the \LaTeX{} definition and modified to create a |mpfootnotes| div class:
+% \begin{macrocode}
+\def\LWR at endminipage{%
+ \par
+ \unskip
+ \ifvoid\@mpfootins\else
+ \vskip\skip\@mpfootins
+ \normalcolor
+ \LWR at htmldivclass{mpfootnotes}
+ \unvbox\@mpfootins
+ \LWR at htmldivclassend{mpfootnotes}
+ \fi
+ \@minipagefalse
+ \color at endgroup
+ \egroup
+ \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at subminipage}
+% Used to create a \acro{PDF} minipage without creating an \acro{HTML} minipage.
+% This allows footnotes to appear at the bottom of the minipage instead of
+% the bottom of the \acro{HTML} page.
+% \begin{macrocode}
+\newcommand*{\LWR at subminipage}{%
+\LWR at stoppars
+\LWR at origminipage{6in}
+% \end{macrocode}
+% |\raggedright| cancels hyphenation, which will be done by \acro{HTML} instead.
+% \begin{macrocode}
+\LWR at origraggedright%
+% \end{macrocode}
+% Minipage footnotes appear the bottom of the minipage.
+% \begin{macrocode}
+\let\footnote\LWR at origfootnote%
+\let\@makefntext\LWR at makefntext%
+\let\@makefnmark\LWR at makefnmark%
+% \end{macrocode}
+% Resume paragraph tag handling for the contents of the minipage:
+% \begin{macrocode}
+\LWR at startpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at endsubminipage}
+% Closes the subminipage.
+% \begin{macrocode}
+\newcommand*{\LWR at endsubminipage}{%
+\LWR at stoppars%
+\LWR at endminipage% The following empty line is required:
+
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeBoolean{LWR at minipagefullwidth} Should the next minipage have no \acro{HTML} |width|?
+% \begin{macrocode}
+\newbool{LWR at minipagefullwidth}
+\boolfalse{LWR at minipagefullwidth}
+% \end{macrocode}
+%
+% \begin{macro}{\minipagefullwidth} Requests that the next minipage
+% have no |width| tag in \acro{HTML}:
+% \changes{v0.19}{2016/05/28}{Added: No width tag for the next minipage in HTML.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\newcommand*{\minipagefullwidth}{\booltrue{LWR at minipagefullwidth}}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+%
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand*{\minipagefullwidth}{}
+\end{warpprint}
+% \end{macrocode}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \DescribeBoolean{LWR at minipagethispar}
+% Has a minipage been seen this paragraph?
+% If true, prevents paragraph tags around horizontal space
+% between minipages.
+% \begin{macrocode}
+\newbool{LWR at minipagethispar}
+\boolfalse{LWR at minipagethispar}
+% \end{macrocode}
+%
+%
+% \begin{environment}{minipage} \oarg{vert position} \oarg{height} \oarg{inner vert position} \marg{width}
+% \changes{v0.18}{2016/05/17}{Fix: \cs{linewidth}, \cs{textwidth}, \cs{textheight} inside a minipage.}
+%
+% The vertical positions may be 'c', 't', or 'b'.
+% The inner position may also be 's'.
+%
+% When using |\linewidth|, |\textwidth|, or |\textheight|, these are scaled proportionally to a
+% 6\texttimes{}9 inch text area.
+%
+% \begin{macrocode}
+\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
+{%
+% \end{macrocode}
+% Pre-compute the given width and height:
+% \begin{macrocode}
+% \end{macrocode}
+% Reset the text area if are starting the outer-most minipage:
+% \begin{macrocode}
+\LWR at traceinfo{starting minipage}%
+\uselengthunit{in}%
+\setlength{\LWR at minipagewidth}{#4}%
+\ifthenelse{\cnttest{\value{LWR at minipagedepth}}{=}{0}}{%
+\addtolength{\LWR at minipagewidth}{3em}% room for frames
+\setlength{\linewidth}{6in}%
+\setlength{\textwidth}{6in}%
+\setlength{\textheight}{9in}%
+}{}%
+\addtocounter{LWR at minipagedepth}{1}%
+\setlength{\LWR at minipageheight}{\textheight}% default unless specified
+\IfValueTF{#2}{\setlength{\LWR at minipageheight}{#2}}{}%
+% \end{macrocode}
+% \LaTeX{} wants to start a paragraph for the new minipage, then start a paragraph again
+% for the contents of the minipage, so cancel the paragraph tag handling
+% until the minipage has begun.
+% \begin{macrocode}
+\LWR at stoppars%
+% \end{macrocode}
+% Create the |<div>| tag with optional alignment style:
+% \begin{macrocode}
+\LWR at traceinfo{minipage: creating div class}%
+\LWR at htmltag{div class="minipage" style="%
+\ifthenelse{\equal{#1}{t}}{vertical-align: bottom ; }{}%
+\ifthenelse{\equal{#1}{c}}{vertical-align: middle ; }{}%
+\ifthenelse{\equal{#1}{b}}{vertical-align: top ; }{}%
+\ifthenelse{\equal{#3}{t}}{justify-content: flex-start ; }{}%
+\ifthenelse{\equal{#3}{c}}{justify-content: center ; }{}%
+\ifthenelse{\equal{#3}{b}}{justify-content: flex-end ; }{}%
+\ifthenelse{\equal{#3}{s}}{justify-content: space-between ; }{}%
+% \end{macrocode}
+% Print the width and optional height styles:
+% \begin{macrocode}
+\LWR at traceinfo{minipage: about to print the width}%
+\uselengthunit{PT}%
+\ifbool{LWR at minipagefullwidth}%
+{\boolfalse{LWR at minipagefullwidth}}%
+{%
+\ifthenelse{\lengthtest{#4}=\linewidth}%
+{}%
+{width:\rndprintlength{\LWR at minipagewidth} ; }%
+}%
+\LWR at traceinfo{minipage: about to print the height}%
+\IfValueTF{#2}{height:\rndprintlength{\LWR at minipageheight} ; }{}%
+"{}}%
+% \end{macrocode}
+% Finish with an empty line to start \LaTeX{} minipage processing on a new line.
+% Use a large minipage area to avoid the unnecessary wrapping of tags.
+% \begin{macrocode}
+
+\LWR at origminipage{6in}% The preceding empty line is required.
+% \end{macrocode}
+% Set the user-accessible minipage and text width and height values inside the minipage.
+% These do not affect the actual size of the large minipage created by
+% \cs{LWR at origminipage} above, but are used by any reference to \cs{linewidth}, etc.
+% inside the \acro{PDF} minipage being created here.
+% \begin{macrocode}
+\setlength{\linewidth}{#4}% the original width
+\setlength{\textwidth}{6in}%
+\setlength{\textheight}{9in}%
+% \end{macrocode}
+% |\raggedright| cancels hyphenation, which will be done by \acro{HTML} instead.
+% \begin{macrocode}
+\LWR at origraggedright%
+\let\footnote\LWR at origfootnote%
+\let\@makefntext\LWR at makefntext%
+\let\@makefnmark\LWR at makefnmark%
+% \end{macrocode}
+% Resume paragraph tag handling for the contents of the minipage:
+% \begin{macrocode}
+\LWR at startpars%
+\LWR at traceinfo{minipage: finished starting the minipage}%
+}
+% \end{macrocode}
+% End the environment with \LaTeX{} processing and closing tag:
+% \begin{macrocode}
+{%
+\LWR at stoppars%
+\LWR at endminipage% The following empty line is required:
+
+\LWR at htmldivclassend{minipage}%
+\vspace{1\baselineskip}% required for subcaption
+\addtocounter{LWR at minipagedepth}{-1}%
+\LWR at startpars%
+% \end{macrocode}
+% Prevent paragraph tags around horizontal white space
+% until the start of the next paragraph:
+% \begin{macrocode}
+\global\booltrue{LWR at minipagethispar}%
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \subsection{Parbox, makebox, framebox, fbox, raisebox}
+%
+%
+% \begin{macro}{\parbox} \oarg{pos} \oarg{height} \oarg{inner-pos} \marg{width} \marg{text}
+%
+% A parbox uses the minipage code:
+% \begin{macrocode}
+\RenewDocumentCommand{\parbox}{O{t} o O{t} m m}
+{
+\begin{minipage}[#1][#2][#3]{#4}
+#5
+\end{minipage}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\makebox} \oarg{width} \oarg{pos} \marg{text}
+%
+% Width and position are ignored.
+% \begin{macrocode}
+\RenewDocumentCommand{\makebox}{o o m}{%
+\mbox{#3}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\framebox} \oarg{width} \oarg{pos} \marg{text}
+%
+% Width and position are ignored.
+% \begin{macrocode}
+\RenewDocumentCommand{\framebox}{o o m}{%
+\fbox{#3}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fbox} \marg{text}
+% \begin{macrocode}
+\let\LWR at origfbox\fbox
+%
+\renewcommand*{\fbox}[1]{%
+\InlineClass{framebox}{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\raisebox} \marg{raiselen} \oarg{height} \oarg{depth} \marg{text}
+% \begin{macrocode}
+\RenewDocumentCommand{\raisebox}{m o o m}{%
+#4%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+
+
+
+
+
+% \section{Direct formatting}
+% \label{sec:directformatting}
+%
+% \limitstext
+%
+% For high-level block and inline custom CSS classes,
+% see \cref{sec:highlevelclasses}.
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\emph} \marg{text}
+% \begin{macrocode}
+\renewcommand{\emph}[1]{\LWR at htmlspan{em}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textmd} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textmd}[1]{\LWR at htmlspan{textmd}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textbf} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textbf}[1]{\LWR at htmlspan{b}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textrm} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textrm}[1]{\InlineClass{textrm}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textsf} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textsf}[1]{\InlineClass{textsf}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\texttt} \marg{text}
+% \begin{macrocode}
+\renewcommand{\texttt}[1]{\LWR at htmlspan{kbd}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textup} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textup}[1]{\LWR at htmlspan{textup}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textit} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textit}[1]{\LWR at htmlspan{i}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textsc} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textsc}[1]{\InlineClass{textsc}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textnormal} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textnormal}[1]{\textmd{\textrm{\textup{#1}}}}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\mdseries}
+% \begin{macrocode}
+\renewcommand*{\mdseries}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\bfseries}
+% \begin{macrocode}
+\renewcommand*{\bfseries}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\rmfamily}
+% \begin{macrocode}
+\renewcommand*{\rmfamily}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\sffamily}
+
+% \begin{macrocode}
+\renewcommand*{\sffamily}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ttfamily}
+% \begin{macrocode}
+\renewcommand*{\ttfamily}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\upshape}
+% \begin{macrocode}
+\renewcommand*{\upshape}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\itshape}
+% \begin{macrocode}
+\renewcommand*{\itshape}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\scshape}
+% \begin{macrocode}
+\renewcommand*{\scshape}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\scshape}
+% \begin{macrocode}
+\renewcommand*{\normalfont}{}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\sp} \marg{text}
+
+% For \pkg{siunitx}. Must work in math mode.
+% \begin{macrocode}
+\renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\sb} \marg{text}
+
+% For \pkg{siunitx}. Must work in math mode.
+% \begin{macrocode}
+\renewcommand{\sb}[1]{\text{<sub>#1</sub>}{}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\textsuperscript} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\textsubscript} \marg{text}
+% \begin{macrocode}
+\renewcommand{\textsubscript}[1]{\LWR at htmlspan{sub}{#1}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\up} \marg{text} Prints superscript.
+%
+% This is \cs{let} at the beginning of the document in case some other package
+% has changed the definition.
+% \begin{macrocode}
+\AtBeginDocument{\let\up\textsuperscript}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\fup} \marg{text} Prints superscript.
+%
+% Supports \pkg{fmtcount} package.
+%
+% This is \cs{let} at the beginning of the document in case some other package
+% has changed the definition.
+% \begin{macrocode}
+\AtBeginDocument{\let\fup\textsuperscript}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\hfill}
+% \changes{v0.20}{2016/12/12}{Inserts a \cs{qquad}.}
+% \begin{macrocode}
+\renewcommand*{\hfill}{\qquad}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\hrulefill}
+% \changes{v0.20}{2017/01/19}{Inserts a short rule.}
+% \begin{macrocode}
+\renewcommand*{\hrulefill}{\rule{1in}{1pt}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\dotfill}
+% \changes{v0.20}{2017/01/19}{Inserts an ellipsis.}
+% \begin{macrocode}
+\renewcommand*{\dotfill}{\dots}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{Skips, spaces, font sizes}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% |\,| must be redefined after |\RequirePackage{printlen}|
+% \begin{macrocode}
+\let\LWR at origcomma\,
+\let\LWR at origtilde~
+\let\LWR at origenskip\enskip
+\let\LWR at origquad\quad
+\let\LWR at origqquad\qquad
+\let\LWR at orighspace\hspace
+\let\LWR at origrule\rule
+% \end{macrocode}
+
+% Direct-formatting space commands become \acro{HTML} entities:
+% \begin{macrocode}
+\renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
+% \end{macrocode}
+% ^^A \renewcommand*{\,}{\HTMLunicode{2009}} % HTML thin wrappable space
+% ^^A \renewcommand*{\,}{\HTMLentity{nbsp}} % regular-width non-breakable space
+% \begin{macrocode}
+\renewcommand*{~}{\HTMLentity{nbsp}}
+\renewcommand*{\textellipsis}{\HTMLunicode{2026}}
+% \end{macrocode}
+% Direct-formatting font sizes are ignored:
+% \begin{macrocode}
+\let\LWR at orignormalsize\normalsize
+\let\LWR at origsmall\small
+\let\LWR at origfootnotesize\footnotesize
+\let\LWR at origscriptsize\scriptsize
+\let\LWR at origtiny\tiny
+\let\LWR at origlarge\large
+\let\LWR at origLarge\Large
+\let\LWR at origLARGE\LARGE
+\let\LWR at orighuge\huge
+\let\LWR at origHuge\Huge
+\renewcommand*{\normalsize}{}
+\renewcommand*{\small}{}
+\renewcommand*{\footnotesize}{}
+\renewcommand*{\scriptsize}{}
+\renewcommand*{\tiny}{}
+\renewcommand*{\large}{}
+\renewcommand*{\Large}{}
+\renewcommand*{\LARGE}{}
+\renewcommand*{\huge}{}
+\renewcommand*{\Huge}{}
+
+\renewcommand*{\onecolumn}{}
+
+\renewcommand{\twocolumn}[1][]{
+
+#1
+
+}
+% \end{macrocode}
+
+
+% \begin{macro}{\newline}
+% Uses \acro{HTML} |<br />| tag
+% \begin{macrocode}
+\newcommand*{\LWR at newlinebr}{\unskip\LWR at htmltag{br /}\LWR at orignewline}%
+\let\newline\LWR at newlinebr
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeMacro{\\} Redefined to \cs{LWR at endofline} or \cs{LWR at tabularendofline}.
+%
+% \begin{macro}{\LWR at endofline} * \oarg{len}
+% \changes{v0.20}{2016/08/20}{Fix: \protect\textbackslash\protect\textbackslash}
+%
+% |\\| is assigned to \cs{LWR at endofline} at \cs{LWR at LwarpStart}.
+%
+% Inside |tabular|, |\\| is temporarily changed to \cs{LWR at tabularendofline}.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at endofline}{s o}
+{%
+\newline%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+
+% \begin{macro}{\LWR at minipagestartpars}
+% \changes{v0.19}{2016/05/31}{Surpresses paragraph tags between minipages.}
+% \index{minipage>horizontal space between}
+% \index{space>horizontal between minipages}
+% \index{horizontal space>between minipages}
+% Minipages are often placed side-by-side inside figures, with a bit of
+% horizontal space to separate them. Since \acro{HTML} does not allow
+% a |div| to be inside a |p|, paragraphs must be turned off during the
+% generation of the minipage, then turned on after the minipage is complete.
+% When this occurs between side-by-side minipages, |lwarp| correctly
+% surpresses the paragraph tags between the minipages, unless some other
+% text is between the minipages. Such text forms its own paragraph, resulting
+% in text after a minipage to be on its own line. Since people often place
+% \DescribeMacro{\hspace}
+% \DescribeMacro{\enskip}
+% \DescribeMacro{\quad}
+% \DescribeMacro{\qquad}
+% small horizontal space between minipages, it is desirable to maintain this
+% space if possible. |lwarp| tries to do this by remembering that a minipage
+% has been seen, in which case paragraph tags are surpressed around
+% \cs{hspace}, \cs{enskip}, \cs{quad}, and \cs{qquad} until the end of the paragraph, when
+% the closing |p| tag is created.
+%
+% When a minipage is seen, the boolean
+% |LWR at minipagethispar| is set, telling the following horizontal
+% whitespace commands to try to surpress their surrounding paragraph
+% tags. |LWR at minipagethispar| is cleared at the next
+% end of paragraph, when the \acro{HTML} paragraph closing tag is
+% generated.
+%
+% Placed just before \cs{hspace}, \cs{quad}, or \cs{qquad}'s \acro{HTML} output.
+% \begin{macrocode}
+\newcommand*{\LWR at minipagestartpars}{%
+\ifbool{LWR at minipagethispar}%
+{%
+\LWR at startpars%
+}{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR at minipagestoppars}
+% Placed just after \cs{hspace}, \cs{quad}, or \cs{qquad}'s \acro{HTML} output.
+% \begin{macrocode}
+\newcommand*{\LWR at minipagestoppars}{%
+\ifbool{LWR at minipagethispar}%
+{%
+\LWR at stoppars%
+}{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\quad}
+% Handles special minipage \& horizontal space interactions.
+% \begin{macrocode}
+\renewcommand*{\quad}{%
+\LWR at minipagestoppars%
+\HTMLunicode{2001}%
+\LWR at minipagestartpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\qquad}
+% Handles special minipage \& horizontal space interactions.
+% \begin{macrocode}
+\renewcommand*{\qquad}{\quad\quad}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\enskip}
+% Handles special minipage \& horizontal space interactions.
+% \begin{macrocode}
+\renewcommand*{\enskip}{%
+\LWR at minipagestoppars%
+\HTMLunicode{2000}%
+\LWR at minipagestartpars%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeLength{LWR at tempwidth}
+% \DescribeLength{LWR at tempheight}
+% \DescribeLength{LWR at tempraise}
+% Used to compute span width, height, raise for \cs{hspace} and \cs{rule}:
+% \begin{macrocode}
+\newlength{\LWR at tempwidth}
+\newlength{\LWR at tempheight}
+\newlength{\LWR at tempraise}
+% \end{macrocode}
+%
+
+% \begin{macro}{\LWR at hspace} * \marg{length}
+%
+% Handles special minipage \& horizontal space interactions.
+% \changes{v0.18}{2016/05/13}{\cs{hspace} supported}
+% \changes{v0.19}{2016/05/29}{Fix: \cs{hspace} length computations}
+% \changes{v0.20}{2016/08/22}{Add: Supports HTML thin breakable space}
+%
+% Prints a span of a given width. Ignores the optional star.
+%
+% \cs{fill} is zero-width, so |\hspace{\fill}| is ignored.
+% \begin{macrocode}
+
+\NewDocumentCommand{\LWR at hspace}{s m}{%
+\setlength{\LWR at tempwidth}{#2}%
+% \end{macrocode}
+% Only if the width is not zero:
+% \begin{macrocode}
+\ifthenelse{\dimtest{\LWR at tempwidth}{=}{0pt}}{}{%
+% \end{macrocode}
+% If had a minipage this paragraph, try to inline the
+% white space without generating paragraph tags:
+% \begin{macrocode}
+\LWR at minipagestoppars%
+% \end{macrocode}
+% Support the HTML thin wrappable space:
+% \begin{macrocode}
+\ifthenelse{\dimtest{\LWR at tempwidth}{=}{.16667em}}
+{%
+\HTMLunicode{2009}% thin breakable space
+}%
+% \end{macrocode}
+% Print the span with the converted width. Not rounded.
+% \begin{macrocode}
+{%
+\uselengthunit{PT}%
+\LWR at htmltagc{%
+span style="width:\printlength{\LWR at tempwidth}; display:inline-block;"%
+}%
+\LWR at htmltagc{/span}%
+}%
+% \end{macrocode}
+% If had a minipage this paragraph, try to inline the
+% white space without generating paragraph tags:
+% \begin{macrocode}
+\LWR at minipagestartpars%
+}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\hspace} * \marg{length}
+%
+% Handles special minipage \& horizontal space interactions.
+% \begin{macrocode}
+\let\hspace\LWR at hspace
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\linebreak} \oarg{num} \qquad
+% Inserts an \acro{HTML} |br| tag.
+% \begin{macrocode}
+\renewcommand*{\linebreak}[1][]{\newline}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\nolinebreak} \oarg{num}
+% \begin{macrocode}
+\renewcommand*{\nolinebreak}[1][]{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\pagebreak} \oarg{num} \qquad
+% Starts a new paragraph.
+% \begin{macrocode}
+\renewcommand*{\pagebreak}[1][]{
+
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\nopagebreak} \oarg{num}
+% \begin{macrocode}
+\renewcommand*{\nopagebreak}[1][]{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\enlargethispage} * \marg{len}
+% \begin{macrocode}
+\RenewDocumentCommand{\enlargethispage}{s m}{}
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+
+% \begin{macro}{\LWR at rule} \oarg{raise} \marg{width} \marg{height}
+%
+% Handles special minipage \& horizontal space interactions.
+%
+% Creates a span of a given width and height. Ignores the optional star.
+%
+% \cs{fill} is zero-width, so |\hspace{\fill}| is ignored.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at rule}{o m m}{%
+% \end{macrocode}
+% The width is copied into a temporary \LaTeX\ length, from which
+% comparisons and conversions may be made:
+% \begin{macrocode}
+\setlength{\LWR at tempwidth}{#2}%
+% \end{macrocode}
+% If it's zero-width then skip the entire rule:
+% \begin{macrocode}
+\ifthenelse{\lengthtest{\LWR at tempwidth=0pt}}
+{}% zero- width
+{% non-zero width
+% \end{macrocode}
+% If it's non-zero width, set a minimal thickness so that it
+% more reliably shows in the browser:
+% \begin{macrocode}
+\ifthenelse{\lengthtest{\LWR at tempwidth>0pt}\AND%
+\lengthtest{\LWR at tempwidth<1pt}}%
+{\setlength{\LWR at tempwidth}{1pt}}{}%
+% \end{macrocode}
+% Likewise with height:
+% \begin{macrocode}
+\setlength{\LWR at tempheight}{#3}%
+\ifthenelse{\lengthtest{\LWR at tempheight>0pt}\AND%
+\lengthtest{\LWR at tempheight<1pt}}%
+{\setlength{\LWR at tempheight}{1pt}}{}%
+% \end{macrocode}
+% If had a minipage this paragraph, try to inline the
+% rule without generating paragraph tags:
+% \begin{macrocode}
+\LWR at minipagestoppars%
+% \end{macrocode}
+% Print the span with the converted width and height.
+% The width and height are NOT rounded, since a height of
+% less than 1pt is quite common in \LaTeX\ code.
+% \begin{macrocode}
+\uselengthunit{PT}%
+\LWR at htmltagc{%
+span
+style=" %
+% \end{macrocode}
+% The background color is used to draw the filled rule.
+% The color may be changed by \cs{textcolor}.
+% \begin{macrocode}
+background:\LWR at currenttextcolor; %
+% \end{macrocode}
+% The width and height are printed, converted to PT:
+% \begin{macrocode}
+width:\printlength{\LWR at tempwidth}; %
+height:\printlength{\LWR at tempheight}; %
+% \end{macrocode}
+% The raise height is converted to a \acro{CSS} transform.
+% The |*2| raise multiplier is to approximately match \acro{HTML} output's X height.
+% Conversion to a \LaTeX\ length allows a typical \LaTeX\ expression to be
+% used as an argument for the raise, whereas printing the raise argument
+% directly to \acro{HTML} output without conversion to a \LaTeX\ length
+% limits the allowable syntax. To do:\ A superior method would compute a
+% ratio of \LaTeX\ ex height, then print that to \acro{HTML} with an ex unit.
+% \begin{macrocode}
+\IfValueTF{#1}%
+{%
+\setlength{\LWR at tempraise}{0pt-#1}%
+\setlength{\LWR at tempraise}{\LWR at tempraise*2}%
+\LWR at orignewline%
+-ms-transform: translate(0pt,\printlength{\LWR at tempraise}); %
+\LWR at orignewline%
+-webkit-transform: translate(0pt,\printlength{\LWR at tempraise}); %
+\LWR at orignewline%
+transform: translate(0pt,\printlength{\LWR at tempraise}); %
+\LWR at orignewline%
+}{}%
+% \end{macrocode}
+% Display inline-block to place the span inline with the text:
+% \begin{macrocode}
+display:inline-block;"%
+}%
+\LWR at htmltagc{/span}%
+% \end{macrocode}
+% If had a minipage this paragraph, try to inline the
+% white space without generating paragraph tags:
+% \begin{macrocode}
+\LWR at minipagestartpars%
+}% non-zero width
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\rule} \oarg{raise} \marg{width} \marg{height}
+% \changes{v0.19}{2016/06/01}{Added}
+%
+% Handles special minipage \& horizontal space interactions.
+% \begin{macrocode}
+\let\rule\LWR at rule
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \section{\textbackslash{}phantomsection}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\phantomsection}
+% Emulate the hyperref |\phantomsection| command,
+% often used to insert the bibliography into table of contents:
+% \begin{macrocode}
+\newcommand*{\phantomsection}{\section*{}}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+
+% \section{\textbackslash{}LaTeX and other logos}
+
+% Logos for \acro{HTML} and print modes:
+%
+% Some of these logos may be redefined in a later package,
+% so after loading other packages, and at the beginning of the document, their definitions
+% are finally |\let| in |\LWR at LwarpStart|.
+%
+% For \acro{CSS} conversions, see: \\
+% \url{http://edward.oconnor.cx/2007/08/tex-poshlet} \\
+% \url{http://nitens.org/taraborelli/texlogo}
+%
+%
+%
+% \subsection{HTML logos}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% \begin{macro}{\TeX} \TeX
+% \nopagebreak
+%
+% |latexlogo| is a \acro{CSS} class used to properly typeset the E and A in \LaTeX{} and friends.
+%
+% |latexlogofont| is a \acro{CSS} class used to select the font for the rest of the logo in
+% \LaTeX, \LuaTeX, \ConTeXt, etc.
+% \begin{macrocode}
+\newcommand*{\LWR at TeX}
+{\InlineClass{latexlogofont}%
+{\InlineClass{latexlogo}{T\textsubscript{e}X}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\LaTeX}
+% \begin{macro}{\LaTeXe} \LaTeX, \LaTeXe
+% \begin{macrocode}
+\newcommand*{\LWR at LaTeX}
+{\InlineClass{latexlogofont}%
+{\InlineClass{latexlogo}%
+{L\textsuperscript{a}T\textsubscript{e}X}}}
+
+\renewcommand*{\LaTeXe}
+{\LaTeX\InlineClass{latexlogofont}%
+{\,2\textsubscript{\textit{\HTMLunicode{3B5}}}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\LuaTeX}
+% \begin{macro}{\LuaLaTeX} \LuaTeX, \LuaLaTeX
+% \begin{macrocode}
+\newcommand*{\LWR at LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX}
+\newcommand*{\LWR at LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\XeTeX}
+% \begin{macro}{\XeLaTeX} \XeTeX, \XeLaTeX
+% \nopagebreak
+%
+% |xetexlogo| is a \acro{CSS} class which aligns the backwards E in \XeTeX{} and spaces \TeX{}
+% appropriately.
+%
+% |xelatexlogo| is a \acro{CSS} class which aligns the backwards E in \XeLaTeX{} and spaces
+% \LaTeX{} appropriately.
+% \begin{macrocode}
+\newcommand*{\Xe}
+ {X\textsubscript{\HTMLunicode{18e}}}
+\newcommand*{\LWR at XeTeX}{\InlineClass{xetexlogo}{\Xe}\TeX}
+\newcommand*{\LWR at XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ConTeXt} \ConTeXt
+% \begin{macrocode}
+\newcommand*{\LWR at ConTeXt}
+{\InlineClass{latexlogofont}{Con}\TeX{}%
+\InlineClass{latexlogofont}{t}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\BibTeX}
+% \begin{macro}{\MakeIndex} \BibTeX, \MakeIndex
+% \begin{macrocode}
+\providecommand*{\BibTeX}
+{\InlineClass{latexlogofont}{B\textsc{ib}}\TeX}
+
+\newcommand*{\MakeIndex}
+{\InlineClass{latexlogofont}{\textit{MakeIndex}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\AmS} \AmS
+% \nopagebreak
+%
+% |amslogo| is a \acro{CSS} class used for the \AmS logo.
+% \begin{macrocode}
+\AtBeginDocument{\DeclareDocumentCommand{\AmS}{}
+{\InlineClass{amslogo}{\textit{A\textsubscript{M}S}}}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MiKTeX} \MiKTeX
+% \begin{macrocode}
+\newcommand*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LyX} \LyX
+% \nopagebreak
+%
+% |lyxlogo| is a \acro{CSS} class used for the \LyX logo.
+% \begin{macrocode}
+\newcommand*{\LyX}{\InlineClass{lyxlogo}{LyX}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \subsection{Print logos}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\newcommand*{\XeTeXrevE}
+ {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}}
+\providecommand*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}}
+\providecommand*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}}
+\providecommand*{\AmS}{%
+\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
+\hbox{$\mathcal M$}\kern-.2em\mathcal S$}}
+\newcommand*{\LyX}{\textsf{LyX}}
+\providecommand*{\LuaTeX}{\mbox{Lua\TeX}}
+\providecommand*{\LuaLaTeX}{\mbox{Lua\LaTeX}}
+\providecommand*{\BibTeX}{\mbox{B\textsc{ib}\TeX}}
+\providecommand*{\MakeIndex}{\mbox{\textit{MakeIndex}}}
+\providecommand*{\ConTeXt}{\mbox{Con\TeX{}t}}
+\providecommand*{\MiKTeX}{\mbox{MiK\TeX}}
+\end{warpprint}
+% \end{macrocode}
+
+
+% \section{\textbackslash{}AtBeginDocument, \textbackslash{}AtEndDocument}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR at LwarpStart}
+% \begin{macro}{\LWR at LwarpEnd}
+% Automatically sets up the \acro{HTML}-related actions for the start and end of the
+% document.
+% \begin{macrocode}
+\AfterEndPreamble{\LWR at LwarpStart}
+\AtEndDocument{\LWR at LwarpEnd}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+
+
+% \clearpage
+
+% \section{lwarpmk.conf}
+
+% \DescribeFile{lwarpmk.conf}
+% |lwarpmk.conf| is automatically (re-)created by the \pkg{lwarp} package when
+% executing\\
+% \hspace*{2ex} |pdflatex <project.tex>|,\\
+% or similar for |xelatex| or |lualatex|, in print-document generation mode,
+% which is the default unless the |warpHTML| option is given.
+% |lwarpmk.conf| is then used by the utility |lwarpmk|.
+%
+% An example |lwarpmk.conf|:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4,formatcom={\unskip}]
+% opsystem = "Unix" -- or "Windows"
+% latexname = "pdflatex" -- or "lualatex" or "xelatex"
+% sourcename = "projectname" -- your .tex source
+% homehtmlfilename = "index" -- or "projectname"
+% htmlfilename = "" -- or "projectname" if numbered HTML files
+% \end{Verbatim}
+%
+% Defaults unless already over-ridden by the user:
+% \begin{macrocode}
+\providecommand*{\HomeHTMLFileName}{\BaseJobname}
+\providecommand*{\HTMLFileName}{}
+\providecommand*{\UseLatexmk}{false}
+% \end{macrocode}
+
+
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\immediate\openout\LWR at file=lwarpmk.conf
+\ifwindows
+\immediate\write\LWR at file{opsystem = "Windows"}
+\else
+\immediate\write\LWR at file{opsystem = "Unix"}
+\fi
+\ifPDFTeX
+\immediate\write\LWR at file{latexname = "pdflatex"}
+\fi
+\ifXeTeX
+\immediate\write\LWR at file{latexname = "xelatex"}
+\fi
+\ifLuaTeX
+\immediate\write\LWR at file{latexname = "lualatex"}
+\fi
+\immediate\write\LWR at file{sourcename = "\jobname"}
+\immediate\write\LWR at file{%
+homehtmlfilename = "\HomeHTMLFileName"%
+}
+\immediate\write\LWR at file{htmlfilename = "\HTMLFileName"}
+\immediate\write\LWR at file{uselatexmk = "\UseLatexmk"}
+\immediate\closeout\LWR at file
+\end{warpprint}
+% \end{macrocode}
+
+
+
+
+
+
+
+
+% \clearpage
+% \section{Trademarks}
+%
+% \changes{v0.14}{2016/03/29}{Docs: Trademarks section.}
+%
+% \begin{itemize}
+% \item Adobe® and Adobe Framemaker® are either registered trademarks or
+% trademarks of Adobe Systems Incorporated in the United States and/or other countries.
+% \item Linux® is the registered trademark of Linus Torvalds in the U.S.\ and other countries.
+% \item Mac\,OS® is a trademark of Apple Inc.
+% \item MadCap Flare™ is the property of MadCap Software, Inc.
+% \item MathJax is copyright 2009 and later.
+% The MathJax Consortium is a joint venture of the American Mathematical Society (AMS)
+% and the Society for Industrial and Applied Mathematics (SIAM)
+% to advance mathematical and scientific content on the web.
+% \item Microsoft®, Encarta, MSN, and Windows® are either registered trademarks or
+% trademarks of Microsoft Corporation in the United States and/or other countries.
+% \item UNIX® is a registered trademark of The Open Group.
+% \end{itemize}
+
+% \iffalse
+%</package>
+% \fi
+
+
+
+% \clearpage
+
+
+% \iffalse
+%<*lwarp-newproject>
+% \fi
+
+% \part{lwarp-newproject.sty}
+%
+% \changes{v0.20}{2016/12/20}{\pkg{lwarp-newproject}: Added.}
+%
+% \section{lwarp-newproject}
+%
+% \DescribePackage{lwarp-newproject}
+% \pkg{lwarp-newproject} is used to create lwarp-specific
+% system files in a new project.
+%
+% \DescribeOption[lwarp-newproject]{warpprint} Configuration files are only
+% created if the |warpprint| option was used. When this is the case,
+% \pkg{lwarp-newproject} knows that \cs{jobname} is the source code's filename
+% (as opposed to the |<project>_html.tex| filename).
+%
+% \DescribeOption[lwarp-newproject]{warpHTML} Does not create configuration files.
+% |warpprint| or |warpHTML| are passed to both \pkg{lwarp} and
+% \pkg{lwarp-newproject} by |lwarpmk|, depending on whether |lwarpmk print|
+% or |lwarpmk html| was used.
+%
+% \DescribeOption[lwarp-newproject]{BaseJobName} |BaseJobname=somename| sets
+% \cs{BaseJobname} to |somename|, which is used to set \cs{HomeHTMLFileName},
+% which is then written to the |lwarpmk.conf| and |<project>.lwarpmkconf|
+% configuration files.
+%
+% \cs{BaseJobname} is also written to |<project>_html.tex| as an option
+% given for the \pkg{lwarp} and \pkg{lwarp-newproject} packages during the
+% creation of \acro{HTML} output.
+%
+% \cs{BaseJobname} is the \cs{jobname} of the printed version, even while compiling
+% the \acro{HTML} version, where \cs{jobname} has |_html| appended.
+%
+% \DescribeOption[lwarp-newproject]{lwarpmk} Tells |lwarp-newproject| to
+% generate a local copy of |lwarpmk| called |lwarpmk.lua|.
+% Useful for archiving for future use.
+% This file may be made executable and acts just like |lwarpmk|.
+%
+% In the document source:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4,formatcom={\unskip}]
+% \documentclass{article} % or book, report
+% ...
+% (font selection, input encoding)
+% ...
+% \newcommand*{\HomeHTMLFileName}{index}, or {projectname}
+% \newcommand*{\HTMLFileName}{}
+% \usepackage{lwarp-newproject}
+% \usepackage{lwarp}
+% ...
+% (load other packages, the rest of the preamble)
+% ...
+% \NewCSS{project.css}
+% \NewHTMLdescription{Summarize this webpage.}
+% ...
+% \begin{document}
+% ...
+% \end{document}
+% \end{Verbatim}
+%
+% Place |\usepackage{lwarp-newproject}| just before |\usepackage{lwarp}| in the
+% document source. The operating system and \TeX\ engine will be auto-detected,
+% and a customized |lwarpmk.conf| file will be generated, along with
+% the other support files (|*.css|, |lwarp_html.xdy|, |lwarp_mathjax.txt|).
+% Rename |sample_project.css| to your own custom |projectname.css| and
+% edit it if desired.
+%
+% After the first compile, |\usepackage{lwarp-newproject}|
+% may be commented out unless the configuration changes.
+% For example, it may be re-enabled
+% to switch between |pdflatex|, |xelatex|, and |lualatex|, in which case
+% a new manual compile (without using |lwarpmk|) will auto-configure and
+% regenerate the files. It may also be left enabled at all times, in which case
+% the configuration files will be regenerated each time. Note that your own
+% |projectname.css| file will not be over-written by the newly regenerated
+% |sample_project.css|.
+%
+
+% Discard all options for \pkg{lwarp-newproject}:
+% \begin{macrocode}
+\ProvidesPackage{lwarp-newproject}
+
+\RequirePackage{etoolbox}
+\RequirePackage{comment}
+\RequirePackage{fancyvrb}
+\RequirePackage{ifplatform}% sense op-system platform
+\RequirePackage{iftex}% sense pdflatex/lualatex/xelatex
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{family=LWRNP,prefix=LWRNP@}
+% \end{macrocode}
+
+
+% Generate config files?
+% \begin{macrocode}
+\newbool{LWRNP at genconf}
+\boolfalse{LWRNP at genconf}
+% \end{macrocode}
+
+% Optionally generate a local copy of |lwarpmk|. Default to no:
+% \begin{macrocode}
+\excludecomment{LWR at createlwarpmk}
+% \end{macrocode}
+
+% Process options:
+% \begin{macrocode}
+\DeclareVoidOption{warpprint}{\booltrue{LWRNP at genconf}}
+\DeclareVoidOption{warpHTML}{\boolfalse{LWRNP at genconf}}
+\DeclareVoidOption{lwarpmk}{\includecomment{LWR at createlwarpmk}}
+\DeclareStringOption[\jobname]{BaseJobname}
+
+\booltrue{LWRNP at genconf}% warpprint
+
+\ProcessKeyvalOptions*\relax
+% \end{macrocode}
+
+
+
+
+% Assign the \cs{BaseJobname} if the user hasn't provided one:
+% \begin{macrocode}
+\providecommand*{\BaseJobname}{\LWRNP at BaseJobname}
+% \end{macrocode}
+
+% Defaults unless already over-ridden by the user:
+% \begin{macrocode}
+% \ifbool{LWRNP at genconf}{
+\providecommand*{\HomeHTMLFileName}{\BaseJobname}
+% }{}
+\providecommand*{\HTMLFileName}{}
+\providecommand*{\UseLatexmk}{false}
+% \end{macrocode}
+%
+%
+
+
+\ifbool{LWRNP at genconf}{\typeout{lwarp-newproject: generating configuration files}}{}
+
+
+% \subsection{project\_html.tex}
+%
+% \DescribeFile{project_html.tex} Used to allow an \acro{HTML} version of the
+% document to exist alongside the print version.
+%
+% Only write |\jobname_html.tex| if generating the print version.
+% \begin{macrocode}
+\ifbool{LWRNP at genconf}{
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\immediate\openout\LWR at file=\jobname_html.tex
+\immediate\write\LWR at file{%
+\detokenize{\PassOptionsToPackage}%
+{warpHTML,BaseJobname=\jobname}{lwarp}%
+}
+\immediate\write\LWR at file{%
+\detokenize{\PassOptionsToPackage}%
+{warpHTML,BaseJobname=\jobname}{lwarp-newproject}%
+}
+\immediate\write\LWR at file{%
+\detokenize{\input}\string{\jobname.tex\string }%
+}
+\immediate\closeout\LWR at file
+}{}
+% \end{macrocode}
+
+
+% \subsection{project.lwarpmkconf}
+%
+% \DescribeFile{project.lwarpmkconf} The configuration file for |lwarpmk|.
+%
+%
+% \begin{macrocode}
+\ifbool{LWRNP at genconf}{
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\immediate\openout\LWR at file=\jobname.lwarpmkconf
+\ifwindows
+\immediate\write\LWR at file{opsystem = "Windows"}
+\else
+\immediate\write\LWR at file{opsystem = "Unix"}
+\fi
+\ifPDFTeX
+\immediate\write\LWR at file{latexname = "pdflatex"}
+\fi
+\ifXeTeX
+\immediate\write\LWR at file{latexname = "xelatex"}
+\fi
+\ifLuaTeX
+\immediate\write\LWR at file{latexname = "lualatex"}
+\fi
+\immediate\write\LWR at file{sourcename = "\jobname"}
+\immediate\write\LWR at file{%
+homehtmlfilename = "\HomeHTMLFileName"%
+}
+\immediate\write\LWR at file{htmlfilename = "\HTMLFileName"}
+\immediate\write\LWR at file{uselatexmk = "\UseLatexmk"}
+\immediate\closeout\LWR at file
+}{}
+% \end{macrocode}
+
+
+
+
+% \subsection{lwarp.css}
+
+% \DescribeFile{lwarp.css}
+% This is the base \acro{css} layer used by \pkg{lwarp}.
+%
+% This must be present both when compiling the project
+% and also when distributing the \acro{HTML} files.
+%
+% \begin{macrocode}
+\begin{VerbatimOut}{lwarp.css}
+/*
+ CSS stylesheet for the LaTeX lwarp package
+ Copyright 2016 Brian Dunn — BD Tech Concepts LLC
+*/
+
+
+/* a fix for older browsers: */
+header, section, footer, aside, nav, main,
+ article, figure { display: block; }
+
+
+A:link {color:#000080 ; text-decoration: none ; }
+A:visited {color:#800000 ; }
+A:hover {color:#000080 ; text-decoration: underline ;}
+A:active {color:#800000 ; }
+
+a.tocpart {display: inline-block ; margin-left: 0em ;
+ font-weight: bold ;}
+a.tocchapter {display: inline-block ; margin-left: 0em ;
+ font-weight: bold ;}
+a.tocsection {display: inline-block ; margin-left: 1em ;
+ text-indent: -.5em ; font-weight: bold ; }
+a.tocsubsection {display: inline-block ; margin-left: 2em ;
+ text-indent: -.5em ; }
+a.tocsubsubsection {display: inline-block ; margin-left: 3em ;
+ text-indent: -.5em ; }
+a.tocparagraph {display: inline-block ; margin-left: 4em ;
+ text-indent: -.5em ; }
+a.tocsubparagraph {display: inline-block ; margin-left: 5em ;
+ text-indent: -.5em ; }
+a.tocfigure {margin-left: 0em}
+a.tocsubfigure {margin-left: 2em}
+a.toctable {margin-left: 0em}
+a.tocsubtable {margin-left: 2em}
+a.toclstlisting {margin-left: 0em}
+
+
+body {
+ font-family: "DejaVu Serif", "Bitstream Vera Serif",
+ "Lucida Bright", Georgia, serif;
+ background: #FAF7F4 ;
+ color: black ;
+ margin:0em ;
+ padding:0em ;
+ font-size: 100% ;
+ line-height: 1.2 ;
+}
+
+p {margin: 1.5ex 0em 1.5ex 0em ;}
+
+/* Holds a section number to add space between it and the name */
+span.sectionnumber { margin-right: .6em }
+
+/* Inserted in front of index lines */
+span.indexitem {margin-left: 0em}
+span.indexsubitem {margin-left: 2em}
+span.indexsubsubitem {margin-left: 4em}
+
+div.hidden { display: none ; }
+
+kbd {
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
+ font-size: 100% ;
+}
+
+span.strong { font-weight: bold; }
+
+span.textmd { font-weight: normal; }
+
+span.textsc { font-variant: small-caps; }
+
+span.textup { font-variant: normal; }
+
+span.textrm {
+ font-family: "DejaVu Serif", "Bitstream Vera Serif",
+ "Lucida Bright", Georgia, serif;
+}
+
+span.textsf {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+}
+
+span.attribution {
+ margin-left: 1em ; font-size: 80% ; font-variant: small-caps;
+}
+
+span.citetitle {
+ margin-left: 1em ; font-size: 80% ; font-style: oblique;
+}
+
+span.poemtitle {
+ font-size: 120% ; font-weight: bold;
+}
+
+blockquote {
+ margin-left: 0px ;
+ margin-right: 0px ;
+}
+
+blockquote p {
+ line-height: 1.5;
+ text-align: left ;
+ font-size: .85em ;
+ margin-left: 3em ;
+ margin-right: 3em ;
+}
+
+blockquotation {
+ margin-left: 0px ;
+ margin-right: 0px ;
+}
+
+blockquotation p {
+ line-height: 1.5;
+ text-align: left ;
+ font-size: .85em ;
+ margin-left: 3em ;
+ margin-right: 3em ;
+}
+
+div.epigraph {
+ line-height: 1.2;
+ text-align: left ;
+ padding: 3ex 1em 0ex 1em ;
+/* margin: 3ex auto 3ex auto ; */ /* Epigraph centered */
+ margin: 3ex 1em 3ex auto ; /* Epigraph to the right */
+/* margin: 3ex 1em 3ex 1em ; */ /* Epigraph to the left */
+ font-size: .85em ;
+ max-width: 27em ;
+}
+
+
+
+div.epigraphsource{
+ text-align:right ;
+ margin-left:auto ;
+/* max-width: 50% ; */
+ border-top: 1px solid #A0A0A0 ;
+ padding-bottom: 3ex ;
+ line-height: 1.2;
+}
+
+div.epigraph p { padding: .5ex ; margin: 0ex ;}
+div.epigraphsource p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;}
+
+
+
+
+html body {
+ margin: 0 ;
+ line-height: 1.2;
+}
+
+
+body div {
+ margin: 0ex;
+}
+
+
+h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
+{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ font-style: normal ;
+ font-weight: bold ;
+ text-align: left ;
+}
+
+h1 { /* title of the entire website, used on each page */
+ text-align: center ;
+ font-size: 2.5em ;
+ padding: .4ex 0em 0ex 0em ;
+}
+h2 { font-size: 2.25em }
+h3 { font-size: 2em }
+h4 { font-size: 1.75em }
+h5 { font-size: 1.5em }
+h6 { font-size: 1.25em }
+span.paragraph {font-size: 1em ; font-variant: normal ;
+ margin-right: 1em ; }
+span.subparagraph {font-size: 1em ; font-variant: normal ;
+ margin-right: 1em ; }
+
+
+
+/* Title of the file */
+h1 {
+ margin: 0ex 0em 0ex 0em ;
+ line-height: 1.3;
+ text-align: center ;
+}
+
+/* Part */
+h2 {
+ margin: 1ex 0em 1ex 0em ;
+ line-height: 1.3;
+ text-align: center ;
+}
+
+/* Chapter */
+h3 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+/* Section */
+h4 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+/* Sub-Section */
+h5 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+/* Sub-Sub-Section */
+h6 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+
+div.titlepage {
+ text-align: center ;
+}
+
+.footnotes {
+ font-size: .85em ;
+ margin: 3ex 1em 0ex 1em ;
+ padding-bottom: 1ex ;
+}
+
+.marginpar {
+width:20%; float:right;
+text-align:left;
+margin: 1ex 0.5em 1ex 1em ;
+padding: 1ex 0.5em 1ex 0.5em ;
+font-size: 85% ;
+border-top: 1px solid silver ;
+border-bottom: 1px solid silver ;
+overflow-x: auto;
+}
+
+.marginpar br { margin-bottom: 2ex ; }
+
+div.marginblock {
+width:50%; float:right;
+text-align:left;
+margin: 1ex 0.5em 1ex 1em ;
+padding: 1ex 0.5em 1ex 0.5em ;
+overflow-x: auto;
+}
+
+div.marginblock div.minipage p { font-size: 85%}
+
+div.marginblock br { margin-bottom: 2ex ; }
+
+
+section.textbody div.footnotes{
+ margin: 3ex 0em 0ex 0em ;
+ border-bottom: 2px solid silver ;
+}
+
+.footnoteheader {
+ border-top: 2px solid silver ;
+ margin-top: 3ex ;
+ padding-top: 1ex ;
+ font-weight: bold ;
+}
+
+.mpfootnotes {
+ text-align: left ;
+ font-size: .85em ;
+ margin: 3ex 0em 3ex 0em ;
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+/* padding-top: 1ex ; */
+}
+
+/* Remove footnote top border in the title page. */
+div.titlepage div.mpfootnotes {
+ border-top: none ;
+}
+
+
+
+ol {
+ margin: 1ex 1em 1ex 0em;
+ line-height: 1.2;
+}
+
+ul, body dir, body menu {
+ margin: 1ex 1em 1ex 0em;
+ line-height: 1.2;
+}
+
+li { margin: 0ex 0em 1ex 0em; }
+
+html {
+ margin: 0;
+ padding: 0;
+}
+
+.programlisting {
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
+ margin: 1ex 0ex 1ex 0ex ;
+ padding: .5ex 0pt .5ex 0pt ;
+ overflow-x: auto;
+}
+
+section.textbody>pre.programlisting {
+border-top: 1px solid silver ;
+border-bottom: 1px solid silver ;
+}
+
+
+.inlineprogramlisting {
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
+ overflow-x: auto;
+}
+
+
+div.abstract {
+ margin: 2em 5% 2em 5% ;
+ padding: 1ex 1em 1ex 1em ;
+/* font-weight: bold ; */
+ font-size: 90% ;
+}
+
+div.abstract dl {line-height:1.5;}
+div.abstract dt {color:#304070;}
+
+div.abstracttitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-size:1.25em;
+ text-align: center ;
+}
+
+
+.verbatim {
+ overflow-x: auto ;
+}
+
+.alltt {
+ overflow-x: auto ;
+}
+
+
+.bverbatim {
+ margin: 1ex 0pt 1ex 0pt ;
+ padding: .5ex 0pt .5ex 0pt ;
+ overflow-x: auto ;
+}
+
+.lverbatim {
+ margin: 1ex 0pt 1ex 0pt ;
+ padding: .5ex 0pt .5ex 0pt ;
+ overflow-x: auto ;
+}
+
+.fancyvrb {
+ font-size:.85em ;
+ margin: 3ex 0pt 3ex 0pt
+}
+
+.fancyvrblabel {
+ font-weight:bold;
+ text-align: center ;
+}
+
+
+.verse {
+ font-family: "Linux Libertine Mono O", "Lucida Console",
+ "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
+ "Liberation Mono", "FreeMono", "Andale Mono",
+ "Nimbus Mono L", "Courier New", monospace;
+ margin-left: 1em ;
+}
+
+
+div.singlespace { line-height: 1.2 ; }
+div.onehalfspace { line-height: 1.5 ; }
+div.doublespace { line-height: 2 ; }
+
+
+.theorem {
+ background: #e0e0e0;
+ padding: 1ex ;
+ margin: 1em ;
+ border: 1px solid silver ;
+}
+
+.theoremlabel { font-weight: bold ; }
+
+.theoremcontents { font-style: italic; margin-left: 1em ; }
+
+
+/* Minipage environments, vertically aligned to top, center, bottom: */
+.minipage {
+ /* display: inline-block ; */
+ /* Mini pages which follow each other will be tiled. */
+ margin: .25em .25em .25em .25em;
+ padding: .25em .25em .25em .25em;
+ display: inline-flex;
+ flex-direction: column ;
+ overflow: auto;
+}
+
+/* Paragraphs in the flexbox did not collapse their margins. */
+/* Have not yet researched this. */
+.minipage p {margin: .75ex 0em .75ex 0em ;}
+
+
+
+.framebox {
+ margin: 0ex ;
+ padding: 0ex ;
+ border: 1px solid black;
+ border-radius: 0px ;
+ padding: .3ex .2em 0ex .2em ;
+ margin: .1ex ;
+ display: inline-block ;
+}
+
+
+.mdframed {
+/* padding: 0ex ; */
+/* border: 1px solid blafck; */
+/* border-radius: 0px ; */
+ padding: 0ex ;
+ margin: 3ex 5% 3ex 5% ;
+/* display: inline-block ; */
+}
+
+.mdframed p { padding: 0ex .5em 0ex .5em ; }
+
+.mdframed dl { padding: 0ex .5em 0ex .5em ; }
+
+.mdframedtitle {
+ padding: .5em ;
+ display: block ;
+ font-size: 130%
+}
+
+.mdframedsubtitle {
+ padding: 0ex .5em 0ex .5em ;
+ display: block ;
+ font-size: 115% ;
+}
+
+.mdframedsubsubtitle {
+ padding: 0ex .5em 0ex .5em ;
+ display: block ;
+}
+
+.mdtheorem {
+ padding: 0ex .5em 0ex .5em ;
+ margin: 3ex 5% 3ex 5% ;
+/* display: inline-block ; */
+}
+
+
+
+
+dl {
+ margin: 1ex 2em 1ex 0em;
+ line-height: 1.3;
+}
+
+dl dt {
+ margin-top: 1ex;
+ font-weight: bold;
+}
+
+dl dd p { margin-top: 0em; }
+
+
+nav.toc, nav.lof, nav.lot, nav.lol {
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+ margin-bottom: 4ex ;
+}
+
+nav.toc p, nav.lof p, nav.lot p, nav.lol p {
+ line-height: 1.2 ;
+ margin-top:.5ex ;
+ margin-bottom:.5ex;
+ font-size: .9em ;
+}
+
+
+
+img, img.hyperimage, img.borderimage {
+ max-width: 600px;
+ border: 1px solid silver;
+ box-shadow: 3px 3px 3px #808080 ;
+ padding: .5% ;
+ margin: .5% ;
+ background: none ;
+}
+
+img.inlineimage{
+ padding: 0px ;
+ box-shadow: none ;
+ border: none ;
+ background: none ;
+ margin: 0px ;
+ display: inline-block ;
+ border-radius: 0px ;
+}
+
+img.logoimage{
+ max-width: 300px ;
+ box-shadow: 3px 3px 3px #808080 ;
+ border: 1px solid black ;
+ background:none ;
+ padding:0 ;
+ margin:.5ex ;
+ border-radius: 10px ;
+}
+
+
+.section {
+/*
+ To have each section float relative to each other:
+*/
+/*
+ display: block ;
+ float: left ;
+ position: relative ;
+ background: white ;
+ border: 1px solid silver ;
+ padding: .5em ;
+*/
+ margin: 0ex .5em 0ex .5em ;
+ padding: 0 ;
+}
+
+
+figure {
+ margin: 3ex auto 3ex auto ;
+ padding: 1ex 1em 1ex 1em ;
+ overflow-x: auto ;
+}
+
+
+/* To automatically center images in figures: */
+/*
+figure img.inlineimage {
+ margin: 0ex auto 0ex auto ;
+ display: block ;
+}
+*/
+
+/* To automatically center minipages in figures: */
+/*
+figure div.minipage, figure div.minipage div.minipage {
+ margin: 1ex auto 1ex auto ;
+ display: block ;
+}
+*/
+
+figure div.minipage p { font-size: 85% ; }
+
+figure.subfigure, figure.subtable {
+ display: inline-block ; margin: 3ex 1em 3ex 1em ;
+}
+
+div.floatrow { text-align: center; }
+
+div.floatrow figure { display: inline-block ; margin: 1ex 2% ; }
+
+div.floatfoot { font-size: .85em ;
+ border-top: 1px solid silver ; line-height: 1.2 ; }
+
+figcaption , .lstlistingtitle {
+ font-size: .85em ;
+ text-align: center ;
+ font-weight: bold ;
+ margin-top: 1ex ;
+ margin-bottom: 1ex ;
+}
+
+figure.subfigure figcaption, figure.subtable figcaption {
+ border-bottom: none ; background: none ;
+}
+
+div.nonfloatcaption {
+ margin: 1ex auto 1ex auto ;
+ font-size: .85em ;
+ text-align: center ;
+ font-weight: bold ;
+}
+
+/* For a \RawCaption inside a minipage inside a figure's floatrow: */
+figure div.floatrow div.minipage figcaption {
+ border: none ;
+ background: none ;
+}
+
+
+table {
+ margin: 1ex auto 1ex auto ;
+ border-collapse: collapse ;
+ border-spacing: 0px ;
+ line-height: 1.3 ;
+ }
+
+tr.hline {border-top: 1px solid silver ; margin-top: 0ex ;
+ margin-bottom: 0ex ; } /* for \hline */
+
+tr.tbrule {border-top: 1px solid black ; margin-top: 0ex ;
+ margin-bottom: 0ex ; } /* for \toprule, \bottomrule */
+
+td {padding: 1ex .5em 1ex .5em ;}
+
+table td.tdl { text-align: left ; vertical-align: middle ; }
+table td.tdc { text-align: center ; vertical-align: middle ; }
+table td.tdr { text-align: right ; vertical-align: middle ; }
+table td.tdp { text-align: left ; vertical-align: bottom ; }
+table td.tdm { text-align: left ; vertical-align: middle ; }
+table td.tdb { text-align: left ; vertical-align: top ; }
+table td.tdP { text-align: center ; vertical-align: bottom ; }
+table td.tdM { text-align: center ; vertical-align: middle ; }
+table td.tdB { text-align: center ; vertical-align: top ; }
+table td.tdlrule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: middle ; } /* for cmidrule */
+table td.tdcrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdrrule { text-align: right ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdprule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: bottom ; }
+table td.tdmrule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdbrule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: top ; }
+table td.tdPrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: bottom ; }
+table td.tdMrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdBrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: top ; }
+
+/* Margins of paragraphs inside table cells: */
+td.tdp p , td.tdprule p , td.tdP p , td.tdPrule p { padding-top: 1ex ;
+ padding-bottom: 1ex ; margin: 0ex ; }
+td.tdm p , td.tmbrule p , td.tdM p , td.tdMrule p { padding-top: 1ex ;
+ padding-bottom: 1ex ; margin: 0ex ; }
+td.tdb p , td.tdbrule p , td.tdB p , td.tdBrule p { padding-top: 1ex ;
+ padding-bottom: 1ex ; margin: 0ex ; }
+
+td.tdp , td.tdprule , td.tdP , td.tdPrule
+ { padding: 0ex .5em 0ex .5em ; }
+td.tdm , td.tdmrule , td.tdM , td.tdMrule
+ { padding: 0ex .5em 0ex .5em ; }
+td.tdb , td.tdbrule , td.tdB , td.tdBrule
+ { padding: 0ex .5em 0ex .5em ; }
+
+
+/* table notes: */
+.tnotes {
+ margin: 0ex 5% 1ex 5% ;
+ padding: 0.5ex 1em 0.5ex 1em;
+ font-size:.85em;
+ text-align: left ;
+}
+
+.tnotes dl dt p {margin-bottom:0px;}
+
+.tnoteitemheader {margin-right: 1em;}
+
+
+
+/* center, flushleft, flushright environments */
+div.center{text-align:center;}
+div.center table {margin-left:auto;margin-right:auto;}
+div.flushleft{text-align:left;}
+div.flushleft table {margin-left:0em ; margin-right:auto;}
+div.flushright{text-align:right;}
+div.flushright table {margin-left:auto ; margin-right: 0em ;}
+
+
+
+
+/* program listing callouts: */
+span.callout {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+ border-radius: .5em;
+ background-color:black;
+ color:white;
+ padding:0px .25em 0px .25em;
+ margin: 0 ;
+ font-weight: bold;
+ font-size:.72em ;
+}
+
+div.programlisting pre.verbatim span.callout{
+ font-size: .85em ;
+}
+
+
+
+
+
+div.published
+{
+ text-align: center ;
+ font-variant: normal ;
+ font-style: italic ;
+ font-size: 1em ;
+ margin: 3ex 0em 3ex 0em ;
+}
+
+div.subtitle
+{
+ text-align: center ;
+ font-variant: normal ;
+ font-style: italic ;
+ font-size: 1.25em ;
+ margin: 3ex 0em 3ex 0em ;
+}
+
+div.subtitle p { margin: 1ex ; }
+
+div.author
+{
+ font-variant: normal ;
+ font-style: normal ;
+ font-size: 1em ;
+ margin: 3ex 0em 3ex 0em ;
+}
+
+div.author table {
+ margin: 3ex auto 0ex auto ;
+ background: none ;
+}
+
+div.author table tbody tr td { padding: .25ex ; }
+
+span.affiliation {font-size: .85em ; font-variant: small-caps; }
+
+div.titledate {
+ text-align: center ;
+ font-size: .85em ;
+ font-style: italic;
+ margin: 6ex 0em 6ex 0em ;
+}
+
+
+nav.topnavigation{
+ text-align: left ;
+ padding: 0.5ex 1em 0.5ex 1em ;
+/* margin: 2ex 0em 3ex 0em ; */
+ margin: 0 ;
+ border-bottom: 1px solid silver ;
+ border-top: 1px solid silver ;
+ clear:right ;
+}
+
+nav.botnavigation{
+ text-align: left ;
+ padding: 0.5ex 1em 0.5ex 1em ;
+/* margin: 3ex 0em 2ex 0em ; */
+ margin: 0 ;
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+ clear:right ;
+}
+
+
+header{
+ line-height: 1.2 ;
+ font-size: 1em ;
+/* border-bottom: 2px solid silver ; */
+ margin: 0px ;
+ padding: 0ex 1em 0ex 1em ;
+ text-align:center ;
+}
+
+header p {margin:0ex;padding:4ex 0em 2ex 0em ;text-align:center;}
+
+
+footer{
+ font-size: .85em ;
+ line-height: 1.2 ;
+ margin-top: 1ex ;
+ border-top: 2px solid silver ;
+ padding: 2ex 1em 2ex 1em ;
+ clear:right ;
+ text-align:left ;
+}
+
+
+a.linkhome { font-weight:bold ; font-size: 1em ;}
+
+
+div.lateximagesource { padding: 0px ; margin: 0px ; display: none; }
+
+img.lateximage{
+ padding: 0px 0px 0px 0px ;
+ box-shadow: none ;
+ border: none ;
+ background: none ;
+ margin: 0px 0px -.15ex 0px ;
+ /* pdfcrop leaves a slight margin, adjust to baseline */
+ max-width: 100% ;
+ border-radius: 0ex ;
+ border: none ;
+}
+
+
+
+nav.sidetoc {
+ font-family: "DejaVu Serif", "Bitstream Vera Serif",
+ "Lucida Bright", Georgia, serif;
+ float:right ;
+ width: 20%;
+ border-left: 1px solid silver;
+ border-top: 1px solid silver;
+ border-bottom: 1px solid silver;
+/* border-top: 2px solid #808080 ; */
+ background: #FAF7F4 ;
+ padding: 2ex 0em 2ex 1em ;
+ margin: 0ex 0em 2ex 1em ;
+ font-size:.9em ;
+ border-radius: 20px 0px 0px 20px ;
+ }
+
+div.sidetoccontents {
+/* border-top: 1px solid silver ; */
+ overflow-y: auto ;
+ width: 100% ;
+ text-align: left ;
+}
+
+nav.sidetoc p {line-height:1.2 ; margin: 1ex .5em 1ex .5em ;
+ text-indent: 0 ; }
+nav.sidetoc p a {color:black ; font-size: .7em ;}
+div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center;
+ border-bottom: 1px solid silver ; }
+nav.sidetoc a:hover {text-decoration: underline ; }
+
+
+
+section.textbody { margin: 0ex 1em 0ex 1em ;}
+
+
+div.multicolsheading { -webkit-column-span: all;
+ -moz-column-span: all; column-span: all; }
+div.multicols { -webkit-columns: 3 380px ;
+ -moz-columns: 3 380px ; columns: 3 380px ; }
+div.multicols p {margin-top: 0ex}
+
+/* Used to support algorithmicx: */
+span.floatright { float: right ; }
+
+
+
+/*
+For CSS LaTeX and related logos:
+Based on:
+http://edward.oconnor.cx/2007/08/tex-poshlet
+http://nitens.org/taraborelli/texlogo
+*/
+
+.latexlogofont {
+ font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-variant: normal ;
+}
+
+.latexlogo {
+ font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ letter-spacing: .03em ;
+ font-size: 1.1em;
+}
+
+.latexlogo sup {
+ text-transform: uppercase;
+ letter-spacing: .03em ;
+ font-size: 0.85em;
+ vertical-align: 0.15em;
+ margin-left: -0.36em;
+ margin-right: -0.15em;
+}
+
+.latexlogo sub {
+ text-transform: uppercase;
+ vertical-align: -0.5ex;
+ margin-left: -0.1667em;
+ margin-right: -0.125em;
+ font-size: 1em;
+}
+
+.xetexlogo {
+ font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ letter-spacing: .03em ;
+ font-size: 1.1em;
+}
+
+/* A smaller gap between Xe and Tex v.s. LaTeX: */
+.xetexlogo sub {
+ text-transform: uppercase;
+ vertical-align: -0.5ex;
+ margin-left: -0.0667em;
+ margin-right: -0.2em;
+ font-size: 1em;
+ letter-spacing: .03em ;
+}
+
+/* A large gap between Xe and LaTeX v.s. TeX: */
+.xelatexlogo sub {
+ text-transform: uppercase;
+ vertical-align: -0.5ex;
+ margin-left: -0.0667em;
+ margin-right: -.05em;
+ font-size: 1em;
+ letter-spacing: .03em ;
+}
+
+.amslogo {
+ font-family: "TeXGyreChorus","URW Chancery L",
+ "Apple Chancery","ITC Zapf Chancery","Monotype Corsiva",
+ "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif",
+ "Hoefler Text", Times, "Times New Roman", serif;
+ font-style: italic;
+}
+
+.lyxlogo {
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "DejaVu Sans", "Bitstream Vera Sans", Geneva,
+ Verdana, sans-serif ;
+}
+
+
+
+
+/* Only display top and bottom navigation if a small screen: */
+/* Hide the sidetoc if a small screen: */
+nav.topnavigation { display:none; }
+nav.botnavigation { display:none; }
+
+ at media screen and (max-width: 45em) {
+/* nav.sidetoc {display:none;} */
+ nav.sidetoc {
+ float: none ;
+ width: 100% ;
+ margin: 5ex 0px 5ex 0px ;
+ padding: 0 ;
+ border-radius: 0 ;
+ border-bottom: 1px solid black ;
+ border-top: 1px solid black ;
+ box-shadow: none ;
+ }
+/* nav.topnavigation { display:block } */
+ nav.botnavigation { display:block }
+}
+
+ at media print {
+ body {
+ font-family: "Linux Libertine O",
+ "DejaVu Serif", "Bitstream Vera Serif",
+ "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ }
+ nav.sidetoc { display:none; }
+ nav.topnavigation { display: none; }
+ nav.botnavigation { display: none; }
+}
+
+ at media handheld {
+ nav.sidetoc { display:none; }
+ nav.topnavigation { display:block }
+ nav.botnavigation { display:block }
+}
+
+ at media projection {
+ nav.sidetoc { display:none; }
+ nav.topnavigation { display:block }
+ nav.botnavigation { display:block }
+}
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+
+
+
+% \subsection{lwarp\_sagebrush.css}
+
+% \DescribeFile{lwarp_sagebrush.css}
+% An optional \acro{css} which may be used for
+% a semi-modern appearance.
+%
+% If used, this must be present both when compiling the project
+% and also when distributing the \acro{HTML} files.
+%
+% \begin{macrocode}
+\begin{VerbatimOut}{lwarp_sagebrush.css}
+ at import url("lwarp.css") ;
+
+
+A:link {color:#105030 ; text-decoration: none ; }
+A:visited {color:#705030 ; text-shadow:1px 1px 2px #a0a0a0;}
+A:hover {color:#006000 ; text-decoration: underline ; text-shadow:0px 0px 2px #a0a0a0;}
+A:active {color:#00C000 ; text-shadow:1px 1px 2px #a0a0a0;}
+
+
+
+h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
+{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif",
+ "Nimbus Roman No 9 L", "FreeSerif",
+ "Hoefler Text", Times, "Times New Roman", serif;
+ font-variant: small-caps ;
+ font-weight: normal ;
+ color: #304070 ;
+ text-shadow: 2px 2px 3px #808080;
+}
+
+h1 { /* title of the entire website, used on each page */
+ font-variant: small-caps ;
+ color: #304070 ;
+ text-shadow: 2px 2px 3px #808080;
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C4);
+}
+
+h1 {
+ border-bottom: 1px solid #304070;
+ border-top: 2px solid #304070;
+}
+
+h2 {
+ border-bottom: 1px solid #304070;
+ border-top: 2px solid #304070;
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #DAD0C0);
+}
+
+
+
+div.abstract {
+ background: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+ border: 1px solid silver;
+ border-radius: 1em ;
+}
+
+div.abstract dl {line-height:1.5;}
+div.abstract dt {color:#304070;}
+
+div.abstracttitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ font-size:1.5em;
+ border-bottom: 1px solid silver ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+
+div.epigraph {
+ background: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+ border: 1px solid silver ;
+ border-radius: 1ex ;
+ box-shadow: 3px 3px 3px #808080 ;
+}
+
+
+.example {
+ background-color: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+}
+
+div.exampletitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ border-bottom: 1px solid silver ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+
+.sidebar {
+ background-color: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+}
+
+div.sidebartitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ border-bottom: 1px solid silver ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+
+.fancyvrblabel {
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ font-size: 1.5em ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+
+
+.minipage {
+ background-color: #eeeee7 ;
+ border: 1px solid silver ;
+ border-radius: 1ex ;
+}
+
+figure.figure .minipage { border: none; }
+
+div.marginblock div.minipage { border: none; }
+
+figure , div.marginblock {
+ background-color: #eeeee7 ;
+ border: 1px solid silver ;
+ border-radius: 1ex ;
+ box-shadow: 3px 3px 3px #808080 ;
+}
+
+figure figure {
+ border: 1px solid silver ;
+ margin: 0em ;
+ box-shadow: none ;
+}
+
+/*
+figcaption {
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+ background-color: #e8e8e8 ;
+}
+*/
+
+
+div.table {
+ box-shadow: 3px 3px 3px #808080 ;
+}
+
+/*
+.tnotes {
+ background: #e8e8e8;
+ border: 1px solid silver;
+}
+*/
+
+
+nav.topnavigation{
+ background-color: #b0b8b0 ;
+ background-image: linear-gradient(to bottom,#e0e0e0,#b0b8b0) ;
+}
+
+nav.botnavigation{
+ background-color: #b0b8b0 ;
+ background-image: linear-gradient(to top,#e0e0e0,#b0b8b0) ;
+}
+
+
+
+header{
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to top, #F7F7F0, #b0b8b0);
+}
+
+footer{
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #b0b8b0);
+}
+
+
+
+nav.sidetoc {
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C0);
+ box-shadow: 3px 3px 3px #808080 ;
+ border-radius: 0px 0px 0px 20px ;
+ }
+
+div.sidetoctitle {color: #304070 ; }
+nav.sidetoc a:hover {color:#006000 ; text-decoration: none ; text-shadow:0px 0px 2px #a0a0a0;}
+
+
+ at media screen and (max-width: 45em) {
+ nav.sidetoc { border-radius: 0 ; }
+}
+
+
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+
+
+
+% \subsection{lwarp\_formal.css}
+
+% \DescribeFile{lwarp_formal.css}
+% An optional \acro{css} which may be used for
+% a more formal appearance.
+%
+% If used, this must be present both when compiling the project
+% and also when distributing the \acro{HTML} files.
+%
+% \begin{macrocode}
+\begin{VerbatimOut}{lwarp_formal.css}
+ at import url("lwarp.css") ;
+
+
+
+A:link {color:#802020 ; text-decoration:none; }
+A:visited {color:#802020 ; text-shadow:none ;}
+A:hover {color:#400000 ; text-shadow:none ;}
+A:active {color:#C00000 ; text-shadow:none ;}
+
+
+body {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ background: #fffcf5;
+}
+
+span.textrm {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+}
+
+span.textsf {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+}
+
+
+
+h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
+{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+}
+
+h1, h2 {
+ background-color: #fffcf5 ;
+ background-image: none ;
+ border-bottom: 1px solid #808080;
+ border-top: 2px solid #808080;
+}
+
+div.abstracttitle {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: black ;
+ text-shadow: none ;
+}
+
+div.abstract { font-size: 100% }
+
+.sidebar {
+ background: #fffcf5;
+ background-image: none ;
+ margin: 2em 5% 2em 5%;
+ padding: 0.5em 1em;
+ border: none ;
+ border-top : 1px solid silver;
+ border-bottom : 1px solid silver;
+ font-size: 90% ;
+}
+
+div.sidebartitle{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+ border: none ;
+}
+
+.example {
+ background: #fffcf5;
+ background-image: none ;
+ margin: 2em 5% 2em 5%;
+ padding: 0.5em 1em;
+ border: none ;
+ border-top : 1px solid silver;
+ border-bottom : 1px solid silver;
+}
+
+div.exampletitle{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+ border: none ;
+}
+
+div.fancyvrblabel{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+ border: none ;
+}
+
+
+
+.verse {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+}
+
+
+figure {
+ margin: 3ex 5% 3ex 5% ;
+ padding: 1ex 1em 1ex 1em ;
+ background-color: #fffcf5 ;
+ overflow-x: auto ;
+ border: none ;
+/* border-top: 1px solid silver; */
+/* border-bottom: 1px solid silver; */
+}
+
+
+figcaption , .lstlisting {
+ border: none ;
+/* border-top: 1px solid silver ; */
+/* border-bottom: 1px solid silver ; */
+ background-color: #fffcf5 ;
+}
+
+.tnotes {
+ background: #fffcf5 ;
+}
+
+.theorem {
+ background: none ;
+}
+
+.minipage {
+ background-color: #fffcf5 ;
+ border: none ;
+ margin: 1em ;
+}
+
+div.floatrow figure { border: none ; }
+
+figure figure { border: none ; }
+
+
+nav.toc, nav.lof, nav.lot, nav.lol {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+}
+
+nav.sidetoc {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ background-image: linear-gradient(to bottom, #fffcf5, #C0C0C0);
+ border-radius: 0px 0px 0px 20px ;
+}
+
+div.sidetoctitle{
+ color: #800000 ;
+}
+
+header{
+ background-color: #e0e0e0 ;
+ background-image: linear-gradient(to top, #fffcf5, #b0b0b0);
+ text-align:center ;
+}
+
+footer{
+ background-color: #e0e0e0 ;
+ background-image: linear-gradient(to bottom, #fffcf5, #b0b0b0);
+ padding: 2ex 1em 2ex 1em ;
+ clear:right ;
+ text-align:left ;
+}
+
+nav.botnavigation {
+ background: #dedcd5 ;
+ border-top: 1px solid black ;
+}
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+
+
+% \subsection{sample\_project.css}
+
+% \DescribeFile{sample_project.css}
+% The project-specific \acro{css} file. Use with \cs{NewCSS}.
+%
+% If used, this must be present both when compiling the project
+% and also when distributing the \acro{HTML} files.
+%
+% \begin{macrocode}
+\begin{VerbatimOut}{sample_project.css}
+/* ( --- Start of project.css --- ) */
+/* A sample project-specific CSS file for lwarp --- ) */
+
+/* Load default lwarp settings: */
+ at import url("lwarp.css") ;
+/* or lwarp_formal.css, lwarp_sagebrush.css */
+
+/* Project-specific CSS setting follow here. */
+/* . . . */
+
+/* ( --- End of project.css --- ) */
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+
+
+% \subsection{lwarp\_html.xdy}
+
+% \DescribeFile{lwarp_html.xdy}
+% Used to modify the index for \pkg{lwarp}.
+%
+% This must be present when compiling the project,
+% but does not need to be present when distributing
+% the resulting \acro{HTML} files.
+%
+% \begin{macrocode}
+\begin{VerbatimOut}{lwarp_html.xdy}
+(require "tex/inputenc/latin.xdy")
+(merge-rule "\\PS *" "Postscript")
+(require "texindy.xdy")
+(require "page-ranges.xdy")
+(require "book-order.xdy")
+(markup-locref :open "\hyperindexref{" :close "}")
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+
+
+% \subsection{lwarp\_mathjax.txt}
+
+% \DescribeFile{lwarp_mathjax.txt}
+% Used by \pkg{lwarp} when using MathJax.
+%
+% This must be present when compiling the project,
+% but does not need to be present when distributing
+% the resulting \acro{HTML} files.
+
+% \begin{macrocode}
+\begin{VerbatimOut}{lwarp_mathjax.txt}
+<!-- https://groups.google.com/forum/#!topic/
+ mathjax-users/jUtewUcE2bY -->
+<script type="text/x-mathjax-config">
+MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
+ var seteqsectionDefault = {name: "", num: 0};
+ var seteqsections = {}, seteqsection = seteqsectionDefault;
+ var TEX = MathJax.InputJax.TeX, PARSE = TEX.Parse;
+ var AMS = MathJax.Extension["TeX/AMSmath"];
+ TEX.Definitions.Add({
+ macros: {
+ seteqsection: "mySection",
+ seteqnumber: "mySetEqNumber"
+ }
+ });
+
+ PARSE.Augment({
+ mySection: function (name) {
+ seteqsection.num = AMS.number;
+ var n = this.GetArgument(name);
+ if (n === "") {
+ seteqsection = seteqsectionDefault;
+ } else {
+ if (!seteqsections["_"+n])
+ seteqsections["_"+n] = {name:n, num:0};
+ seteqsection = seteqsections["_"+n];
+ }
+ AMS.number = seteqsection.num;
+ },
+ mySetEqNumber: function (name) {
+ var n = this.GetArgument(name);
+ if (!n || !n.match(/^ *[0-9]+ *$/))
+ n = ""; else n = parseInt(n)-1;
+ <!-- $ syntax highlighting -->
+ if (n === "" || n < 1)
+ TEX.Error
+ ("Argument to "+name+" should be a positive integer");
+ AMS.number = n;
+ }
+ });
+ MathJax.Hub.Config({
+ TeX: {
+ equationNumbers: {
+ formatTag: function (n)
+ {return "("+(seteqsection.name+"."+n).replace(/^\./,"")+")"},
+ formatID: function (n) {
+ n = (seteqsection.name+'.'+n).replace
+ (/[:"'<>&]/g,"").replace(/^\./,"");
+ return 'mjx-eqn-' + n;
+ }
+ }
+ }
+ });
+});
+</script>
+
+<!-- http://docs.mathjax.org/en/latest/options/ThirdParty.html -->
+<script type="text/x-mathjax-config">
+ MathJax.Ajax.config.path["Contrib"] =
+ "https://cdn.mathjax.org/mathjax/contrib";
+</script>
+
+<!-- https://github.com/mathjax/MathJax-third-party-extensions/
+ tree/master/siunitx -->
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js","[Contrib]/siunitx/siunitx.js"],
+ jax: ["input/TeX","output/HTML-CSS"],
+ tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
+ TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
+ });
+ </script>
+
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+ TeX: {
+ equationNumbers: {
+ autoNumber: "AMS"
+ }
+ }
+});
+</script>
+
+<script
+ src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
+</script>
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+
+
+% \subsection{Lwarpmk option}
+
+% The following is only generated if the |lwarpmk| option
+% was given to \pkg{lwarp-newproject}.
+% \begin{macrocode}
+\begin{LWR at createlwarpmk}
+% \end{macrocode}
+
+% \DescribeFile{lwarpmk} Creates a local copy of |lwarpmk|:
+%
+% \begin{macrocode}
+\begin{VerbatimOut}{lwarpmk.lua}
+#!/usr/bin/env texlua
+
+-- Copyright 2016 Brian Dunn
+
+-- Print the usage of the lwarpmk command:
+
+printversion = "v0.20"
+
+function printhelp ()
+print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
+end
+
+function printusage ()
+print ( [[
+
+lwarpmk print [project]: Compile a print version.
+lwarpmk printindex [project]: Process the index for the print version.
+lwarpmk html [project]: Compile an HTML version.
+lwarpmk htmlindex [project]: Process the index for the html version.
+lwarpmk again [project]: Touch the source code to trigger recompiles.
+lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
+lwarpmk pdftohtml [project]:
+ For use with latexmk or a Makefile:
+ Convert project_html.pdf to project_html.html and
+ individual HTML files.
+lwarpmk clean [project]: Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk -h: Print this help message.
+lwarpmk --help: Print this help message.
+
+]] )
+printconf ()
+end
+
+-- Print the format of the configuration file lwarpmk.conf:
+
+function printconf ()
+print ( [[
+An example lwarpmk.conf or <project>.lwarpmkconf project file:
+--
+opsystem = "Unix" (or "Windows")
+latexname = "pdflatex" (or "lualatex", or "xelatex")
+sourcename = "projectname" (the source-code filename w/o .tex)
+homehtmlfilename = "index" (or perhaps the project name)
+htmlfilename = "" (or "projectname" - filename prefix)
+uselatexmk = "false" (or "true" to use latexmk to build PDFs)
+--
+Filenames must contain only letters, numbers, underscore, or dash.
+Values must be in "quotes".
+
+]] ) ;
+end
+
+-- Split one large sourcefile into a number of files,
+-- starting with destfile.
+-- The file is split at each occurance of <!--|Start file|newfilename|*
+
+function splitfile (destfile,sourcefile)
+print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
+io.input(sourcefile)
+io.output(destfile)
+for line in io.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") ;
+end
+end -- do
+end -- function
+
+-- Incorrect value, so print an error and exit.
+
+function cvalueerror ( line, linenum , cvalue )
+ print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ printconf () ;
+ os.exit(1) ;
+end
+
+-- Load settings from the project's "lwarpmk.conf" file:
+
+function loadconf ()
+-- Default configuration filename:
+local conffile = "lwarpmk.conf"
+-- Optional configuration filename:
+if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end
+-- 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
+else -- file exists
+-- Read the file:
+print ("lwarpmk: Reading " .. conffile ..".")
+io.input(conffile) ;
+-- Scan each line:
+local linenum = 0
+for line in io.lines() do -- scan lines
+linenum = linenum + 1
+i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w-_]*)\"") ;
+-- Error if incorrect enclosing characters:
+if ( i == nil ) then
+print ( linenum .. " : " .. line ) ;
+print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+if ( cvarname == "opsystem" ) then
+ -- Verify choice of opsystem:
+ if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
+ opsystem = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "latexname" ) then
+ -- Verify choice of LaTeX compiler:
+ if (
+ (cvalue == "pdflatex") or
+ (cvalue == "xelatex") or
+ (cvalue == "lualatex")
+ ) then
+ latexname = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "sourcename" ) then sourcename = cvalue
+elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue
+elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue
+elseif ( cvarname == "uselatexmk" ) then uselatexmk = cvalue
+else
+print ( linenum .. " : " .. line ) ;
+print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+end -- do scan lines
+end -- file exists
+-- Select some operating-system commands:
+if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
+rmname = "rm"
+touchname = "touch"
+chmodcmd = "chmod u+x lateximages.sh"
+lateximagesname = "./lateximages.sh"
+elseif opsystem=="Windows" then -- For Windows
+rmname = "DEL"
+touchname = "TOUCH"
+chmodcmd = ""
+lateximagesname = "lateximages.cmd"
+else print ( "lwarpmk: Select Unix or Windows for opsystem" )
+end --- for Windows
+end -- loadconf
+
+-- Scan the LaTeX log file for the phrase "Rerun to get",
+-- indicating that the file should be compiled again.
+-- Return true if found.
+
+function reruntoget (filesource)
+io.input(filesource)
+for line in io.lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+end
+return false
+end
+
+-- Compile one time, return true if should compile again.
+-- fsuffix is "" for print, "_html" for HTML output.
+
+function onetime (fsuffix)
+print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
+err = os.execute(
+-- "echo " ..
+ latexname .. " " .. sourcename..fsuffix )
+if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
+end
+
+-- Compile up to five times.
+-- fsuffix is "" for print, "_html" for HTML output
+
+function manytimes (fsuffix)
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+end end end end end
+end
+
+-- Exit if the given file does not exist.
+
+function verifyfileexists (filename)
+if (lfs.attributes ( filename , "modification" ) == nil ) then
+print ( "lwarpmk: " .. filename .. " not found." ) ;
+os.exit (1) ;
+end
+end
+
+-- Convert <project>_html.pdf into HTML files:
+
+function pdftohtml ()
+ -- Convert to text:
+ print ("lwarpmk: Converting " .. sourcename .."_html.pdf to " .. sourcename .. "_html.html")
+ os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+ -- Split the result into individual HTML files:
+ splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+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 "
+ )
+end
+
+-- lwarpmk --version :
+
+if (arg[1] == "--version") then
+print ( "lwarpmk: " .. printversion )
+
+else -- not -- version
+
+-- print intro:
+
+print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+
+-- lwarpmk print:
+
+if arg[1] == "print" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ os.execute ( "latexmk -pdf -dvi- -ps- -pdflatex=\"" .. latexname .." %O %S\" " .. sourcename ..".tex" ) ;
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists (sourcename .. ".tex") ;
+ -- See if up to date:
+ if (
+ ( lfs.attributes ( sourcename .. ".pdf" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( sourcename .. ".pdf" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("")
+ print ("lwarpmk: Done.") ;
+ else
+ print ("lwarpmk: " .. sourcename .. ".pdf is up to date.") ;
+ end
+end -- not latexmk
+
+-- lwarp printindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "printindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. ".idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk html:
+
+elseif arg[1] == "html" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ -- 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 '$makeindex = q/texindy -M lwarp_html.xdy/' "
+ .. "-pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename .."_html.tex" ) ;
+ if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists ( sourcename .. ".tex" ) ;
+ -- See if exists and is up to date:
+ if (
+ ( lfs.attributes ( homehtmlfilename .. ".html" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( homehtmlfilename .. ".html" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("_html")
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+ else
+ print ("lwarpmk: " .. homehtmlfilename .. ".html is up to date.")
+ end
+end -- not latexmk
+
+elseif arg[1] == "pdftohtml" then
+ loadconf ()
+ pdftohtml ()
+
+-- lwarpmk htmlindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "htmlindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. "_html.idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk limages:
+-- Make the lateximages command file executable,
+-- execute it to create the images,
+-- then touch the source to trigger a recompile.
+
+elseif arg[1] == "limages" then
+loadconf ()
+print ("lwarpmk: Processing images.")
+os.execute(chmodcmd)
+os.execute(lateximagesname)
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk again:
+-- Touch the source to trigger a recompile.
+
+elseif arg[1] == "again" then
+loadconf ()
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk clean:
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+
+elseif arg[1] == "clean" then
+loadconf ()
+removeaux ()
+print ("lwarpmk: Done.")
+
+-- lwarpmk cleanall
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+-- and also project.pdf, *.html
+
+elseif arg[1] == "cleanall" then
+loadconf ()
+removeaux ()
+os.execute ( rmname .. " " ..
+ sourcename .. ".pdf " .. sourcename .. "_html.pdf " ..
+ "*.html"
+ )
+print ("lwarpmk: Done.")
+
+-- lwarpmk with no argument :
+
+elseif (arg[1] == nil) then
+printhelp ()
+
+-- lwarpmk -h or lwarpmk --help :
+
+elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
+printusage ()
+
+else
+print ("lwarpmk: Unknown command \""..arg[1].."\".\n")
+printhelp ()
+end
+
+end -- not --version
+\end{VerbatimOut}
+% \end{Verbatim}% for syntax highlighting
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{LWR at createlwarpmk}
+% \end{macrocode}
+
+
+% \iffalse
+%</lwarp-newproject>
+% \fi
+
+
+
+
+
+% \changes{v0.20}{2016/12/12}{Code factored into independent \texttt{lwarp\_html} files.}
+
+
+
+
+% \iffalse
+%<*afterpage>
+% \fi
+
+% \part{lwarp-afterpage.sty}
+
+% \section{Afterpage}
+%
+% \DescribePackage{afterpage}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{afterpage}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-afterpage}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{afterpage}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand{\afterpage}[1]{#1}
+% \end{macrocode}
+
+% \iffalse
+%</afterpage>
+% \fi
+
+
+
+% \clearpage
+
+% \iffalse
+%<*algorithmicx>
+% \fi
+
+% \part{lwarp-algorithmicx.sty}
+
+% \section{Algorithmicx}
+% \label{sec:algorithmicx}
+%
+% \DescribePackage{algorithmicx}
+% \pkg{algorithmicx} is supported with minor adjustments.
+%
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{algorithmicx}
+% \end{macrocode}
+
+
+%
+%
+% Inside the \env{algorithmic} environment, level indenting is converted to a |span|
+% of the required length, and comments are placed inside a |span| which is floated right.
+%
+% \limitscombiningfloats
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macrocode}
+\AtBeginEnvironment{algorithmic}{%
+%
+\let\origALG at doentity\ALG at doentity%
+%
+\renewcommand*{\ALG at doentity}{%
+\origALG at doentity%
+\uselengthunit{PT}%
+\LWR at htmltagc{%
+span style="width:\rndprintlength{\ALG at thistlm}; display:inline-block;"%
+}%
+\LWR at htmltagc{/span}%
+}%
+%
+\let\origComment\Comment%
+%
+\renewcommand{\Comment}[1]{\InlineClass{floatright}{\origComment{#1}}}%
+}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+% \iffalse
+%</algorithmicx>
+% \fi
+
+
+
+% \iffalse
+%<*alltt>
+% \fi
+
+% \part{lwarp-alltt.sty}
+
+% \section{Alltt}
+%
+% \DescribePackage{alltt}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{alltt}: Added.}
+%
+% \codehtml
+%
+% \pkg{alltt} is patched for use by \pkg{lwarp}.
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{alltt}
+% \end{macrocode}
+
+% \begin{macrocode}
+\AfterEndPreamble{
+\AtBeginEnvironment{alltt}{\LWR at atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}}
+\AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+}
+% \end{macrocode}
+
+% \iffalse
+%</alltt>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*bookmark>
+% \fi
+
+% \part{lwarp-bookmark.sty}
+
+% \section{Bookmark}
+%
+% \DescribePackage{bookmark}
+% \pkg{bookmark} is emulated during \acro{HTML} output, and
+% the \pkg{bookmark} package is ignored.
+
+% \changes{v0.20}{2017/01/03}{\pkg{bookmark}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-bookmark}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{bookmark}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\bookmarksetup}[1]{}
+\newcommand*{\bookmarksetupnext}[1]{}
+\newcommand*{\bookmark}[2][]{}
+\newcommand*{\bookmarkdefinestyle}[2]{}
+\newcommand*{\bookmarkget}[1]{}
+\newcommand{\BookmarkAtEnd}[1]{}
+% \end{macrocode}
+
+% \iffalse
+%</bookmark>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*booktabs>
+% \fi
+
+% \part{lwarp-booktabs.sty}
+
+% \section{Booktabs}
+% \label{sec:booktabs}
+%
+%
+% \DescribePackage{booktabs}
+% \pkg{booktabs} is emulated during \acro{HTML} output, and
+% the \pkg{booktabs} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{booktabs}
+% \end{macrocode}
+%
+% Booktabs emulation is spread among the tabular code.
+%
+%
+% Emulated for source compatibility.
+% \begin{macrocode}
+\newcommand*{\addlinespace}[1]{}
+\newcommand*{\morecmidrules}{}
+\newcommand*{\specialrule}[3]{}
+% \end{macrocode}
+
+% \iffalse
+%</booktabs>
+% \fi
+
+
+
+
+
+
+
+
+% \iffalse
+%<*draftwatermark>
+% \fi
+
+% \part{lwarp-draftwatermark.sty}
+
+% \section{Draftwatermark}
+% \label{sec:draftwatermark}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{draftwatermark}: Added.}
+%
+% \DescribePackage{draftwatermark}
+% \pkg{draftwatermark} is emulated during \acro{HTML} output, and
+% the \pkg{draftwatermark} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{draftwatermark}
+% \end{macrocode}
+
+% \codehtml
+
+% \begin{macrocode}
+\newcommand{\SetWatermarkAngle}[1]{}
+\newcommand{\SetWatermarkColor}[1]{}
+\newcommand{\SetWatermarkLightness}[1]{}
+\newcommand{\SetWatermarkFontSize}[1]{}
+\newcommand{\SetWatermarkScale}[1]{}
+\newcommand{\SetWatermarkHorCenter}[1]{}
+\newcommand{\SetWatermarkVertCenter}[1]{}
+\newcommand{\SetWatermarkText}[1]{}
+% \end{macrocode}
+
+% \iffalse
+%</draftwatermark>
+% \fi
+
+
+% \iffalse
+%<*epigraph>
+% \fi
+
+% \part{lwarp-epigraph.sty}
+
+% \section{Epigraph}
+% \label{sec:epigraph}
+%
+%
+% \DescribePackage{epigraph}
+% \pkg{epigraph} is emulated during \acro{HTML} output, and
+% the \pkg{epigraph} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{epigraph}
+% \end{macrocode}
+
+% \codehtml
+
+% \begin{macrocode}
+\newcommand{\qitem}[2]
+{
+\begin{BlockClass}{qitem}
+#1
+\begin{BlockClass}{epigraphsource}
+#2
+\end{BlockClass}
+\end{BlockClass}
+}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand{\epigraph}[2]
+{
+\begin{BlockClass}{epigraph}
+\qitem{#1}{#2}
+\end{BlockClass}
+}
+
+\newenvironment*{epigraphs}
+{\BlockClass{epigraph}}
+{\endBlockClass}
+% \end{macrocode}
+%
+% Use \acro{CSS} to format epigraphs.
+%
+% The following are null commands for source compatibility:
+% \begin{macrocode}
+\newlength{\epigraphwidth}
+\setlength{\epigraphwidth}{.5\linewidth}
+\newenvironment*{flushepinormal}{}{}
+\newcommand{\textflush}[1]{flushepinormal}
+\newcommand{\epigraphflush}[1]{flushright}
+\newcommand{\sourceflush}[1]{flushright}
+\newcommand*{\epigraphsize}{\small}
+\newlength{\epigraphrule}
+\newlength{\beforeepigraphskip}
+\newlength{\afterepigraphskip}
+\newcommand{\epigraphhead}[2][0]{#2}
+\newcommand{\dropchapter}[1]{}
+\newcommand*{\undodrop}{}
+\newcommand{\cleartoevenpage}[1][]{}
+% \end{macrocode}
+
+% \iffalse
+%</epigraph>
+% \fi
+
+
+
+
+% \iffalse
+%<*eso-pic>
+% \fi
+
+% \part{lwarp-eso-pic.sty}
+
+% \section{Eso-pic}
+% \label{sec:eso-pic}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{eso-pic}: Added.}
+%
+% \DescribePackage{eso-pic}
+% \pkg{eso-pic} is emulated during \acro{HTML} output, and
+% the \pkg{eso-pic} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{eso-pic}
+% \end{macrocode}
+
+% \codehtml
+% \begin{macrocode}
+\newcommand*{\LenToUnit}{}
+\newcommand{\AtPageUpperLeft}[1]{}
+\newcommand{\AtPageLowerLeft}[1]{}
+\newcommand{\AtPageCenter}[1]{}
+\newcommand{\AtStockLowerLeft}[1]{}
+\newcommand{\AtStockUpperLeft}[1]{}
+\newcommand{\AtStockCenter}[1]{}
+\newcommand{\AtTextUpperLeft}[1]{}
+\newcommand{\AtTextLowerLeft}[1]{}
+\newcommand{\AtTextCenter}[1]{}
+\NewDocumentCommand{\AddToShipoutPictureBG}{s +m}{}
+\let\AddToShipoutPicture\AddToShipoutPictureBG
+\NewDocumentCommand{\AddToShipoutPictureFG}{s +m}{}
+\newcommand*{\ClearShipoutPictureBG}{}
+\newcommand*{\ClearShipoutPicture}{}
+\newcommand*{\ClearShipoutPictureFG}{}
+\newcommand{\gridSetup}[6][]{}
+% \end{macrocode}
+
+% \iffalse
+%</eso-pic>
+% \fi
+
+
+
+
+
+% \iffalse
+%<*everypage>
+% \fi
+
+% \part{lwarp-everypage.sty}
+
+% \section{Everypage}
+% \label{sec:everypage}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{everypage}: Added.}
+%
+% \DescribePackage{everypage}
+% \pkg{everypage} is emulated during \acro{HTML} output, and
+% the \pkg{everypage} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{everypage}
+% \end{macrocode}
+
+% \codehtml
+% \begin{macrocode}
+\newcommand*{\AddEverypageHook}[1]{}
+\newcommand*{\AddThispageHook}[1]{}
+% \end{macrocode}
+
+% \iffalse
+%</everypage>
+% \fi
+
+
+% \iffalse
+%<*extramarks>
+% \fi
+
+% \part{lwarp-extramarks.sty}
+
+% \section{Extramarks}
+%
+% \DescribePackage{extramarks}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{extramarks}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-extramarks}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{extramarks}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\extramarks}[2]{}
+\newcommand*{\firstleftxmark}{}
+\newcommand*{\lastleftxmark}{}
+\newcommand*{\firstrightxmark}{}
+\newcommand*{\lastrightxmark}{}
+\newcommand*{\firstxmark}{}
+\newcommand*{\lastxmark}{}
+\newcommand*{\topxmark}{}
+\newcommand*{\topleftxmark}{}
+\newcommand*{\firstleftmark}{}
+\newcommand*{\lastrightmark}{}
+% \end{macrocode}
+
+% \iffalse
+%</extramarks>
+% \fi
+
+
+
+
+% \iffalse
+%<*fancyhdr>
+% \fi
+
+% \part{lwarp-fancyhdr.sty}
+
+% \section{Fancyhdr}
+%
+% \DescribePackage{fancyhdr}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{fancyhdr}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-fancyhdr}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{fancyhdr}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\fancyhead}[2][]{}
+\newcommand*{\fancyfoot}[2][]{}
+\newcommand*{\fancyhf}[2][]{}
+\newcommand*{\fancypagestyle}[2]{}
+\newcommand*{\lhead}[1]{}
+\newcommand*{\chead}[1]{}
+\newcommand*{\rhead}[1]{}
+\newcommand*{\lfoot}[1]{}
+\newcommand*{\cfoot}[1]{}
+\newcommand*{\rfoot}[1]{}
+\newcommand*{\headrulewidth}{}
+\newcommand*{\footrulewidth}{}
+\newcommand*{\fancyheadoffset}[2][]{}
+\newcommand*{\fancyfootoffset}[2][]{}
+\newcommand*{\fancyhfoffset}[2][]{}
+\newcommand*{\iffloatpage}[2]{#2}
+\newcommand*{\ifftopfloat}[2]{#2}
+\newcommand*{\iffbotfloat}[2]{#2}
+% \end{macrocode}
+
+% \iffalse
+%</fancyhdr>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*float>
+% \fi
+
+% \part{lwarp-float.sty}
+
+% \section{Float and \cs{newfloat}}
+% \label{sec:newfloat}
+% \label{sec:float}
+%
+% \DescribePackage{float}
+% \pkg{float} is emulated during \acro{HTML} output, and
+% the \pkg{float} package is ignored.
+%
+% \changes{v0.20}{2017/01/22}{Improved float caption type handling.}
+%
+%
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{float}[2016/03/04]
+% \end{macrocode}
+
+%
+% \DescribePackage{float}
+%
+% The \pkg{float} package is emulated.
+%
+% See \cref{sec:listof} for the \cs{listof} command.
+
+
+% \begin{macro}{\newfloat} \marg{1: type} \marg{2: placement}
+% \marg{3: ext} \oarg{4: within}
+%
+% Emulates the \cs{newfloat} command from the \pkg{float} package.
+%
+% ``placement'' is ignored.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\newfloat}{m m m o}{%
+\IfValueTF{#4}
+{
+\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}
+}
+{\DeclareFloatingEnvironment[fileext=#3]{#1}}
+% \end{macrocode}
+% \pkg{newfloat} package automatically creates the \cs{listof} command
+% for new floats, but \pkg{float} does not,
+% so remove \cs{listof} here in case it is manually created later.
+% \begin{macrocode}
+\cslet{listof#1s}\relax
+\cslet{listof#1es}\relax
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\floatname} \marg{type} \marg{name}
+%
+% Sets the text name of the float, such as ``Figure''.
+% \begin{macrocode}
+\NewDocumentCommand{\floatname}{m +m}{%
+\SetupFloatingEnvironment{#1}{name=#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\floatplacement} \marg{type} \marg{placement}
+%
+% Float placement is ignored.
+% \begin{macrocode}
+\newcommand*{\floatplacement}[2]{%
+\SetupFloatingEnvironment{#1}{placement=#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\floatstyle} \marg{style}
+%
+% Float styles are ignored.
+% \begin{macrocode}
+\newcommand{\floatstyle}[1]{%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\restylefloat} * \marg{style}
+%
+% Float styles are ignored.
+% \begin{macrocode}
+\NewDocumentCommand{\restylefloat}{s m}{%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \iffalse
+%</float>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*floatrow>
+% \fi
+
+% \part{lwarp-floatrow.sty}
+
+% \section{Floatrow}
+% \label{sec:floatrow}
+%
+% \DescribePackage{floatrow}
+% \pkg{floatrow} is emulated during \acro{HTML} output, and
+% the \pkg{floatrow} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{floatrow}
+% \end{macrocode}
+
+
+% \changes{v0.14}{2016/03/31}{floatrow: Added package}
+
+% \DescribePackage{floatrow}
+%
+% The \pkg{floatrow} package is emulated.
+%
+% \limitsfloatrow
+
+
+% ^^A \begin{macro}{\floatbox} \oarg{1 preamble} \marg{2 captype}
+% ^^A \oarg{3 width} \oarg{4 height} \oarg{5 vert pos}
+% ^^A \marg{6 caption} \marg{7 object}
+%
+% Only parameters for caption and object are used.
+%
+% |LWR at insubfloatrow| is true if inside a \env{subfloatrow} environment.
+% \begin{macrocode}
+\NewDocumentCommand{\floatbox}{o m o o o +m +m}{%
+\ifbool{LWR at insubfloatrow}
+{
+% \end{macrocode}
+% Inside a \env{subfloatrow}.
+% \env{subfigure} and \env{subtable} take a width argument.
+% Defaults to \cs{linewidth} if none is given.
+% \begin{macrocode}
+\IfValueTF{#3}
+{\@nameuse{sub#2}{#3}}
+{\@nameuse{sub#2}{\linewidth}}
+}
+{
+% \end{macrocode}
+% Not inside a \env{subfloatrow}.
+% \env{figure} and \env{table} do not take a width argument.
+% \begin{macrocode}
+\@nameuse{#2}
+}
+#6
+
+#7
+\ifbool{LWR at insubfloatrow}
+{\@nameuse{endsub#2}}
+{\@nameuse{end#2}}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% Not used:
+% \begin{macrocode}
+\newcommand*{\nocapbeside}{}
+\newcommand*{\capbeside}{}
+\newcommand*{\captop}{}
+\newlength{\FBwidth}
+\setlength{\FBwidth}{.3\linewidth}
+\newlength{\FBheight}
+\setlength{\FBheight}{2in}
+\newcommand*{\useFCwidth}{}
+\newcommand{\floatsetup}[2][]{}
+\newcommand{\thisfloatsetup}[1]{}
+\newcommand{\clearfloatsetup}[1]{}
+\newcommand*{\killfloatstyle}{}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\newfloatcommand} \marg{1 command} \marg{2 captype}
+% ^^A \oarg{3 preamble} \oarg{4 default width}
+%
+% Preamble and default width are ignored.
+% \begin{macrocode}
+\NewDocumentCommand{\newfloatcommand}{m m o o}{%
+\@namedef{#1}{
+\floatbox{#2}
+}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\renewfloatcommand} \marg{1 command} \marg{2 captype}
+% ^^A \oarg{3 preamble} \oarg{4 default width}
+%
+% Preamble and default width are ignored.
+% \begin{macrocode}
+\NewDocumentCommand{\renewfloatcommand}{m m o o}{%
+\@namedef{#1}{%
+\floatbox{#2}
+}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\ffigbox} \oarg{width} \oarg{height} \oarg{vposn}
+% ^^A \marg{caption commands} \marg{contents}
+% \begin{macrocode}
+\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
+% \end{macrocode}
+% ^^A \end{macro}
+%
+% ^^A \begin{macro}{\ttabbox} \oarg{width} \oarg{height} \oarg{vposn}
+% ^^A \marg{caption commands} \marg{contents}
+% \changes{v0.15}{2016/03/31}{Fixed \& handling.}
+% \begin{macrocode}
+\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
+% \end{macrocode}
+% ^^A \end{macro}
+%
+% ^^A \begin{macro}{\fcapside} \oarg{width} \oarg{height} \oarg{vposn}
+% ^^A \marg{caption commands} \marg{contents}
+% \begin{macrocode}
+\newfloatcommand{fcapside}{figure}[\capbeside][]
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{environment}{floatrow} \oarg{numfloats}
+% \changes{v0.20}{2016/08/20}{Fix:\cs{linewidth} in a floatrow.}
+%
+% The row of floats is placed into a |div| of class |floatrow|.
+% \begin{macrocode}
+\newenvironment*{floatrow}[1][2]
+{
+\BlockClass{floatrow}
+% \end{macrocode}
+% While inside the floatrow, divide the \cs{linewidth} by the number of floats.
+% \begin{macrocode}
+\booltrue{LWR at infloatrow}
+\setlength{\linewidth}{6in/#1}
+}
+{
+\boolfalse{LWR at infloatrow}
+\endBlockClass
+}
+% \end{macrocode}
+% ^^A \end{environment}
+%
+% Keys for \cs{DeclareNewFloatType}:
+% \begin{macrocode}
+\newcommand*{\LWR at frowkeyplacement}{}
+\newcommand*{\LWR at frowkeyname}{}
+\newcommand*{\LWR at frowkeyfileext}{}
+\newcommand*{\LWR at frowkeywithin}{}
+\newcommand*{\LWR at frowkeycapstyle}{}
+
+\define at key{frowkeys}{placement}{}%
+\define at key{frowkeys}{name}{\renewcommand{\LWR at frowkeyname}{#1}}%
+\define at key{frowkeys}{fileext}{\renewcommand{\LWR at frowkeyfileext}{#1}}%
+\define at key{frowkeys}{within}{\renewcommand{\LWR at frowkeywithin}{#1}}%
+\define at key{frowkeys}{relatedcapstyle}{}%
+% \end{macrocode}
+
+% ^^A \begin{macro}{\DeclareNewFloatType} \marg{type} \marg{options}
+%
+% Use |\listof{type}{Title}| to print a list of the floats.
+% \begin{macrocode}
+\newcommand*{\DeclareNewFloatType}[2]{%
+% \end{macrocode}
+% Reset key values:
+% \begin{macrocode}
+\renewcommand*{\LWR at frowkeyplacement}{}
+\renewcommand*{\LWR at frowkeyname}{}
+\renewcommand*{\LWR at frowkeyfileext}{}
+\renewcommand*{\LWR at frowkeywithin}{}
+\renewcommand*{\LWR at frowkeycapstyle}{}
+% \end{macrocode}
+% Read new key values:
+% \begin{macrocode}
+\LWR at traceinfo{about to setkeys frowkeys}%
+\setkeys{frowkeys}{#2}%
+\LWR at traceinfo{finished setkeys frowkeys}%
+% \end{macrocode}
+% Create a new float with optional [within]:
+% \begin{macrocode}
+\ifthenelse{\equal{\LWR at frowkeywithin}{}}
+{
+\LWR at traceinfo{about to newfloat #1 \LWR at frowkeyplacement\ \LWR at frowkeyfileext}%
+\newfloat{#1}{\LWR at frowkeyplacement}{\LWR at frowkeyfileext}
+}%
+{%
+\LWR at traceinfo{about to newfloat #1\ \LWR at frowkeyplacement\ \LWR at frowkeyfileext\ \LWR at frowkeywithin}%
+\newfloat{#1}{\LWR at frowkeyplacement}%
+{\LWR at frowkeyfileext}[\LWR at frowkeywithin]%
+\typeout{*** finished newfloat #1}
+}%
+% \end{macrocode}
+% Rename the float if a name was given:
+% \begin{macrocode}
+\ifthenelse{\equal{\LWR at frowkeyname}{}}
+{}
+{\floatname{#1}{\LWR at frowkeyname}}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% Not used:
+% \begin{macrocode}
+\newcommand{\buildFBBOX}[2]{}
+\newcommand*{\CenterFloatBoxes}{}
+\newcommand*{\TopFloatBoxes}{}
+\newcommand*{\BottomFloatBoxes}{}
+\newcommand*{\PlainFloatBoxes}{}
+
+\newcommand{\capsubrowsettings}{}
+
+\NewDocumentCommand{\RawFloats}{o o}{}
+% \end{macrocode}
+
+% ^^A \begin{macro}{\RawCaption} \marg{text}
+%
+% \changes{v0.15}{2016/03/31}{Fix: steps counter}
+%
+% To be used inside a minipage or parbox.
+% \begin{macrocode}
+\newcommand{\RawCaption}[1]{#1}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\floatfoot} \marg{text}
+%
+% Places additional text inside a float,
+% inside a \acro{CSS} |div| of class |floatfoot|.
+% \begin{macrocode}
+\NewDocumentCommand{\floatfoot}{s +m}{%
+\begin{BlockClass}{floatfoot}
+#2
+\end{BlockClass}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \DescribeBoolean{LWR at insubfloatrow}
+% Used to compute \cs{linewidth}.
+% \begin{macrocode}
+\newbool{LWR at insubfloatrow}
+\boolfalse{LWR at insubfloatrow}
+% \end{macrocode}
+
+% ^^A \begin{environment}{subfloatrow} \oarg{num\_floats}
+% \changes{v0.15}{2016/04/01}{Added}
+% \begin{macrocode}
+\newenvironment*{subfloatrow}[1][2]
+{
+% \end{macrocode}
+% The row of floats is placed into a |div| of class |floatrow|:
+% \begin{macrocode}
+\BlockClass{floatrow}
+% \end{macrocode}
+% While inside the floatrow, |LWR at insubfloatrow| is set true,
+% which tells \cs{floatbox} to use \cs{subfigure} or \cs{subtable}.
+% \begin{macrocode}
+\begingroup
+\booltrue{LWR at insubfloatrow}
+}
+{
+\endgroup
+\endBlockClass
+\boolfalse{LWR at insubfloatrow}
+}
+% \end{macrocode}
+% ^^A \end{environment}
+
+% \iffalse
+%</floatrow>
+% \fi
+
+
+
+
+
+% \iffalse
+%<*geometry>
+% \fi
+
+% \part{lwarp-geometry.sty}
+
+% \section{Geometry}
+%
+% \DescribePackage{geometry}
+%
+% \codehtml
+
+% Discard all options for \pkg{lwarp-geometry}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{geometry}
+% \end{macrocode}
+
+% \iffalse
+%</geometry>
+% \fi
+
+
+
+% \iffalse
+%<*graphics>
+% \fi
+
+% \part{lwarp-graphics.sty}
+
+% \section{Graphics}
+%
+% \DescribePackage{graphics}
+% \pkg{graphics} is not used.
+% The user is required to use \pkg{graphicx} instead.
+
+% \codehtml
+% \begin{macrocode}
+\PackageError{lwarp-graphics}
+ {The graphics package is not supported by
+ the lwarp package's HTML conversion.
+ Please use graphicx instead. \protect\usepackage{graphicx}}
+ {Graphicx requires a different syntax but is more flexible,
+ and it is emulated by lwarp.}
+% \end{macrocode}
+
+
+% \iffalse
+%</graphics>
+% \fi
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*graphicx>
+% \fi
+
+% \part{lwarp-graphicx.sty}
+
+% \section{Graphicx}
+%
+% \DescribePackage{graphicx}
+% \pkg{graphicx} is emulated during \acro{HTML} output, and
+% the \pkg{graphicx} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{graphicx}
+% \end{macrocode}
+
+
+% \iffalse
+%</graphicx>
+% \fi
+
+
+
+% \clearpage
+
+% \iffalse
+%<*hyperref>
+% \fi
+
+% \part{lwarp-hyperref.sty}
+
+% \section{Hyperref}
+%
+% \DescribePackage{hyperref}
+% \pkg{hyperref} is emulated during \acro{HTML} output, and
+% the \pkg{hyperref} package is ignored.
+
+% \changes{v0.20}{2017/01/03}{\pkg{hyperref}: Additional user macros.}
+%
+% \codehtml
+% \begin{macrocode}
+% \LWR at ProvidesPackageDrop{hyperref}
+\typeout{Using the lwarp html version of package `hyperref' — discarding options.}
+\typeout{ Are not using ProvidesPackage, so that other packages}
+\typeout{ do not attempt to patch lwarp's version of `hyperref'.}
+% \ProvidesPackage{lwarp-#1-#2}
+\DeclareOption*{}
+\ProcessOptions\relax
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\hypersetup}[1]{}
+\newcommand*{\hyperbaseurl}[1]{}
+% \end{macrocode}
+
+
+
+% ^^A \begin{macro}{\hyperimage} \marg{url} \marg{alt text}
+%
+% Insert an image with alt text:
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at hyperimageb}{m +m}{%
+\LWR at htmltag{img src="#1" alt="#2" class="hyperimage"{}}%
+\endgroup%
+\LWR at ensuredoingapar%
+}
+
+\newcommand{\hyperimage}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\LWR at hyperimageb%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\hyperdef} \marg{1: category} \marg{2: name} \marg{3: text}
+% Creates an HTML anchor to |category.name| with the given text.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\hyperdef}{m m +m}{%
+\LWR at ensuredoingapar%
+\LWR at subsublabel{#1.#2}%
+#3%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\LWR at hyperrefb} \marg{1: URL} \marg{2: category}
+% ^^A \marg{3: name} \marg{4: text}
+%
+% Creates an HTML link to |URL#category.name| with the given text.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at hyperrefb}{m m m +m}{%
+\LWR at htmltag{a href="#1\LWR at hashmark#2.#3"}%
+#4%
+\LWR at htmltag{/a}%
+\endgroup%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\LWR at hyperrefc} \oarg{label} \marg{text}
+%
+% Creates text as an HTML link to the \LaTeX\ label.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at hyperrefc}{O{label} +m}{
+\LWR at startref{#1}%
+#2%
+\LWR at htmltag{/a}%
+\endgroup%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\hyperref}
+% ^^A \marg{1: URL} \marg{2: category} \marg{3: name} \marg{4: text} \quad -or-
+%
+% ^^A \oarg{1: label} \marg{2: text}
+%
+% \begin{macrocode}
+\newcommand{\hyperref}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\@ifnextchar[\LWR at hyperrefc\LWR at hyperrefb%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+
+% ^^A \begin{macro}{\hypertarget} \marg{name} \marg{text}
+% Creates an anchor to |name| with the given text.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\hypertarget}{m +m}{%
+\label{#1}%
+#2%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\hyperlink} \marg{name} \marg{text}
+%
+% Creates a link to the anchor created by hypertarget,
+% with the given link text.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\hyperlink}{m +m}{%
+\hyperref[#1]{#2}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\autoref} * \marg{label}
+%
+% For \acro{HTML}, \cs{cleverref} is used instead.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\autoref}{s m}{%
+\IfBooleanTF{#1}{\ref{#2}}{\cref{#2}}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\autopageref} \marg{label}
+%
+% For \acro{HTML}, \cs{cleverref} is used instead.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\autopageref}{s m}{%
+\IfBooleanTF{#1}{\cpageref{#2}}{\cref{#2}}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+
+% ^^A \begin{macro}{\pdfstringdef} \marg{macroname} \marg{\TeX{}string}
+%
+% \begin{macrocode}
+\newcommand{\pdfstringdef}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\pdfbookmark} \oarg{level} \marg{text} \marg{name}
+%
+% \begin{macrocode}
+\newcommand{\pdfbookmark}[3][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\currentpdfbookmark} \marg{text} \marg{name}
+%
+% \begin{macrocode}
+\newcommand{\currentpdfbookmark}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\subpdfbookmark} \marg{text} \marg{name}
+%
+% \begin{macrocode}
+\newcommand{\subpdfbookmark}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\belowpdfbookmark} \marg{text} \marg{name}
+%
+% \begin{macrocode}
+\newcommand{\belowpdfbookmark}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\texorpdfstring} \marg{\TeX{}string} \marg{PDFstring}
+%
+% \begin{macrocode}
+\newcommand{\texorpdfstring}[2]{#2}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\hypercalcbp} \marg{dimen} \quad
+% From \pkg{hyperref}.
+%
+% \begin{macrocode}
+\def\hypercalcbp#1{%
+\strip at pt\dimexpr 0.99626401\dimexpr(#1)\relax\relax
+}%
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\Acrobatmenu} \marg{menuoption} \marg{text}
+%
+% \begin{macrocode}
+\newcommand{\Acrobatmenu}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\TextField} \oarg{parameters} \marg{label}
+%
+% \begin{macrocode}
+\newcommand*{\TextField}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\CheckBox} \oarg{parameters} \marg{label}
+%
+% \begin{macrocode}
+\newcommand*{\CheckBox}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\ChoiceMenu} \oarg{parameters} \marg{label} \marg{choices}
+%
+% \begin{macrocode}
+\newcommand{\ChoiceMenu}[3][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\PushButton} \oarg{parameters} \marg{label}
+%
+% \begin{macrocode}
+\newcommand*{\PushButton}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\Submit} \oarg{parameters} \marg{label}
+%
+% \begin{macrocode}
+\newcommand*{\Submit}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\Reset} \oarg{parameters} \marg{label}
+%
+% \begin{macrocode}
+\newcommand*{\Reset}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\LayoutTextField} \marg{label} \marg{field}
+%
+% \begin{macrocode}
+\newcommand*{\LayoutTextField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\LayoutChoiceField} \marg{label} \marg{field}
+%
+% \begin{macrocode}
+\newcommand*{\LayoutChoiceField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\LayoutCheckField} \marg{label} \marg{field}
+%
+% \begin{macrocode}
+\newcommand*{\LayoutCheckField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\MakeRadioField} \marg{width} \marg{height}
+%
+% \begin{macrocode}
+\newcommand*{\MakeRadioField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\MakeCheckField} \marg{width} \marg{height}
+%
+% \begin{macrocode}
+\newcommand*{\MakeCheckField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\MakeTextField} \marg{width} \marg{height}
+%
+% \begin{macrocode}
+\newcommand*{\MakeTextField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\MakeChoiceField} \marg{width} \marg{height}
+%
+% \begin{macrocode}
+\newcommand*{\MakeChoiceField}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\MakeFieldButton} \marg{text}
+%
+% \begin{macrocode}
+\newcommand{\MakeFieldButton}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% \iffalse
+%</hyperref>
+% \fi
+
+
+
+% \clearpage
+
+% \iffalse
+%<*keyfloat>
+% \fi
+
+% \part{lwarp-keyfloat.sty}
+
+% \section{Keyfloat}
+% \label{sec:keyfloat}
+%
+% \DescribePackage{keyfloat}
+% \pkg{keyfloat} is supported with minor adjustments.
+%
+% \changes{v0.20}{2017/01/16}{\pkg{keyfloat}: Added.}
+%
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{keyfloat}
+% \end{macrocode}
+
+% After \pkg{keyfloat} has loaded:
+% \begin{macrocode}
+\AtBeginDocument{
+% \end{macrocode}
+
+
+% \begin{macrocode}
+% \newsavebox{\KFLT at envbox}
+
+\let\KFLT at boxinner\relax
+\let\endKFLT at boxinner\relax
+
+\NewEnviron{KFLT at boxinner}
+{%
+\LWR at traceinfo{kflt at boxinner}%
+\LWR at stoppars%
+\KFLT at frame{\BODY}%
+\LWR at startpars%
+\LWR at traceinfo{ended kflt at boxinner}%
+}
+% \end{macrocode}
+
+
+% \begin{macrocode}
+\RenewDocumentEnvironment{KFLT at marginfloat}{O{-1.2ex} m}
+{% start
+\LWR at maybeincthisfloat%
+% \BlockClass{marginblock}
+\LWR at stoppars%
+\LWR at htmltag{div class="marginblock" id="autofloat-\arabic{LWR at thisfloat}"}
+\LWR at startpars%
+\captionsetup{type=#2}%
+}
+{
+% \endBlockClass
+\LWR at htmldivclassend{div}
+}
+% \end{macrocode}
+
+
+% \begin{macrocode}
+}% AtBeginDocument
+% \end{macrocode}
+
+
+% \iffalse
+%</keyfloat>
+% \fi
+
+
+
+% \clearpage
+
+% \iffalse
+%<*letterspace>
+% \fi
+
+% \part{lwarp-letterspace.sty}
+
+% \section{Letterspace}
+%
+% \DescribePackage{letterspace}
+% \pkg{letterspace} is a subset of microtype, which is pre-loaded by \pkg{lwarp}.
+% All user options and macros are ignored and disabled.
+
+% \changes{v0.20}{2017/01/03}{\pkg{letterspace}: User-interface emulated.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-letterspace}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{letterspace}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*\lsstyle{}
+\newcommand\textls[2][]{}
+\def\textls#1#{}
+\newcommand*\lslig[1]{#1}
+% \end{macrocode}
+
+% \iffalse
+%</letterspace>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*listings>
+% \fi
+
+% \part{lwarp-listings.sty}
+
+% \section{Listings}
+% \label{sec:listings}
+%
+% \DescribePackage{listings}
+% \pkg{listings} is supported with some limitations.
+% Text formatting is not yet supported.
+%
+% \changes{v0.20}{2017/01/01}{\pkg{listings}: Added.}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{listings}
+% \end{macrocode}
+
+% ^^A For passing optional arguments to an environment, see:
+% ^^A \href
+% ^^A {http://tex.stackexchange.com/questions/9035/how-to-pass-an-optional-argument-to-an-environment-with-verbatim-content}
+% ^^A {\texttt{http://tex.stackexchange.com/questions/9035/ \\
+% ^^A \hspace*{3em}how-to-pass-an-optional-argument-to-\\
+% ^^A \hspace*{3em}an-environment-with-verbatim-content}}
+%
+%
+%
+% Patches to embed listings inside |pre| tags:
+%
+% \begin{macrocode}
+\let\LWR at origlst@Init\lst at Init
+\let\LWR at origlst@DeInit\lst at DeInit
+
+\let\LWR at origlsthkEveryPar\lsthk at EveryPar
+
+\renewcommand{\l at lstlisting}[2]{\hypertocfloat{1}{toclstlisting}{#1}{#2}}
+% \end{macrocode}
+%
+%
+% ^^A \begin{macro}{\lst at Init} \marg{backslash-processing}
+% Done at the start of a listing.
+% \begin{macrocode}
+\renewcommand{\lst at Init}[1]{%
+% \end{macrocode}
+% First, perform the \pkg{listings} initialization:
+% \begin{macrocode}
+\LWR at traceinfo{lst at Init}%
+\renewcommand*{\@captype}{lstlisting}%
+\LWR at origlst@Init{#1}%
+\LWR at traceinfo{finished origlst at Init}%
+\lst at ifdisplaystyle%
+% \end{macrocode}
+% Creating a display.
+%
+% Disable line numbers,
+% produce the |<pre>|, then
+% reenable line numbers.
+% \begin{macrocode}
+\LWR at traceinfo{About to create verbatim.}%
+\let\lsthk at EveryPar\relax%
+\LWR at atbeginverbatim{programlisting}%
+
+\let\lsthk at EveryPar\LWR at origlsthkEveryPar%
+\else%
+% \end{macrocode}
+% Inline, so open a |<span>|
+% \begin{macrocode}
+\ifbool{LWR at verbtags}{\LWR at htmltag{span class="inlineprogramlisting"}}{}%
+\fi%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\lst at DeInit} Done at the end of a listing.
+% \begin{macrocode}
+\renewcommand*{\lst at DeInit}{%
+\lst at ifdisplaystyle%
+% \end{macrocode}
+% Creating a display.
+%
+% Disable line numbers,
+% produce the |</pre>|, then
+% reenable line numbers:
+% \begin{macrocode}
+\let\lsthk at EveryPar\relax%
+
+\LWR at afterendverbatim%
+\let\lsthk at EveryPar\LWR at origlsthkEveryPar%
+\else%
+% \end{macrocode}
+% Inline, so create the closing |</span>|:
+% \begin{macrocode}
+\ifbool{LWR at verbtags}{\noindent\LWR at htmltag{/span}}{}%
+\fi%
+% \end{macrocode}
+% Final \pkg{listings} deinit:
+% \begin{macrocode}
+\LWR at origlst@DeInit%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+%
+% ^^A \begin{macro}{\lst at MakeCaption} \marg{t/b}
+%
+% This is called BOTH at the top and at the bottom of each listing.
+%
+% Patched for \pkg{lwarp}.
+% \begin{macrocode}
+\def\lst at MakeCaption#1{%
+\LWR at traceinfo{MAKING CAPTION at #1}%
+ \lst at ifdisplaystyle
+\LWR at traceinfo{making a listings display caption}%
+ \ifx #1t%
+ \ifx\lst@@caption\@empty\expandafter\lst at HRefStepCounter \else
+ \expandafter\refstepcounter
+ \fi {lstlisting}%
+\LWR at traceinfo{About to assign label: !\lst at label!}%
+% \ifx\lst at label\@empty\else
+% \label{\lst at label}\fi
+\LWR at traceinfo{Finished assigning the label.}%
+ \let\lst at arg\lst at intname \lst at ReplaceIn\lst at arg\lst at filenamerpl
+ \global\let\lst at name\lst at arg \global\let\lstname\lst at name
+ \lst at ifnolol\else
+ \ifx\lst@@caption\@empty
+ \ifx\lst at caption\@empty
+ \ifx\lst at intname\@empty \else \def\lst at temp{ }%
+ \ifx\lst at intname\lst at temp \else
+% \end{macrocode}
+% This code places a contents entry for a non-float.
+% This would have to be modified for \pkg{lwarp}:
+% \begin{macrocode}
+\LWR at traceinfo{addcontents lst at name: -\lst at name-}%
+% \addcontentsline{lol}{lstlisting}{\lst at name}
+ \fi\fi
+ \fi
+ \else
+% \end{macrocode}
+% This would have to be modified for \pkg{lwarp}:
+% \begin{macrocode}
+\LWR at traceinfo{addcontents lst@@caption: -\lst@@caption-}%
+ \addcontentsline{lol}{lstlisting}%
+ {\protect\numberline{\thelstlisting}{\protect\ignorespaces \lst@@caption \protect\relax}}%
+ \fi
+ \fi
+ \fi
+ \ifx\lst at caption\@empty\else
+\LWR at traceinfo{lst at caption not empty-}%
+ \lst at IfSubstring #1\lst at captionpos
+ {\begingroup
+\LWR at traceinfo{at the selected position}%
+% \end{macrocode}
+% These space and box commands are not needed for \acro{HTML} output:
+% \begin{macrocode}
+% \let\@@vskip\vskip
+% \def\vskip{\afterassignment\lst at vskip \@tempskipa}%
+% \def\lst at vskip{\nobreak\@@vskip\@tempskipa\nobreak}%
+% \par\@parboxrestore\normalsize\normalfont % \noindent (AS)
+% \ifx #1t\allowbreak \fi
+ \ifx\lst at title\@empty
+% \end{macrocode}
+% New \pkg{lwarp} code to create a caption:
+% \begin{macrocode}
+ \lst at makecaption\fnum at lstlisting{\ignorespaces \lst at caption}
+ \else
+% \end{macrocode}
+% New \pkg{lwarp} code to create a title:
+% \begin{macrocode}
+% \lst at maketitle\lst at title % (AS)
+\LWR at traceinfo{Making title: \lst at title}%
+\begin{BlockClass}{lstlistingtitle}% lwarp
+\lst at maketitle\lst at title% lwarp
+\end{BlockClass}% lwarp
+ \fi
+\LWR at traceinfo{About to assign label: !\lst at label!}%
+ \ifx\lst at label\@empty\else
+\leavevmode% gets rid of bad space factor error
+\GetTitleStringExpand{\lst at caption}%
+\edef\LWR at lntemp{\GetTitleStringResult}%
+\edef\@currentlabelname{\detokenize\expandafter{\LWR at lntemp}}%
+\label{\lst at label}\fi
+\LWR at traceinfo{Finished assigning the label.}%
+% \end{macrocode}
+% Not needed for \pkg{lwarp}:
+% \begin{macrocode}
+% \ifx #1b\allowbreak \fi
+ \endgroup}{}%
+ \fi
+\LWR at traceinfo{end of making a listings display caption}%
+ \else
+\LWR at traceinfo{INLINE}%
+ \fi
+\LWR at traceinfo{DONE WITH CAPTION at #1}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% Patched to keep left line numbers outside of the left margin, and
+% place right line numbers in a field \cs{VerbatimHTMLWidth} wide.
+%
+% ^^A \DescribeKey[listings]{numbers} Activates line numbers.
+% \begin{macrocode}
+\lst at Key{numbers}{none}{%
+ \let\lst at PlaceNumber\@empty
+ \lstKV at SwitchCases{#1}%
+ {none&\\%
+ left&\def\lst at PlaceNumber{%
+% \llap{
+\LWR at orignormalfont%
+\lst at numberstyle{\thelstnumber}\kern\lst at numbersep%
+% }
+}
+\\%
+ right&\def\lst at PlaceNumber{\rlap{\LWR at orignormalfont
+ \kern\VerbatimHTMLWidth \kern\lst at numbersep
+ \lst at numberstyle{\thelstnumber}}}%
+ }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}}
+
+\end{warpHTML}
+% \end{macrocode}
+
+% \iffalse
+%</listings>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*longtable>
+% \fi
+
+% \part{lwarp-longtable.sty}
+
+% \section{Longtable}
+% \label{sec:longtable}
+%
+%
+% \DescribePackage{longtable}
+% \pkg{longtable} is emulated during \acro{HTML} output, and
+% the \pkg{longtable} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{longtable}
+% \end{macrocode}
+
+%
+% To emulate longtable:
+
+% For longtable |\endhead|, |\endfoot|, and |\endlastfoot| rows, use \\
+% \watchout
+% \hspace*{.25in}|\warpprintonly{row contents}|\\
+% instead of \\
+% \hspace*{.25in}|\begin{warpprint}| \ldots |\end{warpprint}|. \\
+% Doing so helps avoid ``Misplaced |\noalign|.'' when using |\begin{warpprint}|.
+%
+% Keep the |\endfirsthead| row, which is still relevent to \acro{HTML} output.
+%
+% See: \\
+% \href{http://tex.stackexchange.com/questions/43006/why-is-input-not-expandable}
+% {\texttt{http://tex.stackexchange.com/questions/43006/\\why-is-input-not-expandable}}
+%
+
+
+% \begin{environment}{longtable} * \oarg{horizalignment} \marg{colspec}
+% Emulates the \env{longtable} environment.
+%
+% Per the \pkg{caption} package, the starred version steps the counter per caption.
+% The unstarred version steps the counter once at the beginning, but
+% not at each caption.
+%
+% Options [c], [l], and [r] are thrown away.
+% \begin{macrocode}
+\newenvironment{longtable*}[2][]{%
+\LWR at floatbegin{table}%
+\setcaptiontype{\LTcaptype}%
+\caption at setoptions{longtable}%
+\caption at setoptions{@longtable}%
+\caption at LT@setup%
+\booltrue{LWR at starredlongtable}%
+\let\captionlistentry\LWR at LTcaptionlistentry%
+\LWR at tabular{#2}
+}
+{\endLWR at tabular\LWR at floatend}
+
+\newenvironment{longtable}[2][]{%
+\LWR at floatbegin{table}%
+\setcaptiontype{\LTcaptype}%
+\caption at setoptions{longtable}%
+\caption at setoptions{@longtable}%
+\caption at LT@setup%
+\refstepcounter{\LTcaptype}%
+\let\captionlistentry\LWR at LTcaptionlistentry%
+\LWR at tabular{#2}
+}
+{\endLWR at tabular\LWR at floatend}
+
+% \end{macrocode}
+% \end{environment}
+
+% Provided for compatibility, but ignored:
+% \begin{macrocode}
+\newcounter{LTchunksize}
+\def\endhead{\LWR at tabularendofline}% throws away options //[dim] and //*
+\def\endfirsthead{\LWR at tabularendofline}
+\def\endfoot{\LWR at tabularendofline}
+\def\endlastfoot{\LWR at tabularendofline}
+\newcommand\tabularnewline{\LWR at tabularendofline}
+\newcommand{\setlongtables}{}% Obsolete command, does nothing.
+\newlength{\LTleft}
+\newlength{\LTright}
+\newlength{\LTpre}
+\newlength{\LTpost}
+\newlength{\LTcapwidth}
+% \end{macrocode}
+% |\kill| is ignored, place a |\kill| line inside \\
+% \hspace*{2em}|\begin{warpprint}| \ldots |\end{warpprint}|
+% or \cs{warpingprintonly}.
+% \begin{macrocode}
+\renewcommand*{\kill}{\LWR at tabularendofline}
+% \end{macrocode}
+
+% \iffalse
+%</longtable>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*ltcaption>
+% \fi
+
+% \part{lwarp-ltcaption.sty}
+
+% \section{Ltcaption}
+% \label{sec:ltcaption}
+%
+%
+% \DescribePackage{ltcaption}
+% \pkg{ltcaption} is emulated during \acro{HTML} output, and
+% the \pkg{ltcaption} package is ignored.
+
+% \changes{v0.20}{2017/01/29}{\pkg{ltcaption}: Added.}
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{ltcaption}
+% \end{macrocode}
+
+%
+% \cs{LTcaptype} is already defined by \pkg{lwarp}.
+%
+% \env{longtable*} is already defined by \pkg{lwarp-longtable}.
+%
+% \begin{macrocode}
+\newlength{\LTcapskip}
+\newlength{\LTcapleft}
+\newlength{\LTcapright}
+\newcommand*{\LTcapmarginsfalse}{}
+% \end{macrocode}
+
+
+% \iffalse
+%</ltcaption>
+% \fi
+
+
+
+% \clearpage
+
+% \iffalse
+%<*mdframed>
+% \fi
+
+% \part{lwarp-mdframed.sty}
+
+% \section{Mdframed}
+% \label{sec:mdframed}
+%
+%
+% \DescribePackage{mdframed}
+% \pkg{mdframed} is loaded with options forced to
+% |framemethod=none|.
+%
+% \changes{v0.17}{2016/04/14}{\pkg{mdframed}: Added.}
+%
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{mdframed}
+% \end{macrocode}
+%
+%
+%
+% \limitsmdframed
+%
+% Environments created or encapsulated by \pkg{mdframed} are enclosed in a
+% \margintag{CSS classes}
+% |div| of class |md<environmentname>|, or |mdframed| otherwise.
+%
+% Frame titles are placed into a |span| of class |mdframedtitle|.
+% Subtitles are in a |span| of class |mdframedsubtitle|, and likewise for subsubtitles.
+%
+% Pre-existing hooks are used to patch extra functions before and after the frames.
+%
+
+% \pkg{amsthm} must be loaded before \pkg{mdframed}
+% \begin{macrocode}
+\LWR at origRequirePackage{amsthm}
+% \end{macrocode}
+%
+% Do not require \tikz{} or pstricks:
+% \begin{macrocode}
+\LWR at origRequirePackage[framemethod=none]{mdframed}
+% \end{macrocode}
+%
+% ^^A \DescribeMacro{\mdfsetup}
+% To handle CSS and paragraphs,
+% patch code at start and end of environment and contents:
+% \begin{macrocode}
+\mdfsetup{
+startcode={\LWR at mdframedstart},
+endcode={\LWR at mdframedend},
+startinnercode={\LWR at startpars},
+endinnercode={\LWR at stoppars},
+}
+% \end{macrocode}
+%
+%
+% ^^A \begin{macro}{\LWR at mdfprintcolor} \marg{mdfcolorkey}
+%
+% Given the \pkg{mdframed} key, print the color.
+% \begin{macrocode}
+\newcommand*{\LWR at mdfprintcolor}[1]{%
+\convertcolorspec{named}{\csuse{mdf@#1}}{HTML}\LWR at tempcolor%
+\#\LWR at tempcolor
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\LWR at mdfprintlength} \marg{mdflengthkey}
+%
+% Given the \pkg{mdframed} key, print the length.
+% \begin{macrocode}
+\newcommand*{\LWR at mdfprintlength}[1]{%
+\rndprintlength{\csuse{mdf@#1 at length}}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+%
+% ^^A \begin{macro}{\LWR at mdframedstart}
+% Actions before an mdframe starts.
+%
+% Encapsulate a frame inside a |div| of the desired |class|.
+% \begin{macrocode}
+\newcommand*{\LWR at mdframedstart}{%
+% \end{macrocode}
+% Turn off paragraph handling during the generation of
+% the encapsulating tags:
+% \begin{macrocode}
+\LWR at stoppars%
+% \end{macrocode}
+% Below, print HTML pt units:
+% \begin{macrocode}
+\uselengthunit{PT}%
+% \end{macrocode}
+% Open a |div| and with custom |class| and custom |style|:
+% \begin{macrocode}
+\LWR at htmltagc{div class="\LWR at mdthisenv" \LWR at orignewline
+style=" \LWR at orignewline
+% \end{macrocode}
+% Convert and print the background color:
+% \begin{macrocode}
+background: \LWR at mdfprintcolor{backgroundcolor} ; \LWR at orignewline
+% \end{macrocode}
+% Convert and print the border color and width:
+% \begin{macrocode}
+border: \LWR at mdfprintlength{linewidth} solid
+\LWR at mdfprintcolor{linecolor} ; \LWR at orignewline
+% \end{macrocode}
+% Convert and print the border radius:
+% \begin{macrocode}
+border-radius: \LWR at mdfprintlength{roundcorner} ; \LWR at orignewline
+% \end{macrocode}
+% Convert and print the shadow:
+% \begin{macrocode}
+\ifbool{mdf at shadow}{%
+box-shadow:
+\LWR at mdfprintlength{shadowsize}
+\LWR at mdfprintlength{shadowsize}
+\LWR at mdfprintlength{shadowsize}
+\LWR at mdfprintcolor{shadowcolor} ;
+}
+{box-shadow: none ;}
+\LWR at orignewline
+% \end{macrocode}
+% \begin{macrocode}
+"}
+% \LWR at htmldivclass{\LWR at mdthisenv}
+% \end{macrocode}
+% \env{mdframed} environment may not work with the modified \cs{hspace} and \cs{rule},
+% so restore them to their originals while inside \env{mdframed}:
+% \begin{macrocode}
+\let\hspace\LWR at orighspace%
+\let\rule\LWR at origrule%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+% ^^A \begin{macro}{\LWR at mdframedend}
+% Actions after an mdframe ends.
+%
+% After closing the |div|, globally restore to the default environment type:
+% \begin{macrocode}
+\newcommand*{\LWR at mdframedend}{
+% \end{macrocode}
+% Close the custom |div|:
+% \begin{macrocode}
+\LWR at htmldivclassend{\LWR at mdthisenv}
+% \end{macrocode}
+% Reset future custom class to the default:
+% \begin{macrocode}
+\gdef\LWR at mdthisenv{mdframed}
+% \end{macrocode}
+% Resume paragraph handling:
+% \begin{macrocode}
+\LWR at startpars%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\mdfframedtitleenv} \marg{title}
+%
+% Encapsulation of the original which places the title
+% inside a |span| of class |mdframedtitle|:
+% \begin{macrocode}
+\let\LWR at origmdfframedtitleenv\mdfframedtitleenv
+
+\newlength{\LWR at titleroundcorner}
+
+\renewrobustcmd\mdfframedtitleenv[1]{%
+\LWR at origmdfframedtitleenv{%
+% \end{macrocode}
+% Below, print HTML pt lengths:
+% \begin{macrocode}
+\uselengthunit{PT}%
+% \end{macrocode}
+% Open a |span| with a custom |class| and custom |style|:
+% \begin{macrocode}
+\LWR at htmltagc{span class="mdframedtitle" \LWR at orignewline
+style=" \LWR at orignewline
+% \end{macrocode}
+% Convert and print the title background color:
+% \begin{macrocode}
+background:
+\LWR at mdfprintcolor{frametitlebackgroundcolor}
+; \LWR at orignewline
+% \end{macrocode}
+% Convert and print the title rule:
+% \begin{macrocode}
+\ifbool{mdf at frametitlerule}{%
+border-bottom:
+\LWR at mdfprintlength{frametitlerulewidth}
+solid
+\LWR at mdfprintcolor{frametitlerulecolor}
+; \LWR at orignewline
+}{}%
+% \end{macrocode}
+% The title's top border radius is adjusted for the line width:
+% \begin{macrocode}
+border-radius:
+\setlength{\LWR at titleroundcorner}
+ {\maxof{\mdf at roundcorner@length-\mdf at linewidth@length}{0pt}}
+ \rndprintlength{\LWR at titleroundcorner}
+ \rndprintlength{\LWR at titleroundcorner}
+ 0pt 0pt
+ \LWR at orignewline
+% \end{macrocode}
+% Finish the custom style and the opening span tag:
+% \begin{macrocode}
+" \LWR at orignewline
+}% span
+% \end{macrocode}
+% Restrict paragraph tags inside a span:
+% \begin{macrocode}
+\begin{LWR at nestspan}%
+% \end{macrocode}
+% Print the title inside the span:
+% \begin{macrocode}
+#1%
+% \end{macrocode}
+% Closee the span and unnest the paragraph tag restriction:
+% \begin{macrocode}
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\LWR at mdfsubtitlecommon} \marg{sub -or subsub} \oarg{options} \marg{title}
+%
+% Common code for \cs{LWR at mdfsubtitle} and \cs{LWR at mdfsubsubtitle}.
+%
+% Encapsulate the subtitle inside a |span| of class |mdframedsubtitle|:
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at mdfsubtitlecommon}{m o m}
+{% the following empty line is required
+
+% \end{macrocode}
+% Special handling for mdframed:
+% Subtitles have \cs{par}s around them,
+% so temporarily disable them here.
+% \begin{macrocode}
+\let\par\LWR at origpar%
+% \end{macrocode}
+% Open a |span| with a custom |class| and custom |style|:
+% \begin{macrocode}
+\LWR at htmltagc{span class="mdframed#1title"
+style=" \LWR at orignewline
+% \end{macrocode}
+% Convert and print the background color:
+% \begin{macrocode}
+background:
+\LWR at mdfprintcolor{#1titlebackgroundcolor}
+; \LWR at orignewline
+% \end{macrocode}
+% Convert and print the above line:
+% \begin{macrocode}
+\ifbool{mdf@#1titleaboveline}{%
+border-top:
+\LWR at mdfprintlength{#1titleabovelinewidth}
+solid
+\LWR at mdfprintcolor{#1titleabovelinecolor}
+; \LWR at orignewline
+}{}%
+% \end{macrocode}
+% Convert and print the below line:
+% \begin{macrocode}
+\ifbool{mdf@#1titlebelowline}{%
+border-bottom:
+\LWR at mdfprintlength{#1titlebelowlinewidth}
+solid
+\LWR at mdfprintcolor{#1titlebelowlinecolor}
+; \LWR at orignewline
+}{}%
+% \end{macrocode}
+% Finish the custom style and the opening span tag:
+% \begin{macrocode}
+"}% span
+% \end{macrocode}
+% Restrict paragraph tags inside a span:
+% \begin{macrocode}
+\begin{LWR at nestspan}%
+% \end{macrocode}
+% Perform the original subtitle action:
+% \begin{macrocode}
+\IfNoValueTF{#2}
+{\csuse{LWR at origmdf#1title}{#3}}%
+{\csuse{LWR at origmdf#1title}[#2]{#3}}%
+% \end{macrocode}
+% Close the span and unnest the paragraph tag restriction:
+% \begin{macrocode}
+\LWR at htmltagc{/span}% the following empty line is required
+\end{LWR at nestspan}% must follow the /span or an extra <p> appears
+
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+% ^^A \begin{macro}{\LWR at mdfsubtitle} \oarg{options} \marg{title}
+% \begin{macrocode}
+\let\LWR at origmdfsubtitle\mdfsubtitle
+
+\newcommand*{\LWR at mdfsubtitle}{%
+\LWR at mdfsubtitlecommon{sub}%
+}
+\let\mdfsubtitle\LWR at mdfsubtitle
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\LWR at mdfsubsubtitle} \oarg{options} \marg{title}
+% \begin{macrocode}
+\let\LWR at origmdfsubsubtitle\mdfsubsubtitle
+
+\newcommand*{\LWR at mdfsubsubtitle}{%
+\LWR at mdfsubtitlecommon{subsub}%
+}
+\let\mdfsubsubtitle\LWR at mdfsubsubtitle
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+%
+% ^^A \begin{macro}{\LWR at mdthisenv}
+% Stores the environment of the frame about to be created:
+% \begin{macrocode}
+\newcommand*{\LWR at mdthisenv}{mdframed}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\newmdenv} \oarg{options} \marg{env-name}
+%
+% Modified from the original to remember the environment.
+% \begin{macrocode}
+\renewrobustcmd*\newmdenv[2][]{%
+\newenvironment{#2}%
+{%
+\mdfsetup{#1}%
+\renewcommand*{\LWR at mdthisenv}{md#2}%
+\begin{mdframed}%
+}
+{\end{mdframed}}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+% ^^A \begin{macro}{\surroundwithmdframed} \oarg{options} \marg{environment}
+%
+% Modified from the original to remember the environment.
+% \begin{macrocode}
+\renewrobustcmd*{\surroundwithmdframed}[2][]{%
+\BeforeBeginEnvironment{#2}{%
+\renewcommand*{\LWR at mdthisenv}{md#2}%
+\begin{mdframed}[#1]}%
+\AfterEndEnvironment{#2}{\end{mdframed}}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\mdtheorem} \oarg{mdframed-options}{envname}
+% \oarg{numberedlike} \marg{caption} \oarg{within}
+%
+% Modified from the original to remember the environment.
+% \begin{macrocode}
+\let\LWR at origmdtheorem\mdtheorem
+
+\DeclareDocumentCommand{\LWR at mdtheorem}{O{} m o m o}{%
+\LWR at origmdtheorem[#1]{#2}[#3]{#4}[#5]%
+\BeforeBeginEnvironment{#2}{\renewcommand*{\LWR at mdthisenv}{md#2}}%
+}
+
+\let\mdtheorem\LWR at mdtheorem
+% \end{macrocode}
+% ^^A \end{macro}
+%
+%
+% ^^A \begin{macro}{\newmdtheoremenv} \oarg{mdframed-options}{envname}
+% \oarg{numberedlike} \marg{caption} \oarg{within}
+%
+% Modified from the original to remember the environment.
+% \begin{macrocode}
+\DeclareDocumentCommand\newmdtheoremenv{O{} m o m o }{%
+ \ifboolexpr{ test {\IfNoValueTF {#3}} and test {\IfNoValueTF {#5}} }%
+ {\newtheorem{#2}{#4}}{%
+ \IfValueTF{#3}{\newtheorem{#2}[#3]{#4}}{}%
+ \IfValueTF{#5}{\newtheorem{#2}{#4}[#5]}{}%
+ }%
+\BeforeBeginEnvironment{#2}{%
+\renewcommand*{\LWR at mdthisenv}{md#2}%
+\begin{mdframed}[#1]}%
+\AfterEndEnvironment{#2}{%
+\end{mdframed}}%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% \iffalse
+%</mdframed>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*microtype>
+% \fi
+
+% \part{lwarp-microtype.sty}
+
+% \section{Microtype}
+%
+% \DescribePackage{microtype}
+% \pkg{microtype} is pre-loaded by \pkg{lwarp}.
+% All user options and macros are ignored and disabled.
+
+% \changes{v0.20}{2017/01/03}{\pkg{microtype}: User-interface emulated.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-microtype}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{microtype}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*\DeclareMicrotypeSet[3][]{}
+\newcommand*\UseMicrotypeSet[2][]{}
+\newcommand*\DeclareMicrotypeSetDefault[2][]{}
+\newcommand*\SetProtrusion[3][]{}
+\newcommand*\SetExpansion[3][]{}
+\newcommand*\SetTracking[3][]{}
+\newcommand*\SetExtraKerning[3][]{}
+\newcommand*\SetExtraSpacing[3][]{}
+\newcommand*\DisableLigatures[2][]{}
+\newcommand*\DeclareCharacterInheritance[3][]{}
+\newcommand*\DeclareMicrotypeVariants[1]{}
+\newcommand*\DeclareMicrotypeAlias[2]{}
+\newcommand*\LoadMicrotypeFile[1]{}
+\newcommand*\DeclareMicrotypeBabelHook[2]{}
+\newcommand*\microtypesetup[1]{}
+\newcommand*\microtypecontext[1]{}
+\newcommand*\textmicrotypecontext[2]{#2}
+\@ifpackageloaded{letterspace}{\let\MT at textls\relax}{%
+\newcommand*\lsstyle{}
+\newcommand\textls[2][]{}
+\def\textls#1#{}
+\newcommand*\lslig[1]{#1}
+}
+\def\DeclareMicrotypeSet#1#{\@gobbletwo}
+\def\DeclareMicrotypeVariants#1#{\@gobble}
+\@onlypreamble\DeclareMicrotypeSet
+\@onlypreamble\UseMicrotypeSet
+\@onlypreamble\DeclareMicrotypeSetDefault
+\@onlypreamble\DisableLigatures
+\@onlypreamble\DeclareMicrotypeVariants
+\@onlypreamble\DeclareMicrotypeBabelHook
+% \end{macrocode}
+
+% \iffalse
+%</microtype>
+% \fi
+
+
+
+% \clearpage
+
+% \iffalse
+%<*multicol>
+% \fi
+
+% \part{lwarp-multicol.sty}
+
+% \section{Multicol}
+% \label{sec:multicol}
+%
+%
+% \DescribePackage{multicol}
+% \pkg{multicol} is emulated during \acro{HTML} output, and
+% the \pkg{multicol} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{multicol}[2015/09/13]
+% \end{macrocode}
+
+
+
+% Multicols are converted into a 1--3 column display, browser-supported.
+
+% The optional multicols heading is placed inside a |div| of class |multicolsheading|.
+
+% The content is placed inside a |div| of class |multicols|.
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% ^^A \begin{environment}{multicols} * \marg{numcols} \oarg{heading}
+% \begin{macrocode}
+\NewDocumentEnvironment{multicols}{s m o}
+% \end{macrocode}
+% \acro{HTML} div class to contain everything:
+% \begin{macrocode}
+{\BlockClass{multicols}
+% \end{macrocode}
+% Optional \acro{HTML} div class for the heading:
+% \begin{macrocode}
+\IfValueTF{#3}{\begin{BlockClass}{multicolsheading}#3\end{BlockClass}}{}}
+% \end{macrocode}
+% When done with the environment, close the div:
+% \begin{macrocode}
+{\endBlockClass}
+% \end{macrocode}
+% ^^A \end{environment}
+
+% Emulated null functions which are not used in \acro{HTML}:
+% \begin{macrocode}
+\newcommand*{\columnbreak}{}
+\newcommand*{\RLmulticolcolumns}{}
+\newcommand*{\LRmulticolcolumns}{}
+
+\newlength{\premulticols}
+\newlength{\postmulticols}
+\newlength{\multicolsep}
+\newlength{\multicolbaselineskip}
+\newlength{\multicoltolerance}
+\newlength{\multicolpretolerance}
+\newcommand*{\columnseprulecolor}{\normalcolor}
+\newcounter{columnbadness}
+\newcounter{finalcolumnbadness}
+\newcounter{collectmore}
+\newcounter{unbalance}
+\newlength{\multicolovershoot}
+\newlength{\multicolundershoot}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+% \iffalse
+%</multicol>
+% \fi
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*multirow>
+% \fi
+
+% \part{lwarp-multirow.sty}
+
+% \section{Multirow}
+% \label{sec:multirow}
+%
+% \DescribePackage{multirow}
+% \pkg{multirow} is emulated during \acro{HTML} output, and
+% the \pkg{multirow} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{multirow}
+% \end{macrocode}
+
+% \iffalse
+%</multirow>
+% \fi
+
+
+
+
+% \iffalse
+%<*needspace>
+% \fi
+
+% \part{lwarp-needspace.sty}
+
+% \section{Needspace}
+%
+% \DescribePackage{needspace}
+% \pkg{needspace} is not used during HTML conversion.
+%
+% \changes{v0.20}{2016/12/22}{\pkg{needspace}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-needspace}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{needspace}
+
+\newcommand*{\needspace}[1]{}
+\DeclareDocumentCommand{\Needspace}{s m}{}
+% \end{macrocode}
+
+% \iffalse
+%</needspace>
+% \fi
+
+
+
+
+% \iffalse
+%<*nowidow>
+% \fi
+
+% \part{lwarp-nowidow.sty}
+
+% \section{Nowidow}
+%
+% \DescribePackage{nowidow}
+% \pkg{nowidow} is not used during HTML conversion.
+%
+% \changes{v0.20}{2017/01/03}{\pkg{nowidow}: Added.}
+%
+% \codehtml
+
+% Discard all options for \pkg{lwarp-nowidow}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{nowidow}
+% \end{macrocode}
+
+% ^^A \begin{macro}{\nowidow} \oarg{lines}
+% ^^A \begin{macro}{\setnowidow} \oarg{lines}
+% \begin{macrocode}
+\newcommand*{\nowidow}[1][]{}
+\newcommand*{\setnowidow}[1][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\noclub} \oarg{lines}
+% ^^A \begin{macro}{\setnoclub} \oarg{lines}
+% \begin{macrocode}
+\newcommand*{\noclub}[1][]{}
+\newcommand*{\setnoclub}[1][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% \iffalse
+%</nowidow>
+% \fi
+
+
+
+
+
+% \iffalse
+%<*pagenote>
+% \fi
+
+% \part{lwarp-pagenote.sty}
+
+% \section{Pagenote}
+%
+% \DescribePackage{pagenote}
+% \pkg{pagenote} is used by \pkg{lwarp},
+% and its user-interface macros have been nullified.
+%
+% Both footnotes and pagenotes appear as footnotes in the \acro{HTML} output.
+%
+% Any manipulation of \pkg{pagenote} in the user's document after
+% the preamble should be encased within a \env{warpprint} environment.
+%
+% \changes{v0.20}{2017/01/11}{\pkg{pagenote}: Added.}
+%
+% \codehtml
+
+% Discard all options for \pkg{lwarp-pagenote}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{pagenote}
+% \end{macrocode}
+%
+% \cs{pagenote} is already modified to work with \pkg{lwarp}.
+%
+% \begin{macrocode}
+\renewcommand*{\makepagenote}{}
+\RenewDocumentCommand{\printnotes}{s}{}
+\renewcommand{\printnotes}[2][]{}
+\renewcommand{\addtonotes}[1]{}
+% \end{macrocode}
+
+
+% \iffalse
+%</pagenote>
+% \fi
+
+
+
+
+% \clearpage
+%
+% \iffalse
+%<*placeins>
+% \fi
+%
+% \part{lwarp-placeins.sty}
+%
+% \section{Placeins}
+%
+% \DescribePackage{placeins}
+% \pkg{placeins} is not used during HTML conversion.
+%
+% \changes{v0.20}{2017/01/19}{\pkg{placeins}: Added.}
+%
+% \codehtml
+
+% Discard all options for \pkg{lwarp-placeins}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{placeins}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\FloatBarrier}{}
+% \end{macrocode}
+
+% \iffalse
+%</placeins>
+% \fi
+
+
+
+
+% \clearpage
+%
+% \iffalse
+%<*ragged2e>
+% \fi
+%
+% \part{lwarp-ragged2e.sty}
+%
+% \section{Ragged2e}
+%
+% \DescribePackage{ragged2e}
+% \pkg{ragged2e} is not used during HTML conversion.
+%
+% \changes{v0.20}{2017/01/19}{\pkg{ragged2e}: Added.}
+%
+% \codehtml
+
+% Discard all options for \pkg{lwarp-ragged2e}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{ragged2e}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\Centering}{\centering}
+\newcommand*{\RaggedLeft}{\raggedleft}
+\newcommand*{\RaggedRight}{\raggedright}
+\newcommand*{\justifying}{}
+\newlength{\CenteringLeftskip}
+\newlength{\RaggedLeftLeftskip}
+\newlength{\RaggedRightLeftskip}
+\newlength{\CenteringRightskip}
+\newlength{\RaggedLeftRightskip}
+\newlength{\RaggedRightRightskip}
+\newlength{\CenteringParfillskip}
+\newlength{\RaggedLeftParfillskip}
+\newlength{\RaggedRightParfillskip}
+\newlength{\JustifyingParfillskip}
+\newlength{\CenteringParindent}
+\newlength{\RaggedLeftParindent}
+\newlength{\RaggedRightParindent}
+\newlength{\JustifyingParindent}
+\newenvironment*{Center}{\center}{\endcenter}
+\newenvironment*{FlushLeft}{\flushleft}{\endflushleft}
+\newenvironment*{FlushRight}{\flushright}{\endflushright}
+\newenvironment*{justify}{\justifying}{\endjustifying}
+% \end{macrocode}
+
+
+% \iffalse
+%</ragged2e>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*rotating>
+% \fi
+
+% \part{lwarp-rotating.sty}
+
+% \section{Rotating}
+%
+% \DescribePackage{rotating}
+% \pkg{rotating} is emulated during \acro{HTML} output, and
+% the \pkg{rotating} package is ignored.
+%
+% \textcolor{red}{This code is untested.}
+%
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{rotating}
+% \end{macrocode}
+
+% \begin{macrocode}
+\let\sidewaystable\table
+\let\endsidewaystable\endtable
+
+\let\sidewaysfigure\figure
+\let\endsidewaysfigure\endfigure
+
+\newenvironment*{sideways}{}{}
+\newenvironment*{turn}[1]{}{}
+\newenvironment*{rotate}[1]{}{}
+\NewDocumentCommand{\turnbox}{m +m}{#2}
+\let\rotcaption\caption
+\let\@makerotcaption\@makecaption
+% \end{macrocode}
+
+
+% \iffalse
+%</rotating>
+% \fi
+
+
+
+
+
+% \iffalse
+%<*setspace>
+% \fi
+
+% \part{lwarp-setspace.sty}
+
+% \section{Setspace}
+%
+% \DescribePackage{setspace}
+% \pkg{setspace} is not used during HTML conversion.
+%
+% \changes{v0.20}{2016/12/22}{\pkg{setspace}: Improved support.}
+%
+% \codehtml
+
+% Discard all options for \pkg{lwarp-setspace}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{setspace}
+
+\newcommand*{\setstretch}[1]{}
+\newcommand*{\SetSinglespace}[1]{}
+\newcommand*{\singlespacing}{}
+\newcommand*{\onehalfspacing}{}
+\newcommand*{\doublespacing}{}
+
+\newenvironment*{singlespace}
+{\BlockClass{singlespace}}
+{\endBlockClass}
+
+\newenvironment*{singlespace*}
+{\BlockClass{singlespace}}
+{\endBlockClass}
+
+\newenvironment*{spacing}[1]{
+
+}{
+
+}
+
+\newenvironment*{onehalfspace}
+{\BlockClass{onehalfspace}}
+{\endBlockClass}
+
+\newenvironment*{doublespace}
+{\BlockClass{doublespace}}
+{\endBlockClass}
+% \end{macrocode}
+
+% \iffalse
+%</setspace>
+% \fi
+
+
+
+
+
+% \iffalse
+%<*textpos>
+% \fi
+
+% \part{lwarp-textpos.sty}
+
+% \section{Textpos}
+% \label{sec:textpos}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{textpos}: Added.}
+%
+% \DescribePackage{textpos}
+% \pkg{textpos} is emulated during \acro{HTML} output, and
+% the \pkg{textpos} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{textpos}
+% \end{macrocode}
+
+% \codehtml
+% \begin{macrocode}
+\NewDocumentEnvironment{textblock}{m r()}{}{}
+\NewDocumentEnvironment{textblock*}{m o r()}{}{}
+\newcommand*{\TPGrid}[3][]{}
+\NewDocumentCommand{\TPMargin}{s o}{}
+\newcommand*{\textblockcolour}[1]{}
+\newcommand*{\textblockrulecolour}[1]{}
+\newcommand*{\textblockcolor}[1]{}
+\newcommand*{\textblockrulecolor}[1]{}
+\newcommand*{\tekstblokkulur}[1]{}
+\newcommand*{\tekstblokrulekulur}[1]{}
+\newlength{\TPHorizModule}
+\newlength{\TPVertModule}
+\newlength{\TPboxrulesize}
+\newcommand{\textblocklabel}[1]{}
+\newcommand*{\showtextsize}{}
+\newcommand{\textblockorigin}[2]{}
+% \end{macrocode}
+
+% \iffalse
+%</textpos>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*threeparttable>
+% \fi
+
+% \part{lwarp-threeparttable.sty}
+
+% \section{Threeparttable}
+% \label{sec:threeparttable}
+%
+%
+% \DescribePackage{threeparttable}
+% \pkg{threeparttable} is emulated during \acro{HTML} output, and
+% the \pkg{threeparttable} package is ignored.
+
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{threeparttable}
+% \end{macrocode}
+
+
+
+% ^^A \begin{macro}{\LWR at printtablenote} \marg{text}
+%
+% Prints the table note item header inside a \acro{CSS} class of |tnoteitemheader|.
+% \begin{macrocode}
+\newcommand{\LWR at printtablenote}[1]{\InlineClass{tnoteitemheader}{#1}}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+
+% ^^A \begin{environment}{threeparttable} \oarg{alignment}
+% To emulate threeparttable:
+% \begin{macrocode}
+\newenvironment*{threeparttable}[1][b]{}{}
+% \end{macrocode}
+% ^^A \end{environment}
+
+% ^^A \begin{environment}{tablenotes} \oarg{options}
+% \changes{v0.19}{2016/06/01}{CSS for table note item.}
+% \begin{macrocode}
+\newenvironment*{tablenotes}[1][]
+{%
+\BlockClass{tnotes}%
+\setlist[description]{format=\LWR at printtablenote}%
+\description%
+}
+{%
+\enddescription%
+\endBlockClass%
+}
+% \end{macrocode}
+% ^^A \end{environment}
+% ^^A \begin{macro}{\tnote}
+% \begin{macrocode}
+\newcommand{\tnote}[1]{\textsuperscript{#1}}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% \iffalse
+%</threeparttable>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*titleps>
+% \fi
+
+% \part{lwarp-titleps.sty}
+
+% \section{Titleps}
+%
+% \DescribePackage{titleps}
+% \pkg{titleps} is loaded and used by \pkg{lwarp} during \acro{HTML} output.
+% All user options and macros are ignored and disabled.
+
+% \changes{v0.20}{2017/01/03}{\pkg{titleps}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-titleps}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{titleps}
+% \end{macrocode}
+%
+% \cs{pagestyle} and \cs{thispagestyle} are already disabled in the \pkg{lwarp} code.
+%
+% ^^A \begin{macro}{\newpagestyle} \marg{name} \oarg{style} \marg{commands}
+% ^^A \begin{macro}{\renewpagestyle} \marg{name} \oarg{style} \marg{commands}
+% \begin{macrocode}
+\RenewDocumentCommand{\newpagestyle}{m o m}{}
+\RenewDocumentCommand{\renewpagestyle}{m o m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\sethead} \oarg{el} \oarg{ec} \oarg{er} \marg{ol} \marg{oc} \marg{or}
+% ^^A \begin{macro}{\setfoot} \oarg{el} \oarg{ec} \oarg{er} \marg{ol} \marg{oc} \marg{or}
+% \begin{macrocode}
+\RenewDocumentCommand{\sethead}{o o o m m m}{}
+\RenewDocumentCommand{\setfoot}{o o o m m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\settitlemarks} * \marg{names}
+% \begin{macrocode}
+\RenewDocumentCommand{\settitlemarks}{s m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\headrule}
+% ^^A \begin{macro}{\footrule}
+% \begin{macrocode}
+\renewcommand*{\headrule}{}
+\renewcommand*{\footrule}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\setheadrule} \marg{length}
+% ^^A \begin{macro}{\setfootrule} \marg{length}
+% \begin{macrocode}
+\renewcommand*{\setheadrule}[1]{}
+\renewcommand*{\setfootrule}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\makeheadrule}
+% ^^A \begin{macro}{\makefootrule}
+% \begin{macrocode}
+\newcommand*{\makeheadrule}{}
+\newcommand*{\makefootrule}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\setmarkboth} \marg{code}
+% \begin{macrocode}
+\renewcommand{\setmarkboth}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\widenhead}
+% \begin{macrocode}
+\RenewDocumentCommand{\widenhead}{s o o m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\bottitlemarks}
+% ^^A \begin{macro}{\toptitlemarks}
+% ^^A \begin{macro}{\firsttitlemarks}
+% ^^A \begin{macro}{\nexttitlemarks}
+% ^^A \begin{macro}{\outertitlemarks}
+% ^^A \begin{macro}{\innertitlemarks}
+% \begin{macrocode}
+\renewcommand*{\bottitlemarks}{}
+\renewcommand*{\toptitlemarks}{}
+\renewcommand*{\firsttitlemarks}{}
+\renewcommand*{\nexttoptitlemarks}{}
+\renewcommand*{\outertitlemarks}{}
+\renewcommand*{\innertitlemarks}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\newtitlemark} * \marg{name}
+% \begin{macrocode}
+\RenewDocumentCommand{\newtitlemark}{s m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\pretitlemark} * \marg{section} \marg{text}
+% \begin{macrocode}
+\RenewDocumentCommand{\pretitlemark}{s m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\ifsamemark} \marg{group} \marg{command} \marg{true} \marg{false}
+% \begin{macrocode}
+\renewcommand{\ifsamemark}[4]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\setfloathead} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
+% ^^A \begin{macro}{\setfloatfoot} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
+% \begin{macrocode}
+\NewDocumentCommand{\setfloathead}{s o o o m m m m m}{}
+\NewDocumentCommand{\setfloatfoot}{s o o o m m m m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\nextfloathead} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
+% ^^A \begin{macro}{\nextfloatfoot} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
+% \begin{macrocode}
+\NewDocumentCommand{\nextfloathead}{s o o o m m m m m}{}
+\NewDocumentCommand{\nextfloatfoot}{s o o o m m m m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\newmarkset} \marg{markset}
+% \begin{macrocode}
+\newcommand{\newmarkset}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\newextramark} * \marg{markset} \marg{macro-name}
+% \begin{macrocode}
+\NewDocumentCommand{\newextramarkset}{s m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\botextramarks} \marg{markset}
+% ^^A \begin{macro}{\topextramarks} \marg{markset}
+% ^^A \begin{macro}{\firstextramarks} \marg{markset}
+% ^^A \begin{macro}{\nextextramarks} \marg{markset}
+% ^^A \begin{macro}{\outerextramarks} \marg{markset}
+% ^^A \begin{macro}{\innerextramarks} \marg{markset}
+% \begin{macrocode}
+\newcommand{\botextramarks}[1]{}
+\newcommand{\topextramarks}[1]{}
+\newcommand{\firstextramarks}[1]{}
+\newcommand{\nexttopextramarks}[1]{}
+\newcommand{\outerextramarks}[1]{}
+\newcommand{\innerextramarks}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% \iffalse
+%</titleps>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*titlesec>
+% \fi
+
+% \part{lwarp-titlesec.sty}
+
+% \section{Titlesec}
+%
+% \DescribePackage{titlesec}
+% \pkg{titlesec} is emulated.
+% All user options and macros are ignored and disabled.
+
+% \changes{v0.20}{2017/01/03}{\pkg{titlesec}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-titlesec}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{titlesec}
+% \end{macrocode}
+
+% ^^A \begin{macro}{\titlelabel} \marg{label-format}
+% \begin{macrocode}
+\newcommand*{\titlelabel}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\titleformat*} \marg{command} \marg{format}
+%
+% ^^A \begin{macro}{\titleformat} \marg{command} \oarg{shape} \marg{format}
+% ^^A \marg{label} \marg{sep} \marg{begfore} \oarg{after}
+% \begin{macrocode}
+\newcommand\titleformat{%
+ \@ifstar{\ttl at format@s}%
+ {\ttl at format@i}}
+\newcommand{\ttl at format@s}[1]{}
+\NewDocumentCommand{\ttl at format@i}{m o m m m m o}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\chaptertitlename}
+% \begin{macrocode}
+\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}
+\newcommand\chaptertitlename{\@chapapp}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\titlespacing} * \marg{command} \marg{left} \marg{before} \marg{after} \oarg{right}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\titlespacing}{s m m m m o}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\filright}
+% ^^A \begin{macro}{\filcenter}
+% ^^A \begin{macro}{\filleft}
+% ^^A \begin{macro}{\fillast}
+% ^^A \begin{macro}{\filinner}
+% ^^A \begin{macro}{\filouter}
+% \begin{macrocode}
+\newcommand*{\filright}{}
+\newcommand*{\filcenter}{}
+\newcommand*{\filleft}{}
+\newcommand*{\fillast}{}
+\newcommand*{\filinner}{}
+\newcommand*{\filouter}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\wordsep}
+% \begin{macrocode}
+\newcommand\wordsep{\fontdimen\tw@\font \@plus
+ \fontdimen\thr@@\font \@minus \fontdimen4\font}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\titleline} * \oarg{align} \marg{material}
+% \begin{macrocode}
+\NewDocumentCommand{\titleline}{s o m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\titlerule} \oarg{height}
+% \begin{macrocode}
+\providecommand*\titlerule{\@ifstar{\ttl at row}{\ttl at rule}}
+\newcommand*{\ttl at rule}[1][]{}
+\newcommand*{\ttl at row}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\iftitlemeasuring} \marg{true} \marg{false}
+% \begin{macrocode}
+\newcommand{\iftitlemeasuring}[2]{#2}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\assignpagestyle} \marg{command} \marg{pagestyle}
+% \begin{macrocode}
+\newcommand{\assignpagestyle}[2]{#2}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\titleclass} \marg{name} \oarg{startlevel} \marg{class} \oarg{cmd}
+% \begin{macrocode}
+\NewDocumentCommand{\titleclass}{m o m o}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% \iffalse
+%</titlesec>
+% \fi
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*titletoc>
+% \fi
+
+% \part{lwarp-titletoc.sty}
+
+% \section{Titletoc}
+%
+% \DescribePackage{titletoc}
+% \pkg{titletoc} is emulated.
+% All user options and macros are ignored and disabled.
+
+% \changes{v0.20}{2017/01/03}{\pkg{titletoc}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-titletoc}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{titletoc}
+% \end{macrocode}
+%
+
+% ^^A \begin{macro}{\dottedcontents} \marg{section} \oarg{left} \marg{above} \marg{label} \marg{leader}
+% \begin{macrocode}
+\NewDocumentCommand{\dottedcontents}{m o m m m}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\titlecontents} * \marg{section} \oarg{left} \marg{above}
+% ^^A \marg{numbered} \marg{numberless} \marg{filler}
+% ^^A \oarg{below or begin} \oarg{separator} \oarg{end}
+% \begin{macrocode}
+\newcommand{\titlecontents}{\@ifstar{\ttl at tcstar}{\ttl at tcnostar}}
+\NewDocumentCommand{\ttl at tcstar}{m o m m m m o o o}{}
+\NewDocumentCommand{\ttl at tcnostar}{m o m m m m o}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\contentsmargin} \oarg{correction} \marg{right}
+% \begin{macrocode}
+\newcommand{\contentsmargin}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\thecontentslabel}
+% ^^A \begin{macro}{\thecontentspage}
+% \begin{macrocode}
+\newcommand*{\thecontentslabel}{thecontentslabel}
+\newcommand*{\thecontentspage}{thecontentspage}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\contentslabel} \oarg{format} \marg{space}
+% ^^A \begin{macro}{\contentspage} \oarg{format}
+% \begin{macrocode}
+\newcommand{\contentslabel}[2][]{\thecontentslabel}
+\newcommand{\contentspage}[1][]{\thecontentspage}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\contentspush} \marg{text}
+% \begin{macrocode}
+\newcommand{\contentspush}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\contentsuse} \marg{name} \marg{text}
+% \begin{macrocode}
+\newcommand{\contentsuse}[2]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\startcontents} \oarg{name}
+% ^^A \begin{macro}{\stopcontents} \oarg{name}
+% ^^A \begin{macro}{\resumecontents} \oarg{name}
+% \begin{macrocode}
+\newcommand*{\startcontents}[1][]{}
+\newcommand*{\stopcontents}[1][]{}
+\newcommand*{\resumecontents}[1][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\printcontents} \oarg{name} \marg{prefix} \marg{start} \marg{code}
+% \begin{macrocode}
+\newcommand{\printcontents}[4][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\startlist} \oarg{name} \marg{list}
+% ^^A \begin{macro}{\stoplist} \oarg{name} \marg{list}
+% ^^A \begin{macro}{\resumelist} \oarg{name} \marg{list}
+% \begin{macrocode}
+\newcommand{\startlist}[2][]{}
+\newcommand{\stoplist}[2][]{}
+\newcommand{\resumelist}[2][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\printlist} \oarg{name} \marg{list} \marg{prefix} \marg{code}
+% \begin{macrocode}
+\newcommand{\printlist}[4][]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% \iffalse
+%</titletoc>
+% \fi
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*titling>
+% \fi
+
+% \part{lwarp-titling.sty}
+
+% \section{Titling}
+%
+% \DescribePackage{titling}
+% \pkg{titling} is used by \pkg{lwarp}.
+% The following patches are not needed by \pkg{lwarp},
+% but are required if the user requests \pkg{titling}.
+%
+% \pkg{lwarp} uses page notes for footnotes, so the various
+% \pkg{titling} footnote restyling commands have no effect.
+%
+% \changes{v0.20}{2017/01/22}{\pkg{titling}: Improved compatibility.}
+%
+% \codehtml
+%
+% Pass all options to \pkg{lwarp-titling}:
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{titling}
+% \end{macrocode}
+%
+%
+% Patch \cs{@bsmtitlempty}:
+% \begin{macrocode}
+\let\LWR at orig@bsmtitlempty\@bsmtitlempty
+\renewcommand*{\@bsmtitlempty}{%
+\LWR at orig@bsmtitlempty%
+\global\let\published\relax%
+\global\let\subtitle\relax%
+}
+% \end{macrocode}
+%
+%
+% Patch \cs{keepthetitle}:
+% \begin{macrocode}
+\let\LWR at origkeepthetitle\keepthetitle
+\renewcommand*{\keepthetitle}{%
+\LWR at orig@keepthetitle%
+\global\let\@published\@empty%
+\global\let\@subtitle\@empty%
+}
+% \end{macrocode}
+%
+%
+% Patch \cs{killtitle}:
+% \begin{macrocode}
+\let\LWR at origkilltitle\killtitle
+\renewcommand*{\killtitle}{%
+\LWR at orig@killtitle%
+\global\let\thepublished\relax%
+\global\let\thesubtitle\relax%
+}
+% \end{macrocode}
+%
+%
+% \iffalse
+%</titling>
+% \fi
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*tocloft>
+% \fi
+
+% \part{lwarp-tocloft.sty}
+
+% \section{Tocloft}
+%
+% \DescribePackage{tocloft}
+% \pkg{tocloft} is emulated.
+% Most user options and macros are ignored and disabled.
+% \cs{newlistof} and \cs{cftchapterprecis} are supported.
+
+% \changes{v0.20}{2017/01/03}{\pkg{tocloft}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-tocloft}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{tocloft}
+% \end{macrocode}
+%
+
+% ^^A \begin{macro}{\tocloftpagestyle} \marg{style}
+% \begin{macrocode}
+\newcommand{\tocloftpagestyle}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\cftmarktoc}
+% ^^A \begin{macro}{\cfttoctitlefont}
+% ^^A \begin{macro}{\cftaftertoctitle}
+% \begin{macrocode}
+\newcommand*{\cftmarktoc}{}
+\newcommand*{\cfttoctitlefont}{}
+\newcommand*{\cftaftertoctitle}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% \begin{macrocode}
+\newlength{\cftbeforetoctitleskip}
+\newlength{\cftaftertoctitleskip}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\cftmarklof}
+% ^^A \begin{macro}{\cftloftitlefont}
+% ^^A \begin{macro}{\cftafterloftitle}
+% \begin{macrocode}
+\newcommand*{\cftmarklof}{}
+\newcommand*{\cftloftitlefont}{}
+\newcommand*{\cftafterloftitle}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% \begin{macrocode}
+\newlength{\cftbeforeloftitleskip}
+\newlength{\cftafterloftitleskip}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\cftmarklot}
+% ^^A \begin{macro}{\cftlottitlefont}
+% ^^A \begin{macro}{\cftafterlottitle}
+% \begin{macrocode}
+\newcommand*{\cftmarklot}{}
+\newcommand*{\cftlottitlefont}{}
+\newcommand*{\cftafterlottitle}{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% \begin{macrocode}
+\newlength{\cftbeforelottitleskip}
+\newlength{\cftafterlottitleskip}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\cftdot}
+% ^^A \begin{macro}{\cftdotsep}
+% ^^A \begin{macro}{\cftnodots}
+% \begin{macrocode}
+\newcommand*{\cftdot}{.}
+\providecommand*{\cftdotsep}{1}
+\newcommand*{\cftnodots}{5000}
+
+\providecommand{\cftdotfill}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\cftsetpnumwidth} \marg{length}
+% ^^A \begin{macro}{\cftsetrmarg} \marg{length}
+% \begin{macrocode}
+\newcommand*{\cftsetpnumwidth}[1]{}
+\newcommand*{\cftsetrmarg}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\cftpnumalign} \marg{alignment}
+% \begin{macrocode}
+\newcommand*{\cftpnumalign}[1]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% \begin{macrocode}
+\newlength{\cftparskip}
+% \end{macrocode}
+
+
+
+% \begin{macrocode}
+\newlength{\cftbeforepartskip}
+\newlength{\cftpartindent}
+\newlength{\cftpartnumwidth}
+\newcommand*{\cftpartfont}{}
+\newcommand*{\cftpartpresnum}{}
+\newcommand*{\cftpartaftersnum}{}
+\newcommand*{\cftpartaftersnumb}{}
+\newcommand*{\cftpartleader}{}
+\newcommand*{\cftpartdotsep}{1}
+\newcommand*{\cftpartpagefont}{}
+\newcommand*{\cftpartafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforechapskip}
+\newlength{\cftchapindent}
+\newlength{\cftchapnumwidth}
+\newcommand*{\cftchapfont}{}
+\newcommand*{\cftchappresnum}{}
+\newcommand*{\cftchapaftersnum}{}
+\newcommand*{\cftchapaftersnumb}{}
+\newcommand*{\cftchapleader}{}
+\newcommand*{\cftchapdotsep}{1}
+\newcommand*{\cftchappagefont}{}
+\newcommand*{\cftchapafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforesecskip}
+\newlength{\cftsecindent}
+\newlength{\cftsecnumwidth}
+\newcommand*{\cftsecfont}{}
+\newcommand*{\cftsecpresnum}{}
+\newcommand*{\cftsecaftersnum}{}
+\newcommand*{\cftsecaftersnumb}{}
+\newcommand*{\cftsecleader}{}
+\newcommand*{\cftsecdotsep}{1}
+\newcommand*{\cftsecpagefont}{}
+\newcommand*{\cftsecafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforesubsecskip}
+\newlength{\cftsubsecindent}
+\newlength{\cftsubsecnumwidth}
+\newcommand*{\cftsubsecfont}{}
+\newcommand*{\cftsubsecpresnum}{}
+\newcommand*{\cftsubsecaftersnum}{}
+\newcommand*{\cftsubsecaftersnumb}{}
+\newcommand*{\cftsubsecleader}{}
+\newcommand*{\cftsubsecdotsep}{1}
+\newcommand*{\cftsubsecpagefont}{}
+\newcommand*{\cftsubsecafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforesubsubsecskip}
+\newlength{\cftsubsubsecindent}
+\newlength{\cftsubsubsecnumwidth}
+\newcommand*{\cftsubsubsecfont}{}
+\newcommand*{\cftsubsubsecpresnum}{}
+\newcommand*{\cftsubsubsecaftersnum}{}
+\newcommand*{\cftsubsubsecaftersnumb}{}
+\newcommand*{\cftsubsubsecleader}{}
+\newcommand*{\cftsubsubsecdotsep}{1}
+\newcommand*{\cftsubsubsecpagefont}{}
+\newcommand*{\cftsubsubsecafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforeparaskip}
+\newlength{\cftparaindent}
+\newlength{\cftparanumwidth}
+\newcommand*{\cftparafont}{}
+\newcommand*{\cftparapresnum}{}
+\newcommand*{\cftparaaftersnum}{}
+\newcommand*{\cftparaaftersnumb}{}
+\newcommand*{\cftparaleader}{}
+\newcommand*{\cftparadotsep}{1}
+\newcommand*{\cftparapagefont}{}
+\newcommand*{\cftparaafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforesubparaskip}
+\newlength{\cftsubparaindent}
+\newlength{\cftsubparanumwidth}
+\newcommand*{\cftsubparafont}{}
+\newcommand*{\cftsubparapresnum}{}
+\newcommand*{\cftsubparaaftersnum}{}
+\newcommand*{\cftsubparaaftersnumb}{}
+\newcommand*{\cftsubparaleader}{}
+\newcommand*{\cftsubparadotsep}{1}
+\newcommand*{\cftsubparapagefont}{}
+\newcommand*{\cftsubparaafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforefigskip}
+\newlength{\cftfigindent}
+\newlength{\cftfignumwidth}
+\newcommand*{\cftfigfont}{}
+\newcommand*{\cftfigpresnum}{}
+\newcommand*{\cftfigaftersnum}{}
+\newcommand*{\cftfigaftersnumb}{}
+\newcommand*{\cftfigleader}{}
+\newcommand*{\cftfigdotsep}{1}
+\newcommand*{\cftfigpagefont}{}
+\newcommand*{\cftfigafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforesubfigskip}
+\newlength{\cftsubfigindent}
+\newlength{\cftsubfignumwidth}
+\newcommand*{\cftsubfigfont}{}
+\newcommand*{\cftsubfigpresnum}{}
+\newcommand*{\cftsubfigaftersnum}{}
+\newcommand*{\cftsubfigaftersnumb}{}
+\newcommand*{\cftsubfigleader}{}
+\newcommand*{\cftsubfigdotsep}{1}
+\newcommand*{\cftsubfigpagefont}{}
+\newcommand*{\cftsubfigafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforetabskip}
+\newlength{\cfttabindent}
+\newlength{\cfttabnumwidth}
+\newcommand*{\cfttabfont}{}
+\newcommand*{\cfttabpresnum}{}
+\newcommand*{\cfttabaftersnum}{}
+\newcommand*{\cfttabaftersnumb}{}
+\newcommand*{\cfttableader}{}
+\newcommand*{\cfttabdotsep}{1}
+\newcommand*{\cfttabpagefont}{}
+\newcommand*{\cfttabafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newlength{\cftbeforesubtabskip}
+\newlength{\cftsubtabindent}
+\newlength{\cftsubtabnumwidth}
+\newcommand*{\cftsubtabfont}{}
+\newcommand*{\cftsubtabpresnum}{}
+\newcommand*{\cftsubtabaftersnum}{}
+\newcommand*{\cftsubtabaftersnumb}{}
+\newcommand*{\cftsubtableader}{}
+\newcommand*{\cftsubtabdotsep}{1}
+\newcommand*{\cftsubtabpagefont}{}
+\newcommand*{\cftsubtabafterpnum}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand{\cftsetindents}[3]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand{\pagenumbersoff}[1]{}
+\newcommand{\pagenumberson}[1]{}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\newlistof} \oarg{within} \marg{type} \marg{ext} \marg{listofname}
+%
+% Emulated through the \cs{newfloat} mechanism.
+% \begin{macrocode}
+\NewDocumentCommand{\newlistof}{o m m m}
+{%
+\IfValueTF{#1}
+{\newfloat{#2}{tbp}{#3}[#1]}
+{\newfloat{#2}{tbp}{#3}}
+\@namedef{listof#2}{\listof{#2}{#4}}
+\@namedef{#2depth}{1}
+\expandafter\newlength\csuse{cftbefore#2skip}
+\expandafter\newlength\csuse{cft#2indent}
+\expandafter\newlength\csuse{cft#2numwidth}
+\@namedef{cft#2font}{}
+\@namedef{cft#2presnum}{}
+\@namedef{cft#2aftersnum}{}
+\@namedef{cft#2aftersnumb}{}
+\@namedef{cft#2leader}{}
+\@namedef{cft#2dotsep}{1}
+\@namedef{cft#2pagefont}{}
+\@namedef{cft#2afterpnum}{}
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% \cs{cftchapterprecis} from \pkg{tocloft}:
+% \begin{macrocode}
+\newcommand{\cftchapterprecis}[1]{%
+ \cftchapterprecishere{#1}
+ \cftchapterprecistoc{#1}}
+\newcommand{\cftchapterprecishere}[1]{%
+ \begin{quote}\textit{#1}\end{quote}}
+\newcommand{\cftchapterprecistoc}[1]{
+ \addtocontents{toc}{%
+ {
+ \protect\begin{quote}#1\protect\end{quote}}
+ }
+}
+% \end{macrocode}
+
+% \iffalse
+%</tocloft>
+% \fi
+
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*trivfloat>
+% \fi
+
+% \part{lwarp-trivfloat.sty}
+
+% \section{Trivfloat}
+% \label{sec:trivfloat}
+%
+% \DescribePackage{trivfloat}
+% \pkg{trivfloat} is forced to use the built-in \pkg{lwarp}
+% emulation for floats.
+
+% \codehtml
+
+% Discard all options for \pkg{lwarp-trivfloat}:
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{trivfloat}
+\LWR at origRequirePackage{trivfloat}
+% \end{macrocode}
+
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% Package \pkg{trivfloat} is supported via the \pkg{lwarp} emulation of \pkg{float}.
+% For \acro{HTML} usage, use only |\usepackage{trivfloat}|, without any options,
+% \watchout
+% which tells \pkg{trivfloat} to use the emulated \pkg{float} functions instead
+% of using \pkg{floatrow} or \pkg{memoir}.
+
+% ^^A \DescribeMacro{\trivfloat} \marg{type}
+%
+% To create a new float type and change its name:
+% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
+% \trivfloat{example}
+% \renewcommand{\examplename}{Example Name}
+% \crefname{example}{example}{examples}
+% \Crefname{example}{Example}{Examples}
+% \end{Verbatim}
+%
+%
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+% \DescribeMacro{\tfl at chapter@fix}
+% Nullified at the beginning of the document.
+% Is used by \pkg{trivfloat} to correct float chapter numbers,
+% but is not needed for \pkg{lwarp}.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macrocode}
+\AtBeginDocument{\DeclareDocumentCommand{\tfl at chapter@fix}{m m}{}}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \subsection{Combining \cs{newfloat}, \cs{trivfloat}, and \pkg{algorithmicx}}
+% \label{sec:combiningfloats}
+% \index{newfloat>with trivfloat, algorithmic}
+% \index{trivfloat>with newfloat, algorithmic}
+% \index{algorithmic>with newfloat, trivfloat}
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% \textcolor{red}{For both print and HTML output:}
+%
+% When using \pkg{float}, \pkg{trivfloat}, or \pkg{algorithmicx} at the same time,
+% be aware of conflicting file usage.
+% \watchout
+% \pkg{algorithmicx} uses |.loa|.
+% \pkg{trivfloat} by default starts with |.loa| and goes up for additional floats,
+% skipping |.lof| and |.lot|.
+%
+% When using \cs{newfloat},
+% \watchout
+% be sure to manually assign higher letters to the \cs{newfloat}
+% files to avoid |.loa| used by \pkg{algorithmicx}, and any files used by \pkg{trivfloat}.
+% Also avoid using |.lof| and |.lot|.
+%
+% When using \cs{trivfloat}, you may force it to avoid conflicting with
+% \watchout
+% \pkg{algorithmicx} by starting \pkg{trivfloat}'s file extensions with |.lob|:
+%
+% \begin{docsidebar}
+% \cs{makeatletter} \\
+% \cs{setcounter\{tfl\@float\@cnt\}\{1\}} \% start trivfloats with .lob \\
+% \cs{makeatletter}
+% \end{docsidebar}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+% \iffalse
+%</trivfloat>
+% \fi
+
+
+
+
+
+
+% \iffalse
+%<*wallpaper>
+% \fi
+
+% \part{lwarp-wallpaper.sty}
+
+% \section{Wallpaper}
+% \label{sec:wallpaper}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{wallpaper}: Added.}
+%
+% \DescribePackage{wallpaper}
+% \pkg{wallpaper} is emulated during \acro{HTML} output, and
+% the \pkg{wallpaper} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{wallpaper}
+% \end{macrocode}
+
+% \codehtml
+% \begin{macrocode}
+\newcommand*{\CenterWallPaper}[2]{}
+\newcommand*{\ThisCenterWallPaper}[2]{}
+\newcommand*{\TileWallPaper}[3]{}
+\newcommand*{\ThisTileWallPaper}[3]{}
+\newcommand*{\TileSquareWallPaper}[2]{}
+\newcommand*{\ThisTileSquareWallPaper}[2]{}
+\newcommand*{\ULCornerWallPaper}[2]{}
+\newcommand*{\ThisULCornerWallPaper}[2]{}
+\newcommand*{\LLCornerWallPaper}[2]{}
+\newcommand*{\ThisLLCornerWallPaper}[2]{}
+\newcommand*{\URCornerWallPaper}[2]{}
+\newcommand*{\ThisURCornerWallPaper}[2]{}
+\newcommand*{\LRCornerWallPaper}[2]{}
+\newcommand*{\ThisLRCornerWallPaper}[2]{}
+\newcommand*{\ClearWallPaper}{}
+\newlength{\wpXoffset}
+\newlength{\wpYoffset}
+% \end{macrocode}
+
+% \iffalse
+%</wallpaper>
+% \fi
+
+
+
+
+
+% \iffalse
+%<*wrapfig>
+% \fi
+
+% \part{lwarp-wrapfig.sty}
+
+% \section{Wrapfig}
+% \label{sec:wrapfig}
+%
+% \changes{v0.20}{2017/01/11}{\pkg{wrapfig}: Added.}
+%
+% \DescribePackage{wrapfig}
+% \pkg{wrapfig} is emulated during \acro{HTML} output, and
+% the \pkg{wrapfig} package is ignored.
+
+% \begin{macrocode}
+\LWR at ProvidesPackageDrop{wrapfig}
+% \end{macrocode}
+
+% \codehtml
+
+
+% Computed width of a wrapped object.
+% Used to print the \acro{HTML} style.
+% \begin{macrocode}
+\newlength{\LWR at wrapwidth}
+% \end{macrocode}
+
+
+% \begin{macrocode}
+
+\newcommand*{\LWR at wrapposition}{}
+
+\newcommand*{\LWR at subwrapfigure}[2]{%
+\LWR at maybeincthisfloat%
+\renewcommand*{\LWR at wrapposition}{}%
+\ifthenelse{%
+\equal{#1}{r}\OR\equal{#1}{R}\OR%
+\equal{#1}{o}\OR\equal{#1}{O}%
+}%
+{\renewcommand*{\LWR at wrapposition}{float:right}}%
+{\renewcommand*{\LWR at wrapposition}{float:left}}%
+\setlength{\LWR at wrapwidth}{#2}%
+\addtolength{\LWR at wrapwidth}{4em}%
+\uselengthunit{PT}%
+% \BlockClass{marginblock}[%
+% width:\rndprintlength{\LWR at wrapwidth} ; %
+% \LWR at wrapposition%
+% ]%
+\LWR at stoppars%
+\LWR at htmltag{div class="marginblock" id="autofloat-\arabic{LWR at thisfloat}"
+style="width:\rndprintlength{\LWR at wrapwidth} ; %
+\LWR at wrapposition"%
+}
+\LWR at startpars
+}
+
+
+\NewDocumentEnvironment{wrapfigure}{o m o m}
+{%
+\LWR at subwrapfigure{#2}{#4}%
+\captionsetup{type=figure}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+
+\NewDocumentEnvironment{wraptable}{o m o m}
+{%
+\LWR at subwrapfigure{#2}{#4}%
+\captionsetup{type=table}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+
+\NewDocumentEnvironment{wrapfloat}{m o m o m}
+{%
+\LWR at subwrapfigure{#3}{#5}%
+\captionsetup{type=#1}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+\newlength{\wrapoverhang}
+% \end{macrocode}
+
+% \iffalse
+%</wrapfig>
+% \fi
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*xcolor>
+% \fi
+
+% \part{lwarp-xcolor.sty}
+
+% \section{Xcolor}
+%
+% \DescribePackage{xcolor}
+%
+% \limitsxcolor
+
+% \codehtml
+%
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{xcolor}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\LWR at tempcolor} The color converted to \acro{HTML} colorspace.
+% \begin{macrocode}
+\newcommand*{\LWR at tempcolor}{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\LWR at currenttextcolor} The color to use for text and \cs{rule},
+% defaulting to black.
+% \begin{macrocode}
+\newcommand*{\LWR at currenttextcolor}{black}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+
+% ^^A \begin{macro}{\LWR at colorstyle} \marg{1: styletext} \marg{2: model}
+% ^^A \marg{3: color} \marg{4: spancontents}
+%
+% \changes{v0.19}{2016/06/01}{Supports colored \cs{rule}.}
+%
+% Creates a styled span with a color converted to \acro{HTML} hex colorspace.
+% Uses |LWR at spandepth| to prevent paragraph tags inside the span.
+% If used for \cs{textcolor}, with a styletext of |color:|, then the new color is
+% copied into \\ \cs{LWR at currenttextcolor} for possible re-use in \cs{rule}.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at colorstyle}{m m m +m}{%
+% \end{macrocode}
+% Use the \pkg{xcolor} package to convert to an \acro{HTML} color space:
+% \begin{macrocode}
+\convertcolorspec{#2}{#3}{HTML}\LWR at tempcolor%
+% \end{macrocode}
+% If is a \cs{textcolor}, save a copy of this color for use by \cs{rule}:
+% \begin{macrocode}
+\ifthenelse{\equal{#1}{color:}}%
+{\renewcommand*{\LWR at currenttextcolor}{\#\LWR at tempcolor}}{}%
+% \end{macrocode}
+% Create the \acro{HTML} |span| with the styled color:
+% \begin{macrocode}
+\LWR at htmltagc{span style="#1\#\LWR at tempcolor"{}}%
+\begin{LWR at nestspan}%
+% \end{macrocode}
+% Prevent additional paragraph tags inside this span:
+% \begin{macrocode}
+% \end{macrocode}
+% Print the contents then close the span:
+% \begin{macrocode}
+#4%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+% \end{macrocode}
+% For paragraph-tag handling:
+% \begin{macrocode}
+\LWR at ensuredoingapar%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% \DescribeMacro{\color} appears in the \LaTeX{} \acro{PDF} output, but is ignored by
+% |pdftotext| and thus is ignored in the \acro{HTML} file. Text styling by local group
+% is not yet supported.
+
+% Each of the following macros is given a temporary name, and is |\let| to the final
+% name once the \acro{HTML} conversion starts.
+
+% ^^A \begin{macro}{\textcolor} \oarg{model} \marg{color} \marg{text}
+%
+% is converted into an \acro{HTML} hex color span.
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at textcolor}{O{named} m +m}{%
+\begingroup%
+\LWR at colorstyle{color:}{#1}{#2}{#3}%
+\endgroup%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\pagecolor} \oarg{model} \marg{color}
+%
+% Ignored. Use |\NewCSS| instead.
+% \begin{macrocode}
+\newcommand*{\LWR at pagecolor}[2][named]{}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% ^^A \begin{macro}{\colorbox} \oarg{model} \marg{color} \marg{text}
+%
+% is converted into an \acro{HTML} hex background color span.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at colorbox}{O{named} m m}{%
+\begingroup%
+\LWR at colorstyle{background:}{#1}{#2}{#3}%
+\endgroup%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% ^^A \begin{macro}{\fcolorbox}
+% \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text}
+%
+% is converted into a framed \acro{HTML} hex background color span.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at fcolorbox}{O{named} m O{named} m m}{%
+\begingroup%
+\LWR at colorstyle{border:1px solid }{#1}{#2}%
+{\LWR at colorstyle{background:}{#3}{#4}{#5}}%
+\endgroup%
+}
+% \end{macrocode}
+% ^^A \end{macro}
+
+
+% \iffalse
+%</xcolor>
+% \fi
+
+
+
+
+
+
+
+
+
+
+
+
+% \clearpage
+
+% \iffalse
+%<*xfrac>
+% \fi
+
+% \part{lwarp-xfrac.sty}
+
+% \section{Xfrac}
+% \label{sec:xfrac}
+%
+% \DescribePackage{xfrac} Supported by adding \pkg{xfrac} instances.
+%
+% \codehtml
+% \begin{macrocode}
+\LWR at ProvidesPackagePass{xfrac}
+% \end{macrocode}
+
+% In the user's document preamble, \pkg{lwarp} should be loaded
+% after font-related setup.
+% \watchout[font size]
+% During \acro{HTML} conversion, this font is used by \pkg{lwarp}
+% to generate its initial \acro{PDF} output containing \acro{HTML} tags,
+% later to be converted by |pdftotext| to a plain text file.
+% While the text may be in any font which |pdftotext| can read, the math is
+% directly converted into \acro{SVG} images using this same user-selected font.
+% |xfrac| below is set for the Latin Modern (lmr) font.
+% If another font is used, it may be desirable to redefine
+% \cs{xfracHTMLfontsize} with a different em size.
+
+
+
+
+% \DescribeMacro{\sfrac} \oarg{instance} \marg{num} \oarg{sep} \marg{denom}
+%
+% A text-mode instance for the default font is provided below.
+% The numerator and denominator formats are adjusted to encase everything
+% in \acro{HTML} tags. \cs{scalebox} is made null inside the numerator and
+% denominator, since the \acro{HTML} tags should not be scaled, and we do not
+% want to introduce additional \acro{HTML} tags for scaling.
+%
+% In math mode, which will appear inside a \env{lateximage}, no adjustments
+% are necessary.
+
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+
+% ^^A \begin{macro}{\xfracHTMLfontsize}
+% \changes{v0.19}{2016/06/06}{Added.}
+% \index{font>size --- xfrac}
+% User-redefinable macro which controls the font size of the fraction.
+% \begin{macrocode}
+\newcommand*{\xfracHTMLfontsize}{.6em}
+% \end{macrocode}
+% ^^A \end{macro}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+
+% A span for a small font, used in the numerator and denominator:
+% \margintag{font size}
+% \begin{macrocode}
+\newcommand*{\LWR at htmlsmallfontstart}{%
+\LWR at htmltagc{span style="font-size:\xfracHTMLfontsize"{}}%
+\LWR at nestspan%
+%
+}
+
+\newcommand*{\LWR at htmlsmallfontend}{%
+\LWR at htmltagc{/span}%
+\endLWR at nestspan%
+}
+% \end{macrocode}
+% A nullified \cs{scalebox} command, to avoid introducing \acro{HTML} scaling tags:
+% \margintag{\cs{scalebox}}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR at noscalebox}{m o m}{#3}
+% \end{macrocode}
+
+% Instances of \pkg{xfrac} for various font choices:
+% \margintag{instances}
+%
+% Produce \acro{HTML} tags for a small superscript numerator and
+% a small (non-subscript) denominator.
+%
+% Scaling is turned off so that \cmds{pdftotext} correctly reads the result.
+%
+% \changes{v0.16}{2016/04/07}{xfrac: Adjusted for the use of any font:}
+% \begin{macrocode}
+\DeclareInstance{xfrac}{default}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+% \end{macrocode}
+% For |pdftotext|, do not scale the text:
+% \begin{macrocode}
+scaling = false
+}
+\DeclareInstance{xfrac}{lmr}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+% \end{macrocode}
+% For |pdftotext|, do not scale the text:
+% \begin{macrocode}
+scaling = false
+}
+\DeclareInstance{xfrac}{lmss}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+% \end{macrocode}
+% For |pdftotext|, do not scale the text:
+% \begin{macrocode}
+scaling = false
+}
+\DeclareInstance{xfrac}{lmtt}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+% \end{macrocode}
+% For |pdftotext|, do not scale the text:
+% \begin{macrocode}
+scaling = false
+}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+% \iffalse
+%</xfrac>
+% \fi
+
+
+
+
+
+
+
+
+
+
+
+% \clearpage
+% \renewcommand*{\partname}{}
+% \renewcommand*{\thepart}{}
+% \part{Change History and Index}
+% \label{sec:changehistory}
+%
+% \pagestyle{plain}
+%
+% \Finale
+
+
+
+
+
+\endinput
+
+
+
+
+
Added: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins (rev 0)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.ins 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,92 @@
+%% lwarp.ins
+%% Copyright 2016 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.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Brian Dunn.
+%%
+%% This work consists of the files lwarp.dtx and lwarp.ins
+%% and the derived file lwarp.sty.
+\input docstrip.tex
+\keepsilent
+%% \usedir{tex/latex/ package }
+\preamble
+This is a generated file.
+Copyright 2016 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.
+\endpreamble
+\askforoverwritefalse
+\generate{\file{lwarp.sty}{\from{lwarp.dtx}{package}}}
+\generate{\file{lwarp-newproject.sty}{\from{lwarp.dtx}{lwarp-newproject}}}
+\generate{\file{lwarp-afterpage.sty}{\from{lwarp.dtx}{afterpage}}}
+\generate{\file{lwarp-algorithmicx.sty}{\from{lwarp.dtx}{algorithmicx}}}
+\generate{\file{lwarp-alltt.sty}{\from{lwarp.dtx}{alltt}}}
+\generate{\file{lwarp-bookmark.sty}{\from{lwarp.dtx}{bookmark}}}
+\generate{\file{lwarp-booktabs.sty}{\from{lwarp.dtx}{booktabs}}}
+\generate{\file{lwarp-draftwatermark.sty}{\from{lwarp.dtx}{draftwatermark}}}
+\generate{\file{lwarp-epigraph.sty}{\from{lwarp.dtx}{epigraph}}}
+\generate{\file{lwarp-eso-pic.sty}{\from{lwarp.dtx}{eso-pic}}}
+\generate{\file{lwarp-everypage.sty}{\from{lwarp.dtx}{everypage}}}
+\generate{\file{lwarp-extramarks.sty}{\from{lwarp.dtx}{extramarks}}}
+\generate{\file{lwarp-fancyhdr.sty}{\from{lwarp.dtx}{fancyhdr}}}
+\generate{\file{lwarp-float.sty}{\from{lwarp.dtx}{float}}}
+\generate{\file{lwarp-floatrow.sty}{\from{lwarp.dtx}{floatrow}}}
+\generate{\file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}}}
+\generate{\file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}}}
+\generate{\file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}}}
+\generate{\file{lwarp-hyperref.sty}{\from{lwarp.dtx}{hyperref}}}
+\generate{\file{lwarp-keyfloat.sty}{\from{lwarp.dtx}{keyfloat}}}
+\generate{\file{lwarp-letterspace.sty}{\from{lwarp.dtx}{letterspace}}}
+\generate{\file{lwarp-listings.sty}{\from{lwarp.dtx}{listings}}}
+\generate{\file{lwarp-longtable.sty}{\from{lwarp.dtx}{longtable}}}
+\generate{\file{lwarp-ltcaption.sty}{\from{lwarp.dtx}{ltcaption}}}
+\generate{\file{lwarp-mdframed.sty}{\from{lwarp.dtx}{mdframed}}}
+\generate{\file{lwarp-microtype.sty}{\from{lwarp.dtx}{microtype}}}
+\generate{\file{lwarp-multicol.sty}{\from{lwarp.dtx}{multicol}}}
+\generate{\file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}}}
+\generate{\file{lwarp-needspace.sty}{\from{lwarp.dtx}{needspace}}}
+\generate{\file{lwarp-nowidow.sty}{\from{lwarp.dtx}{nowidow}}}
+\generate{\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}}}
+\generate{\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}}}
+\generate{\file{lwarp-ragged2e.sty}{\from{lwarp.dtx}{ragged2e}}}
+\generate{\file{lwarp-rotating.sty}{\from{lwarp.dtx}{rotating}}}
+\generate{\file{lwarp-setspace.sty}{\from{lwarp.dtx}{setspace}}}
+\generate{\file{lwarp-textpos.sty}{\from{lwarp.dtx}{textpos}}}
+\generate{\file{lwarp-threeparttable.sty}{\from{lwarp.dtx}{threeparttable}}}
+\generate{\file{lwarp-titleps.sty}{\from{lwarp.dtx}{titleps}}}
+\generate{\file{lwarp-titlesec.sty}{\from{lwarp.dtx}{titlesec}}}
+\generate{\file{lwarp-titletoc.sty}{\from{lwarp.dtx}{titletoc}}}
+\generate{\file{lwarp-tocloft.sty}{\from{lwarp.dtx}{tocloft}}}
+\generate{\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}}}
+\generate{\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}}}
+\generate{\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}}}
+\generate{\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}}}
+\generate{\file{lwarp-xfrac.sty}{\from{lwarp.dtx}{xfrac}}}
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space lwarp.sty, lwarp-*.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file lwarp.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+\endbatchfile
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-afterpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-afterpage.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-afterpage.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,104 @@
+%%
+%% This is file `lwarp-afterpage.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `afterpage')
+%% This is a generated file.
+%% Copyright 2016 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{afterpage}
+
+\newcommand{\afterpage}[1]{#1}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-afterpage.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,120 @@
+%%
+%% This is file `lwarp-algorithmicx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `algorithmicx')
+%% This is a generated file.
+%% Copyright 2016 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{algorithmicx}
+
+\begin{warpHTML}
+
+\AtBeginEnvironment{algorithmic}{%
+\let\origALG at doentity\ALG at doentity%
+\renewcommand*{\ALG at doentity}{%
+\origALG at doentity%
+\uselengthunit{PT}%
+\LWR at htmltagc{%
+span style="width:\rndprintlength{\ALG at thistlm}; display:inline-block;"%
+}%
+\LWR at htmltagc{/span}%
+}%
+\let\origComment\Comment%
+\renewcommand{\Comment}[1]{\InlineClass{floatright}{\origComment{#1}}}%
+}
+
+\end{warpHTML}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-algorithmicx.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,107 @@
+%%
+%% This is file `lwarp-alltt.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `alltt')
+%% This is a generated file.
+%% Copyright 2016 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{alltt}
+
+\AfterEndPreamble{
+\AtBeginEnvironment{alltt}{\LWR at atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}}
+\AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-alltt.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bookmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bookmark.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-bookmark.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,110 @@
+%%
+%% This is file `lwarp-bookmark.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `bookmark')
+%% This is a generated file.
+%% Copyright 2016 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{bookmark}
+
+\newcommand*{\bookmarksetup}[1]{}
+\newcommand*{\bookmarksetupnext}[1]{}
+\newcommand*{\bookmark}[2][]{}
+\newcommand*{\bookmarkdefinestyle}[2]{}
+\newcommand*{\bookmarkget}[1]{}
+\newcommand{\BookmarkAtEnd}[1]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-bookmark.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-booktabs.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,106 @@
+%%
+%% This is file `lwarp-booktabs.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `booktabs')
+%% This is a generated file.
+%% Copyright 2016 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{booktabs}
+\newcommand*{\addlinespace}[1]{}
+\newcommand*{\morecmidrules}{}
+\newcommand*{\specialrule}[3]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-booktabs.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-draftwatermark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-draftwatermark.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-draftwatermark.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,113 @@
+%%
+%% This is file `lwarp-draftwatermark.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `draftwatermark')
+%% This is a generated file.
+%% Copyright 2016 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{draftwatermark}
+
+
+\newcommand{\SetWatermarkAngle}[1]{}
+\newcommand{\SetWatermarkColor}[1]{}
+\newcommand{\SetWatermarkLightness}[1]{}
+\newcommand{\SetWatermarkFontSize}[1]{}
+\newcommand{\SetWatermarkScale}[1]{}
+\newcommand{\SetWatermarkHorCenter}[1]{}
+\newcommand{\SetWatermarkVertCenter}[1]{}
+\newcommand{\SetWatermarkText}[1]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-draftwatermark.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,139 @@
+%%
+%% This is file `lwarp-epigraph.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `epigraph')
+%% This is a generated file.
+%% Copyright 2016 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{epigraph}
+
+
+\newcommand{\qitem}[2]
+{
+\begin{BlockClass}{qitem}
+#1
+\begin{BlockClass}{epigraphsource}
+#2
+\end{BlockClass}
+\end{BlockClass}
+}
+
+\newcommand{\epigraph}[2]
+{
+\begin{BlockClass}{epigraph}
+\qitem{#1}{#2}
+\end{BlockClass}
+}
+
+\newenvironment*{epigraphs}
+{\BlockClass{epigraph}}
+{\endBlockClass}
+\newlength{\epigraphwidth}
+\setlength{\epigraphwidth}{.5\linewidth}
+\newenvironment*{flushepinormal}{}{}
+\newcommand{\textflush}[1]{flushepinormal}
+\newcommand{\epigraphflush}[1]{flushright}
+\newcommand{\sourceflush}[1]{flushright}
+\newcommand*{\epigraphsize}{\small}
+\newlength{\epigraphrule}
+\newlength{\beforeepigraphskip}
+\newlength{\afterepigraphskip}
+\newcommand{\epigraphhead}[2][0]{#2}
+\newcommand{\dropchapter}[1]{}
+\newcommand*{\undodrop}{}
+\newcommand{\cleartoevenpage}[1][]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-epigraph.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-eso-pic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-eso-pic.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-eso-pic.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,121 @@
+%%
+%% This is file `lwarp-eso-pic.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `eso-pic')
+%% This is a generated file.
+%% Copyright 2016 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{eso-pic}
+
+\newcommand*{\LenToUnit}{}
+\newcommand{\AtPageUpperLeft}[1]{}
+\newcommand{\AtPageLowerLeft}[1]{}
+\newcommand{\AtPageCenter}[1]{}
+\newcommand{\AtStockLowerLeft}[1]{}
+\newcommand{\AtStockUpperLeft}[1]{}
+\newcommand{\AtStockCenter}[1]{}
+\newcommand{\AtTextUpperLeft}[1]{}
+\newcommand{\AtTextLowerLeft}[1]{}
+\newcommand{\AtTextCenter}[1]{}
+\NewDocumentCommand{\AddToShipoutPictureBG}{s +m}{}
+\let\AddToShipoutPicture\AddToShipoutPictureBG
+\NewDocumentCommand{\AddToShipoutPictureFG}{s +m}{}
+\newcommand*{\ClearShipoutPictureBG}{}
+\newcommand*{\ClearShipoutPicture}{}
+\newcommand*{\ClearShipoutPictureFG}{}
+\newcommand{\gridSetup}[6][]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-eso-pic.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-everypage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-everypage.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-everypage.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,106 @@
+%%
+%% This is file `lwarp-everypage.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `everypage')
+%% This is a generated file.
+%% Copyright 2016 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{everypage}
+
+\newcommand*{\AddEverypageHook}[1]{}
+\newcommand*{\AddThispageHook}[1]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-everypage.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-extramarks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-extramarks.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-extramarks.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,114 @@
+%%
+%% This is file `lwarp-extramarks.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `extramarks')
+%% This is a generated file.
+%% Copyright 2016 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{extramarks}
+
+\newcommand*{\extramarks}[2]{}
+\newcommand*{\firstleftxmark}{}
+\newcommand*{\lastleftxmark}{}
+\newcommand*{\firstrightxmark}{}
+\newcommand*{\lastrightxmark}{}
+\newcommand*{\firstxmark}{}
+\newcommand*{\lastxmark}{}
+\newcommand*{\topxmark}{}
+\newcommand*{\topleftxmark}{}
+\newcommand*{\firstleftmark}{}
+\newcommand*{\lastrightmark}{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-extramarks.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,121 @@
+%%
+%% This is file `lwarp-fancyhdr.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `fancyhdr')
+%% This is a generated file.
+%% Copyright 2016 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{fancyhdr}
+
+\newcommand*{\fancyhead}[2][]{}
+\newcommand*{\fancyfoot}[2][]{}
+\newcommand*{\fancyhf}[2][]{}
+\newcommand*{\fancypagestyle}[2]{}
+\newcommand*{\lhead}[1]{}
+\newcommand*{\chead}[1]{}
+\newcommand*{\rhead}[1]{}
+\newcommand*{\lfoot}[1]{}
+\newcommand*{\cfoot}[1]{}
+\newcommand*{\rfoot}[1]{}
+\newcommand*{\headrulewidth}{}
+\newcommand*{\footrulewidth}{}
+\newcommand*{\fancyheadoffset}[2][]{}
+\newcommand*{\fancyfootoffset}[2][]{}
+\newcommand*{\fancyhfoffset}[2][]{}
+\newcommand*{\iffloatpage}[2]{#2}
+\newcommand*{\ifftopfloat}[2]{#2}
+\newcommand*{\iffbotfloat}[2]{#2}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-fancyhdr.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,127 @@
+%%
+%% This is file `lwarp-float.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `float')
+%% This is a generated file.
+%% Copyright 2016 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{float}[2016/03/04]
+
+
+\NewDocumentCommand{\newfloat}{m m m o}{%
+\IfValueTF{#4}
+{
+\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}
+}
+{\DeclareFloatingEnvironment[fileext=#3]{#1}}
+\cslet{listof#1s}\relax
+\cslet{listof#1es}\relax
+}
+
+\NewDocumentCommand{\floatname}{m +m}{%
+\SetupFloatingEnvironment{#1}{name=#2}%
+}
+
+\newcommand*{\floatplacement}[2]{%
+\SetupFloatingEnvironment{#1}{placement=#2}%
+}
+
+\newcommand{\floatstyle}[1]{%
+}
+
+\NewDocumentCommand{\restylefloat}{s m}{%
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-float.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,232 @@
+%%
+%% This is file `lwarp-floatrow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `floatrow')
+%% This is a generated file.
+%% Copyright 2016 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{floatrow}
+
+
+
+\NewDocumentCommand{\floatbox}{o m o o o +m +m}{%
+\ifbool{LWR at insubfloatrow}
+{
+\IfValueTF{#3}
+{\@nameuse{sub#2}{#3}}
+{\@nameuse{sub#2}{\linewidth}}
+}
+{
+\@nameuse{#2}
+}
+#6
+
+#7
+\ifbool{LWR at insubfloatrow}
+{\@nameuse{endsub#2}}
+{\@nameuse{end#2}}
+}
+
+\newcommand*{\nocapbeside}{}
+\newcommand*{\capbeside}{}
+\newcommand*{\captop}{}
+\newlength{\FBwidth}
+\setlength{\FBwidth}{.3\linewidth}
+\newlength{\FBheight}
+\setlength{\FBheight}{2in}
+\newcommand*{\useFCwidth}{}
+\newcommand{\floatsetup}[2][]{}
+\newcommand{\thisfloatsetup}[1]{}
+\newcommand{\clearfloatsetup}[1]{}
+\newcommand*{\killfloatstyle}{}
+
+\NewDocumentCommand{\newfloatcommand}{m m o o}{%
+\@namedef{#1}{
+\floatbox{#2}
+}
+}
+
+\NewDocumentCommand{\renewfloatcommand}{m m o o}{%
+\@namedef{#1}{%
+\floatbox{#2}
+}
+}
+
+\newfloatcommand{ffigbox}{figure}[\nocapbeside][]
+\newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
+\newfloatcommand{fcapside}{figure}[\capbeside][]
+
+\newenvironment*{floatrow}[1][2]
+{
+\BlockClass{floatrow}
+\booltrue{LWR at infloatrow}
+\setlength{\linewidth}{6in/#1}
+}
+{
+\boolfalse{LWR at infloatrow}
+\endBlockClass
+}
+\newcommand*{\LWR at frowkeyplacement}{}
+\newcommand*{\LWR at frowkeyname}{}
+\newcommand*{\LWR at frowkeyfileext}{}
+\newcommand*{\LWR at frowkeywithin}{}
+\newcommand*{\LWR at frowkeycapstyle}{}
+
+\define at key{frowkeys}{placement}{}%
+\define at key{frowkeys}{name}{\renewcommand{\LWR at frowkeyname}{#1}}%
+\define at key{frowkeys}{fileext}{\renewcommand{\LWR at frowkeyfileext}{#1}}%
+\define at key{frowkeys}{within}{\renewcommand{\LWR at frowkeywithin}{#1}}%
+\define at key{frowkeys}{relatedcapstyle}{}%
+
+\newcommand*{\DeclareNewFloatType}[2]{%
+\renewcommand*{\LWR at frowkeyplacement}{}
+\renewcommand*{\LWR at frowkeyname}{}
+\renewcommand*{\LWR at frowkeyfileext}{}
+\renewcommand*{\LWR at frowkeywithin}{}
+\renewcommand*{\LWR at frowkeycapstyle}{}
+\LWR at traceinfo{about to setkeys frowkeys}%
+\setkeys{frowkeys}{#2}%
+\LWR at traceinfo{finished setkeys frowkeys}%
+\ifthenelse{\equal{\LWR at frowkeywithin}{}}
+{
+\LWR at traceinfo{about to newfloat #1 \LWR at frowkeyplacement\ \LWR at frowkeyfileext}%
+\newfloat{#1}{\LWR at frowkeyplacement}{\LWR at frowkeyfileext}
+}%
+{%
+\LWR at traceinfo{about to newfloat #1\ \LWR at frowkeyplacement\ \LWR at frowkeyfileext\ \LWR at frowkeywithin}%
+\newfloat{#1}{\LWR at frowkeyplacement}%
+{\LWR at frowkeyfileext}[\LWR at frowkeywithin]%
+\typeout{*** finished newfloat #1}
+}%
+\ifthenelse{\equal{\LWR at frowkeyname}{}}
+{}
+{\floatname{#1}{\LWR at frowkeyname}}%
+}
+
+\newcommand{\buildFBBOX}[2]{}
+\newcommand*{\CenterFloatBoxes}{}
+\newcommand*{\TopFloatBoxes}{}
+\newcommand*{\BottomFloatBoxes}{}
+\newcommand*{\PlainFloatBoxes}{}
+
+\newcommand{\capsubrowsettings}{}
+
+\NewDocumentCommand{\RawFloats}{o o}{}
+
+\newcommand{\RawCaption}[1]{#1}
+
+\NewDocumentCommand{\floatfoot}{s +m}{%
+\begin{BlockClass}{floatfoot}
+#2
+\end{BlockClass}
+}
+
+\newbool{LWR at insubfloatrow}
+\boolfalse{LWR at insubfloatrow}
+
+\newenvironment*{subfloatrow}[1][2]
+{
+\BlockClass{floatrow}
+\begingroup
+\booltrue{LWR at insubfloatrow}
+}
+{
+\endgroup
+\endBlockClass
+\boolfalse{LWR at insubfloatrow}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-floatrow.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-geometry.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,103 @@
+%%
+%% This is file `lwarp-geometry.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `geometry')
+%% This is a generated file.
+%% Copyright 2016 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{geometry}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-geometry.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,108 @@
+%%
+%% This is file `lwarp-graphics.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `graphics')
+%% This is a generated file.
+%% Copyright 2016 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\PackageError{lwarp-graphics}
+{The graphics package is not supported by
+the lwarp package's HTML conversion.
+Please use graphicx instead. \protect\usepackage{graphicx}}
+{Graphicx requires a different syntax but is more flexible,
+and it is emulated by lwarp.}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-graphics.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphicx.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,103 @@
+%%
+%% This is file `lwarp-graphicx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `graphicx')
+%% This is a generated file.
+%% Copyright 2016 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{graphicx}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-graphicx.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,208 @@
+%%
+%% This is file `lwarp-hyperref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `hyperref')
+%% This is a generated file.
+%% Copyright 2016 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\typeout{Using the lwarp html version of package `hyperref' — discarding options.}
+\typeout{ Are not using ProvidesPackage, so that other packages}
+\typeout{ do not attempt to patch lwarp's version of `hyperref'.}
+\DeclareOption*{}
+\ProcessOptions\relax
+
+\newcommand*{\hypersetup}[1]{}
+\newcommand*{\hyperbaseurl}[1]{}
+
+\NewDocumentCommand{\LWR at hyperimageb}{m +m}{%
+\LWR at htmltag{img src="#1" alt="#2" class="hyperimage"{}}%
+\endgroup%
+\LWR at ensuredoingapar%
+}
+
+\newcommand{\hyperimage}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\LWR at hyperimageb%
+}
+\NewDocumentCommand{\hyperdef}{m m +m}{%
+\LWR at ensuredoingapar%
+\LWR at subsublabel{#1.#2}%
+#3%
+}
+\NewDocumentCommand{\LWR at hyperrefb}{m m m +m}{%
+\LWR at htmltag{a href="#1\LWR at hashmark#2.#3"}%
+#4%
+\LWR at htmltag{/a}%
+\endgroup%
+}
+
+\NewDocumentCommand{\LWR at hyperrefc}{O{label} +m}{
+\LWR at startref{#1}%
+#2%
+\LWR at htmltag{/a}%
+\endgroup%
+}
+
+\newcommand{\hyperref}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\@ifnextchar[\LWR at hyperrefc\LWR at hyperrefb%
+}
+
+\NewDocumentCommand{\hypertarget}{m +m}{%
+\label{#1}%
+#2%
+}
+
+\NewDocumentCommand{\hyperlink}{m +m}{%
+\hyperref[#1]{#2}%
+}
+
+\NewDocumentCommand{\autoref}{s m}{%
+\IfBooleanTF{#1}{\ref{#2}}{\cref{#2}}%
+}
+\NewDocumentCommand{\autopageref}{s m}{%
+\IfBooleanTF{#1}{\cpageref{#2}}{\cref{#2}}%
+}
+
+\newcommand{\pdfstringdef}[2]{}
+
+\newcommand{\pdfbookmark}[3][]{}
+
+\newcommand{\currentpdfbookmark}[2]{}
+
+\newcommand{\subpdfbookmark}[2]{}
+
+\newcommand{\belowpdfbookmark}[2]{}
+
+\newcommand{\texorpdfstring}[2]{#2}
+
+\def\hypercalcbp#1{%
+\strip at pt\dimexpr 0.99626401\dimexpr(#1)\relax\relax
+}%
+
+\newcommand{\Acrobatmenu}[2]{}
+
+\newcommand*{\TextField}[2][]{}
+
+\newcommand*{\CheckBox}[2][]{}
+
+\newcommand{\ChoiceMenu}[3][]{}
+
+\newcommand*{\PushButton}[2][]{}
+
+\newcommand*{\Submit}[2][]{}
+
+\newcommand*{\Reset}[2][]{}
+
+\newcommand*{\LayoutTextField}[2]{}
+
+\newcommand*{\LayoutChoiceField}[2]{}
+
+\newcommand*{\LayoutCheckField}[2]{}
+
+\newcommand*{\MakeRadioField}[2]{}
+
+\newcommand*{\MakeCheckField}[2]{}
+
+\newcommand*{\MakeTextField}[2]{}
+
+\newcommand*{\MakeChoiceField}[2]{}
+
+\newcommand{\MakeFieldButton}[1]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-hyperref.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,131 @@
+%%
+%% This is file `lwarp-keyfloat.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `keyfloat')
+%% This is a generated file.
+%% Copyright 2016 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{keyfloat}
+
+\AtBeginDocument{
+
+
+\let\KFLT at boxinner\relax
+\let\endKFLT at boxinner\relax
+
+\NewEnviron{KFLT at boxinner}
+{%
+\LWR at traceinfo{kflt at boxinner}%
+\LWR at stoppars%
+\KFLT at frame{\BODY}%
+\LWR at startpars%
+\LWR at traceinfo{ended kflt at boxinner}%
+}
+
+\RenewDocumentEnvironment{KFLT at marginfloat}{O{-1.2ex} m}
+{% start
+\LWR at maybeincthisfloat%
+\LWR at stoppars%
+\LWR at htmltag{div class="marginblock" id="autofloat-\arabic{LWR at thisfloat}"}
+\LWR at startpars%
+\captionsetup{type=#2}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+}% AtBeginDocument
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-keyfloat.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-letterspace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-letterspace.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-letterspace.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,108 @@
+%%
+%% This is file `lwarp-letterspace.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `letterspace')
+%% This is a generated file.
+%% Copyright 2016 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{letterspace}
+
+\newcommand*\lsstyle{}
+\newcommand\textls[2][]{}
+\def\textls#1#{}
+\newcommand*\lslig[1]{#1}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-letterspace.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,207 @@
+%%
+%% This is file `lwarp-listings.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `listings')
+%% This is a generated file.
+%% Copyright 2016 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\begin{warpHTML}
+\LWR at ProvidesPackagePass{listings}
+
+\let\LWR at origlst@Init\lst at Init
+\let\LWR at origlst@DeInit\lst at DeInit
+
+\let\LWR at origlsthkEveryPar\lsthk at EveryPar
+
+\renewcommand{\l at lstlisting}[2]{\hypertocfloat{1}{toclstlisting}{#1}{#2}}
+\renewcommand{\lst at Init}[1]{%
+\LWR at traceinfo{lst at Init}%
+\renewcommand*{\@captype}{lstlisting}%
+\LWR at origlst@Init{#1}%
+\LWR at traceinfo{finished origlst at Init}%
+\lst at ifdisplaystyle%
+\LWR at traceinfo{About to create verbatim.}%
+\let\lsthk at EveryPar\relax%
+\LWR at atbeginverbatim{programlisting}%
+
+\let\lsthk at EveryPar\LWR at origlsthkEveryPar%
+\else%
+\ifbool{LWR at verbtags}{\LWR at htmltag{span class="inlineprogramlisting"}}{}%
+\fi%
+}
+\renewcommand*{\lst at DeInit}{%
+\lst at ifdisplaystyle%
+\let\lsthk at EveryPar\relax%
+
+\LWR at afterendverbatim%
+\let\lsthk at EveryPar\LWR at origlsthkEveryPar%
+\else%
+\ifbool{LWR at verbtags}{\noindent\LWR at htmltag{/span}}{}%
+\fi%
+\LWR at origlst@DeInit%
+}
+\def\lst at MakeCaption#1{%
+\LWR at traceinfo{MAKING CAPTION at #1}%
+ \lst at ifdisplaystyle
+\LWR at traceinfo{making a listings display caption}%
+ \ifx #1t%
+ \ifx\lst@@caption\@empty\expandafter\lst at HRefStepCounter \else
+ \expandafter\refstepcounter
+ \fi {lstlisting}%
+\LWR at traceinfo{About to assign label: !\lst at label!}%
+\LWR at traceinfo{Finished assigning the label.}%
+ \let\lst at arg\lst at intname \lst at ReplaceIn\lst at arg\lst at filenamerpl
+ \global\let\lst at name\lst at arg \global\let\lstname\lst at name
+ \lst at ifnolol\else
+ \ifx\lst@@caption\@empty
+ \ifx\lst at caption\@empty
+ \ifx\lst at intname\@empty \else \def\lst at temp{ }%
+ \ifx\lst at intname\lst at temp \else
+\LWR at traceinfo{addcontents lst at name: -\lst at name-}%
+ \fi\fi
+ \fi
+ \else
+\LWR at traceinfo{addcontents lst@@caption: -\lst@@caption-}%
+ \addcontentsline{lol}{lstlisting}%
+ {\protect\numberline{\thelstlisting}{\protect\ignorespaces \lst@@caption \protect\relax}}%
+ \fi
+ \fi
+ \fi
+ \ifx\lst at caption\@empty\else
+\LWR at traceinfo{lst at caption not empty-}%
+ \lst at IfSubstring #1\lst at captionpos
+ {\begingroup
+\LWR at traceinfo{at the selected position}%
+ \ifx\lst at title\@empty
+ \lst at makecaption\fnum at lstlisting{\ignorespaces \lst at caption}
+ \else
+\LWR at traceinfo{Making title: \lst at title}%
+\begin{BlockClass}{lstlistingtitle}% lwarp
+\lst at maketitle\lst at title% lwarp
+\end{BlockClass}% lwarp
+ \fi
+\LWR at traceinfo{About to assign label: !\lst at label!}%
+ \ifx\lst at label\@empty\else
+\leavevmode% gets rid of bad space factor error
+\GetTitleStringExpand{\lst at caption}%
+\edef\LWR at lntemp{\GetTitleStringResult}%
+\edef\@currentlabelname{\detokenize\expandafter{\LWR at lntemp}}%
+\label{\lst at label}\fi
+\LWR at traceinfo{Finished assigning the label.}%
+ \endgroup}{}%
+ \fi
+\LWR at traceinfo{end of making a listings display caption}%
+ \else
+\LWR at traceinfo{INLINE}%
+ \fi
+\LWR at traceinfo{DONE WITH CAPTION at #1}%
+}
+\lst at Key{numbers}{none}{%
+ \let\lst at PlaceNumber\@empty
+ \lstKV at SwitchCases{#1}%
+ {none&\\%
+ left&\def\lst at PlaceNumber{%
+\LWR at orignormalfont%
+\lst at numberstyle{\thelstnumber}\kern\lst at numbersep%
+}
+\\%
+ right&\def\lst at PlaceNumber{\rlap{\LWR at orignormalfont
+ \kern\VerbatimHTMLWidth \kern\lst at numbersep
+ \lst at numberstyle{\thelstnumber}}}%
+ }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}}
+
+\end{warpHTML}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-listings.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,144 @@
+%%
+%% This is file `lwarp-longtable.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `longtable')
+%% This is a generated file.
+%% Copyright 2016 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{longtable}
+
+
+
+\newenvironment{longtable*}[2][]{%
+\LWR at floatbegin{table}%
+\setcaptiontype{\LTcaptype}%
+\caption at setoptions{longtable}%
+\caption at setoptions{@longtable}%
+\caption at LT@setup%
+\booltrue{LWR at starredlongtable}%
+\let\captionlistentry\LWR at LTcaptionlistentry%
+\LWR at tabular{#2}
+}
+{\endLWR at tabular\LWR at floatend}
+
+\newenvironment{longtable}[2][]{%
+\LWR at floatbegin{table}%
+\setcaptiontype{\LTcaptype}%
+\caption at setoptions{longtable}%
+\caption at setoptions{@longtable}%
+\caption at LT@setup%
+\refstepcounter{\LTcaptype}%
+\let\captionlistentry\LWR at LTcaptionlistentry%
+\LWR at tabular{#2}
+}
+{\endLWR at tabular\LWR at floatend}
+
+
+\newcounter{LTchunksize}
+\def\endhead{\LWR at tabularendofline}% throws away options //[dim] and //*
+\def\endfirsthead{\LWR at tabularendofline}
+\def\endfoot{\LWR at tabularendofline}
+\def\endlastfoot{\LWR at tabularendofline}
+\newcommand\tabularnewline{\LWR at tabularendofline}
+\newcommand{\setlongtables}{}% Obsolete command, does nothing.
+\newlength{\LTleft}
+\newlength{\LTright}
+\newlength{\LTpre}
+\newlength{\LTpost}
+\newlength{\LTcapwidth}
+\renewcommand*{\kill}{\LWR at tabularendofline}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-longtable.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,109 @@
+%%
+%% This is file `lwarp-ltcaption.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `ltcaption')
+%% This is a generated file.
+%% Copyright 2016 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{ltcaption}
+
+\newlength{\LTcapskip}
+\newlength{\LTcapleft}
+\newlength{\LTcapright}
+\newcommand*{\LTcapmarginsfalse}{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-ltcaption.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,261 @@
+%%
+%% This is file `lwarp-mdframed.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `mdframed')
+%% This is a generated file.
+%% Copyright 2016 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{mdframed}
+
+\LWR at origRequirePackage{amsthm}
+\LWR at origRequirePackage[framemethod=none]{mdframed}
+\mdfsetup{
+startcode={\LWR at mdframedstart},
+endcode={\LWR at mdframedend},
+startinnercode={\LWR at startpars},
+endinnercode={\LWR at stoppars},
+}
+\newcommand*{\LWR at mdfprintcolor}[1]{%
+\convertcolorspec{named}{\csuse{mdf@#1}}{HTML}\LWR at tempcolor%
+\#\LWR at tempcolor
+}
+
+\newcommand*{\LWR at mdfprintlength}[1]{%
+\rndprintlength{\csuse{mdf@#1 at length}}
+}
+
+\newcommand*{\LWR at mdframedstart}{%
+\LWR at stoppars%
+\uselengthunit{PT}%
+\LWR at htmltagc{div class="\LWR at mdthisenv" \LWR at orignewline
+style=" \LWR at orignewline
+background: \LWR at mdfprintcolor{backgroundcolor} ; \LWR at orignewline
+border: \LWR at mdfprintlength{linewidth} solid
+\LWR at mdfprintcolor{linecolor} ; \LWR at orignewline
+border-radius: \LWR at mdfprintlength{roundcorner} ; \LWR at orignewline
+\ifbool{mdf at shadow}{%
+box-shadow:
+\LWR at mdfprintlength{shadowsize}
+\LWR at mdfprintlength{shadowsize}
+\LWR at mdfprintlength{shadowsize}
+\LWR at mdfprintcolor{shadowcolor} ;
+}
+{box-shadow: none ;}
+\LWR at orignewline
+"}
+\let\hspace\LWR at orighspace%
+\let\rule\LWR at origrule%
+}
+\newcommand*{\LWR at mdframedend}{
+\LWR at htmldivclassend{\LWR at mdthisenv}
+\gdef\LWR at mdthisenv{mdframed}
+\LWR at startpars%
+}
+\let\LWR at origmdfframedtitleenv\mdfframedtitleenv
+
+\newlength{\LWR at titleroundcorner}
+
+\renewrobustcmd\mdfframedtitleenv[1]{%
+\LWR at origmdfframedtitleenv{%
+\uselengthunit{PT}%
+\LWR at htmltagc{span class="mdframedtitle" \LWR at orignewline
+style=" \LWR at orignewline
+background:
+\LWR at mdfprintcolor{frametitlebackgroundcolor}
+; \LWR at orignewline
+\ifbool{mdf at frametitlerule}{%
+border-bottom:
+\LWR at mdfprintlength{frametitlerulewidth}
+solid
+\LWR at mdfprintcolor{frametitlerulecolor}
+; \LWR at orignewline
+}{}%
+border-radius:
+\setlength{\LWR at titleroundcorner}
+{\maxof{\mdf at roundcorner@length-\mdf at linewidth@length}{0pt}}
+\rndprintlength{\LWR at titleroundcorner}
+\rndprintlength{\LWR at titleroundcorner}
+0pt 0pt
+\LWR at orignewline
+" \LWR at orignewline
+}% span
+\begin{LWR at nestspan}%
+#1%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+}
+\NewDocumentCommand{\LWR at mdfsubtitlecommon}{m o m}
+{% the following empty line is required
+
+\let\par\LWR at origpar%
+\LWR at htmltagc{span class="mdframed#1title"
+style=" \LWR at orignewline
+background:
+\LWR at mdfprintcolor{#1titlebackgroundcolor}
+; \LWR at orignewline
+\ifbool{mdf@#1titleaboveline}{%
+border-top:
+\LWR at mdfprintlength{#1titleabovelinewidth}
+solid
+\LWR at mdfprintcolor{#1titleabovelinecolor}
+; \LWR at orignewline
+}{}%
+\ifbool{mdf@#1titlebelowline}{%
+border-bottom:
+\LWR at mdfprintlength{#1titlebelowlinewidth}
+solid
+\LWR at mdfprintcolor{#1titlebelowlinecolor}
+; \LWR at orignewline
+}{}%
+"}% span
+\begin{LWR at nestspan}%
+\IfNoValueTF{#2}
+{\csuse{LWR at origmdf#1title}{#3}}%
+{\csuse{LWR at origmdf#1title}[#2]{#3}}%
+\LWR at htmltagc{/span}% the following empty line is required
+\end{LWR at nestspan}% must follow the /span or an extra <p> appears
+
+}
+\let\LWR at origmdfsubtitle\mdfsubtitle
+
+\newcommand*{\LWR at mdfsubtitle}{%
+\LWR at mdfsubtitlecommon{sub}%
+}
+\let\mdfsubtitle\LWR at mdfsubtitle
+\let\LWR at origmdfsubsubtitle\mdfsubsubtitle
+
+\newcommand*{\LWR at mdfsubsubtitle}{%
+\LWR at mdfsubtitlecommon{subsub}%
+}
+\let\mdfsubsubtitle\LWR at mdfsubsubtitle
+\newcommand*{\LWR at mdthisenv}{mdframed}
+\renewrobustcmd*\newmdenv[2][]{%
+\newenvironment{#2}%
+{%
+\mdfsetup{#1}%
+\renewcommand*{\LWR at mdthisenv}{md#2}%
+\begin{mdframed}%
+}
+{\end{mdframed}}%
+}
+\renewrobustcmd*{\surroundwithmdframed}[2][]{%
+\BeforeBeginEnvironment{#2}{%
+\renewcommand*{\LWR at mdthisenv}{md#2}%
+\begin{mdframed}[#1]}%
+\AfterEndEnvironment{#2}{\end{mdframed}}%
+}
+\let\LWR at origmdtheorem\mdtheorem
+
+\DeclareDocumentCommand{\LWR at mdtheorem}{O{} m o m o}{%
+\LWR at origmdtheorem[#1]{#2}[#3]{#4}[#5]%
+\BeforeBeginEnvironment{#2}{\renewcommand*{\LWR at mdthisenv}{md#2}}%
+}
+
+\let\mdtheorem\LWR at mdtheorem
+\DeclareDocumentCommand\newmdtheoremenv{O{} m o m o }{%
+ \ifboolexpr{ test {\IfNoValueTF {#3}} and test {\IfNoValueTF {#5}} }%
+ {\newtheorem{#2}{#4}}{%
+ \IfValueTF{#3}{\newtheorem{#2}[#3]{#4}}{}%
+ \IfValueTF{#5}{\newtheorem{#2}{#4}[#5]}{}%
+ }%
+\BeforeBeginEnvironment{#2}{%
+\renewcommand*{\LWR at mdthisenv}{md#2}%
+\begin{mdframed}[#1]}%
+\AfterEndEnvironment{#2}{%
+\end{mdframed}}%
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-mdframed.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-microtype.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,135 @@
+%%
+%% This is file `lwarp-microtype.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `microtype')
+%% This is a generated file.
+%% Copyright 2016 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{microtype}
+
+\newcommand*\DeclareMicrotypeSet[3][]{}
+\newcommand*\UseMicrotypeSet[2][]{}
+\newcommand*\DeclareMicrotypeSetDefault[2][]{}
+\newcommand*\SetProtrusion[3][]{}
+\newcommand*\SetExpansion[3][]{}
+\newcommand*\SetTracking[3][]{}
+\newcommand*\SetExtraKerning[3][]{}
+\newcommand*\SetExtraSpacing[3][]{}
+\newcommand*\DisableLigatures[2][]{}
+\newcommand*\DeclareCharacterInheritance[3][]{}
+\newcommand*\DeclareMicrotypeVariants[1]{}
+\newcommand*\DeclareMicrotypeAlias[2]{}
+\newcommand*\LoadMicrotypeFile[1]{}
+\newcommand*\DeclareMicrotypeBabelHook[2]{}
+\newcommand*\microtypesetup[1]{}
+\newcommand*\microtypecontext[1]{}
+\newcommand*\textmicrotypecontext[2]{#2}
+\@ifpackageloaded{letterspace}{\let\MT at textls\relax}{%
+\newcommand*\lsstyle{}
+\newcommand\textls[2][]{}
+\def\textls#1#{}
+\newcommand*\lslig[1]{#1}
+}
+\def\DeclareMicrotypeSet#1#{\@gobbletwo}
+\def\DeclareMicrotypeVariants#1#{\@gobble}
+\@onlypreamble\DeclareMicrotypeSet
+\@onlypreamble\UseMicrotypeSet
+\@onlypreamble\DeclareMicrotypeSetDefault
+\@onlypreamble\DisableLigatures
+\@onlypreamble\DeclareMicrotypeVariants
+\@onlypreamble\DeclareMicrotypeBabelHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-microtype.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multicol.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,133 @@
+%%
+%% This is file `lwarp-multicol.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `multicol')
+%% This is a generated file.
+%% Copyright 2016 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{multicol}[2015/09/13]
+
+
+
+
+\begin{warpHTML}
+
+\NewDocumentEnvironment{multicols}{s m o}
+{\BlockClass{multicols}
+\IfValueTF{#3}{\begin{BlockClass}{multicolsheading}#3\end{BlockClass}}{}}
+{\endBlockClass}
+
+\newcommand*{\columnbreak}{}
+\newcommand*{\RLmulticolcolumns}{}
+\newcommand*{\LRmulticolcolumns}{}
+
+\newlength{\premulticols}
+\newlength{\postmulticols}
+\newlength{\multicolsep}
+\newlength{\multicolbaselineskip}
+\newlength{\multicoltolerance}
+\newlength{\multicolpretolerance}
+\newcommand*{\columnseprulecolor}{\normalcolor}
+\newcounter{columnbadness}
+\newcounter{finalcolumnbadness}
+\newcounter{collectmore}
+\newcounter{unbalance}
+\newlength{\multicolovershoot}
+\newlength{\multicolundershoot}
+
+\end{warpHTML}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-multicol.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,103 @@
+%%
+%% This is file `lwarp-multirow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `multirow')
+%% This is a generated file.
+%% Copyright 2016 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{multirow}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-multirow.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,105 @@
+%%
+%% This is file `lwarp-needspace.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `needspace')
+%% This is a generated file.
+%% Copyright 2016 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{needspace}
+
+\newcommand*{\needspace}[1]{}
+\DeclareDocumentCommand{\Needspace}{s m}{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-needspace.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-newproject.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,2014 @@
+%%
+%% This is file `lwarp-newproject.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `lwarp-newproject')
+%% This is a generated file.
+%% Copyright 2016 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.
+
+
+
+
+
+
+\ProvidesPackage{lwarp-newproject}
+
+\RequirePackage{etoolbox}
+\RequirePackage{comment}
+\RequirePackage{fancyvrb}
+\RequirePackage{ifplatform}% sense op-system platform
+\RequirePackage{iftex}% sense pdflatex/lualatex/xelatex
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{family=LWRNP,prefix=LWRNP@}
+
+\newbool{LWRNP at genconf}
+\boolfalse{LWRNP at genconf}
+
+\excludecomment{LWR at createlwarpmk}
+
+\DeclareVoidOption{warpprint}{\booltrue{LWRNP at genconf}}
+\DeclareVoidOption{warpHTML}{\boolfalse{LWRNP at genconf}}
+\DeclareVoidOption{lwarpmk}{\includecomment{LWR at createlwarpmk}}
+\DeclareStringOption[\jobname]{BaseJobname}
+
+\booltrue{LWRNP at genconf}% warpprint
+
+\ProcessKeyvalOptions*\relax
+
+\providecommand*{\BaseJobname}{\LWRNP at BaseJobname}
+
+\providecommand*{\HomeHTMLFileName}{\BaseJobname}
+\providecommand*{\HTMLFileName}{}
+\providecommand*{\UseLatexmk}{false}
+
+\ifbool{LWRNP at genconf}{\typeout{lwarp-newproject: generating configuration files}}{}
+
+\ifbool{LWRNP at genconf}{
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\immediate\openout\LWR at file=\jobname_html.tex
+\immediate\write\LWR at file{%
+\detokenize{\PassOptionsToPackage}%
+{warpHTML,BaseJobname=\jobname}{lwarp}%
+}
+\immediate\write\LWR at file{%
+\detokenize{\PassOptionsToPackage}%
+{warpHTML,BaseJobname=\jobname}{lwarp-newproject}%
+}
+\immediate\write\LWR at file{%
+\detokenize{\input}\string{\jobname.tex\string }%
+}
+\immediate\closeout\LWR at file
+}{}
+
+\ifbool{LWRNP at genconf}{
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\immediate\openout\LWR at file=\jobname.lwarpmkconf
+\ifwindows
+\immediate\write\LWR at file{opsystem = "Windows"}
+\else
+\immediate\write\LWR at file{opsystem = "Unix"}
+\fi
+\ifPDFTeX
+\immediate\write\LWR at file{latexname = "pdflatex"}
+\fi
+\ifXeTeX
+\immediate\write\LWR at file{latexname = "xelatex"}
+\fi
+\ifLuaTeX
+\immediate\write\LWR at file{latexname = "lualatex"}
+\fi
+\immediate\write\LWR at file{sourcename = "\jobname"}
+\immediate\write\LWR at file{%
+homehtmlfilename = "\HomeHTMLFileName"%
+}
+\immediate\write\LWR at file{htmlfilename = "\HTMLFileName"}
+\immediate\write\LWR at file{uselatexmk = "\UseLatexmk"}
+\immediate\closeout\LWR at file
+}{}
+
+
+\begin{VerbatimOut}{lwarp.css}
+/*
+ CSS stylesheet for the LaTeX lwarp package
+ Copyright 2016 Brian Dunn — BD Tech Concepts LLC
+*/
+
+/* a fix for older browsers: */
+header, section, footer, aside, nav, main,
+ article, figure { display: block; }
+
+A:link {color:#000080 ; text-decoration: none ; }
+A:visited {color:#800000 ; }
+A:hover {color:#000080 ; text-decoration: underline ;}
+A:active {color:#800000 ; }
+
+a.tocpart {display: inline-block ; margin-left: 0em ;
+ font-weight: bold ;}
+a.tocchapter {display: inline-block ; margin-left: 0em ;
+ font-weight: bold ;}
+a.tocsection {display: inline-block ; margin-left: 1em ;
+ text-indent: -.5em ; font-weight: bold ; }
+a.tocsubsection {display: inline-block ; margin-left: 2em ;
+ text-indent: -.5em ; }
+a.tocsubsubsection {display: inline-block ; margin-left: 3em ;
+ text-indent: -.5em ; }
+a.tocparagraph {display: inline-block ; margin-left: 4em ;
+ text-indent: -.5em ; }
+a.tocsubparagraph {display: inline-block ; margin-left: 5em ;
+ text-indent: -.5em ; }
+a.tocfigure {margin-left: 0em}
+a.tocsubfigure {margin-left: 2em}
+a.toctable {margin-left: 0em}
+a.tocsubtable {margin-left: 2em}
+a.toclstlisting {margin-left: 0em}
+
+body {
+ font-family: "DejaVu Serif", "Bitstream Vera Serif",
+ "Lucida Bright", Georgia, serif;
+ background: #FAF7F4 ;
+ color: black ;
+ margin:0em ;
+ padding:0em ;
+ font-size: 100% ;
+ line-height: 1.2 ;
+}
+
+p {margin: 1.5ex 0em 1.5ex 0em ;}
+
+/* Holds a section number to add space between it and the name */
+span.sectionnumber { margin-right: .6em }
+
+/* Inserted in front of index lines */
+span.indexitem {margin-left: 0em}
+span.indexsubitem {margin-left: 2em}
+span.indexsubsubitem {margin-left: 4em}
+
+div.hidden { display: none ; }
+
+kbd {
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
+ font-size: 100% ;
+}
+
+span.strong { font-weight: bold; }
+
+span.textmd { font-weight: normal; }
+
+span.textsc { font-variant: small-caps; }
+
+span.textup { font-variant: normal; }
+
+span.textrm {
+ font-family: "DejaVu Serif", "Bitstream Vera Serif",
+ "Lucida Bright", Georgia, serif;
+}
+
+span.textsf {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+}
+
+span.attribution {
+ margin-left: 1em ; font-size: 80% ; font-variant: small-caps;
+}
+
+span.citetitle {
+ margin-left: 1em ; font-size: 80% ; font-style: oblique;
+}
+
+span.poemtitle {
+ font-size: 120% ; font-weight: bold;
+}
+
+blockquote {
+margin-left: 0px ;
+margin-right: 0px ;
+}
+
+blockquote p {
+ line-height: 1.5;
+ text-align: left ;
+ font-size: .85em ;
+ margin-left: 3em ;
+margin-right: 3em ;
+}
+
+blockquotation {
+margin-left: 0px ;
+margin-right: 0px ;
+}
+
+blockquotation p {
+ line-height: 1.5;
+ text-align: left ;
+ font-size: .85em ;
+ margin-left: 3em ;
+margin-right: 3em ;
+}
+
+div.epigraph {
+ line-height: 1.2;
+ text-align: left ;
+ padding: 3ex 1em 0ex 1em ;
+/* margin: 3ex auto 3ex auto ; */ /* Epigraph centered */
+ margin: 3ex 1em 3ex auto ; /* Epigraph to the right */
+/* margin: 3ex 1em 3ex 1em ; */ /* Epigraph to the left */
+ font-size: .85em ;
+ max-width: 27em ;
+}
+
+div.epigraphsource{
+ text-align:right ;
+ margin-left:auto ;
+/* max-width: 50% ; */
+ border-top: 1px solid #A0A0A0 ;
+ padding-bottom: 3ex ;
+ line-height: 1.2;
+}
+
+div.epigraph p { padding: .5ex ; margin: 0ex ;}
+div.epigraphsource p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;}
+
+html body {
+ margin: 0 ;
+ line-height: 1.2;
+}
+
+body div {
+ margin: 0ex;
+}
+
+h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
+{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ font-style: normal ;
+ font-weight: bold ;
+ text-align: left ;
+}
+
+h1 { /* title of the entire website, used on each page */
+ text-align: center ;
+ font-size: 2.5em ;
+ padding: .4ex 0em 0ex 0em ;
+}
+h2 { font-size: 2.25em }
+h3 { font-size: 2em }
+h4 { font-size: 1.75em }
+h5 { font-size: 1.5em }
+h6 { font-size: 1.25em }
+span.paragraph {font-size: 1em ; font-variant: normal ;
+ margin-right: 1em ; }
+span.subparagraph {font-size: 1em ; font-variant: normal ;
+ margin-right: 1em ; }
+
+/* Title of the file */
+h1 {
+ margin: 0ex 0em 0ex 0em ;
+ line-height: 1.3;
+ text-align: center ;
+}
+
+/* Part */
+h2 {
+ margin: 1ex 0em 1ex 0em ;
+ line-height: 1.3;
+ text-align: center ;
+}
+
+/* Chapter */
+h3 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+/* Section */
+h4 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+/* Sub-Section */
+h5 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+/* Sub-Sub-Section */
+h6 {
+ margin: 3ex 0em 1ex 0em ;
+ line-height: 1.3;
+}
+
+div.titlepage {
+ text-align: center ;
+}
+
+.footnotes {
+ font-size: .85em ;
+ margin: 3ex 1em 0ex 1em ;
+ padding-bottom: 1ex ;
+}
+
+.marginpar {
+width:20%; float:right;
+text-align:left;
+margin: 1ex 0.5em 1ex 1em ;
+padding: 1ex 0.5em 1ex 0.5em ;
+font-size: 85% ;
+border-top: 1px solid silver ;
+border-bottom: 1px solid silver ;
+overflow-x: auto;
+}
+
+.marginpar br { margin-bottom: 2ex ; }
+
+div.marginblock {
+width:50%; float:right;
+text-align:left;
+margin: 1ex 0.5em 1ex 1em ;
+padding: 1ex 0.5em 1ex 0.5em ;
+overflow-x: auto;
+}
+
+div.marginblock div.minipage p { font-size: 85%}
+
+div.marginblock br { margin-bottom: 2ex ; }
+
+section.textbody div.footnotes{
+ margin: 3ex 0em 0ex 0em ;
+ border-bottom: 2px solid silver ;
+}
+
+.footnoteheader {
+ border-top: 2px solid silver ;
+ margin-top: 3ex ;
+ padding-top: 1ex ;
+ font-weight: bold ;
+}
+
+.mpfootnotes {
+ text-align: left ;
+ font-size: .85em ;
+ margin: 3ex 0em 3ex 0em ;
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+/* padding-top: 1ex ; */
+}
+
+/* Remove footnote top border in the title page. */
+div.titlepage div.mpfootnotes {
+ border-top: none ;
+}
+
+ol {
+ margin: 1ex 1em 1ex 0em;
+ line-height: 1.2;
+}
+
+ul, body dir, body menu {
+ margin: 1ex 1em 1ex 0em;
+ line-height: 1.2;
+}
+
+li { margin: 0ex 0em 1ex 0em; }
+
+html {
+ margin: 0;
+ padding: 0;
+}
+
+.programlisting {
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
+ margin: 1ex 0ex 1ex 0ex ;
+ padding: .5ex 0pt .5ex 0pt ;
+ overflow-x: auto;
+}
+
+section.textbody>pre.programlisting {
+border-top: 1px solid silver ;
+border-bottom: 1px solid silver ;
+}
+
+.inlineprogramlisting {
+ font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
+ "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
+ "Courier New", monospace;
+ overflow-x: auto;
+}
+
+div.abstract {
+ margin: 2em 5% 2em 5% ;
+ padding: 1ex 1em 1ex 1em ;
+/* font-weight: bold ; */
+ font-size: 90% ;
+}
+
+div.abstract dl {line-height:1.5;}
+div.abstract dt {color:#304070;}
+
+div.abstracttitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-size:1.25em;
+ text-align: center ;
+}
+
+.verbatim {
+ overflow-x: auto ;
+}
+
+.alltt {
+ overflow-x: auto ;
+}
+
+.bverbatim {
+ margin: 1ex 0pt 1ex 0pt ;
+ padding: .5ex 0pt .5ex 0pt ;
+ overflow-x: auto ;
+}
+
+.lverbatim {
+ margin: 1ex 0pt 1ex 0pt ;
+ padding: .5ex 0pt .5ex 0pt ;
+ overflow-x: auto ;
+}
+
+.fancyvrb {
+ font-size:.85em ;
+ margin: 3ex 0pt 3ex 0pt
+}
+
+.fancyvrblabel {
+ font-weight:bold;
+ text-align: center ;
+}
+
+.verse {
+ font-family: "Linux Libertine Mono O", "Lucida Console",
+ "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
+ "Liberation Mono", "FreeMono", "Andale Mono",
+ "Nimbus Mono L", "Courier New", monospace;
+ margin-left: 1em ;
+}
+
+div.singlespace { line-height: 1.2 ; }
+div.onehalfspace { line-height: 1.5 ; }
+div.doublespace { line-height: 2 ; }
+
+.theorem {
+ background: #e0e0e0;
+ padding: 1ex ;
+ margin: 1em ;
+ border: 1px solid silver ;
+}
+
+.theoremlabel { font-weight: bold ; }
+
+.theoremcontents { font-style: italic; margin-left: 1em ; }
+
+/* Minipage environments, vertically aligned to top, center, bottom: */
+.minipage {
+ /* display: inline-block ; */
+ /* Mini pages which follow each other will be tiled. */
+ margin: .25em .25em .25em .25em;
+ padding: .25em .25em .25em .25em;
+ display: inline-flex;
+ flex-direction: column ;
+ overflow: auto;
+}
+
+/* Paragraphs in the flexbox did not collapse their margins. */
+/* Have not yet researched this. */
+.minipage p {margin: .75ex 0em .75ex 0em ;}
+
+.framebox {
+ margin: 0ex ;
+ padding: 0ex ;
+ border: 1px solid black;
+ border-radius: 0px ;
+ padding: .3ex .2em 0ex .2em ;
+ margin: .1ex ;
+ display: inline-block ;
+}
+
+.mdframed {
+/* padding: 0ex ; */
+/* border: 1px solid blafck; */
+/* border-radius: 0px ; */
+ padding: 0ex ;
+ margin: 3ex 5% 3ex 5% ;
+/* display: inline-block ; */
+}
+
+.mdframed p { padding: 0ex .5em 0ex .5em ; }
+
+.mdframed dl { padding: 0ex .5em 0ex .5em ; }
+
+.mdframedtitle {
+ padding: .5em ;
+ display: block ;
+ font-size: 130%
+}
+
+.mdframedsubtitle {
+ padding: 0ex .5em 0ex .5em ;
+ display: block ;
+ font-size: 115% ;
+}
+
+.mdframedsubsubtitle {
+ padding: 0ex .5em 0ex .5em ;
+ display: block ;
+}
+
+.mdtheorem {
+ padding: 0ex .5em 0ex .5em ;
+ margin: 3ex 5% 3ex 5% ;
+/* display: inline-block ; */
+}
+
+dl {
+ margin: 1ex 2em 1ex 0em;
+ line-height: 1.3;
+}
+
+dl dt {
+ margin-top: 1ex;
+ font-weight: bold;
+}
+
+dl dd p { margin-top: 0em; }
+
+nav.toc, nav.lof, nav.lot, nav.lol {
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+ margin-bottom: 4ex ;
+}
+
+nav.toc p, nav.lof p, nav.lot p, nav.lol p {
+ line-height: 1.2 ;
+ margin-top:.5ex ;
+ margin-bottom:.5ex;
+ font-size: .9em ;
+}
+
+img, img.hyperimage, img.borderimage {
+ max-width: 600px;
+ border: 1px solid silver;
+ box-shadow: 3px 3px 3px #808080 ;
+ padding: .5% ;
+ margin: .5% ;
+ background: none ;
+}
+
+img.inlineimage{
+ padding: 0px ;
+ box-shadow: none ;
+ border: none ;
+ background: none ;
+ margin: 0px ;
+ display: inline-block ;
+ border-radius: 0px ;
+}
+
+img.logoimage{
+ max-width: 300px ;
+ box-shadow: 3px 3px 3px #808080 ;
+ border: 1px solid black ;
+ background:none ;
+ padding:0 ;
+ margin:.5ex ;
+ border-radius: 10px ;
+}
+
+.section {
+/*
+ To have each section float relative to each other:
+*/
+/*
+ display: block ;
+ float: left ;
+ position: relative ;
+ background: white ;
+ border: 1px solid silver ;
+ padding: .5em ;
+*/
+ margin: 0ex .5em 0ex .5em ;
+ padding: 0 ;
+}
+
+figure {
+ margin: 3ex auto 3ex auto ;
+ padding: 1ex 1em 1ex 1em ;
+ overflow-x: auto ;
+}
+
+/* To automatically center images in figures: */
+/*
+figure img.inlineimage {
+ margin: 0ex auto 0ex auto ;
+ display: block ;
+}
+*/
+
+/* To automatically center minipages in figures: */
+/*
+figure div.minipage, figure div.minipage div.minipage {
+ margin: 1ex auto 1ex auto ;
+ display: block ;
+}
+*/
+
+figure div.minipage p { font-size: 85% ; }
+
+figure.subfigure, figure.subtable {
+ display: inline-block ; margin: 3ex 1em 3ex 1em ;
+}
+
+div.floatrow { text-align: center; }
+
+div.floatrow figure { display: inline-block ; margin: 1ex 2% ; }
+
+div.floatfoot { font-size: .85em ;
+ border-top: 1px solid silver ; line-height: 1.2 ; }
+
+figcaption , .lstlistingtitle {
+ font-size: .85em ;
+ text-align: center ;
+ font-weight: bold ;
+margin-top: 1ex ;
+margin-bottom: 1ex ;
+}
+
+figure.subfigure figcaption, figure.subtable figcaption {
+ border-bottom: none ; background: none ;
+}
+
+div.nonfloatcaption {
+ margin: 1ex auto 1ex auto ;
+ font-size: .85em ;
+ text-align: center ;
+ font-weight: bold ;
+}
+
+/* For a \RawCaption inside a minipage inside a figure's floatrow: */
+figure div.floatrow div.minipage figcaption {
+border: none ;
+background: none ;
+}
+
+table {
+ margin: 1ex auto 1ex auto ;
+ border-collapse: collapse ;
+ border-spacing: 0px ;
+ line-height: 1.3 ;
+ }
+
+tr.hline {border-top: 1px solid silver ; margin-top: 0ex ;
+ margin-bottom: 0ex ; } /* for \hline */
+
+tr.tbrule {border-top: 1px solid black ; margin-top: 0ex ;
+ margin-bottom: 0ex ; } /* for \toprule, \bottomrule */
+
+td {padding: 1ex .5em 1ex .5em ;}
+
+table td.tdl { text-align: left ; vertical-align: middle ; }
+table td.tdc { text-align: center ; vertical-align: middle ; }
+table td.tdr { text-align: right ; vertical-align: middle ; }
+table td.tdp { text-align: left ; vertical-align: bottom ; }
+table td.tdm { text-align: left ; vertical-align: middle ; }
+table td.tdb { text-align: left ; vertical-align: top ; }
+table td.tdP { text-align: center ; vertical-align: bottom ; }
+table td.tdM { text-align: center ; vertical-align: middle ; }
+table td.tdB { text-align: center ; vertical-align: top ; }
+table td.tdlrule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: middle ; } /* for cmidrule */
+table td.tdcrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdrrule { text-align: right ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdprule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: bottom ; }
+table td.tdmrule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdbrule { text-align: left ; border-top: 1px solid silver ;
+ vertical-align: top ; }
+table td.tdPrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: bottom ; }
+table td.tdMrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: middle ; }
+table td.tdBrule { text-align: center ; border-top: 1px solid silver ;
+ vertical-align: top ; }
+
+/* Margins of paragraphs inside table cells: */
+td.tdp p , td.tdprule p , td.tdP p , td.tdPrule p { padding-top: 1ex ;
+ padding-bottom: 1ex ; margin: 0ex ; }
+td.tdm p , td.tmbrule p , td.tdM p , td.tdMrule p { padding-top: 1ex ;
+ padding-bottom: 1ex ; margin: 0ex ; }
+td.tdb p , td.tdbrule p , td.tdB p , td.tdBrule p { padding-top: 1ex ;
+ padding-bottom: 1ex ; margin: 0ex ; }
+
+td.tdp , td.tdprule , td.tdP , td.tdPrule
+ { padding: 0ex .5em 0ex .5em ; }
+td.tdm , td.tdmrule , td.tdM , td.tdMrule
+ { padding: 0ex .5em 0ex .5em ; }
+td.tdb , td.tdbrule , td.tdB , td.tdBrule
+ { padding: 0ex .5em 0ex .5em ; }
+
+/* table notes: */
+.tnotes {
+ margin: 0ex 5% 1ex 5% ;
+ padding: 0.5ex 1em 0.5ex 1em;
+ font-size:.85em;
+ text-align: left ;
+}
+
+.tnotes dl dt p {margin-bottom:0px;}
+
+.tnoteitemheader {margin-right: 1em;}
+
+/* center, flushleft, flushright environments */
+div.center{text-align:center;}
+div.center table {margin-left:auto;margin-right:auto;}
+div.flushleft{text-align:left;}
+div.flushleft table {margin-left:0em ; margin-right:auto;}
+div.flushright{text-align:right;}
+div.flushright table {margin-left:auto ; margin-right: 0em ;}
+
+/* program listing callouts: */
+span.callout {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+ border-radius: .5em;
+ background-color:black;
+ color:white;
+ padding:0px .25em 0px .25em;
+margin: 0 ;
+ font-weight: bold;
+ font-size:.72em ;
+}
+
+div.programlisting pre.verbatim span.callout{
+font-size: .85em ;
+}
+
+div.published
+{
+ text-align: center ;
+ font-variant: normal ;
+ font-style: italic ;
+ font-size: 1em ;
+ margin: 3ex 0em 3ex 0em ;
+}
+
+div.subtitle
+{
+ text-align: center ;
+ font-variant: normal ;
+ font-style: italic ;
+ font-size: 1.25em ;
+ margin: 3ex 0em 3ex 0em ;
+}
+
+div.subtitle p { margin: 1ex ; }
+
+div.author
+{
+ font-variant: normal ;
+ font-style: normal ;
+ font-size: 1em ;
+ margin: 3ex 0em 3ex 0em ;
+}
+
+div.author table {
+ margin: 3ex auto 0ex auto ;
+ background: none ;
+}
+
+div.author table tbody tr td { padding: .25ex ; }
+
+span.affiliation {font-size: .85em ; font-variant: small-caps; }
+
+div.titledate {
+ text-align: center ;
+ font-size: .85em ;
+ font-style: italic;
+ margin: 6ex 0em 6ex 0em ;
+}
+
+nav.topnavigation{
+ text-align: left ;
+ padding: 0.5ex 1em 0.5ex 1em ;
+/* margin: 2ex 0em 3ex 0em ; */
+ margin: 0 ;
+ border-bottom: 1px solid silver ;
+ border-top: 1px solid silver ;
+ clear:right ;
+}
+
+nav.botnavigation{
+ text-align: left ;
+ padding: 0.5ex 1em 0.5ex 1em ;
+/* margin: 3ex 0em 2ex 0em ; */
+ margin: 0 ;
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+ clear:right ;
+}
+
+header{
+ line-height: 1.2 ;
+ font-size: 1em ;
+/* border-bottom: 2px solid silver ; */
+ margin: 0px ;
+ padding: 0ex 1em 0ex 1em ;
+ text-align:center ;
+}
+
+header p {margin:0ex;padding:4ex 0em 2ex 0em ;text-align:center;}
+
+footer{
+ font-size: .85em ;
+ line-height: 1.2 ;
+ margin-top: 1ex ;
+ border-top: 2px solid silver ;
+ padding: 2ex 1em 2ex 1em ;
+ clear:right ;
+ text-align:left ;
+}
+
+a.linkhome { font-weight:bold ; font-size: 1em ;}
+
+div.lateximagesource { padding: 0px ; margin: 0px ; display: none; }
+
+img.lateximage{
+ padding: 0px 0px 0px 0px ;
+ box-shadow: none ;
+ border: none ;
+ background: none ;
+ margin: 0px 0px -.15ex 0px ;
+ /* pdfcrop leaves a slight margin, adjust to baseline */
+ max-width: 100% ;
+ border-radius: 0ex ;
+ border: none ;
+}
+
+nav.sidetoc {
+ font-family: "DejaVu Serif", "Bitstream Vera Serif",
+ "Lucida Bright", Georgia, serif;
+ float:right ;
+ width: 20%;
+ border-left: 1px solid silver;
+ border-top: 1px solid silver;
+ border-bottom: 1px solid silver;
+/* border-top: 2px solid #808080 ; */
+ background: #FAF7F4 ;
+ padding: 2ex 0em 2ex 1em ;
+ margin: 0ex 0em 2ex 1em ;
+ font-size:.9em ;
+ border-radius: 20px 0px 0px 20px ;
+ }
+
+div.sidetoccontents {
+/* border-top: 1px solid silver ; */
+ overflow-y: auto ;
+ width: 100% ;
+ text-align: left ;
+}
+
+nav.sidetoc p {line-height:1.2 ; margin: 1ex .5em 1ex .5em ;
+ text-indent: 0 ; }
+nav.sidetoc p a {color:black ; font-size: .7em ;}
+div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center;
+ border-bottom: 1px solid silver ; }
+nav.sidetoc a:hover {text-decoration: underline ; }
+
+section.textbody { margin: 0ex 1em 0ex 1em ;}
+
+div.multicolsheading { -webkit-column-span: all;
+ -moz-column-span: all; column-span: all; }
+div.multicols { -webkit-columns: 3 380px ;
+ -moz-columns: 3 380px ; columns: 3 380px ; }
+div.multicols p {margin-top: 0ex}
+
+/* Used to support algorithmicx: */
+span.floatright { float: right ; }
+
+/*
+For CSS LaTeX and related logos:
+Based on:
+http://edward.oconnor.cx/2007/08/tex-poshlet
+http://nitens.org/taraborelli/texlogo
+*/
+
+.latexlogofont {
+ font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-variant: normal ;
+}
+
+.latexlogo {
+ font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ letter-spacing: .03em ;
+ font-size: 1.1em;
+}
+
+.latexlogo sup {
+ text-transform: uppercase;
+ letter-spacing: .03em ;
+ font-size: 0.85em;
+ vertical-align: 0.15em;
+ margin-left: -0.36em;
+ margin-right: -0.15em;
+}
+
+.latexlogo sub {
+ text-transform: uppercase;
+ vertical-align: -0.5ex;
+ margin-left: -0.1667em;
+ margin-right: -0.125em;
+ font-size: 1em;
+}
+
+.xetexlogo {
+ font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ letter-spacing: .03em ;
+ font-size: 1.1em;
+}
+
+/* A smaller gap between Xe and Tex v.s. LaTeX: */
+.xetexlogo sub {
+ text-transform: uppercase;
+ vertical-align: -0.5ex;
+ margin-left: -0.0667em;
+ margin-right: -0.2em;
+ font-size: 1em;
+ letter-spacing: .03em ;
+}
+
+/* A large gap between Xe and LaTeX v.s. TeX: */
+.xelatexlogo sub {
+ text-transform: uppercase;
+ vertical-align: -0.5ex;
+ margin-left: -0.0667em;
+ margin-right: -.05em;
+ font-size: 1em;
+ letter-spacing: .03em ;
+}
+
+.amslogo {
+ font-family: "TeXGyreChorus","URW Chancery L",
+ "Apple Chancery","ITC Zapf Chancery","Monotype Corsiva",
+ "Linux Libertine O", "Nimbus Roman No 9 L", "FreeSerif",
+ "Hoefler Text", Times, "Times New Roman", serif;
+ font-style: italic;
+}
+
+.lyxlogo {
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "DejaVu Sans", "Bitstream Vera Sans", Geneva,
+Verdana, sans-serif ;
+}
+
+/* Only display top and bottom navigation if a small screen: */
+/* Hide the sidetoc if a small screen: */
+nav.topnavigation { display:none; }
+nav.botnavigation { display:none; }
+
+ at media screen and (max-width: 45em) {
+/* nav.sidetoc {display:none;} */
+ nav.sidetoc {
+ float: none ;
+ width: 100% ;
+ margin: 5ex 0px 5ex 0px ;
+ padding: 0 ;
+ border-radius: 0 ;
+ border-bottom: 1px solid black ;
+ border-top: 1px solid black ;
+ box-shadow: none ;
+ }
+/* nav.topnavigation { display:block } */
+ nav.botnavigation { display:block }
+}
+
+ at media print {
+ body {
+ font-family: "Linux Libertine O",
+ "DejaVu Serif", "Bitstream Vera Serif",
+ "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ }
+ nav.sidetoc { display:none; }
+ nav.topnavigation { display: none; }
+ nav.botnavigation { display: none; }
+}
+
+ at media handheld {
+ nav.sidetoc { display:none; }
+ nav.topnavigation { display:block }
+ nav.botnavigation { display:block }
+}
+
+ at media projection {
+ nav.sidetoc { display:none; }
+ nav.topnavigation { display:block }
+ nav.botnavigation { display:block }
+}
+\end{VerbatimOut}
+
+
+\begin{VerbatimOut}{lwarp_sagebrush.css}
+ at import url("lwarp.css") ;
+
+A:link {color:#105030 ; text-decoration: none ; }
+A:visited {color:#705030 ; text-shadow:1px 1px 2px #a0a0a0;}
+A:hover {color:#006000 ; text-decoration: underline ; text-shadow:0px 0px 2px #a0a0a0;}
+A:active {color:#00C000 ; text-shadow:1px 1px 2px #a0a0a0;}
+
+h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
+{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif",
+ "Nimbus Roman No 9 L", "FreeSerif",
+ "Hoefler Text", Times, "Times New Roman", serif;
+ font-variant: small-caps ;
+font-weight: normal ;
+ color: #304070 ;
+ text-shadow: 2px 2px 3px #808080;
+}
+
+h1 { /* title of the entire website, used on each page */
+ font-variant: small-caps ;
+ color: #304070 ;
+ text-shadow: 2px 2px 3px #808080;
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C4);
+}
+
+h1 {
+ border-bottom: 1px solid #304070;
+ border-top: 2px solid #304070;
+}
+
+h2 {
+ border-bottom: 1px solid #304070;
+ border-top: 2px solid #304070;
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #DAD0C0);
+}
+
+div.abstract {
+ background: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+ border: 1px solid silver;
+ border-radius: 1em ;
+}
+
+div.abstract dl {line-height:1.5;}
+div.abstract dt {color:#304070;}
+
+div.abstracttitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ font-size:1.5em;
+ border-bottom: 1px solid silver ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+div.epigraph {
+ background: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+ border: 1px solid silver ;
+ border-radius: 1ex ;
+ box-shadow: 3px 3px 3px #808080 ;
+}
+
+.example {
+ background-color: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+}
+
+div.exampletitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ border-bottom: 1px solid silver ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+.sidebar {
+ background-color: #f5f5eb ;
+ background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
+
+}
+
+div.sidebartitle{
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+ border-bottom: 1px solid silver ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+.fancyvrblabel {
+ font-family: "URW Classico", Optima, "Linux Biolinum O",
+ "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
+ "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
+ font-weight:bold;
+ font-variant: small-caps ;
+font-size: 1.5em ;
+ color: #304070 ;
+ text-align: center ;
+ text-shadow: 1px 1px 2px #808080;
+}
+
+.minipage {
+ background-color: #eeeee7 ;
+ border: 1px solid silver ;
+border-radius: 1ex ;
+}
+
+figure.figure .minipage { border: none; }
+
+div.marginblock div.minipage { border: none; }
+
+figure , div.marginblock {
+ background-color: #eeeee7 ;
+ border: 1px solid silver ;
+ border-radius: 1ex ;
+ box-shadow: 3px 3px 3px #808080 ;
+}
+
+figure figure {
+ border: 1px solid silver ;
+ margin: 0em ;
+box-shadow: none ;
+}
+
+/*
+figcaption {
+ border-top: 1px solid silver ;
+ border-bottom: 1px solid silver ;
+ background-color: #e8e8e8 ;
+}
+*/
+
+div.table {
+ box-shadow: 3px 3px 3px #808080 ;
+}
+
+/*
+.tnotes {
+ background: #e8e8e8;
+ border: 1px solid silver;
+}
+*/
+
+nav.topnavigation{
+ background-color: #b0b8b0 ;
+ background-image: linear-gradient(to bottom,#e0e0e0,#b0b8b0) ;
+}
+
+nav.botnavigation{
+ background-color: #b0b8b0 ;
+ background-image: linear-gradient(to top,#e0e0e0,#b0b8b0) ;
+}
+
+header{
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to top, #F7F7F0, #b0b8b0);
+}
+
+footer{
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #b0b8b0);
+}
+
+nav.sidetoc {
+ background-color: #F7F7F0 ;
+ background-image: linear-gradient(to bottom, #F7F7F0, #C0C0C0);
+ box-shadow: 3px 3px 3px #808080 ;
+ border-radius: 0px 0px 0px 20px ;
+ }
+
+div.sidetoctitle {color: #304070 ; }
+nav.sidetoc a:hover {color:#006000 ; text-decoration: none ; text-shadow:0px 0px 2px #a0a0a0;}
+
+ at media screen and (max-width: 45em) {
+ nav.sidetoc { border-radius: 0 ; }
+}
+
+\end{VerbatimOut}
+
+
+\begin{VerbatimOut}{lwarp_formal.css}
+ at import url("lwarp.css") ;
+
+A:link {color:#802020 ; text-decoration:none; }
+A:visited {color:#802020 ; text-shadow:none ;}
+A:hover {color:#400000 ; text-shadow:none ;}
+A:active {color:#C00000 ; text-shadow:none ;}
+
+body {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ background: #fffcf5;
+}
+
+span.textrm {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+}
+
+span.textsf {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+}
+
+h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
+{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+}
+
+h1, h2 {
+ background-color: #fffcf5 ;
+ background-image: none ;
+ border-bottom: 1px solid #808080;
+ border-top: 2px solid #808080;
+}
+
+div.abstracttitle {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: black ;
+ text-shadow: none ;
+}
+
+div.abstract { font-size: 100% }
+
+.sidebar {
+ background: #fffcf5;
+ background-image: none ;
+ margin: 2em 5% 2em 5%;
+ padding: 0.5em 1em;
+ border: none ;
+ border-top : 1px solid silver;
+ border-bottom : 1px solid silver;
+ font-size: 90% ;
+}
+
+div.sidebartitle{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+ border: none ;
+}
+
+.example {
+ background: #fffcf5;
+ background-image: none ;
+ margin: 2em 5% 2em 5%;
+ padding: 0.5em 1em;
+ border: none ;
+ border-top : 1px solid silver;
+ border-bottom : 1px solid silver;
+}
+
+div.exampletitle{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+ border: none ;
+}
+
+div.fancyvrblabel{
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ color: #800000 ;
+ text-shadow: none ;
+ border: none ;
+}
+
+.verse {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+}
+
+figure {
+ margin: 3ex 5% 3ex 5% ;
+ padding: 1ex 1em 1ex 1em ;
+ background-color: #fffcf5 ;
+ overflow-x: auto ;
+ border: none ;
+/* border-top: 1px solid silver; */
+/* border-bottom: 1px solid silver; */
+}
+
+figcaption , .lstlisting {
+ border: none ;
+/* border-top: 1px solid silver ; */
+/* border-bottom: 1px solid silver ; */
+ background-color: #fffcf5 ;
+}
+
+.tnotes {
+ background: #fffcf5 ;
+}
+
+.theorem {
+ background: none ;
+}
+
+.minipage {
+ background-color: #fffcf5 ;
+ border: none ;
+ margin: 1em ;
+}
+
+div.floatrow figure { border: none ; }
+
+figure figure { border: none ; }
+
+nav.toc, nav.lof, nav.lot, nav.lol {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+}
+
+nav.sidetoc {
+ font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
+ "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
+ "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
+ "Times New Roman", serif;
+ background-image: linear-gradient(to bottom, #fffcf5, #C0C0C0);
+ border-radius: 0px 0px 0px 20px ;
+}
+
+div.sidetoctitle{
+ color: #800000 ;
+}
+
+header{
+ background-color: #e0e0e0 ;
+ background-image: linear-gradient(to top, #fffcf5, #b0b0b0);
+ text-align:center ;
+}
+
+footer{
+ background-color: #e0e0e0 ;
+ background-image: linear-gradient(to bottom, #fffcf5, #b0b0b0);
+ padding: 2ex 1em 2ex 1em ;
+ clear:right ;
+ text-align:left ;
+}
+
+nav.botnavigation {
+ background: #dedcd5 ;
+ border-top: 1px solid black ;
+}
+\end{VerbatimOut}
+
+
+\begin{VerbatimOut}{sample_project.css}
+/* ( --- Start of project.css --- ) */
+/* A sample project-specific CSS file for lwarp --- ) */
+
+/* Load default lwarp settings: */
+ at import url("lwarp.css") ;
+/* or lwarp_formal.css, lwarp_sagebrush.css */
+
+/* Project-specific CSS setting follow here. */
+/* . . . */
+
+/* ( --- End of project.css --- ) */
+\end{VerbatimOut}
+
+
+\begin{VerbatimOut}{lwarp_html.xdy}
+(require "tex/inputenc/latin.xdy")
+(merge-rule "\\PS *" "Postscript")
+(require "texindy.xdy")
+(require "page-ranges.xdy")
+(require "book-order.xdy")
+(markup-locref :open "\hyperindexref{" :close "}")
+\end{VerbatimOut}
+
+
+
+\begin{VerbatimOut}{lwarp_mathjax.txt}
+<!-- https://groups.google.com/forum/#!topic/
+ mathjax-users/jUtewUcE2bY -->
+<script type="text/x-mathjax-config">
+MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
+ var seteqsectionDefault = {name: "", num: 0};
+ var seteqsections = {}, seteqsection = seteqsectionDefault;
+ var TEX = MathJax.InputJax.TeX, PARSE = TEX.Parse;
+ var AMS = MathJax.Extension["TeX/AMSmath"];
+ TEX.Definitions.Add({
+ macros: {
+ seteqsection: "mySection",
+ seteqnumber: "mySetEqNumber"
+ }
+ });
+
+ PARSE.Augment({
+ mySection: function (name) {
+ seteqsection.num = AMS.number;
+ var n = this.GetArgument(name);
+ if (n === "") {
+ seteqsection = seteqsectionDefault;
+ } else {
+ if (!seteqsections["_"+n])
+ seteqsections["_"+n] = {name:n, num:0};
+ seteqsection = seteqsections["_"+n];
+ }
+ AMS.number = seteqsection.num;
+ },
+ mySetEqNumber: function (name) {
+ var n = this.GetArgument(name);
+ if (!n || !n.match(/^ *[0-9]+ *$/))
+ n = ""; else n = parseInt(n)-1;
+ <!-- $ syntax highlighting -->
+ if (n === "" || n < 1)
+ TEX.Error
+ ("Argument to "+name+" should be a positive integer");
+ AMS.number = n;
+ }
+ });
+ MathJax.Hub.Config({
+ TeX: {
+ equationNumbers: {
+ formatTag: function (n)
+ {return "("+(seteqsection.name+"."+n).replace(/^\./,"")+")"},
+ formatID: function (n) {
+ n = (seteqsection.name+'.'+n).replace
+ (/[:"'<>&]/g,"").replace(/^\./,"");
+ return 'mjx-eqn-' + n;
+ }
+ }
+ }
+ });
+});
+</script>
+
+<!-- http://docs.mathjax.org/en/latest/options/ThirdParty.html -->
+<script type="text/x-mathjax-config">
+ MathJax.Ajax.config.path["Contrib"] =
+ "https://cdn.mathjax.org/mathjax/contrib";
+</script>
+
+<!-- https://github.com/mathjax/MathJax-third-party-extensions/
+ tree/master/siunitx -->
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js","[Contrib]/siunitx/siunitx.js"],
+ jax: ["input/TeX","output/HTML-CSS"],
+ tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
+ TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
+ });
+ </script>
+
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+ TeX: {
+ equationNumbers: {
+ autoNumber: "AMS"
+ }
+ }
+});
+</script>
+
+<script
+ src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
+</script>
+\end{VerbatimOut}
+
+
+\begin{LWR at createlwarpmk}
+
+\begin{VerbatimOut}{lwarpmk.lua}
+#!/usr/bin/env texlua
+
+-- Copyright 2016 Brian Dunn
+
+-- Print the usage of the lwarpmk command:
+
+printversion = "v0.20"
+
+function printhelp ()
+print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
+end
+
+function printusage ()
+print ( [[
+
+lwarpmk print [project]: Compile a print version.
+lwarpmk printindex [project]: Process the index for the print version.
+lwarpmk html [project]: Compile an HTML version.
+lwarpmk htmlindex [project]: Process the index for the html version.
+lwarpmk again [project]: Touch the source code to trigger recompiles.
+lwarpmk limages [project]: Process the "lateximages" created by lwarp.sty.
+lwarpmk pdftohtml [project]:
+ For use with latexmk or a Makefile:
+ Convert project_html.pdf to project_html.html and
+ individual HTML files.
+lwarpmk clean [project]: Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+lwarpmk cleanall [project]: Remove auxiliary files and also project.pdf, *.html
+lwarpmk -h: Print this help message.
+lwarpmk --help: Print this help message.
+
+]] )
+printconf ()
+end
+
+-- Print the format of the configuration file lwarpmk.conf:
+
+function printconf ()
+print ( [[
+An example lwarpmk.conf or <project>.lwarpmkconf project file:
+--
+opsystem = "Unix" (or "Windows")
+latexname = "pdflatex" (or "lualatex", or "xelatex")
+sourcename = "projectname" (the source-code filename w/o .tex)
+homehtmlfilename = "index" (or perhaps the project name)
+htmlfilename = "" (or "projectname" - filename prefix)
+uselatexmk = "false" (or "true" to use latexmk to build PDFs)
+--
+Filenames must contain only letters, numbers, underscore, or dash.
+Values must be in "quotes".
+
+]] ) ;
+end
+
+-- Split one large sourcefile into a number of files,
+-- starting with destfile.
+-- The file is split at each occurance of <!--|Start file|newfilename|*
+
+function splitfile (destfile,sourcefile)
+print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ;
+io.input(sourcefile)
+io.output(destfile)
+for line in io.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") ;
+end
+end -- do
+end -- function
+
+-- Incorrect value, so print an error and exit.
+
+function cvalueerror ( line, linenum , cvalue )
+ print ( linenum .. " : " .. line ) ;
+ print ("lwarpmk: incorrect variable value \"" .. cvalue .. "\" in lwarpmk.conf.\n" ) ;
+ printconf () ;
+ os.exit(1) ;
+end
+
+-- Load settings from the project's "lwarpmk.conf" file:
+
+function loadconf ()
+-- Default configuration filename:
+local conffile = "lwarpmk.conf"
+-- Optional configuration filename:
+if arg[2] ~= nil then conffile = arg[2]..".lwarpmkconf" end
+-- 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
+else -- file exists
+-- Read the file:
+print ("lwarpmk: Reading " .. conffile ..".")
+io.input(conffile) ;
+-- Scan each line:
+local linenum = 0
+for line in io.lines() do -- scan lines
+linenum = linenum + 1
+i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w-_]*)\"") ;
+-- Error if incorrect enclosing characters:
+if ( i == nil ) then
+print ( linenum .. " : " .. line ) ;
+print ( "lwarpmk: Incorrect entry in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+if ( cvarname == "opsystem" ) then
+ -- Verify choice of opsystem:
+ if ( (cvalue == "Unix") or (cvalue == "Windows") ) then
+ opsystem = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "latexname" ) then
+ -- Verify choice of LaTeX compiler:
+ if (
+ (cvalue == "pdflatex") or
+ (cvalue == "xelatex") or
+ (cvalue == "lualatex")
+ ) then
+ latexname = cvalue
+ else
+ cvalueerror ( line, linenum , cvalue )
+ end
+elseif ( cvarname == "sourcename" ) then sourcename = cvalue
+elseif ( cvarname == "homehtmlfilename" ) then homehtmlfilename = cvalue
+elseif ( cvarname == "htmlfilename" ) then htmlfilename = cvalue
+elseif ( cvarname == "uselatexmk" ) then uselatexmk = cvalue
+else
+print ( linenum .. " : " .. line ) ;
+print ("lwarpmk: Incorrect variable name \"" .. cvarname .. "\" in " .. conffile ..".\n" ) ;
+printconf () ;
+os.exit(1) ;
+end
+end -- do scan lines
+end -- file exists
+-- Select some operating-system commands:
+if opsystem=="Unix" then -- For Unix / Linux / Mac OS:
+rmname = "rm"
+touchname = "touch"
+chmodcmd = "chmod u+x lateximages.sh"
+lateximagesname = "./lateximages.sh"
+elseif opsystem=="Windows" then -- For Windows
+rmname = "DEL"
+touchname = "TOUCH"
+chmodcmd = ""
+lateximagesname = "lateximages.cmd"
+else print ( "lwarpmk: Select Unix or Windows for opsystem" )
+end --- for Windows
+end -- loadconf
+
+-- Scan the LaTeX log file for the phrase "Rerun to get",
+-- indicating that the file should be compiled again.
+-- Return true if found.
+
+function reruntoget (filesource)
+io.input(filesource)
+for line in io.lines() do
+if ( string.find(line,"Rerun to get") ~= nil ) then return true end
+end
+return false
+end
+
+-- Compile one time, return true if should compile again.
+-- fsuffix is "" for print, "_html" for HTML output.
+
+function onetime (fsuffix)
+print("lwarpmk: Compiling with " .. latexname .. " " .. sourcename..fsuffix)
+err = os.execute(
+-- "echo " ..
+ latexname .. " " .. sourcename..fsuffix )
+if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+return (reruntoget(sourcename .. fsuffix .. ".log") ) ;
+end
+
+-- Compile up to five times.
+-- fsuffix is "" for print, "_html" for HTML output
+
+function manytimes (fsuffix)
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+if onetime(fsuffix) == true then
+end end end end end
+end
+
+-- Exit if the given file does not exist.
+
+function verifyfileexists (filename)
+if (lfs.attributes ( filename , "modification" ) == nil ) then
+print ( "lwarpmk: " .. filename .. " not found." ) ;
+os.exit (1) ;
+end
+end
+
+-- Convert <project>_html.pdf into HTML files:
+
+function pdftohtml ()
+ -- Convert to text:
+ print ("lwarpmk: Converting " .. sourcename .."_html.pdf to " .. sourcename .. "_html.html")
+ os.execute("pdftotext -enc UTF-8 -nopgbrk -layout " .. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+ -- Split the result into individual HTML files:
+ splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
+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 "
+ )
+end
+
+-- lwarpmk --version :
+
+if (arg[1] == "--version") then
+print ( "lwarpmk: " .. printversion )
+
+else -- not -- version
+
+-- print intro:
+
+print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+
+-- lwarpmk print:
+
+if arg[1] == "print" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ os.execute ( "latexmk -pdf -dvi- -ps- -pdflatex=\"" .. latexname .." %O %S\" " .. sourcename ..".tex" ) ;
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists (sourcename .. ".tex") ;
+ -- See if up to date:
+ if (
+ ( lfs.attributes ( sourcename .. ".pdf" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( sourcename .. ".pdf" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("")
+ print ("lwarpmk: Done.") ;
+ else
+ print ("lwarpmk: " .. sourcename .. ".pdf is up to date.") ;
+ end
+end -- not latexmk
+
+-- lwarp printindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "printindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. ".idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk html:
+
+elseif arg[1] == "html" then
+loadconf ()
+if ( uselatexmk == "true" ) then
+ -- 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 '$makeindex = q/texindy -M lwarp_html.xdy/' "
+ .. "-pdflatex=\"" .. latexname .." %O %S\" "
+ .. sourcename .."_html.tex" ) ;
+ if ( err ~= 0 ) then print ( "lwarpmk: Compile error.") ; os.exit(1) ; end
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+else -- not latexmk
+ verifyfileexists ( sourcename .. ".tex" ) ;
+ -- See if exists and is up to date:
+ if (
+ ( lfs.attributes ( homehtmlfilename .. ".html" , "modification" ) == nil ) or
+ (
+ lfs.attributes ( sourcename .. ".tex" , "modification" ) >
+ lfs.attributes ( homehtmlfilename .. ".html" , "modification" )
+ )
+ ) then
+ -- Recompile if not yet up to date:
+ manytimes("_html")
+ pdftohtml ()
+ print ("lwarpmk: Done.")
+ else
+ print ("lwarpmk: " .. homehtmlfilename .. ".html is up to date.")
+ end
+end -- not latexmk
+
+elseif arg[1] == "pdftohtml" then
+ loadconf ()
+ pdftohtml ()
+
+-- lwarpmk htmlindex:
+-- Compile the index then touch the source
+-- to trigger a recompile of the document:
+
+elseif arg[1] == "htmlindex" then
+loadconf ()
+print ("lwarpmk: Processing the index.")
+os.execute("texindy -M lwarp_html.xdy " .. sourcename .. "_html.idx")
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex")
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk limages:
+-- Make the lateximages command file executable,
+-- execute it to create the images,
+-- then touch the source to trigger a recompile.
+
+elseif arg[1] == "limages" then
+loadconf ()
+print ("lwarpmk: Processing images.")
+os.execute(chmodcmd)
+os.execute(lateximagesname)
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk again:
+-- Touch the source to trigger a recompile.
+
+elseif arg[1] == "again" then
+loadconf ()
+print ("lwarpmk: Forcing an update of " .. sourcename ..".tex.")
+os.execute(touchname .. " " .. sourcename .. ".tex") ;
+print ("lwarpmk: " .. sourcename ..".tex is ready to be recompiled.")
+print ("lwarpmk: Done.")
+
+-- lwarpmk clean:
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+
+elseif arg[1] == "clean" then
+loadconf ()
+removeaux ()
+print ("lwarpmk: Done.")
+
+-- lwarpmk cleanall
+-- Remove project.aux, .toc, .lof, .lot, .idx, .ind, .log
+-- and also project.pdf, *.html
+
+elseif arg[1] == "cleanall" then
+loadconf ()
+removeaux ()
+os.execute ( rmname .. " " ..
+ sourcename .. ".pdf " .. sourcename .. "_html.pdf " ..
+ "*.html"
+ )
+print ("lwarpmk: Done.")
+
+-- lwarpmk with no argument :
+
+elseif (arg[1] == nil) then
+printhelp ()
+
+-- lwarpmk -h or lwarpmk --help :
+
+elseif (arg[1] == "-h" ) or (arg[1] == "--help") then
+printusage ()
+
+else
+print ("lwarpmk: Unknown command \""..arg[1].."\".\n")
+printhelp ()
+end
+
+end -- not --version
+\end{VerbatimOut}
+
+\end{LWR at createlwarpmk}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-newproject.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nowidow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nowidow.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nowidow.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,109 @@
+%%
+%% This is file `lwarp-nowidow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `nowidow')
+%% This is a generated file.
+%% Copyright 2016 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{nowidow}
+
+\newcommand*{\nowidow}[1][]{}
+\newcommand*{\setnowidow}[1][]{}
+
+\newcommand*{\noclub}[1][]{}
+\newcommand*{\setnoclub}[1][]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-nowidow.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pagenote.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pagenote.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-pagenote.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,107 @@
+%%
+%% This is file `lwarp-pagenote.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `pagenote')
+%% This is a generated file.
+%% Copyright 2016 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{pagenote}
+\renewcommand*{\makepagenote}{}
+\RenewDocumentCommand{\printnotes}{s}{}
+\renewcommand{\printnotes}[2][]{}
+\renewcommand{\addtonotes}[1]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-pagenote.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-placeins.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-placeins.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-placeins.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,103 @@
+%%
+%% This is file `lwarp-placeins.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `placeins')
+%% This is a generated file.
+%% Copyright 2016 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{placeins}
+
+\newcommand*{\FloatBarrier}{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-placeins.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ragged2e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ragged2e.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ragged2e.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,124 @@
+%%
+%% This is file `lwarp-ragged2e.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `ragged2e')
+%% This is a generated file.
+%% Copyright 2016 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{ragged2e}
+
+\newcommand*{\Centering}{\centering}
+\newcommand*{\RaggedLeft}{\raggedleft}
+\newcommand*{\RaggedRight}{\raggedright}
+\newcommand*{\justifying}{}
+\newlength{\CenteringLeftskip}
+\newlength{\RaggedLeftLeftskip}
+\newlength{\RaggedRightLeftskip}
+\newlength{\CenteringRightskip}
+\newlength{\RaggedLeftRightskip}
+\newlength{\RaggedRightRightskip}
+\newlength{\CenteringParfillskip}
+\newlength{\RaggedLeftParfillskip}
+\newlength{\RaggedRightParfillskip}
+\newlength{\JustifyingParfillskip}
+\newlength{\CenteringParindent}
+\newlength{\RaggedLeftParindent}
+\newlength{\RaggedRightParindent}
+\newlength{\JustifyingParindent}
+\newenvironment*{Center}{\center}{\endcenter}
+\newenvironment*{FlushLeft}{\flushleft}{\endflushleft}
+\newenvironment*{FlushRight}{\flushright}{\endflushright}
+\newenvironment*{justify}{\justifying}{\endjustifying}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-ragged2e.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-rotating.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-rotating.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-rotating.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,115 @@
+%%
+%% This is file `lwarp-rotating.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `rotating')
+%% This is a generated file.
+%% Copyright 2016 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{rotating}
+
+\let\sidewaystable\table
+\let\endsidewaystable\endtable
+
+\let\sidewaysfigure\figure
+\let\endsidewaysfigure\endfigure
+
+\newenvironment*{sideways}{}{}
+\newenvironment*{turn}[1]{}{}
+\newenvironment*{rotate}[1]{}{}
+\NewDocumentCommand{\turnbox}{m +m}{#2}
+\let\rotcaption\caption
+\let\@makerotcaption\@makecaption
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-rotating.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-setspace.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,131 @@
+%%
+%% This is file `lwarp-setspace.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `setspace')
+%% This is a generated file.
+%% Copyright 2016 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{setspace}
+
+\newcommand*{\setstretch}[1]{}
+\newcommand*{\SetSinglespace}[1]{}
+\newcommand*{\singlespacing}{}
+\newcommand*{\onehalfspacing}{}
+\newcommand*{\doublespacing}{}
+
+\newenvironment*{singlespace}
+{\BlockClass{singlespace}}
+{\endBlockClass}
+
+\newenvironment*{singlespace*}
+{\BlockClass{singlespace}}
+{\endBlockClass}
+
+\newenvironment*{spacing}[1]{
+
+}{
+
+}
+
+\newenvironment*{onehalfspace}
+{\BlockClass{onehalfspace}}
+{\endBlockClass}
+
+\newenvironment*{doublespace}
+{\BlockClass{doublespace}}
+{\endBlockClass}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-setspace.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-textpos.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-textpos.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-textpos.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,120 @@
+%%
+%% This is file `lwarp-textpos.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `textpos')
+%% This is a generated file.
+%% Copyright 2016 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{textpos}
+
+\NewDocumentEnvironment{textblock}{m r()}{}{}
+\NewDocumentEnvironment{textblock*}{m o r()}{}{}
+\newcommand*{\TPGrid}[3][]{}
+\NewDocumentCommand{\TPMargin}{s o}{}
+\newcommand*{\textblockcolour}[1]{}
+\newcommand*{\textblockrulecolour}[1]{}
+\newcommand*{\textblockcolor}[1]{}
+\newcommand*{\textblockrulecolor}[1]{}
+\newcommand*{\tekstblokkulur}[1]{}
+\newcommand*{\tekstblokrulekulur}[1]{}
+\newlength{\TPHorizModule}
+\newlength{\TPVertModule}
+\newlength{\TPboxrulesize}
+\newcommand{\textblocklabel}[1]{}
+\newcommand*{\showtextsize}{}
+\newcommand{\textblockorigin}[2]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-textpos.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-threeparttable.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,119 @@
+%%
+%% This is file `lwarp-threeparttable.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `threeparttable')
+%% This is a generated file.
+%% Copyright 2016 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{threeparttable}
+
+\newcommand{\LWR at printtablenote}[1]{\InlineClass{tnoteitemheader}{#1}}
+
+\newenvironment*{threeparttable}[1][b]{}{}
+
+\newenvironment*{tablenotes}[1][]
+{%
+\BlockClass{tnotes}%
+\setlist[description]{format=\LWR at printtablenote}%
+\description%
+}
+{%
+\enddescription%
+\endBlockClass%
+}
+\newcommand{\tnote}[1]{\textsuperscript{#1}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-threeparttable.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,153 @@
+%%
+%% This is file `lwarp-titleps.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `titleps')
+%% This is a generated file.
+%% Copyright 2016 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{titleps}
+\RenewDocumentCommand{\newpagestyle}{m o m}{}
+\RenewDocumentCommand{\renewpagestyle}{m o m}{}
+
+\RenewDocumentCommand{\sethead}{o o o m m m}{}
+\RenewDocumentCommand{\setfoot}{o o o m m m}{}
+
+\RenewDocumentCommand{\settitlemarks}{s m}{}
+
+\renewcommand*{\headrule}{}
+\renewcommand*{\footrule}{}
+
+\renewcommand*{\setheadrule}[1]{}
+\renewcommand*{\setfootrule}[1]{}
+
+\newcommand*{\makeheadrule}{}
+\newcommand*{\makefootrule}{}
+
+\renewcommand{\setmarkboth}[1]{}
+
+\RenewDocumentCommand{\widenhead}{s o o m m}{}
+
+\renewcommand*{\bottitlemarks}{}
+\renewcommand*{\toptitlemarks}{}
+\renewcommand*{\firsttitlemarks}{}
+\renewcommand*{\nexttoptitlemarks}{}
+\renewcommand*{\outertitlemarks}{}
+\renewcommand*{\innertitlemarks}{}
+
+\RenewDocumentCommand{\newtitlemark}{s m}{}
+
+\RenewDocumentCommand{\pretitlemark}{s m m}{}
+
+\renewcommand{\ifsamemark}[4]{}
+
+\NewDocumentCommand{\setfloathead}{s o o o m m m m m}{}
+\NewDocumentCommand{\setfloatfoot}{s o o o m m m m m}{}
+
+\NewDocumentCommand{\nextfloathead}{s o o o m m m m m}{}
+\NewDocumentCommand{\nextfloatfoot}{s o o o m m m m m}{}
+
+\newcommand{\newmarkset}[1]{}
+
+\NewDocumentCommand{\newextramarkset}{s m m}{}
+
+\newcommand{\botextramarks}[1]{}
+\newcommand{\topextramarks}[1]{}
+\newcommand{\firstextramarks}[1]{}
+\newcommand{\nexttopextramarks}[1]{}
+\newcommand{\outerextramarks}[1]{}
+\newcommand{\innerextramarks}[1]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-titleps.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,138 @@
+%%
+%% This is file `lwarp-titlesec.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `titlesec')
+%% This is a generated file.
+%% Copyright 2016 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{titlesec}
+
+\newcommand*{\titlelabel}[1]{}
+
+\newcommand\titleformat{%
+ \@ifstar{\ttl at format@s}%
+ {\ttl at format@i}}
+\newcommand{\ttl at format@s}[1]{}
+\NewDocumentCommand{\ttl at format@i}{m o m m m m o}{}
+
+\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}
+\newcommand\chaptertitlename{\@chapapp}
+
+\NewDocumentCommand{\titlespacing}{s m m m m o}{}
+
+\newcommand*{\filright}{}
+\newcommand*{\filcenter}{}
+\newcommand*{\filleft}{}
+\newcommand*{\fillast}{}
+\newcommand*{\filinner}{}
+\newcommand*{\filouter}{}
+
+\newcommand\wordsep{\fontdimen\tw@\font \@plus
+ \fontdimen\thr@@\font \@minus \fontdimen4\font}
+
+\NewDocumentCommand{\titleline}{s o m}{}
+
+\providecommand*\titlerule{\@ifstar{\ttl at row}{\ttl at rule}}
+\newcommand*{\ttl at rule}[1][]{}
+\newcommand*{\ttl at row}[2][]{}
+
+\newcommand{\iftitlemeasuring}[2]{#2}
+
+\newcommand{\assignpagestyle}[2]{#2}
+
+\NewDocumentCommand{\titleclass}{m o m o}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-titlesec.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,133 @@
+%%
+%% This is file `lwarp-titletoc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `titletoc')
+%% This is a generated file.
+%% Copyright 2016 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{titletoc}
+
+\NewDocumentCommand{\dottedcontents}{m o m m m}{}
+
+\newcommand{\titlecontents}{\@ifstar{\ttl at tcstar}{\ttl at tcnostar}}
+\NewDocumentCommand{\ttl at tcstar}{m o m m m m o o o}{}
+\NewDocumentCommand{\ttl at tcnostar}{m o m m m m o}{}
+
+\newcommand{\contentsmargin}[2][]{}
+
+\newcommand*{\thecontentslabel}{thecontentslabel}
+\newcommand*{\thecontentspage}{thecontentspage}
+
+\newcommand{\contentslabel}[2][]{\thecontentslabel}
+\newcommand{\contentspage}[1][]{\thecontentspage}
+
+\newcommand{\contentspush}[1]{}
+
+\newcommand{\contentsuse}[2]{}
+
+\newcommand*{\startcontents}[1][]{}
+\newcommand*{\stopcontents}[1][]{}
+\newcommand*{\resumecontents}[1][]{}
+
+\newcommand{\printcontents}[4][]{}
+
+\newcommand{\startlist}[2][]{}
+\newcommand{\stoplist}[2][]{}
+\newcommand{\resumelist}[2][]{}
+
+\newcommand{\printlist}[4][]{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-titletoc.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,308 @@
+%%
+%% This is file `lwarp-tocloft.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `tocloft')
+%% This is a generated file.
+%% Copyright 2016 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{tocloft}
+
+\newcommand{\tocloftpagestyle}[1]{}
+
+\newcommand*{\cftmarktoc}{}
+\newcommand*{\cfttoctitlefont}{}
+\newcommand*{\cftaftertoctitle}{}
+
+\newlength{\cftbeforetoctitleskip}
+\newlength{\cftaftertoctitleskip}
+
+\newcommand*{\cftmarklof}{}
+\newcommand*{\cftloftitlefont}{}
+\newcommand*{\cftafterloftitle}{}
+
+\newlength{\cftbeforeloftitleskip}
+\newlength{\cftafterloftitleskip}
+
+\newcommand*{\cftmarklot}{}
+\newcommand*{\cftlottitlefont}{}
+\newcommand*{\cftafterlottitle}{}
+
+\newlength{\cftbeforelottitleskip}
+\newlength{\cftafterlottitleskip}
+
+\newcommand*{\cftdot}{.}
+\providecommand*{\cftdotsep}{1}
+\newcommand*{\cftnodots}{5000}
+
+\providecommand{\cftdotfill}[1]{}
+
+\newcommand*{\cftsetpnumwidth}[1]{}
+\newcommand*{\cftsetrmarg}[1]{}
+
+\newcommand*{\cftpnumalign}[1]{}
+
+\newlength{\cftparskip}
+
+\newlength{\cftbeforepartskip}
+\newlength{\cftpartindent}
+\newlength{\cftpartnumwidth}
+\newcommand*{\cftpartfont}{}
+\newcommand*{\cftpartpresnum}{}
+\newcommand*{\cftpartaftersnum}{}
+\newcommand*{\cftpartaftersnumb}{}
+\newcommand*{\cftpartleader}{}
+\newcommand*{\cftpartdotsep}{1}
+\newcommand*{\cftpartpagefont}{}
+\newcommand*{\cftpartafterpnum}{}
+
+\newlength{\cftbeforechapskip}
+\newlength{\cftchapindent}
+\newlength{\cftchapnumwidth}
+\newcommand*{\cftchapfont}{}
+\newcommand*{\cftchappresnum}{}
+\newcommand*{\cftchapaftersnum}{}
+\newcommand*{\cftchapaftersnumb}{}
+\newcommand*{\cftchapleader}{}
+\newcommand*{\cftchapdotsep}{1}
+\newcommand*{\cftchappagefont}{}
+\newcommand*{\cftchapafterpnum}{}
+
+\newlength{\cftbeforesecskip}
+\newlength{\cftsecindent}
+\newlength{\cftsecnumwidth}
+\newcommand*{\cftsecfont}{}
+\newcommand*{\cftsecpresnum}{}
+\newcommand*{\cftsecaftersnum}{}
+\newcommand*{\cftsecaftersnumb}{}
+\newcommand*{\cftsecleader}{}
+\newcommand*{\cftsecdotsep}{1}
+\newcommand*{\cftsecpagefont}{}
+\newcommand*{\cftsecafterpnum}{}
+
+\newlength{\cftbeforesubsecskip}
+\newlength{\cftsubsecindent}
+\newlength{\cftsubsecnumwidth}
+\newcommand*{\cftsubsecfont}{}
+\newcommand*{\cftsubsecpresnum}{}
+\newcommand*{\cftsubsecaftersnum}{}
+\newcommand*{\cftsubsecaftersnumb}{}
+\newcommand*{\cftsubsecleader}{}
+\newcommand*{\cftsubsecdotsep}{1}
+\newcommand*{\cftsubsecpagefont}{}
+\newcommand*{\cftsubsecafterpnum}{}
+
+\newlength{\cftbeforesubsubsecskip}
+\newlength{\cftsubsubsecindent}
+\newlength{\cftsubsubsecnumwidth}
+\newcommand*{\cftsubsubsecfont}{}
+\newcommand*{\cftsubsubsecpresnum}{}
+\newcommand*{\cftsubsubsecaftersnum}{}
+\newcommand*{\cftsubsubsecaftersnumb}{}
+\newcommand*{\cftsubsubsecleader}{}
+\newcommand*{\cftsubsubsecdotsep}{1}
+\newcommand*{\cftsubsubsecpagefont}{}
+\newcommand*{\cftsubsubsecafterpnum}{}
+
+\newlength{\cftbeforeparaskip}
+\newlength{\cftparaindent}
+\newlength{\cftparanumwidth}
+\newcommand*{\cftparafont}{}
+\newcommand*{\cftparapresnum}{}
+\newcommand*{\cftparaaftersnum}{}
+\newcommand*{\cftparaaftersnumb}{}
+\newcommand*{\cftparaleader}{}
+\newcommand*{\cftparadotsep}{1}
+\newcommand*{\cftparapagefont}{}
+\newcommand*{\cftparaafterpnum}{}
+
+\newlength{\cftbeforesubparaskip}
+\newlength{\cftsubparaindent}
+\newlength{\cftsubparanumwidth}
+\newcommand*{\cftsubparafont}{}
+\newcommand*{\cftsubparapresnum}{}
+\newcommand*{\cftsubparaaftersnum}{}
+\newcommand*{\cftsubparaaftersnumb}{}
+\newcommand*{\cftsubparaleader}{}
+\newcommand*{\cftsubparadotsep}{1}
+\newcommand*{\cftsubparapagefont}{}
+\newcommand*{\cftsubparaafterpnum}{}
+
+\newlength{\cftbeforefigskip}
+\newlength{\cftfigindent}
+\newlength{\cftfignumwidth}
+\newcommand*{\cftfigfont}{}
+\newcommand*{\cftfigpresnum}{}
+\newcommand*{\cftfigaftersnum}{}
+\newcommand*{\cftfigaftersnumb}{}
+\newcommand*{\cftfigleader}{}
+\newcommand*{\cftfigdotsep}{1}
+\newcommand*{\cftfigpagefont}{}
+\newcommand*{\cftfigafterpnum}{}
+
+\newlength{\cftbeforesubfigskip}
+\newlength{\cftsubfigindent}
+\newlength{\cftsubfignumwidth}
+\newcommand*{\cftsubfigfont}{}
+\newcommand*{\cftsubfigpresnum}{}
+\newcommand*{\cftsubfigaftersnum}{}
+\newcommand*{\cftsubfigaftersnumb}{}
+\newcommand*{\cftsubfigleader}{}
+\newcommand*{\cftsubfigdotsep}{1}
+\newcommand*{\cftsubfigpagefont}{}
+\newcommand*{\cftsubfigafterpnum}{}
+
+\newlength{\cftbeforetabskip}
+\newlength{\cfttabindent}
+\newlength{\cfttabnumwidth}
+\newcommand*{\cfttabfont}{}
+\newcommand*{\cfttabpresnum}{}
+\newcommand*{\cfttabaftersnum}{}
+\newcommand*{\cfttabaftersnumb}{}
+\newcommand*{\cfttableader}{}
+\newcommand*{\cfttabdotsep}{1}
+\newcommand*{\cfttabpagefont}{}
+\newcommand*{\cfttabafterpnum}{}
+
+\newlength{\cftbeforesubtabskip}
+\newlength{\cftsubtabindent}
+\newlength{\cftsubtabnumwidth}
+\newcommand*{\cftsubtabfont}{}
+\newcommand*{\cftsubtabpresnum}{}
+\newcommand*{\cftsubtabaftersnum}{}
+\newcommand*{\cftsubtabaftersnumb}{}
+\newcommand*{\cftsubtableader}{}
+\newcommand*{\cftsubtabdotsep}{1}
+\newcommand*{\cftsubtabpagefont}{}
+\newcommand*{\cftsubtabafterpnum}{}
+
+\newcommand{\cftsetindents}[3]{}
+
+\newcommand{\pagenumbersoff}[1]{}
+\newcommand{\pagenumberson}[1]{}
+
+\NewDocumentCommand{\newlistof}{o m m m}
+{%
+\IfValueTF{#1}
+{\newfloat{#2}{tbp}{#3}[#1]}
+{\newfloat{#2}{tbp}{#3}}
+\@namedef{listof#2}{\listof{#2}{#4}}
+\@namedef{#2depth}{1}
+\expandafter\newlength\csuse{cftbefore#2skip}
+\expandafter\newlength\csuse{cft#2indent}
+\expandafter\newlength\csuse{cft#2numwidth}
+\@namedef{cft#2font}{}
+\@namedef{cft#2presnum}{}
+\@namedef{cft#2aftersnum}{}
+\@namedef{cft#2aftersnumb}{}
+\@namedef{cft#2leader}{}
+\@namedef{cft#2dotsep}{1}
+\@namedef{cft#2pagefont}{}
+\@namedef{cft#2afterpnum}{}
+}
+
+\newcommand{\cftchapterprecis}[1]{%
+ \cftchapterprecishere{#1}
+ \cftchapterprecistoc{#1}}
+\newcommand{\cftchapterprecishere}[1]{%
+ \begin{quote}\textit{#1}\end{quote}}
+\newcommand{\cftchapterprecistoc}[1]{
+ \addtocontents{toc}{%
+ {
+ \protect\begin{quote}#1\protect\end{quote}}
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-tocloft.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-trivfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-trivfloat.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-trivfloat.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,122 @@
+%%
+%% This is file `lwarp-trivfloat.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `trivfloat')
+%% This is a generated file.
+%% Copyright 2016 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{trivfloat}
+\LWR at origRequirePackage{trivfloat}
+
+\begin{warpall}
+
+
+\end{warpall}
+
+
+\begin{warpHTML}
+
+\AtBeginDocument{\DeclareDocumentCommand{\tfl at chapter@fix}{m m}{}}
+
+\end{warpHTML}
+
+\begin{warpall}
+
+
+\end{warpall}
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-trivfloat.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wallpaper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wallpaper.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wallpaper.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,121 @@
+%%
+%% This is file `lwarp-wallpaper.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `wallpaper')
+%% This is a generated file.
+%% Copyright 2016 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{wallpaper}
+
+\newcommand*{\CenterWallPaper}[2]{}
+\newcommand*{\ThisCenterWallPaper}[2]{}
+\newcommand*{\TileWallPaper}[3]{}
+\newcommand*{\ThisTileWallPaper}[3]{}
+\newcommand*{\TileSquareWallPaper}[2]{}
+\newcommand*{\ThisTileSquareWallPaper}[2]{}
+\newcommand*{\ULCornerWallPaper}[2]{}
+\newcommand*{\ThisULCornerWallPaper}[2]{}
+\newcommand*{\LLCornerWallPaper}[2]{}
+\newcommand*{\ThisLLCornerWallPaper}[2]{}
+\newcommand*{\URCornerWallPaper}[2]{}
+\newcommand*{\ThisURCornerWallPaper}[2]{}
+\newcommand*{\LRCornerWallPaper}[2]{}
+\newcommand*{\ThisLRCornerWallPaper}[2]{}
+\newcommand*{\ClearWallPaper}{}
+\newlength{\wpXoffset}
+\newlength{\wpYoffset}
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-wallpaper.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,158 @@
+%%
+%% This is file `lwarp-wrapfig.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `wrapfig')
+%% This is a generated file.
+%% Copyright 2016 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{wrapfig}
+
+
+\newlength{\LWR at wrapwidth}
+
+
+\newcommand*{\LWR at wrapposition}{}
+
+\newcommand*{\LWR at subwrapfigure}[2]{%
+\LWR at maybeincthisfloat%
+\renewcommand*{\LWR at wrapposition}{}%
+\ifthenelse{%
+\equal{#1}{r}\OR\equal{#1}{R}\OR%
+\equal{#1}{o}\OR\equal{#1}{O}%
+}%
+{\renewcommand*{\LWR at wrapposition}{float:right}}%
+{\renewcommand*{\LWR at wrapposition}{float:left}}%
+\setlength{\LWR at wrapwidth}{#2}%
+\addtolength{\LWR at wrapwidth}{4em}%
+\uselengthunit{PT}%
+\LWR at stoppars%
+\LWR at htmltag{div class="marginblock" id="autofloat-\arabic{LWR at thisfloat}"
+style="width:\rndprintlength{\LWR at wrapwidth} ; %
+\LWR at wrapposition"%
+}
+\LWR at startpars
+}
+
+\NewDocumentEnvironment{wrapfigure}{o m o m}
+{%
+\LWR at subwrapfigure{#2}{#4}%
+\captionsetup{type=figure}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+\NewDocumentEnvironment{wraptable}{o m o m}
+{%
+\LWR at subwrapfigure{#2}{#4}%
+\captionsetup{type=table}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+\NewDocumentEnvironment{wrapfloat}{m o m o m}
+{%
+\LWR at subwrapfigure{#3}{#5}%
+\captionsetup{type=#1}%
+}
+{
+\LWR at htmldivclassend{div}
+}
+
+\newlength{\wrapoverhang}
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-wrapfig.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,142 @@
+%%
+%% This is file `lwarp-xcolor.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `xcolor')
+%% This is a generated file.
+%% Copyright 2016 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{xcolor}
+
+\newcommand*{\LWR at tempcolor}{}
+
+\newcommand*{\LWR at currenttextcolor}{black}
+
+\NewDocumentCommand{\LWR at colorstyle}{m m m +m}{%
+\convertcolorspec{#2}{#3}{HTML}\LWR at tempcolor%
+\ifthenelse{\equal{#1}{color:}}%
+{\renewcommand*{\LWR at currenttextcolor}{\#\LWR at tempcolor}}{}%
+\LWR at htmltagc{span style="#1\#\LWR at tempcolor"{}}%
+\begin{LWR at nestspan}%
+#4%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+\LWR at ensuredoingapar%
+}
+
+
+
+\NewDocumentCommand{\LWR at textcolor}{O{named} m +m}{%
+\begingroup%
+\LWR at colorstyle{color:}{#1}{#2}{#3}%
+\endgroup%
+}
+
+\newcommand*{\LWR at pagecolor}[2][named]{}
+
+\NewDocumentCommand{\LWR at colorbox}{O{named} m m}{%
+\begingroup%
+\LWR at colorstyle{background:}{#1}{#2}{#3}%
+\endgroup%
+}
+
+\NewDocumentCommand{\LWR at fcolorbox}{O{named} m O{named} m m}{%
+\begingroup%
+\LWR at colorstyle{border:1px solid }{#1}{#2}%
+{\LWR at colorstyle{background:}{#3}{#4}{#5}}%
+\endgroup%
+}
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp-xcolor.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,162 @@
+%%
+%% This is file `lwarp-xfrac.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `xfrac')
+%% This is a generated file.
+%% Copyright 2016 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{xfrac}
+
+
+
+\begin{warpall}
+
+\newcommand*{\xfracHTMLfontsize}{.6em}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at htmlsmallfontstart}{%
+\LWR at htmltagc{span style="font-size:\xfracHTMLfontsize"{}}%
+\LWR at nestspan%
+}
+
+\newcommand*{\LWR at htmlsmallfontend}{%
+\LWR at htmltagc{/span}%
+\endLWR at nestspan%
+}
+\NewDocumentCommand{\LWR at noscalebox}{m o m}{#3}
+
+\DeclareInstance{xfrac}{default}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+scaling = false
+}
+\DeclareInstance{xfrac}{lmr}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+scaling = false
+}
+\DeclareInstance{xfrac}{lmss}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+scaling = false
+}
+\DeclareInstance{xfrac}{lmtt}{text}{
+numerator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart\textsuperscript{#1}\,\LWR at htmlsmallfontend},
+denominator-format = {%
+\let\scalebox\LWR at noscalebox%
+\LWR at htmlsmallfontstart{}\,#1\LWR at htmlsmallfontend},
+scaling = false
+}
+
+\end{warpHTML}
+
+
+
+\endinput
+%%
+%% End of file `lwarp-xfrac.sty'.
Added: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1,4861 @@
+%%
+%% This is file `lwarp.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `package')
+%% This is a generated file.
+%% Copyright 2016 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.
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{lwarp}
+ [2017/02/09 v0.20 Allows LaTeX to directly produce HTML5 output.]
+
+
+
+
+
+
+
+\RequirePackage{iftex}
+
+\ifLuaTeX
+\RequirePackage{luatex85}% until the geometry package is updated
+\fi
+
+\RequirePackage{newunicodechar}
+
+\newunicodechar{⨯}{\texttimes}
+
+\ifPDFTeX
+\newunicodechar{ff}{ff}
+\newunicodechar{fi}{fi}
+\newunicodechar{fl}{fl}
+\newunicodechar{ffi}{ffi}
+\newunicodechar{ffl}{ffl}
+\newunicodechar{—}{---}
+\newunicodechar{–}{--}
+\RequirePackage{upquote}
+\else
+\fi
+\RequirePackage{etoolbox}[2011/01/03]
+
+\RequirePackage{ifplatform}% sense op-system platform
+\RequirePackage{comment}
+\excludecomment{testing}
+
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{family=LWR,prefix=LWR@}
+
+\newbool{warpingprint}
+\newbool{warpingHTML}
+\newbool{mathjax}
+
+\newcommand{\warpprintonly}[1]{\ifbool{warpingprint}{#1}{}}
+\newcommand{\warpHTMLonly}[1]{\ifbool{warpingHTML}{#1}{}}
+
+\includecomment{warpall}
+
+\DeclareVoidOption{warpprint}{%
+\PackageInfo{lwarp}{Using option 'warpprint'}
+\includecomment{warpprint}%
+\excludecomment{warpHTML}%
+\booltrue{warpingprint}%
+\boolfalse{warpingHTML}%
+}
+
+\DeclareVoidOption{warpHTML}{%
+\PackageInfo{lwarp}{Using option 'warpHTML'}
+\excludecomment{warpprint}%
+\includecomment{warpHTML}%
+\booltrue{warpingHTML}%
+\boolfalse{warpingprint}%
+}
+
+\DeclareVoidOption{mathsvg}{%
+\PackageInfo{lwarp}{Using option 'mathsvg'}
+\boolfalse{mathjax}%
+}
+\DeclareVoidOption{mathjax}{%
+\PackageInfo{lwarp}{Using option 'mathjax'}
+\booltrue{mathjax}%
+}
+
+\DeclareStringOption[\jobname]{BaseJobname}
+
+\includecomment{warpprint}%
+\excludecomment{warpHTML}%
+\booltrue{warpingprint}%
+\boolfalse{warpingHTML}%
+\boolfalse{mathjax}%
+
+
+\ProcessKeyvalOptions*\relax
+
+\providecommand*{\BaseJobname}{\LWR at BaseJobname}
+
+\def\@nameedef#1{\expandafter\edef\csname #1\endcsname}
+
+
+
+\begin{warpall}
+
+
+\RequirePackage{iftex}
+\newif\ifxetexorluatex
+\ifXeTeX
+ \xetexorluatextrue
+\else
+ \ifLuaTeX
+ \xetexorluatextrue
+ \else
+ \xetexorluatexfalse
+ \fi
+\fi
+
+\end{warpall}
+
+\begin{warpHTML}
+\ifxetexorluatex
+\defaultfontfeatures[\rmfamily]{Ligatures={NoCommon,TeX}}
+\defaultfontfeatures[\sffamily]{Ligatures={NoCommon,TeX}}
+\defaultfontfeatures[\ttfamily]{Ligatures=NoCommon}
+\else
+
+\RequirePackage {microtype}
+
+\microtypesetup{
+protrusion=false,
+expansion=false,
+tracking=false,
+kerning=false,
+spacing=false}
+
+\DisableLigatures[f,q,t,T,Q]{encoding = *,family = *}
+\fi
+\end{warpHTML}
+
+\begin{warpHTML}
+\RequirePackage[paperheight=190in,paperwidth=20in,%
+left=7in,right=7in,%
+top=1in,bottom=1in,%
+]{geometry}
+\end{warpHTML}
+
+\begin{warpall}
+
+\RequirePackage{xparse}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\RequirePackage{expl3}
+
+
+
+\RequirePackage{gettitlestring}
+
+\RequirePackage{everyhook}
+\end{warpHTML}
+
+\begin{warpall}
+
+\RequirePackage{fancyvrb}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\RequirePackage{xifthen}
+
+\RequirePackage{xstring}
+
+\RequirePackage{makeidx}
+\makeindex
+
+\RequirePackage{calc}
+
+\RequirePackage{newfloat}
+
+\RequirePackage{caption}
+
+\RequirePackage{subcaption}
+
+\RequirePackage{enumitem}
+\setlist[itemize]{leftmargin=0em}
+\setlist[enumerate]{leftmargin=0em}
+\setlist[description]{leftmargin=0em}
+
+\RequirePackage[continuous]{pagenote}
+\makepagenote
+\let\LWR at origmakepagenote\makepagenote
+\let\LWR at origprintnotes\printnotes
+\let\LWR at origpagenote\pagenote
+\end{warpHTML}
+
+\begin{warpall}
+
+\RequirePackage{titling}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\RequirePackage{zref}
+
+\PassOptionsToPackage{leqno,fleqn}{amsmath}
+\RequirePackage{amsmath}
+
+\RequirePackage{environ}
+
+\RequirePackage[nopatches]{titleps}
+\let\LWR at origpagestyle\pagestyle
+\renewcommand*{\pagestyle}[1]{}
+\let\LWR at origthispagestyle\thispagestyle
+\renewcommand*{\thispagestyle}[1]{}
+\let\LWR at origpagenumbering\pagenumbering
+\renewcommand*{\pagenumbering}[1]{}
+
+
+\RequirePackage{xfrac}
+
+\RequirePackage{printlen}
+
+\end{warpHTML}
+
+\begin{warpHTML}
+
+\let\LWR at origRequirePackage\RequirePackage
+
+\newcommand*{\LWR at requirepackagenames}{}
+
+\newcommand*\LWR at findword[3][,]{%
+ \StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}%
+}
+\newcommand*{\LWR at lookforpackagename}[1]{
+\LWR at findword{\LWR at requirepackagenames}{#1}[\LWR at strresult]
+\IfStrEq{\LWR at strresult}{}
+{}% no filename
+{% yes filename
+\IfFileExists{lwarp-\LWR at strresult.sty}
+{% latex_html_ file found
+\StrSubstitute
+{\LWR at requirepackagenames}
+{\LWR at strresult}
+{lwarp-\LWR at strresult}[\LWR at requirepackagenames]
+}
+{}% no latex_html_* file
+}% yes filename
+}
+\RenewDocumentCommand{\RequirePackage}{o m o}{%
+\renewcommand*{\LWR at requirepackagenames}{#2}
+\LWR at lookforpackagename{1}
+\LWR at lookforpackagename{2}
+\LWR at lookforpackagename{3}
+\LWR at lookforpackagename{4}
+\LWR at lookforpackagename{5}
+\LWR at lookforpackagename{6}
+\LWR at lookforpackagename{7}
+\LWR at lookforpackagename{8}
+\LWR at lookforpackagename{9}
+\IfValueTF{#1}
+{% options given
+\IfValueTF{#3}% version given?
+{\LWR at origRequirePackage[#1]{\LWR at requirepackagenames}[#3]}
+{\LWR at origRequirePackage[#1]{\LWR at requirepackagenames}}
+}
+{% no options given
+\IfValueTF{#3}% version given?
+{\LWR at origRequirePackage{\LWR at requirepackagenames}[#3]}
+{\LWR at origRequirePackage{\LWR at requirepackagenames}}
+}
+}
+\let\usepackage\RequirePackage
+
+\NewDocumentCommand{\LWR at ProvidesPackagePass}{m o}{
+\PackageInfo{lwarp}{Using the lwarp version of package `#1', including options,}%
+\IfValueTF{#2}
+{\ProvidesPackage{lwarp-#1}[#2]}
+{\ProvidesPackage{lwarp-#1}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{#1}}
+\ProcessOptions\relax
+
+\IfValueTF{#2}
+{\LWR at origRequirePackage{#1}[#2]}
+{\LWR at origRequirePackage{#1}}
+}
+
+\NewDocumentCommand{\LWR at ProvidesPackageDrop}{m o}{
+\PackageInfo{lwarp}{Using the lwarp version of package `#1', discarding options,}%
+\IfValueTF{#2}
+{\ProvidesPackage{lwarp-#1}[#2]}
+{\ProvidesPackage{lwarp-#1}}
+\DeclareOption*{}
+\ProcessOptions\relax
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at copyfile}[2]{%
+\newwrite\copyfile % open the file to write to
+\immediate\openout\copyfile=#2
+\newread\file % open the file to read from
+\openin\file=#1
+\begingroup\endlinechar=-1
+\makeatletter
+\loop\unless\ifeof\file
+ \read\file to\fileline % Read one line and store it into \fileline
+ \immediate\write\copyfile{\unexpanded\expandafter{\fileline}}%
+\repeat
+\closeout\copyfile
+\endgroup
+}
+
+\end{warpHTML}
+
+
+\newbool{LWR at tracinglwarp}
+\newcommand{\tracinglwarp}{\booltrue{LWR at tracinglwarp}}
+\newcommand{\LWR at traceinfo}[1]{%
+\ifbool{LWR at tracinglwarp}%
+{\PackageInfo{lwarp}{#1 : }}%
+{}%
+}
+
+
+\begin{warpHTML}
+
+\let\LWR at origtextit\textit
+\let\LWR at origtextbf\textbf
+\let\LWR at origtexttt\texttt
+\let\LWR at origtextsc\textsc
+\let\LWR at origtextsf\textsf
+\let\LWR at origtextrm\textrm
+\let\LWR at origbfseries\bfseries
+\let\LWR at origrmfamily\rmfamily
+\let\LWR at origttfamily\ttfamily
+\let\LWR at orignormalfont\normalfont
+
+\let\LWR at origraggedright\raggedright
+\let\LWR at origonecolumn\onecolumn
+
+\let\LWR at origtextsuperscript\textsuperscript
+\let\LWR at origtextsubscript\textsubscript
+
+\let\LWR at origscriptsize\scriptsize
+
+\let\LWR at orignewpage\newpage
+
+\let\LWR at origminipage\minipage
+\let\LWR at origendminipage\endminipage
+
+\let\LWR at orignewline\newline
+
+\let\LWR at origitem\item
+
+\let\LWR at origpar\par
+
+\let\LWR at origfootnote\footnote
+\let\LWR at orig@mpfootnotetext\@mpfootnotetext
+
+\let\LWR at origclearpage\clearpage
+\let\clearpage\relax
+\let\cleardoublepage\relax
+
+\end{warpHTML}
+
+\begin{warpall}
+\newbool{usingOSwindows}
+\boolfalse{usingOSwindows}
+
+
+\newcommand*{\OSPathSymbol}{/}
+
+\newcommand*{\OSmkdir}{mkdir } % trailing space is required
+
+\newcommand*{\OSrm}{rm }
+
+\newcommand*{\OSmv}{mv }
+
+\newcommand*{\OSShellPath}{/bin/sh}
+
+
+\newcommand*{\warpOSwindows}
+{
+\booltrue{usingOSwindows}
+\renewcommand*{\OSPathSymbol}{\@backslashchar}
+\renewcommand*{\OSmkdir}{MD }
+\renewcommand*{\OSrm}{DEL }
+\renewcommand*{\OSmv}{MOVE }
+}
+\ifwindows
+\warpOSwindows
+\fi
+
+\end{warpall}
+
+
+\begin{warpHTML}
+
+
+
+\newcommand*{\LWR at depthnone}{-5}
+\newcommand*{\LWR at depthfinished}{-4}
+\newcommand*{\LWR at depthpart}{-1}
+\newcommand*{\LWR at depthchapter}{0}
+\newcommand*{\LWR at depthsection}{1}
+\newcommand*{\LWR at depthsubsection}{2}
+\newcommand*{\LWR at depthsubsubsection}{3}
+\newcommand*{\LWR at depthparagraph}{4}
+\newcommand*{\LWR at depthsubparagraph}{5}
+\newcommand*{\LWR at depthlist}{6}
+\newcommand*{\LWR at depthlistitem}{7}
+
+
+\newcommand*{\LWR at closeone}{}% top of the stack
+\newcommand*{\LWR at closetwo}{}
+\newcommand*{\LWR at closethree}{}
+\newcommand*{\LWR at closefour}{}
+\newcommand*{\LWR at closefive}{}
+\newcommand*{\LWR at closesix}{}
+\newcommand*{\LWR at closeseven}{}
+\newcommand*{\LWR at closeeight}{}
+\newcommand*{\LWR at closenine}{}
+\newcommand*{\LWR at closeten}{}
+\newcommand*{\LWR at closeeleven}{}
+\newcommand*{\LWR at closetwelve}{}
+
+
+
+
+\newcommand*{\LWR at closedepthone}{\LWR at depthnone}% top of the stack
+\newcommand*{\LWR at closedepthtwo}{\LWR at depthnone}
+\newcommand*{\LWR at closedepththree}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthfour}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthfive}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthsix}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthseven}{\LWR at depthnone}
+\newcommand*{\LWR at closedeptheight}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthnine}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthten}{\LWR at depthnone}
+\newcommand*{\LWR at closedeptheleven}{\LWR at depthnone}
+\newcommand*{\LWR at closedepthtwelve}{\LWR at depthnone}
+
+
+
+\NewDocumentCommand{\pushclose}{m m}
+{
+\let\LWR at closetwelve\LWR at closeeleven
+\let\LWR at closeeleven\LWR at closeten
+\let\LWR at closeten\LWR at closenine
+\let\LWR at closenine\LWR at closeeight
+\let\LWR at closeeight\LWR at closeseven
+\let\LWR at closeseven\LWR at closesix
+\let\LWR at closesix\LWR at closefive
+\let\LWR at closefive\LWR at closefour
+\let\LWR at closefour\LWR at closethree
+\let\LWR at closethree\LWR at closetwo
+\let\LWR at closetwo\LWR at closeone
+\let\LWR at closeone#1
+\let\LWR at closedepthtwelve\LWR at closedeptheleven
+\let\LWR at closedepthelevel\LWR at closedepthten
+\let\LWR at closedepthten\LWR at closedepthnine
+\let\LWR at closedepthnine\LWR at closedeptheight
+\let\LWR at closedeptheight\LWR at closedepthseven
+\let\LWR at closedepthseven\LWR at closedepthsix
+\let\LWR at closedepthsix\LWR at closedepthfive
+\let\LWR at closedepthfive\LWR at closedepthfour
+\let\LWR at closedepthfour\LWR at closedepththree
+\let\LWR at closedepththree\LWR at closedepthtwo
+\let\LWR at closedepthtwo\LWR at closedepthone
+\let\LWR at closedepthone#2
+}
+
+
+\newcommand*{\popclose}
+{
+\let\LWR at closeone\LWR at closetwo
+\let\LWR at closetwo\LWR at closethree
+\let\LWR at closethree\LWR at closefour
+\let\LWR at closefour\LWR at closefive
+\let\LWR at closefive\LWR at closesix
+\let\LWR at closesix\LWR at closeseven
+\let\LWR at closeseven\LWR at closeeight
+\let\LWR at closeeight\LWR at closenine
+\let\LWR at closenine\LWR at closeten
+\let\LWR at closeten\LWR at closeeleven
+\let\LWR at closeeleven\LWR at closetwelve
+\let\LWR at closedepthone\LWR at closedepthtwo
+\let\LWR at closedepthtwo\LWR at closedepththree
+\let\LWR at closedepththree\LWR at closedepthfour
+\let\LWR at closedepthfour\LWR at closedepthfive
+\let\LWR at closedepthfive\LWR at closedepthsix
+\let\LWR at closedepthsix\LWR at closedepthseven
+\let\LWR at closedepthseven\LWR at closedeptheight
+\let\LWR at closedeptheight\LWR at closedepthnine
+\let\LWR at closedepthnine\LWR at closedepthten
+\let\LWR at closedepthten\LWR at closedeptheleven
+\let\LWR at closedeptheleven\LWR at closedepthtwelve
+}
+
+\end{warpHTML}
+
+\begin{warpHTML}
+\NewDocumentCommand{\LWR at setexparray}{m m m}{%
+\expandafter\edef\csname #1#2\endcsname{\expandonce#3}%
+}
+\newcommand*{\LWR at getexparray}[2]{\csuse{#1#2}}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\let\LWR at origampersand\&
+\newcommand*{\HTMLentity}[1]{\LWR at origampersand#1;}
+\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}}
+
+\renewcommand*{\&}{\HTMLentity{amp}}
+
+\let\LWR at origtextless\textless
+\renewcommand*{\textless}{\HTMLentity{lt}}
+
+\let\LWR at origtextgreater\textgreater
+\renewcommand*{\textgreater}{\HTMLentity{gt}}
+
+\end{warpHTML}
+
+
+
+\begin{warpall}
+
+\providecommand*{\BaseJobname}{\jobname}
+
+\providecommand*{\HTMLFileName}{}
+\providecommand*{\HomeHTMLFileName}{\BaseJobname}
+
+\newcommand*{\SetHTMLFileNumber}[1]{%
+\setcounter{LWR at htmlfilenumber}{#1}%
+}
+
+\newbool{FileSectionNames}
+\booltrue{FileSectionNames}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\newcounter{LWR at htmlfilenumber}
+\setcounter{LWR at htmlfilenumber}{0}
+
+\newcommand*{\LWR at htmlsectionfilename}[1]{%
+\LWR at traceinfo{LWR at htmlsectionfilename A}%
+\LWR at traceinfo{about to assign temp}%
+\edef\LWR at tempone{#1}%
+\LWR at traceinfo{about to compare with ??}%
+\ifthenelse{\equal{\LWR at tempone}{??}}%
+{%
+\LWR at traceinfo{found ??}%
+}{%
+\LWR at traceinfo{not found ??}%
+}%
+\LWR at traceinfo{about to compare with zero or empty}%
+\ifthenelse{%
+\equal{\LWR at tempone}{0}%
+\OR \equal{\LWR at tempone}{}%
+\OR \equal{\LWR at tempone}{??}%
+}%
+{%
+\LWR at traceinfo{LWR at htmlsectionfilename B \HomeHTMLFileName.html}%
+\HomeHTMLFileName.html%
+}%
+{%
+\LWR at traceinfo{LWR at htmlsectionfilename C}%
+\ifthenelse{%
+\equal{\HTMLFileName}{} \AND \equal{\LWR at tempone}{Index} \OR \equal{\LWR at tempone}{index}%
+}%
+{\_#1.html}%
+{\HTMLFileName#1.html}%
+}%
+\LWR at traceinfo{LWR at htmlsectionfilename Z}%
+}
+
+\newcommand*{\LWR at htmlrefsectionfilename}[1]{%
+\LWR at traceinfo{LWR at htmlrefsectionfilename A: !#1!}%
+\LWR at htmlsectionfilename{\LWR at htmlfileref{#1}}%
+\LWR at traceinfo{LWR at htmlrefsectionfilename B}%
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LinkHome}{%
+\LWR at subhyperrefclass{%
+\HomeHTMLFileName.html}%
+{Home}{linkhome}%
+}
+
+\newcommand*{\LWR at topnavigation}{
+\LWR at htmlelementclassline{nav}{topnavigation}{\LinkHome}
+}
+
+\newcommand*{\LWR at botnavigation}{
+\LWR at htmlelementclassline{nav}{botnavigation}{\LinkHome}
+}
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\newcommand*{\PrintStack}{
+\LWR at startpars
+\LWR at closedepthone{} \LWR at closedepthtwo{} \LWR at closedepththree{}
+\LWR at closedepthfour{} \LWR at closedepthfive{} \LWR at closedepthsix{}
+\LWR at closedepthseven{} \LWR at closedeptheight{} \LWR at closedepthnine{}
+\LWR at closedepthten{} \LWR at closedeptheleven{} \LWR at closedepthtwelve{}
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at closeoneprevious}{%
+
+\LWR at closeone{}
+
+\popclose{}
+}
+
+\newcommand*{\LWR at closeprevious}[1]{
+\LWR at stoppars
+\whiledo{\not\(\LWR at closedepthone<#1\)}{\LWR at closeoneprevious}
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+
+\newcommand*{\LWR at tagpart}{h2}
+\newcommand*{\LWR at tagpartend}{/h2}
+\newcommand*{\LWR at tagchapter}{h3}
+\newcommand*{\LWR at tagchapterend}{/h3}
+\newcommand*{\LWR at tagsection}{h4}
+\newcommand*{\LWR at tagsectionend}{/h4}
+\newcommand*{\LWR at tagsubsection}{h5}
+\newcommand*{\LWR at tagsubsectionend}{/h5}
+\newcommand*{\LWR at tagsubsubsection}{h6}
+\newcommand*{\LWR at tagsubsubsectionend}{/h6}
+\newcommand*{\LWR at tagparagraph}{span class="paragraph"{}}
+\newcommand*{\LWR at tagparagraphend}{/span}
+\newcommand*{\LWR at tagsubparagraph}{span class="subparagraph"{}}
+\newcommand*{\LWR at tagsubparagraphend}{/span}
+
+\newcommand*{\LWR at tagregularparagraph}{p}
+
+
+\newcommand*{\LWR at htmltagc}[1]{%
+{%
+\LWR at origttfamily%
+\LWR at origtextless#1\LWR at origtextgreater%
+}%
+}
+
+\newenvironment*{LWR at nestspan}
+{%
+\addtocounter{LWR at spandepth}{1}%
+\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+}%
+{\addtocounter{LWR at spandepth}{-1}}
+
+\NewDocumentCommand{\LWR at htmlspan}{m +m}{%
+\LWR at ensuredoingapar%
+\LWR at htmltagc{#1}%
+\begin{LWR at nestspan}%
+#2%
+\LWR at htmltagc{/#1}%
+\end{LWR at nestspan}%
+}
+
+\NewDocumentCommand{\LWR at htmlspanclass}{m o +m}{%
+\LWR at ensuredoingapar%
+\LWR at subhtmlelementclass{span}{#1}[#2]%
+\begin{LWR at nestspan}%
+#3%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+
+
+\newcommand*{\LWR at htmltagb}[1]{%
+\LWR at htmltagc{#1}%
+\endgroup%
+}
+
+\newcommand*{\LWR at htmltag}{%
+\begingroup\catcode`\_=12
+\LWR at htmltagb%
+}
+
+
+\newcommand*{\LWR at htmlopencomment}{%
+\begingroup\LWR at origttfamily\LWR at origtextless{}!{-}{-}\endgroup%
+}
+
+\newcommand*{\LWR at htmlclosecomment}{%
+\begingroup\LWR at origttfamily{-}{-}\LWR at origtextgreater{}\endgroup%
+}
+
+\newcommand{\LWR at htmlcomment}[1]{%
+\LWR at htmlopencomment{}%
+\LWR at origtextrm{#1}%
+\LWR at htmlclosecomment{}}
+\newcommand{\LWR at htmlblockcommentb}[1]
+{\LWR at stoppars\LWR at htmlcomment{#1}\LWR at startpars\endgroup}
+
+\newcommand{\LWR at htmlblockcomment}
+{%
+\begingroup\catcode`\_=12%
+\LWR at htmlblockcommentb%
+}
+
+\newcommand*{\LWR at htmlblocktag}[1]{%
+\LWR at stoppars%
+\LWR at htmltag{#1}%
+\LWR at startpars%
+}
+
+\NewDocumentCommand{\LWR at htmlblocktagcomment}{m +m}{%
+\LWR at stoppars%
+\LWR at htmltag{#1}\LWR at htmlcomment{#2}\LWR at orignewline%
+\LWR at startpars%
+}
+
+
+\NewDocumentCommand{\LWR at subhtmlelementclass}{m m o}{%
+\IfValueTF{#3}%
+{% option
+\ifthenelse{\equal{#3}{}}%
+{\LWR at htmltag{#1 class="#2"}}% empty option
+{\LWR at htmltag{#1 class="#2" style="#3"}}% non-empty option
+}% option
+{\LWR at htmltag{#1 class="#2"}}% no option
+}
+
+\NewDocumentCommand{\LWR at htmlelementclass}{m m o}{%
+\LWR at stoppars%
+\LWR at subhtmlelementclass{#1}{#2}[#3]%
+\LWR at startpars%
+}
+
+\newcommand*{\LWR at htmlelementclassend}[2]{%
+\LWR at stoppars%
+\LWR at htmltag{/#1}%
+\LWR at htmlcomment{End of #1 ``#2''}%
+\LWR at startpars%
+}
+
+\NewDocumentCommand{\LWR at htmldivclass}{m o}{%
+\LWR at htmlelementclass{div}{#1}[#2]%
+}
+
+\newcommand*{\LWR at htmldivclassend}[1]{%
+\LWR at htmlelementclassend{div}{#1}%
+}
+
+
+
+\NewDocumentCommand{\LWR at htmlelementclassline}{m m o +m}{%
+\LWR at stoppars
+\LWR at subhtmlelementclass{#1}{#2}[#3]%
+#4%
+\LWR at htmltag{/#1}
+\LWR at startpars
+}
+
+
+\newcommand*{\LWR at htmlelement}[1]{%
+\LWR at htmlblocktag{#1}
+}
+
+\newcommand*{\LWR at htmlelementend}[1]{%
+\LWR at stoppars
+\LWR at htmltag{/#1}
+\LWR at startpars
+}
+
+\end{warpHTML}
+
+
+
+
+\begin{warpHTML}
+\NewDocumentEnvironment{BlockClass}{m o}
+{
+\LWR at htmldivclass{#1}[#2]
+}
+{
+\LWR at htmldivclassend{#1}
+}
+\end{warpHTML}
+\begin{warpprint}
+\NewDocumentEnvironment{BlockClass}{m o}{}{}
+\end{warpprint}
+\begin{warpHTML}
+\newcommand{\BlockClassSingle}[2]{%
+\LWR at htmlelementclassline{div}{#1}{#2}%
+}
+\end{warpHTML}
+\begin{warpprint}
+\newcommand{\BlockClassSingle}[2]{#2}
+\end{warpprint}
+
+\begin{warpHTML}
+\NewDocumentCommand{\InlineClass}{m o m}{%
+\LWR at htmlspanclass{#1}[#2]{#3}%
+}
+\end{warpHTML}
+\begin{warpprint}
+\NewDocumentCommand{\InlineClass}{m o m}{#3}
+\end{warpprint}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at printclosepart}
+ {\LWR at htmlcomment{Closing part}}
+\newcommand*{\LWR at printclosechapter}
+ {\LWR at htmlcomment{Closing chapter}}
+\newcommand*{\LWR at printclosesection}
+ {\LWR at htmlcomment{Closing section}}
+\newcommand*{\LWR at printclosesubsection}
+ {\LWR at htmlcomment{Closing subsection}}
+\newcommand*{\LWR at printclosesubsubsection}
+ {\LWR at htmlcomment{Closing subsubsection}}
+\newcommand*{\LWR at printcloseparagraph}
+ {\LWR at htmlcomment{Closing paragraph}}
+\newcommand*{\LWR at printclosesubparagraph}
+ {\LWR at htmlcomment{Closing subparagraph}}
+
+\newcommand*{\LWR at printcloselistitem}
+ {\LWR at htmltag{/li}}
+\newcommand*{\LWR at printclosedescitem}
+ {\LWR at htmltag{/dd}}
+\newcommand*{\LWR at printcloseitemize}
+ {\LWR at htmltag{/ul}}
+\newcommand*{\LWR at printcloseenumerate}
+ {\LWR at htmltag{/ol}}
+\newcommand*{\LWR at printclosedescription}
+ {\LWR at htmltag{/dl}}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcounter{LWR at spandepth}
+\setcounter{LWR at spandepth}{0}
+
+\newbool{LWR at doingstartpars}
+\boolfalse{LWR at doingstartpars}
+
+\newbool{LWR at doingapar}
+\global\boolfalse{LWR at doingapar}
+
+\newcommand*{\LWR at ensuredoingapar}{%
+\ifbool{LWR at doingstartpars}%
+{\global\booltrue{LWR at doingapar}}%
+{}%
+}
+
+\newcommand*{\LWR at openparagraph}
+{%
+\ifbool{LWR at doingstartpars}%
+{% handling pars
+\ifthenelse{%
+\cnttest{\value{LWR at lateximagedepth}}{>}{0} \OR%
+\cnttest{\value{LWR at spandepth}}{>}{0}%
+}% nested par tags?
+{}% no nested par tags
+{% yes nest par tags
+\LWR at htmltagc{\LWR at tagregularparagraph}%
+\ifnumcomp{\@listdepth}{>}{0}%
+{%
+\LWR at orighspace{1in}%
+}{}%
+\global\booltrue{LWR at doingapar}%
+\let\par\LWR at closeparagraph%
+}% end of yes nest par tags
+}% end of handling pars
+{}% not handling pars
+}
+
+\newcommand*{\LWR at closeparagraph}
+{%
+\ifbool{LWR at doingapar}%
+{% handling pars
+\ifthenelse{%
+\cnttest{\value{LWR at lateximagedepth}}{>}{0} \OR%
+\cnttest{\value{LWR at spandepth}}{>}{0}%
+}%
+{% no nested par tags
+\ifthenelse{%
+\cnttest{\value{LWR at spandepth}}{>}{0}%
+\AND%
+\cnttest{\value{LWR at lateximagedepth}}{=}{0}%
+}%
+{%
+\ifbool{LWR at intabularmetadata}{}{\unskip\LWR at htmltagc{br /}}%
+}%
+{}%
+}% no nested par tags
+{% yes nest par tags
+\unskip%
+\LWR at htmltagc{/\LWR at tagregularparagraph}%
+\global\boolfalse{LWR at doingapar}%
+\global\boolfalse{LWR at minipagethispar}%
+}% end of yes nest par tags
+}% end of handling pars
+{% not handling pars
+\ifthenelse{\cnttest{\value{LWR at spandepth}}{>}{0}}%
+{\ifbool{LWR at intabularmetadata}{}{\unskip\LWR at htmltagc{br /}}}%
+{}%
+}% not handling pars
+\LWR at origpar%
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at startpars}%
+{%
+\ifbool{LWR at doingstartpars}%
+{}%
+{%
+\PushPreHook{par}{\LWR at openparagraph}%
+\let\par\LWR at closeparagraph
+
+}% an intentionally blank line
+\global\setbool{LWR at doingstartpars}{true}%
+\global\boolfalse{LWR at doingapar}%
+}
+
+\newcommand*{\LWR at stoppars}%
+{%
+\ifbool{LWR at doingapar}%
+{%
+\unskip%
+\LWR at htmltagc{/\LWR at tagregularparagraph}%
+\global\boolfalse{LWR at doingapar}%
+\global\boolfalse{LWR at minipagethispar}
+
+}% an intentionally blank line
+{}%
+\ifbool{LWR at doingstartpars}%
+{%
+\ClearPreHook{par}%
+}%
+{}%
+\global\setbool{LWR at doingstartpars}{false}%
+\global\boolfalse{LWR at doingapar}%
+}
+
+\end{warpHTML}
+
+
+\begin{warpall}
+
+\newcommand{\LWR at firstpagetop}{} % for the home page alone
+\newcommand{\LWR at pagetop}{} % for all other pages
+\newcommand{\LWR at pagebottom}{}
+
+\newcommand{\LWR at setfirstpagetopb}[1]{%
+\renewcommand{\LWR at firstpagetop}{#1}
+\catcode`\_=8
+}
+\newcommand{\SetFirstPageTop}{%
+\catcode`\_=12
+\LWR at setfirstpagetopb
+}
+\newcommand{\LWR at setpagetopb}[1]{%
+\renewcommand{\LWR at pagetop}{#1}
+\catcode`\_=8
+}
+\newcommand{\SetPageTop}{%
+\catcode`\_=12
+\LWR at setpagetopb
+}
+\newcommand{\LWR at setpagebottomb}[1]{%
+\renewcommand{\LWR at pagebottom}{#1}
+\catcode`\_=8
+}
+\newcommand{\SetPageBottom}{%
+\catcode`\_=12
+\LWR at setpagebottomb
+}
+
+\end{warpall}
+
+
+\begin{warpHTML}
+
+
+\newcommand*{\LWR at currentcss}{lwarp.css}
+
+\newcommand*{\LWR at newcssb}[1]{%
+\renewcommand*{\LWR at currentcss}{#1}
+\catcode`\_=8
+}
+
+\newcommand*{\NewCSS}{
+\catcode`\_=12
+\LWR at newcssb
+}
+\end{warpHTML}
+\begin{warpprint}
+\newcommand*{\NewCSS}[1]{}
+\end{warpprint}
+
+
+\begin{warpHTML}
+
+
+\newcommand{\LWR at currentHTMLdescription}{}
+
+\newcommand{\NewHTMLdescription}[1]{%
+\renewcommand{\LWR at currentHTMLdescription}{#1}
+}
+
+\end{warpHTML}
+\begin{warpprint}
+\newcommand{\NewHTMLdescription}[1]{}
+\end{warpprint}
+
+\begin{warpHTML}
+
+\AtEndPreamble{
+
+\renewcommand*{\notedivision}
+ {\BlockClassSingle{footnoteheader}{}}
+
+
+\renewcommand{\pagenotesubhead}[2]{}
+\let\footnote\LWR at origpagenote
+\renewcommand{\notenuminnotes}[1]{%
+ \textsuperscript{#1} }
+
+\let\LWR at orignoteentry\noteentry
+\renewcommand{\noteentry}[4]{%
+\begingroup%
+\renewcommand*{\@currentlabel}{#1}%
+\renewcommand*{\cref at currentlabel}{[pagenote][#1][]{#1}}%
+\LWR at orignoteentry{#1}{#2}{#3}{#4}%
+\endgroup%
+}
+
+\newcommand*{\LWR at printpendingnotes}{
+\ifthenelse{\cnttest{\value{pagenote}}{>}{0}}%
+{
+\begin{BlockClass}{footnotes}
+\LWR at origprintnotes*
+\setcounter{pagenote}{0}
+\end{BlockClass}
+}
+{}
+}
+
+}% \AtEndPreamble
+
+\end{warpHTML}
+
+\begin{warpHTML}
+
+\renewcommand{\marginpar}[2][]{%
+\LWR at htmlspanclass{marginpar}{#2}%
+}
+
+\end{warpHTML}
+
+
+\begin{warpall}
+
+\newcounter{FileDepth}
+\setcounter{FileDepth}{-5}
+
+\newbool{CombineHigherDepths}
+\booltrue{CombineHigherDepths}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at thisfilename}{}
+
+\newcommand*{\LWR at thisnewfilename}{}
+
+\newcommand*{\LWR at filenamenoblanks}[1]{%
+\begingroup
+
+\renewcommand*{\HTMLunicode}[1]{}
+\renewcommand*{\HTMLentity}[1]{##1}
+\renewcommand*{\LWR at htmltagc}[1]{}
+\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3}
+\renewcommand*{\&}{and}
+\renewcommand{\textit}[1]{##1}
+\renewcommand{\textsc}[1]{##1}
+\renewcommand{\textsl}[1]{##1}
+\renewcommand{\textbf}[1]{##1}
+\renewcommand{\texttt}[1]{##1}
+\renewcommand{\textsf}[1]{##1}
+\renewcommand{\textrm}[1]{##1}
+\renewcommand{\textsuperscript}[1]{##1}
+\renewcommand{\textsubscript}[1]{##1}
+\edef\LWR at thisnewfilename{#1}
+\fullexpandarg
+\StrSubstitute{\LWR at thisnewfilename}{ }{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{,}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{'}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\LWR at origampersand}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{+}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{,}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{/}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{:}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{;}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{=}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{?}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{@}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{"}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\textless}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\textgreater}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\#}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\%}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\{}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{\}}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{|}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}%
+{\textbackslash}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{^}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{~{}}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{[}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{]}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{`}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-s-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-S-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-a-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-A-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-an-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-AN-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-to-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-TO-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-by-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-BY-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-of-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-OF-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-and-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-AND-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-for-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-FOR-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-the-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-THE-}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{-----}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{----}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{---}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{--}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{—}{-}[\LWR at thisnewfilename]
+\StrSubstitute{\LWR at thisnewfilename}{–}{-}[\LWR at thisnewfilename]
+\global\let\LWR at thisfilename\LWR at thisnewfilename% return a global result
+\endgroup
+}
+
+\newcommand*{\LWR at newhtmlfile}[1]{
+
+
+\LWR at htmlelementclassend{section}{textbody}
+
+\LWR at printpendingnotes
+
+\LWR at htmlelement{footer}
+
+\LWR at pagebottom
+
+\LWR at htmlelementend{footer}
+
+\ifnumcomp{\value{LWR at htmlfilenumber}}{>}{0}{\LWR at botnavigation}{}
+
+\LWR at stoppars
+\LWR at htmltag{/body}\LWR at orignewline
+\LWR at htmltag{/html}\LWR at orignewline
+
+\addtocounter{LWR at htmlfilenumber}{1}%
+
+\ifbool{FileSectionNames}%
+{\LWR at filenamenoblanks{#1}}
+{\renewcommand*{\LWR at thisfilename}{\theLWR at htmlfilenumber}}
+
+\LWR at htmlblockcomment{%
+\LWR at origtexttt{|Start file|%
+\LWR at htmlsectionfilename{\LWR at thisfilename}|}%
+}
+
+\LWR at stoppars
+
+\LWR at filestart{ — #1}% there is an EMdash in front of the #1
+
+\LWR at topnavigation
+
+\LWR at htmlelement{header}
+
+\LWR at pagetop
+
+\LWR at htmlelementend{header}
+
+\LWR at printthetitle
+
+\LWR at sidetoc
+
+\LWR at htmlelementclass{section}{textbody}
+
+\LWR at stoppars
+
+\setcounter{LWR at latestautopage}{\value{page}}
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+\newbool{LWR at mainmatter}
+\DeclareDocumentCommand{\mainmatter}{}{%
+\booltrue{LWR at mainmatter}%
+}
+
+\DeclareDocumentCommand{\frontmatter}{}{%
+\boolfalse{LWR at mainmatter}%
+}
+
+\DeclareDocumentCommand{\backmatter}{}{%
+\boolfalse{LWR at mainmatter}
+}
+\newcommand*{\LWR at sectionnumber}[1]{%
+\InlineClass{sectionnumber}{#1} %
+}
+
+\newcommand*{\LWR at createautosec}[1]{%
+\LWR at htmltag{#1 id="autosec-\thepage"{}}%
+}
+
+\NewDocumentCommand{\LWR at pushoneclose}{m m}{\pushclose{#2}{#1}}
+
+\NewDocumentCommand{\LWR at startnewdepth}{m m}{%
+\LWR at closeprevious{#1}%
+\LWR at pushoneclose{#1}{#2}%
+}
+\newcounter{LWR at prevFileDepth}
+\setcounter{LWR at prevFileDepth}{\LWR at depthsubparagraph}
+\DeclareDocumentCommand{\LWR at section}{m m m m}{%
+\LWR at traceinfo{LWR at section}%
+\LWR at stoppars%
+\global\boolfalse{LWR at minipagethispar}%
+\LWR at orignewpage%
+
+\LWR at traceinfo{LWR at section: testing about to start a new HTML file}%
+\IfBooleanTF{#1}{}{% not starred
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{FileDepth}}%
+\AND%
+\(%
+\NOT\boolean{CombineHigherDepths}\OR%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{LWR at prevFileDepth}}%
+\)%
+}%
+{% new file
+\LWR at traceinfo{LWR at section: new HTML file}%
+\IfNoValueTF{#2}%
+{\LWR at newhtmlfile{#3}}%
+{\LWR at newhtmlfile{#2}}%
+}% new file
+{}% not new file
+}% not starred
+\LWR at traceinfo{LWR at section: about to LWR at setlatestname}%
+\IfValueTF{#2}{\LWR at setlatestname{#2}}{\LWR at setlatestname{#3}}%
+
+\LWR at htmlcomment{Opening #4 ``#3''{}}
+
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{>=}{\LWR at depthparagraph}%
+}%
+{\LWR at startpars}
+{}
+\LWR at createautosec{\csuse{LWR at tag#4}}%
+\IfBooleanTF{#1}%
+{}% starred
+{% not starred
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{secnumdepth}}%
+}%
+{% if secnumdepth
+\LWR at traceinfo{LWR at section: about to test main matter}%
+\ifbool{LWR at mainmatter}%
+{%
+\LWR at traceinfo{LWR at section: yes mainmatter}%
+\refstepcounter{#4}%
+\LWR at traceinfo{LWR at section: about to addcontentsline}%
+\addcontentsline{toc}{#4}%
+{\protect\LWR at sectionnumber{\csuse{the#4}}%
+\IfValueTF{#2}{#2}{#3}}%
+\LWR at traceinfo{LWR at section: finished addcontentsline}%
+}% end of if main matter
+{% not main matter
+\LWR at traceinfo{LWR at section: no main matter}%
+\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
+}% end of not main matter
+}% end of secnumdepth
+{%
+\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
+}%
+\ifbool{LWR at mainmatter}%
+{%
+\ifthenelse{%
+\(\cnttest{\csuse{LWR at depth#4}}{<=}%
+{\value{secnumdepth}}\) \AND
+\(\cnttest{\csuse{LWR at depth#4}}{<=}{\LWR at depthpart}\)
+}%
+{\csuse{#4name}~{}}%
+{}%
+\LWR at traceinfo{LWR at section: about to print section number}%
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<=}{\value{secnumdepth}}%
+}%
+{\protect\LWR at sectionnumber{\csuse{the#4}}}%
+{}%
+\LWR at traceinfo{LWR at section: finished print section number}%
+}{}%
+}% end of not starred
+#3
+\LWR at htmltag{\csuse{LWR at tag#4end}}%
+\label{autopage-\thepage}%
+\ifthenelse{%
+\cnttest{\csuse{LWR at depth#4}}{<}{\LWR at depthparagraph}}%
+{\LWR at startpars}%
+{}%
+\IfBooleanTF{#1}{}{% not starred
+\setcounter{LWR at prevFileDepth}{\csuse{LWR at depth#4}}%
+}% not starred
+\LWR at traceinfo{LWR at section: done}%
+}
+
+
+\@ifundefined{chapter}
+{}
+{%
+\DeclareDocumentCommand{\part}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthpart}{\LWR at printclosepart}%
+
+\LWR at section{#1}{#2}{#3}{part}%
+}
+}
+
+\@ifundefined{chapter}
+{}
+{%
+\DeclareDocumentCommand{\chapter}{s o m}{%
+\LWR at traceinfo{chapter #3}%
+\LWR at stoppars%
+\LWR at startnewdepth{\LWR at depthchapter}{\LWR at printclosechapter}%
+
+\LWR at traceinfo{chapter: about to LWR at section}%
+\LWR at section{#1}{#2}{#3}{chapter}%
+\LWR at traceinfo{chapter: done}%
+}
+}
+
+\DeclareDocumentCommand{\section}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsection}{\LWR at printclosesection}%
+
+\LWR at section{#1}{#2}{#3}{section}%
+}
+
+\DeclareDocumentCommand{\subsection}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsubsection}{\LWR at printclosesubsection}%
+
+\LWR at section{#1}{#2}{#3}{subsection}%
+}
+
+\DeclareDocumentCommand{\subsubsection}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsubsubsection}%
+{\LWR at printclosesubsubsection}%
+
+\LWR at section{#1}{#2}{#3}{subsubsection}%
+}
+
+\DeclareDocumentCommand{\paragraph}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthparagraph}{\LWR at printcloseparagraph}%
+
+\LWR at section{#1}{#2}{#3}{paragraph}%
+}
+
+\DeclareDocumentCommand{\subparagraph}{s o m}{%
+\LWR at stoppars%
+
+\LWR at startnewdepth{\LWR at depthsubparagraph}{\LWR at printclosesubparagraph}%
+
+\LWR at section{#1}{#2}{#3}{subparagraph}%
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\MetaLanguage}{en-US}
+
+\newcommand*{\LWR at filestart}[1]{
+\begingroup
+\renewcommand{\textit}[1]{##1}% not used in filenames
+\renewcommand{\textsc}[1]{##1}
+\renewcommand{\textsl}[1]{##1}
+\renewcommand{\textbf}[1]{##1}
+\renewcommand{\texttt}[1]{##1}
+\renewcommand{\textsf}[1]{##1}
+\renewcommand{\textrm}[1]{##1}
+\renewcommand{\textsuperscript}[1]{##1}
+\renewcommand{\textsubscript}[1]{##1}
+\renewcommand*{\HTMLunicode}[1]{}
+\renewcommand*{\HTMLentity}[1]{}
+\RenewDocumentCommand{\LWR at htmlspanclass}{m o +m}{##3}
+\DeclareExpandableDocumentCommand{\InlineClass}{m o m}{##3}
+\LWR at htmltag{!DOCTYPE html}\LWR at orignewline
+\LWR at htmltag{html lang="\MetaLanguage"{}}\LWR at orignewline
+\LWR at htmltag{head}\LWR at orignewline
+\LWR at htmltag{meta charset="UTF-8" /}\LWR at orignewline
+\LWR at htmltag{meta name="generator" content="LaTeX lwarp package" /}%
+ \LWR at orignewline
+\ifdefempty{\LWR at currentHTMLdescription}{}{%
+\LWR at htmltag{%
+meta name="description" content="\LWR at currentHTMLdescription" /}%
+ \LWR at orignewline
+}%
+\LWR at htmltag{meta name="viewport" %
+content="width=device-width, initial-scale=1.0" /}%
+ \LWR at orignewline
+\LWR at htmltag{!{-}{-}[if lt IE 9]}\LWR at orignewline
+\LWR at htmltag{%
+script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}
+\LWR at htmltag{/script}\LWR at orignewline
+\LWR at htmltag{![endif]{-}{-}}\LWR at orignewline
+\LWR at htmltag{title}\thetitle#1\LWR at htmltag{/title}\LWR at orignewline
+\LWR at htmltag{%
+link rel="stylesheet" type="text/css" href="\LWR at currentcss" /}%
+\LWR at orignewline
+\ifbool{mathjax}%
+{%
+\boolfalse{LWR at verbtags}
+\VerbatimInput{lwarp_mathjax.txt}%
+\booltrue{LWR at verbtags}
+\LWR at stoppars
+}% end of mathjax
+{}%
+\LWR at htmltag{/head}\LWR at orignewline
+\LWR at htmltag{body}\LWR at orignewline
+\endgroup
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at LwarpStart}
+{%
+\edef\LWR at strresult{\HomeHTMLFileName}
+\edef\HomeHTMLFileName{\detokenize\expandafter{\LWR at strresult}}
+\edef\LWR at strresult{\HTMLFileName}
+\edef\HTMLFileName{\detokenize\expandafter{\LWR at strresult}}
+\LWR at origonecolumn%
+\LWR at origscriptsize%
+\LWR at origraggedright%
+\let\\\LWR at endofline%
+\linespread{1.3}%
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{2ex}
+\ifbool{usingOSwindows}
+{% Windows:
+\immediate\openout\LWR at file=lateximages.cmd
+}
+{% Unix:
+\immediate\openout\LWR at file=lateximages.sh
+\immediate\write\LWR at file{\LWR at hashmark!\OSShellPath}
+}
+\immediate\write\LWR at file{\OSmkdir lateximages\OSPathSymbol}
+\setlength{\belowcaptionskip}{-3ex}
+\renewcommand{\ps at plain}{}
+\renewcommand*{\centering}{}
+\renewcommand*{\raggedleft}{}
+\renewcommand*{\raggedright}{}
+\let\LWR at origtabular\tabular
+\let\LWR at origendtabular\endtabular
+\let\tabular\LWR at tabular
+\let\endtabular\endLWR at tabular
+\let\LWR at origcaption\caption
+\let\ltx at label\LWR at htmlmathlabel
+\let\TeX\LWR at TeX
+\let\LaTeX\LWR at LaTeX
+\let\LuaTeX\LWR at LuaTeX
+\let\LuaLaTeX\LWR at LuaLaTeX
+\let\XeTeX\LWR at XeTeX
+\let\XeLaTeX\LWR at XeLaTeX
+\let\ConTeXt\LWR at ConTeXt
+\let\textcolor\LWR at textcolor
+\let\pagecolor\LWR at pagecolor
+\let\colorbox\LWR at colorbox
+\let\fcolorbox\LWR at fcolorbox
+\let\rotatebox\LWR at rotatebox
+\let\scalebox\LWR at scalebox
+\let\reflectbox\LWR at reflectbox
+\global\boolfalse{LWR at doingapar}
+\global\boolfalse{LWR at doingstartpars}
+\LWR at filestart{}
+\LWR at htmltag{header}\LWR at orignewline
+\LWR at startpars
+\LWR at firstpagetop
+\LWR at stoppars
+\LWR at htmltag{/header}\LWR at orignewline
+\LWR at htmltag{section class="textbody"{}}
+\LWR at origpagestyle{empty}
+\mainmatter
+\LWR at origpagenumbering{arabic}
+\if at titlepage
+ \thanksmarkseries{arabic}
+\else
+ \thanksmarkseries{fnsymbol}
+\fi
+\fvset{frame=none}%
+\catcode`\&=\active
+\LWR at startpars
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+
+\newcommand*{\LWR at requesttoc}[2]{%
+\ifbool{#1}
+{
+\expandafter\newwrite\csuse{tf@#2}
+\immediate\openout \csuse{tf@#2} \jobname.#2\relax
+}{}
+}
+
+\newcommand*{\LWR at LwarpEnd}
+{
+\LWR at stoppars
+\LWR at closeprevious{\LWR at depthfinished}
+
+\LWR at htmlelementclassend{section}{textbody}
+\LWR at printpendingnotes
+\LWR at htmlelement{footer}
+
+\LWR at pagebottom
+
+\LWR at htmlelementend{footer}
+
+\ifnumcomp{\value{LWR at htmlfilenumber}}{>}{0}{\LWR at botnavigation}{}
+\LWR at stoppars% final stop of all paragraphs
+\LWR at htmltag{/body}\LWR at orignewline
+\LWR at htmltag{/html}\LWR at orignewline
+\LWR at orignewpage
+\immediate\closeout\LWR at file
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+\newrobustcmd{\affiliation}[1]{\\ \InlineClass{affiliation}{#1}}
+\end{warpHTML}
+\begin{warpprint}
+\newrobustcmd{\affiliation}[1]{\\ \textsc{\small#1}}
+\end{warpprint}
+\begin{warpall}
+\renewcommand{\author}[1]{%
+\gdef\@author{#1}
+\begingroup
+ \renewcommand{\thanks}[1]{}
+ \renewcommand{\and}{\unskip, }
+ \renewcommand{\thanksmark}[1]{}
+ \renewcommand{\thanksgap}[1]{}
+ \renewcommand{\affiliation}[1]{}
+ \protected at xdef\theauthor{#1}
+\endgroup}
+\newcommand{\published}[1]{%
+\gdef\@published{#1}
+\begingroup
+ \renewcommand{\thanks}[1]{}
+ \renewcommand{\thanksmark}[1]{}
+ \renewcommand{\thanksgap}[1]{}
+ \protected at xdef\thepublished{#1}
+\endgroup
+}
+\newcommand{\@published}{}
+\newcommand{\thepublished}{}
+\newcommand{\subtitle}[1]{%
+\gdef\@subtitle{#1}
+\begingroup
+ \renewcommand{\thanks}[1]{}
+ \renewcommand{\thanksmark}[1]{}
+ \renewcommand{\thanksgap}[1]{}
+ \protected at xdef\thesubtitle{#1}
+\endgroup
+}
+\newcommand{\@subtitle}{}
+\newcommand{\thesubtitle}{}
+\end{warpall}
+\begin{warpHTML}
+\renewenvironment*{titlepage}
+ {\BlockClass{titlepage}\LWR at subminipage}
+ {\LWR at endsubminipage\endBlockClass}
+\renewenvironment*{titlingpage}
+{%
+\begin{titlepage}
+\LWR at maketitlesetup
+\let\maketitle\LWR at titlingmaketitle
+}
+{
+\end{titlepage}
+\@bscontmark
+}
+\end{warpHTML}
+
+\begin{warpall}
+\newcommand*{\printthanks}{\@thanks}
+\AtEndEnvironment{titlingpage}{\@bscontmark}
+\end{warpall}
+
+\begin{warpHTML}
+\newcommand{\prepublished}[1]{%
+\def\@bsprepublished{\BlockClass{published}#1}%
+}
+
+\newcommand{\postpublished}[1]{%
+\def\@bspostpublished{#1\endBlockClass}%
+}
+
+\renewcommand{\pretitle}[1]{%
+\def\@bspretitle{#1\LWR at stoppars\LWR at htmltag{h1}}%
+}
+
+\renewcommand{\posttitle}[1]{%
+\def\@bsposttitle{\LWR at htmltag{/h1}\LWR at startpars#1}%
+}
+
+\newcommand{\presubtitle}[1]{%
+\def\@bspresubtitle{\BlockClass{subtitle}#1}%
+}
+
+\newcommand{\postsubtitle}[1]{%
+\def\@bspostsubtitle{#1\endBlockClass}%
+}
+
+\renewcommand{\preauthor}[1]{%
+\def\@bspreauthor{\BlockClass{author}#1}%
+}
+
+\renewcommand{\postauthor}[1]{%
+\def\@bspostauthor{#1\endBlockClass}%
+}
+
+\renewcommand{\predate}[1]{%
+\def\@bspredate{#1\BlockClass{titledate}}%
+}
+
+\renewcommand{\postdate}[1]{%
+\def\@bspostdate{\endBlockClass#1}%
+}
+
+\prepublished{\begin{center}}
+\postpublished{\par\end{center}}
+
+\pretitle{\begin{center}}
+\posttitle{\par\end{center}}
+
+\presubtitle{\begin{center}}
+\postsubtitle{\par\end{center}}
+
+\preauthor{\begin{center}%
+\begin{tabular}[t]{c}%
+}
+\postauthor{\end{tabular}\par\end{center}}
+
+\predate{\begin{center}}
+\postdate{\par\end{center}}
+\newcommand*{\printpublished}{
+\ifthenelse{\equal{\thepublished}{}}
+{}
+{
+\begin{BlockClass}{published}
+\@published
+\end{BlockClass}
+}
+}
+
+\newcommand*{\printtitle}
+{
+\LWR at stoppars
+\LWR at htmltag{h1}%
+\@title%
+\LWR at htmltag{/h1}
+\LWR at startpars
+}
+\newcommand*{\LWR at printthetitle}
+{
+\LWR at stoppars
+\LWR at htmltag{h1}%
+\thetitle%
+\LWR at htmltag{/h1}
+\LWR at startpars
+}
+
+\newcommand*{\printsubtitle}{
+\ifthenelse{\equal{\thesubtitle}{}}
+{}
+{
+\begin{BlockClass}{subtitle}
+\@subtitle
+\end{BlockClass}
+}
+}
+
+\newcommand*{\printauthor}{
+\begin{BlockClass}{author}
+\begin{tabular}{c}\@author\end{tabular}
+\end{BlockClass}
+}
+
+\newcommand*{\printdate}{%
+\begin{BlockClass}{titledate}
+\@date
+\end{BlockClass}
+}
+
+\end{warpHTML}
+
+\begin{warpprint}
+
+\newcommand*{\printpublished}{{\Large\scshape\@published}}
+
+\newcommand*{\printtitle}{{\Huge\@title}}
+
+\newcommand*{\printsubtitle}{{\Large\itshape\@subtitle\bigskip}}
+
+\newcommand*{\printauthor}
+ {{\large\begin{tabular}[t]{c}\@author\end{tabular}}}
+
+\newcommand*{\printdate}{{\small\textit{\@date}}}
+\providecommand{\maketitle}{}
+\if at titlepage
+ \renewcommand{\maketitle}{\begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \@bsmarkseries
+ \def\@makefnmark{\rlap{\@textsuperscript{%
+ \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
+ \long\def\@makefntext##1{\makethanksmark ##1}
+ \null\vfil
+ \vskip 60\p@
+ \vspace*{\droptitle}
+ \maketitlehooka
+ \ifcsempty{@published}
+{}
+{{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {\@bspretitle \@title \@bsposttitle}
+ \ifcsempty{@subtitle}
+{}
+{\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ \maketitlehookb
+ {\@bspreauthor \@author \@bspostauthor}
+ \maketitlehookc
+ {\@bspredate \@date \@bspostdate}
+ \maketitlehookd
+ \par
+ \@thanks
+ \vfil\null
+ \end{titlepage}%
+ \@bscontmark % \setcounter{footnote}{0}%
+%%% \@bsmtitlempty
+ } % end titlepage defs
+\else
+ \renewcommand{\maketitle}{\par
+ \begingroup
+ \@bsmarkseries
+ \def\@makefnmark{\rlap{\@textsuperscript{%
+ \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
+ \long\def\@makefntext##1{\makethanksmark ##1}
+ \if at twocolumn
+ \ifnum \col at number=\@ne
+ \@maketitle
+ \else
+ \twocolumn[\@maketitle]%
+ \fi
+ \else
+ \newpage
+ \global\@topnum\z@
+ \@maketitle
+ \fi
+ \thispagestyle{plain}\@thanks
+ \endgroup
+ \@bscontmark % \setcounter{footnote}{0}%
+%%% \@bsmtitlempty
+ } % end non-titlepage
+
+ \def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \vspace*{\droptitle}
+ \maketitlehooka
+ \ifcsempty{@published}
+{}
+{{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {\@bspretitle \@title \@bsposttitle}
+ \ifcsempty{@subtitle}
+{}
+{\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ \maketitlehookb
+ {\@bspreauthor \@author \@bspostauthor}
+ \maketitlehookc
+ {\@bspredate \@date \@bspostdate}
+ \maketitlehookd
+ \par
+ \vskip 1.5em}
+\fi
+
+\providecommand{\maketitlehookaa}{}
+
+\providecommand{\maketitlehookaaa}{}
+
+\newcommand{\prepublished}[1]{%
+\def\@bsprepublished{#1}%
+}
+
+\newcommand{\postpublished}[1]{%
+\def\@bspostpublished{#1}%
+}
+
+\newcommand{\presubtitle}[1]{%
+\def\@bspresubtitle{#1}%
+}
+\newcommand{\postsubtitle}[1]{%
+\def\@bspostsubtitle{#1}%
+}
+\if at titlepage
+\prepublished{
+\vspace*{-\baselineskip}\vspace*{-\medskipamount}\vspace*{-2em}
+\begin{center}}
+\postpublished{\par\end{center}\vskip 2em}
+
+\presubtitle{\unskip\begin{center}\unskip}
+\postsubtitle{\par\end{center}\vskip 2em}
+\else
+\prepublished{\begin{center}}
+\postpublished{\par\end{center}\vskip 0.5em}
+
+\presubtitle{\begin{center}\unskip}
+\postsubtitle{\par\end{center}\vskip 0.5em}
+\fi
+\end{warpprint}
+\begin{warpHTML}
+\newcommand*{\LWR at maketitlesetup}{%
+\@bsmarkseries
+\@mpbsmarkseries
+\def\@makefnmark{\textsuperscript{\thefootnote}}%
+\long\def\@makefntext##1{%
+\makethanksmark \LWR at orighspace{1in}
+##1\LWR at htmltagc{/\LWR at tagregularparagraph}%
+}%
+}
+
+\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
+ \mathsection\or \mathparagraph\or \text{\HTMLunicode{2016}}\or
+ **\or \dagger\dagger \or \ddagger\ddagger \else\@ctrerr\fi}}
+\renewcommand*{\maketitle}{%
+\begin{titlepage}
+\LWR at maketitlesetup
+\@maketitle
+\@thanks
+\end{titlepage}
+\@bscontmark
+}
+
+\DeclareDocumentCommand{\@maketitle}{}{%
+\maketitlehooka
+\ifcsempty{@published}
+{}
+{{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+{\@bspretitle \@title \@bsposttitle}
+\ifcsempty{@subtitle}
+{}
+{\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+\maketitlehookb
+{\@bspreauthor \@author \@bspostauthor}
+\maketitlehookc
+{\@bspredate \@date \@bspostdate}
+\maketitlehookd
+}
+
+\providecommand{\maketitlehookaa}{}
+\providecommand{\maketitlehookaaa}{}
+
+\newcommand*{\LWR at titlingmaketitle}{%
+\@maketitle
+\@thanks
+}
+
+\let\LWR at origthanksmarkseries\thanksmarkseries
+\renewcommand{\thanksmarkseries}[1]{%
+\def\@mpbsmarkseries{%
+\renewcommand*{\thempfootnote}{\@nameuse{#1}{mpfootnote}}}
+\LWR at origthanksmarkseries{#1}
+}
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\providecommand*{\abstractname}{Abstract}
+\DeclareDocumentEnvironment{abstract}{}
+{
+\BlockClass{abstract}
+\BlockClassSingle{abstracttitle}{\abstractname}
+}
+{
+\endBlockClass
+}
+
+\end{warpHTML}
+
+
+
+
+
+\begin{warpHTML}
+\newcommand{\attribution}[1]{%
+\InlineClass{attribution}{—\,#1}}% emdash
+\end{warpHTML}
+\begin{warpprint}
+\newcommand{\attribution}[1]{\textsc{---\,#1}}
+\end{warpprint}
+
+\begin{warpHTML}
+\newcommand{\citetitle}[1]{%
+\InlineClass{citetitle}{—\,#1}}% emdash
+\end{warpHTML}
+\begin{warpprint}
+\newcommand{\citetitle}[1]{\textsl{---\,#1}}
+\end{warpprint}
+
+
+\begin{warpHTML}
+\renewenvironment*{quote}
+{\LWR at htmlblocktag{blockquote}}
+{\LWR at htmlblocktag{/blockquote}}
+
+\renewenvironment*{quotation}
+{\LWR at htmlblocktag{blockquotation}}
+{\LWR at htmlblocktag{/blockquotation}}
+
+\end{warpHTML}
+
+\begin{warpall}
+
+\newlength{\HTMLvleftskip}
+\setlength{\HTMLvleftskip}{1em}
+
+\newlength{\HTMLleftmargini}
+\setlength{\HTMLleftmargini}{4.5em}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\AfterEndPreamble{
+\AtBeginEnvironment{verse}
+{%
+\ifdef{\vleftskip}{%
+\setlength{\vleftskip}{\HTMLvleftskip}
+\setlength{\leftmargini}{\HTMLleftmargini}
+}{}
+\LWR at atbeginverbatim{verse}
+\unskip\vspace{-\baselineskip}
+}
+\AfterEndEnvironment{verse}{
+\unskip\vspace{-\baselineskip}
+\LWR at afterendverbatim
+}
+\ifdef{\poemtitle}{
+\DeclareDocumentCommand{\@vstypeptitle}{m}{%
+ \vspace{\beforepoemtitleskip}%
+ {\InlineClass{poemtitle}{\poemtitlefont #1}\par}%
+ \vspace{\afterpoemtitleskip}%
+ }
+}{}
+
+}
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\AfterEndPreamble{
+\AtBeginEnvironment{verbatim}{\LWR at atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}}
+\AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+}
+
+\end{warpHTML}
+
+
+\begin{warpall}
+\newlength{\VerbatimHTMLWidth}
+\setlength{\VerbatimHTMLWidth}{4in}
+\end{warpall}
+
+\begin{warpHTML}
+\newbool{LWR at verbtags}
+\booltrue{LWR at verbtags}
+
+\renewcommand{\VerbatimFootnotes}{
+\PackageError{lwarp}
+{Verbatim footnotes are not yet supported by lwarp.}
+{This may be improved when lwarp uses LaTeX footnotes instead of pagenotes.}
+}
+
+\newcommand*{\LWR at atbeginverbatim}[1]
+{%
+\setlength{\parskip}{0ex}%
+\LWR at stoppars%
+\ifbool{LWR at verbtags}{\LWR at htmltag{pre class="#1"{}}}{}%
+\LWR at origttfamily%
+\let\hspace\LWR at orighspace%
+}
+
+\newcommand*{\LWR at afterendverbatim}{%
+\unskip%
+\ifbool{LWR at verbtags}{\noindent\LWR at htmltag{/pre}
+
+}{}%
+\LWR at startpars%
+}
+\newcommand*{\LWR at Verbatimclass}{fancyvrb}
+\NewDocumentEnvironment{VerbatimClass}{m O{}}
+{%
+\renewcommand*{\LWR at Verbatimclass}{#1}%
+\LWR at origVerbatim[#2]%
+}
+{\endVerbatim}
+\AfterEndPreamble{
+\let\LWR at origVerbatim\Verbatim
+\renewcommand*{\Verbatim}{%
+\renewcommand*{\LWR at Verbatimclass}{fancyvrb}%
+\LWR at origVerbatim%
+}
+\newcommand*{\LWR at fvstartnone}{%
+\ifbool{LWR at verbtags}{\hbox to\z@{\LWR at htmltagc{div class="\LWR at Verbatimclass"}}}{}%
+\hbox to\z@{\LWR at atbeginverbatim{verbatim}}%
+}
+
+\newcommand*{\LWR at fvendnone}{%
+\hbox to\z@{\LWR at afterendverbatim}%
+\ifbool{LWR at verbtags}{\hbox to\z@{\LWR at htmltagc{/div}}}{}%
+}
+
+\newcommand*{\LWR at fvstartsingle}{%
+\LWR at fvstartnone%
+\FV at BeginListFrame@Single%
+}
+
+\newcommand*{\LWR at fvendsingle}{%
+\FV at EndListFrame@Single%
+\LWR at fvendnone%
+}
+
+\newcommand*{\LWR at fvstartline}{%
+\LWR at fvstartnone%
+\FV at BeginListFrame@Lines%
+}
+
+\newcommand*{\LWR at fvendline}{%
+\FV at EndListFrame@Lines%
+\LWR at fvendnone%
+}
+\def\FV at Frame@none{%
+\let\FV at BeginListFrame\LWR at fvstartnone%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendnone}
+
+\def\FV at Frame@single{%
+\let\FV at BeginListFrame\LWR at fvstartsingle%
+\let\FV at LeftListFrame\FV at LeftListFrame@Single%
+\let\FV at RightListFrame\FV at RightListFrame@Single%
+\let\FV at EndListFrame\LWR at fvendsingle}
+
+\def\FV at Frame@lines{%
+\let\FV at BeginListFrame\LWR at fvstartline%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendline}
+
+\def\FV at Frame@topline{%
+\let\FV at BeginListFrame\LWR at fvstartline%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendnone}
+
+\def\FV at Frame@bottomline{%
+\let\FV at BeginListFrame\LWR at fvstartnone%
+\let\FV at LeftListFrame\relax%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendline}
+
+\def\FV at Frame@leftline{%
+\ifx\FancyVerbFillColor\relax%
+\let\FV at FrameFillLine\relax%
+\else%
+\@tempdima\FV at FrameRule\relax%
+\multiply\@tempdima-\tw@%
+\edef\FV at FrameFillLine{%
+{\noexpand\FancyVerbFillColor{\vrule\@width\number\@tempdima sp}%
+\kern-\number\@tempdima sp}}%
+\fi%
+\let\FV at BeginListFrame\LWR at fvstartnone%
+\let\FV at LeftListFrame\FV at LeftListFrame@Single%
+\let\FV at RightListFrame\relax%
+\let\FV at EndListFrame\LWR at fvendnone}
+\def\FV at SingleFrameLine#1{%
+ \hbox to\z@{%
+ \ifnum#1=\z@\relax
+ \let\FV at Label\FV at LabelBegin
+ \else
+ \let\FV at Label\FV at LabelEnd
+ \fi
+ \ifx\FV at Label\relax
+ \else
+ \ifnum#1=\z@
+ \ifx\FV at LabelPositionTopLine\relax
+\else
+ \LWR at htmltagc{div class="fancyvrblabel"}
+\LWR at origtextrm{\FV at LabelBegin}% \textrm preserves emdash
+\LWR at htmltagc{/div}
+\fi
+ \else
+ \ifx\FV at LabelPositionBottomLine\relax
+\else
+ \LWR at htmltagc{div class="fancyvrblabel"}
+\LWR at origtextrm{\FV at LabelEnd}
+\LWR at htmltagc{/div}
+\fi
+ \fi
+
+ \fi
+ \hss
+}
+}
+\def\FV at ListProcessLine#1{%
+ \hbox to \hsize{%
+ \hbox to \VerbatimHTMLWidth {%
+ \ifcsvoid{FV at LeftListNumber}{}{\kern 2.5em}%
+\FV at LeftListNumber%
+ \FancyVerbFormatLine{#1}%
+ \hss%
+ \FV at RightListNumber%
+}%
+ \hss% required to avoid underfull hboxes
+}
+}
+
+\AtBeginEnvironment{BVerbatim}
+{
+\LWR at atbeginverbatim{bverbatim}
+
+}
+
+\AfterEndEnvironment{BVerbatim}
+{
+\leavevmode\par\vspace{-\baselineskip}
+\LWR at afterendverbatim
+}
+
+
+
+} % \AfterEndPreamble
+
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\renewcommand{\@begintheorem}[2]{%
+\LWR at htmldivclass{theorem}
+\InlineClass{theoremlabel}{#1\ #2\ }
+\LWR at htmldivclass{theoremcontents}
+}
+\renewcommand{\@opargbegintheorem}[3]{%
+\BlockClass{theorem}
+\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }
+\BlockClass{theoremcontents}
+}
+\renewcommand*{\@endtheorem}{%
+\endBlockClass% theoremcontents
+\endBlockClass% theorem
+}
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\let\LWR at origitem\item
+
+\newcommand*{\LWR at itemizeitem}{%
+\LWR at stoppars%
+\LWR at startnewdepth{\LWR at depthlistitem}{\LWR at printcloselistitem{}}%
+\LWR at htmltag{li}%
+\LWR at startpars%
+\LWR at origitem%
+}
+
+
+\AtBeginEnvironment{itemize}{\LWR at itemizestart}
+
+\newcommand*{\LWR at itemizestart}{%
+\LWR at stoppars%
+\LWR at pushoneclose{\LWR at depthlist}{\LWR at printcloseitemize{}}%
+\LWR at htmltag{ul style="list-style-type:none"{}}%
+\LWR at startpars%
+\let\item\LWR at itemizeitem%
+}
+
+\AtEndEnvironment{itemize}{\LWR at itemizeend}
+
+\newcommand*{\LWR at itemizeend}{%
+\LWR at stoppars%
+\LWR at closeprevious{\LWR at depthlistitem}%
+\LWR at closeoneprevious{}%
+\LWR at startpars%
+}
+
+
+
+\AtBeginEnvironment{enumerate}{\LWR at enumeratestart}
+
+\newcommand*{\LWR at enumeratestart}{%
+\LWR at stoppars%
+\LWR at pushoneclose{\LWR at depthlist}{\LWR at printcloseitemize{}}%
+\LWR at htmltag{ul style="list-style-type:none"{}}%
+\LWR at startpars%
+\let\item\LWR at itemizeitem%
+}
+
+\AtEndEnvironment{enumerate}{\LWR at enumerateend}
+
+\newcommand*{\LWR at enumerateend}{%
+\LWR at stoppars%
+\LWR at closeprevious{\LWR at depthlistitem}%
+\LWR at closeoneprevious{}%
+\LWR at startpars%
+}
+
+
+\newcommand*{\LWR at descitem}[1][]%
+{%
+\LWR at stoppars%
+\LWR at setlatestname{#1}%
+\LWR at startnewdepth{\LWR at depthlistitem}{\LWR at printclosedescitem{}}%
+\LWR at origitem[]%
+\LWR at orighspace{1in}
+\LWR at htmltag{dt}#1\LWR at htmltag{/dt}%
+\LWR at orignewline%
+\LWR at htmltag{dd}%
+\LWR at startpars%
+}
+
+\AtBeginEnvironment{description}{\LWR at descriptionstart}
+
+\newcommand*{\LWR at descriptionstart}{%
+\LWR at stoppars%
+\LWR at pushoneclose{\LWR at depthlist}{\LWR at printclosedescription{}}%
+\LWR at htmltag{dl}%
+\LWR at startpars%
+\let\item\LWR at descitem%
+}
+
+\AtEndEnvironment{description}{\LWR at descriptionend}
+
+\newcommand*{\LWR at descriptionend}{%
+\LWR at stoppars%
+\LWR at closeprevious{\LWR at depthlistitem}%
+\LWR at closeoneprevious{}%
+\LWR at startpars%
+}
+
+\let\LWR at orignewlist\newlist
+
+\renewcommand*{\newlist}[3]{%
+\LWR at orignewlist{#1}{#2}{#3}%
+\AtBeginEnvironment{#1}{\csuse{LWR@#2start}}%
+\AtEndEnvironment{#1}{\csuse{LWR@#2end}}%
+}
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\newcommand\LWR at mynexttoken\relax
+
+
+
+
+\def\LWR at futurenonspacelet#1{\def\LWR at cs{#1}%
+\afterassignment\LWR at fnslone\let\nexttoken= }
+\def\LWR at fnslone{\expandafter\futurelet\LWR at cs\LWR at fnsltwo}
+\def\LWR at fnsltwo{%
+\expandafter\ifx\LWR at cs\@sptoken\let\next=\@BTfnslthree%
+\else\let\next=\nexttoken\fi\next}
+\def\@BTfnslthree{\afterassignment\LWR at fnslone\let\next= }
+
+\newcommand*{\LWR at getmynexttoken}{%
+\LWR at futurenonspacelet\LWR at mynexttoken\LWR at tabledatacolumntag
+}
+
+
+\newbool{LWR at startedrow}
+\boolfalse{LWR at startedrow}
+
+\newbool{LWR at doinghline}
+\boolfalse{LWR at doinghline}
+
+\newbool{LWR at doingtbrule}
+\boolfalse{LWR at doingtbrule}
+
+\newbool{LWR at tableparcell}
+
+\newbool{LWR at skippingmrowcell}
+
+\newbool{LWR at intabularmetadata}
+\boolfalse{LWR at intabularmetadata}
+
+
+\newcommand*{\LWR at closetabledatacell}{%
+\global\booltrue{LWR at intabularmetadata}%
+\ifbool{LWR at exitingtabular}{}%
+{% not exiting tabular
+\ifbool{LWR at skippingmrowcell}{}%
+{% not skippingmrowcell
+\unskip%
+\LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}%
+\LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
+\ifbool{LWR at tableparcell}{\LWR at stoppars}{}%
+\global\boolfalse{LWR at tableparcell}%
+\unskip\LWR at htmltag{/td}\LWR at orignewline%
+}% not skipping mrowcell
+}% not exiting tabular
+\global\boolfalse{LWR at skippingmrowcell}%
+}
+
+\newcounter{LWR at tabulardepth}
+\setcounter{LWR at tabulardepth}{0}
+
+\def\LWR at origampmacro{&}
+\begingroup
+\catcode`\&=\active
+
+\gdef&{%
+\ifthenelse{\cnttest{\value{LWR at tabulardepth}}{>}{0}}%
+{%
+\unskip%
+\LWR at closetabledatacell%
+\addtocounter{LWR at tablecolspos}{1}%
+\LWR at getmynexttoken%
+}%
+{\LWR at origampmacro}%
+}
+\endgroup
+
+
+\NewDocumentCommand{\LWR at tabularendofline}{s o}
+{%
+\LWR at closetabledatacell%
+\LWR at htmltag{/tr}\LWR at orignewline
+\global\booltrue{LWR at intabularmetadata}
+\global\boolfalse{LWR at startedrow}
+\global\boolfalse{LWR at doinghline}%
+\global\boolfalse{LWR at doingtbrule}%
+\LWR at clearmidrules%
+\setcounter{LWR at tablecolspos}{1}
+\LWR at getmynexttoken%
+}
+
+
+\newcommand*{\LWR at colsresult}{}%temp storage for column format results
+\newcommand*{\LWR at pposition}{}
+\newcommand*{\LWR at pleft}{}
+\newcommand*{\LWR at pright}{}
+
+\newcommand*{\LWR at tablecolspec}{}
+
+\newcommand*{\LWR at strresult}{}
+
+\newcommand*{\LWR at origcolspec}{}
+
+\newcounter{LWR at tablecolswidth}
+
+\newcounter{LWR at tablecolspos}
+
+\newcounter{LWR at tabletotalcols}
+
+\newcounter{LWR at tabletotalcolsnext}
+
+
+\newcommand*{\LWR at parseatcolumn}{%
+\LWR at traceinfo{at column}%
+\addtocounter{LWR at tablecolspos}{1}%
+\LWR at traceinfo{about to read the next token:}%
+\expandarg%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]
+\fullexpandarg%
+\LWR at traceinfo{have now read the next token}%
+\ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}
+{% left edge of the table:
+\LWR at traceinfo{at the left edge}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{\LWR at strresult}%
+\LWR at traceinfo{finished with the def}%
+}%
+{% not at the left edge:
+\LWR at traceinfo{not at the left edge}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
+\LWR at traceinfo{at \theLWR at tabletotalcols: \LWR at colatspec(\theLWR at tabletotalcols)!}%
+}%
+\let\LWR at strresult\relax%
+}
+\newcommand*{\LWR at parsebeforecolumn}{%
+\addtocounter{LWR at tablecolspos}{1}%
+\expandarg%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\fullexpandarg%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\LWR at strresult}%
+\let\LWR at strresult\relax%
+}
+\newcommand*{\LWR at parseaftercolumn}{%
+\addtocounter{LWR at tablecolspos}{1}%
+\expandarg%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\fullexpandarg%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
+\let\LWR at strresult\relax%
+}
+\newcommand*{\LWR at parseskipcolumn}{%
+}
+\newcommand*{\LWR at parsenormalcolumn}[1]{%
+\appto\LWR at tablecolspec{#1}%
+\addtocounter{LWR at tabletotalcols}{1}%
+\addtocounter{LWR at tabletotalcolsnext}{1}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcolsnext}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{\relax}%
+}
+
+
+\newcommand*{\LWR at parsepcolumn}[1]{%
+\LWR at parsenormalcolumn{#1}%
+\addtocounter{LWR at tablecolspos}{1}%
+}
+
+
+\newcommand*{\LWR at parsetablecols}[1]{%
+\LWR at traceinfo{LWR at parsetablecols started}%
+\renewcommand*{\LWR at origcolspec}{#1}%
+\renewcommand*{\LWR at tablecolspec}{}%
+\setcounter{LWR at tabletotalcols}{0}%
+\setcounter{LWR at tabletotalcolsnext}{1}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{\relax}%
+\LWR at setexparray{LWR at colatspec}{1}{\relax}%
+\LWR at setexparray{LWR at colatspec}{2}{\relax}%
+\LWR at setexparray{LWR at colatspec}{3}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{1}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{2}{\relax}%
+\LWR at setexparray{LWR at colbeforespec}{3}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{1}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{2}{\relax}%
+\LWR at setexparray{LWR at colafterspec}{3}{\relax}%
+\setcounter{LWR at tablecolspos}{1}%
+\LWR at traceinfo{about to StrLen}%
+\noexpandarg%
+\StrLen{#1}[\LWR at strresult]%
+\fullexpandarg%
+\LWR at traceinfo{finished StrLen}%
+\setcounter{LWR at tablecolswidth}{\LWR at strresult}%
+\whiledo{\not\value{LWR at tablecolspos}>\value{LWR at tablecolswidth}}{%
+\noexpandarg%
+\StrChar{#1}{\theLWR at tablecolspos}[\LWR at strresult]%
+\fullexpandarg%
+\IfStrEq{\LWR at strresult}{l}{\LWR at parsenormalcolumn{l}}{}%
+\IfStrEq{\LWR at strresult}{c}{\LWR at parsenormalcolumn{c}}{}%
+\IfStrEq{\LWR at strresult}{r}{\LWR at parsenormalcolumn{r}}{}%
+\IfStrEq{\LWR at strresult}{S}{\LWR at parsenormalcolumn{r}}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{@}}{\LWR at parseatcolumn}{}%
+\IfStrEq{\LWR at strresult}{>}{\LWR at parsebeforecolumn}{}%
+\IfStrEq{\LWR at strresult}{<}{\LWR at parseaftercolumn}{}%
+\IfStrEq{\LWR at strresult}{!}{\LWR at parseskipcolumn}{}%
+\IfStrEq{\LWR at strresult}{p}{\LWR at parsepcolumn{p}}{}%
+\IfStrEq{\LWR at strresult}{m}{\LWR at parsepcolumn{m}}{}%
+\IfStrEq{\LWR at strresult}{b}{\LWR at parsepcolumn{b}}{}%
+\IfStrEq{\LWR at strresult}{P}{\LWR at parsepcolumn{P}}{}%
+\IfStrEq{\LWR at strresult}{M}{\LWR at parsepcolumn{M}}{}%
+\IfStrEq{\LWR at strresult}{B}{\LWR at parsepcolumn{B}}{}%
+\addtocounter{LWR at tablecolspos}{1}%
+}%
+}%
+
+
+\newcommand*{\LWR at maybenewtablerow}
+{%
+\ifbool{LWR at startedrow}%
+{}% started the row
+{% not started the row
+\global\booltrue{LWR at startedrow}%
+\global\booltrue{LWR at intabularmetadata}%
+\ifbool{LWR at doinghline}%
+{\LWR at htmltag{tr class="hline"{}}\LWR at orignewline}%
+{% not doing hline
+\ifbool{LWR at doingtbrule}%
+{\LWR at htmltag{tr class="tbrule"{}}\LWR at orignewline}%
+{\LWR at htmltag{tr}\LWR at orignewline}%
+}% end of not doing hline
+}% end of not started the row
+}
+
+
+\newcommand*{\LWR at tabledatasinglecolumntag}%
+{%
+\LWR at maybenewtablerow%
+\ifbool{LWR at exitingtabular}{}%
+{% not exiting tabular
+\StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\LWR at htmltag{td class="td%
+\LWR at strresult%
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"{}}%
+\ifthenelse{%
+\equal{\LWR at strresult}{p}\OR%
+\equal{\LWR at strresult}{m}\OR%
+\equal{\LWR at strresult}{b}\OR%
+\equal{\LWR at strresult}{P}\OR%
+\equal{\LWR at strresult}{M}\OR%
+\equal{\LWR at strresult}{B}%
+}%
+{% allow pars
+\LWR at startpars%
+\global\booltrue{LWR at tableparcell}%
+}% allow pars
+{}% no pars
+\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
+{\LWR at getexparray{LWR at colatspec}{leftedge}}% left edge
+{}% not left edge
+\LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
+\global\boolfalse{LWR at intabularmetadata}%
+}% not exiting tabular
+}%
+
+
+\newcounter{LWR at midrulecounter}
+
+\newcommand*{\LWR at clearmidrules}
+{%
+\setcounter{LWR at midrulecounter}{1}%
+\whiledo{%
+\cnttest{\value{LWR at midrulecounter}}{<=}{\value{LWR at tablecolswidth}}%
+}%
+{%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{\relax}%
+\addtocounter{LWR at midrulecounter}{1}%
+}%
+}
+
+\newcommand*{\LWR at subcmidrule}[4]{%
+\setcounter{LWR at midrulecounter}{#3}%
+\whiledo{\cnttest{\value{LWR at midrulecounter}}{<=}{#4}}%
+{%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{Y}%
+\addtocounter{LWR at midrulecounter}{1}%
+}% end of the whiledo
+}
+
+\NewDocumentCommand{\LWR at docmidrule}{o d() >{\SplitArgument{1}{-}}m}%
+{\LWR at subcmidrule{#1}{#2}#3}
+
+
+
+\newcounter{LWR at tablemulticolswidth}
+\newcounter{LWR at tablemulticolspos}
+
+\newcommand*{\LWR at printmccoltype}[1]{%
+\LWR at traceinfo{lwr at printmccoltype -#1-}%
+\StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+\IfStrEq{\LWR at strresult}{l}{l}{}%
+\IfStrEq{\LWR at strresult}{c}{c}{}%
+\IfStrEq{\LWR at strresult}{r}{r}{}%
+\IfStrEq{\LWR at strresult}{p}{p}{}%
+\IfStrEq{\LWR at strresult}{m}{m}{}%
+\IfStrEq{\LWR at strresult}{b}{b}{}%
+\IfStrEq{\LWR at strresult}{P}{P}{}%
+\IfStrEq{\LWR at strresult}{M}{M}{}%
+\IfStrEq{\LWR at strresult}{B}{B}{}%
+\IfStrEq{\LWR at strresult}{S}{r}{}%
+\LWR at traceinfo{lwr at printmccoltype done}%
+}
+
+\newcommand*{\LWR at multicolpartext}{%
+\LWR at startpars%
+\LWR at multicoltext%
+\LWR at stoppars%
+}
+
+\newcommand*{\LWR at multicolother}[1]{%
+\addtocounter{LWR at tablemulticolspos}{1}%
+\StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+\LWR at strresult%
+}
+
+\newcommand*{\LWR at printmccoldata}[1]{%
+\LWR at traceinfo{lwr at printmccoldata -#1}%
+\StrChar{#1}{\theLWR at tablemulticolspos}[\LWR at strresult]%
+\IfStrEq{\LWR at strresult}{l}{\LWR at multicoltext}{}%
+\IfStrEq{\LWR at strresult}{c}{\LWR at multicoltext}{}%
+\IfStrEq{\LWR at strresult}{r}{\LWR at multicoltext}{}%
+\IfStrEq{\LWR at strresult}{p}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{m}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{b}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{P}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{M}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{B}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{S}{\LWR at multicolpartext}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{@}}{\LWR at multicolother{#1}}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{>}}{\LWR at multicolother{#1}}{}%
+\IfStrEq{\LWR at strresult}{\detokenize{<}}{\LWR at multicolother{#1}}{}%
+\LWR at traceinfo{lwr at printmccoldata done}%
+}
+
+\newcommand*{\LWR at parsemulticolumnalignment}[2]{%
+\setcounter{LWR at tablemulticolspos}{1}%
+\StrLen{#1}[\LWR at strresult]%
+\setcounter{LWR at tablemulticolswidth}{\LWR at strresult}%
+\whiledo{%
+\not\value{LWR at tablemulticolspos}>\value{LWR at tablemulticolswidth}%
+}%
+{%
+#2{#1}%
+\addtocounter{LWR at tablemulticolspos}{1}%
+}%
+}
+
+
+\newcommand{\LWR at multicoltext}{}
+
+\NewDocumentCommand{\LWR at domulticolumn}{m m +m}{%
+\LWR at traceinfo{lwr at domulticolumn -#1- -#2-}%
+\renewcommand{\LWR at multicoltext}{#3}%
+\LWR at maybenewtablerow%
+\LWR at htmltag{td colspan="#1"
+ class="td%
+\LWR at parsemulticolumnalignment{#2}{\LWR at printmccoltype}%
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"%
+}% end of the opening table data tag
+\global\boolfalse{LWR at intabularmetadata}%
+\LWR at parsemulticolumnalignment{#2}{\LWR at printmccoldata}%
+}
+
+
+\newbool{LWR at starredlongtable}
+\boolfalse{LWR at starredlongtable}
+\providecommand*{\LTcaptype}{table}
+\NewDocumentCommand{\LWR at longtabledatacaptiontag}{s o +m}
+{%
+\IfValueTF{#2}{% optional given?
+\ifthenelse{\equal{#2}{}}% optional empty?
+{\LWR at setlatestname{#3}}% empty
+{\LWR at setlatestname{#2}}% given and non-empty
+}% optional given
+{\LWR at setlatestname{#3}}% no optional
+\LWR at domulticolumn{\theLWR at tabletotalcols}{P}{% \LWR at domulticolumn
+\IfBooleanTF{#1}% star?
+{% yes star
+\LWR at htmlblocktag{figcaption}%
+#3%
+\LWR at htmlblocktag{/figcaption}%
+}%
+{% No star:
+\ifbool{LWR at starredlongtable}%
+{%
+\ifthenelse{\equal{#2}{}}% TOC entry
+{}%
+{%
+\refstepcounter{\LTcaptype}%
+\protected at edef\@currentlabel{%
+\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+}%
+}{}%
+\LWR at htmlblocktag{figcaption}%
+\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
+\LWR at htmlblocktag{/figcaption}%
+\ifthenelse{\equal{#2}{}}% TOC entry empty
+{}%
+{% TOC entry not empty
+\IfNoValueTF{#2}% No TOC entry?
+{% No TOC entry
+\addcontentsline%
+{\csuse{ext@\LTcaptype}}%
+{\LTcaptype}%
+{%
+\protect\numberline%
+{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+{\ignorespaces #3\protect\relax}%
+}%
+}% end of No TOC entry
+{% yes TOC entry
+\addcontentsline%
+{\csuse{ext@\LTcaptype}}%
+{\LTcaptype}%
+{%
+\protect\numberline%
+{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+{\ignorespaces #2\protect\relax}%
+}%
+}% end of yes TOC entry
+}% end of TOC entry not empty
+}% end of no star
+}% end of \LWR at domulticolumn
+
+\addtocounter{LWR at tablecolspos}{\theLWR at tabletotalcols}
+\addtocounter{LWR at tablecolspos}{-1}
+
+}
+
+
+\NewDocumentCommand{\LWR at tabledatamulticolumntag}{m m +m}%
+{%
+\LWR at domulticolumn{#1}{#2}{#3}%
+\addtocounter{LWR at tablecolspos}{#1}%
+\addtocounter{LWR at tablecolspos}{-1}%
+}
+
+
+
+\NewDocumentCommand{\LWR at tabledatamultirowtag}{m o m o m}%
+{%
+\LWR at maybenewtablerow%
+\LWR at htmltag{td rowspan="#1" class="td%
+\StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}%
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"{}}
+\begingroup \let\\\LWR at endofline #5 \endgroup
+\LWR at stoppars%
+\global\boolfalse{LWR at intabularmetadata}%
+}%
+
+\newcommand*{\LWR at donothing}{}
+\newcommand*{\LWR at domidrule}{\booltrue{LWR at doinghline}}
+\newcommand*{\LWR at dotbrule}{\booltrue{LWR at doingtbrule}}
+
+
+\newbool{LWR at exitingtabular}
+\newcommand*{\LWR at tabledatacolumntag}%
+{%
+\let\mynext\LWR at tabledatasinglecolumntag%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\end}}%
+{\booltrue{LWR at exitingtabular}}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\caption}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\multicolumn}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\multirow}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\mrowcell}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\hline}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\toprule}}%
+{%
+\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\midrule}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\cmidrule}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\cline}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\bottomrule}}%
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\warpprintonly}}
+{\let\mynext\LWR at donothing}{}%
+\ifthenelse{\isequivalentto{\LWR at mynexttoken}{\warpHTMLonly}}
+{\let\mynext\LWR at donothing}{}%
+\mynext%
+}
+
+\end{warpHTML}
+
+
+
+\begin{warpall}
+\newcommand*{\mrowcell}{}
+\end{warpall}
+
+
+\begin{warpHTML}
+
+\newenvironment*{LWR at tabular}[2][]
+{%
+\LWR at traceinfo{tabular started}%
+\begingroup%
+\addtocounter{LWR at tabulardepth}{1}%
+\global\boolfalse{LWR at startedrow}%
+\global\boolfalse{LWR at doinghline}%
+\global\boolfalse{LWR at doingtbrule}%
+\boolfalse{LWR at exitingtabular}%
+\global\booltrue{LWR at intabularmetadata}%
+\LWR at htmlblocktag{table}%
+\LWR at parsetablecols{#2}%
+\LWR at stoppars%
+\setcounter{LWR at tablecolspos}{1}%
+\LWR at clearmidrules%
+\let\\\LWR at tabularendofline%
+\renewcommand*{\hline}{\LWR at domidrule\LWR at getmynexttoken}%
+\newcommand*{\midrule}{\LWR at domidrule\LWR at getmynexttoken}%
+\NewDocumentCommand{\cmidrule}{o d() m}%
+{\LWR at docmidrule[##1](##2){##3}\LWR at getmynexttoken}%
+\RenewDocumentCommand{\cline}{m}%
+{\LWR at docmidrule{##1}\LWR at getmynexttoken}%
+\newcommand*{\toprule}{\LWR at dotbrule\LWR at getmynexttoken}%
+\newcommand*{\bottomrule}{\LWR at dotbrule\LWR at getmynexttoken}%
+\let\multicolumn\LWR at tabledatamulticolumntag%
+\let\multirow\LWR at tabledatamultirowtag%
+\renewcommand*{\mrowcell}{\global\booltrue{LWR at skippingmrowcell}}%
+\let\caption\LWR at longtabledatacaptiontag%
+\global\boolfalse{LWR at tableparcell}%
+\global\boolfalse{LWR at skippingmrowcell}%
+\LWR at getmynexttoken%
+}%
+{%
+\LWR at closetabledatacell%
+\LWR at htmlblocktag{/tr}%
+\LWR at htmlblocktag{/table}%
+\global\boolfalse{LWR at intabularmetadata}%
+\addtocounter{LWR at tabulardepth}{-1}%
+\endgroup%
+}
+
+\end{warpHTML}
+
+
+
+
+\begin{warpHTML}
+
+
+\newcommand*{\@currentlabelname}{}
+\def\LWR at stripperiod#1.\ltx at empty#2\@nil{#1}%
+\newcommand*{\LWR at setlatestname}[1]{%
+\GetTitleStringExpand{#1}%
+\edef\@currentlabelname{\detokenize\expandafter{\GetTitleStringResult}}%
+\edef\@currentlabelname{%
+\expandafter\LWR at stripperiod\@currentlabelname%
+\ltx at empty.\ltx at empty\@nil%
+}%
+}
+
+
+\zref at newlist{special}
+\zref at newprop{zLWR at name}{\@currentlabelname}
+\zref at newprop{zLWR at htmlfilenumber}{%
+\ifbool{FileSectionNames}{\LWR at thisfilename}{\theLWR at htmlfilenumber}%
+}%
+\zref at newprop{zLWR at lateximagedepth}{\arabic{LWR at lateximagedepth}}
+\zref at newprop{zLWR at lateximagenumber}{\arabic{LWR at lateximagenumber}}
+\zref at addprop{special}{zLWR at name}
+\zref at addprop{special}{zLWR at htmlfilenumber}
+\zref at addprop{special}{zLWR at lateximagedepth}
+\zref at addprop{special}{zLWR at lateximagenumber}
+\newcommand*{\LWR at spref}[2]{%
+\zref at extractdefault{#1}{#2}{??}}
+\newcommand*{\LWR at nameref}[1]{%
+\LWR at spref{#1}{zLWR at name}%
+}
+\newcommand*{\LWR at htmlfileref}[1]{%
+\LWR at traceinfo{LWR at htmlfileref A: !#1!}%
+\LWR at spref{#1}{zLWR at htmlfilenumber}%
+\LWR at traceinfo{LWR at htmlfileref B}%
+}
+\newcommand*{\LWR at lateximagedepthref}[1]{%
+\LWR at spref{#1}{zLWR at lateximagedepth}%
+}
+\newcommand*{\LWR at lateximagenumberref}[1]{%
+\LWR at spref{#1}{zLWR at lateximagenumber}%
+}
+\newcommand*{\LWR at splabel}[1]{%
+\LWR at setlatestname{\@currentlabelname}%
+\zref at labelbylist{#1}{special}}
+
+
+\newcommand*{\LWR at subsublabel}[1]{%
+\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{0}}%
+{}%
+{% not lateximage
+\ifbool{LWR at doingstartpars}%
+{% pars allowed
+\ifbool{LWR at doingapar}
+{% par started
+\LWR at htmltag{a id="#1"{}}\LWR at htmltag{/a}%
+}% par started
+{% par not started
+\LWR at stoppars%
+\LWR at htmltag{a id="#1"{}}\LWR at htmltag{/a}%
+\LWR at startpars%
+}% par not started
+}% pars allowed
+{% pars not allowed
+\LWR at htmltag{a id="#1"{}}\LWR at htmltag{/a}%
+}% pars not allowed
+}% not lateximage
+}
+
+\newcommand*{\LWR at sublabel}[1]{%
+\LWR at traceinfo{LWR at sublabel: !#1!}%
+\LWR at origlabel{#1}%
+\LWR at traceinfo{about to splabel}%
+\LWR at traceinfo{filesectionnames is \ifbool{FileSectionNames}{true}{false}}%
+\LWR at traceinfo{LWR at thisfilename is !\LWR at thisfilename!}%
+\LWR at traceinfo{LWR at htmlfilenumber is \theLWR at htmlfilenumber}%
+\LWR at splabel{#1}%
+\LWR at subsublabel{#1}%
+\LWR at traceinfo{finished with LWR at sublabel}%
+}
+\newcommand*{\LWR at newlabel}[1]{%
+\LWR at traceinfo{lwr at newlabel: !#1!}%
+\LWR at sublabel{#1}%
+\LWR at traceinfo{lwr at newlabel: done}%
+}
+
+
+\newcommand*{\LWR at startref}[1]
+{%
+\edef\LWR at lidref{\LWR at lateximagedepthref{#1}}
+\LWR at htmltag{a href="%
+\LWR at htmlrefsectionfilename{#1}%
+\#%
+\ifthenelse{\equal{\LWR at lidref}{??}}%
+{??}%
+{%
+\ifthenelse{\cnttest{\LWR at lidref}{>}{0}}%
+{%
+lateximage\LWR at lateximagenumberref{#1}%
+}%
+{%
+#1%
+}%
+}%
+"{}}%
+}
+
+\NewDocumentCommand{\LWR at newref}{s m}{%
+\LWR at traceinfo{LWR at newref #2}%
+\IfBooleanTF{#1}%
+{\LWR at origref{#2}}%
+{%
+\LWR at startref{#2}%
+\LWR at origref{#2}%
+\LWR at htmltag{/a}%
+}%
+}
+
+
+\newcommand*{\pagerefPageFor}{page for}
+\NewDocumentCommand{\LWR at newpageref}{s m}{%
+\IfBooleanTF{#1}%
+{(\pagerefPageFor\ \LWR at origref{#2})}%
+{(\cpageref{#2})}%
+}
+
+\newcommand*{\nameref}[1]{%
+\LWR at traceinfo{nameref A}%
+\LWR at startref{#1}%
+\LWR at traceinfo{nameref B}%
+\LWR at nameref{#1}%
+\LWR at traceinfo{nameref C}%
+\LWR at htmltag{/a}%
+\LWR at traceinfo{nameref D}%
+}
+
+
+
+
+
+\NewDocumentCommand{\LWR at subhyperref}{m +m}{%
+\LWR at htmltag{a href="{#1}" target="\_{}blank"\LWR at orignewline}#2\LWR at htmltag{/a}%
+\LWR at ensuredoingapar%
+}
+
+\NewDocumentCommand{\LWR at subhyperrefclass}{m +m m}{%
+\LWR at htmltag{a href="{#1}"
+class="#3"\LWR at orignewline}#2\LWR at htmltag{/a}%
+\LWR at ensuredoingapar%
+}
+
+\NewDocumentCommand{\LWR at hrefb}{O{} m +m}{%
+\LWR at subhyperref{#2}{#3}%
+\endgroup%
+\LWR at ensuredoingapar%
+}
+
+\newcommand{\href}{%
+\LWR at ensuredoingapar%
+\begingroup%
+\catcode`\_=12
+\LWR at hrefb%
+}
+
+\newcommand*{\LWR at nolinkurlb}[1]{#1\endgroup\LWR at ensuredoingapar}
+
+\newcommand{\nolinkurl}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\LWR at nolinkurlb%
+}
+
+\newcommand*{\LWR at urlb}[1]{%
+\href{#1}{#1}%
+\endgroup%
+\LWR at ensuredoingapar%
+}
+
+\newcommand{\url}{%
+\LWR at ensuredoingapar%
+\begingroup\catcode`\_=12
+\LWR at urlb%
+}
+
+\newcommand*{\LWR at subinlineimage}[5][]{%
+\ifthenelse{\equal{#1}{}}%
+{\LWR at htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"{}}}%
+{\LWR at htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"{}}}%
+}
+
+\end{warpHTML}
+
+
+
+
+
+
+\begin{warpHTML}
+
+\NewDocumentCommand{\LWR at floatbegin}{m o}{%
+\LWR at stoppars
+\addtocounter{LWR at thisfloat}{1}%
+\booltrue{LWR at freezethisfloat}%
+\begingroup
+\LWR at origraggedright
+\LWR at htmltag{figure id="autofloat-\arabic{LWR at thisfloat}" class="#1"}
+\renewcommand*{\@captype}{#1}
+\caption at settype{#1}
+\LWR at startpars
+}
+\let\@float\LWR at floatbegin
+\let\@dblfloat\LWR at floatbegin
+\newcommand*{\LWR at floatend}{%
+\LWR at stoppars%
+\LWR at htmlelementend{figure}%
+\endgroup%
+\boolfalse{LWR at freezethisfloat}%
+\LWR at startpars%
+}
+\let\end at float\LWR at floatend
+\let\end at dblfloat\LWR at floatend
+
+\newcounter{LWR at thisfloat}
+
+\newbool{LWR at freezethisfloat}
+\boolfalse{LWR at freezethisfloat}
+
+\newcommand*{\LWR at maybeincthisfloat}{%
+\ifbool{LWR at freezethisfloat}{}{\addtocounter{LWR at thisfloat}{1}}%
+}
+
+\newcommand*{\@captype}{}
+
+
+\AtBeginDocument{\providecommand*{\CaptionSeparator}{:~}}
+
+\AtBeginDocument{\renewcommand{\@makecaption}[2]{#1\CaptionSeparator#2}}
+
+
+\newcounter{LWR at nextautofloat}
+\newcounter{LWR at nextautopage}
+\newcommand*{\LWRsetnextfloat}[2]{%
+\setcounter{LWR at nextautopage}{#1}%
+\setcounter{LWR at nextautofloat}{#2}%
+}
+
+\newcounter{LWR at latestautopage}% updated each new HTML file
+\setcounter{LWR at latestautopage}{1}
+
+\let\LWR at origcaption@begin\caption at begin
+\let\LWR at origcaption@end\caption at end
+\let\LWR at orig@@par\@@par
+
+\newcommand{\LWR at caption@begin}
+{
+\LWR at traceinfo{LWR at caption@begin}%
+\begingroup%
+\renewcommand{\@@par}{\LWR at closeparagraph\LWR at orig@@par}%
+\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+\LWR at htmlblocktag{figcaption}%
+\LWR at origcaption@begin%
+}
+
+\newcommand{\LWR at caption@end}
+{%
+\LWR at origcaption@end%
+\vspace*{\baselineskip}%
+\LWR at htmlblocktag{/figcaption}%
+\endgroup%
+\LWR at traceinfo{LWR at caption@end: done}%
+}
+
+\let\caption at begin\LWR at caption@begin
+\let\caption at end\LWR at caption@end
+
+\let\LWR at origcaptionlistentry\captionlistentry
+
+\renewcommand*{\captionlistentry}{%
+\LWR at maybeincthisfloat%
+\LWR at ensuredoingapar%
+\LWR at htmltag{a id="autofloat-\arabic{LWR at thisfloat}"{}}\LWR at htmltag{/a}%
+\LWR at origcaptionlistentry%
+}
+
+\def\LWR at LTcaptionlistentry{%
+\LWR at ensuredoingapar%
+\LWR at htmltag{a id="autofloat-\arabic{LWR at thisfloat}"{}}\LWR at htmltag{/a}%
+ \bgroup
+ \@ifstar{\egroup\LWR at LT@captionlistentry}% gobble *
+ {\egroup\LWR at LT@captionlistentry}}%
+\def\LWR at LT@captionlistentry#1{%
+ \caption at listentry\@firstoftwo[\LTcaptype]{#1}}%
+
+\let\LWR at origaddcontentsline\addcontentsline
+
+\renewcommand*{\addcontentsline}[3]{%
+\ifthenelse{\equal{#1}{toc}}{}{%
+\addtocontents{\@nameuse{ext@#2}}{%
+\protect\LWRsetnextfloat%
+{\arabic{LWR at latestautopage}}%
+{\arabic{LWR at thisfloat}}%
+}%
+}%
+\LWR at origaddcontentsline{#1}{#2}{#3}%
+}
+
+\AtBeginDocument{
+\let\LWR at origcaptionof\captionof
+
+\renewcommand*{\captionof}{%
+\LWR at maybeincthisfloat%
+\LWR at stoppars
+\LWR at htmltag{a id="autofloat-\arabic{LWR at thisfloat}"{}}\LWR at htmltag{/a}%
+\LWR at origcaptionof%
+}
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+
+
+\newcommand*{\LWR at myshorttoc}[1]{
+\LWR at ensuredoingapar
+\IfFileExists{\jobname.#1}{
+\begingroup
+\makeatletter
+\@input{\jobname.#1}
+\endgroup
+}%
+{}%
+}
+
+\NewDocumentCommand{\LWR at subtableofcontents}{m m}{%
+\@ifundefined{chapter}
+{\LWR at closeprevious{\LWR at depthsection}}
+{\LWR at closeprevious{\LWR at depthchapter}}
+\LWR at printpendingnotes
+\@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}}
+\LWR at htmlelementclass{nav}{#1}
+\LWR at myshorttoc{#1}
+\LWR at htmlelementclassend{nav}{#1}
+}
+
+\let\LWR at orig@starttoc\@starttoc
+
+\renewcommand{\@starttoc}[1]{
+\LWR at htmlelementclass{nav}{#1}
+\LWR at orig@starttoc{#1}
+\LWR at htmlelementclassend{nav}{#1}
+}
+\let\LWR at origtableofcontents\tableofcontents
+\let\LWR at origlistoffigures\listoffigures
+\let\LWR at origlistoftables\listoftables
+\renewcommand*{\tableofcontents}{%
+\LWR at copyfile{\jobname.toc}{\jobname.sidetoc}%
+\LWR at printpendingnotes%
+\LWR at origtableofcontents%
+}
+\renewcommand*{\listoffigures}{\LWR at printpendingnotes\LWR at origlistoffigures}
+\renewcommand*{\listoftables}{\LWR at printpendingnotes\LWR at origlistoftables}
+
+
+\NewDocumentCommand{\listof}{m +m}{%
+\LWR at subtableofcontents{\@nameuse{ext@#1}}{#2}
+\expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname
+\immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname
+ \jobname.\csuse{ext@#1}\relax
+}
+
+
+
+\end{warpHTML}
+
+\begin{warpall}
+
+\newcounter{SideTOCDepth}
+\setcounter{SideTOCDepth}{1}
+
+\newcommand{\sidetocname}{Contents}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at sidetoc}{
+\LWR at stoppars
+
+\LWR at htmlelementclass{nav}{sidetoc}
+
+\setcounter{tocdepth}{\value{SideTOCDepth}}
+
+\begin{BlockClass}{sidetoctitle}
+\sidetocname
+\end{BlockClass}
+\begin{BlockClass}{sidetoccontents}
+\LinkHome
+
+\LWR at myshorttoc{sidetoc}
+\end{BlockClass}
+\LWR at htmlelementclassend{nav}{sidetoc}
+}
+
+
+\renewcommand*{\numberline}[1]{%
+\LWR at sectionnumber{#1}%
+}
+
+\NewDocumentCommand{\hypertoc}{m m +m m}{%
+\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
+\LWR at startpars%
+\LWR at subhyperrefclass{%
+\LWR at htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{#2}%
+\LWR at stoppars%
+}
+{}
+}
+
+
+\newcommand{\hypertocfloat}[4]{%
+\LWR at startpars
+\LWR at subhyperrefclass{%
+\LWR at htmlrefsectionfilename{autopage-\arabic{LWR at nextautopage}}%
+\#autofloat-\arabic{LWR at nextautofloat}}%
+{#3}{#2}%
+\LWR at stoppars%
+}
+
+\renewcommand{\l at part}[2]{\hypertoc{-1}{tocpart}{#1}{#2}}
+\DeclareDocumentCommand{\l at chapter}{m m}
+{\hypertoc{0}{tocchapter}{#1}{#2}}
+\renewcommand{\l at section}[2]{\hypertoc{1}{tocsection}{#1}{#2}}
+\renewcommand{\l at subsection}[2]{\hypertoc{2}{tocsubsection}{#1}{#2}}
+\renewcommand{\l at subsubsection}[2]
+{\hypertoc{3}{tocsubsubsection}{#1}{#2}}
+\renewcommand{\l at paragraph}[2]{\hypertoc{4}{tocparagraph}{#1}{#2}}
+\renewcommand{\l at subparagraph}[2]{\hypertoc{5}{tocsubparagraph}{#1}{#2}}
+\renewcommand{\l at figure}[2]{\hypertocfloat{1}{tocfigure}{#1}{#2}}
+\renewcommand{\l at table}[2]{\hypertocfloat{1}{toctable}{#1}{#2}}
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\@ifundefined{chapter}
+{\newcommand*{\LWR at indexsection}{\section{\indexname}}}
+{\newcommand*{\LWR at indexsection}{\chapter{\indexname}}}
+
+\let\LWR at origprintindex\printindex
+
+\renewcommand*{\printindex}
+{
+\LWR at indexsection
+\LWR at startpars
+\LWR at origprintindex
+}
+
+\renewenvironment*{theindex}{%
+\let\item\LWR at indexitem%
+\let\subitem\LWR at indexsubitem%
+\let\subsubitem\LWR at indexsubsubitem%
+}{}
+
+\newcommand{\LWR at indexitem}{
+
+\InlineClass{indexitem}{}
+}
+
+\newcommand{\LWR at indexsubitem}{
+
+\InlineClass{indexsubitem}{}
+}
+
+\newcommand{\LWR at indexsubsubitem}{
+
+\InlineClass{indexsubsubitem}{}
+}
+
+\newcommand*{\hyperindexref}[1]{
+\LWR at htmltag{a href="%
+\LWR at htmlrefsectionfilename{autopage-#1}\#autosec-#1"{}}%
+\LWR at origref{autopage-#1}\enskip\LWR at nameref{autopage-#1}%
+\LWR at htmltag{/a}%
+}
+
+\end{warpHTML}
+
+\begin{warpprint}
+\newcommand{\hyperindexref}[1]{#1}
+\end{warpprint}
+
+
+\begin{warpHTML}
+
+\let\LWR at origtextdollar\$
+
+\renewcommand*{\$}{%
+\LWR at htmltagc{span}%
+\LWR at origtextdollar%
+\LWR at htmltagc{/span}%
+}
+
+\newcounter{LWR at externalfilecnt}
+
+
+\let\LWR at origdollar=$
+\let\secondorigdollar=$% balance for editor syntax highlighting
+
+\let\LWR at origopenparen\(
+\let\LWR at origcloseparen\)
+
+\begingroup
+\catcode`\$=\active%
+\protected\gdef${\@ifnextchar$\LWR at doubledollar\LWR at singledollar}%
+
+\gdef\LWR at doubledollar$#1$${
+\ifbool{mathjax}%
+{\textbackslash[\LWR at HTMLsanitize{#1}\textbackslash]}
+{% not mathjax
+
+\begin{lateximage}%
+[\textbackslash{[} \LWR at HTMLsanitize{#1} \textbackslash{]}]%
+\LWR at origdollar\LWR at origdollar#1\LWR at origdollar\LWR at origdollar%
+\end{lateximage}
+
+}
+}%
+
+\gdef\LWR at singledollar#1${%
+\ifbool{mathjax}%
+{\textbackslash(\LWR at HTMLsanitize{#1}\textbackslash)}
+{% not mathjax
+\begin{lateximage}%
+[\textbackslash( \LWR at HTMLsanitize{#1} \textbackslash)]%
+\LWR at origdollar#1\LWR at origdollar%
+\end{lateximage}%
+}%
+}%
+
+\gdef\(#1\){$#1$}
+\gdef\[#1\]{$$#1$$}
+
+\endgroup
+
+\let\math\relax
+\let\endmath\relax
+\let\displaymath\relax
+\let\enddisplaymath\relax
+
+\NewEnviron{math}{\expandafter\(\BODY\)}
+\NewEnviron{displaymath}{\expandafter\[\BODY\]\@ignoretrue}
+
+\AtBeginDocument{\catcode`\$=\active}
+
+\newcounter{LWR at nextequation}
+\newcommand*{\LWR at syncmathjax}{%
+\ifcsdef{thechapter}{
+\BlockClassSingle{hidden}{
+\textbackslash(
+\textbackslash{}seteqsection \{\thechapter\}
+\textbackslash)
+}
+}
+{}% not using chapters
+
+\ifthenelse{\cnttest{\value{equation}}>0}
+{
+\setcounter{LWR at nextequation}{\value{equation}}
+\addtocounter{LWR at nextequation}{1}
+\BlockClassSingle{hidden}{
+\textbackslash(
+\textbackslash{}seteqnumber \{\arabic{LWR at nextequation}\}
+\textbackslash)
+}
+}{}% not eq > 1
+}
+
+\newcommand*{\LWR at restoremathlatexformatting}{%
+\let\hspace\LWR at orighspace%
+\let\rule\LWR at origrule%
+\let\,\LWR at origcomma% disable HTML short unbreakable space
+\let\textit\LWR at origtextit%
+\let\textbf\LWR at origtextbf%
+\let\texttt\LWR at origtexttt%
+\let\textsc\LWR at origtextsc%
+\let\textsf\LWR at origtextsf%
+\let\textrm\LWR at origtextrm%
+\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
+\let\textsuperscript\LWR at origtextsuperscript%
+\let\textsubscript\LWR at origtextsubscript%
+\let~\LWR at origtilde%
+\let\enskip\LWR at origenskip%
+\let\quad\LWR at origquad%
+\let\qquad\LWR at origqquad%
+}
+
+\NewDocumentCommand{\LWR at hidelatexequation}{m +m}{%
+\LWR at stoppars
+\LWR at htmlopencomment
+
+\begingroup
+\csuse{LWR at orig#1}
+\LWR at restoremathlatexformatting
+#2
+\csuse{LWR at origend#1}
+\endgroup
+
+\LWR at htmlclosecomment
+\LWR at startpars
+}
+
+\NewDocumentCommand{\LWR at addmathjax}{m +m}{%
+
+\textbackslash{}begin\{#1\}
+\LWR at HTMLsanitizeexpand{\detokenize\expandafter{#2}}
+\textbackslash{}end\{#1\}
+
+}
+
+\let\LWR at origequation\equation
+\let\LWR at origendequation\endequation
+\let\equation\relax
+\let\endequation\relax
+
+\NewEnviron{equation}{%
+
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\LWR at hidelatexequation{equation}{\BODY}
+}
+{% not mathjax
+\begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
+ \LWR at HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
+ \textbackslash{end\{equation\}}]% alt tag
+\LWR at origequation
+\BODY% contents collected by NewEnviron
+\LWR at origendequation
+\end{lateximage}%
+}
+
+}[\ifbool{mathjax}{\LWR at addmathjax{equation}{\BODY}}{}]
+
+\newbool{LWR at amsmultline}
+\boolfalse{LWR at amsmultline}
+
+
+\newcommand*{\LWR at htmlmathlabel}[1]{%
+\LWR at traceinfo{LWR at htmlmathlabel #1}%
+\ifbool{mathjax}{%
+\text{
+\ifbool{LWR at amsmultline}{}{\hspace*{\totwidth@}}
+\LWR at htmlclosecomment\LWR at sublabel{\@firstofone#1}\LWR at htmlopencomment}%
+}%
+{\LWR at sublabel{\@firstofone#1}}%
+}
+
+\newcommand*{\LWR at beginhideamsmath}{
+\LWR at stoppars
+
+\LWR at htmlopencomment
+
+\begingroup
+\LWR at restoremathlatexformatting
+}
+
+\newcommand*{\LWR at endhideamsmath}{
+\endgroup
+
+\LWR at htmlclosecomment
+
+\LWR at startpars
+}
+
+
+
+\BeforeBeginEnvironment{multline}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\booltrue{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{multline}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\boolfalse{LWR at amsmultline}
+\LWR at addmathjax{multline}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\BeforeBeginEnvironment{multline*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\booltrue{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{multline*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\boolfalse{LWR at amsmultline}
+\LWR at addmathjax{multline*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+
+\BeforeBeginEnvironment{gather}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{gather}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{gather}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\BeforeBeginEnvironment{gather*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{gather*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{gather*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\BeforeBeginEnvironment{align}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{align}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{align}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\BeforeBeginEnvironment{align*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{align*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{align*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\BeforeBeginEnvironment{flalign}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{flalign}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{flalign}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\BeforeBeginEnvironment{flalign*}{
+\ifbool{mathjax}
+{
+\LWR at syncmathjax
+\boolfalse{LWR at amsmultline}
+\LWR at beginhideamsmath
+}
+{
+\lateximage[LWRAMSMATHBODY]
+}
+}
+
+\AfterEndEnvironment{flalign*}{
+
+\ifbool{mathjax}
+{
+\LWR at endhideamsmath
+\LWR at addmathjax{flalign*}{\the\@envbody}
+}
+{\endlateximage}
+
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+\newpagestyle{LWR at commentfooterstyle}{
+\sethead{}{}{}
+\setfoot{\LWR at htmlopencomment}{}{}
+}
+
+\newcounter{LWR at lateximagenumber}
+\setcounter{LWR at lateximagenumber}{0}
+\newcounter{LWR at lateximagedepth}
+\setcounter{LWR at lateximagedepth}{0}
+
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\edef\LWR at hashmark{\string#} % for use in \write
+\edef\LWR at percent{\@percentchar} % for use in \write
+
+\newcounter{LWR at nextpage}
+
+\end{warpHTML}
+
+\begin{warpall}
+
+\newcommand*{\LateximageFontSizeName}{normalsize}
+
+\end{warpall}
+
+\begin{warpHTML}
+
+\newcommand{\LWR at HTMLsanitize}[1]{%
+\protect\StrSubstitute{\detokenize{#1}}%
+{\detokenize{&}}%
+{\detokenize{&}}[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{<}}%
+{\detokenize{<}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{>}}%
+{\detokenize{>}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{##}}%
+{\#}%
+[\LWR at strresult]%
+\LWR at strresult%
+}
+
+\newcommand{\LWR at HTMLsanitizeexpand}[1]{%
+\protect\StrSubstitute{\detokenize\expandafter{#1}}%
+{\detokenize{&}}%
+{\detokenize{&}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{<}}%
+{\detokenize{<}}%
+[\LWR at strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR at strresult}}%
+{\detokenize{>}}%
+{\detokenize{>}}%
+[\LWR at strresult]%
+\LWR at strresult%
+}
+
+\NewDocumentEnvironment{lateximage}{O{image}}{%
+\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{0}}%
+{%
+\addtocounter{LWR at lateximagedepth}{1}%
+}%
+{% start of outer-most lateximage
+\addtocounter{LWR at lateximagenumber}{1}%
+\boolfalse{mathjax}
+\LWR at ensuredoingapar%
+\addtocounter{LWR at externalfilecnt}{1}%
+\setcounter{LWR at nextpage}{\thepage}%
+\addtocounter{LWR at nextpage}{1}%
+\LWR at htmltag{span id="lateximage\arabic{LWR at lateximagenumber}" %
+class="lateximagesource"{}} \LWR at orignewline
+\immediate\write\LWR at file{%
+ pdfseparate -f \theLWR at nextpage \space -l %
+ \theLWR at nextpage \space %
+ \jobname.pdf lateximagetemp-\LWR at percent d.pdf}%
+\immediate\write\LWR at file{%
+ pdfcrop --hires lateximagetemp-\theLWR at nextpage.pdf
+ lateximage-\theLWR at externalfilecnt.pdf}%
+\immediate\write\LWR at file{%
+ pdftocairo -svg lateximage-\theLWR at externalfilecnt.pdf
+ lateximage-\theLWR at externalfilecnt.svg}%
+\immediate\write\LWR at file{%
+ \OSmv lateximage-\theLWR at externalfilecnt.svg %
+ lateximages\OSPathSymbol}%
+\immediate\write\LWR at file{%
+ \OSrm lateximage-\theLWR at externalfilecnt.pdf
+ lateximagetemp-\theLWR at nextpage.pdf}%
+\LWR at origthispagestyle{LWR at commentfooterstyle}%
+\addtocounter{LWR at lateximagedepth}{1}%
+\LWR at orignewpage%
+\LWR at origminipage{6in}%
+\csuse{LWR at orig\LateximageFontSizeName}%
+\let\hspace\LWR at orighspace%
+\let\rule\LWR at origrule%
+\let\,\LWR at origcomma% disable HTML short unbreakable space
+\let\textit\LWR at origtextit%
+\let\textbf\LWR at origtextbf%
+\let\texttt\LWR at origtexttt%
+\let\textsc\LWR at origtextsc%
+\let\textsf\LWR at origtextsf%
+\let\textrm\LWR at origtextrm%
+\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
+\let\textsuperscript\LWR at origtextsuperscript%
+\let\textsubscript\LWR at origtextsubscript%
+\let~\LWR at origtilde%
+\let\enskip\LWR at origenskip%
+\let\quad\LWR at origquad%
+\let\qquad\LWR at origqquad%
+\let\tabular\LWR at origtabular%
+\let\endtabular\LWR at origendtabular%
+\let\newline\LWR at orignewline%
+}% end of outer-most lateximage
+}% end of \begin{lateximage}
+{% start of \end{lateximage}
+\ifthenelse{\cnttest{\value{LWR at lateximagedepth}}{>}{1}}%
+{%
+\addtocounter{LWR at lateximagedepth}{-1}%
+}%
+{% end of outer-most lateximage
+\LWR at origendminipage%
+\LWR at orignewpage%
+\LWR at origscriptsize%
+\LWR at htmlclosecomment{}\LWR at orignewline%
+\ifthenelse{\equal{#1}{LWRAMSMATHBODY}}%
+{%
+\LWR at subinlineimage[%
+\LWR at HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+]%
+{lateximage}%
+{lateximages\OSPathSymbol{}lateximage-\theLWR at externalfilecnt}%
+{svg}%
+{}%
+}%
+{%
+\LWR at subinlineimage[#1]{lateximage}%
+{lateximages\OSPathSymbol{}lateximage-\theLWR at externalfilecnt}{svg}{}%
+}%
+\LWR at ensuredoingapar%
+\LWR at htmltag{/span}%
+\LWR at htmlcomment{End of lateximage}%
+\addtocounter{LWR at lateximagedepth}{-1}%
+}% end of outer-most lateximage
+}%
+\end{warpHTML}
+\begin{warpprint}
+\newenvironment{lateximage}[1][]{\begingroup}{\endgroup}
+\end{warpprint}
+
+
+\begin{warpHTML}
+
+\renewenvironment*{center}
+{\BlockClass{center}}
+{\endBlockClass}
+
+\renewenvironment*{flushright}
+{\BlockClass{flushright}}
+{\endBlockClass}
+
+\renewenvironment*{flushleft}
+{\BlockClass{flushleft}}
+{\endBlockClass}
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\PassOptionsToPackage{
+detect-mode=true,
+per-mode=symbol, % fraction is not seen by pdftotext
+text-celsius = {\HTMLentity{deg}C},
+text-degree = {\HTMLentity{deg}},
+}{siunitx}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+
+\newcommand*{\thisgraphicspath}{{}}
+\renewcommand*{\graphicspath}[1]{\renewcommand*{\thisgraphicspath}{#1}}
+
+
+\renewcommand*{\DeclareGraphicsExtensions}[1]{}
+\renewcommand*{\DeclareGraphicsRule}[4]{}
+
+
+\renewcommand*{\unitspace}{}
+
+\newlength{\LWR at igwidth}
+\newlength{\LWR at igheight}
+\newcommand*{\LWR at igwidthstyle}{}
+\newcommand*{\LWR at igheightstyle}{}
+\newcommand*{\LWR at igorigin}{}
+\newcommand*{\LWR at igangle}{}
+\newcommand*{\LWR at igxscale}{1}
+\newcommand*{\LWR at igyscale}{1}
+\newcommand*{\LWR at igclass}{inlineimage}
+
+\define at key{igraph}{width}{%
+\setlength{\LWR at igwidth}{#1}%
+\ifthenelse{\lengthtest{\LWR at igwidth > 0pt}}%
+{%
+\uselengthunit{PT}%
+\renewcommand*{\LWR at igwidthstyle}{width:\rndprintlength{\LWR at igwidth}}%
+\IfEndWith{#1}{ex}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes ex
+{}% not ex
+\IfEndWith{#1}{em}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes em
+{}% not em
+\IfEndWith{#1}{\%}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes percent
+{}% not percent
+\IfEndWith{#1}{px}%
+{\renewcommand*{\LWR at igwidthstyle}{width:#1}}% yes px
+{}% not px
+}{}% end of length > 0pt
+}
+\define at key{igraph}{height}{%
+\setlength{\LWR at igheight}{#1}%
+\ifthenelse{\lengthtest{\LWR at igheight > 0pt}}%
+{%
+\uselengthunit{PT}%
+\renewcommand*{\LWR at igheightstyle}{%
+height:\rndprintlength{\LWR at igheight} %
+}%
+\IfEndWith{#1}{ex}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes ex
+{}% not ex
+\IfEndWith{#1}{em}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes em
+{}% not em
+\IfEndWith{#1}{\%}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes percent
+{}% not percent
+\IfEndWith{#1}{px}%
+{\renewcommand*{\LWR at igheightstyle}{height:#1}}% yes px
+{}% not px
+}{}% end of length > 0pt
+}
+\define at key{igraph}{origin}{%
+\renewcommand*{\LWR at igorigin}{#1}%
+}
+\define at key{igraph}{angle}{\renewcommand*{\LWR at igangle}{#1}}
+\define at key{igraph}{class}{\renewcommand*{\LWR at igclass}{#1}}
+
+\define at key{igraph}{scale}{%
+\renewcommand*{\LWR at igxscale}{#1}%
+\renewcommand*{\LWR at igyscale}{#1}}
+\define at key{igraph}{bb}{}
+\define at key{igraph}{bbllx}{}
+\define at key{igraph}{bblly}{}
+\define at key{igraph}{bburx}{}
+\define at key{igraph}{bbury}{}
+\define at key{igraph}{natwidth}{}
+\define at key{igraph}{natheight}{}
+\define at key{igraph}{hiresbb}{}
+\define at key{igraph}{viewport}{}
+\define at key{igraph}{trim}{}
+\define at key{igraph}{totalheight}{}
+\define at key{igraph}{keepaspectratio}{}
+\define at key{igraph}{clip}{}
+\define at key{igraph}{draft}{}
+\define at key{igraph}{type}{}
+\define at key{igraph}{ext}{}
+\define at key{igraph}{read}{}
+\define at key{igraph}{command}{}
+
+\newcommand*{\LWR at rotstyle}[2]{%
+ #1transform:rotate(-#2deg);
+}
+
+\newcommand*{\LWR at scalestyle}[3]{%
+ #1transform:scale(#2,#3);
+}
+
+
+\newbool{LWR at infloatrow}
+\boolfalse{LWR at infloatrow}
+
+\newcommand*{\LWR at imageextension}{}
+\newcommand*{\LWR at expgraphicsfilename}{}
+
+
+\newcommand*{\LWR at includegraphicsb}[2][]
+{%
+\LWR at origtilde \LWR at orignewline%
+\ifthenelse{\cnttest{\value{LWR at minipagedepth}}{=}{0}}{%
+\ifbool{LWR at infloatrow}%
+{}
+{% not in a minipage or a floatrow:
+\setlength{\linewidth}{6in}%
+\setlength{\textwidth}{6in}%
+\setlength{\textheight}{9in}%
+}%
+}{}%
+\edef\LWR at expgraphicsfilename{#2}
+\renewcommand*{\LWR at imageextension}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.jpg}%
+{\renewcommand*{\LWR at imageextension}{.jpg}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.JPG}%
+{\renewcommand*{\LWR at imageextension}{.JPG}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.png}%
+{\renewcommand*{\LWR at imageextension}{.png}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.PNG}%
+{\renewcommand*{\LWR at imageextension}{.PNG}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.gif}%
+{\renewcommand*{\LWR at imageextension}{.gif}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.GIF}%
+{\renewcommand*{\LWR at imageextension}{.GIF}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.svg}%
+{\renewcommand*{\LWR at imageextension}{.svg}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.SVG}%
+{\renewcommand*{\LWR at imageextension}{.SVG}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.svgz}%
+{\renewcommand*{\LWR at imageextension}{.svgz}}{}%
+\IfFileExists{\detokenize\expandafter\thisgraphicspath\LWR at expgraphicsfilename.SVGZ}%
+{\renewcommand*{\LWR at imageextension}{.SVGZ}}{}%
+\StrSubstitute{\detokenize\expandafter{\LWR at expgraphicsfilename}}%
+{\detokenize{.pdf}}{\detokenize{.svg}}[\LWR at strresult]%
+\StrSubstitute{\LWR at strresult}%
+{\detokenize{.PDF}}{\detokenize{.SVG}}[\LWR at strresult]%
+\large%
+\setlength{\LWR at igwidth}{0pt}%
+\setlength{\LWR at igheight}{0pt}%
+\renewcommand*{\LWR at igwidthstyle}{}%
+\renewcommand*{\LWR at igheightstyle}{}%
+\renewcommand*{\LWR at igorigin}{}%
+\renewcommand*{\LWR at igangle}{}%
+\renewcommand*{\LWR at igxscale}{1}%
+\renewcommand*{\LWR at igyscale}{1}%
+\renewcommand*{\LWR at igclass}{inlineimage}%
+\setkeys{igraph}{#1}%
+\href{\thisgraphicspath\LWR at strresult\LWR at imageextension}%
+{% start of href
+\LWR at htmltag{% start of image tags
+img src="\thisgraphicspath\LWR at strresult\LWR at imageextension" \LWR at orignewline
+\LWR at origtilde{} alt="\LWR at strresult" \LWR at orignewline
+\ifthenelse{
+\NOT\equal{\LWR at igwidthstyle}{} \OR
+\NOT\equal{\LWR at igheightstyle}{} \OR
+\NOT\equal{\LWR at igorigin}{} \OR
+\NOT\equal{\LWR at igangle}{} \OR
+\NOT\equal{\LWR at igxscale}{1} \OR
+\NOT\equal{\LWR at igyscale}{1}
+}%
+{\LWR at origtilde{} style="%
+\ifthenelse{\NOT\equal{\LWR at igwidthstyle}{}}%
+{\LWR at igwidthstyle;}{}%
+\ifthenelse{\NOT\equal{\LWR at igheightstyle}{}}%
+{\LWR at igheightstyle;}{}%
+\ifthenelse{\NOT\equal{\LWR at igorigin}{}}%
+{\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{}{\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 orignewline}{}%
+\LWR at origtilde{} class="\LWR at igclass" \LWR at orignewline%
+}% end of image tags
+}% end of href
+\endgroup
+\LWR at origscriptsize
+}
+
+
+
+
+
+\renewcommand*{\includegraphics}
+{%
+\LWR at ensuredoingapar%
+\begingroup%
+\LWR at includegraphicsb%
+}
+
+\end{warpHTML}
+
+\begin{warpprint}
+\define at key{Gin}{class}{}
+\end{warpprint}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at rotboxorigin}{}
+\newcommand*{\LWR at originname}[1]{%
+\ifthenelse{\equal{#1}{t}}{top}{}%
+\ifthenelse{\equal{#1}{b}}{bottom}{}%
+\ifthenelse{\equal{#1}{c}}{center}{}%
+\ifthenelse{\equal{#1}{l}}{left}{}%
+\ifthenelse{\equal{#1}{r}}{right}{}%
+}
+\newcommand*{\LWR at originnames}[1]{%
+\StrChar{#1}{1}[\LWR at strresult]%
+\LWR at originname{\LWR at strresult}
+\StrChar{#1}{2}[\LWR at strresult]%
+\LWR at originname{\LWR at strresult}
+}
+\define at key{krotbox}{origin}{%
+\renewcommand*{\LWR at rotboxorigin}{#1}%
+}
+\define at key{krotbox}{x}{}
+\define at key{krotbox}{y}{}
+\define at key{krotbox}{units}{}
+\NewDocumentCommand{\LWR at rotatebox}{O{} m +m}{%
+\renewcommand*{\LWR at rotboxorigin}{}
+\setkeys{krotbox}{#1}%
+\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 orignewline%
+\begin{LWR at nestspan}%
+#3%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+
+\NewDocumentCommand{\LWR at 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}} %
+"{}}%
+\begin{LWR at nestspan}%
+#3%
+\LWR at htmltagc{/span}%
+\end{LWR at nestspan}%
+}
+
+\newcommand{\LWR at reflectbox}[1]{\LWR at scalebox{-1}[1]{#1}}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\renewcommand{\resizebox}[3]{#3}
+
+\end{warpHTML}
+
+
+
+
+
+\begin{warpHTML}
+
+
+\AtEndPreamble{
+\RequirePackage{cleveref}
+\crefname{pagenote}{note}{notes}
+}
+\AfterEndPreamble{
+
+
+
+
+\renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}}
+
+
+\renewcommand{\@@setcrefrange}[3]{%
+#1{\ref{#2}}{\ref{#3}}{}{}{}{}}
+
+
+\newcommand*{\cpagerefFor}{for}
+
+\renewcommand*{\@@setcpageref}[2]{%
+#1{\cpagerefFor\ \cref{#2}}{}{}%
+}
+
+
+\renewcommand{\@@setcpagerefrange}[3]{%
+#1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}}
+
+\let\LWR at origlabel\label
+\let\label\LWR at newlabel
+\let\LWR at origref\ref
+\let\ref\LWR at newref% \end{ syntax highlighting
+\let\LWR at origpageref\pageref
+\let\pageref\LWR at newpageref
+
+}% AfterEndPreamble
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\BeforeBeginEnvironment{picture}{
+
+\lateximage}
+
+\AfterEndEnvironment{picture}{\endlateximage
+
+}
+
+\end{warpHTML}
+
+
+
+\begin{warpHTML}
+
+\newbool{LWR at tikzbabel}
+\boolfalse{LWR at tikzbabel}
+
+\AtBeginDocument{
+\@ifpackageloaded{tikz}{
+\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0
+{\booltrue{LWR at tikzbabel}}
+{\boolfalse{LWR at tikzbabel}}
+}{}
+}
+
+\BeforeBeginEnvironment{tikzpicture}{%
+
+\lateximage
+\ifbool{LWR at tikzbabel}
+{}
+{\catcode`\$=3} % dollar sign is math shift
+}
+
+\AfterEndEnvironment{tikzpicture}{%
+\endlateximage
+
+\ifbool{LWR at tikzbabel}
+{}
+{\catcode`\$=\active}
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+
+\newcounter{LWR at minipagedepth}
+\setcounter{LWR at minipagedepth}{0}
+
+\newlength{\LWR at minipagewidth}
+\newlength{\LWR at minipageheight}
+\let\LWR at origminipage\minipage
+\let\LWR at origendminipage\endminipage
+\NewDocumentCommand{\LWR at nullrule}{o m m}{}
+\newcommand{\LWR at makefntext}[1]{%
+\begingroup%
+\let\rule\LWR at nullrule%
+\textsuperscript{\@thefnmark} #1%
+\endgroup%
+\LWR at htmltagc{/\LWR at tagregularparagraph}%
+}
+\newcommand*{\LWR at makefnmark}{\textsuperscript{\@thefnmark}}
+
+\def\LWR at endminipage{%
+ \par
+ \unskip
+ \ifvoid\@mpfootins\else
+ \vskip\skip\@mpfootins
+ \normalcolor
+\LWR at htmldivclass{mpfootnotes}
+ \unvbox\@mpfootins
+\LWR at htmldivclassend{mpfootnotes}
+ \fi
+ \@minipagefalse
+ \color at endgroup
+ \egroup
+ \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
+
+\newcommand*{\LWR at subminipage}{%
+\LWR at stoppars
+\LWR at origminipage{6in}
+\LWR at origraggedright%
+\let\footnote\LWR at origfootnote%
+\let\@makefntext\LWR at makefntext%
+\let\@makefnmark\LWR at makefnmark%
+\LWR at startpars%
+}
+
+\newcommand*{\LWR at endsubminipage}{%
+\LWR at stoppars%
+\LWR at endminipage% The following empty line is required:
+
+}
+
+\newbool{LWR at minipagefullwidth}
+\boolfalse{LWR at minipagefullwidth}
+\newcommand*{\minipagefullwidth}{\booltrue{LWR at minipagefullwidth}}
+\end{warpHTML}
+\begin{warpprint}
+\newcommand*{\minipagefullwidth}{}
+\end{warpprint}
+\begin{warpHTML}
+\newbool{LWR at minipagethispar}
+\boolfalse{LWR at minipagethispar}
+\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
+{%
+\LWR at traceinfo{starting minipage}%
+\uselengthunit{in}%
+\setlength{\LWR at minipagewidth}{#4}%
+\ifthenelse{\cnttest{\value{LWR at minipagedepth}}{=}{0}}{%
+\addtolength{\LWR at minipagewidth}{3em}% room for frames
+\setlength{\linewidth}{6in}%
+\setlength{\textwidth}{6in}%
+\setlength{\textheight}{9in}%
+}{}%
+\addtocounter{LWR at minipagedepth}{1}%
+\setlength{\LWR at minipageheight}{\textheight}% default unless specified
+\IfValueTF{#2}{\setlength{\LWR at minipageheight}{#2}}{}%
+\LWR at stoppars%
+\LWR at traceinfo{minipage: creating div class}%
+\LWR at htmltag{div class="minipage" style="%
+\ifthenelse{\equal{#1}{t}}{vertical-align: bottom ; }{}%
+\ifthenelse{\equal{#1}{c}}{vertical-align: middle ; }{}%
+\ifthenelse{\equal{#1}{b}}{vertical-align: top ; }{}%
+\ifthenelse{\equal{#3}{t}}{justify-content: flex-start ; }{}%
+\ifthenelse{\equal{#3}{c}}{justify-content: center ; }{}%
+\ifthenelse{\equal{#3}{b}}{justify-content: flex-end ; }{}%
+\ifthenelse{\equal{#3}{s}}{justify-content: space-between ; }{}%
+\LWR at traceinfo{minipage: about to print the width}%
+\uselengthunit{PT}%
+\ifbool{LWR at minipagefullwidth}%
+{\boolfalse{LWR at minipagefullwidth}}%
+{%
+\ifthenelse{\lengthtest{#4}=\linewidth}%
+{}%
+{width:\rndprintlength{\LWR at minipagewidth} ; }%
+}%
+\LWR at traceinfo{minipage: about to print the height}%
+\IfValueTF{#2}{height:\rndprintlength{\LWR at minipageheight} ; }{}%
+"{}}%
+
+\LWR at origminipage{6in}% The preceding empty line is required.
+\setlength{\linewidth}{#4}% the original width
+\setlength{\textwidth}{6in}%
+\setlength{\textheight}{9in}%
+\LWR at origraggedright%
+\let\footnote\LWR at origfootnote%
+\let\@makefntext\LWR at makefntext%
+\let\@makefnmark\LWR at makefnmark%
+\LWR at startpars%
+\LWR at traceinfo{minipage: finished starting the minipage}%
+}
+{%
+\LWR at stoppars%
+\LWR at endminipage% The following empty line is required:
+
+\LWR at htmldivclassend{minipage}%
+\vspace{1\baselineskip}% required for subcaption
+\addtocounter{LWR at minipagedepth}{-1}%
+\LWR at startpars%
+\global\booltrue{LWR at minipagethispar}%
+}
+\RenewDocumentCommand{\parbox}{O{t} o O{t} m m}
+{
+\begin{minipage}[#1][#2][#3]{#4}
+#5
+\end{minipage}
+}
+\RenewDocumentCommand{\makebox}{o o m}{%
+\mbox{#3}
+}
+\RenewDocumentCommand{\framebox}{o o m}{%
+\fbox{#3}
+}
+\let\LWR at origfbox\fbox
+\renewcommand*{\fbox}[1]{%
+\InlineClass{framebox}{#1}%
+}
+\RenewDocumentCommand{\raisebox}{m o o m}{%
+#4%
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\renewcommand{\emph}[1]{\LWR at htmlspan{em}{#1}}
+
+\renewcommand{\textmd}[1]{\LWR at htmlspan{textmd}{#1}}
+
+\renewcommand{\textbf}[1]{\LWR at htmlspan{b}{#1}}
+
+\renewcommand{\textrm}[1]{\InlineClass{textrm}{#1}}
+
+\renewcommand{\textsf}[1]{\InlineClass{textsf}{#1}}
+
+\renewcommand{\texttt}[1]{\LWR at htmlspan{kbd}{#1}}
+
+\renewcommand{\textup}[1]{\LWR at htmlspan{textup}{#1}}
+
+\renewcommand{\textit}[1]{\LWR at htmlspan{i}{#1}}
+
+\renewcommand{\textsc}[1]{\InlineClass{textsc}{#1}}
+
+\renewcommand{\textnormal}[1]{\textmd{\textrm{\textup{#1}}}}
+
+\renewcommand*{\mdseries}{}
+
+\renewcommand*{\bfseries}{}
+
+\renewcommand*{\rmfamily}{}
+
+\renewcommand*{\sffamily}{}
+
+\renewcommand*{\ttfamily}{}
+
+\renewcommand*{\upshape}{}
+
+\renewcommand*{\itshape}{}
+
+\renewcommand*{\scshape}{}
+
+\renewcommand*{\normalfont}{}
+
+
+\renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}}
+
+
+\renewcommand{\sb}[1]{\text{<sub>#1</sub>}{}}
+
+\renewcommand{\textsuperscript}[1]{\LWR at htmlspan{sup}{#1}}
+
+\renewcommand{\textsubscript}[1]{\LWR at htmlspan{sub}{#1}}
+
+\AtBeginDocument{\let\up\textsuperscript}
+
+\AtBeginDocument{\let\fup\textsuperscript}
+
+\renewcommand*{\hfill}{\qquad}
+
+\renewcommand*{\hrulefill}{\rule{1in}{1pt}}
+
+\renewcommand*{\dotfill}{\dots}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\let\LWR at origcomma\,
+\let\LWR at origtilde~
+\let\LWR at origenskip\enskip
+\let\LWR at origquad\quad
+\let\LWR at origqquad\qquad
+\let\LWR at orighspace\hspace
+\let\LWR at origrule\rule
+
+\renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
+\renewcommand*{~}{\HTMLentity{nbsp}}
+\renewcommand*{\textellipsis}{\HTMLunicode{2026}}
+\let\LWR at orignormalsize\normalsize
+\let\LWR at origsmall\small
+\let\LWR at origfootnotesize\footnotesize
+\let\LWR at origscriptsize\scriptsize
+\let\LWR at origtiny\tiny
+\let\LWR at origlarge\large
+\let\LWR at origLarge\Large
+\let\LWR at origLARGE\LARGE
+\let\LWR at orighuge\huge
+\let\LWR at origHuge\Huge
+\renewcommand*{\normalsize}{}
+\renewcommand*{\small}{}
+\renewcommand*{\footnotesize}{}
+\renewcommand*{\scriptsize}{}
+\renewcommand*{\tiny}{}
+\renewcommand*{\large}{}
+\renewcommand*{\Large}{}
+\renewcommand*{\LARGE}{}
+\renewcommand*{\huge}{}
+\renewcommand*{\Huge}{}
+
+\renewcommand*{\onecolumn}{}
+
+\renewcommand{\twocolumn}[1][]{
+
+#1
+
+}
+
+\newcommand*{\LWR at newlinebr}{\unskip\LWR at htmltag{br /}\LWR at orignewline}%
+\let\newline\LWR at newlinebr
+
+\NewDocumentCommand{\LWR at endofline}{s o}
+{%
+\newline%
+}
+
+\newcommand*{\LWR at minipagestartpars}{%
+\ifbool{LWR at minipagethispar}%
+{%
+\LWR at startpars%
+}{}%
+}
+
+\newcommand*{\LWR at minipagestoppars}{%
+\ifbool{LWR at minipagethispar}%
+{%
+\LWR at stoppars%
+}{}%
+}
+
+\renewcommand*{\quad}{%
+\LWR at minipagestoppars%
+\HTMLunicode{2001}%
+\LWR at minipagestartpars%
+}
+
+\renewcommand*{\qquad}{\quad\quad}
+
+\renewcommand*{\enskip}{%
+\LWR at minipagestoppars%
+\HTMLunicode{2000}%
+\LWR at minipagestartpars%
+}
+
+\newlength{\LWR at tempwidth}
+\newlength{\LWR at tempheight}
+\newlength{\LWR at tempraise}
+
+
+\NewDocumentCommand{\LWR at hspace}{s m}{%
+\setlength{\LWR at tempwidth}{#2}%
+\ifthenelse{\dimtest{\LWR at tempwidth}{=}{0pt}}{}{%
+\LWR at minipagestoppars%
+\ifthenelse{\dimtest{\LWR at tempwidth}{=}{.16667em}}
+{%
+\HTMLunicode{2009}% thin breakable space
+}%
+{%
+\uselengthunit{PT}%
+\LWR at htmltagc{%
+span style="width:\printlength{\LWR at tempwidth}; display:inline-block;"%
+}%
+\LWR at htmltagc{/span}%
+}%
+\LWR at minipagestartpars%
+}%
+}
+\let\hspace\LWR at hspace
+
+\renewcommand*{\linebreak}[1][]{\newline}
+
+\renewcommand*{\nolinebreak}[1][]{}
+
+\renewcommand*{\pagebreak}[1][]{
+
+}
+
+\renewcommand*{\nopagebreak}[1][]{}
+
+\RenewDocumentCommand{\enlargethispage}{s m}{}
+
+\NewDocumentCommand{\LWR at rule}{o m m}{%
+\setlength{\LWR at tempwidth}{#2}%
+\ifthenelse{\lengthtest{\LWR at tempwidth=0pt}}
+{}% zero- width
+{% non-zero width
+\ifthenelse{\lengthtest{\LWR at tempwidth>0pt}\AND%
+\lengthtest{\LWR at tempwidth<1pt}}%
+{\setlength{\LWR at tempwidth}{1pt}}{}%
+\setlength{\LWR at tempheight}{#3}%
+\ifthenelse{\lengthtest{\LWR at tempheight>0pt}\AND%
+\lengthtest{\LWR at tempheight<1pt}}%
+{\setlength{\LWR at tempheight}{1pt}}{}%
+\LWR at minipagestoppars%
+\uselengthunit{PT}%
+\LWR at htmltagc{%
+span
+style=" %
+background:\LWR at currenttextcolor; %
+width:\printlength{\LWR at tempwidth}; %
+height:\printlength{\LWR at tempheight}; %
+\IfValueTF{#1}%
+{%
+\setlength{\LWR at tempraise}{0pt-#1}%
+\setlength{\LWR at tempraise}{\LWR at tempraise*2}%
+\LWR at orignewline%
+-ms-transform: translate(0pt,\printlength{\LWR at tempraise}); %
+\LWR at orignewline%
+-webkit-transform: translate(0pt,\printlength{\LWR at tempraise}); %
+\LWR at orignewline%
+transform: translate(0pt,\printlength{\LWR at tempraise}); %
+\LWR at orignewline%
+}{}%
+display:inline-block;"%
+}%
+\LWR at htmltagc{/span}%
+\LWR at minipagestartpars%
+}% non-zero width
+}
+\let\rule\LWR at rule
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\phantomsection}{\section*{}}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
+\newcommand*{\LWR at TeX}
+{\InlineClass{latexlogofont}%
+{\InlineClass{latexlogo}{T\textsubscript{e}X}}}
+\newcommand*{\LWR at LaTeX}
+{\InlineClass{latexlogofont}%
+{\InlineClass{latexlogo}%
+{L\textsuperscript{a}T\textsubscript{e}X}}}
+
+\renewcommand*{\LaTeXe}
+{\LaTeX\InlineClass{latexlogofont}%
+{\,2\textsubscript{\textit{\HTMLunicode{3B5}}}}}
+\newcommand*{\LWR at LuaTeX}{\InlineClass{latexlogofont}{Lua}\TeX}
+\newcommand*{\LWR at LuaLaTeX}{\InlineClass{latexlogofont}{Lua}\LaTeX}
+\newcommand*{\Xe}
+ {X\textsubscript{\HTMLunicode{18e}}}
+\newcommand*{\LWR at XeTeX}{\InlineClass{xetexlogo}{\Xe}\TeX}
+\newcommand*{\LWR at XeLaTeX}{\InlineClass{xelatexlogo}{\Xe}\LaTeX}
+\newcommand*{\LWR at ConTeXt}
+{\InlineClass{latexlogofont}{Con}\TeX{}%
+\InlineClass{latexlogofont}{t}}
+\providecommand*{\BibTeX}
+{\InlineClass{latexlogofont}{B\textsc{ib}}\TeX}
+
+\newcommand*{\MakeIndex}
+{\InlineClass{latexlogofont}{\textit{MakeIndex}}}
+\AtBeginDocument{\DeclareDocumentCommand{\AmS}{}
+{\InlineClass{amslogo}{\textit{A\textsubscript{M}S}}}}
+\newcommand*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX}
+\newcommand*{\LyX}{\InlineClass{lyxlogo}{LyX}}
+\end{warpHTML}
+\begin{warpprint}
+\newcommand*{\XeTeXrevE}
+ {\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}\hspace{-.125em}}
+\providecommand*{\XeTeX}{\mbox{X\XeTeXrevE\TeX}}
+\providecommand*{\XeLaTeX}{\mbox{X\XeTeXrevE\LaTeX}}
+\providecommand*{\AmS}{%
+\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
+\hbox{$\mathcal M$}\kern-.2em\mathcal S$}}
+\newcommand*{\LyX}{\textsf{LyX}}
+\providecommand*{\LuaTeX}{\mbox{Lua\TeX}}
+\providecommand*{\LuaLaTeX}{\mbox{Lua\LaTeX}}
+\providecommand*{\BibTeX}{\mbox{B\textsc{ib}\TeX}}
+\providecommand*{\MakeIndex}{\mbox{\textit{MakeIndex}}}
+\providecommand*{\ConTeXt}{\mbox{Con\TeX{}t}}
+\providecommand*{\MiKTeX}{\mbox{MiK\TeX}}
+\end{warpprint}
+
+
+\begin{warpHTML}
+
+\AfterEndPreamble{\LWR at LwarpStart}
+\AtEndDocument{\LWR at LwarpEnd}
+
+\end{warpHTML}
+
+
+
+\providecommand*{\HomeHTMLFileName}{\BaseJobname}
+\providecommand*{\HTMLFileName}{}
+\providecommand*{\UseLatexmk}{false}
+
+\begin{warpprint}
+\ifcsdef{LWR at file}{}{\newwrite{\LWR at file}}
+\immediate\openout\LWR at file=lwarpmk.conf
+\ifwindows
+\immediate\write\LWR at file{opsystem = "Windows"}
+\else
+\immediate\write\LWR at file{opsystem = "Unix"}
+\fi
+\ifPDFTeX
+\immediate\write\LWR at file{latexname = "pdflatex"}
+\fi
+\ifXeTeX
+\immediate\write\LWR at file{latexname = "xelatex"}
+\fi
+\ifLuaTeX
+\immediate\write\LWR at file{latexname = "lualatex"}
+\fi
+\immediate\write\LWR at file{sourcename = "\jobname"}
+\immediate\write\LWR at file{%
+homehtmlfilename = "\HomeHTMLFileName"%
+}
+\immediate\write\LWR at file{htmlfilename = "\HTMLFileName"}
+\immediate\write\LWR at file{uselatexmk = "\UseLatexmk"}
+\immediate\closeout\LWR at file
+\end{warpprint}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+%%
+%% End of file `lwarp.sty'.
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2017-02-21 23:44:01 UTC (rev 43292)
@@ -388,7 +388,7 @@
luamplib luaotfload
luasseq luatex85 luatexbase luatexja luatexko luatextra
luatodonotes luaxml
- lxfonts ly1
+ lwarp lxfonts ly1
m-tx macros2e macroswap mafr magaz mailing mailmerge
make4ht makebarcode makebase makebox makecell makecirc makecmds
makedtx makeglos makeplot
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2017-02-21 23:44:01 UTC (rev 43292)
@@ -2794,6 +2794,7 @@
'ltximg' => 'ltximg\.pl$',
'lua2dox' => 'lua2dox_filter?$',
'luaotfload' => 'luaotfload-tool',
+ 'lwarp' => 'lwarpmk.lua',
'm-tx' => 'm-tx.lua',
'make4ht' => 'make4ht$',
'makedtx' => '^makedtx\.pl$',
Modified: trunk/Master/tlpkg/tlpsrc/collection-htmlxml.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-htmlxml.tlpsrc 2017-02-21 23:36:09 UTC (rev 43291)
+++ trunk/Master/tlpkg/tlpsrc/collection-htmlxml.tlpsrc 2017-02-21 23:44:01 UTC (rev 43292)
@@ -8,6 +8,7 @@
#
depend classpack
depend jadetex
+depend lwarp
depend passivetex
depend tex4ht
depend xmltex
Added: trunk/Master/tlpkg/tlpsrc/lwarp.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/lwarp.tlpsrc (rev 0)
+++ trunk/Master/tlpkg/tlpsrc/lwarp.tlpsrc 2017-02-21 23:44:01 UTC (rev 43292)
@@ -0,0 +1 @@
+binpattern f bin/${ARCH}/lwarpmk
More information about the tex-live-commits
mailing list