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.sty648
1 files changed, 396 insertions, 252 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 195c33a9dd0..a0ac4d906f1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,8 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/11/08 v0.43 Allows LaTeX to directly produce HTML5 output.]
-
+ [2017/11/22 v0.44 Allows LaTeX to directly produce HTML5 output.]
@@ -29,6 +28,10 @@
\ifLuaTeX
\RequirePackage{luatex85}% until the geometry package is updated
\fi
+\ifPDFTeX
+\RequirePackage[T1]{fontenc}
+\RequirePackage[utf8]{inputenc}
+\fi
\RequirePackage{newunicodechar}
@@ -46,7 +49,8 @@
\else
\fi
-\RequirePackage{etoolbox}[2011/01/03]
+\RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc.
+\RequirePackage{xpatch}
\RequirePackage{ifplatform}% sense op-system platform
\RequirePackage{letltxmacro}
@@ -165,7 +169,6 @@
{\excludecomment{LWR@createlwarpmk}}
-
\newcommand*{\LWR@loadafter}[1]{%
\@ifpackageloaded{#1}
{
@@ -206,12 +209,14 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{afterpage}
\LWR@loadafter{algorithmicx}
\LWR@loadafter{alltt}
+\LWR@loadafter{amsmath}
\LWR@loadafter{amsthm}
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
\LWR@loadafter{appendix}
\LWR@loadafter{arabicfront}
\LWR@loadafter{array}
+\LWR@loadafter{atbegshi}
\LWR@loadafter{authblk}
\LWR@loadafter{balance}
\LWR@loadafter{bigdelim}
@@ -221,6 +226,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{boxedminipage}
\LWR@loadafter{boxedminipage2e}
\LWR@loadafter{breakurl}
+\LWR@loadafter{cancel}
\LWR@loadafter{ccaption}
\LWR@loadafter{changepage}
\LWR@loadafter{chngpage}
@@ -232,6 +238,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{dblfnote}
\LWR@loadafter{dcolumn}
\LWR@loadafter{draftwatermark}
+\LWR@loadafter{easy-todo}
\LWR@loadafter{ebook}
\LWR@loadafter{ellipsis}
\LWR@loadafter{emptypage}
@@ -244,9 +251,12 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{extramarks}
\LWR@loadafter{fancybox}
\LWR@loadafter{fancyhdr}
+\LWR@loadafter{fancyref}
\LWR@loadafter{fancyvrb}
\LWR@loadafter{figcaps}
\LWR@loadafter{fix2col}
+\LWR@loadafter{fixme}
+\LWR@loadafter{fixmetodonotes}
\LWR@loadafter{float}
\LWR@loadafter{floatflt}
\LWR@loadafter{floatpag}
@@ -260,9 +270,11 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
\LWR@loadafter{grffile}
+\LWR@loadafter{hang}
\LWR@loadafter{hyperref}
\LWR@loadafter{hyperxmp}
\LWR@loadafter{idxlayout}
+\LWR@loadafter{ifoddpage}
\LWR@loadafter{indentfirst}
\LWR@loadafter{keyfloat}
\LWR@loadafter{layout}
@@ -273,6 +285,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{longtable}
\LWR@loadafter{lscape}
\LWR@loadafter{ltcaption}
+\LWR@loadafter{ltxtable}
\LWR@loadafter{luatodonotes}
\LWR@loadafter{marginfit}
\LWR@loadafter{marginfix}
@@ -302,6 +315,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{pfnote}
\LWR@loadafter{placeins}
\LWR@loadafter{prelim2e}
+\LWR@loadafter{preview}
\LWR@loadafter{quotchap}
\LWR@loadafter{ragged2e}
\LWR@loadafter{realscripts}
@@ -311,6 +325,12 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{rotating}
\LWR@loadafter{rotfloat}
\LWR@loadafter{savetrees}
+\LWR@loadafter{scrextend}
+\LWR@loadafter{scrhack}
+\LWR@loadafter{scrlayer}
+\LWR@loadafter{scrlayer-notecolumn}
+\LWR@loadafter{scrlayer-scrpage}
+\LWR@loadafter{section}
\LWR@loadafter{sectsty}
\LWR@loadafter{setspace}
\LWR@loadafter{shadow}
@@ -320,6 +340,8 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{sidenotes}
\LWR@loadafter{siunitx}
\LWR@loadafter{soul}
+\LWR@loadafter{soulpos}
+\LWR@loadafter{soulutf8}
\LWR@loadafter{stabular}
\LWR@loadafter{subfig}
\LWR@loadafter{supertabular}
@@ -337,15 +359,17 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{titling}
\LWR@loadafter{tocbibind}
\LWR@loadafter{tocloft}
+\LWR@loadafter{tocstyle}
+\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
\LWR@loadafter{transparent}
\LWR@loadafter{trivfloat}
-\LWR@loadafter{typearea}
\LWR@loadafter{ulem}
\LWR@loadafter{upref}
\LWR@loadafter{varioref}
\LWR@loadafter{verse}
\LWR@loadafter{wallpaper}
+\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
\LWR@loadafter{xcolor}
\LWR@loadafter{xfrac}
@@ -407,7 +431,10 @@ top=1in,bottom=1in,%
\RequirePackage{xparse}
+\@ifundefined{AfterPackage}%
+{
\RequirePackage{afterpackage}
+}{}
\end{warpall}
@@ -651,6 +678,12 @@ 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}
@@ -793,14 +826,16 @@ top=1in,bottom=1in,%
\let\LWR@orignewline\newline
-\LetLtxMacro{\LWR@origitem}{\item}
+\LetLtxMacro\LWR@origitem\item
+\AtBeginDocument{% in case packages change definition
\LetLtxMacro{\LWR@origitemize}{\itemize}
\LetLtxMacro{\LWR@endorigitemize}{\enditemize}
\LetLtxMacro{\LWR@origenumerate}{\enumerate}
\LetLtxMacro{\LWR@endorigenumerate}{\endenumerate}
\LetLtxMacro{\LWR@origdescription}{\description}
\LetLtxMacro{\LWR@endorigdescription}{\enddescription}
+}
\let\LWR@origpar\par
@@ -808,8 +843,6 @@ top=1in,bottom=1in,%
\let\LWR@orig@mpfootnotetext\@mpfootnotetext
\let\LWR@origclearpage\clearpage
-\let\clearpage\relax
-\let\cleardoublepage\relax
\end{warpHTML}
@@ -1113,7 +1146,7 @@ blockquotation p {
margin-right: 3em ;
}
-div.epigraph {
+div.epigraph, div.dictum {
line-height: 1.2;
text-align: left ;
padding: 3ex 1em 0ex 1em ;
@@ -1124,7 +1157,7 @@ div.epigraph {
max-width: 27em ;
}
-div.epigraphsource{
+div.epigraphsource, div.dictumauthor {
text-align:right ;
margin-left:auto ;
/* max-width: 50% ; */
@@ -1133,8 +1166,9 @@ div.epigraphsource{
line-height: 1.2;
}
-div.epigraph p { padding: .5ex ; margin: 0ex ;}
-div.epigraphsource p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;}
+div.epigraph p, div.dictum p { padding: .5ex ; margin: 0ex ;}
+div.epigraphsource p, div.dictumauthor p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;}
+div.dictumauthor { font-style:italic }
/* lettrine package: */
span.lettrine { font-size: 3ex ; float: left ; }
@@ -1222,6 +1256,14 @@ span.paragraph {font-size: 1em ; font-variant: normal ;
span.subparagraph {font-size: 1em ; font-variant: normal ;
margin-right: 1em ; }
+div.minisec {
+ font-family: "DejaVu Sans", "Bitstream Vera Sans",
+ Geneva, Verdana, sans-serif ;
+ font-style: normal ;
+ font-weight: bold ;
+ text-align: left ;
+}
+
/* Title of the file */
h1 {
margin: 0ex 0em 0ex 0em ;
@@ -1271,7 +1313,7 @@ div.titlepage {
border-top: 1px solid silver ;
}
-.marginpar {
+.marginpar, .marginparblock {
max-width:50%;
float:right;
text-align:left;
@@ -1285,7 +1327,7 @@ div.titlepage {
.marginpar br { margin-bottom: 2ex ; }
-div.marginblock {
+div.marginblock, div.marginparblock {
max-width:50%;
float:right;
text-align:left;
@@ -1294,14 +1336,19 @@ div.marginblock {
overflow-x: auto;
}
-div.marginblock div.minipage {
+div.marginblock div.minipage,
+div.marginparblock div.minipage {
display: block ;
margin: 0pt auto 0pt auto ;
}
-div.marginblock div.minipage p { font-size: 85%}
+div.marginblock div.minipage p ,
+div.marginparblock div.minipage p
+ { font-size: 85%}
-div.marginblock br { margin-bottom: 2ex ; }
+div.marginblock br ,
+div.marginparblock br
+ { margin-bottom: 2ex ; }
section.textbody div.footnotes{
margin: 3ex 0em 0ex 0em ;
@@ -1588,14 +1635,14 @@ dl dt {
dl dd p { margin-top: 0em; }
-nav.toc, nav.lof, nav.lot, nav.lol, nav.lothm {
+nav {
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, nav.lothm p {
+nav p {
line-height: 1.2 ;
margin-top:.5ex ;
margin-bottom:.5ex;
@@ -2248,7 +2295,7 @@ span.abstractrunintitle{
font-weight:bold;
}
-div.epigraph {
+div.epigraph, div.dictum {
background: #f5f5eb ;
background-image: linear-gradient(to bottom, #f5f5eb, #C8C8B8);
@@ -2326,7 +2373,9 @@ div.fboxBlock div.minipage { box-shadow: none ; }
figure.figure .minipage, figcaption .minipage { border: none; }
-div.marginblock div.minipage { border: none; }
+div.marginblock div.minipage ,
+div.marginparblock div.minipage
+ { border: none; }
figure , div.marginblock {
background-color: #eeeee7 ;
@@ -2742,7 +2791,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.43"
+printversion = "v0.44"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3374,7 +3423,7 @@ end -- not --version
\begin{warpHTML}
\NewDocumentCommand{\LWR@setexparray}{m m m}{%
-\ifthenelse{\isempty{#3}}%
+\ifstrempty{#3}%
{\csdef{#1#2}{}}%
{\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}%
}
@@ -3453,7 +3502,7 @@ end -- not --version
\equal{\LWR@tempone}{index}%
}%
{%
- \LWR@traceinfo{prefixing the index name with an underscore.}%
+ \LWR@traceinfo{Prefixing the index name with an underscore.}%
\_#1.html%
}%
{\HTMLFilename#1.html}%
@@ -3507,14 +3556,15 @@ end -- not --version
\newcommand*{\LWR@closeoneprevious}{%
-\LWR@closeone{}
+\LWR@closeone
-\popclose{}
+\popclose
}
\newcommand*{\LWR@closeprevious}[1]{
\LWR@stoppars
-\whiledo{\not\(\LWR@closedepthone<#1\)}{\LWR@closeoneprevious}
+\whileboolexpr{not test{\ifnumcomp{\LWR@closedepthone}{<}{#1}}}%
+ {\LWR@closeoneprevious}
}
\end{warpHTML}
@@ -3627,7 +3677,7 @@ end -- not --version
\newenvironment*{LWR@nestspan}
{%
\LWR@traceinfo{LWR@nestspan}%
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{%
\LWR@traceinfo{LWR@nestspan: inside a lateximage}%
}%
@@ -3638,22 +3688,14 @@ end -- not --version
\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
\renewcommand{\BlockClassSingle}[2]{##2}%
\renewcommand{\LWR@forcenewpage}{}%
- \renewcommand{\LWR@itemizestart}{%
- \let\item\LWR@nestspanitem%
- }%
- \renewcommand{\LWR@itemizeend}{}%
- \renewcommand{\LWR@enumeratestart}{%
- \let\item\LWR@nestspanitem%
- }%
- \renewcommand{\LWR@enumerateend}{}%
- \renewcommand{\LWR@descriptionstart}{%
+ \renewcommand{\LWR@liststart}{%
\let\item\LWR@nestspanitem%
}%
- \renewcommand{\LWR@descriptionend}{}%
+ \renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}%
}% not in a lateximage
}% starting env
{% ending env
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{\addtocounter{LWR@spandepth}{-1}}%
\LWR@traceinfo{LWR@nestspan: done}%
@@ -3725,7 +3767,7 @@ end -- not --version
\newcommand{\LWR@htmlblockcomment}
{%
-\begingroup\catcode`\_=12%
+\begingroup\catcode`\_=12
\LWR@htmlblockcommentb%
}
@@ -3736,15 +3778,11 @@ end -- not --version
}
-\NewDocumentCommand{\LWR@subhtmlelementclass}{m o m}{%
+\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{%
\LWR@traceinfo{LWR@subhtmlelementclass #1 #3}%
-\IfValueTF{#2}%
-{% option
- \ifthenelse{\equal{#2}{}}%
- {\LWR@htmltag{#1 class="#3"}}% empty option
- {\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option
-}% option
-{\LWR@htmltag{#1 class="#3"}}% no option
+\ifblank{#2}%
+{\LWR@htmltag{#1 class="#3"}}% empty option
+{\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option
\LWR@traceinfo{LWR@subhtmlelementclass done}%
}
@@ -3831,10 +3869,10 @@ end -- not --version
\LWR@stoppars%
\ifbool{FormatWP}%
{%
- \LWR@maybeincthisfloat%
+ \LWR@maybeincthisautoid%
\LWR@htmltag{%
div class="#3" %
- id="autofloat-\arabic{LWR@thisfloat}"%
+ id="autoid-\arabic{LWR@thisautoid}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -3905,9 +3943,9 @@ end -- not --version
{%
\ifbool{LWR@doingstartpars}%
{% handling pars
- \ifthenelse{%
- \cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR%
- \cnttest{\value{LWR@spandepth}}{>}{0}%
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
}% nested par tags?
{}% no nested par tags
{% yes nest par tags
@@ -3928,15 +3966,14 @@ end -- not --version
{%
\ifbool{LWR@doingapar}%
{% handling pars
- \ifthenelse{%
- \cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR%
- \cnttest{\value{LWR@spandepth}}{>}{0}%
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
}%
{% no nested par tags
- \ifthenelse{%
- \cnttest{\value{LWR@spandepth}}{>}{0}%
- \AND%
- \cnttest{\value{LWR@lateximagedepth}}{=}{0}%
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} and
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}}
}%
{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
{}%
@@ -3950,7 +3987,7 @@ end -- not --version
}% end of yes nest par tags
}% end of handling pars
{% not handling pars
- \ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
+ \ifnumcomp{\value{LWR@spandepth}}{>}{0}%
{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
{}%
}% not handling pars
@@ -3964,7 +4001,7 @@ end -- not --version
\newcommand*{\LWR@startpars}%
{%
-\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@spandepth}}{>}{0}%
{}%
{%
\ifbool{LWR@doingstartpars}%
@@ -3981,7 +4018,7 @@ end -- not --version
\newcommand*{\LWR@stoppars}%
{%
-\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@spandepth}}{>}{0}%
{}%
{%
\ifbool{LWR@doingapar}%
@@ -4058,18 +4095,29 @@ end -- not --version
\newcommand*{\CSSFilename}[1]{}
\end{warpprint}
+\begin{warpHTML}
+\let\LWR@origtitle\title
+\renewcommand*{\title}[1]{%
+ \LWR@origtitle{#1}%
+ \begingroup%
+ \renewcommand{\thanks}[1]{}%
+ \protected@xdef\thetitle{#1}%
+ \endgroup%
+}
+\end{warpHTML}
\begin{warpall}
+\providecommand{\thetitle}{}
+
+\newcommand{\theHTMLTitle}{\thetitle}
+\newcommand{\HTMLTitle}[1]{\renewcommand{\theHTMLTitle}{#1}}
\providecommand{\theauthor}{}
+
\newcommand{\theHTMLAuthor}{\theauthor}
\newcommand{\HTMLAuthor}[1]{\renewcommand{\theHTMLAuthor}{#1}}
-\end{warpall}
-
-\begin{warpall}
-
\newcommand{\LWR@currentHTMLDescription}{}
@@ -4092,6 +4140,7 @@ end -- not --version
\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1}
\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}
\long\def\LWR@footnotetext#1{%
+\LWR@traceinfo{LWR@footnotetext}%
\global\setbox\LWR@footnotes=\vbox{%
\unvbox\LWR@footnotes%
\protected@edef\@currentlabel{%
@@ -4178,11 +4227,30 @@ end -- not --version
#2
\end{LWR@BlockClassWP}
}%
-{\LWR@htmlspanclass{marginpar}{#2}}%
+{%
+ \LWR@htmlspanclass{marginpar}{#2}%
+}%
+}
+\newcommand{\marginparBlock}[2][]{%
+\ifbool{FormatWP}%
+{%
+\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock}
+#2
+\end{LWR@BlockClassWP}
+}%
+{%
+\begin{BlockClass}[width:2in; float:right; margin:10pt]{marginparblock}
+#2
+\end{BlockClass}
+}%
}
\end{warpHTML}
+\begin{warpprint}
+\LetLtxMacro\marginparBlock\marginpar
+\end{warpprint}
+
\begin{warpall}
@@ -4522,6 +4590,8 @@ end -- not --version
}
+\newcommand{\part@preamble}{}% for koma-script
+
\DeclareDocumentCommand{\part}{s o m}{%
\LWR@maybeprintpendingfootnotes{\LWR@depthpart}%
\LWR@stoppars%
@@ -4529,10 +4599,15 @@ end -- not --version
\LWR@startnewdepth{\LWR@depthpart}{\LWR@printclosepart}%
\LWR@section{#1}{#2}{#3}{part}%
+
+\part@preamble% for koma-script
+\renewcommand{\part@preamble}{}%
}
\let\@printcites\relax% for quotchap package
+\newcommand{\chapter@preamble}{}% for koma-script
+
\@ifundefined{chapter}
{}
{%
@@ -4544,7 +4619,11 @@ end -- not --version
\LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}%
\LWR@section{#1}{#2}{#3}{chapter}%
+
\@printcites% for quotchap package
+
+\chapter@preamble% for koma-script
+\renewcommand{\chapter@preamble}{}%
}
}
@@ -4621,9 +4700,9 @@ end -- not --version
\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"{}}\LWR@orignewline
\LWR@htmltag{head}\LWR@orignewline
\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline
-\ifcsempty{theHTMLAuthor}{}{
-\LWR@htmltag{meta name="author" content="\theHTMLAuthor" /}\LWR@orignewline
-}
+\ifthenelse{\equal{\theHTMLAuthor}{}}%
+{}%
+{\LWR@htmltag{meta name="author" content="\theHTMLAuthor" /}\LWR@orignewline}%
\LWR@htmltag{meta name="generator" content="LaTeX lwarp package" /}%
\LWR@orignewline
\ifdefempty{\LWR@currentHTMLDescription}{}{%
@@ -4639,17 +4718,20 @@ content="width=device-width, initial-scale=1.0" /}%
script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}%
\LWR@htmltag{/script}\LWR@orignewline
\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline
-\ifcsvoid{thetitle}{}{%
-\LWR@htmltag{title}\thetitle#1\LWR@htmltag{/title}\LWR@orignewline%
-}%
+\ifthenelse{\equal{\theHTMLTitle}{}}%
+{}%
+{\LWR@htmltag{title}\theHTMLTitle#1\LWR@htmltag{/title}\LWR@orignewline}%
\LWR@htmltag{%
link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@orignewline
\ifbool{mathjax}%
{%
+ \begingroup%
+ \LWR@restoreoriglists%
\boolfalse{LWR@verbtags}
\verbatiminput{lwarp_mathjax.txt}%
\booltrue{LWR@verbtags}
+ \endgroup%
\LWR@stoppars
}% end of mathjax
{}%
@@ -5040,6 +5122,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}{}%
\begingroup%
\LWR@origttfamily%
+\LWR@restoreoriglists%
\LWR@FBcancel%
\LetLtxMacro{\hspace}{\LWR@orighspace}%
}
@@ -5105,47 +5188,63 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\end{warpHTML}
-
\begin{warpHTML}
-\newcommand*{\LWR@itemizeitem}{%
+\newcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
+\newcommand*{\LWR@printopenlist}{ul style="list-style-type:none"}
+
+\newcommand*{\LWR@listitem}{%
\LWR@stoppars%
-\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printcloselistitem{}}%
+\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printcloselistitem}%
\LWR@htmltag{li}%
\LWR@startpars%
\LWR@origitem%
}
-\newcommand*{\LWR@itemizestart}{%
+\newcommand*{\LWR@liststart}{%
\LWR@stoppars%
-\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloseitemize{}}%
-\LWR@htmltag{ul style="list-style-type:none"{}}%
+\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloselist}%
+\LWR@htmltag{\LWR@printopenlist}\LWR@orignewline%
\LWR@startpars%
-\let\item\LWR@itemizeitem%
-}
-
-\newcommand*{\LWR@itemizeend}{%
+\setlength{\topsep}{0pt}%
+\setlength{\partopsep}{0pt}%
+\setlength{\itemsep}{0pt}%
+\setlength{\parsep}{0pt}%
+\setlength{\leftmargin}{0pt}%
+\setlength{\rightmargin}{0pt}%
+\setlength{\listparindent}{0pt}%
+\setlength{\itemindent}{0pt}%
+\setlength{\labelsep}{1em}%
+}
+
+\newcommand*{\LWR@listend}{%
\LWR@stoppars%
\LWR@closeprevious{\LWR@depthlistitem}%
-\LWR@closeoneprevious{}%
+\LWR@closeoneprevious%
\LWR@startpars%
}
-
-\newcommand*{\LWR@enumeratestart}{%
+\newcommand*{\LWR@itemizeitem}{%
\LWR@stoppars%
-\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloseitemize{}}%
-\LWR@htmltag{ul style="list-style-type:none"{}}%
+\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printcloselistitem}%
+\LWR@htmltag{li}%
\LWR@startpars%
+\LWR@origitem%
+}
+
+\newcommand*{\LWR@itemizestart}{%
+\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
+\renewcommand*{\LWR@printopenlist}{ul style="list-style-type:none"}
\let\item\LWR@itemizeitem%
}
-\newcommand*{\LWR@enumerateend}{%
-\LWR@stoppars%
-\LWR@closeprevious{\LWR@depthlistitem}%
-\LWR@closeoneprevious{}%
-\LWR@startpars%
+
+
+\newcommand*{\LWR@enumeratestart}{%
+\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
+\renewcommand*{\LWR@printopenlist}{ul style="list-style-type:none"}
+\let\item\LWR@itemizeitem%
}
@@ -5153,7 +5252,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{%
\LWR@stoppars%
\LWR@setlatestname{#1}%
-\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printclosedescitem{}}%
+\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printclosedescitem}%
\LetLtxMacro{\hspace}{\LWR@nohspace}%
\LWR@origitem[]%
\LetLtxMacro{\hspace}{\LWR@hspace}%
@@ -5165,28 +5264,43 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@descriptionstart}{%
-\LWR@stoppars%
-\LWR@pushoneclose{\LWR@depthlist}{\LWR@printclosedescription{}}%
-\LWR@htmltag{dl}%
-\LWR@startpars%
+\renewcommand*{\LWR@printcloselist}{\LWR@printclosedescription}
+\renewcommand*{\LWR@printopenlist}{dl}
\let\item\LWR@descitem%
}
-\newcommand*{\LWR@descriptionend}{%
-\LWR@stoppars%
-\LWR@closeprevious{\LWR@depthlistitem}%
-\LWR@closeoneprevious{}%
-\LWR@startpars%
-}
+
+\let\LWR@orig@trivlist\@trivlist
+\let\LWR@origtrivlist\trivlist
+\let\LWR@origendtrivlist\endtrivlist
\newcommand*{\LWR@patchlists}{%
-\LetLtxMacro{\LWR@origitem}{\item}
-\AtBeginEnvironment{itemize}{\LWR@itemizestart}
-\AtEndEnvironment{itemize}{\LWR@itemizeend}
-\AtBeginEnvironment{enumerate}{\LWR@enumeratestart}
-\AtEndEnvironment{enumerate}{\LWR@enumerateend}
-\AtBeginEnvironment{description}{\LWR@descriptionstart}
-\AtEndEnvironment{description}{\LWR@descriptionend}
+ \let\item\LWR@listitem%
+ \renewcommand*{\@trivlist}{%
+ \LWR@liststart%
+ \LWR@orig@trivlist%
+ }%
+ \renewcommand*{\endtrivlist}{\LWR@origendtrivlist\LWR@listend}%
+ \renewcommand*{\trivlist}{%
+ \LWR@origtrivlist%
+ \def\makelabel####1{\LWR@orighspace{3em}####1}%
+ }%
+ \renewcommand*{\itemize}{\LWR@itemizestart\LWR@origitemize}%
+ \renewcommand*{\enumerate}{\LWR@enumeratestart\LWR@origenumerate}%
+ \renewcommand*{\description}{\LWR@descriptionstart\LWR@origdescription}%
+}
+
+\newcommand*{\LWR@restoreoriglists}{%
+\let\@trivlist\LWR@orig@trivlist%
+\let\trivlist\LWR@origtrivlist%
+\let\endtrivlist\LWR@origendtrivlist%
+\LetLtxMacro\item\LWR@origitem%
+\LetLtxMacro\itemize\LWR@origitemize%
+\LetLtxMacro\enditemize\LWR@endorigitemize%
+\LetLtxMacro\enumerate\LWR@origenumerate%
+\LetLtxMacro\endenumerate\LWR@endorigenumerate%
+\LetLtxMacro\description\LWR@origdescription%
+\LetLtxMacro\enddescription\LWR@endorigdescription%
}
\end{warpHTML}
@@ -5304,12 +5418,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@tabularampersand}{%
\LWR@traceinfo{LWR@tabularampersand}%
-\ifthenelse{\cnttest{\value{LWR@tabulardepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}%
{%
\unskip%
\LWR@closetabledatacell%
\addtocounter{LWR@tablecolindex}{1}%
-\boolfalse{LWR@tabularcelladded}%
+ \boolfalse{LWR@tabularcelladded}%
\LWR@getmynexttoken%
}%
{\LWR@origampmacro}%
@@ -5329,22 +5443,25 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\booltrue{LWR@tabularmutemods}%
}{}%
\global\boolfalse{LWR@exitingtabular}%
-\whiledo{%
- \(%
- \boolean{LWR@intabularmetadata} \AND%
- \NOT\boolean{LWR@tabularcelladded} \AND%
- \cnttest{\value{LWR@tablecolindex}}{=}{\value{LWR@tabletotalcols}}%
- \) \OR%
- \cnttest{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}%
-}{%
+\whileboolexpr{%
+ test {
+ \ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}
+ } or %
+ (%
+ bool{LWR@intabularmetadata} and%
+ not bool{LWR@tabularcelladded} and%
+ test {
+ \ifnumcomp{\value{LWR@tablecolindex}}{=}{\value{LWR@tabletotalcols}}
+ }%
+ )%
+}%
+{%
\LWR@tabledatasinglecolumntag%
\LWR@closetabledatacell%
\addtocounter{LWR@tablecolindex}{1}%
\boolfalse{LWR@tabularcelladded}%
\global\booltrue{LWR@emptyatbang}%
- \ifthenelse{%
- \cnttest{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}%
- }%
+ \ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}%
{\LWR@getmynexttoken}%
{}%
}%
@@ -5354,14 +5471,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
-\NewDocumentCommand{\LWR@tabularendofline}{s o}
-{%
-\ifthenelse{\value{LWR@tablecolindex}<\value{LWR@tabletotalcols}}{%
- \LWR@tabularfinishrow%
-}%
-{%
- \LWR@closetabledatacell%
-}%
+\NewDocumentCommand{\LWR@tabularendofline}{s o}{%
+\ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}%
+{\LWR@tabularfinishrow}%
+{\LWR@closetabledatacell}%
\LWR@htmltag{/tr}\LWR@orignewline
\global\booltrue{LWR@intabularmetadata}
\global\boolfalse{LWR@startedrow}
@@ -5382,8 +5495,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@tablecolspec}{}
-\newcommand*{\LWR@strresult}{}
-\newcommand*{\LWR@strresulttwo}{}
+\providecommand*{\LWR@strresult}{}
+\providecommand*{\LWR@strresulttwo}{}
\newcommand*{\LWR@origcolspec}{}
@@ -5407,7 +5520,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\StrChar{\LWR@origcolspec}{\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]
\fullexpandarg%
\LWR@traceinfo{have now read the next token}%
-\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}
+\ifnumcomp{\value{LWR@tabletotalcols}}{=}{0}%
{% left edge of the table:
\LWR@traceinfo{at the left edge}%
\LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@colparameter}%
@@ -5431,7 +5544,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\StrChar{\LWR@origcolspec}{\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]
\fullexpandarg%
\LWR@traceinfo{have now read the next token}%
-\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}
+\ifnumcomp{\value{LWR@tabletotalcols}}{=}{0}%
{% left edge of the table:
\LWR@traceinfo{at the left edge}%
\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}%
@@ -5464,7 +5577,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@parsebarcolumn}{%
\LWR@traceinfo{bar column}%
-\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}%
+\ifnumcomp{\value{LWR@tabletotalcols}}{=}{0}%
{% left edge of the table:
\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarl}%
}%
@@ -5531,7 +5644,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\fullexpandarg%
\LWR@traceinfo{finished StrLen}%
\setcounter{LWR@tablecolspecwidth}{\LWR@strresult}%
-\whiledo{\not\value{LWR@tablecolspecindex}>\value{LWR@tablecolspecwidth}}{%
+\whileboolexpr{%
+ not test{%
+ \ifnumcomp{\value{LWR@tablecolspecindex}}{>}{\value{LWR@tablecolspecwidth}}%
+ }%
+}%
+{%
\expandarg%
\StrChar{\LWR@origcolspec}{\arabic{LWR@tablecolspecindex}}[\LWR@strresult]%
\LWR@traceinfo{position \arabic{LWR@tablecolspecindex}: \LWR@strresult}%
@@ -5631,7 +5749,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@tabularleftedge}{%
-\ifthenelse{\cnttest{\value{LWR@tablecolindex}}=1}%
+\ifnumcomp{\value{LWR@tablecolindex}}{=}{1}%
{%
\LWR@printatbang{at}{leftedge}%
\LWR@printatbang{bang}{leftedge}%
@@ -5640,6 +5758,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
+\newcommand*{\LWR@thiscolspec}{}
+
\newcommand*{\LWR@tabledatasinglecolumntag}%
{%
\LWR@maybenewtablerow%
@@ -5657,17 +5777,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
"%
\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
- \LWR@addformatwpalignment%
+ \StrChar{\LWR@tablecolspec}{\arabic{LWR@tablecolindex}}[\LWR@thiscolspec]%
+ \LWR@addformatwpalignment{\LWR@thiscolspec}%
\LWR@tdendstyles%
}%
- \ifthenelse{%
- \equal{\LWR@strresult}{p}\OR%
- \equal{\LWR@strresult}{m}\OR%
- \equal{\LWR@strresult}{b}\OR%
- \equal{\LWR@strresult}{P}\OR%
- \equal{\LWR@strresult}{M}\OR%
- \equal{\LWR@strresult}{B}\OR%
- \equal{\LWR@strresult}{X}%
+ \ifboolexpr{%
+ test{ \ifdefstring{\LWR@strresult}{p} } or
+ test{ \ifdefstring{\LWR@strresult}{m} } or
+ test{ \ifdefstring{\LWR@strresult}{b} } or
+ test{ \ifdefstring{\LWR@strresult}{P} } or
+ test{ \ifdefstring{\LWR@strresult}{M} } or
+ test{ \ifdefstring{\LWR@strresult}{B} } or
+ test{ \ifdefstring{\LWR@strresult}{X} }
}%
{% allow pars
\LWR@startpars%
@@ -5704,8 +5825,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@clearmidrules}
{%
\setcounter{LWR@midrulecounter}{1}%
-\whiledo{%
-\cnttest{\value{LWR@midrulecounter}}{<=}{\value{LWR@tablecolspecwidth}}%
+\whileboolexpr{%
+ not test{%
+ \ifnumcomp{\value{LWR@midrulecounter}}{>}{\value{LWR@tablecolspecwidth}}%
+ }%
}%
{%
\LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{0pt}%
@@ -5718,10 +5841,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@subcmidrule}[4]{%
\setcounter{LWR@midrulecounter}{#3}%
-\whiledo{\cnttest{\value{LWR@midrulecounter}}{<=}{#4}}%
+\whileboolexpr{%
+ not test {%
+ \ifnumcomp{\value{LWR@midrulecounter}}{>}{#4}%
+ }%
+}%
{%
-\LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{#1}%
-\addtocounter{LWR@midrulecounter}{1}%
+ \LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{#1}%
+ \addtocounter{LWR@midrulecounter}{1}%
}% whiledo
\IfSubStr{#2}{l}{\LWR@setexparray{LWR@trimlrules}{#3}{l}}{}%
\IfSubStr{#2}{r}{\LWR@setexparray{LWR@trimrrules}{#4}{r}}{}%
@@ -5800,18 +5927,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
text-align:#1; vertical-align:#2%
}
-\newcommand*{\LWR@addformatwpalignment}{%
+\newcommand*{\LWR@addformatwpalignment}[1]{%
\ifbool{FormatWP}{%
-\StrChar{\LWR@tablecolspec}{\arabic{LWR@tablecolindex}}[\LWR@strresult]%
-\ifdefstring{\LWR@strresult}{l}{\LWR@WPcell{left}{middle}}{}%
-\ifdefstring{\LWR@strresult}{c}{\LWR@WPcell{center}{middle}}{}%
-\ifdefstring{\LWR@strresult}{r}{\LWR@WPcell{right}{middle}}{}%
-\ifdefstring{\LWR@strresult}{p}{\LWR@WPcell{left}{bottom}}{}%
-\ifdefstring{\LWR@strresult}{m}{\LWR@WPcell{left}{middle}}{}%
-\ifdefstring{\LWR@strresult}{b}{\LWR@WPcell{left}{top}}{}%
-\ifdefstring{\LWR@strresult}{P}{\LWR@WPcell{center}{bottom}}{}%
-\ifdefstring{\LWR@strresult}{M}{\LWR@WPcell{center}{middle}}{}%
-\ifdefstring{\LWR@strresult}{B}{\LWR@WPcell{center}{top}}{}%
+\IfSubStr{#1}{l}{\LWR@WPcell{left}{middle}}{}%
+\IfSubStr{#1}{c}{\LWR@WPcell{center}{middle}}{}%
+\IfSubStr{#1}{r}{\LWR@WPcell{right}{middle}}{}%
+\IfSubStr{#1}{p}{\LWR@WPcell{left}{bottom}}{}%
+\IfSubStr{#1}{m}{\LWR@WPcell{left}{middle}}{}%
+\IfSubStr{#1}{b}{\LWR@WPcell{left}{top}}{}%
+\IfSubStr{#1}{P}{\LWR@WPcell{center}{bottom}}{}%
+\IfSubStr{#1}{M}{\LWR@WPcell{center}{middle}}{}%
+\IfSubStr{#1}{B}{\LWR@WPcell{center}{top}}{}%
}{}%
}
@@ -5838,7 +5964,7 @@ text-align:#1; vertical-align:#2%
\IfStrEq{\LWR@strresult}{S}{r}{}%
\IfStrEq{\LWR@strresult}{X}{p}{}%
\IfStrEq{\LWR@strresult}{|}{%
- \ifthenelse{\value{LWR@tablemulticolspos}=1}%
+ \ifnumcomp{\value{LWR@tablemulticolspos}}{=}{1}%
{\booltrue{LWR@mcolvertbarl}}%
{\booltrue{LWR@mcolvertbarr}}%
}{}%
@@ -5894,8 +6020,10 @@ text-align:#1; vertical-align:#2%
\setcounter{LWR@tablemulticolspos}{1}%
\StrLen{#1}[\LWR@strresult]%
\setcounter{LWR@tablemulticolswidth}{\LWR@strresult}%
-\whiledo{%
- \NOT\value{LWR@tablemulticolspos}>\value{LWR@tablemulticolswidth}%
+\whileboolexpr{%
+ not test {%
+ \ifnumcomp{\value{LWR@tablemulticolspos}}{>}{\value{LWR@tablemulticolswidth}}%
+ }
}%
{%
#2{#1}%
@@ -5938,7 +6066,7 @@ rowspan="#2" %
"%
\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
-\LWR@addformatwpalignment%
+\LWR@addformatwpalignment{#5}%
\LWR@tdendstyles%
}% end of the opening table data tag
\global\boolfalse{LWR@intabularmetadata}%
@@ -5961,7 +6089,7 @@ rowspan="#2" %
\NewDocumentCommand{\LWR@longtabledatacaptiontag}{s o +m}
{%
\IfValueTF{#2}{% optional given?
- \ifthenelse{\equal{#2}{}}% optional empty?
+ \ifblank{#2}% optional empty?
{\LWR@setlatestname{#3}}% empty
{\LWR@setlatestname{#2}}% given and non-empty
}% optional given
@@ -5978,18 +6106,18 @@ rowspan="#2" %
{% No star:
\ifbool{LWR@starredlongtable}%
{%
- \ifthenelse{\equal{#2}{}}% TOC entry
- {}%
- {%
- \refstepcounter{\LTcaptype}%
- \protected@edef\@currentlabel{%
- \csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
- }%
+ \ifblank{#2}% TOC entry
+ {}%
+ {%
+ \refstepcounter{\LTcaptype}%
+ \protected@edef\@currentlabel{%
+ \csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+ }%
}{}%
\LWR@figcaption%
\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
\endLWR@figcaption%
- \ifthenelse{\equal{#2}{}}% TOC entry empty
+ \ifblank{#2}% TOC entry empty
{}%
{% TOC entry not empty
\IfNoValueTF{#2}% No TOC entry?
@@ -6045,10 +6173,15 @@ rowspan="#2" %
\setcounter{LWR@tabhtmlcoltotal}{#2}%
\setcounter{LWR@tabhtmlcolend}{#1}%
\addtocounter{LWR@tabhtmlcolend}{#2}%
-\ifthenelse{\value{LWR@tabhtmlcolindex}=1}{%
+\ifnumcomp{\value{LWR@tabhtmlcolindex}}{=}{1}{%
\LWR@subtabularhtmlcolumns{leftedge}%
}{}%
-\whiledo{\value{LWR@tabhtmlcolindex}<\value{LWR@tabhtmlcolend}}{%
+\whileboolexpr{%
+ test {%
+ \ifnumcomp{\value{LWR@tabhtmlcolindex}}{<}{\value{LWR@tabhtmlcolend}}%
+ }%
+}%
+{%
\LWR@subtabularhtmlcolumns{\arabic{LWR@tabhtmlcolindex}}%
\addtocounter{LWR@tabhtmlcolindex}{1}%
}% whiledo
@@ -6304,14 +6437,19 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@tabular ending}%
-\ifthenelse{%
- \(%
- \boolean{LWR@intabularmetadata} \AND%
- \NOT\boolean{LWR@tabularcelladded} \AND%
- \cnttest{\value{LWR@tablecolindex}}{=}{\value{LWR@tabletotalcols}}%
- \) \OR%
- \cnttest{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}%
-}{%
+\ifboolexpr{%
+ test {%
+ \ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}
+ } or %
+ (%
+ bool{LWR@intabularmetadata} and%
+ not bool{LWR@tabularcelladded} and%
+ test {%
+ \ifnumcomp{\value{LWR@tablecolindex}}{=}{\value{LWR@tabletotalcols}}%
+ }%
+ )%
+}%
+{%
\LWR@tabularfinishrow%
}%
{%
@@ -6336,7 +6474,7 @@ rowspan="#2" %
\begin{warpHTML}
-\newcommand*{\@currentlabelname}{}
+\providecommand*{\@currentlabelname}{}
\def\LWR@stripperiod#1.\ltx@empty#2\@nil{#1}%
\newcommand*{\LWR@setlatestname}[1]{%
\GetTitleStringExpand{#1}%
@@ -6379,7 +6517,7 @@ rowspan="#2" %
\newcommand*{\LWR@subsublabel}[1]{%
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{% not lateximage
\ifbool{LWR@doingstartpars}%
@@ -6513,22 +6651,19 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@nolinkurlb%
}
-\newcommand*{\LWR@urlb}[1]{%
-\href{#1}{#1}%
-\endgroup%
-\LWR@ensuredoingapar%
+\NewDocumentCommand{\LWR@urlb}{m}{%
+\LWR@hrefb{#1}{#1}%
}
-\DeclareRobustCommand*{\LWR@urla}{%
+\DeclareRobustCommand*{\url}{%
\LWR@ensuredoingapar%
\begingroup\catcode`\_=12
\LWR@urlb%
}
-\let\url\LWR@urla
\newcommand*{\LWR@subinlineimage}[5][]{%
-\ifthenelse{\equal{#1}{}}%
+\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"{}}}%
}
@@ -6545,11 +6680,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\NewDocumentCommand{\LWR@floatbegin}{m o}{%
\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars
-\addtocounter{LWR@thisfloat}{1}%
-\booltrue{LWR@freezethisfloat}%
+\addtocounter{LWR@thisautoid}{1}%
+\booltrue{LWR@freezethisautoid}%
\begingroup%
\LWR@origraggedright%
-\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}%
+\LWR@htmltag{figure id="autoid-\arabic{LWR@thisautoid}" class="#1"}%
\ifbool{FormatWP}{%
\LWR@orignewline%
\LWR@BlockClassWP{}{}{wp#1}%
@@ -6575,20 +6710,25 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{FormatWP}{\endLWR@BlockClassWP}{}%
\LWR@htmlelementend{figure}%
\endgroup%
-\boolfalse{LWR@freezethisfloat}%
+\boolfalse{LWR@freezethisautoid}%
\LWR@startpars%
\ifbool{FormatWP}{\newline}{}%
}
\let\end@float\LWR@floatend
\let\end@dblfloat\LWR@floatend
-\newcounter{LWR@thisfloat}
+\newcounter{LWR@thisautoid}
-\newbool{LWR@freezethisfloat}
-\boolfalse{LWR@freezethisfloat}
+\newbool{LWR@freezethisautoid}
+\boolfalse{LWR@freezethisautoid}
+
+\newcommand*{\LWR@maybeincthisautoid}{%
+\ifbool{LWR@freezethisautoid}{}{\addtocounter{LWR@thisautoid}{1}}%
+}
-\newcommand*{\LWR@maybeincthisfloat}{%
-\ifbool{LWR@freezethisfloat}{}{\addtocounter{LWR@thisfloat}{1}}%
+\newcommand*{\LWR@newautoidanchor}{%
+\LWR@maybeincthisautoid%
+\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
}
\newcommand*{\@captype}{}
@@ -6599,11 +6739,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\AtBeginDocument{\renewcommand{\@makecaption}[2]{#1\CaptionSeparator#2}}
-\newcounter{LWR@nextautofloat}
+\newcounter{LWR@nextautoid}
\newcounter{LWR@nextautopage}
\newcommand*{\LWRsetnextfloat}[2]{%
\setcounter{LWR@nextautopage}{#1}%
-\setcounter{LWR@nextautofloat}{#2}%
+\setcounter{LWR@nextautoid}{#2}%
}
\newcounter{LWR@latestautopage}
@@ -6654,15 +6794,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\let\LWR@origcaptionlistentry\captionlistentry
\renewcommand*{\captionlistentry}{%
-\LWR@maybeincthisfloat%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="autofloat-\arabic{LWR@thisfloat}"{}}\LWR@htmltag{/a}%
\LWR@origcaptionlistentry%
}
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="autofloat-\arabic{LWR@thisfloat}"{}}\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}}%
@@ -6672,14 +6810,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\let\LWR@origaddcontentsline\addcontentsline
\renewcommand*{\addcontentsline}[3]{%
-\ifthenelse{\equal{#1}{toc}}{}{%
- \ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{}
+\ifstrequal{#1}{toc}{}{% not TOC
+ \LWR@newautoidanchor%
+ \ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{}%
\addtocontents{\@nameuse{ext@#2}}{%
- \protect\LWRsetnextfloat%
- {\arabic{LWR@latestautopage}}%
- {\arabic{LWR@thisfloat}}%
- }% addtocontents
-}% not toc
+ \protect\LWRsetnextfloat%
+ {\arabic{LWR@latestautopage}}%
+ {\arabic{LWR@thisautoid}}%
+ }%
+}% not TOC
\LWR@origaddcontentsline{#1}{#2}{#3}%
}
@@ -6687,9 +6826,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\let\LWR@origcaptionof\captionof
\renewcommand*{\captionof}{%
-\LWR@maybeincthisfloat%
\LWR@stoppars
-\LWR@htmltag{a id="autofloat-\arabic{LWR@thisfloat}"{}}\LWR@htmltag{/a}%
\LWR@origcaptionof%
}
}
@@ -6816,10 +6953,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
-\renewcommand*{\numberline}[1]{%
+\newcommand*{\LWR@numberline}[1]{%
\LWR@sectionnumber{#1}\quad%
}
+\LetLtxMacro\numberline\LWR@numberline
+
\NewDocumentCommand{\hypertoc}{m m +m m}{%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
\LWR@startpars%
@@ -6847,7 +6986,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@startpars%
\LWR@subhyperrefclass{%
\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
- \#autofloat-\arabic{LWR@nextautofloat}}%
+ \#autoid-\arabic{LWR@nextautoid}}%
{#4}{toc#2}%
\LWR@stoppars%
}{}%
@@ -6912,7 +7051,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\InlineClass{indexsubsubitem}{}
}
-\def\@wrindex#1{%
+\def\LWR@wrindex#1{%
\addtocounter{LWR@autoindex}{1}%
\LWR@newlabel{LWRindex-\theLWR@autoindex}%
\protected@write\@indexfile{}%
@@ -6920,6 +7059,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\endgroup
\@esphack}
+\let\@wrindex\LWR@wrindex
+
\def\@wrglossary#1{%
\addtocounter{LWR@autoglossary}{1}%
\LWR@newlabel{LWRglossary-\theLWR@autoglossary}%
@@ -7019,6 +7160,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\csletcs{equation*}{LWR@origequationstar}%
\csletcs{endequation*}{LWR@origendequationstar}%
\LWR@restoreorigaccents%
+\LWR@restoreoriglists%
\LWR@FBcancel%
}
@@ -7027,7 +7169,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\let\LWR@origtextdollar\$
\renewcommand*{\$}{%
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{\LWR@origtextdollar}%
{\LWR@htmltagc{span}\LWR@origtextdollar\LWR@htmltagc{/span}}%
}
@@ -7282,7 +7424,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbodynumbered{multline}]
+ \begin{lateximage}[\LWR@amsmathbodynumbered{multline}]
}
}
@@ -7294,7 +7436,7 @@ $#1$}
\boolfalse{LWR@amsmultline}
\LWR@addmathjax{multline}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7307,7 +7449,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbody{multline*}]
+ \begin{lateximage}[\LWR@amsmathbody{multline*}]
}
}
@@ -7319,7 +7461,7 @@ $#1$}
\boolfalse{LWR@amsmultline}
\LWR@addmathjax{multline*}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7333,7 +7475,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbodynumbered{gather}]
+ \begin{lateximage}[\LWR@amsmathbodynumbered{gather}]
}
}
@@ -7344,7 +7486,7 @@ $#1$}
\LWR@endhideamsmath
\LWR@addmathjax{gather}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7357,7 +7499,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbody{gather*}]
+ \begin{lateximage}[\LWR@amsmathbody{gather*}]
}
}
@@ -7368,7 +7510,7 @@ $#1$}
\LWR@endhideamsmath
\LWR@addmathjax{gather*}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7381,7 +7523,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbodynumbered{align}]
+ \begin{lateximage}[\LWR@amsmathbodynumbered{align}]
}
}
@@ -7392,7 +7534,7 @@ $#1$}
\LWR@endhideamsmath
\LWR@addmathjax{align}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7405,7 +7547,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbody{align*}]
+ \begin{lateximage}[\LWR@amsmathbody{align*}]
}
}
@@ -7416,7 +7558,7 @@ $#1$}
\LWR@endhideamsmath
\LWR@addmathjax{align*}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7429,7 +7571,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbodynumbered{flalign}]
+ \begin{lateximage}[\LWR@amsmathbodynumbered{flalign}]
}
}
@@ -7440,7 +7582,7 @@ $#1$}
\LWR@endhideamsmath
\LWR@addmathjax{flalign}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7453,7 +7595,7 @@ $#1$}
\LWR@beginhideamsmath
}
{
- \lateximage[\LWR@amsmathbody{flalign*}]
+ \begin{lateximage}[\LWR@amsmathbody{flalign*}]
}
}
@@ -7464,7 +7606,7 @@ $#1$}
\LWR@endhideamsmath
\LWR@addmathjax{flalign*}{\the\@envbody}
}
-{\endlateximage}
+{\end{lateximage}}
}
@@ -7618,7 +7760,7 @@ $#1$}
\let\LWR@equationtag\theequation%
\addtocounter{LWR@lateximagenumber}{1}%
\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}%
- \boolfalse{mathjax}
+ \boolfalse{mathjax}%
\LWR@ensuredoingapar%
\addtocounter{LWR@externalfilecnt}{1}%
\LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}%
@@ -7902,9 +8044,9 @@ $#1$}
\begin{warpHTML}
-\BeforeBeginEnvironment{picture}{\lateximage}
+\BeforeBeginEnvironment{picture}{\begin{lateximage}}
-\AfterEndEnvironment{picture}{\endlateximage}
+\AfterEndEnvironment{picture}{\end{lateximage}}
\end{warpHTML}
@@ -7974,9 +8116,9 @@ $#1$}
\LWR@stoppars%
\ifbool{FormatWP}{%
-\addtocounter{LWR@thisfloat}{1}%
-\booltrue{LWR@freezethisfloat}%
-\LWR@htmltag{div id="autofloat-\arabic{LWR@thisfloat}" class="wpminipage"}%
+\addtocounter{LWR@thisautoid}{1}%
+\booltrue{LWR@freezethisautoid}%
+\LWR@htmltag{div id="autoid-\arabic{LWR@thisautoid}" class="wpminipage"}%
}{}%
\LWR@traceinfo{minipage: creating div class}%
@@ -8027,7 +8169,7 @@ $#1$}
\ifbool{FormatWP}{%
\LWR@htmlelementend{div}%
-\boolfalse{LWR@freezethisfloat}%
+\boolfalse{LWR@freezethisautoid}%
}{}%
\LWR@htmldivclassend{minipage}%
@@ -8431,9 +8573,9 @@ width:\rndprintlength{\LWR@tempwidth}%
\ifnum\gluestretchorder\LWR@tempwidth>0%
\setlength{\LWR@tempwidth}{2em}%
\fi%
-\ifthenelse{\dimtest{\LWR@tempwidth}{=}{0pt}}{}{%
+\ifdimcomp{\LWR@tempwidth}{=}{0pt}{}{%
\LWR@minipagestoppars%
- \ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}}
+ \ifdimcomp{\LWR@tempwidth}{=}{.16667em}%
{%
\HTMLunicode{2009}% thin breakable space
}%
@@ -8473,6 +8615,8 @@ width:\rndprintlength{\LWR@tempwidth}%
\renewcommand*{\nopagebreak}[1][]{}
\RenewDocumentCommand{\enlargethispage}{s m}{}
+\renewcommand*{\clearpage}{}
+\renewcommand*{\cleardoublepage}{}
\newcommand*{\LWR@currenttextcolor}{black}
\NewDocumentCommand{\LWR@rule}{o m m}{%
\setlength{\LWR@tempwidth}{#2}%
@@ -8495,9 +8639,9 @@ width:\rndprintlength{\LWR@tempwidth}%
\LWR@htmltagc{%
span
style="%
- \ifbool{FormatWP}{}{background:\LWR@currenttextcolor; }%
- width:\printlength{\LWR@tempwidth}; %
- height:\printlength{\LWR@tempheight}; %
+ \ifbool{FormatWP}{}{background:\LWR@currenttextcolor ; }%
+ width:\printlength{\LWR@tempwidth} ; %
+ height:\printlength{\LWR@tempheight} ; %
\IfValueT{#1}%
{%
\setlength{\LWR@tempraise}{0pt-#1}%