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.sty795
1 files changed, 600 insertions, 195 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 44c58f4f4a8..8691e932519 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2018/01/30 v0.47 Allows LaTeX to directly produce HTML5 output.]
+ [2018/02/14 v0.48 Allows LaTeX to directly produce HTML5 output.]
@@ -210,6 +210,8 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{a4wide}
\LWR@loadafter{a5comb}
\LWR@notmemoirloadafter{abstract}
+\LWR@loadafter{acro}
+\LWR@loadafter{acronym}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
\LWR@loadafter{afterpage}
@@ -222,7 +224,6 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{appendix}
\LWR@loadafter{arabicfront}
\LWR@notmemoirloadafter{array}
-\LWR@loadafter{atbegshi}
\LWR@loadafter{authblk}
\LWR@loadafter{backref}
\LWR@loadafter{balance}
@@ -241,8 +242,10 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{changepage}
\LWR@notmemoirloadafter{chngpage}
\LWR@loadafter{chappg}
+\LWR@loadafter{chapterbib}
\LWR@loadafter{cite}
\LWR@loadafter{color}
+\LWR@loadafter{colortbl}
\LWR@loadafter{continue}
\LWR@notmemoirloadafter{crop}
\LWR@loadafter{cuted}
@@ -295,6 +298,8 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{grffile}
\LWR@loadafter{hang}
\LWR@loadafter{hanging}
+\LWR@loadafter{hypcap}
+\LWR@loadafter{hypernat}
\LWR@loadafter{hyperref}
\LWR@loadafter{hyperxmp}
\LWR@loadafter{idxlayout}
@@ -374,6 +379,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{soulpos}
\LWR@loadafter{soulutf8}
\LWR@loadafter{stabular}
+\LWR@loadafter{stfloats}
\LWR@loadafter{subfig}
\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
@@ -400,8 +406,9 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{turnthepage}
\LWR@loadafter{ulem}
\LWR@loadafter{upref}
-\LWR@loadafter{varioref}
+\LWR@loadafter{varioref}% no lwarp package provided
\LWR@notmemoirloadafter{verse}
+\LWR@loadafter{vmargin}
\LWR@loadafter{wallpaper}
\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
@@ -536,12 +543,20 @@ top=1in,bottom=1in,%
\end{warpHTML}
+\begin{warpprint}
+
+\RequirePackage{varwidth}
+
+\end{warpprint}
+
\begin{warpHTML}
\LetLtxMacro{\LWR@origRequirePackage}{\RequirePackage}
\newcommand*{\LWR@requirepackagenames}{}
+\newcommand*{\LWR@parsedrequirepackagenames}{}
+
\newcommand*\LWR@findword[3][,]{%
\StrBetween[#3,\numexpr#3+1]{#1#2#1}{#1}{#1}%
}
@@ -549,45 +564,53 @@ top=1in,bottom=1in,%
\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]%
\StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]%
\IfStrEq{\LWR@strresulttwo}{}%
-{}% no filename
+{%
+}% no filename
{% yes filename
-\IfFileExists{lwarp-\LWR@strresulttwo.sty}%
-{% lwarp-* file found
- \StrSubstitute%
- {\LWR@requirepackagenames}%
- {\LWR@strresult}%
- {lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
-}%
-{
- \StrSubstitute%
- {\LWR@requirepackagenames}%
- {\LWR@strresult}%
- {\LWR@strresulttwo}[\LWR@requirepackagenames]%
-}% no lwarp-* file
+ \IfFileExists{lwarp-\LWR@strresulttwo.sty}%
+ {% lwarp-* file found
+ \ifdefvoid{\LWR@parsedrequirepackagenames}{%
+ \edef\LWR@parsedrequirepackagenames{lwarp-\LWR@strresulttwo}%
+ }{%
+ \edef\LWR@parsedrequirepackagenames{%
+ \LWR@parsedrequirepackagenames,lwarp-\LWR@strresulttwo%
+ }%
+ }%
+ }%
+ {%
+ \ifdefvoid{\LWR@parsedrequirepackagenames}{%
+ \edef\LWR@parsedrequirepackagenames{\LWR@strresulttwo}%
+ }{%
+ \edef\LWR@parsedrequirepackagenames{%
+ \LWR@parsedrequirepackagenames,\LWR@strresulttwo%
+ }%
+ }%
+ }% no lwarp-* file
}% yes filename
}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
-\renewcommand*{\LWR@requirepackagenames}{#2}
-\LWR@lookforpackagename{1}
-\LWR@lookforpackagename{2}
-\LWR@lookforpackagename{3}
-\LWR@lookforpackagename{4}
-\LWR@lookforpackagename{5}
-\LWR@lookforpackagename{6}
-\LWR@lookforpackagename{7}
-\LWR@lookforpackagename{8}
-\LWR@lookforpackagename{9}
-\IfValueTF{#1}
+\renewcommand*{\LWR@requirepackagenames}{#2}%
+\renewcommand*{\LWR@parsedrequirepackagenames}{}%
+\LWR@lookforpackagename{1}%
+\LWR@lookforpackagename{2}%
+\LWR@lookforpackagename{3}%
+\LWR@lookforpackagename{4}%
+\LWR@lookforpackagename{5}%
+\LWR@lookforpackagename{6}%
+\LWR@lookforpackagename{7}%
+\LWR@lookforpackagename{8}%
+\LWR@lookforpackagename{9}%
+\IfValueTF{#1}%
{% options given
\IfValueTF{#3}% version given?
- {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}[#3]}
- {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}}
-}
+ {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}[#3]}%
+ {\LWR@origRequirePackage[#1]{\LWR@parsedrequirepackagenames}}%
+}%
{% no options given
\IfValueTF{#3}% version given?
- {\LWR@origRequirePackage{\LWR@requirepackagenames}[#3]}
- {\LWR@origRequirePackage{\LWR@requirepackagenames}}
-}
+ {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}[#3]}%
+ {\LWR@origRequirePackage{\LWR@parsedrequirepackagenames}}%
+}%
}
\LetLtxMacro{\usepackage}{\RequirePackage}
@@ -598,7 +621,6 @@ top=1in,bottom=1in,%
{\ProvidesPackage{lwarp-#1}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{#1}}
\ProcessOptions\relax
-
\IfValueTF{#2}
{\LWR@origRequirePackage{#1}[#2]}
{\LWR@origRequirePackage{#1}}
@@ -610,7 +632,9 @@ top=1in,bottom=1in,%
{\ProvidesPackage{lwarp-#1}[#2]}
{\ProvidesPackage{lwarp-#1}}
\DeclareOption*{}
-\ProcessOptions\relax
+\let\ds@\@empty% from the original \ProcessOptions
+\edef\@curroptions{}% lwarp modification to \ProcessOptions
+\@process@ptions\relax% from the original \ProcessOptions
}
\end{warpHTML}
@@ -821,6 +845,44 @@ top=1in,bottom=1in,%
\begin{warpHTML}
+\LetLtxMacro\LWR@origmbox\mbox
+\LetLtxMacro\LWR@origmakebox\makebox
+
+\let\LWR@origcomma\,
+\let\LWR@origtilde~
+\let\LWR@origenskip\enskip
+\let\LWR@origquad\quad
+\let\LWR@origqquad\qquad
+
+\let\LWR@orighspace\hspace
+\let\LWR@orighfill\hfill
+\let\LWR@orighfil\hfil
+\let\LWR@origvspace\vspace
+\let\LWR@orighss\hss
+\let\LWR@origllap\llap
+\let\LWR@origrlap\rlap
+\let\LWR@orighfilneg\hfilneg
+
+\let\LWR@origrule\rule
+\let\LWR@orighrulefill\hrulefill
+\let\LWR@origdotfill\dotfill
+
+\let\LWR@origmedskip\medskip
+\let\LWR@origbigskip\bigskip
+
+\let\LWR@origtextellipsis\textellipsis
+
+\let\LWR@orignormalsize\normalsize
+\let\LWR@origsmall\small
+\let\LWR@origfootnotesize\footnotesize
+\let\LWR@origscriptsize\scriptsize
+\let\LWR@origtiny\tiny
+\let\LWR@origlarge\large
+\let\LWR@origLarge\Large
+\let\LWR@origLARGE\LARGE
+\let\LWR@orighuge\huge
+\let\LWR@origHuge\Huge
+
\LetLtxMacro{\LWR@origtextrm}{\textrm}
\LetLtxMacro{\LWR@origtextsf}{\textsf}
\LetLtxMacro{\LWR@origtexttt}{\texttt}
@@ -852,13 +914,13 @@ top=1in,bottom=1in,%
\let\LWR@origsb\sb
\LetLtxMacro\LWR@origtextsuperscript\textsuperscript
\LetLtxMacro\LWR@orig@textsuperscript\@textsuperscript
+
\AtBeginDocument{
\LetLtxMacro\LWR@origtextsubscript\textsubscript
\LetLtxMacro\LWR@orig@textsubscript\@textsubscript
}
-\LetLtxMacro\LWR@origunderline\underline
-\let\LWR@origscriptsize\scriptsize
+\LetLtxMacro\LWR@origunderline\underline
\let\LWR@orignewpage\newpage
@@ -872,15 +934,22 @@ top=1in,bottom=1in,%
\let\LWR@orignewline\newline
-\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@orig@trivlist\@trivlist
+\let\LWR@origtrivlist\trivlist
+\let\LWR@origendtrivlist\endtrivlist
+\LetLtxMacro\LWR@origitem\item
+\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@orig@mklab\@mklab
+\let\LWR@origmakelabel\makelabel
+\let\LWR@orig@donoparitem\@donoparitem
+\LetLtxMacro\LWR@orig@item\@item
+\let\LWR@orig@nbitem\@nbitem
}
\let\LWR@origpar\par
@@ -890,6 +959,11 @@ top=1in,bottom=1in,%
\let\LWR@origclearpage\clearpage
+\AtBeginDocument{% in case packages change definition
+\LetLtxMacro\LWR@orighline\hline%
+\LetLtxMacro\LWR@origcline\cline%
+}
+
\end{warpHTML}
\begin{warpHTML}
@@ -1825,7 +1899,7 @@ tr.hline td {border-top: 1px solid #808080 ; margin-top: 0ex ;
tr.tbrule td {border-top: 1px solid black ; margin-top: 0ex ;
margin-bottom: 0ex ; } /* for \toprule, \bottomrule */
-td {padding: 1ex .5em 1ex .5em ;}
+td {padding: .5ex .5em .5ex .5em ;}
table td.tdl { text-align: left ; vertical-align: middle ; }
table td.tdc { text-align: center ; vertical-align: middle ; }
@@ -1890,6 +1964,13 @@ td.tdb , td.tdbrule , td.tdB , td.tdBrule
.tnoteitemheader {margin-right: 1em;}
+/* for colortbl and cell color */
+div.cellcolor {
+ width: 100% ;
+ padding: .5ex .5em .5ex .5em ;
+ margin: -.5ex -.5em -.5ex -.5em ;
+}
+
/* for bigdelim */
.ldelim, .rdelim { font-size: 200% }
@@ -2860,7 +2941,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.47"
+printversion = "v0.48"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3844,7 +3925,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\mbox{\LWR@origtextless{}!{-}{-}}%
+\LWR@origmbox{\LWR@origtextless{}!{-}{-}}%
\endgroup%
}%
}
@@ -3854,7 +3935,7 @@ end -- not --version
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\mbox{{-}{-}\LWR@origtextgreater}%
+\LWR@origmbox{{-}{-}\LWR@origtextgreater}%
\endgroup%
}%
}
@@ -3966,7 +4047,7 @@ end -- not --version
\addtocounter{LWR@thisautoidWP}{1}%
\LWR@htmltag{%
div class="#3" %
- id="\mbox{autoidWP-\arabic{LWR@thisautoidWP}}"%
+ id="\LWR@origmbox{autoidWP-\arabic{LWR@thisautoidWP}}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -4053,6 +4134,7 @@ end -- not --version
\newcommand*{\LWR@closeparagraph}
{%
+\LWR@traceinfo{LWR@closeparagraph}%
\ifbool{LWR@doingapar}%
{% handling pars
\ifboolexpr{
@@ -4256,6 +4338,7 @@ end -- not --version
\let\@footnotetext\LWR@footnotetext
\newbox\LWR@mpfootnotes
\long\def\@mpfootnotetext#1{%
+\LWR@traceinfo{@mpfootnotetext}%
\global\setbox\LWR@mpfootnotes\vbox{%
\unvbox\LWR@mpfootnotes
\reset@font\footnotesize
@@ -4281,6 +4364,10 @@ end -- not --version
}%
\color@endgroup%
}% vbox
+\LWR@traceinfo{@mpfootnotetext: done}%
+}
+\AtBeginDocument{
+\def\thempfootnote{\@alph\c@mpfootnote}
}
\newcommand*{\LWR@printpendingfootnotes}{%
\ifvoid\LWR@footnotes\else
@@ -4436,6 +4523,18 @@ end -- not --version
\endgroup
}
+\newcounter{LWR@previousautopagelabel}
+\setcounter{LWR@previousautopagelabel}{-1}
+
+\newcommand*{\LWR@newautopagelabel}[1]{%
+\ifnumequal{\value{LWR@previousautopagelabel}}{\value{page}}%
+{}% no action if this autopage label has already been defined
+{%
+ \label{autopage-\arabic{#1}}%
+ \setcounter{LWR@previousautopagelabel}{\value{page}}
+}%
+}
+
\newcommand*{\LWR@newhtmlfile}[1]{
\LWR@traceinfo{LWR@newhtmlfile: !#1!}
@@ -4478,6 +4577,8 @@ end -- not --version
\LWR@filestart{ — #1}% there is an EMdash in front of the #1
+\setcounter{LWR@latestautopage}{\value{page}}%
+\LWR@newautopagelabel{LWR@latestautopage}%
\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@topnavigation}
@@ -4504,7 +4605,6 @@ end -- not --version
\LWR@stoppars
-\setcounter{LWR@latestautopage}{\value{page}}
\LWR@traceinfo{LWR@newhtmlfile: done}
}
@@ -4547,7 +4647,7 @@ end -- not --version
}
\newcommand*{\LWR@createautosec}[1]{%
-\LWR@htmltag{#1 id="\mbox{autosec-\arabic{page}}"}%
+\LWR@htmltag{#1 id="\LWR@origmbox{autosec-\arabic{page}}"}%
}
\NewDocumentCommand{\LWR@pushoneclose}{m m}{%
@@ -4684,7 +4784,7 @@ end -- not --version
\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}%
+\LWR@newautopagelabel{LWR@currentautosec}%
\ifthenelse{%
\cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}%
}%
@@ -4894,7 +4994,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex}
\immediate\openout\LWR@lateximagesfile=lateximages.txt
-\setlength{\belowcaptionskip}{-3ex}
+\setlength{\belowcaptionskip}{0ex}
+\setlength{\abovecaptionskip}{0ex}
\renewcommand{\ps@plain}{}
\renewcommand*{\centering}{}
\renewcommand*{\raggedleft}{}
@@ -5112,6 +5213,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\@title
\LWR@htmltag{\LWR@tagtitleend}\LWR@startpars
\begin{BlockClass}{author}
+ \renewcommand*{\cr}{}
+ \renewcommand*{\crcr}{}
+ \renewcommand*{\noalign}{}
\renewcommand{\and}{
\end{BlockClass}
\begin{BlockClass}{oneauthor}
@@ -5175,11 +5279,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\begin{warpHTML}
\providecommand*{\abstractname}{Abstract}
-\DeclareDocumentEnvironment{abstract}{}
+\DeclareDocumentEnvironment{abstract}{O{\abstractname}}
{
\LWR@forcenewpage
\BlockClass{abstract}
-\BlockClassSingle{abstracttitle}{\abstractname}
+\BlockClassSingle{abstracttitle}{#1}
}
{
\endBlockClass
@@ -5331,16 +5435,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\newcommand*{\LWR@printopenlist}{ul style="\mbox{list-style-type:none}"}
-
+\newcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
+\AtBeginDocument{
\def\@mklab#1{%
#1}
+\let\makelabel\@mklab
+}
\def\@donoparitem{%
\@noparitemfalse
}
-\def\@item[#1]{%
+\def\LWR@HTML@item[#1]{%
+\LWR@traceinfo{@item}
\if@noparitem
\@donoparitem
\else
@@ -5365,7 +5472,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\refstepcounter\@listctr
\fi
\fi
- #1
+ \makelabel{#1}%
\ignorespaces%
}
@@ -5380,6 +5487,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@origitem%
}
+\newcommand*{\LWR@nulllistfills}{%
+\renewcommand*{\hss}{}%
+\renewcommand*{\llap}[1]{##1}%
+\renewcommand*{\rlap}[1]{##1}%
+\renewcommand*{\hfil}{}%
+\renewcommand*{\hfilneg}{}%
+\renewcommand*{\hfill}{}%
+}
+
\newcommand*{\LWR@liststart}{%
\LWR@traceinfo{LWR@liststart}%
\LWR@stoppars%
@@ -5395,6 +5511,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\listparindent}{0pt}%
\setlength{\itemindent}{0pt}%
\setlength{\labelsep}{1em}%
+\LWR@nulllistfills%
}
\newcommand*{\LWR@listend}{%
\LWR@traceinfo{LWR@listend}%
@@ -5414,16 +5531,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@itemizestart}{%
\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\renewcommand*{\LWR@printopenlist}{ul style="\mbox{list-style-type:none}"}
+\renewcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
\let\item\LWR@itemizeitem%
+\LWR@nulllistfills%
}
\newcommand*{\LWR@enumeratestart}{%
\renewcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
-\renewcommand*{\LWR@printopenlist}{ul style="\mbox{list-style-type:none}"}
+\renewcommand*{\LWR@printopenlist}{ul style="\LWR@origmbox{list-style-type:none}"}
\let\item\LWR@itemizeitem%
+\LWR@nulllistfills%
}
@@ -5445,47 +5564,56 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand*{\LWR@printcloselist}{\LWR@printclosedescription}
\renewcommand*{\LWR@printopenlist}{dl}
\let\item\LWR@descitem%
+\LWR@nulllistfills%
}
-\let\LWR@orig@trivlist\@trivlist
-\let\LWR@origtrivlist\trivlist
-\let\LWR@origendtrivlist\endtrivlist
-
\newcommand*{\LWR@patchlists}{%
- \let\item\LWR@listitem%
+ \LetLtxMacro\item\LWR@listitem%
+ \LetLtxMacro\@item\LWR@HTML@item%
\renewcommand*{\@trivlist}{%
\LWR@traceinfo{@trivlist start}%
\LWR@liststart%
\LWR@orig@trivlist%
\LWR@traceinfo{@trivlist done}%
}%
+ \renewcommand*{\trivlist}{%
+ \LWR@traceinfo{trivlist}%
+ \LWR@origtrivlist%
+ }%
\renewcommand*{\endtrivlist}{%
\LWR@traceinfo{endtrivlist start}%
\LWR@origendtrivlist\LWR@listend%
\LWR@traceinfo{endtrivlist done}%
}%
- \renewcommand*{\trivlist}{%
- \LWR@traceinfo{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%
}%
- \renewcommand*{\itemize}{\LWR@itemizestart\LWR@origitemize}%
- \renewcommand*{\enumerate}{\LWR@enumeratestart\LWR@origenumerate}%
- \renewcommand*{\description}{\LWR@descriptionstart\LWR@origdescription}%
}
\newcommand*{\LWR@restoreoriglists}{%
+\LWR@traceinfo{LWR@restoreoriglists}%
+\LetLtxMacro\item\LWR@origitem%
+\LetLtxMacro\@item\LWR@orig@item%
\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%
+\let\@mklab\LWR@orig@mklab%
+\let\makelabel\LWR@origmakelabel%
+\let\@donoparitem\LWR@orig@donoparitem%
+\let\@nbitem\LWR@orig@nbitem%
}
\end{warpHTML}
@@ -5599,6 +5727,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{\LWR@getexparray{LWR@colafterspec}{\arabic{LWR@tablecolindex}}}%
\ifbool{LWR@tableparcell}{\LWR@stoppars}{}%
\global\boolfalse{LWR@tableparcell}%
+ \whileboolexpr{test {\ifnumcomp{\value{LWR@cellcolordepth}}{>}{0}}}{%
+ \LWR@htmltag{/div}\LWR@orignewline%
+ \addtocounter{LWR@cellcolordepth}{-1}%
+ }%
\leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline%
\global\booltrue{LWR@tabularcelladded}%
\LWR@insertatbangcols%
@@ -5607,6 +5739,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@skippingmrowcell}%
\global\boolfalse{LWR@skippingmcolrowcell}%
\global\boolfalse{LWR@skipatbang}%
+\renewcommand*{\LWR@cellHTMLcolor}{}
+\renewcommand*{\LWR@columnHTMLcolor}{}
+\setcounter{LWR@cellcolordepth}{0}
}
\let\LWR@origampmacro&
@@ -5690,6 +5825,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@doingtbrule}%
\global\boolfalse{LWR@doingcmidrule}%
\LWR@clearmidrules%
+\renewcommand*{\LWR@rowHTMLcolor}{}
\setcounter{LWR@tablecolindex}{1}%
\boolfalse{LWR@tabularcelladded}%
\LWR@getmynexttoken%
@@ -5795,8 +5931,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newbool{LWR@validtablecol}
+\newbool{LWR@opttablecol}
\newcommand*{\LWR@parsetablecols}[1]{%
-\LWR@traceinfo{LWR@parsetablecols started}%
+\LWR@traceinfo{LWR@parsetablecols}%
\renewcommand*{\LWR@origcolspec}{#1}%
\expandarg%
\StrSubstitute{\LWR@origcolspec}{ }{}[\LWR@origcolspec]%
@@ -5822,12 +5959,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@setexparray{LWR@colbarspec}{2}{}%
\LWR@setexparray{LWR@colbarspec}{3}{}%
\setcounter{LWR@tablecolspecindex}{1}%
-\LWR@traceinfo{about to StrLen}%
\expandarg%
\StrLen{\LWR@origcolspec}[\LWR@strresult]%
\fullexpandarg%
-\LWR@traceinfo{finished StrLen}%
+\LWR@traceinfo{original column spec length: \LWR@strresult}%
\setcounter{LWR@tablecolspecwidth}{\LWR@strresult}%
+\boolfalse{LWR@opttablecol}%
\whileboolexpr{%
not test{%
\ifnumcomp{\value{LWR@tablecolspecindex}}{>}{\value{LWR@tablecolspecwidth}}%
@@ -5839,6 +5976,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{position \arabic{LWR@tablecolspecindex}: \LWR@strresult}%
\fullexpandarg%
\boolfalse{LWR@validtablecol}%
+\IfStrEq{\LWR@strresult}{[}{\booltrue{LWR@opttablecol}}{}%
+\ifbool{LWR@opttablecol}%
+{}% inside an optional argument
+{% not an optional tabular argument
\IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}%
\IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}%
\IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}%
@@ -5864,11 +6005,33 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{invalid column type: \LWR@strresult}%
\LWR@parsenormalcolumn{l}%
}%
+}% not an optional column argument
+\IfStrEq{\LWR@strresult}{]}{\boolfalse{LWR@opttablecol}}{}%
\addtocounter{LWR@tablecolspecindex}{1}%
}% whiledo
+\LWR@traceinfo{LWR@parsetablecols: done}%
}%
+\newcommand{\LWR@columnHTMLcolor}{}
+\newcommand{\LWR@rowHTMLcolor}{}
+\newcommand{\LWR@cellHTMLcolor}{}
+\newcommand{\LWR@ruleHTMLcolor}{}
+\NewDocumentCommand{\LWR@HTMLcolumncolor}{O{named} m o o}{}
+
+\NewDocumentCommand{\LWR@HTMLrowcolor}{O{named} m o o}{\LWR@getmynexttoken}
+
+\NewDocumentCommand{\LWR@HTMLcellcolor}{O{named} m o o}{}
+
+\newcommand{\arrayrulecolor}[2][named]{}
+
+\newcommand{\LWR@HTMLarrayrulecolor}[2][named]{\LWR@getmynexttoken}
+
+\newcommand{\doublerulesepcolor}[2][named]{}
+
+\newcommand{\LWR@HTMLdoublerulesepcolor}[2][named]{\LWR@getmynexttoken}
+
+
\newcommand*{\LWR@maybenewtablerow}
{%
\ifbool{LWR@startedrow}%
@@ -5878,13 +6041,27 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\booltrue{LWR@intabularmetadata}%
\ifbool{LWR@doinghline}%
{%
- \LWR@htmltag{tr class="hline" }%
+ \ifdefvoid{\LWR@ruleHTMLcolor}{%
+ \LWR@htmltag{tr class="hline" }%
+ }{%
+ \LWR@htmltag{%
+ tr class="hline" %
+ style="border-top: 1px solid \#\LWR@ruleHTMLcolor "%
+ }%
+ }%
\LWR@orignewline%
}%
{% not doing hline
\ifbool{LWR@doingtbrule}%
{%
- \LWR@htmltag{tr class="tbrule"}%
+ \ifdefvoid{\LWR@ruleHTMLcolor}{%
+ \LWR@htmltag{tr class="tbrule"}%
+ }{%
+ \LWR@htmltag{%
+ tr class="tbrule" %
+ style="border-top: 1px solid \#\LWR@ruleHTMLcolor "%
+ }%
+ }%
\LWR@orignewline%
}%
{\LWR@htmltag{tr}\LWR@orignewline}%
@@ -5918,6 +6095,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
"%
\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@addtabularrulecolors%
\LWR@tdendstyles%
}%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
@@ -5967,9 +6145,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addcmidrulewidth%
\StrChar{\LWR@tablecolspec}{\arabic{LWR@tablecolindex}}[\LWR@thiscolspec]%
\LWR@addformatwpalignment{\LWR@thiscolspec}%
+ \LWR@addtabularrowcolor%
+ \LWR@addtabularrulecolors%
\LWR@tdendstyles%
}%
-\LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
\ifboolexpr{%
test{ \ifdefstring{\LWR@strresult}{p} } or
test{ \ifdefstring{\LWR@strresult}{m} } or
@@ -6073,7 +6253,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@subaddcmidruletrim}[2]{%
-\setlength{\LWR@templengthone}{\LWR@getexparray{LWR@midrules}{\arabic{LWR@tablecolindex}}}%
+\setlength{\LWR@templengthone}{%
+ \LWR@getexparray{LWR@midrules}{\arabic{LWR@tablecolindex}}%
+}%
\ifdimcomp{\LWR@templengthone}{>}{0pt}%
{%
\LWR@origtilde tdrule#1#2%
@@ -6092,23 +6274,30 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand{\LWR@addrulewidth}[2]{%
\ifboolexpr{%
- test{\ifdimcomp{#1}{=}{0pt}}%
- or ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )%
+ test{\ifdimcomp{#1}{=}{0pt}} or
+ (
+ ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )
+ and ( test {\ifdefvoid{\LWR@ruleHTMLcolor}} )
+ )
}%
-{}% default width
-{% custom width
+{}% default width and color
+{% custom width and/or color
\LWR@forceminwidth{#1}%
\LWR@tdaddstyle%
\uselengthunit{PT}%
border-top:\rndprintlength{\LWR@atleastonept} solid %
- \ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
- {\#A0A0A0}%
- {% lightrule or heaver
- \ifdimcomp{#1}{<}{\LWR@heavyrulewidth}%
- {\#808080}%
- {black}%
- }% lightrule or heavier
-}% custom width
+ \ifdefvoid{\LWR@ruleHTMLcolor}{%
+ \ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
+ {\#A0A0A0}%
+ {% lightrule or heaver
+ \ifdimcomp{#1}{<}{\LWR@heavyrulewidth}%
+ {\#808080}%
+ {black}%
+ }% lightrule or heavier
+ }{%
+ \#\LWR@ruleHTMLcolor%
+ }
+}% custom width and/or color
}
\newcommand{\LWR@addcmidrulewidth}{%
@@ -6117,7 +6306,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@WPcell}[2]{%
\LWR@tdaddstyle%
-\mbox{text-align:#1}; \mbox{vertical-align:#2}%
+\LWR@origmbox{text-align:#1}; \LWR@origmbox{vertical-align:#2}%
}
\newcommand*{\LWR@addformatwpalignment}[1]{%
@@ -6135,6 +6324,71 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
+\newcommand*{\LWR@addtabularrowcolor}{%
+\ifbool{LWR@tabularmutemods}{}{%
+ \ifdefvoid{\LWR@rowHTMLcolor}{}%
+ {% row color
+ \LWR@tdaddstyle%
+ background:\#\LWR@rowHTMLcolor%
+ }% row color
+}%
+}
+
+\newcommand*{\LWR@addtabularhrulecolor}{%
+\ifboolexpr {
+ bool{LWR@doinghline} or
+ bool{LWR@doingtbrule}
+}{%
+ \ifdefvoid{\LWR@ruleHTMLcolor}{}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 1px solid \#\LWR@ruleHTMLcolor%
+ }{}%
+}{}%
+}
+
+\newcommand*{\LWR@addtabularrulecolors}{%
+\LWR@addtabularhrulecolor%
+\ifbool{LWR@tabularmutemods}{}{%
+ \ifnumequal{\value{LWR@tablecolindex}}{1}{%
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
+ \ifdefstring{\LWR@tempone}{tvertbarl}{%
+ \LWR@tdaddstyle%
+ border-left: 1px solid \#\LWR@vertruleHTMLcolor%
+ }{}%
+ }{}%
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tablecolindex}}}%
+ \ifdefstring{\LWR@tempone}{tvertbarr}{%
+ \LWR@tdaddstyle%
+ border-right: 1px solid \#\LWR@vertruleHTMLcolor%
+ }{}%
+}%
+}
+
+\newcounter{LWR@cellcolordepth}
+
+\newcommand*{\LWR@subaddtabularcellcolor}[1]{%
+\LWR@htmltag{div class="cellcolor" style="%
+ background:\#{}#1 %
+" }%
+\addtocounter{LWR@cellcolordepth}{1}%
+}
+
+\newcommand*{\LWR@addtabularcellcolor}{%
+\ifdefvoid{\LWR@cellHTMLcolor}%
+{%
+ \ifdefvoid{\LWR@rowHTMLcolor}%
+ {%
+ \ifdefvoid{\LWR@columnHTMLcolor}%
+ {}%
+ {\LWR@subaddtabularcellcolor{\LWR@columnHTMLcolor}}%
+ }%
+ {\LWR@subaddtabularcellcolor{\LWR@rowHTMLcolor}}%
+}%
+{\LWR@subaddtabularcellcolor{\LWR@cellHTMLcolor}}%
+}
+
+
\newcounter{LWR@tablemulticolswidth}
\newcounter{LWR@tablemulticolspos}
@@ -6157,9 +6411,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\IfStrEq{\LWR@strresult}{S}{r}{}%
\IfStrEq{\LWR@strresult}{X}{p}{}%
\IfStrEq{\LWR@strresult}{|}{%
- \ifnumcomp{\value{LWR@tablemulticolspos}}{=}{1}%
- {\booltrue{LWR@mcolvertbarl}}%
- {\booltrue{LWR@mcolvertbarr}}%
+ \ifnumcomp{\value{LWR@tablemulticolspos}}{=}{1}% left edge?
+ {\booltrue{LWR@mcolvertbarl}}% left edge
+ {\booltrue{LWR@mcolvertbarr}}% not left edge
}{}%
\LWR@traceinfo{lwr@printmccoltype done}%
}
@@ -6225,6 +6479,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
+\newcommand*{\LWR@addmulticolvertrulecolor}{%
+\ifbool{LWR@tabularmutemods}{}{%
+ \ifbool{LWR@mcolvertbarl}{%
+ \LWR@tdaddstyle%
+ border-left: 1px solid \#\LWR@vertruleHTMLcolor%
+ }{}%
+ \ifbool{LWR@mcolvertbarr}{%
+ \LWR@tdaddstyle%
+ border-right: 1px solid \#\LWR@vertruleHTMLcolor%
+ }{}%
+}%
+}
+
\newcommand{\LWR@multicoltext}{}
\newcounter{LWR@lastmulticolumn}
@@ -6243,8 +6510,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\IfValueT{#2}{ % rows?
rowspan="#2" %
\IfValueT{#1}{% vpos?
-\ifstrequal{#1}{b}{style="\mbox{vertical-align:bottom}" }{}%
-\ifstrequal{#1}{t}{style="\mbox{vertical-align:top}" }{}%
+\ifstrequal{#1}{b}{style="\LWR@origmbox{vertical-align:bottom}" }{}%
+\ifstrequal{#1}{t}{style="\LWR@origmbox{vertical-align:top}" }{}%
}% vpos?
}% rows?
class="td%
@@ -6259,6 +6526,8 @@ rowspan="#2" %
"%
\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+\LWR@addtabularhrulecolor%
+\LWR@addmulticolvertrulecolor%
\LWR@addformatwpalignment{#5}%
\LWR@tdendstyles%
}% end of the opening table data tag
@@ -6481,6 +6750,12 @@ rowspan="#2" %
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\bottomrule}%
{\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\rowcolor}%
+ {\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\arrayrulecolor}%
+ {\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\doublerulesepcolor}%
+ {\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\warpprintonly}%
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\warpHTMLonly}%
@@ -6514,24 +6789,24 @@ rowspan="#2" %
\begin{warpHTML}
-\newcommand*{\LWR@origtoprule}[1]{\hline}
-\newcommand*{\LWR@origmidrule}[1]{\hline}
+\newcommand*{\LWR@origtoprule}[1][]{\hline}
+\newcommand*{\LWR@origmidrule}[1][]{\hline}
\LetLtxMacro\LWR@origcmidrule\cline
-\newcommand*{\LWR@origbottomrule}[1]{\hline}
+\newcommand*{\LWR@origbottomrule}[1][]{\hline}
\newcommand*{\LWR@origaddlinespace}[1][]{}
\newcommand*{\LWR@origmorecmidrules}{}
\newcommand*{\LWR@origspecialrule}[3]{\hline}
\AtBeginDocument{
\@ifpackageloaded{lwarp-tabls}
{
-\newcommand*{\LWR@hline}[1][]{%
+\newcommand*{\LWR@HTMLhline}[1][]{%
\ifbool{FormatWP}%
{\LWR@docmidrule{1-\arabic{LWR@tabletotalcols}}}%
{\booltrue{LWR@doinghline}}%
\LWR@getmynexttoken}%
}
{
-\newcommand*{\LWR@hline}{%
+\newcommand*{\LWR@HTMLhline}{%
\ifbool{FormatWP}%
{\LWR@docmidrule{1-\arabic{LWR@tabletotalcols}}}%
{\booltrue{LWR@doinghline}}%
@@ -6539,6 +6814,9 @@ rowspan="#2" %
}
}% AtBeginDocument
+\NewDocumentCommand{\LWR@HTMLcline}{m}%
+{\LWR@docmidrule{#1}\LWR@getmynexttoken}%
+
\AtBeginDocument{
\@ifundefined{frenchbsetup}%
{% no babel-french
@@ -6575,10 +6853,19 @@ rowspan="#2" %
\boolfalse{LWR@tabularcelladded}%
\LWR@clearmidrules%
\LetLtxMacro{\\}{\LWR@tabularendofline}%
+\LetLtxMacro\columncolor\LWR@HTMLcolumncolor
+\LetLtxMacro\rowcolor\LWR@HTMLrowcolor
+\LetLtxMacro\cellcolor\LWR@HTMLcellcolor
+\LetLtxMacro\arrayrulecolor\LWR@HTMLarrayrulecolor
+\LetLtxMacro\doublerulesepcolor\LWR@HTMLdoublerulesepcolor
+\renewcommand*{\LWR@columnHTMLcolor}{}
+\renewcommand*{\LWR@rowHTMLcolor}{}
+\renewcommand*{\LWR@cellHTMLcolor}{}
+\edef\LWR@vertruleHTMLcolor{\LWR@ruleHTMLcolor}
+\setcounter{LWR@cellcolordepth}{0}
\LWR@traceinfo{LWR@tabular: redefining macros}%
-\renewcommand*{\hline}{\LWR@hline}%
-\RenewDocumentCommand{\cline}{m}%
-{\LWR@docmidrule{##1}\LWR@getmynexttoken}%
+\LetLtxMacro\hline\LWR@HTMLhline%
+\LetLtxMacro\cline\LWR@HTMLcline%
\DeclareDocumentCommand{\toprule}{o d()}
{%
\IfValueTF{##1}%
@@ -6625,7 +6912,7 @@ rowspan="#2" %
\LWR@maybenewtablerow%
\global\booltrue{LWR@skippingmcolrowcell}%
}%
-\LetLtxMacro{\caption}{\LWR@longtabledatacaptiontag}%
+\LetLtxMacro\caption\LWR@longtabledatacaptiontag%
\global\boolfalse{LWR@tableparcell}%
\global\boolfalse{LWR@skippingmrowcell}%
\global\boolfalse{LWR@skippingmcolrowcell}%
@@ -6730,16 +7017,16 @@ rowspan="#2" %
{% pars allowed
\ifbool{LWR@doingapar}%
{% par started
- \LWR@htmltag{a \mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
}% par started
{% par not started
\LWR@stoppars%
- \LWR@htmltag{a \mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
\LWR@startpars%
}% par not started
}% pars allowed
{% pars not allowed
- \LWR@htmltag{a \mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a \LWR@origmbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
}% pars not allowed
}% not lateximage
}
@@ -6763,7 +7050,7 @@ rowspan="#2" %
\LWR@traceinfo{LWR@startref A: !#1!}%
\LWR@htmltag{a href="%
\LWR@traceinfo{LWR@startref B}%
-\mbox{\LWR@htmlrefsectionfilename{#1}}%
+\LWR@origmbox{\LWR@htmlrefsectionfilename{#1}}%
\LWR@traceinfo{LWR@startref C}%
\#%
\LWR@traceinfo{LWR@startref D: !#1!}%
@@ -6781,7 +7068,7 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@startref D3}%
- \mbox{\LWR@sanitized}%
+ \LWR@origmbox{\LWR@sanitized}%
}%
}%
\LWR@traceinfo{LWR@startref E}%
@@ -6897,7 +7184,7 @@ autopage-\theLWR@currentautosec%
\booltrue{LWR@freezethisautoid}%
\begingroup%
\LWR@origraggedright%
-\LWR@htmltag{figure id="\mbox{autoid-\arabic{LWR@thisautoid}}" class="#1"}%
+\LWR@htmltag{figure id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}" class="#1"}%
\ifbool{FormatWP}{%
\LWR@orignewline%
\LWR@BlockClassWP{}{}{wp#1}%
@@ -6940,7 +7227,7 @@ autopage-\theLWR@currentautosec%
\newcommand*{\LWR@newautoidanchor}{%
\ifbool{LWR@freezethisautoid}{}{%
\addtocounter{LWR@thisautoid}{1}%
- \LWR@htmltag{a id="\mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
}%
}
@@ -6970,7 +7257,7 @@ autopage-\theLWR@currentautosec%
\newenvironment*{LWR@figcaption}
{%
\LWR@traceinfo{LWR@figcaption env start}%
-\LWR@htmlblocktag{figcaption}
+\LWR@htmlblocktag{figcaption}%
\ifbool{FormatWP}{%
\begin{BlockClass}[font-style:italic]{italic}
\LWR@origvspace*{\baselineskip}
@@ -6984,15 +7271,16 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{LWR@figcaption env end: done}%
}
-\let\LWR@origcaption@begin\caption@begin
-\let\LWR@origcaption@end\caption@end
-\let\LWR@orig@@par\@@par
+\AtBeginDocument{
+\LetLtxMacro\LWR@origcaption@begin\caption@begin
+\LetLtxMacro\LWR@origcaption@end\caption@end
+}
\newcommand{\LWR@caption@begin}[1]
{
\LWR@traceinfo{LWR@caption@begin}%
\begingroup%
-\renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}%
+\@setpar{\LWR@closeparagraph\@@par}%
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}%
\LWR@figcaption%
@@ -7005,7 +7293,6 @@ autopage-\theLWR@currentautosec%
{%
\LWR@traceinfo{LWR@caption@end}%
\LWR@origcaption@end%
-\LWR@origvspace*{\baselineskip}%
\endLWR@figcaption%
\endgroup%
\LWR@traceinfo{LWR@caption@end: done}%
@@ -7025,7 +7312,7 @@ autopage-\theLWR@currentautosec%
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="\mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
\bgroup
\@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
{\egroup\LWR@LT@captionlistentry}}%
@@ -7197,7 +7484,7 @@ autopage-\theLWR@currentautosec%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
\LWR@startpars%
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\#\mbox{autosec-#4}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\#\LWR@origmbox{autosec-#4}%
}{#3}{toc#2}%
\LWR@stoppars%
}
@@ -7226,22 +7513,29 @@ autopage-\theLWR@currentautosec%
\LWR@startpars%
\LWR@subhyperrefclass{%
\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
- \#\mbox{autoid-\arabic{LWR@nextautoid}}}%
+ \#\LWR@origmbox{autoid-\arabic{LWR@nextautoid}}}%
{#4}{toc#2}%
\LWR@stoppars%
}{}%
}
-\renewcommand{\l@part}[2]{\hypertoc{-1}{part}{#1}{#2}}
+\DeclareDocumentCommand{\l@part}{m m}{\hypertoc{-1}{part}{#1}{#2}}
+
\DeclareDocumentCommand{\l@chapter}{m m}
{\hypertoc{0}{chapter}{#1}{#2}}
+
\renewcommand{\l@section}[2]{\hypertoc{1}{section}{#1}{#2}}
+
\renewcommand{\l@subsection}[2]{\hypertoc{2}{subsection}{#1}{#2}}
-\renewcommand{\l@subsubsection}[2]
- {\hypertoc{3}{subsubsection}{#1}{#2}}
+
+\renewcommand{\l@subsubsection}[2]{\hypertoc{3}{subsubsection}{#1}{#2}}
+
\renewcommand{\l@paragraph}[2]{\hypertoc{4}{paragraph}{#1}{#2}}
+
\renewcommand{\l@subparagraph}[2]{\hypertoc{5}{subparagraph}{#1}{#2}}
+
\renewcommand{\l@figure}[2]{\hypertocfloat{1}{figure}{lof}{#1}{#2}}
+
\renewcommand{\l@table}[2]{\hypertocfloat{1}{table}{lot}{#1}{#2}}
\end{warpHTML}
@@ -7321,6 +7615,13 @@ autopage-\theLWR@currentautosec%
\providecommand{\glo@name}{}
\end{warpall}
\begin{warpHTML}
+\def\bibliography#1{%
+ \if@filesw
+ \immediate\write\@auxout{\string\bibdata{#1}}%
+ \fi
+ \@input@{\BaseJobname.bbl}% lwarp
+}
+\renewcommand{\@biblabel}[1]{[#1]\quad}
\AtBeginDocument{
\AtBeginEnvironment{thebibliography}{
\providecommand*{\LWR@newem}[1]{\textit{#1}}
@@ -7346,12 +7647,34 @@ autopage-\theLWR@currentautosec%
\newcommand*{\LWR@restoreorigformatting}{%
\LWR@traceinfo{LWR@restoreorigformatting}%
\linespread{1}%
+\LetLtxMacro\caption@begin\LWR@origcaption@begin%
+\LetLtxMacro\caption@end\LWR@origcaption@end%
+\let\par\LWR@origpar%
\LetLtxMacro\ref\LWR@origref%{} syntax highlighting
+\let\normalsize\LWR@orignormalsize%
+\let\small\LWR@origsmall%
+\let\footnotesize\LWR@origfootnotesize%
+\let\scriptsize\LWR@origscriptsize%
+\let\tiny\LWR@origtiny%
+\let\large\LWR@origlarge%
+\let\Large\LWR@origLarge%
+\let\LARGE\LWR@origLARGE%
+\let\huge\LWR@orighuge%
+\let\Huge\LWR@origHuge%
\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
\renewcommand{\BlockClassSingle}[2]{##2}%
\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LetLtxMacro\hfill\LWR@orighfill%
+\LetLtxMacro\hfil\LWR@orighfil%
\LetLtxMacro\rule\LWR@origrule%
+\LetLtxMacro\hrulefill\LWR@orighrulefill%
+\LetLtxMacro\dotfill\LWR@origdotfill%
+\let\vspace\LWR@origvspace%
+\let\hss\LWR@orighss%
+\let\llap\LWR@origllap%
+\let\rlap\LWR@origrlap%
+\let\hfilneg\LWR@orighfilneg%
\let\,\LWR@origcomma% disable HTML short unbreakable space
\let\textellipsis\LWR@origtextellipsis%
\let\textless\LWR@origtextless%
@@ -7389,8 +7712,9 @@ autopage-\theLWR@currentautosec%
\let\enskip\LWR@origenskip%
\let\quad\LWR@origquad%
\let\qquad\LWR@origqquad%
-\LetLtxMacro{\tabular}{\LWR@origtabular}%
-\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
+\LetLtxMacro\tabular\LWR@origtabular%
+\LetLtxMacro\endtabular\LWR@origendtabular%
+\LetLtxMacro\hline\LWR@orighline%
\LetLtxMacro\toprule\LWR@origtoprule%
\LetLtxMacro\midrule\LWR@origmidrule%
\LetLtxMacro\cmidrule\LWR@origcmidrule%
@@ -7406,6 +7730,7 @@ autopage-\theLWR@currentautosec%
\let\reflectbox\LWR@origreflectbox%
\LetLtxMacro\resizebox\LWR@origresizebox%
\let\framebox\LWR@origframebox%
+\LetLtxMacro\mbox\LWR@origmbox%
\let\makebox\LWR@origmakebox%
\let\fbox\LWRprint@fbox%
\let\fboxBlock\LWRprint@fbox%
@@ -7503,7 +7828,7 @@ autopage-\theLWR@currentautosec%
{}%
\ifdimgreater{\LWR@singledollardepth}{0.01em}{%
\def\LWR@singledollardepthstyle{%
- \ ; \mbox{vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em} %
+ \ ; \LWR@origmbox{vertical-align:-\LWR@convertto{em}{\the\LWR@singledollardepth} em} %
}%
}{%
\def\LWR@singledollardepthstyle{}%
@@ -8065,7 +8390,9 @@ autopage-\theLWR@currentautosec%
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
class="lateximagesource"}%
\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR@lateximagesfile{|\arabic{LWR@LIpage}|\arabic{LWR@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}%
@@ -8103,7 +8430,7 @@ autopage-\theLWR@currentautosec%
\LWR@htmlclosecomment%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
\LWR@subinlineimage[#1]{lateximage}%
- {lateximages\OSPathSymbol{}\mbox{lateximage-\theLWR@externalfilecnt}}{svg}{#2}%
+ {lateximages\OSPathSymbol{}\LWR@origmbox{lateximage-\theLWR@externalfilecnt}}{svg}{#2}%
\LWR@ensuredoingapar%
\LWR@htmltag{/span}%
\ifbool{HTMLDebugComments}{%
@@ -8117,7 +8444,11 @@ autopage-\theLWR@currentautosec%
\end{warpHTML}
\begin{warpprint}
-\NewDocumentEnvironment{lateximage}{O{image}O{}}{}{}
+
+\NewDocumentEnvironment{lateximage}{o o}
+ {\begin{varwidth}[b]{\linewidth}}
+ {\end{varwidth}}
+
\end{warpprint}
@@ -8127,7 +8458,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\mbox{text-align:center}]{center}}
+{\BlockClass[\LWR@origmbox{text-align:center}]{center}}
{\BlockClass{center}}
}
{\endBlockClass}
@@ -8136,7 +8467,7 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\mbox{text-align:right}]{flushright}}
+{\BlockClass[\LWR@origmbox{text-align:right}]{flushright}}
{\BlockClass{flushright}}
}
{\endBlockClass}
@@ -8145,11 +8476,17 @@ autopage-\theLWR@currentautosec%
{
\LWR@forcenewpage
\ifbool{FormatWP}
-{\BlockClass[\mbox{text-align:left}]{flushleft}}
+{\BlockClass[\LWR@origmbox{text-align:left}]{flushleft}}
{\BlockClass{flushleft}}
}
{\endBlockClass}
+\renewcommand{\leftline}[1]{\begin{flushleft}#1\end{flushleft}}
+
+\renewcommand{\centerline}[1]{\begin{center}#1\end{center}}
+
+\renewcommand{\rightline}[1]{\begin{flushright}#1\end{flushright}}
+
\end{warpHTML}
\begin{warpHTML}
@@ -8306,25 +8643,100 @@ autopage-\theLWR@currentautosec%
\AfterEndPreamble{
\LWR@traceinfo{Patching cleveref.}
+\def\LWR@orig@@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}}%
+\ifdefequal{\@@setcref}{\LWR@orig@@@setcref}{% before v0.21
+ \renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}}
+}{
+ \ifdefequal{\@@@setcref}{\LWR@orig@@@setcref}{% as of v0.21
+ \renewcommand*{\@@@setcref}[2]{#1{\ref{#2}}{}{}}
+ }{
+ \PackageWarning{lwarp-cleveref}{
+ Unknown verison of cleveref.
+ \protect\cref\space will fail.
+ }%
+ }
+}
+\def\LWR@orig@@@setcrefrange#1#2#3{%
+ \cref@getlabel{#2}{\@labela}%
+ \cref@getlabel{#3}{\@labelb}%
+ #1{\@labela}{\@labelb}{}{}{}{}}%
-\renewcommand*{\@@setcref}[2]{#1{\ref{#2}}{}{}}
-
+\ifdefequal{\@@setcrefrange}{\LWR@orig@@@setcrefrange}{
+ \renewcommand{\@@setcrefrange}[3]{%
+ #1{\ref{#2}}{\ref{#3}}{}{}{}{}%
+ }
+}{
+ \ifdefequal{\@@@setcrefrange}{\LWR@orig@@@setcrefrange}{
+ \renewcommand{\@@@setcrefrange}[3]{%
+ #1{\ref{#2}}{\ref{#3}}{}{}{}{}%
+ }
+ }{
+ \PackageWarning{lwarp-cleveref}{
+ Unknown verison of cleveref.
+ \protect\crefrange\space will fail.
+ }
+ }
+}
-\renewcommand{\@@setcrefrange}[3]{%
-#1{\ref{#2}}{\ref{#3}}{}{}{}{}}
\newcommand*{\cpagerefFor}{for}
-\renewcommand*{\@@setcpageref}[2]{%
-#1{\cpagerefFor\ \cref{#2}}{}{}%
+\def\LWR@orig@@setcpageref#1#2{% before v0.21
+ \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}}%
+
+\def\LWR@orig@@@setcpageref#1#2{% as of v0.21
+ \cpageref@getlabel{#2}{\@temppage}#1{\@temppage}{}{}}%
+
+\ifdefequal{\@@setcpageref}{\LWR@orig@@setcpageref}{
+ \renewcommand*{\@@setcpageref}[2]{%
+ #1{\cpagerefFor\ \cref{#2}}{}{}%
+ }
+}{
+ \ifdefequal{\@@@setcpageref}{\LWR@orig@@@setcpageref}{
+ \renewcommand*{\@@@setcpageref}[2]{%
+ #1{\cpagerefFor\ \cref{#2}}{}{}%
+ }
+ }
+ {
+ \PackageWarning{lwarp-cleveref}{
+ Unknown verison of cleveref.
+ \protect\cpageref\space will fail.
+ }
+ }
}
-\renewcommand{\@@setcpagerefrange}[3]{%
-#1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}}
+\def\LWR@orig@@setcpagerefrange#1#2#3{% before v0.21
+ \cref@getpageref{#2}{\@pagea}%
+ \cref@getpageref{#3}{\@pageb}%
+ #1{\@pagea}{\@pageb}{}{}{}{}}%
+
+\def\LWR@orig@@@setcpagerefrange#1#2#3{% as of v0.21
+ \cpageref@getlabel{#2}{\@pagea}%
+ \cpageref@getlabel{#3}{\@pageb}%
+ #1{\@pagea}{\@pageb}{}{}{}{}}%
+
+\ifdefequal{\@@setcpagerefrange}{\LWR@orig@@setcpagerefrange}{
+ \renewcommand*{\@@setcpagerefrange}[3]{%
+ #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}%
+ }
+}{
+ \ifdefequal{\@@@setcpagerefrange}{\LWR@orig@@@setcpagerefrange}{
+ \renewcommand*{\@@@setcpagerefrange}[3]{%
+ #1{\cpagerefFor\ \cref{#2}}{\cref{#3}}{}{}{}{}%
+ }
+ }
+ {
+ \PackageWarning{lwarp-cleveref}{
+ Unknown verison of cleveref.
+ \protect\cpagerefrange\space will fail.
+ }
+ }
+}
+
}% AfterEndPreamble
\LetLtxMacro\LWR@origlabel\label
@@ -8387,18 +8799,18 @@ autopage-\theLWR@currentautosec%
\ifbool{FormatWP}{%
\addtocounter{LWR@thisautoidWP}{1}%
-\LWR@htmltag{div id="\mbox{autoidWP-\arabic{LWR@thisautoidWP}}" class="wpminipage"}%
+\LWR@htmltag{div id="\LWR@origmbox{autoidWP-\arabic{LWR@thisautoidWP}}" class="wpminipage"}%
}{}%
\LWR@traceinfo{minipage: creating div class}%
\LWR@htmltag{div class="minipage" style="%
-\ifthenelse{\equal{#1}{t}}{\mbox{vertical-align:bottom} ; }{}%
-\ifthenelse{\equal{#1}{c}}{\mbox{vertical-align:middle} ; }{}%
-\ifthenelse{\equal{#1}{b}}{\mbox{vertical-align:top} ; }{}%
-\ifthenelse{\equal{#3}{t}}{\mbox{justify-content:flex-start} ; }{}%
-\ifthenelse{\equal{#3}{c}}{\mbox{justify-content:center} ; }{}%
-\ifthenelse{\equal{#3}{b}}{\mbox{justify-content:flex-end} ; }{}%
-\ifthenelse{\equal{#3}{s}}{\mbox{justify-content:space-between} ; }{}%
+\ifthenelse{\equal{#1}{t}}{\LWR@origmbox{vertical-align:bottom} ; }{}%
+\ifthenelse{\equal{#1}{c}}{\LWR@origmbox{vertical-align:middle} ; }{}%
+\ifthenelse{\equal{#1}{b}}{\LWR@origmbox{vertical-align:top} ; }{}%
+\ifthenelse{\equal{#3}{t}}{\LWR@origmbox{justify-content:flex-start} ; }{}%
+\ifthenelse{\equal{#3}{c}}{\LWR@origmbox{justify-content:center} ; }{}%
+\ifthenelse{\equal{#3}{b}}{\LWR@origmbox{justify-content:flex-end} ; }{}%
+\ifthenelse{\equal{#3}{s}}{\LWR@origmbox{justify-content:space-between} ; }{}%
\LWR@traceinfo{minipage: about to print the width of \rndprintlength{\LWR@minipagewidth}}%
\uselengthunit{PT}%
\ifbool{LWR@minipagefullwidth}%
@@ -8444,7 +8856,6 @@ autopage-\theLWR@currentautosec%
}{}%
\LWR@htmldivclassend{minipage}%
-\LWR@origvspace{1\baselineskip}% required for subcaption
\addtocounter{LWR@minipagedepth}{-1}%
\LWR@startpars%
\ifbool{FormatWP}{\newline}{}%
@@ -8457,8 +8868,7 @@ autopage-\theLWR@currentautosec%
#5
\end{minipage}%
}
-\LetLtxMacro\LWR@origmakebox\makebox
-
+\renewcommand*{\mbox}[1]{#1}
\RenewDocumentCommand{\makebox}{d() o o m}{%
\IfValueTF{#2}%
{%
@@ -8470,8 +8880,8 @@ autopage-\theLWR@currentautosec%
\setlength{\LWR@tempwidth}{#2}%
\uselengthunit{PT}%
\InlineClass[%
- \mbox{display:inline-block} ; %
- \mbox{text-align}:\LWR@align\ ; %
+ \LWR@origmbox{display:inline-block} ; %
+ \LWR@origmbox{text-align}:\LWR@align\ ; %
width:\rndprintlength{\LWR@tempwidth}%
]%
{makebox}%
@@ -8702,25 +9112,41 @@ width:\rndprintlength{\LWR@tempwidth}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
\DeclareRobustCommand{\LWR@subsingledollar}[1]{}%
+\renewcommand*{\newline}{ }%
}
-\renewcommand*{\mdseries}{}
-\renewcommand*{\bfseries}{}
+\newcommand*{\LWR@f@family}{rm}
+\newcommand*{\LWR@f@series}{md}
+\newcommand*{\LWR@f@shape}{up}
-\renewcommand*{\rmfamily}{}
+\newcommand*{\LWR@textcurrentfont}[1]{%
+\csuse{text\LWR@f@family}{%
+\csuse{text\LWR@f@series}{%
+\csuse{text\LWR@f@shape}{%
+#1%
+}%
+}%
+}%
+}
-\renewcommand*{\sffamily}{}
+\renewcommand*{\mdseries}{\renewcommand*{\LWR@f@series}{md}}
-\renewcommand*{\ttfamily}{}
+\renewcommand*{\bfseries}{\renewcommand*{\LWR@f@series}{bf}}
-\renewcommand*{\upshape}{}
+\renewcommand*{\rmfamily}{\renewcommand*{\LWR@f@family}{rm}}
-\renewcommand*{\itshape}{}
+\renewcommand*{\sffamily}{\renewcommand*{\LWR@f@family}{sf}}
-\renewcommand*{\scshape}{}
+\renewcommand*{\ttfamily}{\renewcommand*{\LWR@f@family}{tt}}
-\renewcommand*{\normalfont}{}
+\renewcommand*{\upshape}{\renewcommand*{\LWR@f@shape}{up}}
+
+\renewcommand*{\itshape}{\renewcommand*{\LWR@f@shape}{it}}
+
+\renewcommand*{\scshape}{\renewcommand*{\LWR@f@shape}{sc}}
+
+\renewcommand*{\normalfont}{\rmfamily\mdseries\upshape}
\renewcommand{\sp}[1]{\text{<sup>#1</sup>}{}}
@@ -8750,44 +9176,17 @@ width:\rndprintlength{\LWR@tempwidth}%
{underline}{#1}%
}
-\renewcommand*{\hfill}{\qquad}
-
-\renewcommand*{\hrulefill}{\rule{1in}{1pt}}
-
-\renewcommand*{\dotfill}{\dots}
-
\end{warpHTML}
\begin{warpHTML}
-\let\LWR@origcomma\,
-\let\LWR@origtilde~
-\let\LWR@origenskip\enskip
-\let\LWR@origquad\quad
-\let\LWR@origqquad\qquad
-\let\LWR@orighspace\hspace
-\let\LWR@origvspace\vspace
-\let\LWR@origrule\rule
-\let\LWR@origmedskip\medskip
-\let\LWR@origbigskip\bigskip
-\let\LWR@origtextellipsis\textellipsis
\renewrobustcmd*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
\renewrobustcmd*{~}{\HTMLentity{nbsp}}
\renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}}
-\let\LWR@orignormalsize\normalsize
-\let\LWR@origsmall\small
-\let\LWR@origfootnotesize\footnotesize
-\let\LWR@origscriptsize\scriptsize
-\let\LWR@origtiny\tiny
-\let\LWR@origlarge\large
-\let\LWR@origLarge\Large
-\let\LWR@origLARGE\LARGE
-\let\LWR@orighuge\huge
-\let\LWR@origHuge\Huge
\renewcommand*{\normalsize}{}
\renewcommand*{\small}{}
\renewcommand*{\footnotesize}{}
@@ -8807,6 +9206,12 @@ width:\rndprintlength{\LWR@tempwidth}%
}
+\renewcommand*{\hfill}{\qquad}
+
+\renewcommand*{\hrulefill}{\rule{1in}{1pt}}
+
+\renewcommand*{\dotfill}{\dots}
+
\renewcommand*{\newpage}{
}