summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty951
1 files changed, 588 insertions, 363 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index a0ac4d906f1..bd8ecd191dd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/11/22 v0.44 Allows LaTeX to directly produce HTML5 output.]
+ [2018/01/23 v0.46 Allows LaTeX to directly produce HTML5 output.]
@@ -48,7 +48,9 @@
\RequirePackage{upquote}
\else
\fi
-
+\newcommand*\LWR@providelength[1]{%
+ \ifdeflength{#1}{}{\newlength{#1}}%
+}
\RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc.
\RequirePackage{xpatch}
@@ -168,7 +170,6 @@
{\includecomment{LWR@createlwarpmk}}
{\excludecomment{LWR@createlwarpmk}}
-
\newcommand*{\LWR@loadafter}[1]{%
\@ifpackageloaded{#1}
{
@@ -181,6 +182,10 @@ after lwarp.}
{}
}
+\@ifclassloaded{memoir}
+{\newcommand*{\LWR@notmemoirloadafter}[1]{}}
+{\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter}
+
\newcommand*{\LWR@loadbefore}[1]{%
\@ifpackageloaded{#1}
{}
@@ -199,11 +204,10 @@ Package(s) #2 may be useful instead}
or is superceded by another package.
For a possible alternative, see package(s) #2.}
}
-
\LWR@loadafter{a4}
\LWR@loadafter{a4wide}
\LWR@loadafter{a5comb}
-\LWR@loadafter{abstract}
+\LWR@notmemoirloadafter{abstract}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
\LWR@loadafter{afterpage}
@@ -213,38 +217,44 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{amsthm}
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
-\LWR@loadafter{appendix}
+\LWR@notmemoirloadafter{appendix}
\LWR@loadafter{arabicfront}
-\LWR@loadafter{array}
+\LWR@notmemoirloadafter{array}
\LWR@loadafter{atbegshi}
\LWR@loadafter{authblk}
+\LWR@loadafter{backref}
\LWR@loadafter{balance}
\LWR@loadafter{bigdelim}
\LWR@loadafter{bigstrut}
\LWR@loadafter{bookmark}
-\LWR@loadafter{booktabs}
+\LWR@notmemoirloadafter{booktabs}
\LWR@loadafter{boxedminipage}
\LWR@loadafter{boxedminipage2e}
\LWR@loadafter{breakurl}
\LWR@loadafter{cancel}
-\LWR@loadafter{ccaption}
-\LWR@loadafter{changepage}
-\LWR@loadafter{chngpage}
+\LWR@notmemoirloadafter{ccaption}
+\LWR@loadafter{changebar}
+\LWR@notmemoirloadafter{changepage}
+\LWR@notmemoirloadafter{chngpage}
\LWR@loadafter{chappg}
+\LWR@loadafter{cite}
\LWR@loadafter{color}
-\LWR@loadafter{crop}
+\LWR@loadafter{continue}
+\LWR@notmemoirloadafter{crop}
\LWR@loadafter{cuted}
\LWR@loadafter{cutwin}
\LWR@loadafter{dblfnote}
-\LWR@loadafter{dcolumn}
+\LWR@notmemoirloadafter{dcolumn}
\LWR@loadafter{draftwatermark}
\LWR@loadafter{easy-todo}
\LWR@loadafter{ebook}
\LWR@loadafter{ellipsis}
\LWR@loadafter{emptypage}
-\LWR@loadafter{enumerate}
+\LWR@loadafter{endfloat}
+\LWR@loadafter{endnotes}
+\LWR@notmemoirloadafter{enumerate}
\LWR@loadafter{enumitem}
-\LWR@loadafter{epigraph}
+\LWR@notmemoirloadafter{epigraph}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
@@ -257,20 +267,29 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{fix2col}
\LWR@loadafter{fixme}
\LWR@loadafter{fixmetodonotes}
+\LWR@loadafter{flafter}
\LWR@loadafter{float}
\LWR@loadafter{floatflt}
\LWR@loadafter{floatpag}
\LWR@loadafter{floatrow}
+\LWR@loadafter{fltrace}
\LWR@loadafter{flushend}
\LWR@loadafter{fncychap}
\LWR@loadafter{fnpos}
+\LWR@loadafter{footmisc}
+\LWR@loadafter{footnote}
+\LWR@loadafter{footnotehyper}
+\LWR@loadafter{footnpag}
+\LWR@loadafter{framed}
\LWR@loadafter{ftnright}
\LWR@loadafter{fullpage}
\LWR@loadafter{fullwidth}
+\LWR@loadafter{fwlw}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
\LWR@loadafter{grffile}
\LWR@loadafter{hang}
+\LWR@loadafter{hanging}
\LWR@loadafter{hyperref}
\LWR@loadafter{hyperxmp}
\LWR@loadafter{idxlayout}
@@ -292,29 +311,34 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{marginnote}
\LWR@loadafter{mcaption}
\LWR@loadafter{mdframed}
+\LWR@loadafter{memhfixc}
\LWR@loadafter{metalogo}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
-\LWR@loadafter{moreverb}
-\LWR@loadafter{mparhack}
+\LWR@loadafter{midpage}
+\LWR@notmemoirloadafter{moreverb}
+\LWR@notmemoirloadafter{mparhack}
\LWR@loadafter{multirow}
\LWR@loadafter{nameref}
-\LWR@loadafter{needspace}
+\LWR@loadafter{natbib}
+\LWR@notmemoirloadafter{needspace}
\LWR@loadafter{newtxmath}
-\LWR@loadafter{nextpage}
+\LWR@notmemoirloadafter{nextpage}
\LWR@loadafter{nonumonpart}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
\LWR@loadafter{overpic}
-\LWR@loadafter{pagenote}
+\LWR@notmemoirloadafter{pagenote}
+\LWR@loadafter{pagesel}
\LWR@loadafter{paralist}
-\LWR@loadafter{parskip}
+\LWR@notmemoirloadafter{parskip}
\LWR@loadafter{pdflscape}
\LWR@loadafter{pdfsync}
\LWR@loadafter{pfnote}
\LWR@loadafter{placeins}
\LWR@loadafter{prelim2e}
+\LWR@loadafter{prettyref}
\LWR@loadafter{preview}
\LWR@loadafter{quotchap}
\LWR@loadafter{ragged2e}
@@ -332,9 +356,9 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{scrlayer-scrpage}
\LWR@loadafter{section}
\LWR@loadafter{sectsty}
-\LWR@loadafter{setspace}
+\LWR@notmemoirloadafter{setspace}
\LWR@loadafter{shadow}
-\LWR@loadafter{showidx}
+\LWR@notmemoirloadafter{showidx}
\LWR@loadafter{showkeys}
\LWR@loadafter{sidecap}
\LWR@loadafter{sidenotes}
@@ -344,11 +368,13 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{soulutf8}
\LWR@loadafter{stabular}
\LWR@loadafter{subfig}
+\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
\LWR@loadafter{tabls}
-\LWR@loadafter{tabularx}
+\LWR@notmemoirloadafter{tabularx}
\LWR@loadafter{tabulary}
\LWR@loadafter{textarea}
+\LWR@loadafter{textfit}
\LWR@loadafter{textpos}
\LWR@loadafter{theorem}
\LWR@loadafter{threeparttable}
@@ -356,18 +382,19 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{titleps}
\LWR@loadafter{titlesec}
\LWR@loadafter{titletoc}
-\LWR@loadafter{titling}
-\LWR@loadafter{tocbibind}
-\LWR@loadafter{tocloft}
+\LWR@notmemoirloadafter{titling}
+\LWR@notmemoirloadafter{tocbibind}
+\LWR@notmemoirloadafter{tocloft}
\LWR@loadafter{tocstyle}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
\LWR@loadafter{transparent}
\LWR@loadafter{trivfloat}
+\LWR@loadafter{turnthepage}
\LWR@loadafter{ulem}
\LWR@loadafter{upref}
\LWR@loadafter{varioref}
-\LWR@loadafter{verse}
+\LWR@notmemoirloadafter{verse}
\LWR@loadafter{wallpaper}
\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
@@ -514,7 +541,9 @@ top=1in,bottom=1in,%
}
\newcommand*{\LWR@lookforpackagename}[1]{%
\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]%
+\LWR@traceinfo{LWR@lookforpackagename with blanks: !\LWR@strresult!}%
\StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]%
+\LWR@traceinfo{LWR@lookforpackagename without blanks: !\LWR@strresulttwo!}%
\IfStrEq{\LWR@strresulttwo}{}%
{}% no filename
{% yes filename
@@ -525,7 +554,12 @@ top=1in,bottom=1in,%
{\LWR@strresult}%
{lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
}%
-{}% no lwarp-* file
+{
+ \StrSubstitute%
+ {\LWR@requirepackagenames}%
+ {\LWR@strresult}%
+ {\LWR@strresulttwo}[\LWR@requirepackagenames]%
+}% no lwarp-* file
}% yes filename
}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
@@ -637,15 +671,22 @@ top=1in,bottom=1in,%
\newread\LWR@copyinfile % open the file to read from
\newcommand*{\LWR@copyfile}[2]{%
+\LWR@traceinfo{LWR@copyfile: copying #1 to #2}
+
\immediate\openout\LWR@copyoutfile=#2
\openin\LWR@copyinfile=#1
\begingroup\endlinechar=-1
\makeatletter
+
+\LWR@traceinfo{LWR@copyfile: about to loop}
+
\loop\unless\ifeof\LWR@copyinfile
+ \LWR@traceinfo{LWR@copyfile: one line}
\read\LWR@copyinfile to\LWR@fileline % Read one line and store it into \LWR@fileline
\immediate\write\LWR@copyoutfile{\unexpanded\expandafter{\LWR@fileline}}%
\repeat
-\closeout\LWR@copyoutfile
+\immediate\closeout\LWR@copyoutfile
+\LWR@traceinfo{LWR@copyfile: done}
\endgroup
}
@@ -678,12 +719,6 @@ top=1in,bottom=1in,%
\end{warpall}
-\begin{warpHTML}
-\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
-\end{warpHTML}
-
\begin{warpall}
\newbool{FormatEPUB}
\boolfalse{FormatEPUB}
@@ -726,7 +761,7 @@ top=1in,bottom=1in,%
\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
\renewcommand*{\LWR@tagparagraph}{h6}
\renewcommand*{\LWR@tagparagraphend}{/h6}
-\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\renewcommand*{\LWR@tagsubparagraphend}{/span}
}% WPTitleHeading
{% not WPTitleHeading, part and section starting at h1
@@ -763,7 +798,7 @@ top=1in,bottom=1in,%
\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
\renewcommand*{\LWR@tagparagraph}{h6}
\renewcommand*{\LWR@tagparagraphend}{/h6}
-\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\renewcommand*{\LWR@tagsubparagraphend}{/span}
}% not WPTitleHeading
}% chapter defined
@@ -818,7 +853,7 @@ top=1in,bottom=1in,%
\let\LWR@origpagestyle\pagestyle
\let\LWR@origthispagestyle\thispagestyle
-\let\LWR@origpagenumbering\pagenumbering
+\LetLtxMacro\LWR@origpagenumbering\pagenumbering
\LetLtxMacro{\LWR@origminipage}{\minipage}
\let\LWR@origendminipage\endminipage
@@ -965,7 +1000,7 @@ homehtmlfilename = "\HomeHTMLFilename"%
\begin{filecontents*}{lwarp.css}
/*
CSS stylesheet for the LaTeX lwarp package
- Copyright 2016-2017 Brian Dunn — BD Tech Concepts LLC
+ Copyright 2016-2018 Brian Dunn — BD Tech Concepts LLC
*/
/* a fix for older browsers: */
@@ -1010,6 +1045,7 @@ body {
}
p {margin: 1.5ex 0em 1.5ex 0em ;}
+table p {margin: .5ex 0em .5ex 0em ;}
/* Holds a section number to add space between it and the name */
span.sectionnumber { margin-right: 0em }
@@ -1380,7 +1416,7 @@ ol {
}
ul, body dir, body menu {
- margin: 1ex 1em 1ex 0em;
+ margin: 3ex 1em 3ex 0em;
line-height: 1.2;
}
@@ -1570,7 +1606,8 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
.mdframedtitle {
padding: .5em ;
display: block ;
- font-size: 130%
+ font-size: 130% ;
+ margin-bottom: 1ex ;
}
.mdframedsubtitle {
@@ -1599,6 +1636,12 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
display: block ;
}
+.shaded {
+ margin: 3ex 0em 3ex 0em ;
+ padding: .3ex 1em .3ex 1em ;
+ display: block ;
+}
+
.snugframed {
margin: 3ex 0em 3ex 0em ;
border: 1px solid black;
@@ -2676,7 +2719,17 @@ nav.botnavigation {
(require "texindy.xdy")
(require "page-ranges.xdy")
(require "book-order.xdy")
+(require "page-ranges.xdy")
(markup-locref :open "\hyperindexref{" :close "}")
+(define-location-class "arabic-page-numbers"
+ ("arabic-numbers") :min-range-length 1)
+(define-location-class-order ("roman-page-numbers"
+ "arabic-page-numbers"
+ "alpha-page-numbers"
+ "Roman-page-numbers"
+ "Alpha-page-numbers"
+ "see"
+ "seealso"))
\end{filecontents*}
\end{warpprint}
@@ -2750,7 +2803,10 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
MathJax.Hub.Config({
extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
jax: ["input/TeX","output/HTML-CSS"],
- tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
+ tex2jax: {
+ inlineMath: [["$","$"],["\\(","\\)"]] ,
+ processClass: "tabbing|verse"
+ },
TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
});
MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
@@ -2787,11 +2843,11 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
\begin{filecontents*}{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2017 Brian Dunn
+-- Copyright 2016-2018 Brian Dunn
-- Print the usage of the lwarpmk command:
-printversion = "v0.44"
+printversion = "v0.46"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3366,57 +3422,57 @@ end -- not --version
\NewDocumentCommand{\pushclose}{m m}
{
-\let\LWR@closetwelve\LWR@closeeleven
-\let\LWR@closeeleven\LWR@closeten
-\let\LWR@closeten\LWR@closenine
-\let\LWR@closenine\LWR@closeeight
-\let\LWR@closeeight\LWR@closeseven
-\let\LWR@closeseven\LWR@closesix
-\let\LWR@closesix\LWR@closefive
-\let\LWR@closefive\LWR@closefour
-\let\LWR@closefour\LWR@closethree
-\let\LWR@closethree\LWR@closetwo
-\let\LWR@closetwo\LWR@closeone
-\let\LWR@closeone#1
-\let\LWR@closedepthtwelve\LWR@closedeptheleven
-\let\LWR@closedepthelevel\LWR@closedepthten
-\let\LWR@closedepthten\LWR@closedepthnine
-\let\LWR@closedepthnine\LWR@closedeptheight
-\let\LWR@closedeptheight\LWR@closedepthseven
-\let\LWR@closedepthseven\LWR@closedepthsix
-\let\LWR@closedepthsix\LWR@closedepthfive
-\let\LWR@closedepthfive\LWR@closedepthfour
-\let\LWR@closedepthfour\LWR@closedepththree
-\let\LWR@closedepththree\LWR@closedepthtwo
-\let\LWR@closedepthtwo\LWR@closedepthone
-\let\LWR@closedepthone#2
+\global\let\LWR@closetwelve\LWR@closeeleven
+\global\let\LWR@closeeleven\LWR@closeten
+\global\let\LWR@closeten\LWR@closenine
+\global\let\LWR@closenine\LWR@closeeight
+\global\let\LWR@closeeight\LWR@closeseven
+\global\let\LWR@closeseven\LWR@closesix
+\global\let\LWR@closesix\LWR@closefive
+\global\let\LWR@closefive\LWR@closefour
+\global\let\LWR@closefour\LWR@closethree
+\global\let\LWR@closethree\LWR@closetwo
+\global\let\LWR@closetwo\LWR@closeone
+\global\let\LWR@closeone#1
+\global\let\LWR@closedepthtwelve\LWR@closedeptheleven
+\global\let\LWR@closedeptheleven\LWR@closedepthten
+\global\let\LWR@closedepthten\LWR@closedepthnine
+\global\let\LWR@closedepthnine\LWR@closedeptheight
+\global\let\LWR@closedeptheight\LWR@closedepthseven
+\global\let\LWR@closedepthseven\LWR@closedepthsix
+\global\let\LWR@closedepthsix\LWR@closedepthfive
+\global\let\LWR@closedepthfive\LWR@closedepthfour
+\global\let\LWR@closedepthfour\LWR@closedepththree
+\global\let\LWR@closedepththree\LWR@closedepthtwo
+\global\let\LWR@closedepthtwo\LWR@closedepthone
+\global\let\LWR@closedepthone#2
}
\newcommand*{\popclose}
{
-\let\LWR@closeone\LWR@closetwo
-\let\LWR@closetwo\LWR@closethree
-\let\LWR@closethree\LWR@closefour
-\let\LWR@closefour\LWR@closefive
-\let\LWR@closefive\LWR@closesix
-\let\LWR@closesix\LWR@closeseven
-\let\LWR@closeseven\LWR@closeeight
-\let\LWR@closeeight\LWR@closenine
-\let\LWR@closenine\LWR@closeten
-\let\LWR@closeten\LWR@closeeleven
-\let\LWR@closeeleven\LWR@closetwelve
-\let\LWR@closedepthone\LWR@closedepthtwo
-\let\LWR@closedepthtwo\LWR@closedepththree
-\let\LWR@closedepththree\LWR@closedepthfour
-\let\LWR@closedepthfour\LWR@closedepthfive
-\let\LWR@closedepthfive\LWR@closedepthsix
-\let\LWR@closedepthsix\LWR@closedepthseven
-\let\LWR@closedepthseven\LWR@closedeptheight
-\let\LWR@closedeptheight\LWR@closedepthnine
-\let\LWR@closedepthnine\LWR@closedepthten
-\let\LWR@closedepthten\LWR@closedeptheleven
-\let\LWR@closedeptheleven\LWR@closedepthtwelve
+\global\let\LWR@closeone\LWR@closetwo
+\global\let\LWR@closetwo\LWR@closethree
+\global\let\LWR@closethree\LWR@closefour
+\global\let\LWR@closefour\LWR@closefive
+\global\let\LWR@closefive\LWR@closesix
+\global\let\LWR@closesix\LWR@closeseven
+\global\let\LWR@closeseven\LWR@closeeight
+\global\let\LWR@closeeight\LWR@closenine
+\global\let\LWR@closenine\LWR@closeten
+\global\let\LWR@closeten\LWR@closeeleven
+\global\let\LWR@closeeleven\LWR@closetwelve
+\global\let\LWR@closedepthone\LWR@closedepthtwo
+\global\let\LWR@closedepthtwo\LWR@closedepththree
+\global\let\LWR@closedepththree\LWR@closedepthfour
+\global\let\LWR@closedepthfour\LWR@closedepthfive
+\global\let\LWR@closedepthfive\LWR@closedepthsix
+\global\let\LWR@closedepthsix\LWR@closedepthseven
+\global\let\LWR@closedepthseven\LWR@closedeptheight
+\global\let\LWR@closedeptheight\LWR@closedepthnine
+\global\let\LWR@closedepthnine\LWR@closedepthten
+\global\let\LWR@closedepthten\LWR@closedeptheleven
+\global\let\LWR@closedeptheleven\LWR@closedepthtwelve
}
\end{warpHTML}
@@ -3434,6 +3490,21 @@ end -- not --version
\begin{warpHTML}
+\newcommand*{\LWR@sanitized}{}
+
+\newcommand*{\LWR@sanitize}[1]{%
+\LWR@traceinfo{LWR@sanitize: !#1!}%
+\edef\LWR@sanitized{#1}%
+\LWR@traceinfo{LWR@sanitize expanded: !\LWR@sanitized!}%
+\edef\LWR@sanitized{\detokenize\expandafter{\LWR@sanitized}}%
+\LWR@traceinfo{LWR@sanitize result: !\LWR@sanitized!}%
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
\let\LWR@origampersand\&
\newcommand*{\HTMLentity}[1]{%
\begingroup%
@@ -3443,7 +3514,7 @@ end -- not --version
}
\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}}
-\renewcommand*{\&}{\HTMLentity{amp}}
+\renewrobustcmd*{\&}{\HTMLentity{amp}}
\let\LWR@origtextless\textless
\renewcommand*{\textless}{\HTMLentity{lt}}
@@ -3477,8 +3548,7 @@ end -- not --version
\setcounter{LWR@htmlfilenumber}{0}
\newcommand*{\LWR@htmlsectionfilename}[1]{%
-\LWR@traceinfo{LWR@htmlsectionfilename A}%
-\LWR@traceinfo{about to assign temp}%
+\LWR@traceinfo{LWR@htmlsectionfilename A !\detokenize{#1}!}%
\edef\LWR@tempone{#1}%
\LWR@traceinfo{about to compare with ??}%
\ifthenelse{\equal{\LWR@tempone}{??}}%
@@ -3511,9 +3581,9 @@ end -- not --version
}
\newcommand*{\LWR@htmlrefsectionfilename}[1]{%
-\LWR@traceinfo{LWR@htmlrefsectionfilename A: !#1!}%
+\LWR@traceinfo{LWR@htmlrefsectionfilename: !\detokenize{#1}!}%
\LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}%
-\LWR@traceinfo{LWR@htmlrefsectionfilename B}%
+\LWR@traceinfo{LWR@htmlrefsectionfilename: done}%
}
\end{warpHTML}
@@ -3541,16 +3611,26 @@ end -- not --version
\begin{warpHTML}
-\newcommand*{\PrintStack}{
+\newcommand*{\LWR@subprintstack}{
+\LWR@closedepthone\ \LWR@closedepthtwo\ \LWR@closedepththree\
+\LWR@closedepthfour\ \LWR@closedepthfive\ \LWR@closedepthsix\
+\LWR@closedepthseven\ \LWR@closedeptheight\ \LWR@closedepthnine\
+\LWR@closedepthten\ \LWR@closedeptheleven\ \LWR@closedepthtwelve\
+}
+
+\newcommand*{\LWRPrintStack}{
\LWR@startpars
-\LWR@closedepthone{} \LWR@closedepthtwo{} \LWR@closedepththree{}
-\LWR@closedepthfour{} \LWR@closedepthfive{} \LWR@closedepthsix{}
-\LWR@closedepthseven{} \LWR@closedeptheight{} \LWR@closedepthnine{}
-\LWR@closedepthten{} \LWR@closedeptheleven{} \LWR@closedepthtwelve{}
+\LWR@subprintstack
}
\end{warpHTML}
+\begin{warpprint}
+
+\newcommand*{\LWRPrintStack}{}
+
+\end{warpprint}
+
\begin{warpHTML}
@@ -3562,9 +3642,19 @@ end -- not --version
}
\newcommand*{\LWR@closeprevious}[1]{
-\LWR@stoppars
-\whileboolexpr{not test{\ifnumcomp{\LWR@closedepthone}{<}{#1}}}%
- {\LWR@closeoneprevious}
+\LWR@traceinfo{LWR@closeprevious to depth #1, depths are \LWR@subprintstack}%
+\LWR@stoppars%
+\whileboolexpr{test{\ifnumcomp{\LWR@closedepthone}{>}{#1}}}%
+{%
+ \LWR@traceinfo{LWR@closeprevious: closing out depth \LWR@closedepthone}%
+ \LWR@closeoneprevious%
+}%
+\ifboolexpr{test{\ifnumcomp{\LWR@closedepthone}{=}{#1}}}%
+{%
+ \LWR@traceinfo{LWR@closeprevious: closing out depth \LWR@closedepthone}%
+ \LWR@closeoneprevious%
+}{}%
+\LWR@traceinfo{LWR@closeprevious: done, depths are \LWR@subprintstack}%
}
\end{warpHTML}
@@ -3574,7 +3664,9 @@ end -- not --version
\begin{warpHTML}
\newcommand{\LWR@forcenewpage}{%
+\ifinner\else%
\LWR@stoppars\LWR@orignewpage\LWR@startpars%
+\fi%
}
\renewcommand*{\pagestyle}[1]{}
\renewcommand*{\thispagestyle}[1]{}
@@ -3584,7 +3676,7 @@ end -- not --version
\renewcommand*{\flushbottom}{}
\renewcommand*{\sloppy}{}
\renewcommand*{\fussy}{}
-\renewcommand*{\pagenumbering}[1]{}
+\RenewDocumentCommand{\pagenumbering}{s m}{}
\end{warpHTML}
@@ -3603,9 +3695,9 @@ end -- not --version
\newcommand*{\LWR@tagsubsectionend}{/h5}
\newcommand*{\LWR@tagsubsubsection}{h6}
\newcommand*{\LWR@tagsubsubsectionend}{/h6}
-\newcommand*{\LWR@tagparagraph}{span class="paragraph"{}}
+\newcommand*{\LWR@tagparagraph}{span class="paragraph"}
\newcommand*{\LWR@tagparagraphend}{/span}
-\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\newcommand*{\LWR@tagsubparagraphend}{/span}
\newcommand*{\LWR@tagregularparagraph}{p}
@@ -3619,19 +3711,19 @@ end -- not --version
{%
\frenchbsetup{FrenchFootnotes=false}%
\LetLtxMacro\LWR@FBcancel\NoAutoSpacing%
- \renewcommand*{\FBcolonspace}{%
+ \renewrobustcmd*{\FBcolonspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;%
\endgroup%
}%
- \renewcommand*{\FBthinspace}{%
+ \renewrobustcmd*{\FBthinspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand\#x202f;% \,
\endgroup%
}%
- \renewcommand*{\FBguillspace}{%
+ \renewrobustcmd*{\FBguillspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;% ~, for \og xyz \fg{}
@@ -3649,7 +3741,7 @@ end -- not --version
\LWR@origampersand{}nbsp;% ~
\endgroup%
}%
- \renewcommand*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
+ \renewrobustcmd*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
\ifFBunicode%
\else%
\DeclareTextSymbol{\FBtextellipsis}{LY1}{133}%
@@ -3661,10 +3753,13 @@ end -- not --version
\newcommand*{\LWR@htmltagc}[1]{%
{%
+\LWR@traceinfo{LWR@htmltagc !\detokenize{#1}!}%
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\protect\LWR@origtextless#1\protect\LWR@origtextgreater%
+\protect\LWR@origtextless%
+#1%
+\protect\LWR@origtextgreater%
\endgroup%
}%
}
@@ -3676,7 +3771,7 @@ end -- not --version
\newenvironment*{LWR@nestspan}
{%
-\LWR@traceinfo{LWR@nestspan}%
+\LWR@traceinfo{LWR@nestspan starting}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{%
\LWR@traceinfo{LWR@nestspan: inside a lateximage}%
@@ -3693,12 +3788,14 @@ end -- not --version
}%
\renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}%
}% not in a lateximage
+\LWR@traceinfo{LWR@nestspan starting: done}%
}% starting env
{% ending env
+\LWR@traceinfo{LWR@nestspan ending}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{\addtocounter{LWR@spandepth}{-1}}%
-\LWR@traceinfo{LWR@nestspan: done}%
+\LWR@traceinfo{LWR@nestspan ending: done}%
}
\AfterEndEnvironment{LWR@nestspan}{\global\let\par\LWR@closeparagraph}
@@ -3724,14 +3821,8 @@ end -- not --version
}
-\newcommand*{\LWR@htmltagb}[1]{%
+\newcommand*{\LWR@htmltag}[1]{%
\LWR@htmltagc{#1}%
-\endgroup%
-}
-
-\newcommand*{\LWR@htmltag}{%
-\begingroup\catcode`\_=12
-\LWR@htmltagb%
}
@@ -3762,14 +3853,8 @@ end -- not --version
#1%
}%
\LWR@htmlclosecomment{}}
-\newcommand{\LWR@htmlblockcommentb}[1]
-{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars\endgroup}
-
-\newcommand{\LWR@htmlblockcomment}
-{%
-\begingroup\catcode`\_=12
-\LWR@htmlblockcommentb%
-}
+\newcommand{\LWR@htmlblockcomment}[1]
+{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars}
\newcommand*{\LWR@htmlblocktag}[1]{%
\LWR@stoppars%
@@ -3835,12 +3920,8 @@ end -- not --version
\begin{warpHTML}
\NewDocumentEnvironment{BlockClass}{o m}%
-{
-\LWR@htmldivclass[#1]{#2}
-}
-{
-\LWR@htmldivclassend{#2}
-}
+{\LWR@htmldivclass[#1]{#2}}
+{\LWR@htmldivclassend{#2}}
\end{warpHTML}
\begin{warpprint}
\NewDocumentEnvironment{BlockClass}{o m}{}{}%
@@ -3869,10 +3950,10 @@ end -- not --version
\LWR@stoppars%
\ifbool{FormatWP}%
{%
- \LWR@maybeincthisautoid%
+ \addtocounter{LWR@thisautoidWP}{1}%
\LWR@htmltag{%
div class="#3" %
- id="autoid-\arabic{LWR@thisautoid}"%
+ id="autoidWP-\arabic{LWR@thisautoidWP}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -3950,11 +4031,6 @@ end -- not --version
{}% no nested par tags
{% yes nest par tags
\LWR@htmltagc{\LWR@tagregularparagraph}%
- \ifnumcomp{\@listdepth}{>}{0}%
- {%
- \LWR@orighspace{1in}%
- }%
- {}%
\global\booltrue{LWR@doingapar}%
\let\par\LWR@closeparagraph%
}% end of yes nest par tags
@@ -3991,7 +4067,21 @@ end -- not --version
{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
{}%
}% not handling pars
-\LWR@origpar%
+\ifboolexpr{%
+ not bool {LWR@doingapar} and
+ test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and
+ test {
+ \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}}
+ } and
+ bool {LWR@intabularmetadata} and
+ not bool {LWR@tableparcell} and
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}}
+}%
+{%
+ \LWR@getmynexttoken%
+}{%
+ \LWR@origpar%
+}%
}
\end{warpHTML}
@@ -4001,6 +4091,7 @@ end -- not --version
\newcommand*{\LWR@startpars}%
{%
+\LWR@traceinfo{LWR@startpars}%
\ifnumcomp{\value{LWR@spandepth}}{>}{0}%
{}%
{%
@@ -4014,6 +4105,7 @@ end -- not --version
\global\setbool{LWR@doingstartpars}{true}%
\global\boolfalse{LWR@doingapar}%
}% nestspan
+\LWR@traceinfo{LWR@startpars: done}%
}
\newcommand*{\LWR@stoppars}%
@@ -4047,30 +4139,14 @@ end -- not --version
\newcommand{\LWR@firstpagetop}{} % for the home page alone
\newcommand{\LWR@pagetop}{} % for all other pages
\newcommand{\LWR@pagebottom}{}
-
-\newcommand{\LWR@setfirstpagetopb}[1]{%
-\renewcommand{\LWR@firstpagetop}{#1}
-\catcode`\_=8
+\newcommand{\HTMLFirstPageTop}[1]{%
+ \renewcommand{\LWR@firstpagetop}{#1}%
}
-\newcommand{\HTMLFirstPageTop}{%
-\catcode`\_=12
-\LWR@setfirstpagetopb
+\newcommand{\HTMLPageTop}[1]{%
+ \renewcommand{\LWR@pagetop}{#1}%
}
-\newcommand{\LWR@setpagetopb}[1]{%
-\renewcommand{\LWR@pagetop}{#1}
-\catcode`\_=8
-}
-\newcommand{\HTMLPageTop}{%
-\catcode`\_=12
-\LWR@setpagetopb
-}
-\newcommand{\LWR@setpagebottomb}[1]{%
-\renewcommand{\LWR@pagebottom}{#1}
-\catcode`\_=8
-}
-\newcommand{\HTMLPageBottom}{%
-\catcode`\_=12
-\LWR@setpagebottomb
+\newcommand{\HTMLPageBottom}[1]{%
+ \renewcommand{\LWR@pagebottom}{#1}%
}
\end{warpall}
@@ -4081,15 +4157,11 @@ end -- not --version
\newcommand*{\LWR@currentcss}{lwarp.css}
-\newcommand*{\LWR@newcssb}[1]{%
-\renewcommand*{\LWR@currentcss}{#1}
-\catcode`\_=8
+\newcommand*{\CSSFilename}[1]{%
+\renewcommand*{\LWR@currentcss}{#1}%
+\@onelevel@sanitize\LWR@currentcss%
}
-\newcommand*{\CSSFilename}{
-\catcode`\_=12
-\LWR@newcssb
-}
\end{warpHTML}
\begin{warpprint}
\newcommand*{\CSSFilename}[1]{}
@@ -4137,7 +4209,7 @@ end -- not --version
\begin{warpHTML}
\newbox\LWR@footnotes
-\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1}
+\long\def\@makefntext#1{\textsuperscript{\@thefnmark}~#1}
\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}
\long\def\LWR@footnotetext#1{%
\LWR@traceinfo{LWR@footnotetext}%
@@ -4169,9 +4241,10 @@ end -- not --version
}%
\let\@footnotetext\LWR@footnotetext
+\newbox\LWR@mpfootnotes
\long\def\@mpfootnotetext#1{%
-\global\setbox\@mpfootins\vbox{%
- \unvbox\@mpfootins
+\global\setbox\LWR@mpfootnotes\vbox{%
+ \unvbox\LWR@mpfootnotes
\reset@font\footnotesize
\hsize\columnwidth
\@parboxrestore
@@ -4216,6 +4289,17 @@ end -- not --version
{}%
}
+\newcommand*{\LWR@printpendingmpfootnotes}{%
+\ifvoid\LWR@mpfootnotes\else
+ \LWR@forcenewpage
+ \begin{BlockClass}{footnotes}
+ \LWR@origvspace*{\baselineskip}
+ \unvbox\LWR@mpfootnotes
+ \setbox\LWR@mpfootnotes=\vbox{}
+ \end{BlockClass}
+\fi
+}
+
\end{warpHTML}
\begin{warpHTML}
@@ -4244,7 +4328,8 @@ end -- not --version
\end{BlockClass}
}%
}
-
+\renewcommand*{\reversemarginpar}{}
+\renewcommand*{\normalmarginpar}{}
\end{warpHTML}
\begin{warpprint}
@@ -4271,10 +4356,12 @@ end -- not --version
\newcommand*{\LWR@filenamenoblanks}[1]{%
\begingroup
-\LWR@nullfonts
+\LWR@nullfonts%
\renewcommand*{\LWR@htmltagc}[1]{}%
-\edef\LWR@thisnewfilename{#1}
-\fullexpandarg
+\LWR@traceinfo{LWR@filenamenoblanks \#1: !#1!}%
+\edef\LWR@thisnewfilename{#1}%
+\LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}%
+\fullexpandarg%
\StrSubstitute{\LWR@thisnewfilename}{ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename]
@@ -4294,6 +4381,8 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}%
{\textgreater}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\#}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{\_}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename]
@@ -4301,6 +4390,7 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}%
{\textbackslash}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{~}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{[}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{]}{-}[\LWR@thisnewfilename]
@@ -4334,6 +4424,7 @@ end -- not --version
}
\newcommand*{\LWR@newhtmlfile}[1]{
+\LWR@traceinfo{LWR@newhtmlfile: !#1!}
\LWR@htmlelementclassend{section}{textbody}
@@ -4364,6 +4455,7 @@ end -- not --version
{\LWR@filenamenoblanks{#1}}
{\renewcommand*{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}}
+\LWR@traceinfo{LWR@newhtmlfile: about to print start file}%
\LWR@htmlblockcomment{%
|Start file|%
\LWR@htmlsectionfilename{\LWR@thisfilename}|%
@@ -4400,6 +4492,7 @@ end -- not --version
\LWR@stoppars
\setcounter{LWR@latestautopage}{\value{page}}
+\LWR@traceinfo{LWR@newhtmlfile: done}
}
\end{warpHTML}
@@ -4441,10 +4534,13 @@ end -- not --version
}
\newcommand*{\LWR@createautosec}[1]{%
-\LWR@htmltag{#1 id="autosec-\thepage"{}}%
+\LWR@htmltag{#1 id="autosec-\arabic{page}"}%
}
-\NewDocumentCommand{\LWR@pushoneclose}{m m}{\pushclose{#2}{#1}}
+\NewDocumentCommand{\LWR@pushoneclose}{m m}{%
+\LWR@traceinfo{LWR@pushoneclose #1}%
+ \pushclose{#2}{#1}%
+}
\NewDocumentCommand{\LWR@startnewdepth}{m m}{%
\LWR@closeprevious{#1}%
@@ -4462,7 +4558,7 @@ end -- not --version
\LWR@stoppars%
\global\boolfalse{LWR@minipagethispar}%
\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}%
-\IfBooleanTF{#1}{\LWR@traceinfo{LWR@section: starred}}{}%
+\IfBooleanT{#1}{\LWR@traceinfo{LWR@section: starred}}%
\ifbool{LWR@forcinghtmlpage}{\LWR@traceinfo{LWR@section: forcinghtmlpage}}{}%
\ifthenelse{%
\(%
@@ -4478,7 +4574,11 @@ end -- not --version
\cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}%
\)%
\AND%
- \NOT\isempty{#3}% phantomsection
+ \(% phantomsection
+ \NOT\isempty{#3}%
+ \OR%
+ \(\NOT\equal{#1}{\BooleanTrue}\)%
+ \)%
}%
{% new file
\LWR@traceinfo{LWR@section: new HTML file}%
@@ -4487,7 +4587,7 @@ end -- not --version
{\LWR@newhtmlfile{#2}}%
}% new file
{% not new file
- \LWR@traceinfo{LWR@section: not a new HTML file}%
+ \LWR@traceinfo{LWR@section: not a new HTML file, about to LWR@orignewpage}%
\LWR@orignewpage%
}% not new file
@@ -4508,10 +4608,12 @@ end -- not --version
}%
{\LWR@startpars}%
{}%
+\LWR@traceinfo{LWR@section: about to LWR@createautosec}%
\LWR@createautosec{\csuse{LWR@tag#4}}%
\setcounter{LWR@currentautosec}{\value{page}}
\IfBooleanTF{#1}%
{%
+\LWR@traceinfo{LWR@section: starred}%
\ifbool{LWR@forcinghtmltoc}%
{\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}}%
{}%
@@ -4564,8 +4666,11 @@ end -- not --version
\LWR@traceinfo{LWR@section: finished print section number}%
}{}%
}% end of not starred
+\LWR@traceinfo{LWR@section: about to print the section name}%
#3%
+\LWR@traceinfo{LWR@section: about to close the heading tag}%
\LWR@htmltag{\csuse{LWR@tag#4end}}%
+\LWR@traceinfo{LWR@section: about to create the LaTeX label}%
\label{autopage-\theLWR@currentautosec}%
\ifthenelse{%
\cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}%
@@ -4611,14 +4716,18 @@ end -- not --version
\@ifundefined{chapter}
{}
{%
-\DeclareDocumentCommand{\chapter}{s o m}{%
-\LWR@traceinfo{chapter #3}%
+\DeclareDocumentCommand{\chapter}{s o o m}{%
+\IfValueTF{#2}{
+\LWR@traceinfo{chapter #2}%
+}{
+\LWR@traceinfo{chapter #4}%
+}
\LWR@maybeprintpendingfootnotes{\LWR@depthchapter}%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}%
-\LWR@section{#1}{#2}{#3}{chapter}%
+\LWR@section{#1}{#2}{#4}{chapter}%
\@printcites% for quotchap package
@@ -4627,13 +4736,18 @@ end -- not --version
}
}
-\DeclareDocumentCommand{\section}{s o m}{%
+\DeclareDocumentCommand{\section}{s o o m}{%
+\IfValueTF{#2}{
+\LWR@traceinfo{section #2}%
+}{
+\LWR@traceinfo{section #4}%
+}
\LWR@maybeprintpendingfootnotes{\LWR@depthsection}%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}%
-\LWR@section{#1}{#2}{#3}{section}%
+\LWR@section{#1}{#2}{#4}{section}%
}
\DeclareDocumentCommand{\subsection}{s o m}{%
@@ -4697,7 +4811,7 @@ end -- not --version
\LWR@traceinfo{LWR@filestart: B}
\LWR@htmltag{!DOCTYPE html}\LWR@orignewline
\LWR@traceinfo{LWR@filestart: C}
-\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"{}}\LWR@orignewline
+\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline
\LWR@htmltag{head}\LWR@orignewline
\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline
\ifthenelse{\equal{\theHTMLAuthor}{}}%
@@ -4715,7 +4829,7 @@ content="width=device-width, initial-scale=1.0" /}%
\LWR@orignewline
\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline
\LWR@htmltag{%
-script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}%
+script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}%
\LWR@htmltag{/script}\LWR@orignewline
\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline
\ifthenelse{\equal{\theHTMLTitle}{}}%
@@ -4759,7 +4873,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\edef\LWR@strresult{\HTMLFilename}
\edef\HTMLFilename{\detokenize\expandafter{\LWR@strresult}}
\LWR@origonecolumn%
-\LWR@origpagestyle{empty}
+\LWR@origpagestyle{empty}%
\LWR@origscriptsize%
\LWR@origraggedright%
\LetLtxMacro{\\}{\LWR@endofline}%
@@ -4788,6 +4902,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\ConTeXt\LWR@ConTeXt
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
+\mainmatter
+\LWR@origpagenumbering{arabic}
\LWR@traceinfo{LWR@lwarpStart: Starting new file.}
\LWR@filestart{}
\LWR@traceinfo{LWR@lwarpStart: Generating first header.}
@@ -4797,9 +4913,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@stoppars
\LWR@htmltag{/header}\LWR@orignewline
\LWR@traceinfo{LWR@lwarpStart: Generating textbody.}
-\LWR@htmltag{section class="textbody"{}}
-\mainmatter
-\LWR@origpagenumbering{arabic}
+\LWR@htmltag{section class="textbody"}
\LWR@patchlists
\catcode`\$=\active
\LWR@startpars
@@ -4865,7 +4979,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}% AtBeginDocument
\end{warpprint}
\begin{warpHTML}
-\renewenvironment*{titlepage}
+\DeclareDocumentEnvironment{titlepage}{}
{
\renewrobustcmd{\affiliation}[1]{\\ \InlineClass{affiliation}{##1}}
\LWR@printpendingfootnotes
@@ -4930,6 +5044,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\printdate}{{\small\textit{\@date}}}
\end{warpprint}
\begin{warpHTML}
+\@ifclassloaded{memoir}
+{
+\newcommand{\LWR@setfootnoteseries}{%
+ \renewcommand\thefootnote{\@arabic\c@footnote}%
+}
+}{% not memoir
\if@titlepage
\newcommand{\LWR@setfootnoteseries}{%
\renewcommand\thefootnote{\@arabic\c@footnote}%
@@ -4939,11 +5059,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
}
\fi
+}% not memoir
\newcommand*{\LWR@maketitlesetup}{%
\LWR@setfootnoteseries%
\def\@makefnmark{\textsuperscript{\thefootnote}}
\long\def\@makefntext##1{%
-\textsuperscript{\@thefnmark} \LWR@orighspace{1in}
+\textsuperscript{\@thefnmark}~%
##1%
}%
}
@@ -5118,7 +5239,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifbool{LWR@verbtags}{%
\LWR@htmltag{pre class="#2"
\ifthenelse{\equal{#1}{}}{}{style="#1"}%
-}% pre
+}\LWR@orignewline% pre
}{}%
\begingroup%
\LWR@origttfamily%
@@ -5128,8 +5249,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@afterendverbatim}{%
+
\endgroup%
-\unskip%
\ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/pre}
}{}%
@@ -5148,8 +5269,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\AfterEndPreamble{
\LWR@traceinfo{Patching verbatim.}
\AtBeginEnvironment{verbatim}{%
-\LWR@forcenewpage
-\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@forcenewpage%
+\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
}
\AfterEndEnvironment{verbatim}{%
\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
@@ -5175,14 +5296,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand{\@begintheorem}[2]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
-\InlineClass{theoremlabel}{#1\ #2\ }
+\trivlist
+\item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape
}
\renewcommand{\@opargbegintheorem}[3]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
-\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }
+\trivlist
+\item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape
}
\renewcommand*{\@endtheorem}{%
+\endtrivlist
\endBlockClass% theoremcontents
}
@@ -5193,6 +5317,45 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
\newcommand*{\LWR@printopenlist}{ul style="list-style-type:none"}
+
+\def\@mklab#1{%
+ #1}
+
+\def\@donoparitem{%
+ \@noparitemfalse
+}
+\def\@item[#1]{%
+ \if@noparitem
+ \@donoparitem
+ \else
+ \par
+ \ifhmode
+ \par
+ \fi
+ \if@newlist
+ \if@nobreak
+ \@nbitem
+ \else
+ \fi
+ \else
+ \fi
+ \global\@inlabeltrue
+ \fi
+ \@minipagefalse
+ \global\@newlistfalse
+ \if@noitemarg
+ \@noitemargfalse
+ \if@nmbrlist
+ \refstepcounter\@listctr
+ \fi
+ \fi
+ #1
+ \ignorespaces%
+}
+
+\def\@nbitem{%
+}
+
\newcommand*{\LWR@listitem}{%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printcloselistitem}%
@@ -5202,6 +5365,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@liststart}{%
+\LWR@traceinfo{LWR@liststart}%
\LWR@stoppars%
\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloselist}%
\LWR@htmltag{\LWR@printopenlist}\LWR@orignewline%
@@ -5216,11 +5380,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\itemindent}{0pt}%
\setlength{\labelsep}{1em}%
}
-
\newcommand*{\LWR@listend}{%
+\LWR@traceinfo{LWR@listend}%
\LWR@stoppars%
-\LWR@closeprevious{\LWR@depthlistitem}%
-\LWR@closeoneprevious%
+\LWR@closeprevious{\LWR@depthlist}%
\LWR@startpars%
}
@@ -5256,7 +5419,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LetLtxMacro{\hspace}{\LWR@nohspace}%
\LWR@origitem[]%
\LetLtxMacro{\hspace}{\LWR@hspace}%
-\LWR@orighspace{1in}
\LWR@htmltag{dt}#1\LWR@htmltag{/dt}%
\LWR@orignewline%
\LWR@htmltag{dd}%
@@ -5277,11 +5439,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@patchlists}{%
\let\item\LWR@listitem%
\renewcommand*{\@trivlist}{%
+ \LWR@traceinfo{@trivlist start}%
\LWR@liststart%
\LWR@orig@trivlist%
+ \LWR@traceinfo{@trivlist done}%
+ }%
+ \renewcommand*{\endtrivlist}{%
+ \LWR@traceinfo{endtrivlist start}%
+ \LWR@origendtrivlist\LWR@listend%
+ \LWR@traceinfo{endtrivlist done}%
}%
- \renewcommand*{\endtrivlist}{\LWR@origendtrivlist\LWR@listend}%
\renewcommand*{\trivlist}{%
+ \LWR@traceinfo{trivlist}%
\LWR@origtrivlist%
\def\makelabel####1{\LWR@orighspace{3em}####1}%
}%
@@ -5356,6 +5525,33 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newbool{LWR@intabularmetadata}
\boolfalse{LWR@intabularmetadata}
+\newcounter{LWR@tabulardepth}
+\setcounter{LWR@tabulardepth}{0}
+\newcounter{LWR@tabularpardepth}
+\setcounter{LWR@tabularpardepth}{0}
+\newcommand*{\LWR@colsresult}{}%temp storage for column format results
+\newcommand*{\LWR@pposition}{}
+\newcommand*{\LWR@pleft}{}
+\newcommand*{\LWR@pright}{}
+
+\newcommand*{\LWR@tablecolspec}{}
+
+\providecommand*{\LWR@strresult}{}
+\providecommand*{\LWR@strresulttwo}{}
+
+\newcommand*{\LWR@origcolspec}{}
+
+\newcounter{LWR@tablecolspecwidth}
+
+\newcounter{LWR@tablecolspecindex}
+
+\newcounter{LWR@tablecolindex}
+
+\newcounter{LWR@tabletotalcols}
+
+\newcounter{LWR@tabletotalcolsnext}
+
+
\newcommand*{\LWR@insertatbangcols}{%
\ifbool{LWR@skipatbang}%
@@ -5396,20 +5592,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@skippingmcolrowcell}%
\global\boolfalse{LWR@skipatbang}%
}
-
-\newcounter{LWR@tabulardepth}
-\setcounter{LWR@tabulardepth}{0}
-
\let\LWR@origampmacro&
\end{warpHTML}
\begin{warpall}
\newcommand{\StartDefiningTabulars}{%
-\LWR@traceinfo{StartDefiningTabulars}
+\LWR@traceinfo{StartDefiningTabulars}%
\warpHTMLonly{\catcode`\&=\active}%
}
\newcommand{\EndDefiningTabulars}{%
-\LWR@traceinfo{EndDefiningTabulars}
+\LWR@traceinfo{EndDefiningTabulars}%
\warpHTMLonly{\catcode`\&=4}%
}
@@ -5487,30 +5679,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@getmynexttoken%
}
-
-\newcommand*{\LWR@colsresult}{}%temp storage for column format results
-\newcommand*{\LWR@pposition}{}
-\newcommand*{\LWR@pleft}{}
-\newcommand*{\LWR@pright}{}
-
-\newcommand*{\LWR@tablecolspec}{}
-
-\providecommand*{\LWR@strresult}{}
-\providecommand*{\LWR@strresulttwo}{}
-
-\newcommand*{\LWR@origcolspec}{}
-
-\newcounter{LWR@tablecolspecwidth}
-
-\newcounter{LWR@tablecolspecindex}
-
-\newcounter{LWR@tablecolindex}
-
-\newcounter{LWR@tabletotalcols}
-
-\newcounter{LWR@tabletotalcolsnext}
-
-
\newcommand*{\LWR@colparameter}{}
\newcommand*{\LWR@parseatcolumn}{%
\LWR@traceinfo{at column}%
@@ -5710,12 +5878,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printbartag}[1]{%
+\LWR@traceinfo{LWR@printbartag !#1!}%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
{}% muting or empty
{% not muting
\edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
\ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
}% not muting
+\LWR@traceinfo{LWR@printbartag done}%
}
@@ -5762,6 +5932,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@tabledatasinglecolumntag}%
{%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag}%
\LWR@maybenewtablerow%
\ifbool{LWR@intabularmetadata}%
{%
@@ -5769,6 +5940,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{% not exiting tabular
\LWR@tabularleftedge%
\StrChar{\LWR@tablecolspec}{\arabic{LWR@tablecolindex}}[\LWR@strresult]%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: about to print td tag}%
\LWR@htmltag{td class="td%
\LWR@strresult%
\LWR@addcmidruletrim%
@@ -5781,6 +5953,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addformatwpalignment{\LWR@thiscolspec}%
\LWR@tdendstyles%
}%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
\ifboolexpr{%
test{ \ifdefstring{\LWR@strresult}{p} } or
test{ \ifdefstring{\LWR@strresult}{m} } or
@@ -5791,8 +5964,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
test{ \ifdefstring{\LWR@strresult}{X} }
}%
{% allow pars
- \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}%
\global\booltrue{LWR@tableparcell}%
+ \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done with LWR@startpars}%
}% allow pars
{}% no pars
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
@@ -5803,6 +5978,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@intabularmetadata}%
}% not exiting tabular
}{}% in tabular metadata
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: done}%
}%
@@ -6272,6 +6448,10 @@ rowspan="#2" %
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\hline}%
{\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\firsthline}%
+ {\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\lasthline}%
+ {\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\toprule}%
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\midrule}%
@@ -6292,7 +6472,11 @@ rowspan="#2" %
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\rdelim}%
{\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\par}%
+ {\let\mynext\LWR@donothing}{}%
+\LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}%
\mynext%
+\LWR@traceinfo{LWR@tabledatacolumntag: done}%
}
\end{warpHTML}
@@ -6432,11 +6616,13 @@ rowspan="#2" %
\global\boolfalse{LWR@emptyatbang}%
\StartDefiningTabulars%
\protected\gdef&{\LWR@tabularampersand}%
+\addtocounter{LWR@tabularpardepth}{1}%
\LWR@traceinfo{LWR@tabular: about to LWR@getmynexttoken}%
\LWR@getmynexttoken%
}%
{%
\LWR@traceinfo{LWR@tabular ending}%
+\addtocounter{LWR@tabularpardepth}{-1}%
\ifboolexpr{%
test {%
\ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}
@@ -6469,8 +6655,6 @@ rowspan="#2" %
\end{warpHTML}
-
-
\begin{warpHTML}
@@ -6498,7 +6682,8 @@ rowspan="#2" %
\zref@addprop{special}{zLWR@lateximagedepth}
\zref@addprop{special}{zLWR@lateximagenumber}
\newcommand*{\LWR@spref}[2]{%
-\zref@extractdefault{#1}{#2}{??}}
+\zref@extractdefault{#1}{#2}{??}%
+}
\newcommand*{\LWR@nameref}[1]{%
\LWR@spref{#1}{zLWR@name}%
}
@@ -6512,40 +6697,44 @@ rowspan="#2" %
\LWR@spref{#1}{zLWR@lateximagenumber}%
}
\newcommand*{\LWR@splabel}[1]{%
+\LWR@traceinfo{LWR@splabel !#1!}%
\LWR@setlatestname{\@currentlabelname}%
-\zref@labelbylist{#1}{special}}
+\zref@labelbylist{#1}{special}%
+}
-\newcommand*{\LWR@subsublabel}[1]{%
+\newcommand*{\LWR@sublabel}[1]{%
+\LWR@traceinfo{LWR@sublabel !#1!}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{% not lateximage
+ \LWR@sanitize{#1}%
\ifbool{LWR@doingstartpars}%
{% pars allowed
- \ifbool{LWR@doingapar}
+ \ifbool{LWR@doingapar}%
{% par started
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
}% par started
{% par not started
\LWR@stoppars%
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
\LWR@startpars%
}% par not started
}% pars allowed
{% pars not allowed
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
}% pars not allowed
}% not lateximage
}
-\NewDocumentCommand{\LWR@newlabel}{m o}{%
+\NewDocumentCommand{\LWR@newlabel}{d() m o}{%
\LWR@traceinfo{LWR@newlabel: starting}%
-\LWR@traceinfo{LWR@newlabel: !#1!}%
-\LWR@origlabel{#1}%
+\LWR@traceinfo{LWR@newlabel: !#2!}%
+\LWR@origlabel{#2}%
\LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}%
\LWR@traceinfo{LWR@newlabel: LWR@thisfilename is !\LWR@thisfilename!}%
\LWR@traceinfo{LWR@newlabel: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}}%
-\LWR@splabel{#1}%
-\LWR@subsublabel{#1}%
+\LWR@splabel{#2}%
+\LWR@sublabel{#2}%
\LWR@traceinfo{LWR@newlabel: done}%
}
@@ -6553,6 +6742,7 @@ rowspan="#2" %
\newcommand*{\LWR@startref}[1]
{%
\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}%
+\LWR@sanitize{#1}%
\LWR@traceinfo{LWR@startref A: !#1!}%
\LWR@htmltag{a href="%
\LWR@traceinfo{LWR@startref B}%
@@ -6574,11 +6764,11 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@startref D3}%
- #1%
+ \LWR@sanitized%
}%
}%
\LWR@traceinfo{LWR@startref E}%
-"{}}%
+"}%
\LWR@traceinfo{LWR@startref F}%
}
@@ -6590,7 +6780,7 @@ rowspan="#2" %
}
\NewDocumentCommand{\LWR@newref}{s m}{%
-\LWR@traceinfo{LWR@newref #2}%
+\LWR@traceinfo{LWR@newref !#2!}%
\IfBooleanTF{#1}%
{\LWR@origref{#2}}%
{\LWR@subnewref{#2}{#2}}%
@@ -6613,59 +6803,65 @@ rowspan="#2" %
\LWR@traceinfo{nameref D}%
}
-\let\Nameref\nameref
+\LetLtxMacro\Nameref\nameref
+\AtBeginDocument{
+\def\@currentHref{%
+autopage-\theLWR@currentautosec%
+}
+}
+
\NewDocumentCommand{\LWR@subhyperref}{m +m}{%
-\LWR@htmltag{a href="{#1}" target="\_{}blank"\LWR@orignewline}#2\LWR@htmltag{/a}%
+\LWR@traceinfo{LWR@subhyperref !#1!}%
+\LWR@sanitize{#1}%
+\LWR@htmltag{%
+ a href="\LWR@sanitized" %
+ target="\_{}blank"\LWR@orignewline%
+}%
+#2%
+\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
\NewDocumentCommand{\LWR@subhyperrefclass}{m +m m}{%
-\LWR@htmltag{a href="{#1}"
-class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
-\LWR@ensuredoingapar%
-}
-
-\NewDocumentCommand{\LWR@hrefb}{O{} m +m}{%
-\LWR@subhyperref{#2}{#3}%
-\endgroup%
+\LWR@htmltag{%
+ a href="%
+ \begingroup\@sanitize#1\endgroup%
+ " %
+ class="#3"\LWR@orignewline%
+}%
+#2%
+\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
-\DeclareRobustCommand*{\href}{%
+\NewDocumentCommand{\href}{O{} m +m}{%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
-\LWR@hrefb%
+\LWR@subhyperref{#2}{#3}%
}
-\newcommand*{\LWR@nolinkurlb}[1]{#1\endgroup\LWR@ensuredoingapar}
-
-\DeclareRobustCommand*{\nolinkurl}{%
+\newcommand*{\nolinkurl}[1]{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@nolinkurlb%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\LWR@templink%
}
-\NewDocumentCommand{\LWR@urlb}{m}{%
-\LWR@hrefb{#1}{#1}%
-}
-
-\DeclareRobustCommand*{\url}{%
+\NewDocumentCommand{\url}{m}{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@urlb%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\href{\LWR@templink}{\LWR@templink}%
}
-
\newcommand*{\LWR@subinlineimage}[5][]{%
\ifblank{#1}%
-{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"{}}}%
-{\LWR@htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"{}}}%
+{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"}}%
+{\LWR@htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"}}%
}
\end{warpHTML}
@@ -6719,16 +6915,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@thisautoid}
+\newcounter{LWR@thisautoidWP}
+
\newbool{LWR@freezethisautoid}
\boolfalse{LWR@freezethisautoid}
-\newcommand*{\LWR@maybeincthisautoid}{%
-\ifbool{LWR@freezethisautoid}{}{\addtocounter{LWR@thisautoid}{1}}%
-}
-
\newcommand*{\LWR@newautoidanchor}{%
-\LWR@maybeincthisautoid%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\ifbool{LWR@freezethisautoid}{}{%
+ \addtocounter{LWR@thisautoid}{1}%
+ \LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
+}%
}
\newcommand*{\@captype}{}
@@ -6800,7 +6996,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
\bgroup
\@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
{\egroup\LWR@LT@captionlistentry}}%
@@ -6821,7 +7017,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}% not TOC
\LWR@origaddcontentsline{#1}{#2}{#3}%
}
-
\AtBeginDocument{
\let\LWR@origcaptionof\captionof
@@ -6837,16 +7032,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begin{warpHTML}
-
-\newcommand*{\LWR@myshorttoc}[1]{
-\LWR@ensuredoingapar
-\IfFileExists{\jobname.#1}{
-\begingroup
-\makeatletter
-\@input{\jobname.#1}
-\endgroup
+\newcommand*{\LWR@myshorttoc}[1]{%
+\LWR@traceinfo{LWR@myshorttoc: #1}%
+\LWR@ensuredoingapar%
+\IfFileExists{\jobname.#1}{%
+\LWR@traceinfo{LWR@myshorttoc: loading}%
+\begingroup%
+\makeatletter%
+\@input{\jobname.#1}%
+\endgroup%
}%
{}%
+\LWR@traceinfo{LWR@myshorttoc: done}%
}
\NewDocumentCommand{\LWR@subtableofcontents}{m m}{%
@@ -6867,6 +7064,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@orig@starttoc{#1}
\LWR@htmlelementclassend{nav}{#1}
}
+\newbool{LWR@copiedsidetoc}
+\boolfalse{LWR@copiedsidetoc}
+\AtBeginDocument{
\let\LWR@origtableofcontents\tableofcontents
\renewcommand*{\tableofcontents}{%
@@ -6876,11 +7076,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
{
- \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \ifbool{LWR@copiedsidetoc}{}{%
+ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \booltrue{LWR@copiedsidetoc}%
+ }%
\LWR@printpendingfootnotes
\LWR@origtableofcontents
}
-}
+}% \tableofcontents
+}% AtBeginDocument
\let\LWR@origlistoffigures\listoffigures
@@ -6960,20 +7164,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro\numberline\LWR@numberline
\NewDocumentCommand{\hypertoc}{m m +m m}{%
+\LWR@traceinfo{hypertoc !#1!#2!#3!#4!}%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
\LWR@startpars%
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4%
+ }{#3}{toc#2}%
\LWR@stoppars%
}
{}
+\LWR@traceinfo{hypertoc done}%
}
+\@ifclassloaded{memoir}{}{
\newcounter{lofdepth}
\setcounter{lofdepth}{1}
+}
+\@ifclassloaded{memoir}{}{
\newcounter{lotdepth}
\setcounter{lotdepth}{1}
+}
\newcommand{\hypertocfloat}[5]{%
\LWR@startpars
@@ -7053,9 +7264,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\def\LWR@wrindex#1{%
\addtocounter{LWR@autoindex}{1}%
-\LWR@newlabel{LWRindex-\theLWR@autoindex}%
+\LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}%
\protected@write\@indexfile{}%
-{\string\indexentry{#1}{\theLWR@autoindex}}%
+{\string\indexentry{#1}{\arabic{LWR@autoindex}}}%
\endgroup
\@esphack}
@@ -7080,7 +7291,29 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begin{warpall}
\providecommand{\glo@name}{}
\end{warpall}
+\begin{warpHTML}
+\AtBeginDocument{
+\AtBeginEnvironment{thebibliography}{
+\providecommand*{\LWR@newem}[1]{\textit{#1}}
+
+\renewrobustcmd{\em}{%
+ \begingroup
+ \gdef\LWR@em@after{\LWR@em@finish\LWR@newem}%
+ \afterassignment\LWR@em@after
+ \toks@\bgroup
+}
+\def\LWR@em@finish#1{%
+ \xdef\LWR@em@after{\noexpand#1{\the\toks@}}%
+ \endgroup
+ \LWR@em@after\egroup
+}
+}% \AtBeginEnvironment{thebibliography}
+}% \AtBeginDocument
+
+\end{warpHTML}
+
+\begin{warpHTML}
\newcommand*{\LWR@restoreorigformatting}{%
\LWR@traceinfo{LWR@restoreorigformatting}%
\linespread{1}%
@@ -7150,7 +7383,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
\LetLtxMacro{\minipage}{\LWR@origminipage}%
-\let\endminipage\LWR@endminipage%
+\let\endminipage\LWR@origendminipage%
\LetLtxMacro{\parbox}{\LWR@origparbox}%
\let\TeX\LWR@origTeX%
\let\LaTeX\LWR@origLaTeX%
@@ -7163,7 +7396,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@restoreoriglists%
\LWR@FBcancel%
}
-
+\end{warpHTML}
\begin{warpHTML}
\let\LWR@origtextdollar\$
@@ -7332,7 +7565,7 @@ $#1$}
\boolfalse{LWR@amsmultline}
\newcommand*{\LWR@htmlmathlabel}[1]{%
-\LWR@traceinfo{LWR@htmlmathlabel #1}%
+\LWR@traceinfo{LWR@htmlmathlabelb #1}%
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{%
\text{
@@ -7747,7 +7980,7 @@ $#1$}
\NewDocumentEnvironment{lateximage}{O{image}}
{%
-\LWR@traceinfo{lateximage: starting on page \arabic{page}}%
+\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
{%
\addtocounter{LWR@lateximagedepth}{1}%
@@ -7767,9 +8000,9 @@ $#1$}
\setcounterpageref{LWR@LIpage}{LWRlateximage\arabic{LWR@lateximagenumber}}%
\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
- class="lateximagesource"{}} \LWR@orignewline
+ class="lateximagesource"} \LWR@orignewline
\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR@lateximagesfile{|\theLWR@LIpage|\theLWR@externalfilecnt|}%
+ \immediate\write\LWR@lateximagesfile{|\arabic{LWR@LIpage}|\arabic{LWR@externalfilecnt}|}%
\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
\addtocounter{LWR@lateximagedepth}{1}%
@@ -7803,6 +8036,7 @@ $#1$}
\LWR@origendminipage%
\LWR@orignewpage%
\LWR@origscriptsize%
+ \LWR@origvspace*{.5\baselineskip}%
\LWR@htmlclosecomment{}\LWR@orignewline%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
\LWR@subinlineimage[#1]{lateximage}%
@@ -8059,35 +8293,6 @@ $#1$}
\newlength{\LWR@minipagewidth}
\newlength{\LWR@minipageheight}
-\def\LWR@endminipage{%
- \par
- \unskip
- \ifvoid\@mpfootins\else
- \vskip\skip\@mpfootins
- \normalcolor
- \LWR@htmldivclass{mpfootnotes}
- \LWR@origmedskip
- \unvbox\@mpfootins
- \LWR@htmldivclassend{mpfootnotes}
- \fi
- \@minipagefalse
- \color@endgroup
- \egroup
- \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
-
-\newcommand*{\LWR@subminipage}{%
-\LWR@stoppars
-\LWR@origminipage{6in}
-\LWR@origraggedright%
-\LWR@startpars%
-}
-
-\newcommand*{\LWR@endsubminipage}{%
-\LWR@stoppars%
-\LWR@endminipage% The following empty line is required:
-
-}
-
\newbool{LWR@minipagefullwidth}
\boolfalse{LWR@minipagefullwidth}
\newcommand*{\minipagefullwidth}{\booltrue{LWR@minipagefullwidth}}
@@ -8101,14 +8306,16 @@ $#1$}
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
{%
\uselengthunit{PT}%
+\begingroup
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
+ \LWR@orignewpage%
\addtolength{\LWR@minipagewidth}{3em}% room for frames
\setlength{\linewidth}{6in}%
\setlength{\textwidth}{6in}%
\setlength{\textheight}{9in}%
}{}%
-\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
+\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}%
\setlength{\LWR@minipageheight}{\textheight}% default unless specified
\IfValueT{#2}{\setlength{\LWR@minipageheight}{#2}}%
\addtocounter{LWR@minipagedepth}{1}%
@@ -8116,13 +8323,11 @@ $#1$}
\LWR@stoppars%
\ifbool{FormatWP}{%
-\addtocounter{LWR@thisautoid}{1}%
-\booltrue{LWR@freezethisautoid}%
-\LWR@htmltag{div id="autoid-\arabic{LWR@thisautoid}" class="wpminipage"}%
+\addtocounter{LWR@thisautoidWP}{1}%
+\LWR@htmltag{div id="autoidWP-\arabic{LWR@thisautoidWP}" class="wpminipage"}%
}{}%
\LWR@traceinfo{minipage: creating div class}%
-\LWR@orignewpage%
\LWR@htmltag{div class="minipage" style="%
\ifthenelse{\equal{#1}{t}}{vertical-align:bottom ; }{}%
\ifthenelse{\equal{#1}{c}}{vertical-align:middle ; }{}%
@@ -8142,13 +8347,15 @@ $#1$}
}%
\LWR@traceinfo{minipage: about to print the height}%
\IfValueT{#2}{height:\rndprintlength{\LWR@minipageheight} ; }%
-"{}}%
+"}%
-\LWR@origminipage{6in}% The preceding empty line is required.
\setlength{\linewidth}{#4}% the original width
\setlength{\textwidth}{6in}%
\setlength{\textheight}{9in}%
\LWR@origraggedright%
+\def\@mpfn{mpfootnote}%
+\def\thempfn{\thempfootnote}\c@mpfootnote\z@%
+\let\@footnotetext\@mpfootnotetext%
\LWR@startpars%
\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
@@ -8156,20 +8363,20 @@ $#1$}
}{}%
\LWR@traceinfo{minipage: finished starting the minipage}%
-}
-{%
+}% finished \minipage
+{% \endminipage
+\LWR@printpendingmpfootnotes%
\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
=== end minipage ===
}{}%
\LWR@stoppars%
-\LWR@endminipage% The following empty line is required:
+\endgroup%
\ifbool{FormatWP}{%
\LWR@htmlelementend{div}%
-\boolfalse{LWR@freezethisautoid}%
}{}%
\LWR@htmldivclassend{minipage}%
@@ -8183,9 +8390,9 @@ $#1$}
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
{
\LWR@traceinfo{parbox of width #4}%
-\begin{minipage}[#1][#2][#3]{#4}
+\begin{minipage}[#1][#2][#3]{#4}%
#5
-\end{minipage}
+\end{minipage}%
}
\LetLtxMacro\LWR@origmakebox\makebox
@@ -8205,10 +8412,10 @@ $#1$}
width:\rndprintlength{\LWR@tempwidth}%
]%
{makebox}%
- {\mbox{#4}}%
+ {#4}%
}% scope
}%
-{\mbox{#4}}%
+{#4}% no width
}
\LetLtxMacro\LWR@origframebox\framebox
@@ -8234,7 +8441,7 @@ padding:\rndprintlength{\fboxsep}%
}
\let\LWRprint@fbox\fbox
\newcommand{\LWRhtml@fbox}[1]{%
-\LWR@traceinfo{HTML fbox}
+\LWR@traceinfo{HTML fbox}%
\LWR@forceminwidth{\fboxrule}%
\InlineClass[%
\LWR@blackborderpadding%
@@ -8419,8 +8626,11 @@ width:\rndprintlength{\LWR@tempwidth}%
\LetLtxMacro{\itshape}{\LWR@nullitshape}%
\LetLtxMacro{\em}{\LWR@nullem}%
\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
-\renewcommand*{\HTMLunicode}[1]{}%
-\renewcommand*{\HTMLentity}[1]{}%
+\renewcommand*{\,}{-}%
+\renewcommand*{~}{-}%
+\renewcommand*{\textellipsis}{-}%
+\renewcommand*{\HTMLunicode}[1]{-}%
+\renewcommand*{\HTMLentity}[1]{-}%
\renewcommand*{\&}{and}%
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
@@ -8497,13 +8707,14 @@ width:\rndprintlength{\LWR@tempwidth}%
\let\LWR@origvspace\vspace
\let\LWR@origrule\rule
\let\LWR@origmedskip\medskip
+\let\LWR@origbigskip\bigskip
\let\LWR@origtextellipsis\textellipsis
-\renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
+\renewrobustcmd*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
-\renewcommand*{~}{\HTMLentity{nbsp}}
+\renewrobustcmd*{~}{\HTMLentity{nbsp}}
-\renewcommand*{\textellipsis}{\HTMLunicode{2026}}
+\renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}}
\let\LWR@orignormalsize\normalsize
\let\LWR@origsmall\small
\let\LWR@origfootnotesize\footnotesize
@@ -8533,6 +8744,10 @@ width:\rndprintlength{\LWR@tempwidth}%
}
+\renewcommand*{\newpage}{
+
+}
+
\newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}%
\let\newline\LWR@newlinebr
@@ -8674,7 +8889,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\begin{warpHTML}
-\newcommand*{\phantomsection}{%
+\DeclareDocumentCommand{\phantomsection}{}{%
\section*{}%
}
@@ -8757,6 +8972,16 @@ width:\rndprintlength{\LWR@tempwidth}%
\end{warpHTML}
+\begin{warpHTML}
+\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
+\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
+\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
+\end{warpHTML}
+
+\begin{warpHTML}
+\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{}
+\end{warpHTML}
+
\endinput
%%