summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/README.txt4
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/lwarp.pdfbin1677329 -> 1777507 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/lwarp/lwarpmk.lua4
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx5910
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.ins24
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty30
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty60
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty31
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-backref.sty25
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty16
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-changebar.sty31
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-changepage.sty10
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-cite.sty34
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-continue.sty28
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-endfloat.sty33
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty24
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty51
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-flafter.sty22
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty10
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fltrace.sty24
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-footnpag.sty21
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fwlw.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty15
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty46
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty29
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty63
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-memhfixc.sty21
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty24
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty3
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-natbib.sty38
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-nextpage.sty8
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty208
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-pagesel.sty21
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty1055
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-prettyref.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty24
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty28
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-subfigure.sty41
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-supertabular.sty18
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-textfit.sty43
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty109
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titleref.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tocbibind.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty161
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-turnthepage.sty22
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xtab.sty18
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty951
56 files changed, 7460 insertions, 2000 deletions
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt
index 306b0696cd9..55a7382f663 100644
--- a/Master/texmf-dist/doc/latex/lwarp/README.txt
+++ b/Master/texmf-dist/doc/latex/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.44 README.txt
+LaTeX lwarp package v0.46 README.txt
Files included are:
@@ -38,7 +38,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-Copyright 2016-2017 Brian Dunn
+Copyright 2016-2018 Brian Dunn
Homepage: http://BDTechConcepts.com
Email: bd@BDTechConcepts.com
diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
index 151a46223c9..f2597eb747e 100644
--- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
+++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
index 2521fa2524b..9a15ab8fd55 100755
--- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
+++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
@@ -1,10 +1,10 @@
#!/usr/bin/env texlua
--- Copyright 2016-2017 Brian Dunn
+-- Copyright 2016-2018 Brian Dunn
-- Print the usage of the lwarpmk command:
-printversion = "v0.44"
+printversion = "v0.46"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index 1c3a06be7f0..bba769cc09e 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
@@ -1,7 +1,7 @@
%
% \iffalse meta-comment
%
-% Copyright 2016-2017 Brian Dunn
+% Copyright 2016-2018 Brian Dunn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2017/11/22 v0.44 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2018/01/23 v0.46 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -163,6 +163,18 @@
\usepackage{dtxdescribe}
+
+\DeclareRobustCommand{\thinskip}{\hskip 0.16667em\relax}
+\def\endash{–}
+\def\emdash{—}
+% \def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
+% \def\dash{\d@sh\nobreak\endash}
+% \def\Dash{\d@sh\nobreak\emdash}
+\newcommand{\thinbrspace}{\hspace{.16667em}\penalty\exhyphenpenalty\hspace{0pt}}
+\newrobustcmd{\Dash}{\unskip\thinspace\textemdash\thinbrspace}
+\newrobustcmd{\dash}{\unskip\thinspace\mbox{--}\thinbrspace}
+
+
\newcommand{\ItemDescribeMacro}[1]{%
\item[\cmd{#1}:]%
\setlength{\parskip}{1.5ex}%
@@ -232,6 +244,25 @@ Keywords={LaTeX, HTML, conversion}%
}}
+\pdfstringdefDisableCommands{
+\def\quad{ }
+\def\\{ }
+\def\pkg#1{#1}
+\def\cs#1{\textbackslash#1}
+\def\env#1{#1}
+\def\,{ }
+\def\prog#1{#1}
+\def\LuaLaTeX{LuaLaTeX}
+\def\XeLaTeX{XeLaTeX}
+\def\TeX{TeX}
+\def\LaTeX{LaTeX}
+\def\Dash{ --- }
+\def\dash{ -- }
+\def\element#1{#1}
+\def\attribute#1{#1}
+}
+
+
\usepackage{cleveref}
@@ -239,10 +270,12 @@ Keywords={LaTeX, HTML, conversion}%
\renewcommand*{\thepart}{\arabic{part}}
-\newrobustcmd{\lmacro}[1]{\textbackslash#1}
-\newrobustcmd{\cmds}[1]{\texttt{#1}}
-\newrobustcmd{\env}[1]{\texttt{#1}}
-\newrobustcmd{\pkg}[1]{\textsf{#1}}
+\providerobustcmd*{\lmacro}[1]{\textbackslash#1}
+\providerobustcmd*{\cmds}[1]{\texttt{#1}}
+\providerobustcmd*{\env}[1]{\texttt{#1}}
+\providerobustcmd*{\ctr}[1]{\texttt{#1}}
+\providerobustcmd*{\pkg}[1]{\textsf{#1}}
+\providerobustcmd*{\prog}[1]{\texttt{#1}}
\newrobustcmd{\acro}[1]{\textsc{\lowercase{#1}}}
\newrobustcmd{\element}[1]{\texttt{<#1>}}
\newrobustcmd{\attribute}[1]{\texttt{#1}}
@@ -266,6 +299,12 @@ Keywords={LaTeX, HTML, conversion}%
\newrobustcmd{\CTAN}{\acro{CTAN}}
\newrobustcmd{\TDS}{\acro{TDS}}
+\newcommand{\spslash}{\unskip\kern.085em/\hspace{.085em}\penalty\exhyphenpenalty\hspace{0pt}}
+
+\makeatletter
+\newcommand*{\rulebreak}{\bigskip\hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill}\bigskip\@afterheading}
+\makeatother
+
\newcommand{\DescribeDefault}[1]{\margintag{\footnotesize \textcolor{green!50!black}{Default: \texttt{#1}}}}
\newcommand{\goesto}{$\Rightarrow$}
@@ -276,7 +315,7 @@ Keywords={LaTeX, HTML, conversion}%
\newcommand{\codeprint}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for PRINT output:~}}}\vspace{-5.25ex}}
\newcommand{\codeall}{\leavevmode\marginpar{\footnotesize\raggedleft\textcolor{codecolor}{\textbf{for HTML \& PRINT:~}}}\vspace{-5.25ex}}
-\newcommand*{\testthis}{\textcolor{blue}{Please send bug reports!}\watchout[Not yet tested!]}
+\newcommand*{\testthis}{\textcolor{blue}{Please send bug reports!}\watchout[Not fully tested!]}
\newcommand{\userentry}[1]{%
\par
@@ -405,6 +444,10 @@ but does not require that \pkg{hyperref} be loaded by the document.
same time as \pkg{hyperref}, since they both define the \cs{url} command.
\pkg{lwarp} does not (yet) attempt to convert \pkg{url} links into hyperlinks
during \HTML\ output, nor does \pkg{url} create hyperlinks during print output.
+
+When generating \HTML, \pkg{lwarp}'s emulation of \pkg{hyperref} does not
+\watchout[backref]
+automatically load \pkg{backref}, so \pkg{backref} must be loaded explicitly.
}
\newcommand{\limitsabstract}{%
@@ -515,6 +558,7 @@ An index may be placed inline with other \HTML\ text, or on its own \HTML\ page:
\cs{printindex}
\end{sourcedisplay}
+\needspace{3\baselineskip}
\item [On its own \HTML\ page, with a manual TOC entry:] \
\begin{sourcedisplay}
\cs{begin}\{warpprint\} \\
@@ -653,8 +697,7 @@ may limit how small the output will be displayed.
\newcommand{\limitsreferences}{%
Labels with special characters may be a problem.
\margintag{labels}
-It is best to stick with alpha-numeric, hyphen, and perhaps the colon (if not French).
-The underscore currently does not yet work when generating math for MathJax.
+It is best to stick with alpha-numeric, hyphen, underscore, and perhaps the colon (if not French).
\watchout[underscores]
\cs{nameref} refers to the most recently-used section where the \cs{label}
@@ -694,6 +737,41 @@ Some features have not yet been tested.
Please contact the author with any bug reports.
}
+\newcommand{\limitsmemoir}{
+While emulating \pkg{memoir}, \pkg{lwarp} pre-loads
+a number of packages (\cref{sec:patch-memoir-packages}).
+This can cause an options clash when the user's document later loads the same
+\watchout[options clash]
+packages with options. To fix this problem, specify the options before
+loading \pkg{lwarp}:
+\begin{sourcedisplay}
+\cs{documentclass}\{memoir\} \\
+\dots \\
+\cs{PassOptionsToPackage}\{options\_list\}\{package\_name\} \\
+\dots \\
+\cs{usepackage\{lwarp\}} \\
+\dots \\
+\cs{usepackage\{package\_name\}}
+\end{sourcedisplay}
+
+\cs{verbfootnote} is not supported.
+
+\cs{newfootnoteseries}, etc. are not supported.
+
+\pkg{lwarp} loads \pkg{pagenote} to perform \pkg{memoir}'s pagenote functions,
+but there are minor differences in \cs{pagenotesubhead} and related macros.
+
+Poem numbering is not supported.
+
+The \env{verbatim} environment does not yet support the \pkg{memoir} enhancements.
+It is currently recommended to load and use \pkg{fancyvrb} instead.
+
+The \pkg{memoir} glossary system is not yet supported by \texttt{lwarpmk}.
+The \pkg{glossaries} package may be used instead,
+but does require the glossary entries be
+changed from the \pkg{memoir} syntax to the \pkg{glossaries} syntax.
+}
+
\newcommand{\limitsverse}{%
\DescribeMacro{\attrib}
The documentation for the \pkg{verse} and \pkg{memoir} packages suggest
@@ -727,6 +805,7 @@ One reason to change \cs{HTMLleftmargini} is if there is a wide
The default is wide enough for a stanza number.
Horizontal spacing relies on \texttt{pdftotext}'s ability to discern the layout
+\watchout[spacing]
(\texttt{-layout} option) of the
text in the \HTML-tagged \PDF\ output. For some settings of
\cs{HTMLleftmargini} or \cs{HTMLleftskip} the horizontal alignment may not work out
@@ -870,6 +949,11 @@ Limitations when using MathJax include:
Also see \cref{sec:limitssiunitx}.
+\item A \env{tabbing} environment is emulated
+ using an \HTML\ \element{pre}.\margintag{tabbing}
+ While MathJax is enabled inside \env{tabbing}, the browser may not correctly
+ render the horizontal alignment of the math and text following after on the same line.
+
\item Other math-related macros and packages are not supported by MathJax,
\watchout[other macros and packages]
including \cs{ensuremath}, \pkg{bigdelim}, \pkg{units}, and \pkg{nicefrac},
@@ -922,6 +1006,9 @@ It is recommended to use \pkg{cleveref} instead of \pkg{ntheorem}'s
\newcommand{\limitsgraphics}{%
For \cs{includegraphics} with \texttt{.pdf} files,
+\index{graphics>PDF files}
+\index{PDF images}
+\index{images>PDF}
\watchout[\texttt{.pdf} image files]
the user should provide a \texttt{.pdf} image file, and also
a \texttt{.svg}, \texttt{.png}, or \texttt{.jpg} version of the same image.
@@ -934,12 +1021,24 @@ For print output, \pkg{lwarp} will automatically choose the \texttt{.pdf} if ava
other some other format otherwise.
For \HTML, one of the other formats is used instead.
-If a \texttt{.pdf} file is explicitly referred to with its file extension,
+\DescribeProgram{pdftocairo}
+To convert a \PDF\ image to \SVG, use the utility \texttt{pdftocairo}:\userentry{
+pdftocairo -svg filename.pdf
+}
+
+If a \texttt{.pdf} file is referred to with its file extension,
a link to the \texttt{.pdf} file will appear in the \HTML\ output.
\begin{sourcedisplay}
\cs{includegraphics}\{filename.pdf\} \% creates a link in HTML
\end{sourcedisplay}
+\DescribePackage{epstopdf}
+For \texttt{.eps} files, use \pkg{epstopdf} to provide a \PDF\ version,
+and also provide a \SVG\ version as well.
+\index{graphics>EPS files}
+\index{EPS images}
+\index{images>EPS}
+
For \texttt{.png}, \texttt{.jpg}, or \texttt{.gif} image files,
\margintag{other image files}
the same file may be used in
@@ -1062,6 +1161,14 @@ Use \CSS\ or \cs{textcolor} where possible.
\margintag{\cs{color} and \cs{pagecolor}}
}
+\newcommand{\limitsepstopdf}{%
+When using \pkg{epstopdf} to convert images to \PDF,
+use the \texttt{pdftocairo} utility to also provide an \SVG\ version as well.
+In the document, refer to the image filename without a suffix. The
+\PDF\ version will be used in print output, and the \SVG\ version will
+be used for \HTML.
+}
+
\newcommand{\limitsoverpic}{%
The macros \cs{overpicfontsize} and \cs{overpicfontskip} are used during
\watchout[scaling]
@@ -1071,6 +1178,11 @@ document. Renew these macros before using the \env{overpic} and \env{Overpic}
environments.
}
+\newcommand{\limitstabbing}{%
+The \env{tabbing} environment works, except that \SVG\ math and \env{lateximage}s
+do not yet work inside the environment.
+}
+
\newcommand{\limitstabular}{%
Tabular mostly works as expected, but pay special attention to the
following, especially if working with environments, macros inside tabulars,
@@ -1093,6 +1205,9 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta
<define macros or environments using \env{tabular} and \texttt{\&} here> \\
\textcolor{red}{\cs{EndDefiningTabulars}}
\end{sourcedisplay}
+ This includes before and after defining any macro
+ \watchout[floatrow]
+ which used \cs{ttabbox} from \pkg{floatrow}.
\item \limitsresumetabular
\end{itemize}
@@ -1204,6 +1319,7 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta
Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \HTML\ output.
\end{itemize}
+\needspace{3\baselineskip}
\item[Other:] \
\begin{itemize}
\item \pkg{tabularx} ignores the width, but \texttt{X} columns do produce paragraph
@@ -1561,6 +1677,11 @@ appearing on the following lines instead of all on a single line.
}
\newcommand{\limitsfloatrow}{%
+Use \cs{StartDefiningTabulars} and \cs{EndDefiningTabulars} before and after
+\watchout[misplaced alignment alignment tab character \&]
+defining macros using \cs{ttabbox} with a tabular inside.
+See \cref{sec:limitstabular}.
+
When combined with the \pkg{subfig} package,
\watchout[\pkg{subfig} package]
while inside a \env{subfloatrow} \cs{ffigbox} and \cs{ttabbox}
@@ -1679,6 +1800,14 @@ The defaults are as follows, and may be changed in the preamble after
\bigskip
}
+\newcommand{\limitsxparse}{%
+To remove from the log any warnings about redeclaring objects,
+place the following before \pkg{lwarp} is loaded:
+\begin{sourcedisplay}
+\cs{usepackage}[log-declarations=false]\{xparse\}
+\end{sourcedisplay}
+}
+
\newcommand{\limitsnewtxmath}{%
The proper load order is:
\watchout[loading sequence]
@@ -1714,8 +1843,6 @@ This boolean may be tested by the user for later use.
\setlength{\marginparsep}{1em}
\setlength{\marginparpush}{.7ex}
-\setlength{\parindent}{0em}
-\setlength{\parskip}{2ex}
\setlength{\IndexMin}{40ex}
@@ -1736,7 +1863,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{16359}
+% \CheckSum{19275}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -1822,6 +1949,8 @@ This boolean may be tested by the user for later use.
% \changes{v0.42}{2017/10/30}{\ 2017/10/30}
% \changes{v0.43}{2017/11/08}{\ 2017/11/08}
% \changes{v0.44}{2017/11/22}{\ 2017/11/22}
+% \changes{v0.45}{2018/01/14}{\ 2018/01/14}
+% \changes{v0.46}{2018/01/23}{\ 2018/01/23}
@@ -1852,13 +1981,13 @@ This boolean may be tested by the user for later use.
%
% \bigskip
%
-% {\small\textcopyright{} 2016--2017} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
+% {\small\textcopyright{} 2016--2018} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
%
%
% ^^A % \title{The \pkg{lwarp} package\thanks{This document
% ^^A % corresponds to \pkg{lwarp}~\fileversion,
% ^^A % dated \filedate.}}
-% ^^A % \author{{\small\textcopyright{} 2016--2017} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}}
+% ^^A % \author{{\small\textcopyright{} 2016--2018} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}}
% ^^A % \published{}
% ^^A % \subtitle{\textup{\LaTeX{} to HTML5}}
% ^^A %
@@ -1883,7 +2012,7 @@ This boolean may be tested by the user for later use.
%
% A modular package-loading system uses the \pkg{lwarp} version of a package for
% \HTML\ when available.
-% Almost two hundred \LaTeX\ packages are supported with these high-level source
+% More than two hundred \LaTeX\ packages are supported with these high-level source
% compatibility replacements, and many others work as-is.
%
% A tutorial is provided to quickly introduce the user to the major components
@@ -1933,22 +2062,27 @@ This boolean may be tested by the user for later use.
% \clearpage
%
% \section{Supporting \protect\TeX\ development}
+% \label{sec:supportinglatex}
% \changes{v0.42}{2017/10/30}{Docs: Added support page.}
%
-% \TeX\ development:
+% \begingroup
+% \setlength{\parindent}{0em}
+% \setlength{\parskip}{2ex}
+%
+% \TeX\ and related projects:
% \begin{itemize}[nosep]
-% \item is mostly open-sourced and a volunteer effort;
-% \item benefits students, academics, scientists, engineers, and businesses;
-% \item helps drive education, public and private research, and commercial activity;
-% \item is used in the fields of mathematics, science, engineering, and the humanities;
-% \item spans decades of development;
-% \item is enduring --- many older packages are still actively used and maintained;
-% \item is largely backwards compatible;
-% \item is portable across all the major computing platforms;
-% \item is usable even on older computers and away from internet access;
-% \item requires no yearly subscription fees;
-% \item is supported by an active community of knowledgeable volunteers;
-% \item and is continuing to maintain relevance with modern improvements.
+% \item are mostly open-sourced and a volunteer effort;
+% \item benefit students, academics, scientists, engineers, and businesses;
+% \item help drive education, public and private research, and commercial activity;
+% \item are used in the fields of mathematics, science, engineering, and humanities;
+% \item span decades of development;
+% \item are enduring --- many older packages are still actively used and maintained;
+% \item are largely backwards compatible;
+% \item are portable across all the major computing platforms;
+% \item are usable even on older computers and away from internet access;
+% \item are continuing to maintain relevance with modern improvements;
+% \item require no yearly subscription fees;
+% \item and are supported by an active community of knowledgeable volunteers.
% \end{itemize}
%
% Please consider helping by joining and/or contributing to the \TeX\ Users Group,
@@ -1982,6 +2116,8 @@ This boolean may be tested by the user for later use.
% For country-specific \TeX\ users groups: \hfill
% \href{http://tug.org/usergroups.html}{\texttt{http://tug.org/usergroups.html}}
%
+% \endgroup
+%
% \clearpage
%
%
@@ -2006,6 +2142,43 @@ This boolean may be tested by the user for later use.
% For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
%
% \begin{description}
+% \item[v0.46:] \
+% \begin{itemize}
+% \item \cs{PrintStack} changed to \cs{LWRPrintStack}.\watchout[name change]
+% \item Fix: Empty lines between \env{tabular} rows.\margintag{misc. fixes}
+% \item Fix: Stack unnesting.
+% \item Fix: SVG math and \env{lateximage}s in numerous situations
+% (but still more to do).
+% \item Fix: Spaces in \cs{usepackage}.
+% \item Fix: Now allows MathJax inside \env{verse}.
+% \end{itemize}
+% \item[v0.45:] \
+% \begin{itemize}
+% \item Improved MikTeX install instructions.\margintag{docs}
+% \item Improved graphics and \pkg{epstopdf} instructions.
+% \item Updates to the \nameref{sec:introduction}.
+% \item Added \pkg{memoir}, \pkg{memhfixc}.
+% See \cref{sec:limitsmemoir}.\margintag{memoir}
+% \item Fix: Now allows underscores in labels.\margintag{cross-references}
+% \item Fix: \cs{\_} and |\<blank>| in section/file names.
+% \item Fix: Now allows MathJax inside \env{tabbing}.\margintag{math}
+% \item Fix: Bibliography \cs{em} names.\margintag{bibliography}
+% \item Added \pkg{cite}, \pkg{natbib}, \pkg{backref}.
+% (Also works as-is with \pkg{biblatex}.)
+% \item Fix: Empty lines between \env{tabular} rows.\margintag{misc. fixes}
+% \item Fix: ``Improper \cs{prevdepth}'' with minipages, lists.
+% \item Fix: Incorrect \SVG\ math and |lateximage|s with \pkg{subfig}.
+% \item Fix: Lateximages from incorrect pages with Mathjax.
+% \item Fix: Missing sidetoc if using \pkg{listings}.
+% \item Fix: Added an \pkg{array} emulation package.
+% \item Added
+% \pkg{subfigure}, \pkg{prettyref}, \margintag{packages}
+% \pkg{hanging}, \pkg{midpage},
+% \pkg{flafter}, \pkg{fltrace}, \pkg{changebar}, \pkg{endfloat},
+% \pkg{continue}, \pkg{fwlw}, \pkg{turnthepage}, \pkg{footnpag},
+% \pkg{pagesel}, \pkg{textfit}, \pkg{titleref}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.44:] \
% \begin{itemize}
% \item Added \pkg{koma-script} classes (except \pkg{scrlttr2}, \pkg{scrjura}).
@@ -2035,6 +2208,7 @@ This boolean may be tested by the user for later use.
% \item Added \pkg{preview}, \pkg{atbegshi}, \pkg{watermark}.
% \item Improved \pkg{tocloft} \cs{newlistof} and \cs{newlistentry}.
% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.43:] \
% \begin{itemize}
% \item Docs: Reorganized \HTML\ customization, added an \HTML\ settings table.
@@ -2063,7 +2237,8 @@ This boolean may be tested by the user for later use.
% \needspace{2\baselineskip}
% \item[v0.42:] \
% \begin{itemize}
-% \item Added \TeX\ development support page.\margintag{Support \TeX!}
+% \item Added \TeX\ development support page,
+% \nameref{sec:supportinglatex}.\margintag{Support \TeX!}
% \item Improved assitance for word-processor conversions when
% \margintag{word-processor conversion}
% boolean |FormatWP| is set |true|.
@@ -2601,11 +2776,13 @@ This boolean may be tested by the user for later use.
% \clearpage
%
% \section{Introduction}
+% \label{sec:introduction}
% \changes{v0.19}{2016/05/25}{Introduction: MathJax support mentioned.}
%
% The \pkg{lwarp} project aims to allow a rich \LaTeX{} document
-% to be converted to a reasonable \HTML\
-% interpretation. No attempt has been made to force \LaTeX{} to provide for every
+% to be converted to a reasonable \HTMLfive\
+% interpretation, with only minor intervention on the user's part.
+% No attempt has been made to force \LaTeX{} to provide for every
% \HTML-related possibility, and \HTML\ cannot exactly render every possible \LaTeX{} concept.
% Where compromise is necessary, it is desirable to allow the print output to remain
% typographically rich, and compromise only in the \HTML\ conversion.
@@ -2613,21 +2790,58 @@ This boolean may be tested by the user for later use.
% Several ``modern'' features of \HTMLfive, \CSSthree, and \SVG\
% are employed to allow a fairly feature-rich document
% without relying on the use of Javascript.
-% Limited testing on older browsers show that these new features
-% degrade gracefully, although the \SVG\ format
-% for math may not be available on small cell phones.
+% Limited testing on older browsers shows that these new features
+% degrade gracefully.
+%
+% \rulebreak
+%
+% \pkg{lwarp} is a native \LaTeX\ package, and operates by either patching or
+% emulating various functions. Source-level compatibility is a major goal, but
+% occasional user intervention is required in certain cases.
+%
+% As a package running directly in \LaTeX, \pkg{lwarp} has some advantages over
+% other methods of \HTML\ conversion. A deeper level of \TeX\ understanding is
+% of course possible, as \TeX\ itself is still in use.
+% Lua expressions are still available with \LuaTeX.
+% Entire categories of
+% \LaTeX\ packages work as-is when used with \pkg{lwarp}: definitions, file handling,
+% utilities, internal data structures and calculations,
+% and anything generating plain-text output.
+% Blocks of \PDF\ output may be automatically converted to \SVG\ images
+% while using the same font and spacing as the original print document,
+% directly supporting \tikz\ and \env{picture},
+% Numerous packages are easily adapted for \HTML\ versions, either
+% by loading and patching the originals, or by creating nullified or emulated
+% replacements, and all without resorting to external programming.
+% As a result, several hundred packages have already been adapted (\cref{tab:supported}), and
+% an uncounted number more work as-is.
+%
+% Packages have been selected according to several criteria: importance,
+% popularity lists, recent CTAN updates, CTAN topics, mention in other packages, support by other
+% \HTML\ conversion methods,
+% and from sample documents taken from public archives\footnote{An amazing number of
+% decades-old packages are still in modern use.}.
+%
+% \rulebreak
+%
+% Assistance is also provide for modifying the \HTML\ output to suit the creation
+% of \EPUB\ documents, and for modifying the \HTML\ output to ease import into
+% a word processor.
%
-% |pdflatex|, |xelatex|, or |lualatex| is used, allowing \pkg{lwarp} to process the usual image formats.
-% While generating \HTML\ output, \SVG\ files are used in placed of \PDF.
+% \rulebreak
+%
+% |pdflatex|, |xelatex|, or |lualatex| may be used,
+% allowing \pkg{lwarp} to process the usual image formats.
+% While generating \HTML\ output, \SVG\ files are used in place of \PDF.
% Other formats such as \JPG\ are used as-is.
%
-% \SVG\ images may be used for math,
-% and are also used for \env{picture}, and \tikz{} environments,
-% as this format has
-% better browser and e-book support than \MathML\ (as of this writing),
-% while still allowing for the high-quality display and printing of images (again, subject to potentially
-% bug-ridden\footnote{Firefox has had an on-again/off-again bug for quite some time regareding
-% printing \SVG{}s at high resolution.} browser
+% SVG images may be used for math,
+% and are also used for \env{picture}, and \tikz{} environments.
+% This format has better browser and e-book support than \MathML\ (as of this writing),
+% while still allowing for high-quality display and printing of images
+% (again, subject to potentially
+% bug-ridden\footnote{Firefox has had an on-again/off-again bug
+% for quite some time regareding printing \SVG{}s at high resolution.} browser
% support).
%
% Furthermore, \SVG\ images allow math to be presented with
@@ -2643,14 +2857,15 @@ This boolean may be tested by the user for later use.
% for math display instead of using \SVG\ images.
% Subject to browser support and Internet access,
% MathJax allows an \HTML\ page to display
-% math without relying on a large number of external image files,
-% one per math expression. \pkg{lwarp} maintains \LaTeX\ control for cross-referencing
-% and equation numbering\,/\,formatting.
+% math without relying on a large number of external image files.\footnote{One \SVG\ image
+% file per math expression. A commmon scientific paper can easily run into several thousand
+% files, depending on how often something like \$x\$ is used.
+% In testing one sample document it appears that hashing would only reduce the number in half.}
+% \pkg{lwarp} maintains \LaTeX\ control for cross-referencing
+% and equation numbering, and attempts to force MathJax to tag equations accordingly.
%
-% \hfill\rule[.7ex]{.3\linewidth}{.4pt}\hspace*{\fill}
+% \rulebreak
%
-% The \pkg{lwarp} package allows \LaTeX{} to directly generate \HTMLfive\ tags from a \LaTeX{}
-% source document, with only minor intervention on the user's part.
% A |texlua| program called |lwarpmk| is used to process either the print or \HTML\
% version of the document. A few external utility programs are used to finish
% the conversion from a \LaTeX{}-generated \PDF\ file which happens to have \HTMLfive\ tags,
@@ -2666,41 +2881,31 @@ This boolean may be tested by the user for later use.
%
% When requesting packages during \HTML\ conversion,
% |lwarp| first looks to see if it has its own modified version
-% to use instead of the usual \LaTeX\ version. These |lwarp-packagename.sty| files contain
+% to use instead of the standard \LaTeX\ version.
+% These |lwarp-packagename.sty| files contain
% code used to emulate or replace functions for \HTML\ output.
%
-% Enough functionality is provided to convert a typical article containing technical content.
-% Not every package has been tested, but many of the most useful ones are known to work,
-% either as-is or through emulation with replacement code. (See \cref{tab:supported}.)
-%
-% Assistance is provide for modifying the \HTML\ output to suite the creation
-% of \EPUB\ documents, and for modifying the \HTML\ output to ease import into
-% a word processor.
%
+% \clearpage
%
% \subsection{Supported packages and features}
%
% \changes{v0.15}{2016/04/05}{Docs: Moved the supported functions table to the introduction.}
% \changes{v0.38}{2017/08/22}{Docs: Enhanced \protect\textit{Supported Functions} table.}
%
-% Supported classes include \pkg{book}, \pkg{report}, and \pkg{article},
-% and the Koma-script classes \pkg{scrbook}, \pkg{scrreprt}, and \pkg{scrartcl}.
-% \pkg{memoir} is planned, but in the meantime many of the packages
-% used by \pkg{memoir} are already supported.
-%
-%
% \Cref{tab:supported} lists some of the various \LaTeX{} features which may be used.
-% \emph{Supported} means that the package or macro may be used as-is,
-% perhaps with minor limitations.
-% \emph{Emulated} means that the original package or macro is not used, but similar
-% functionality is provided in a way which is intended to be compatible with the
-% user's \LaTeX{} code.
+%
+% \vspace{0.5in}
%
% \renewcommand{\arraystretch}{1.5}
%
+% \begingroup
+% \setlength{\parindent}{0em}
+% \setlength{\parskip}{2ex}
+%
% \begin{longtable}{>{\raggedright}m{.3\linewidth}m{.6\linewidth}}
% \caption{\protect\LaTeX--HTML generation ---
-% \protect\pkg{lwarp} package ---
+% \pkg{lwarp} package ---
% Supported functions\label{tab:supported}} \endfirsthead
% \warpprintonly{\multicolumn{2}{c}{\pkg{lwarp} Supported Functions --- continued} \\
% Category & Status \\ \toprule \endhead}
@@ -2716,11 +2921,13 @@ This boolean may be tested by the user for later use.
% \midrule
%
% Classes: & \pkg{book}, \pkg{report}, \pkg{article},
-% \pkg{scrbook}, \pkg{scrreprt}, \pkg{scrartcl}. \pkg{memoir} is planned. \\
+% \pkg{scrbook}, \pkg{scrreprt}, \pkg{scrartcl}, \pkg{memoir}. \\
%
% Koma-script: & \pkg{scrextend}, \pkg{scrlayer}, \pkg{scrhack}.
% Others as listed below. \\
%
+% Memoir: & \pkg{memhfixc} \\
+%
% \midrule
%
% Page layout: & Emulates \pkg{geometry}, \pkg{fancyhdr}, \pkg{titleps},
@@ -2729,7 +2936,8 @@ This boolean may be tested by the user for later use.
% \pkg{textarea}, \pkg{zwpagelayout}, \pkg{ebook},
% \pkg{preview},
% \pkg{draftwatermark}, \pkg{watermark},
-% \pkg{everyshi}, \pkg{atbegshi}. \\
+% \pkg{everyshi}, \pkg{atbegshi}, \pkg{continue}, \pkg{fwlw}, \pkg{turnthepage},
+% \pkg{pagesel}. \\
%
% Sectioning: & Supported, with hyperlinks.
% Adds \cmds{FileDepth} for splitting the \HTML\ output.
@@ -2744,19 +2952,19 @@ This boolean may be tested by the user for later use.
%
% Title page: & \cs{maketitle}, \env{titlepage}, \pkg{titling}, \pkg{authblk}. \\
%
-% Front \&\ back matter: & \pkg{abstract}, \pkg{appendix} \\
+% Front \&\ back matter: & \pkg{abstract}, \pkg{appendix}. \\
%
% Indexing: & \cmds{texindy} is used, with hyperlinks. \pkg{idxlayout} is emulated. \\
%
% Glossary: & \pkg{glossaries} and \cmds{xindy} are used. \\
%
-% Bibliography: & Supported text-only. \\
+% Bibliography: & \pkg{cite}, \pkg{natbib}, \pkg{biblatex}, \pkg{backref}. \\
%
% \midrule
%
% Cross-references: & Emulated, with hyperlinks.
-% \pkg{hyperref}, \pkg{cleveref}, \pkg{varioref}, \pkg{fancyref},
-% \pkg{url}, \pkg{breakurl}. \\
+% \pkg{hyperref}, \pkg{cleveref}, \pkg{varioref}, \pkg{fancyref}, \pkg{prettyref},
+% \pkg{titleref}, \pkg{url}, \pkg{breakurl}. \\
%
% Languages: & \pkg{babel}. (\pkg{polyglossia} is untested.) \\
%
@@ -2766,7 +2974,7 @@ This boolean may be tested by the user for later use.
%
% Footnotes: & Adds \cmds{FootnoteDepth} to print footnotes at section breaks.
% \pkg{footnote}, \pkg{footmisc},
-% \pkg{marginnote}, \pkg{sidenote}, \pkg{pagenote}, \pkg{endnotes}. \\
+% \pkg{marginnote}, \pkg{sidenote}, \pkg{pagenote}, \pkg{endnotes}, \pkg{footnpag}. \\
%
% \midrule
%
@@ -2788,8 +2996,9 @@ This boolean may be tested by the user for later use.
%
% Floats: & Appear where declared.
% \pkg{float}, \pkg{rotfloat}, \pkg{newfloat}, \pkg{caption} and \pkg{subcaption},
-% \pkg{subfig}, \pkg{capt-of}, \pkg{placeins}, \pkg{trivfloat}, \pkg{floatrow},
-% \pkg{subfloat}, \pkg{keyfloat}, \pkg{wrapfig}, \pkg{cutwin}, \pkg{floatflt}. \\
+% \pkg{subfig}, \pkg{subfigure}, \pkg{capt-of}, \pkg{placeins}, \pkg{trivfloat}, \pkg{floatrow},
+% \pkg{subfloat}, \pkg{keyfloat}, \pkg{wrapfig}, \pkg{cutwin}, \pkg{floatflt},
+% \pkg{flafter}, \pkg{fltrace}, \pkg{endfloat}. \\
%
% \midrule
%
@@ -2836,7 +3045,8 @@ This boolean may be tested by the user for later use.
%
% Quotations: & \pkg{verse}, \pkg{csquotes}, \pkg{epigraph} \\
%
-% Verbatim: & \pkg{verbatim}, \pkg{moreverb}, \pkg{fancyvrb} (except for verbatim footnotes). \\
+% Verbatim: & \pkg{verbatim}, \pkg{moreverb}, \pkg{fancyvrb} (except for verbatim footnotes),
+% \pkg{shortvrb}. \\
%
% Frames: & \pkg{framed}, \pkg{fancybox}, \pkg{mdframed}, \pkg{boxedminipage2e}, \pkg{shadow}. \\
%
@@ -2844,11 +3054,12 @@ This boolean may be tested by the user for later use.
% Converted to up to three columns with an optional heading,
% per browser support. Single-column if unsupported.\\
%
-% \env{fullwidth}: & Emulated. \\
+% Margins: & \pkg{midpage}, \pkg{hanging}, \pkg{fullwidth}. \\
%
% \midrule
%
-% Todo: & \pkg{todo}, \pkg{todonotes}, \pkg{easy-todo}, \pkg{fixmetodonotes}, \pkg{fixme}. \\
+% Todo notes: & \pkg{todo}, \pkg{todonotes}, \pkg{easy-todo},
+% \pkg{fixmetodonotes}, \pkg{fixme}, \pkg{changebar}. \\
%
% \midrule
%
@@ -2856,7 +3067,7 @@ This boolean may be tested by the user for later use.
% \cs{textbf}, etc are supported.
% \cs{bfseries}, etc.\ are not yet supported.
% \pkg{lettrine}, \pkg{ulem}, \pkg{soul}, \pkg{soulutf8}, \pkg{soulpos}, \pkg{cancel},
-% \pkg{relsize}, \pkg{scalefnt},
+% \pkg{relsize}, \pkg{scalefnt}, \pkg{textfit},
% and \pkg{realscripts} are supported. \\
%
% Ordinals: & \pkg{nth}, \pkg{fmtcount}, and \pkg{engord} are supported. \\
@@ -2872,12 +3083,12 @@ This boolean may be tested by the user for later use.
%
% Rules: & \cs{rule} with width, height, raise, text color. \\
%
-% \HTML\ reserved characters: & \cs{\&}, \cs{textless}, and
+% HTML reserved characters: & \cs{\&}, \cs{textless}, and
% \cs{textgreater} are converted to \HTML\ entities. \\
%
% \midrule
%
-% Fonts: & Used as-is. Appear in math expressions or embedded image environments. \\
+% Fonts: & Used as-is. Appear in \SVG\ math expressions or embedded image environments. \\
%
% Symbols: & Native \LaTeX\ diacriticals, \pkg{textcomp}. \\
%
@@ -2891,20 +3102,11 @@ This boolean may be tested by the user for later use.
% \pkg{trace},
% \pkg{xspace}. \\
%
-% \midrule
-%
-% Where: & \\
-%
-% \textbf{Supported:} & The existing \LaTeX{} package is used. \\
-% \textbf{Emulated:} & The \LaTeX{} package is not used, but some/all of its
-% functions are emulated. Null functions, lengths, and counters are provided
-% for source compatibility. \\
-%
% \bottomrule
%
% \end{longtable}
%
-%
+% \endgroup
%
%
%
@@ -2934,6 +3136,7 @@ This boolean may be tested by the user for later use.
%
% \url{http://tug.org/tex4ht/}\DescribeProgram{TeX4ht}\DescribeProgram{htlatex}
%
+% \bigskip\noindent
% This system uses native \LaTeX{} processing to produce a DVI file containing special commands,
% and then uses additional post-processing for the \HTML\ conversion by way of numerous configuration
% files.
@@ -2968,16 +3171,17 @@ This boolean may be tested by the user for later use.
% \item [Glad\TeX:] \url{http://humenda.github.io/GladTeX/} \DescribeProgram{GladTeX}
% \end{description}
%
-% \subsection{AsciiDoc}
+% \subsection{AsciiDoc and Asciidoctor}
%
% AsciiDoc is one of the most capable markup languages, providing enough features to produce
% the typical technical-writing document with cross-references,
% and it writes \LaTeX{} and \HTML.
% \begin{description}
% \item [Asciidoctor:] \url{http://asciidoctor.org/} (More active.)\DescribeProgram{AsciiDoc}
-% \item [AsciiDoc:] \url{http://asciidoc.org/} (The original version.)\DescribeProgram{AsciiDoctor}
+% \item [AsciiDoc:] \url{http://asciidoc.org/} (The original project.)\DescribeProgram{AsciiDoctor}
% \end{description}
%
+% \subsubsection{Asciidoctor-LaTeX}
% The Asciidoctor-LaTeX project is adding additional \LaTeX{}-related features.
% \begin{description}
% \item [Asciidoctor-LateX:] ~ \\
@@ -2988,7 +3192,6 @@ This boolean may be tested by the user for later use.
%
% \subsection{Pandoc}
% \DescribeProgram{Pandoc}
-%
% A markup system which also reads and writes \LaTeX{} and \HTML.
% \begin{description}
% \item [Pandoc:] \url{http://pandoc.org/}
@@ -3013,7 +3216,7 @@ This boolean may be tested by the user for later use.
% \DescribeProgram{InDesign} \DescribeProgram{Flare} \DescribeProgram{Madcap}
% abilities have been advancing in the areas of typesetting, cross-referencing, and \HTML\ generation.
% See Adobe\,\textregistered{} FrameMaker\,\textregistered{},
-% Adobe\,\textregistered{} InDesign\,\textregistered{},
+% Adobe InDesign\,\textregistered{},
% and Madcap Flare\,\texttrademark{}.
%
% \subsection{Comparisons}
@@ -3059,6 +3262,9 @@ This boolean may be tested by the user for later use.
%
% \clearpage
%
+% \setlength{\parindent}{0em}
+% \setlength{\parskip}{2ex}
+%
% \section{Installation}
%
% \Cref{tab:utility} shows the tools which are used for
@@ -3066,10 +3272,13 @@ This boolean may be tested by the user for later use.
% In most cases, these will be available via the
% standard package-installation tools.
%
+% Detailed installation instructions follow.
+%
% \index{utility>programs}
% \index{programs>utility}
%
-% \begin{table}
+% \begin{table}[hbp]
+% \changes{v0.45}{2017/11/30}{Docs: Moved table so doesn't interfere with install docs.}
% \caption{Required software programs\label{tab:utility}}
% \hrule
% \begin{description}
@@ -3140,13 +3349,12 @@ This boolean may be tested by the user for later use.
% This may be provided by your operating-system package manager, and is
% required for some of the Poppler \PDF\ utilities.
%
-% \url{perl.org}, \url{strawberryperl.com}
+% \url{strawberryperl.com} (recommended), \url{perl.org}
%
% \item[Automatically downloaded from the internet as required:] \
% \begin{description}
%
% \item[MathJax:] Optionally used to display math.
-% Automatically loaded from the MathJax website when needed. \\
% From: \url{mathjax.org}
% \DescribeProgram[requirement]{MathJax}
%
@@ -3155,8 +3363,9 @@ This boolean may be tested by the user for later use.
%
% \hrule
% \end{table}
+% \clearpage
%
-% \subsection{Installing the \protect\pkg{lwarp} package}
+% \subsection{Installing the \pkg{lwarp} package}
%
% There are several ways to install \pkg{lwarp}. These are listed here
% with the preferred methods listed first:
@@ -3167,17 +3376,23 @@ This boolean may be tested by the user for later use.
% \item [Pre-installed:] Try entering into a command line:
% \userentry{kpsewhich lwarp.sty}
%
-% If a path to |lwarp.sty| is shown, then \pkg{lwarp} is already installed.
+% If a path to |lwarp.sty| is shown, then \pkg{lwarp} is already installed and
+% you may skip to the next section.
%
-% \item [\TeX\ Live:]If using a \TeX\ Live distribution,
+% \item [\TeX\ Live:] If using a \TeX\ Live distribution,
% try installing via |tlmgr|:
% \userentry{tlmgr install lwarp}
%
-% \item [MiK\TeX:] If using MiK\TeX, try using the package installer to
-% install the package |lwarp|.
-% Also update the package |miktex-misc|, which will install the
-% |lwarpmk| executable.
+% \item [MiK\TeX:] If using MiK\TeX:
+% \begin{enumerate}
+% \item To install \pkg{lwarp} the first time,
+% use the \pkg{MikTeX Package Manager (Admin)}.
+% \item To update \pkg{lwarp}, use \pkg{MikTeX Update (Admin)}.
+% \item Either way, also update the package |miktex-misc|, which will install and
+% update the |lwarpmk| executable.
+% \end{enumerate}
% \changes{v0.26}{2017/03/23}{Docs: Improved MiK\TeX\ install instructions.}
+% \changes{v0.45}{2017/11/30}{Docs: Improved MiK\TeX\ install instructions.}
%
% \item [Operating-system package:] The operating-system package manager may
% already have |lwarp|, perhaps as part of a set of \TeX-related packages.
@@ -3332,7 +3547,7 @@ This boolean may be tested by the user for later use.
% \end{description}
% \end{enumerate}
%
-% \subsubsection{Using a local copy of \protect\pkg{lwarpmk}}
+% \subsubsection{Using a local copy of \pkg{lwarpmk}}
% \label{sec:locallwarpmk}
% It is also possible to use a local version of |lwarpmk|:
% \begin{enumerate}
@@ -3379,20 +3594,22 @@ This boolean may be tested by the user for later use.
% displayed, then that utility is already installed.
% See \cref{tab:utility} on page \pageref{tab:utility}.
%
-% \userentry{luatex --version}
-% \userentry{xindy --version}
-% \userentry{latexmk --version}
-% \userentry{perl --version}
-% \userentry{pdfcrop --version}
+% \userentry{luatex -{}-version}
+% \userentry{xindy -{}-version}
+% \userentry{latexmk -{}-version}
+% \userentry{perl -{}-version}
+% \userentry{pdfcrop -{}-version}
% \userentry{pdftotext -v}
-% \userentry{pdfseparate --version}
+% \userentry{pdfseparate -{}-version}
% \userentry{pdftocairo -v}
+% \changes{v0.45}{2017/11/30}{Docs: Fix for double hyphens.}
%
% \item [To install |xindy|, |latexmk|, and |pdfcrop|:] \
%
-% The \TeX\ utilities |xindy|, |latexmk|, and |pdfcrop| may be provided by
-% your operating system's package manager, and are also provided by
-% the \CTAN\ archive:
+% The \TeX\ utilities |xindy|, |latexmk|, and |pdfcrop| may be installed
+% in TexLive with |tlmgr|, installed by MikTeX, provided by
+% your operating system's package manager, or downloaded from the \CTAN\ archive:
+% \changes{v0.45}{2017/11/30}{Docs: Improved install instructions.}
% \begin{sourcedisplay}
% \url{http://ctan.org/pkg/xindy} \\
% \url{http://ctan.org/pkg/latexmk} \\
@@ -3439,6 +3656,7 @@ This boolean may be tested by the user for later use.
% \item Click "Ok" when done.
% \end{enumerate}
%
+% \needspace{2\baselineskip}
% \item [To install Perl to a Windows machine:] \
% \DescribeProgram[requirement]{perl}\index{Perl}
% \begin{enumerate}
@@ -4108,7 +4326,7 @@ This boolean may be tested by the user for later use.
%
% \clearpage
%
-% \subsection{\protect\pkg{lwarp} package loading and options}
+% \subsection{\pkg{lwarp} package loading and options}
% \label{sec:loading}
% \index{settings>lwarp package options}
%
@@ -4136,7 +4354,7 @@ This boolean may be tested by the user for later use.
%
%
% \pkg{lwarp} supports \pkg{book}, \pkg{report}, and \pkg{article} classes,
-% as well as the equivalent Koma-script classes.
+% as well as the equivalent Koma-script classes and \pkg{memoir}.
%
% Load the \pkg{lwarp} package immediately after the font and UTF-8 setup commands.
% \changes{v0.16}{2016/04/08}{Docs: Moved location of \cs{usepackage\{lwarp\}}.}
@@ -4899,6 +5117,7 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{Textcomp}
%
+% \DescribePackage{textcomp}
% \limitstextcomp
%
%
@@ -4923,8 +5142,10 @@ This boolean may be tested by the user for later use.
% |\item[\href{file\_name.pdf}{text}]|
% \end{sourcedisplay}
%
+%
% \subsubsection{\pkg{relsize} package}
%
+% \DescribePackage{relsize}
% \limitsrelsize
%
%
@@ -5038,11 +5259,13 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{fancybox} package}
%
+% \DescribePackage{fancybox}
% \limitsfancybox
%
%
% \subsubsection{\pkg{mdframed} package}
%
+% \DescribePackage{mdframed}
% \limitsmdframed
%
%
@@ -5079,10 +5302,14 @@ This boolean may be tested by the user for later use.
%
% \changes{v0.22}{2017/03/01}{\pkg{varioref}: Supported.}
%
+% \DescribePackage{cleveref}
+% \DescribePackage{varioref}
% \limitscpageref
%
% \subsubsection{Hyperlinks, \pkg{hyperref}, and \pkg{url}}
%
+% \DescribePackage{hyperref}
+% \DescribePackage{url}
% \limitshyperlinks
%
%
@@ -5140,32 +5367,39 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{abstract} package}
%
+% \DescribePackage{abstract}
% \limitsabstract
%
%
% \subsubsection{\pkg{titling} and \pkg{authblk}}
%
+% \DescribePackage{titling}
+% \DescribePackage{authblk}
% \limitstitlepage
%
%
% \subsubsection{\pkg{tocloft} package}
%
% \DescribeOption[tocloft]{titles}
+% \DescribePackage{tocloft}
% \limitstocloft
%
%
% \subsubsection{\pkg{appendix} package}
%
+% \DescribePackage{appendix}
% \limitsappendix
%
%
% \subsubsection{\pkg{pagenote} package}
%
+% \DescribePackage{pagenote}
% \limitspagenote
%
%
% \subsubsection{\pkg{endnotes} package}
%
+% \DescribePackage{endnotes}
% \limitsendnotes
%
%
@@ -5180,8 +5414,10 @@ This boolean may be tested by the user for later use.
% \label{sec:indextocbibind}
% \index{index>placement and \acro{TOC} options}
%
-% \changes{v0.38}{2017/08/24}{Docs: Index, \protect\pkg{tocbibind}.}
+% \changes{v0.38}{2017/08/24}{Docs: Index, \pkg{tocbibind}.}
%
+% \DescribePackage{makeidx}
+% \DescribePackage{tocbibind}
% \limitsindex
%
% See \cref{sec:index} for \pkg{lwarp}'s core index and glossary code,
@@ -5200,6 +5436,7 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{ntheorem} package}
%
+% \DescribePackage{ntheorem}
% \limitsntheorem
%
%
@@ -5226,28 +5463,45 @@ This boolean may be tested by the user for later use.
% \subsection{Graphics}
% \label{sec:limitsgraphics}
%
+% \DescribePackage{graphics}
+% \DescribePackage{graphicx}
% \limitsgraphics
%
%
% \subsubsection{\pkg{grffile} package}
%
+% \DescribePackage{grffile}
% \limitsgrffile
%
%
% \subsubsection{\pkg{color} package}
%
+% \DescribePackage{color}
% \limitscolor
%
%
% \subsubsection{\pkg{xcolor} package}
%
+% \DescribePackage{xcolor}
% \limitsxcolor
%
+%
+% \subsubsection{\pkg{epstopdf} package}
+%
+% \DescribePackage{epstopdf}
+% \limitsepstopdf
+%
+%
% \subsubsection{\pkg{overpic} package}
%
+% \DescribePackage{overpic}
% \limitsoverpic
%
%
+% \subsection{Tabbing}
+% \limitstabbing
+%
+%
% \subsection{Tabular}
% \label{sec:limitstabular}
% \changes{v0.39}{2017/08/30}{Docs: Reorganized tabular discussion.}
@@ -5256,15 +5510,19 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{longtable} package}
%
+% \DescribePackage{longtable}
% \limitslongtable
%
%
% \subsubsection{\pkg{supertabular} and \pkg{xtab} packages}
%
+% \DescribePackage{supertabular}
+% \DescribePackage{xtab}
% \limitssupertabular
%
% \subsubsection{\pkg{bigdelim} package}
%
+% \DescribePackage{bigdelim}
% \limitsbigdelim
%
%
@@ -5272,11 +5530,16 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{float}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together}
%
+% \DescribePackage{float}
+% \DescribePackage{trivfloat}
+% \DescribePackage{algorithmx}
% \limitscombiningfloats
%
%
% \subsubsection{\pkg{caption} and \pkg{subcaption} packages}
%
+% \DescribePackage{caption}
+% \DescribePackage{subcaption}
% \limitscaption
%
%
@@ -5284,29 +5547,45 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{subfig} package}
%
+% \DescribePackage{subfig}
% \limitssubfig
%
%
% \subsubsection{\pkg{floatrow} package}
%
+% \DescribePackage{floatrow}
% \limitsfloatrow
%
%
% \subsubsection{\pkg{keyfloat} package}
%
+% \DescribePackage{keyfloat}
% \limitskeyfloat
%
%
% \subsection{Koma-Script}
%
+% \DescribeClass{komascript}
% \limitskomascript
%
%
+% \subsection{Memoir}
+% \label{sec:limitsmemoir}
+%
+% \DescribeClass{memoir}
+% \limitsmemoir
+% \index{memoir>options clash}
+% \index{options clash, memoir}
+% \index{warning>Options clash, memoir}
+%
+%
% \subsection{Miscellaneous}
%
%
% \subsubsection{\pkg{verse} and \pkg{memoir}}
%
+% \DescribePackage{verse}
+% \DescribeClass{memoir}
% \limitsverse
%
%
@@ -5329,14 +5608,25 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{todonotes} and \pkg{luatodonotes} packages}
%
+% \DescribePackage{todonotes}
+% \DescribePackage{luatodonotes}
% \limitstodonotes
%
%
% \subsubsection{\pkg{fixme}}
%
+% \DescribePackage{fixme}
% \limitsfixme
%
%
+% \subsubsection{xparse}
+%
+% \changes{v0.45}{2017/12/09}{Docs: \pkg{xparse} warnings.}
+% \DescribePackage{xparse}
+% \limitsxparse
+% \index{xparse>warnings}
+%
+%
% \clearpage
%
% \section{EPUB conversion}
@@ -5785,9 +6075,11 @@ This boolean may be tested by the user for later use.
%
% \clearpage
%
-% \section{Modifying \protect\pkg{lwarp}}
+% \section{Modifying \pkg{lwarp}}
% \pagestyle{pageheadfoot}
%
+% To quickly find a package in |lwarp.dtx|, search for |*packagename|.
+%
% Purely text-based packages probably will work as-is when generating
% \HTML.
%
@@ -5800,7 +6092,7 @@ This boolean may be tested by the user for later use.
% To create a custom \HTML\ block or inline \CSS\ class,
% see \cref{sec:highlevelclasses}.
%
-% \subsection{Creating an \protect\pkg{lwarp} version of a package}
+% \subsection{Creating an \pkg{lwarp} version of a package}
%
% When creating \HTML,
% \pkg{lwarp} redefines the \cs{usepackage} and \cs{RequirePackage}
@@ -5840,10 +6132,10 @@ This boolean may be tested by the user for later use.
% \begin{sourcedisplay}
% \cs{LWR@ProvidesPackagePass}
% \end{sourcedisplay}
-% If |Drop|ped, the original print-version
+% If ``|Drop|''ped, the original print-version
% package is ignored, and only the |lwarp-| version is used.
% Use this where the original print version is useless for \HTML.
-% If |Pass|ed, the original package is loaded first, with the user-supplied options,
+% If ``|Pass|''ed, the original package is loaded first, with the user-supplied options,
% then the |lwarp-| version continues loading as well.
% See \cref{sec:ntheorem} (\nameref{sec:ntheorem})
% for an example of selectively disabling user options for a package.
@@ -5852,7 +6144,7 @@ This boolean may be tested by the user for later use.
% For a case where the original package is usable without changes, there is no
% need to create a |lwarp-| version.
%
-% \subsection{Adding a package to the \pkg{lwarp.dtx} file}
+% \subsubsection{Adding a package to the \pkg{lwarp.dtx} file}
%
% When adding a package to |lwarp.dtx| for permanent inclusing in \pkg{lwarp},
% provide the |lwarp-<packagename>| code in |lwarp.dtx|,
@@ -5864,9 +6156,9 @@ This boolean may be tested by the user for later use.
% an error if \pkg{packagename} is loaded before \pkg{lwarp}.
%
%
-% \subsection{Testing \protect\pkg{lwarp}}
+% \subsection{Testing \pkg{lwarp}}
%
-% \changes{v0.25}{2017/03/22}{Docs: Testing \protect\pkg{lwarp}.}
+% \changes{v0.25}{2017/03/22}{Docs: Testing \pkg{lwarp}.}
%
% When changes have been made, test the print output before testing the
% \HTML. The print output compiles faster, and any errors in the printed
@@ -5959,22 +6251,42 @@ This boolean may be tested by the user for later use.
% that your document's \LaTeX{} code is correct, before attempting
% to generate an \HTML\ version.
%
+% \item [Options clash:] If using \pkg{memoir}, see \cref{sec:limitsmemoir}.
+%
% \item [``Missing \$ inserted.'':] If using a filename or URL in a
% footnote or \cs{item}, escape underscores with \cs{\_}.
+% \index{warning>Missing \$ inserted.}
+% \index{Missing \$ inserted.}
+%
+% \item [``Label(s) may have changed. Rerun to get cross-references right.'':] \
+%
+% This warning may repeat endlessly if a math expression is used in a caption.
+% Simple math expressions such as \$X=1\$ may be replaced with
+% \begin{sourcedisplay}
+% \cs{textit}\{X\}\cs{,}=\cs{,}1
+% \end{sourcedisplay}
+% \index{warning>Label(s) may have changed.}
+% \index{Label(s) may have changed}
%
% \item [``Leaders not followed by proper glue'':] This can be caused by
% a missing |l@<floattype>| or |l@<sectiontype>| definition.
% See \pkg{lwarp}'s definitions for examples.
+% \index{warning>Leaders not followed by proper glue.}
+% \index{Leaders not followed by proper glue.}
%
-% \item [``Improper \cs{prevdepth}'':] Something tried to use
-% \cs{ensuremath} where \pkg{lwarp} then tries to create a \env{lateximage}.
+% \item [``Improper \cs{prevdepth}'':] (Associated with \cs{LWR@orignewpage}.)
+% Something tried to use
+% \cs{ensuremath} where \pkg{lwarp} then tried to create a \env{lateximage}.
% If you can locate what used \cs{ensuremath}, have it temporarily set:
% \begin{sourcedisplay}
% \cs{LetLtxMacro}\cs{@ensuredmath}\cs{LWR@origensuredmath}
% \end{sourcedisplay}
% inside a group first.
+% \index{warning>Improper \cs{prevdepth}.}
+% \index{Improper \cs{prevdepth}.}
% \end{description}
%
+% \needspace{3\baselineskip}
% \item [Missing sections:] ~
% \begin{itemize}
% \item See \cref{sec:filedepth} regarding the
@@ -6290,9 +6602,27 @@ This boolean may be tested by the user for later use.
\fi
% \end{macrocode}
%
-
-
-% \clearpage
+%
+%
+%
+% \section{Miscellaneous tools}
+%
+%
+% \begin{macro}{\LWR@providelength} \marg{\cs{lengthname}}
+% Provides the length if it isn't defined yet.
+%
+% Used to provide source compatibility for lengths which will be ignored,
+% but might or might not be already provided by other packages.
+%
+% \changes{v0.46}{2018/01/23}{Added.}
+% \begin{macrocode}
+\newcommand*\LWR@providelength[1]{%
+ \ifdeflength{#1}{}{\newlength{#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
%
% \section{Early package requirements}
%
@@ -6728,25 +7058,32 @@ This boolean may be tested by the user for later use.
%
%
%
-% \section{Misplaced packages}
+% \section{Package load order}
%
% \changes{v0.21}{2017/02/22}{Add: Errors for misplaced packages.}
% Several packages should only be loaded before \pkg{lwarp}, and
-% others should only be loaded after.
+% most others should only be loaded after.
%
% Packages which should only be loaded before \pkg{lwarp} have their own
% \begin{sourcedisplay}
% |lwarp-<packagename>.sty|
% \end{sourcedisplay}
-% which will trigger an error if they are loaded after
+% which use \cs{LWR@loadbefore} to trigger an error if they are loaded after
% \pkg{lwarp}.
% Examples include \pkg{fontspec}, \pkg{inputenc}, \pkg{fontenc},
% and \pkg{newunicodechar}.
%
+% Most packages should be loaded after \pkg{lwarp}. This is enfoced by
+% a large number of \cs{LWR@loadafter} statements, below.
+%
+% Some packages are emulated by \pkg{memoir}, and so these are tested by
+% \cs{LWR@notmemoirloadafter}, which does not cause an error if \pkg{memoir} is used.
+%
+%
+% \subsection{Tests of package load order}
%
-
% \begin{macro}{\LWR@loadafter} \marg{packagename} \quad
% Error if this package was loaded before \pkg{lwarp}.
%
@@ -6767,6 +7104,19 @@ after lwarp.}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\LWR@notmemoirloadafter} \marg{packagename} \quad
+% Error if not \pkg{memoir} class and this package was loaded before \pkg{lwarp}.
+%
+% \pkg{memoir} emulates many packages, and pretends that they have already been loaded.
+%
+% \changes{v0.45}{2017/12/03}{Added.}
+% \begin{macrocode}
+\@ifclassloaded{memoir}
+{\newcommand*{\LWR@notmemoirloadafter}[1]{}}
+{\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\LWR@loadbefore} \marg{packagename} \quad
% Error if this package is after \pkg{lwarp}.
@@ -6804,22 +7154,23 @@ For a possible alternative, see package(s) #2.}
}
% \end{macrocode}
% \end{macro}
-
-
-
-
+%
+%
+% \subsection{Enforcing package loading after \pkg{lwarp}}
+%
% Packages which should only be loaded after \pkg{lwarp} are tested
% here to trip an error of they have already been loaded.
%
% \changes{v0.25}{2017/03/16}{Fix: Allows XE\LaTeX\ and
% \LuaLaTeX\ to preload graphics and graphicx.}
+% \changes{v0.45}{2017/12/03}{Allows \pkg{memoir}'s preloaded packages.}
%
% The following packages must be loaded after \pkg{lwarp}:
% \begin{macrocode}
\LWR@loadafter{a4}
\LWR@loadafter{a4wide}
\LWR@loadafter{a5comb}
-\LWR@loadafter{abstract}
+\LWR@notmemoirloadafter{abstract}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
\LWR@loadafter{afterpage}
@@ -6829,38 +7180,44 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{amsthm}
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
-\LWR@loadafter{appendix}
+\LWR@notmemoirloadafter{appendix}
\LWR@loadafter{arabicfront}
-\LWR@loadafter{array}
+\LWR@notmemoirloadafter{array}
\LWR@loadafter{atbegshi}
\LWR@loadafter{authblk}
+\LWR@loadafter{backref}
\LWR@loadafter{balance}
\LWR@loadafter{bigdelim}
\LWR@loadafter{bigstrut}
\LWR@loadafter{bookmark}
-\LWR@loadafter{booktabs}
+\LWR@notmemoirloadafter{booktabs}
\LWR@loadafter{boxedminipage}
\LWR@loadafter{boxedminipage2e}
\LWR@loadafter{breakurl}
\LWR@loadafter{cancel}
-\LWR@loadafter{ccaption}
-\LWR@loadafter{changepage}
-\LWR@loadafter{chngpage}
+\LWR@notmemoirloadafter{ccaption}
+\LWR@loadafter{changebar}
+\LWR@notmemoirloadafter{changepage}
+\LWR@notmemoirloadafter{chngpage}
\LWR@loadafter{chappg}
+\LWR@loadafter{cite}
\LWR@loadafter{color}
-\LWR@loadafter{crop}
+\LWR@loadafter{continue}
+\LWR@notmemoirloadafter{crop}
\LWR@loadafter{cuted}
\LWR@loadafter{cutwin}
\LWR@loadafter{dblfnote}
-\LWR@loadafter{dcolumn}
+\LWR@notmemoirloadafter{dcolumn}
\LWR@loadafter{draftwatermark}
\LWR@loadafter{easy-todo}
\LWR@loadafter{ebook}
\LWR@loadafter{ellipsis}
\LWR@loadafter{emptypage}
-\LWR@loadafter{enumerate}
+\LWR@loadafter{endfloat}
+\LWR@loadafter{endnotes}
+\LWR@notmemoirloadafter{enumerate}
\LWR@loadafter{enumitem}
-\LWR@loadafter{epigraph}
+\LWR@notmemoirloadafter{epigraph}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
@@ -6873,24 +7230,33 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{fix2col}
\LWR@loadafter{fixme}
\LWR@loadafter{fixmetodonotes}
+\LWR@loadafter{flafter}
\LWR@loadafter{float}
\LWR@loadafter{floatflt}
\LWR@loadafter{floatpag}
\LWR@loadafter{floatrow}
+\LWR@loadafter{fltrace}
\LWR@loadafter{flushend}
\LWR@loadafter{fncychap}
\LWR@loadafter{fnpos}
% fontenc must be loaded before lwarp
% fontspec must be loaded before lwarp
+\LWR@loadafter{footmisc}
+\LWR@loadafter{footnote}
+\LWR@loadafter{footnotehyper}
+\LWR@loadafter{footnpag}
+\LWR@loadafter{framed}
\LWR@loadafter{ftnright}
\LWR@loadafter{fullpage}
\LWR@loadafter{fullwidth}
+\LWR@loadafter{fwlw}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
% \LWR@loadafter{graphics}% pre-loaded by xunicode
% \LWR@loadafter{graphicx}% pre-loaded by xunicode
\LWR@loadafter{grffile}
\LWR@loadafter{hang}
+\LWR@loadafter{hanging}
\LWR@loadafter{hyperref}
\LWR@loadafter{hyperxmp}
\LWR@loadafter{idxlayout}
@@ -6913,33 +7279,38 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{marginnote}
\LWR@loadafter{mcaption}
\LWR@loadafter{mdframed}
+\LWR@loadafter{memhfixc}
\LWR@loadafter{metalogo}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
-\LWR@loadafter{moreverb}
+\LWR@loadafter{midpage}
+\LWR@notmemoirloadafter{moreverb}
% morewrites must be loaded before lwarp
-\LWR@loadafter{mparhack}
+\LWR@notmemoirloadafter{mparhack}
%\LWR@loadafter{multicol}% loaded by ltxdoc
\LWR@loadafter{multirow}
\LWR@loadafter{nameref}
-\LWR@loadafter{needspace}
+\LWR@loadafter{natbib}
+\LWR@notmemoirloadafter{needspace}
% newclude must be loaded before lwarp
\LWR@loadafter{newtxmath}
% newunicodechar must be loaded before lwarp
-\LWR@loadafter{nextpage}
+\LWR@notmemoirloadafter{nextpage}
\LWR@loadafter{nonumonpart}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
\LWR@loadafter{overpic}
-\LWR@loadafter{pagenote}
+\LWR@notmemoirloadafter{pagenote}
+\LWR@loadafter{pagesel}
\LWR@loadafter{paralist}
-\LWR@loadafter{parskip}
+\LWR@notmemoirloadafter{parskip}
\LWR@loadafter{pdflscape}
\LWR@loadafter{pdfsync}
\LWR@loadafter{pfnote}
\LWR@loadafter{placeins}
\LWR@loadafter{prelim2e}
+\LWR@loadafter{prettyref}
\LWR@loadafter{preview}
\LWR@loadafter{quotchap}
\LWR@loadafter{ragged2e}
@@ -6958,9 +7329,9 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{scrlayer-scrpage}
\LWR@loadafter{section}
\LWR@loadafter{sectsty}
-\LWR@loadafter{setspace}
+\LWR@notmemoirloadafter{setspace}
\LWR@loadafter{shadow}
-\LWR@loadafter{showidx}
+\LWR@notmemoirloadafter{showidx}
\LWR@loadafter{showkeys}
\LWR@loadafter{sidecap}
\LWR@loadafter{sidenotes}
@@ -6970,12 +7341,14 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{soulutf8}
\LWR@loadafter{stabular}
\LWR@loadafter{subfig}
+\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
\LWR@loadafter{tabls}
-\LWR@loadafter{tabularx}
+\LWR@notmemoirloadafter{tabularx}
\LWR@loadafter{tabulary}
\LWR@loadafter{textarea}
% \LWR@loadafter{textcomp}% maybe before lwarp with font packages
+\LWR@loadafter{textfit}
\LWR@loadafter{textpos}
\LWR@loadafter{theorem}
\LWR@loadafter{threeparttable}
@@ -6983,15 +7356,16 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{titleps}
\LWR@loadafter{titlesec}
\LWR@loadafter{titletoc}
-\LWR@loadafter{titling}
+\LWR@notmemoirloadafter{titling}
% \LWR@loadafter{tocbasic}% preloaded by koma-script classes
-\LWR@loadafter{tocbibind}
-\LWR@loadafter{tocloft}
+\LWR@notmemoirloadafter{tocbibind}
+\LWR@notmemoirloadafter{tocloft}
\LWR@loadafter{tocstyle}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
\LWR@loadafter{transparent}
\LWR@loadafter{trivfloat}
+\LWR@loadafter{turnthepage}
% \end{macrocode}
% \changes{v0.44}{2017/11/19}{Adjustment for \pkg{koma-script}.}
% \begin{macrocode}
@@ -6999,7 +7373,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{ulem}
\LWR@loadafter{upref}
\LWR@loadafter{varioref}
-\LWR@loadafter{verse}
+\LWR@notmemoirloadafter{verse}
\LWR@loadafter{wallpaper}
\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
@@ -7355,7 +7729,7 @@ top=1in,bottom=1in,%
% does-morewrites-not-support-filecontents-and-can-i-write-body-of-environment-us/\\
% 312910}}
%
-% \changes{v0.34}{2017/08/02}{\pkg{filecontents}: Required. Patched for \protect\pkg{morewrites}.}
+% \changes{v0.34}{2017/08/02}{\pkg{filecontents}: Required. Patched for \pkg{morewrites}.}
%
% \begin{macrocode}
\RequirePackage{filecontents}
@@ -7414,6 +7788,8 @@ top=1in,bottom=1in,%
% \DescribePackage{refcount}
+%
+% Provides \cs{setcounterref}, \cs{setcounterpageref}, etc.
% \begin{macrocode}
\RequirePackage{refcount}
% \end{macrocode}
@@ -7480,7 +7856,7 @@ top=1in,bottom=1in,%
% so the options |leqno| and |fleqn| are passed beforehand to be
% picked up both here and by \pkg{newtxmath} if it is used.
% \changes{v0.16}{2016/04/11}{Fix: newtxmath compatibility.}
-% \changes{v0.33}{2016/06/21}{\protect\pkg{amsmath}: Removed \protect\texttt{fleqn} option.}
+% \changes{v0.33}{2016/06/21}{\pkg{amsmath}: Removed \protect\texttt{fleqn} option.}
%
% \begin{macrocode}
\PassOptionsToPackage{leqno}{amsmath}
@@ -7551,7 +7927,9 @@ top=1in,bottom=1in,%
% The original name with blanks is in |LWR@strresult| and
% the final name with no blanks goes into |LWR@strresulttwo|.
% \begin{macrocode}
+\LWR@traceinfo{LWR@lookforpackagename with blanks: !\LWR@strresult!}%
\StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]%
+\LWR@traceinfo{LWR@lookforpackagename without blanks: !\LWR@strresulttwo!}%
% \end{macrocode}
% See if the package name was found:
% \begin{macrocode}
@@ -7568,7 +7946,15 @@ top=1in,bottom=1in,%
{\LWR@strresult}%
{lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
}%
-{}% no lwarp-* file
+{
+% \end{macrocode}
+% \changes{v0.46}{2018/01/23}{Fix: Spaces in \cs{usepackage}.}
+% \begin{macrocode}
+ \StrSubstitute%
+ {\LWR@requirepackagenames}%
+ {\LWR@strresult}%
+ {\LWR@strresulttwo}[\LWR@requirepackagenames]%
+}% no lwarp-* file
}% yes filename
}
% \end{macrocode}
@@ -7786,17 +8172,24 @@ top=1in,bottom=1in,%
\newread\LWR@copyinfile % open the file to read from
\newcommand*{\LWR@copyfile}[2]{%
+\LWR@traceinfo{LWR@copyfile: copying #1 to #2}
+
\immediate\openout\LWR@copyoutfile=#2
\openin\LWR@copyinfile=#1
\begingroup\endlinechar=-1
\makeatletter
+
+\LWR@traceinfo{LWR@copyfile: about to loop}
+
\loop\unless\ifeof\LWR@copyinfile
+ \LWR@traceinfo{LWR@copyfile: one line}
\read\LWR@copyinfile to\LWR@fileline % Read one line and store it into \LWR@fileline
% \LWR@fileline\par % print the content into the pdf
% print the content:
\immediate\write\LWR@copyoutfile{\unexpanded\expandafter{\LWR@fileline}}%
\repeat
-\closeout\LWR@copyoutfile
+\immediate\closeout\LWR@copyoutfile
+\LWR@traceinfo{LWR@copyfile: done}
\endgroup
}
% \end{macrocode}
@@ -7873,25 +8266,6 @@ top=1in,bottom=1in,%
% \end{macrocode}
-% \section{Koma-script}
-%
-% Load patches to \pkg{koma-script}.
-%
-% \codehtml
-% \begin{macrocode}
-\begin{warpHTML}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\end{warpHTML}
-% \end{macrocode}
-
% \section{HTML-conversion output modifications}
%
@@ -8035,7 +8409,7 @@ top=1in,bottom=1in,%
\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
\renewcommand*{\LWR@tagparagraph}{h6}
\renewcommand*{\LWR@tagparagraphend}{/h6}
-\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\renewcommand*{\LWR@tagsubparagraphend}{/span}
}% WPTitleHeading
{% not WPTitleHeading, part and section starting at h1
@@ -8072,7 +8446,7 @@ top=1in,bottom=1in,%
\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
\renewcommand*{\LWR@tagparagraph}{h6}
\renewcommand*{\LWR@tagparagraphend}{/h6}
-\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\renewcommand*{\LWR@tagsubparagraphend}{/span}
}% not WPTitleHeading
}% chapter defined
@@ -8141,7 +8515,7 @@ top=1in,bottom=1in,%
\let\LWR@origpagestyle\pagestyle
\let\LWR@origthispagestyle\thispagestyle
-\let\LWR@origpagenumbering\pagenumbering
+\LetLtxMacro\LWR@origpagenumbering\pagenumbering
\LetLtxMacro{\LWR@origminipage}{\minipage}
\let\LWR@origendminipage\endminipage
@@ -8412,7 +8786,7 @@ homehtmlfilename = "\HomeHTMLFilename"%
\begin{filecontents*}{lwarp.css}
/*
CSS stylesheet for the LaTeX lwarp package
- Copyright 2016-2017 Brian Dunn — BD Tech Concepts LLC
+ Copyright 2016-2018 Brian Dunn — BD Tech Concepts LLC
*/
@@ -8459,6 +8833,7 @@ body {
}
p {margin: 1.5ex 0em 1.5ex 0em ;}
+table p {margin: .5ex 0em .5ex 0em ;}
/* Holds a section number to add space between it and the name */
span.sectionnumber { margin-right: 0em }
@@ -8842,7 +9217,7 @@ ol {
}
ul, body dir, body menu {
- margin: 1ex 1em 1ex 0em;
+ margin: 3ex 1em 3ex 0em;
line-height: 1.2;
}
@@ -9042,7 +9417,8 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
.mdframedtitle {
padding: .5em ;
display: block ;
- font-size: 130%
+ font-size: 130% ;
+ margin-bottom: 1ex ;
}
.mdframedsubtitle {
@@ -9072,6 +9448,12 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
display: block ;
}
+.shaded {
+ margin: 3ex 0em 3ex 0em ;
+ padding: .3ex 1em .3ex 1em ;
+ display: block ;
+}
+
.snugframed {
margin: 3ex 0em 3ex 0em ;
border: 1px solid black;
@@ -10279,7 +10661,17 @@ nav.botnavigation {
(require "texindy.xdy")
(require "page-ranges.xdy")
(require "book-order.xdy")
+(require "page-ranges.xdy")
(markup-locref :open "\hyperindexref{" :close "}")
+(define-location-class "arabic-page-numbers"
+ ("arabic-numbers") :min-range-length 1)
+(define-location-class-order ("roman-page-numbers"
+ "arabic-page-numbers"
+ "alpha-page-numbers"
+ "Roman-page-numbers"
+ "Alpha-page-numbers"
+ "see"
+ "seealso"))
\end{filecontents*}
% \end{Verbatim}% for syntax highlighting
\end{warpprint}
@@ -10300,6 +10692,8 @@ nav.botnavigation {
% \changes{v0.30}{2017/04/26}{Fix: \protect\texttt{lwarp\_mathjax.txt}: Only written in print mode.}
% \changes{v0.34}{2017/07/27}{File: \protect\texttt{lwarp\_mathjax.txt}: Version change.}
% \changes{v0.42}{2017/10/16}{File: \protect\texttt{lwarp\_mathjax.txt}: Updated \pkg{siunitx} script.}
+% \changes{v0.45}{2017/12/21}{File: \protect\texttt{lwarp\_mathjax.txt}: Allow MathJax inside \env{tabbing}.}
+% \changes{v0.45}{2018/01/23}{File: \protect\texttt{lwarp\_mathjax.txt}: Allow MathJax inside \env{verse}.}
%
%
% \begin{macrocode}
@@ -10372,7 +10766,10 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
MathJax.Hub.Config({
extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
jax: ["input/TeX","output/HTML-CSS"],
- tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
+ tex2jax: {
+ inlineMath: [["$","$"],["\\(","\\)"]] ,
+ processClass: "tabbing|verse"
+ },
TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
});
MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
@@ -10436,11 +10833,11 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
\begin{filecontents*}{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2017 Brian Dunn
+-- Copyright 2016-2018 Brian Dunn
-- Print the usage of the lwarpmk command:
-printversion = "v0.44"
+printversion = "v0.46"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -11096,65 +11493,68 @@ end -- not --version
% \begin{macro}{\pushclose} \marg{action} \marg{depth}
% Pushes one return action and its \LaTeX\ depth onto the stacks.
+% \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.}
% \begin{macrocode}
\NewDocumentCommand{\pushclose}{m m}
{
-\let\LWR@closetwelve\LWR@closeeleven
-\let\LWR@closeeleven\LWR@closeten
-\let\LWR@closeten\LWR@closenine
-\let\LWR@closenine\LWR@closeeight
-\let\LWR@closeeight\LWR@closeseven
-\let\LWR@closeseven\LWR@closesix
-\let\LWR@closesix\LWR@closefive
-\let\LWR@closefive\LWR@closefour
-\let\LWR@closefour\LWR@closethree
-\let\LWR@closethree\LWR@closetwo
-\let\LWR@closetwo\LWR@closeone
-\let\LWR@closeone#1
-\let\LWR@closedepthtwelve\LWR@closedeptheleven
-\let\LWR@closedepthelevel\LWR@closedepthten
-\let\LWR@closedepthten\LWR@closedepthnine
-\let\LWR@closedepthnine\LWR@closedeptheight
-\let\LWR@closedeptheight\LWR@closedepthseven
-\let\LWR@closedepthseven\LWR@closedepthsix
-\let\LWR@closedepthsix\LWR@closedepthfive
-\let\LWR@closedepthfive\LWR@closedepthfour
-\let\LWR@closedepthfour\LWR@closedepththree
-\let\LWR@closedepththree\LWR@closedepthtwo
-\let\LWR@closedepthtwo\LWR@closedepthone
-\let\LWR@closedepthone#2
+\global\let\LWR@closetwelve\LWR@closeeleven
+\global\let\LWR@closeeleven\LWR@closeten
+\global\let\LWR@closeten\LWR@closenine
+\global\let\LWR@closenine\LWR@closeeight
+\global\let\LWR@closeeight\LWR@closeseven
+\global\let\LWR@closeseven\LWR@closesix
+\global\let\LWR@closesix\LWR@closefive
+\global\let\LWR@closefive\LWR@closefour
+\global\let\LWR@closefour\LWR@closethree
+\global\let\LWR@closethree\LWR@closetwo
+\global\let\LWR@closetwo\LWR@closeone
+\global\let\LWR@closeone#1
+\global\let\LWR@closedepthtwelve\LWR@closedeptheleven
+\global\let\LWR@closedeptheleven\LWR@closedepthten
+\global\let\LWR@closedepthten\LWR@closedepthnine
+\global\let\LWR@closedepthnine\LWR@closedeptheight
+\global\let\LWR@closedeptheight\LWR@closedepthseven
+\global\let\LWR@closedepthseven\LWR@closedepthsix
+\global\let\LWR@closedepthsix\LWR@closedepthfive
+\global\let\LWR@closedepthfive\LWR@closedepthfour
+\global\let\LWR@closedepthfour\LWR@closedepththree
+\global\let\LWR@closedepththree\LWR@closedepthtwo
+\global\let\LWR@closedepthtwo\LWR@closedepthone
+\global\let\LWR@closedepthone#2
}
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\popclose}
% Pops one action and its depth off the stacks.
+% \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.}
% \begin{macrocode}
\newcommand*{\popclose}
{
-\let\LWR@closeone\LWR@closetwo
-\let\LWR@closetwo\LWR@closethree
-\let\LWR@closethree\LWR@closefour
-\let\LWR@closefour\LWR@closefive
-\let\LWR@closefive\LWR@closesix
-\let\LWR@closesix\LWR@closeseven
-\let\LWR@closeseven\LWR@closeeight
-\let\LWR@closeeight\LWR@closenine
-\let\LWR@closenine\LWR@closeten
-\let\LWR@closeten\LWR@closeeleven
-\let\LWR@closeeleven\LWR@closetwelve
-\let\LWR@closedepthone\LWR@closedepthtwo
-\let\LWR@closedepthtwo\LWR@closedepththree
-\let\LWR@closedepththree\LWR@closedepthfour
-\let\LWR@closedepthfour\LWR@closedepthfive
-\let\LWR@closedepthfive\LWR@closedepthsix
-\let\LWR@closedepthsix\LWR@closedepthseven
-\let\LWR@closedepthseven\LWR@closedeptheight
-\let\LWR@closedeptheight\LWR@closedepthnine
-\let\LWR@closedepthnine\LWR@closedepthten
-\let\LWR@closedepthten\LWR@closedeptheleven
-\let\LWR@closedeptheleven\LWR@closedepthtwelve
+\global\let\LWR@closeone\LWR@closetwo
+\global\let\LWR@closetwo\LWR@closethree
+\global\let\LWR@closethree\LWR@closefour
+\global\let\LWR@closefour\LWR@closefive
+\global\let\LWR@closefive\LWR@closesix
+\global\let\LWR@closesix\LWR@closeseven
+\global\let\LWR@closeseven\LWR@closeeight
+\global\let\LWR@closeeight\LWR@closenine
+\global\let\LWR@closenine\LWR@closeten
+\global\let\LWR@closeten\LWR@closeeleven
+\global\let\LWR@closeeleven\LWR@closetwelve
+\global\let\LWR@closedepthone\LWR@closedepthtwo
+\global\let\LWR@closedepthtwo\LWR@closedepththree
+\global\let\LWR@closedepththree\LWR@closedepthfour
+\global\let\LWR@closedepthfour\LWR@closedepthfive
+\global\let\LWR@closedepthfive\LWR@closedepthsix
+\global\let\LWR@closedepthsix\LWR@closedepthseven
+\global\let\LWR@closedepthseven\LWR@closedeptheight
+\global\let\LWR@closedeptheight\LWR@closedepthnine
+\global\let\LWR@closedepthnine\LWR@closedepthten
+\global\let\LWR@closedepthten\LWR@closedeptheleven
+\global\let\LWR@closedeptheleven\LWR@closedepthtwelve
}
% \end{macrocode}
% \end{macro}
@@ -11209,6 +11609,43 @@ end -- not --version
% \end{macrocode}
+% \section{Sanitizing labels and filenames}
+%
+% Special handling for underscores in labels and filenames.
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macro}{\LWR@sanitized} The sanitized version of what was given
+% to \cs{LWR@sanitize}.
+% Characters are set to their detokenized versions.
+% Required for underscores in labels and filenames.
+% \begin{macrocode}
+\newcommand*{\LWR@sanitized}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@sanitize} \marg{text}
+%
+% Sanitizes the text and returns the result in \cs{LWR@sanitized}.
+% \begin{macrocode}
+\newcommand*{\LWR@sanitize}[1]{%
+\LWR@traceinfo{LWR@sanitize: !#1!}%
+\edef\LWR@sanitized{#1}%
+\LWR@traceinfo{LWR@sanitize expanded: !\LWR@sanitized!}%
+\edef\LWR@sanitized{\detokenize\expandafter{\LWR@sanitized}}%
+\LWR@traceinfo{LWR@sanitize result: !\LWR@sanitized!}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
% \section{HTML entities}
@@ -11217,7 +11654,7 @@ end -- not --version
\begin{warpHTML}
% \end{macrocode}
-% \HTML\ entites and \HTML\ Unicode entities:
+% HTML entites and \HTML\ Unicode entities:
% \begin{macrocode}
\let\LWR@origampersand\&
% \end{macrocode}
@@ -11241,7 +11678,7 @@ end -- not --version
% \DescribeMacro{\&}
% \begin{macrocode}
-\renewcommand*{\&}{\HTMLentity{amp}}
+\renewrobustcmd*{\&}{\HTMLentity{amp}}
% \end{macrocode}
% \begin{macro}{\textless}
@@ -11366,12 +11803,12 @@ end -- not --version
% Prints the filename for a given section: |\HTMLFilename{}filenumber/name.html|
% \begin{macrocode}
\newcommand*{\LWR@htmlsectionfilename}[1]{%
-\LWR@traceinfo{LWR@htmlsectionfilename A}%
+\LWR@traceinfo{LWR@htmlsectionfilename A !\detokenize{#1}!}%
% \end{macrocode}
% Section 0 or empty is given the home filename.
% The filename must be detokenized for underscores.
% \begin{macrocode}
-\LWR@traceinfo{about to assign temp}%
+% \LWR@traceinfo{about to assign temp}%
\edef\LWR@tempone{#1}%
\LWR@traceinfo{about to compare with ??}%
\ifthenelse{\equal{\LWR@tempone}{??}}%
@@ -11417,9 +11854,9 @@ end -- not --version
% Prints the filename for the given label
% \begin{macrocode}
\newcommand*{\LWR@htmlrefsectionfilename}[1]{%
-\LWR@traceinfo{LWR@htmlrefsectionfilename A: !#1!}%
+\LWR@traceinfo{LWR@htmlrefsectionfilename: !\detokenize{#1}!}%
\LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}%
-\LWR@traceinfo{LWR@htmlrefsectionfilename B}%
+\LWR@traceinfo{LWR@htmlrefsectionfilename: done}%
}
% \end{macrocode}
% \end{macro}
@@ -11478,11 +11915,11 @@ end -- not --version
-% \section{\textbackslash{}PrintStack diagnostic tool}
+% \section{\cs{LWRPrintStack} diagnostic tool}
% Diagnostics tool:
% Prints the \LaTeX\ nesting depth values for the stack levels.
-% Must have |\LWR@startpars| active while printing the stack, so |\PrintStack| may
+% |\LWR@startpars| is used before printing the stack, so that |\LWRPrintStack| may
% \watchout
% be called from anywhere in the normal text flow.
@@ -11491,14 +11928,19 @@ end -- not --version
\begin{warpHTML}
% \end{macrocode}
-% \begin{macro}{\PrintStack} Prints the closedepth stack.
+% \begin{macro}{\LWRPrintStack} Prints the closedepth stack.
+% \changes{v0.46}{2018/01/15}{Name changed from \cs{PrintStack}.}
% \begin{macrocode}
-\newcommand*{\PrintStack}{
+\newcommand*{\LWR@subprintstack}{
+\LWR@closedepthone\ \LWR@closedepthtwo\ \LWR@closedepththree\
+\LWR@closedepthfour\ \LWR@closedepthfive\ \LWR@closedepthsix\
+\LWR@closedepthseven\ \LWR@closedeptheight\ \LWR@closedepthnine\
+\LWR@closedepthten\ \LWR@closedeptheleven\ \LWR@closedepthtwelve\
+}
+
+\newcommand*{\LWRPrintStack}{
\LWR@startpars
-\LWR@closedepthone{} \LWR@closedepthtwo{} \LWR@closedepththree{}
-\LWR@closedepthfour{} \LWR@closedepthfive{} \LWR@closedepthsix{}
-\LWR@closedepthseven{} \LWR@closedeptheight{} \LWR@closedepthnine{}
-\LWR@closedepthten{} \LWR@closedeptheleven{} \LWR@closedepthtwelve{}
+\LWR@subprintstack
}
% \end{macrocode}
% \end{macro}
@@ -11507,6 +11949,21 @@ end -- not --version
\end{warpHTML}
% \end{macrocode}
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\LWRPrintStack}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpprint}
+% \end{macrocode}
+
+
+
% \section{Closing stack levels}
@@ -11530,15 +11987,27 @@ end -- not --version
% Close everything up to the given depth:
% \begin{macrocode}
\newcommand*{\LWR@closeprevious}[1]{
+\LWR@traceinfo{LWR@closeprevious to depth #1, depths are \LWR@subprintstack}%
% \end{macrocode}
% Close any pending paragraph:
% \begin{macrocode}
-\LWR@stoppars
+\LWR@stoppars%
% \end{macrocode}
-% Close anything nested deeper than the desired depth:
+% Close anything nested deeper than the desired depth.
+% First close anything deeper, then at most one of the same level.
+% \changes{v0.46}{2018/01/18}{Fix: Stack unnesting.}
% \begin{macrocode}
-\whileboolexpr{not test{\ifnumcomp{\LWR@closedepthone}{<}{#1}}}%
- {\LWR@closeoneprevious}
+\whileboolexpr{test{\ifnumcomp{\LWR@closedepthone}{>}{#1}}}%
+{%
+ \LWR@traceinfo{LWR@closeprevious: closing out depth \LWR@closedepthone}%
+ \LWR@closeoneprevious%
+}%
+\ifboolexpr{test{\ifnumcomp{\LWR@closedepthone}{=}{#1}}}%
+{%
+ \LWR@traceinfo{LWR@closeprevious: closing out depth \LWR@closedepthone}%
+ \LWR@closeoneprevious%
+}{}%
+\LWR@traceinfo{LWR@closeprevious: done, depths are \LWR@subprintstack}%
}
% \end{macrocode}
% \end{macro}
@@ -11566,9 +12035,12 @@ end -- not --version
% Reduces the chance of an environment overflowing the \HTML\ \PDF\ output page.
%
% \changes{v0.28}{2017/04/13}{Forces new PDF page before major environments.}
+% \changes{v0.46}{2018/01/20}{Fix: Improper \cs{prevdepth}.}
% \begin{macrocode}
\newcommand{\LWR@forcenewpage}{%
+\ifinner\else%
\LWR@stoppars\LWR@orignewpage\LWR@startpars%
+\fi%
}
% \end{macrocode}
%
@@ -11632,9 +12104,9 @@ end -- not --version
%
%
%
-% \begin{macro}{\pagenumbering} \marg{commands}
+% \begin{macro}{\pagenumbering} * \marg{commands}
% \begin{macrocode}
-\renewcommand*{\pagenumbering}[1]{}
+\RenewDocumentCommand{\pagenumbering}{s m}{}
% \end{macrocode}
% \end{macro}
%
@@ -11670,9 +12142,9 @@ end -- not --version
\newcommand*{\LWR@tagsubsectionend}{/h5}
\newcommand*{\LWR@tagsubsubsection}{h6}
\newcommand*{\LWR@tagsubsubsectionend}{/h6}
-\newcommand*{\LWR@tagparagraph}{span class="paragraph"{}}
+\newcommand*{\LWR@tagparagraph}{span class="paragraph"}
\newcommand*{\LWR@tagparagraphend}{/span}
-\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\newcommand*{\LWR@tagsubparagraphend}{/span}
\newcommand*{\LWR@tagregularparagraph}{p}
@@ -11687,6 +12159,7 @@ end -- not --version
% \changes{v0.36}{2017/08/15}{\pkg{babel-french}: Adjustements for French variants,
% load order, footnotes, ellipses.}
% \changes{v0.37}{2017/08/19}{\pkg{babel-french}: Adjustment for load order.}
+% \changes{v0.45}{2017/12/29}{\pkg{babel-french}: Robust commands.}
%
% Adjust \pkg{babel-french} for \HTML\ spaces.
% So far, this only works for |pdflatex| and |xelatex|.
@@ -11706,19 +12179,19 @@ end -- not --version
% \begin{macrocode}
%
\LetLtxMacro\LWR@FBcancel\NoAutoSpacing%
- \renewcommand*{\FBcolonspace}{%
+ \renewrobustcmd*{\FBcolonspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;%
\endgroup%
}%
- \renewcommand*{\FBthinspace}{%
+ \renewrobustcmd*{\FBthinspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand\#x202f;% \,
\endgroup%
}%
- \renewcommand*{\FBguillspace}{%
+ \renewrobustcmd*{\FBguillspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;% ~, for \og xyz \fg{}
@@ -11736,7 +12209,7 @@ end -- not --version
\LWR@origampersand{}nbsp;% ~
\endgroup%
}%
- \renewcommand*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
+ \renewrobustcmd*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
\ifFBunicode%
\else%
\DeclareTextSymbol{\FBtextellipsis}{LY1}{133}%
@@ -11749,7 +12222,6 @@ end -- not --version
% \subsection{HTML tags}
-
% \begin{macro}{\LWR@htmltagc} \marg{tag}
% Break ligatures and use upright apostrophes in \HTML\ tags.
%
@@ -11757,11 +12229,13 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@htmltagc}[1]{%
{%
-% \LWR@traceinfo{LWR@htmltagc \detokenize{#1}}%
+\LWR@traceinfo{LWR@htmltagc !\detokenize{#1}!}%
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\protect\LWR@origtextless#1\protect\LWR@origtextgreater%
+\protect\LWR@origtextless%
+#1%
+\protect\LWR@origtextgreater%
\endgroup%
}%
}
@@ -11793,7 +12267,7 @@ end -- not --version
\newenvironment*{LWR@nestspan}
{%
-\LWR@traceinfo{LWR@nestspan}%
+\LWR@traceinfo{LWR@nestspan starting}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{%
\LWR@traceinfo{LWR@nestspan: inside a lateximage}%
@@ -11810,12 +12284,14 @@ end -- not --version
}%
\renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}%
}% not in a lateximage
+\LWR@traceinfo{LWR@nestspan starting: done}%
}% starting env
{% ending env
+\LWR@traceinfo{LWR@nestspan ending}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{\addtocounter{LWR@spandepth}{-1}}%
-\LWR@traceinfo{LWR@nestspan: done}%
+\LWR@traceinfo{LWR@nestspan ending: done}%
}
\AfterEndEnvironment{LWR@nestspan}{\global\let\par\LWR@closeparagraph}
@@ -11867,14 +12343,10 @@ end -- not --version
% Print an \HTML\ tag: \textless{}tag\textgreater{}
% \begin{macrocode}
-\newcommand*{\LWR@htmltagb}[1]{%
+\newcommand*{\LWR@htmltag}[1]{%
+% \LWR@traceinfo{LWR@htmltagb !\detokenize{#1}!}%
\LWR@htmltagc{#1}%
-\endgroup%
-}
-
-\newcommand*{\LWR@htmltag}{%
-\begingroup\catcode`\_=12
-\LWR@htmltagb%
+% \LWR@traceinfo{LWR@htmltagb: done}%
}
% \end{macrocode}
% \end{macro}
@@ -11925,16 +12397,12 @@ end -- not --version
\LWR@htmlclosecomment{}}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\LWR@htmlblockcomment} \marg{comment}
% \begin{macrocode}
-\newcommand{\LWR@htmlblockcommentb}[1]
-{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars\endgroup}
-
-\newcommand{\LWR@htmlblockcomment}
-{%
-\begingroup\catcode`\_=12
-\LWR@htmlblockcommentb%
-}
+\newcommand{\LWR@htmlblockcomment}[1]
+{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars}
% \end{macrocode}
% \end{macro}
@@ -12095,12 +12563,8 @@ end -- not --version
% \begin{macrocode}
\begin{warpHTML}
\NewDocumentEnvironment{BlockClass}{o m}%
-{
-\LWR@htmldivclass[#1]{#2}
-}
-{
-\LWR@htmldivclassend{#2}
-}
+{\LWR@htmldivclass[#1]{#2}}
+{\LWR@htmldivclassend{#2}}
\end{warpHTML}
% \end{macrocode}
%
@@ -12174,10 +12638,10 @@ end -- not --version
\LWR@stoppars%
\ifbool{FormatWP}%
{%
- \LWR@maybeincthisautoid%
+ \addtocounter{LWR@thisautoidWP}{1}%
\LWR@htmltag{%
div class="#3" %
- id="autoid-\arabic{LWR@thisautoid}"%
+ id="autoidWP-\arabic{LWR@thisautoidWP}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -12342,19 +12806,6 @@ end -- not --version
{% yes nest par tags
\LWR@htmltagc{\LWR@tagregularparagraph}%
% \end{macrocode}
-% Manually indent item list labels to avoid left margin intrustion:
-%
-% See if are nested inside an item list:
-% \begin{macrocode}
- \ifnumcomp{\@listdepth}{>}{0}%
- {%
-% \end{macrocode}
-% If so, leave some horizontal room in the \LaTeX{} \PDF\ output for list labels:
-% \begin{macrocode}
- \LWR@orighspace{1in}%
- }%
- {}%
-% \end{macrocode}
% Now have started a paragraph.
% \begin{macrocode}
\global\booltrue{LWR@doingapar}%
@@ -12438,9 +12889,25 @@ end -- not --version
{}%
}% not handling pars
% \end{macrocode}
-% Finish with regular paragraph processing
+% In most cases, finish with a \LaTeX\ \cs{par}, but in the case
+% of paragraphs between lines in a tabular fetch the next token instead:
+% \changes{v0.46}{2018/01/19}{Fix: Tabular empty lines.}
% \begin{macrocode}
-\LWR@origpar%
+\ifboolexpr{%
+ not bool {LWR@doingapar} and
+ test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and
+ test {
+ \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}}
+ } and
+ bool {LWR@intabularmetadata} and
+ not bool {LWR@tableparcell} and
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}}
+}%
+{%
+ \LWR@getmynexttoken%
+}{%
+ \LWR@origpar%
+}%
}
% \end{macrocode}
% \end{macro}
@@ -12473,6 +12940,7 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@startpars}%
{%
+\LWR@traceinfo{LWR@startpars}%
% \end{macrocode}
% Ignore if inside a span:
% \begin{macrocode}
@@ -12493,6 +12961,7 @@ end -- not --version
{%
% \end{macrocode}
% At the start of each paragraph, generate an opening tag:
+% \index{par=\cs{par}>hooks}
% \begin{macrocode}
\PushPreHook{par}{\LWR@openparagraph}%
% \end{macrocode}
@@ -12510,6 +12979,7 @@ end -- not --version
% \begin{macrocode}
\global\boolfalse{LWR@doingapar}%
}% nestspan
+\LWR@traceinfo{LWR@startpars: done}%
}
% \end{macrocode}
% \end{macro}
@@ -12603,31 +13073,21 @@ end -- not --version
\newcommand{\LWR@firstpagetop}{} % for the home page alone
\newcommand{\LWR@pagetop}{} % for all other pages
\newcommand{\LWR@pagebottom}{}
-
-\newcommand{\LWR@setfirstpagetopb}[1]{%
-\renewcommand{\LWR@firstpagetop}{#1}
-\catcode`\_=8
-}
% \end{macrocode}
+%
+%
% \begin{macro}{\HTMLFirstPageTop} \marg{text and logos}
%
% \changes{v0.30}{2017/04/28}{Renamed from \cs{SetFirstPageTop}.}
%
% \begin{macrocode}
-\newcommand{\HTMLFirstPageTop}{%
-\catcode`\_=12
-\LWR@setfirstpagetopb
+\newcommand{\HTMLFirstPageTop}[1]{%
+ \renewcommand{\LWR@firstpagetop}{#1}%
}
% \end{macrocode}
%
%
% \end{macro}
-% \begin{macrocode}
-\newcommand{\LWR@setpagetopb}[1]{%
-\renewcommand{\LWR@pagetop}{#1}
-\catcode`\_=8
-}
-% \end{macrocode}
%
%
% \begin{macro}{\HTMLPageTop} \marg{text and logos}
@@ -12635,30 +13095,20 @@ end -- not --version
% \changes{v0.30}{2017/04/28}{Renamed from \cs{SetPageTop}.}
%
% \begin{macrocode}
-\newcommand{\HTMLPageTop}{%
-\catcode`\_=12
-\LWR@setpagetopb
+\newcommand{\HTMLPageTop}[1]{%
+ \renewcommand{\LWR@pagetop}{#1}%
}
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macrocode}
-\newcommand{\LWR@setpagebottomb}[1]{%
-\renewcommand{\LWR@pagebottom}{#1}
-\catcode`\_=8
-}
-% \end{macrocode}
-%
-%
% \begin{macro}{\HTMLPageBottom} \marg{text and logos}
%
% \changes{v0.30}{2017/04/28}{Renamed from \cs{SetPageBottom}.}
%
% \begin{macrocode}
-\newcommand{\HTMLPageBottom}{%
-\catcode`\_=12
-\LWR@setpagebottomb
+\newcommand{\HTMLPageBottom}[1]{%
+ \renewcommand{\LWR@pagebottom}{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -12690,17 +13140,14 @@ end -- not --version
% Assigns the \CSS\ file to be used by the following \HTML\ pages.
%
% \changes{v0.30}{2017/04/28}{Renamed from \cs{NewCSS}.}
+% \changes{v0.45}{2017/12/29}{Improved filenames with underscores.}
%
% \begin{macrocode}
-\newcommand*{\LWR@newcssb}[1]{%
-\renewcommand*{\LWR@currentcss}{#1}
-\catcode`\_=8
+\newcommand*{\CSSFilename}[1]{%
+\renewcommand*{\LWR@currentcss}{#1}%
+\@onelevel@sanitize\LWR@currentcss%
}
-\newcommand*{\CSSFilename}{
-\catcode`\_=12
-\LWR@newcssb
-}
\end{warpHTML}
% \end{macrocode}
%
@@ -12886,7 +13333,10 @@ end -- not --version
% \end{macrocode}
-% Patch \LaTeX\ footnotes to use a new \cs{box} for \pkg{lwarp} footnotes.
+% Patch \LaTeX\ footnotes to use a new \cs{box} instead of an insert
+% for \pkg{lwarp} footnotes.
+% This avoids having the original \cs{footins} appear
+% at the bottom of a \env{lateximage}, which is on its own new page.
% \begin{macrocode}
\newbox\LWR@footnotes
% \end{macrocode}
@@ -12895,7 +13345,7 @@ end -- not --version
%
% \begin{macro}{\@makefntext} \marg{text}
% \begin{macrocode}
-\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1}
+\long\def\@makefntext#1{\textsuperscript{\@thefnmark}~#1}
% \end{macrocode}
% \end{macro}
%
@@ -12991,11 +13441,19 @@ end -- not --version
% \subsection{Minipage footnote implementation}
% \label{sec:footnotesminipage}
%
+% Patch \LaTeX\ minipage footnotes to use a new \cs{box} instead of an insert
+% for \pkg{lwarp} minipage footnotes.
+% This avoids having the original \cs{@mpfootins} appear
+% at the bottom of a \env{lateximage}, which is on its own new page.
+% \begin{macrocode}
+\newbox\LWR@mpfootnotes
+% \end{macrocode}
+%
% \begin{macro}{\@mpfootnotetext} \marg{text}
% \begin{macrocode}
\long\def\@mpfootnotetext#1{%
-\global\setbox\@mpfootins\vbox{%
- \unvbox\@mpfootins
+\global\setbox\LWR@mpfootnotes\vbox{%
+ \unvbox\LWR@mpfootnotes
\reset@font\footnotesize
\hsize\columnwidth
\@parboxrestore
@@ -13067,6 +13525,25 @@ end -- not --version
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\LWR@printpendingmpfootnotes}
+% Enclose the minipage footnotes in a class, print, then clear.
+% \changes{v0.45}{2018/01/10}{Added.}
+% \begin{macrocode}
+\newcommand*{\LWR@printpendingmpfootnotes}{%
+\ifvoid\LWR@mpfootnotes\else
+ \LWR@forcenewpage
+ \begin{BlockClass}{footnotes}
+ \LWR@origvspace*{\baselineskip}
+ \unvbox\LWR@mpfootnotes
+ \setbox\LWR@mpfootnotes=\vbox{}
+ \end{BlockClass}
+\fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
@@ -13132,7 +13609,23 @@ end -- not --version
% \end{macrocode}
% \end{macro}
%
-
+%
+% \begin{macro}{\reversemarginpar}
+% \changes{v0.45}{2017/12/12}{Added.}
+% \begin{macrocode}
+\renewcommand*{\reversemarginpar}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\normalmarginpar}
+% \changes{v0.45}{2017/12/12}{Added.}
+% \begin{macrocode}
+\renewcommand*{\normalmarginpar}{}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
@@ -13237,14 +13730,16 @@ end -- not --version
% Locally temporarily disable direct-formatting commands,
% not used in filenames:
% \begin{macrocode}
-\LWR@nullfonts
+\LWR@nullfonts%
\renewcommand*{\LWR@htmltagc}[1]{}%
% \end{macrocode}
% Replaces common symbols and short words with hyphens:
%
% \begin{macrocode}
-\edef\LWR@thisnewfilename{#1}
-\fullexpandarg
+\LWR@traceinfo{LWR@filenamenoblanks \#1: !#1!}%
+\edef\LWR@thisnewfilename{#1}%
+\LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}%
+\fullexpandarg%
% \end{macrocode}
% Convert spaces into hyphens:
% \begin{macrocode}
@@ -13271,6 +13766,14 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}%
{\textgreater}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\#}{-}[\LWR@thisnewfilename]
+% \end{macrocode}
+% \changes{v0.45}{2017/12/29}{Fix: Section names with underscores.}
+% \begin{macrocode}
+\StrSubstitute{\LWR@thisnewfilename}{\_}{-}[\LWR@thisnewfilename]
+% \end{macrocode}
+% \changes{v0.45}{2017/12/29}{Fix: Section names with \cs{\ }.}
+% \begin{macrocode}
+\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename]
@@ -13278,6 +13781,7 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}%
{\textbackslash}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{~}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename]
% "~{}" for babel
\StrSubstitute{\LWR@thisnewfilename}{[}{-}[\LWR@thisnewfilename]
@@ -13335,6 +13839,7 @@ end -- not --version
% navigation, side TOC, header, and starts the text body.
% \begin{macrocode}
\newcommand*{\LWR@newhtmlfile}[1]{
+\LWR@traceinfo{LWR@newhtmlfile: !#1!}
% \end{macrocode}
% At the bottom of the ending file:
@@ -13393,6 +13898,7 @@ end -- not --version
% Uses pipe-separated fields for |split_html.gawk|.
% Uses monospaced font with ligatures disabled for everything except the title.
% \begin{macrocode}
+\LWR@traceinfo{LWR@newhtmlfile: about to print start file}%
\LWR@htmlblockcomment{%
|Start file|%
\LWR@htmlsectionfilename{\LWR@thisfilename}|%
@@ -13465,6 +13971,7 @@ end -- not --version
% Track the page numbers:
% \begin{macrocode}
\setcounter{LWR@latestautopage}{\value{page}}
+\LWR@traceinfo{LWR@newhtmlfile: done}
}
% \end{macrocode}
% \end{macro}
@@ -13632,7 +14139,7 @@ end -- not --version
% Create an autosection tag.
% \begin{macrocode}
\newcommand*{\LWR@createautosec}[1]{%
-\LWR@htmltag{#1 id="autosec-\thepage"{}}%
+\LWR@htmltag{#1 id="autosec-\arabic{page}"}%
}
% \end{macrocode}
% \end{macro}
@@ -13647,7 +14154,10 @@ end -- not --version
% |\LWR@stoppars| must be executed first.
% \watchout
% \begin{macrocode}
-\NewDocumentCommand{\LWR@pushoneclose}{m m}{\pushclose{#2}{#1}}
+\NewDocumentCommand{\LWR@pushoneclose}{m m}{%
+\LWR@traceinfo{LWR@pushoneclose #1}%
+ \pushclose{#2}{#1}%
+}
% \end{macrocode}
% \end{macro}
@@ -13755,7 +14265,7 @@ end -- not --version
% Generate a new \LaTeX\ page so that \TOC\ and index page number points to the section:
% \begin{macrocode}
\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}%
-\IfBooleanTF{#1}{\LWR@traceinfo{LWR@section: starred}}{}%
+\IfBooleanT{#1}{\LWR@traceinfo{LWR@section: starred}}%
\ifbool{LWR@forcinghtmlpage}{\LWR@traceinfo{LWR@section: forcinghtmlpage}}{}%
\ifthenelse{%
\(%
@@ -13774,7 +14284,11 @@ end -- not --version
% \end{macrocode}
% \changes{v0.43}{2017/10/31}{Fix: Expansion in comparison.}
% \begin{macrocode}
- \NOT\isempty{#3}% phantomsection
+ \(% phantomsection
+ \NOT\isempty{#3}%
+ \OR%
+ \(\NOT\equal{#1}{\BooleanTrue}\)%
+ \)%
}%
% \end{macrocode}
% If so: start a new \HTML\ file:
@@ -13801,7 +14315,7 @@ end -- not --version
% \end{macrocode}
% Generate a new \LaTeX\ page so that \TOC\ and index page number points to the section:
% \begin{macrocode}
- \LWR@traceinfo{LWR@section: not a new HTML file}%
+ \LWR@traceinfo{LWR@section: not a new HTML file, about to LWR@orignewpage}%
\LWR@orignewpage%
}% not new file
@@ -13836,6 +14350,7 @@ end -- not --version
% \end{macrocode}
% Create the opening tag with an autosec:
% \begin{macrocode}
+\LWR@traceinfo{LWR@section: about to LWR@createautosec}%
\LWR@createautosec{\csuse{LWR@tag#4}}%
% \end{macrocode}
% \changes{v0.43}{2017/11/01}{Fix: Math in section name.}
@@ -13846,6 +14361,7 @@ end -- not --version
% \begin{macrocode}
\IfBooleanTF{#1}%
{%
+\LWR@traceinfo{LWR@section: starred}%
% \end{macrocode}
% Starred, but also forcing a TOC entry, so
% add unnumbered TOC name or regular name:
@@ -13930,15 +14446,18 @@ end -- not --version
% \end{macrocode}
% Print the section name:
% \begin{macrocode}
+\LWR@traceinfo{LWR@section: about to print the section name}%
#3%
% \end{macrocode}
% Close the heading tag, such as /H2:
% \begin{macrocode}
+\LWR@traceinfo{LWR@section: about to close the heading tag}%
\LWR@htmltag{\csuse{LWR@tag#4end}}%
% \end{macrocode}
% Generate a \LaTeX{} label:
% \changes{v0.43}{2017/11/01}{Fix: Math in section name.}
% \begin{macrocode}
+\LWR@traceinfo{LWR@section: about to create the LaTeX label}%
\label{autopage-\theLWR@currentautosec}%
% \end{macrocode}
% Start paragraph handing unless is an inline paragraph or subparagraph:
@@ -14012,11 +14531,12 @@ end -- not --version
% \end{macro}
-% \begin{macro}{\chapter} * \oarg{TOC name} \marg{name}
+% \begin{macro}{\chapter} * \oarg{TOC name} \oarg{heading name} \marg{name}
%
% \changes{v0.28}{2017/04/06}{If \EPUB, prints footnotes before each section.}
% \changes{v0.40}{2017/09/22}{Added support for \pkg{quotchap}.}
% \changes{v0.44}{2017/11/21}{Add preamble for \pkg{koma-script}.}
+% \changes{v0.45}{2017/12/04}{Add optional heading title for \pkg{memoir}.}
% \begin{macrocode}
\let\@printcites\relax% for quotchap package
@@ -14025,14 +14545,18 @@ end -- not --version
\@ifundefined{chapter}
{}
{%
-\DeclareDocumentCommand{\chapter}{s o m}{%
-\LWR@traceinfo{chapter #3}%
+\DeclareDocumentCommand{\chapter}{s o o m}{%
+\IfValueTF{#2}{
+\LWR@traceinfo{chapter #2}%
+}{
+\LWR@traceinfo{chapter #4}%
+}
\LWR@maybeprintpendingfootnotes{\LWR@depthchapter}%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}%
-\LWR@section{#1}{#2}{#3}{chapter}%
+\LWR@section{#1}{#2}{#4}{chapter}%
\@printcites% for quotchap package
@@ -14044,15 +14568,21 @@ end -- not --version
% \end{macro}
-% \begin{macro}{\section} * \oarg{TOC name} \marg{name}
+% \begin{macro}{\section} * \oarg{TOC name} \oarg{heading name} \marg{name}
+% \changes{v0.45}{2017/12/04}{Add optional heading title for \pkg{memoir}.}
% \begin{macrocode}
-\DeclareDocumentCommand{\section}{s o m}{%
+\DeclareDocumentCommand{\section}{s o o m}{%
+\IfValueTF{#2}{
+\LWR@traceinfo{section #2}%
+}{
+\LWR@traceinfo{section #4}%
+}
\LWR@maybeprintpendingfootnotes{\LWR@depthsection}%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}%
-\LWR@section{#1}{#2}{#3}{section}%
+\LWR@section{#1}{#2}{#4}{section}%
}
% \end{macrocode}
% \end{macro}
@@ -14186,7 +14716,7 @@ end -- not --version
% \end{macrocode}
% The language is user-adjustable:
% \begin{macrocode}
-\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"{}}\LWR@orignewline
+\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline
% \end{macrocode}
% Start of the meta data:
% \begin{macrocode}
@@ -14234,7 +14764,7 @@ content="width=device-width, initial-scale=1.0" /}%
% \begin{macrocode}
\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline
\LWR@htmltag{%
-script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}%
+script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}%
\LWR@htmltag{/script}\LWR@orignewline
\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline
% \end{macrocode}
@@ -14330,7 +14860,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Force onecolumn and empty page style:
% \begin{macrocode}
\LWR@origonecolumn%
-\LWR@origpagestyle{empty}
+\LWR@origpagestyle{empty}%
% \end{macrocode}
% Reduce chance of line overflow in verbatim environments:
% \begin{macrocode}
@@ -14415,6 +14945,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
% \end{macrocode}
+% Document and page settings:
+% \changes{v0.45}{2017/12/08}{Fix: Lateximages on incorrect pages with Mathjax.}
+% \begin{macrocode}
+\mainmatter
+\LWR@origpagenumbering{arabic}
+% \end{macrocode}
% Start a new \HTML\ file and a header:
% \begin{macrocode}
\LWR@traceinfo{LWR@lwarpStart: Starting new file.}
@@ -14426,12 +14962,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@stoppars
\LWR@htmltag{/header}\LWR@orignewline
\LWR@traceinfo{LWR@lwarpStart: Generating textbody.}
-\LWR@htmltag{section class="textbody"{}}
-% \end{macrocode}
-% Document and page settings:
-% \begin{macrocode}
-\mainmatter
-\LWR@origpagenumbering{arabic}
+\LWR@htmltag{section class="textbody"}
% \end{macrocode}
%
% Patch the |itemize|, |enumerate|, and |description| environments and \cs{item}.
@@ -14728,11 +15259,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% \begin{environment}{titlepage}
% Sets up a \element{div} of class \attribute{titlepage}.
+% Provided even for \pkg{memoir} class, since it is used by \cs{maketitle}.
%
% \changes{v0.39}{2017/09/02}{Clear pending footnotes.}
% \changes{v0.39}{2017/09/03}{Removed minipages.}
% \begin{macrocode}
-\renewenvironment*{titlepage}
+\DeclareDocumentEnvironment{titlepage}{}
{
\renewrobustcmd{\affiliation}[1]{\\ \InlineClass{affiliation}{##1}}
\LWR@printpendingfootnotes
@@ -14819,7 +15351,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\printauthor}
% \HTML\ version.
%
-% \changes{v0.39}{2017/09/01}{Supports \protect\pkg{authblk} with
+% \changes{v0.39}{2017/09/01}{Supports \pkg{authblk} with
% \element{div}s of class \attribute{oneauthor} instead of tabular.}
% \changes{v0.39}{2017/09/03}{Removed minipages.}
%
@@ -14922,6 +15454,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
%
% \begin{macrocode}
+\@ifclassloaded{memoir}
+{
+\newcommand{\LWR@setfootnoteseries}{%
+ \renewcommand\thefootnote{\@arabic\c@footnote}%
+}
+}{% not memoir
\if@titlepage
\newcommand{\LWR@setfootnoteseries}{%
\renewcommand\thefootnote{\@arabic\c@footnote}%
@@ -14931,6 +15469,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
}
\fi
+}% not memoir
% \end{macrocode}
%
%
@@ -14962,7 +15501,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% Make the footnote mark and some extra horizontal space for the tags:
% \begin{macrocode}
-\textsuperscript{\@thefnmark} \LWR@orighspace{1in}
+\textsuperscript{\@thefnmark}~%
% \end{macrocode}
% \begin{center}
% \begin{minipage}{.7\linewidth}
@@ -15047,7 +15586,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\@maketitle}
% \HTML\ mode. Typesets the title, etc.:
%
-% \changes{v0.39}{2017/09/01}{Supports \protect\pkg{authblk} with
+% \changes{v0.39}{2017/09/01}{Supports \pkg{authblk} with
% \element{div}s of class \attribute{oneauthor} instead of tabular.}
% \changes{v0.39}{2017/09/03}{Removed minipages.}
% \changes{v0.39}{2017/09/04}{Native \protect\LaTeX\ version.}
@@ -15348,7 +15887,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \section{Verbatim and tabbing}
% \changes{v0.34}{2017/07/27}{Verbatim refactored to
-% remove \protect\pkg{fancyvrb} requirement.}
+% remove \pkg{fancyvrb} requirement.}
% \codeall
@@ -15403,7 +15942,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifbool{LWR@verbtags}{%
\LWR@htmltag{pre class="#2"
\ifthenelse{\equal{#1}{}}{}{style="#1"}%
-}% pre
+}\LWR@orignewline% pre
}{}%
% \end{macrocode}
% Use a mono-spaced font to preserve horizontal positioning.
@@ -15433,11 +15972,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\LWR@afterendverbatim} Finishes enclosing a verbatim environment.
% \begin{macrocode}
\newcommand*{\LWR@afterendverbatim}{%
-% \end{macrocode}
-% Remove excess vertical space at the end of the |pre|:
-% \begin{macrocode}
+
\endgroup%
-\unskip%
% \end{macrocode}
% At the end of the environment, close the |pre|:
% \begin{macrocode}
@@ -15480,8 +16016,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\AfterEndPreamble{
\LWR@traceinfo{Patching verbatim.}
\AtBeginEnvironment{verbatim}{%
-\LWR@forcenewpage
-\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@forcenewpage%
+\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
}
\AfterEndEnvironment{verbatim}{%
\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
@@ -15493,6 +16029,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{environment}{tabbing}
%
+% \limitstabbing
+%
% \changes{v0.42}{2017/10/13}{Added.}
%
% \begin{macrocode}
@@ -15544,7 +16082,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand{\@begintheorem}[2]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
-\InlineClass{theoremlabel}{#1\ #2\ }
+\trivlist
+\item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape
}
% \end{macrocode}
% \end{macro}
@@ -15553,13 +16092,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand{\@opargbegintheorem}[3]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
-\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }
+\trivlist
+\item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@endtheorem}
% \begin{macrocode}
\renewcommand*{\@endtheorem}{%
+\endtrivlist
\endBlockClass% theoremcontents
}
% \end{macrocode}
@@ -15618,6 +16159,156 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printopenlist}{ul style="list-style-type:none"}
% \end{macrocode}
+
+% ^^A \begin{macro}{\LWR@@labels} \pkg{lwarp} replacement for \cs{\@labels}.
+% ^^A \changes{v0.45}{2018/01/11}{Added.}
+% ^^A \begin{macrocode}
+% ^^A \newcommand{\LWR@@labels}{}% no longer needed
+% ^^A \end{macrocode}
+% ^^A \end{macro}
+
+
+% \begin{macro}{\@mklab}
+% Removes \PDF\ spacing.
+% \changes{v0.45}{2018/01/11}{Modified for \HTML.}
+% \begin{macrocode}
+\def\@mklab#1{%
+% \hfil %
+ #1}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@donoparitem}
+% Modified for \HTML\ output by replacing \TeX\ boxes with plain text.
+% Also removes \PDF\ spacing.
+% \changes{v0.45}{2018/01/11}{Modified for \HTML.}
+% \begin{macrocode}
+\def\@donoparitem{%
+ \@noparitemfalse
+% \global\setbox\@labels\hbox{\hskip -\leftmargin
+% \unhbox\@labels
+% \hskip \leftmargin}%
+% \if@minipage\else
+% \@tempskipa\lastskip
+% \vskip -\lastskip
+% \advance\@tempskipa\@outerparskip
+% \advance\@tempskipa -\parskip
+% \vskip\@tempskipa
+% \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@item}
+% Modified for \HTML\ output by replacing \TeX\ boxes with plain text.
+% Also removes \PDF\ spacing.
+% \changes{v0.45}{2018/01/11}{Modified for \HTML.}
+% \begin{macrocode}
+\def\@item[#1]{%
+ \if@noparitem
+ \@donoparitem
+ \else
+% \if@inlabel
+% \indent
+ \par
+% \fi
+ \ifhmode
+% \unskip\unskip
+ \par
+ \fi
+ \if@newlist
+ \if@nobreak
+ \@nbitem
+ \else
+% \addpenalty\@beginparpenalty
+% \addvspace\@topsep
+% \addvspace{-\parskip}%
+ \fi
+ \else
+% \addpenalty\@itempenalty
+% \addvspace\itemsep
+ \fi
+ \global\@inlabeltrue
+ \fi
+% \everypar{%
+ \@minipagefalse
+ \global\@newlistfalse
+% \end{macrocode}
+% \begin{macrocode}
+% \if@inlabel
+% \global\@inlabelfalse
+% \end{macrocode}
+% \begin{macrocode}
+% {\setbox\z@\lastbox
+% \ifvoid\z@
+% \kern-\itemindent
+% \fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% \LWR@@labels
+% \renewcommand{\LWR@@labels}{}
+% \box\@labels
+% \penalty\z@
+% \fi
+% \end{macrocode}
+% \begin{macrocode}
+% \if@nobreak
+% \@nobreakfalse
+% \clubpenalty \@M
+% \else
+% \clubpenalty \@clubpenalty
+% \everypar{}%
+% \fi}%
+% \end{macrocode}
+% \begin{macrocode}
+ \if@noitemarg
+ \@noitemargfalse
+ \if@nmbrlist
+% \end{macrocode}
+% \begin{macrocode}
+ \refstepcounter\@listctr
+ \fi
+ \fi
+% \end{macrocode}
+% \begin{macrocode}
+% \appto{\LWR@@labels}{\makelabel{#1}}%
+% \makelabel{#1}
+ #1
+% \sbox\@tempboxa{\makelabel{#1}%
+% \global\setbox\@labels\hbox{%
+% \unhbox\@labels
+% \hskip \itemindent
+% \hskip -\labelwidth
+% \hskip -\labelsep
+% \ifdim \wd\@tempboxa >\labelwidth
+% \box\@tempboxa
+% \end{macrocode}
+% \begin{macrocode}
+% \else
+% \hbox to\labelwidth {\unhbox\@tempboxa}%
+% \fi
+% \hskip \labelsep}%
+ \ignorespaces%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@nbitem}
+% \begin{macrocode}
+\def\@nbitem{%
+% \@tempskipa\@outerparskip
+% \advance\@tempskipa -\parskip
+% \addvspace\@tempskipa
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+
% \begin{macro}{\LWR@listitem} \oarg{label}
%
% Handles \cs{item} inside a \env{list}, \env{itemize}, or \env{enumerate}.
@@ -15641,6 +16332,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \changes{v0.44}{2017/11/15}{Added \env{list} and \env{trivlist}.}
% \begin{macrocode}
\newcommand*{\LWR@liststart}{%
+\LWR@traceinfo{LWR@liststart}%
\LWR@stoppars%
\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloselist}%
\LWR@htmltag{\LWR@printopenlist}\LWR@orignewline%
@@ -15655,11 +16347,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\itemindent}{0pt}%
\setlength{\labelsep}{1em}%
}
-
+% \end{macrocode}
+% \changes{v0.46}{2018/01/21}{Fix: Stack unnesting.}
+% \begin{macrocode}
\newcommand*{\LWR@listend}{%
+\LWR@traceinfo{LWR@listend}%
\LWR@stoppars%
-\LWR@closeprevious{\LWR@depthlistitem}%
-\LWR@closeoneprevious%
+\LWR@closeprevious{\LWR@depthlist}%
\LWR@startpars%
}
% \end{macrocode}
@@ -15737,10 +16431,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Restore \cs{hspace} for use in the item text:
% \begin{macrocode}
\LetLtxMacro{\hspace}{\LWR@hspace}%
-% \end{macrocode}
-% Be sure the label doesn't print to the left of the rest of the file:
-% \begin{macrocode}
-\LWR@orighspace{1in}
\LWR@htmltag{dt}#1\LWR@htmltag{/dt}%
\LWR@orignewline%
\LWR@htmltag{dd}%
@@ -15782,11 +16472,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@patchlists}{%
\let\item\LWR@listitem%
\renewcommand*{\@trivlist}{%
+ \LWR@traceinfo{@trivlist start}%
\LWR@liststart%
\LWR@orig@trivlist%
+ \LWR@traceinfo{@trivlist done}%
+ }%
+ \renewcommand*{\endtrivlist}{%
+ \LWR@traceinfo{endtrivlist start}%
+ \LWR@origendtrivlist\LWR@listend%
+ \LWR@traceinfo{endtrivlist done}%
}%
- \renewcommand*{\endtrivlist}{\LWR@origendtrivlist\LWR@listend}%
\renewcommand*{\trivlist}{%
+ \LWR@traceinfo{trivlist}%
\LWR@origtrivlist%
\def\makelabel####1{\LWR@orighspace{3em}####1}%
}%
@@ -15885,7 +16582,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% \end{macro}
-% \subsection{Booleans}
+
+% \subsection{Tabular variables}
% \DescribeBoolean{LWR@startedrow}
% True if should print a row tag before this column.
@@ -15973,6 +16671,122 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
+% \DescribeCounter{LWR@tabularDepth}
+% Tracks whether |&| is being used inside a \env{tabular}.
+% \begin{macrocode}
+\newcounter{LWR@tabulardepth}
+\setcounter{LWR@tabulardepth}{0}
+% \end{macrocode}
+%
+% \DescribeCounter{LWR@tabularpardepth}
+% Tracks whether should look ahead at the next token
+% when encountering a \cs{par} while processing tabular contents.
+%
+% When |LWR@tabularpardepth| is deeper than |LWR@tabulardepth| then
+% \pkg{lwarp} has started looking at the contents of the |tabular|, and thus
+% any \cs{par}s encountered must be followed by another token lookahead.
+% \changes{v0.46}{2018/01/18}{\ctr{LWR@tabularpardepth} added.}
+% \begin{macrocode}
+\newcounter{LWR@tabularpardepth}
+\setcounter{LWR@tabularpardepth}{0}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\newcommand*{\LWR@colsresult}{}%temp storage for column format results
+\newcommand*{\LWR@pposition}{}
+\newcommand*{\LWR@pleft}{}
+\newcommand*{\LWR@pright}{}
+% \end{macrocode}
+
+% \begin{macro}{\LWR@tablecolspec} Holds the parsed column specification,
+% of total width |LWR@tabletotalcols|, not counting |@| and |!| columns.
+%
+% Will contain a string such as |llrrccpc|, exactly one letter per \LaTeX\ table column,
+% without |@|, |!|, |>|, |<|, or the vertical bar.
+%
+% \begin{macrocode}
+\newcommand*{\LWR@tablecolspec}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@strresult} Holds the result of |Str| functions.
+% \changes{v0.44}{2017/11/19}{Fix: \cs{providecommand}.}
+% \begin{macrocode}
+\providecommand*{\LWR@strresult}{}
+\providecommand*{\LWR@strresulttwo}{}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@origcolspec} Holds the original column specs given to \env{tabular}.
+% \begin{macrocode}
+\newcommand*{\LWR@origcolspec}{}
+% \end{macrocode}
+% \end{macro}
+
+
+% \DescribeCounter{LWR@tablecolspecwidth}
+% Holds the number of tokens in the table columns specification.
+%
+% This is includes one for each |@|, |!|, |<|, |>| column,
+% and also one for each of the parameters of |p|, |@|, |!|, |<|, |>| columns,
+% and three for each |D| column.
+%
+% (This is not the total \# of \LaTeX\ columns in the table.)
+% \begin{macrocode}
+\newcounter{LWR@tablecolspecwidth}
+% \end{macrocode}
+
+% \DescribeCounter{LWR@tablecolspecindex}
+% While parsing the \LaTeX\ table column specification,
+% starts at 1 and is incremented per token of the specification.
+% While producing the table, resets to 1 at the start of the table and
+% also at each end of line, and is incremented by 1 by each ampersand.
+% \begin{macrocode}
+\newcounter{LWR@tablecolspecindex}
+% \end{macrocode}
+
+% \DescribeCounter{LWR@tablecolindex}
+% While parsing the \LaTeX\ table column specification,
+% starts at 1 and is incremented per token of the specification.
+% While producing the table, resets to 1 at the start of the table and
+% also at each end of line, and is incremented by 1 by each ampersand.
+% \begin{macrocode}
+\newcounter{LWR@tablecolindex}
+% \end{macrocode}
+
+% \DescribeCounter{LWR@tabletotalcols}
+% While parsing a table column specification,
+% begins at 0 and increments by 1 per \LaTeX\ table column.
+% Eventually holds the final number of \LaTeX\ table columns in each row,
+% not counting |@| and |!| columns.
+% (In \HTML, |@| and |!| cells become their own columns, but are not included in
+% |LWR@tabletotalcols|.)
+% \begin{macrocode}
+\newcounter{LWR@tabletotalcols}
+% \end{macrocode}
+
+% \DescribeCounter{LWR@tabletotalcolsnext}
+% Holds the next \LaTeX\ table column index while parsing,
+% equal to one more than |LWR@tabletotalcols|.
+% \begin{macrocode}
+\newcounter{LWR@tabletotalcolsnext}
+% \end{macrocode}
+
+% \DescribeObject{LWR@colatspec} A data array of specifications for |@| columns.
+% The leftmost's index is |leftedge|, the others are counter values.
+% See \cref{sec:dataarray}.
+%
+% \DescribeObject{LWR@colbangspec} A data array of specifications for |!| columns.
+% The leftmost's index is |leftedge|, the others are counter values.
+% See \cref{sec:dataarray}.
+%
+% \DescribeObject{LWR@colbeforespec} A data array of specifications for |>| columns.
+%
+% \DescribeObject{LWR@colafterspec} A data array of specifications for |<| columns.
+%
+% \DescribeObject{LWR@colbarspec} A data array of specifications for vertical rules.
+
% \subsection{Handling \&, @, !, and bar}
%
@@ -16054,14 +16868,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
% \end{macrocode}
% \end{macro}
-
-
-% |LWR@tabulardepth| tracks whether |&| is being used inside a \env{tabular}.
-% \begin{macrocode}
-\newcounter{LWR@tabulardepth}
-\setcounter{LWR@tabulardepth}{0}
-
-% \end{macrocode}
+%
% When not used inside a \env{tabular}, |&| performs its original
% function as recorded here ( with catcode 4 ).
% \begin{macrocode}
@@ -16097,7 +16904,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \changes{v0.33}{2017/06/20}{Add: Avoids error: \protect\texttt{misplaced alignment tab character \&}.}
% \begin{macrocode}
\newcommand{\StartDefiningTabulars}{%
-\LWR@traceinfo{StartDefiningTabulars}
+\LWR@traceinfo{StartDefiningTabulars}%
\warpHTMLonly{\catcode`\&=\active}%
}
% \end{macrocode}
@@ -16106,7 +16913,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\EndDefiningTabulars} Place after defining something with |&| in it.
% \begin{macrocode}
\newcommand{\EndDefiningTabulars}{%
-\LWR@traceinfo{EndDefiningTabulars}
+\LWR@traceinfo{EndDefiningTabulars}%
\warpHTMLonly{\catcode`\&=4}%
}
% \end{macrocode}
@@ -16258,8 +17065,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
% \end{macrocode}
% \end{macro}
-
-
+%
+%
% \subsection{Handling \protect\textbackslash\protect\textbackslash}
@@ -16305,103 +17112,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% \end{macro}
-% \subsection{Variables}
-
-% \begin{macrocode}
-\newcommand*{\LWR@colsresult}{}%temp storage for column format results
-\newcommand*{\LWR@pposition}{}
-\newcommand*{\LWR@pleft}{}
-\newcommand*{\LWR@pright}{}
-% \end{macrocode}
-
-% \begin{macro}{\LWR@tablecolspec} Holds the parsed column specification,
-% of total width |LWR@tabletotalcols|, not counting |@| and |!| columns.
-%
-% Will contain a string such as |llrrccpc|, exactly one letter per \LaTeX\ table column,
-% without |@|, |!|, |>|, |<|, or the vertical bar.
-%
-% \begin{macrocode}
-\newcommand*{\LWR@tablecolspec}{}
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\LWR@strresult} Holds the result of |Str| functions.
-% \changes{v0.44}{2017/11/19}{Fix: \cs{providecommand}.}
-% \begin{macrocode}
-\providecommand*{\LWR@strresult}{}
-\providecommand*{\LWR@strresulttwo}{}
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\LWR@origcolspec} Holds the original column specs given to \env{tabular}.
-% \begin{macrocode}
-\newcommand*{\LWR@origcolspec}{}
-% \end{macrocode}
-% \end{macro}
-
-
-% \DescribeCounter{LWR@tablecolspecwidth}
-% Holds the number of tokens in the table columns specification.
-%
-% This is includes one for each |@|, |!|, |<|, |>| column,
-% and also one for each of the parameters of |p|, |@|, |!|, |<|, |>| columns,
-% and three for each |D| column.
-%
-% (This is not the total \# of \LaTeX\ columns in the table.)
-% \begin{macrocode}
-\newcounter{LWR@tablecolspecwidth}
-% \end{macrocode}
-
-% \DescribeCounter{LWR@tablecolspecindex}
-% While parsing the \LaTeX\ table column specification,
-% starts at 1 and is incremented per token of the specification.
-% While producing the table, resets to 1 at the start of the table and
-% also at each end of line, and is incremented by 1 by each ampersand.
-% \begin{macrocode}
-\newcounter{LWR@tablecolspecindex}
-% \end{macrocode}
-
-% \DescribeCounter{LWR@tablecolindex}
-% While parsing the \LaTeX\ table column specification,
-% starts at 1 and is incremented per token of the specification.
-% While producing the table, resets to 1 at the start of the table and
-% also at each end of line, and is incremented by 1 by each ampersand.
-% \begin{macrocode}
-\newcounter{LWR@tablecolindex}
-% \end{macrocode}
-
-% \DescribeCounter{LWR@tabletotalcols}
-% While parsing a table column specification,
-% begins at 0 and increments by 1 per \LaTeX\ table column.
-% Eventually holds the final number of \LaTeX\ table columns in each row,
-% not counting |@| and |!| columns.
-% (In \HTML, |@| and |!| cells become their own columns, but are not included in
-% |LWR@tabletotalcols|.)
-% \begin{macrocode}
-\newcounter{LWR@tabletotalcols}
-% \end{macrocode}
-
-% \DescribeCounter{LWR@tabletotalcolsnext}
-% Holds the next \LaTeX\ table column index while parsing,
-% equal to one more than |LWR@tabletotalcols|.
-% \begin{macrocode}
-\newcounter{LWR@tabletotalcolsnext}
-% \end{macrocode}
-
-% \DescribeObject{LWR@colatspec} A data array of specifications for |@| columns.
-% The leftmost's index is |leftedge|, the others are counter values.
-% See \cref{sec:dataarray}.
-%
-% \DescribeObject{LWR@colbangspec} A data array of specifications for |!| columns.
-% The leftmost's index is |leftedge|, the others are counter values.
-% See \cref{sec:dataarray}.
-%
-% \DescribeObject{LWR@colbeforespec} A data array of specifications for |>| columns.
-%
-% \DescribeObject{LWR@colafterspec} A data array of specifications for |<| columns.
-%
-% \DescribeObject{LWR@colbarspec} A data array of specifications for vertical rules.
-
% \subsection{Parsing @, >, <, !, bar columns}
%
@@ -16641,7 +17351,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \subsection{Parsing the column specifications}
-% \HTML\ \CSS\ cannot exactly match the \LaTeX{} concept of a baseline for
+% HTML \CSS\ cannot exactly match the \LaTeX{} concept of a baseline for
% a table row.
% \watchout
% \Cref{tab:baseline} shows the \LaTeX{} results for various
@@ -16907,12 +17617,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% \begin{macrocode}
\newcommand*{\LWR@printbartag}[1]{%
+\LWR@traceinfo{LWR@printbartag !#1!}%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
{}% muting or empty
{% not muting
\edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
\ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
}% not muting
+\LWR@traceinfo{LWR@printbartag done}%
}
% \end{macrocode}
% \end{macro}
@@ -17007,6 +17719,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\newcommand*{\LWR@tabledatasinglecolumntag}%
{%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag}%
\LWR@maybenewtablerow%
% \end{macrocode}
% Don't start a new paragraph tag if have already started one:
@@ -17029,6 +17742,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% print the start of a new table data cell:
% \begin{macrocode}
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: about to print td tag}%
\LWR@htmltag{td class="td%
% \end{macrocode}
% append this column's spec:
@@ -17051,6 +17765,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addformatwpalignment{\LWR@thiscolspec}%
\LWR@tdendstyles%
}%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
% \end{macrocode}
% If this is a p, m, b, or X column, allow paragraphs:
% \begin{macrocode}
@@ -17064,8 +17779,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
test{ \ifdefstring{\LWR@strresult}{X} }
}%
{% allow pars
- \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}%
\global\booltrue{LWR@tableparcell}%
+ \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done with LWR@startpars}%
}% allow pars
{}% no pars
% \end{macrocode}
@@ -17079,6 +17796,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@intabularmetadata}%
}% not exiting tabular
}{}% in tabular metadata
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: done}%
}%
% \end{macrocode}
% \end{macro}
@@ -18049,6 +18767,8 @@ rowspan="#2" %
\begin{warpHTML}
% \end{macrocode}
%
+% Used to prevent opening a tabular data cell if the following token is
+% one which does not create tabular data:
% \begin{macrocode}
\newcommand*{\LWR@donothing}{}
% \end{macrocode}
@@ -18213,6 +18933,12 @@ rowspan="#2" %
\ifdefequal{\LWR@mynexttoken}{\hline}%
{\let\mynext\LWR@donothing}{}%
%
+\ifdefequal{\LWR@mynexttoken}{\firsthline}%
+ {\let\mynext\LWR@donothing}{}%
+%
+\ifdefequal{\LWR@mynexttoken}{\lasthline}%
+ {\let\mynext\LWR@donothing}{}%
+%
\ifdefequal{\LWR@mynexttoken}{\toprule}%
{\let\mynext\LWR@donothing}{}%
%
@@ -18243,6 +18969,12 @@ rowspan="#2" %
\ifdefequal{\LWR@mynexttoken}{\rdelim}%
{\let\mynext\LWR@donothing}{}%
% \end{macrocode}
+% Ignore an empty line between rows:
+% \changes{v0.45}{2017/12/06}{Fix: Empty line between rows.}
+% \begin{macrocode}
+\ifdefequal{\LWR@mynexttoken}{\par}%
+ {\let\mynext\LWR@donothing}{}%
+% \end{macrocode}
% no action for an |\end| token
%
% Add similar to the above for any other non-data tokens
@@ -18250,7 +18982,9 @@ rowspan="#2" %
%
% Start the new table cell if was not any of the above:
% \begin{macrocode}
+\LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}%
\mynext%
+\LWR@traceinfo{LWR@tabledatacolumntag: done}%
}
% \end{macrocode}
% \end{macro}
@@ -18366,7 +19100,7 @@ rowspan="#2" %
% since they were not compatible with the tabular column parsing code,
% which uses \pkg{xstring}.
% \changes{v0.41}{2017/10/06}{Fix: \cs{NoAutoSpacing} in a tabular
-% with \protect\pkg{babel-french}.}
+% with \pkg{babel-french}.}
% \begin{macrocode}
\AtBeginDocument{
\@ifundefined{frenchbsetup}%
@@ -18391,7 +19125,7 @@ rowspan="#2" %
% since \pkg{siunitx} might redefine tabular in the user's document.
%
% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
-% \changes{v0.36}{2017/08/16}{Fix for \protect\pkg{babel-french}.}
+% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
%
% \begin{macrocode}
\StartDefiningTabulars
@@ -18416,7 +19150,7 @@ rowspan="#2" %
% the autospacing commands since were not compatible with the tabular parsing code.
%
% \changes{v0.41}{2017/10/06}{Fix: \cs{NoAutoSpacing} in a tabular
-% with \protect\pkg{babel-french}.}
+% with \pkg{babel-french}.}
%
% \begin{macrocode}
\LWR@nullifyNoAutoSpacing%
@@ -18544,6 +19278,11 @@ rowspan="#2" %
\StartDefiningTabulars%
\protected\gdef&{\LWR@tabularampersand}%
% \end{macrocode}
+% Nest one level deeper of tabular paragraph handling:
+% \changes{v0.46}{2018/01/18}{Fix: Tabular empty lines.}
+% \begin{macrocode}
+\addtocounter{LWR@tabularpardepth}{1}%
+% \end{macrocode}
% Look ahead for a possible table data cell:
% \begin{macrocode}
\LWR@traceinfo{LWR@tabular: about to LWR@getmynexttoken}%
@@ -18554,6 +19293,11 @@ rowspan="#2" %
% \begin{macrocode}
{%
\LWR@traceinfo{LWR@tabular ending}%
+% \end{macrocode}
+% Unnest one level of tabular paragraph handling:
+% \changes{v0.46}{2018/01/18}{Fix: Tabular empty lines.}
+% \begin{macrocode}
+\addtocounter{LWR@tabularpardepth}{-1}%
\ifboolexpr{%
test {%
\ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}
@@ -18600,18 +19344,6 @@ rowspan="#2" %
-
-% \subsection{Array}
-% \label{sec:array}
-
-% \DescribePackage{array}
-%
-% \pkg{array} is also automatically loaded by siunitx.
-
-
-
-
-
% \section{Cross-references}
%
% Sectioning commands have been emulated from scratch, so the cross-referencing
@@ -18758,16 +19490,19 @@ rowspan="#2" %
% \begin{macrocode}
\zref@newlist{special}
% \end{macrocode}
+%
% Define a new property which has the name of the most recently declared section:
% \begin{macrocode}
\zref@newprop{zLWR@name}{\@currentlabelname}
% \end{macrocode}
+%
% Define a new property which has either a filename or a file number:
% \begin{macrocode}
\zref@newprop{zLWR@htmlfilenumber}{%
\ifbool{FileSectionNames}{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}%
}%
% \end{macrocode}
+%
% Additional properties for lateximages:
% \begin{macrocode}
\zref@newprop{zLWR@lateximagedepth}{\arabic{LWR@lateximagedepth}}
@@ -18783,11 +19518,15 @@ rowspan="#2" %
\zref@addprop{special}{zLWR@lateximagedepth}
\zref@addprop{special}{zLWR@lateximagenumber}
% \end{macrocode}
+%
% Returns the selected field:
% \begin{macrocode}
\newcommand*{\LWR@spref}[2]{%
-\zref@extractdefault{#1}{#2}{??}}
+\zref@extractdefault{#1}{#2}{??}%
+}
% \end{macrocode}
+%
+%
% \begin{macro}{\LWR@nameref} \marg{label}
% Returns the section name for this label:
% \begin{macrocode}
@@ -18796,6 +19535,8 @@ rowspan="#2" %
}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\LWR@htmlfileref} \marg{label}
% \changes{v0.24}{2017/03/13}{Fix: Index links while \cs{tracinglwarp}.}
% Returns the file number for this label:
@@ -18806,6 +19547,8 @@ rowspan="#2" %
}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\LWR@lateximagedepthref} \marg{label}
% Returns the |lateximagedepth| for this label:
% \begin{macrocode}
@@ -18814,6 +19557,9 @@ rowspan="#2" %
}
% \end{macrocode}
% \end{macro}
+%
+%
+%
% \begin{macro}{\LWR@lateximagenumberref} \marg{label}
% Returns the |lateximagenumber| for this label:
% \begin{macrocode}
@@ -18822,15 +19568,19 @@ rowspan="#2" %
}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\LWR@splabel} \marg{label}
% Sanitize the name and then creates the label:
% \begin{macrocode}
\newcommand*{\LWR@splabel}[1]{%
+\LWR@traceinfo{LWR@splabel !#1!}%
\LWR@setlatestname{\@currentlabelname}%
-\zref@labelbylist{#1}{special}}
+\zref@labelbylist{#1}{special}%
+}
% \end{macrocode}
% \end{macro}
-
+%
@@ -18838,10 +19588,14 @@ rowspan="#2" %
% \label{sec:labels}
-% \begin{macro}{\LWR@subsublabel} \marg{label} \quad
+% \begin{macro}{\LWR@sublabel} \marg{label} \quad
% Creates an \HTML\ id tag.
+%
+% \cs{detokenize} is used to allow underscores in the labels.
+% \changes{v0.45}{2017/12/29}{Fix: Labels with underscores.}
% \begin{macrocode}
-\newcommand*{\LWR@subsublabel}[1]{%
+\newcommand*{\LWR@sublabel}[1]{%
+\LWR@traceinfo{LWR@sublabel !#1!}%
% \end{macrocode}
% Create an \HTML\ id tag unless are inside a lateximage,
% since it would appear in the image:
@@ -18853,20 +19607,21 @@ rowspan="#2" %
% If not doing a lateximage, create an \HTML\ ID tag:
% (To be factored\dots)
% \begin{macrocode}
+ \LWR@sanitize{#1}%
\ifbool{LWR@doingstartpars}%
{% pars allowed
- \ifbool{LWR@doingapar}
+ \ifbool{LWR@doingapar}%
{% par started
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
}% par started
{% par not started
\LWR@stoppars%
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
\LWR@startpars%
}% par not started
}% pars allowed
{% pars not allowed
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
}% pars not allowed
}% not lateximage
}
@@ -18874,23 +19629,25 @@ rowspan="#2" %
% \end{macro}
%
%
-% \begin{macro}{\LWR@newlabel} \marg{label} \oarg{type}
+% \begin{macro}{\LWR@newlabel} \parg{bookmark} \marg{label} \oarg{type}
%
% \cs{label} during \HTML\ output when not in math mode,
% removing extra spaces around the label, as done by regular \LaTeX\ \cs{label}.
%
% \pkg{clevereref} later encases this to add its own cross-referencing.
%
+% The optional \meta{bookmark} is per the \pkg{memoir} class, and is ignored.
+%
% The optional \meta{type} is per the \pkg{ntheorem} package, and is ignored.
% \begin{macrocode}
-\NewDocumentCommand{\LWR@newlabel}{m o}{%
+\NewDocumentCommand{\LWR@newlabel}{d() m o}{%
\LWR@traceinfo{LWR@newlabel: starting}%
-\LWR@traceinfo{LWR@newlabel: !#1!}%
+\LWR@traceinfo{LWR@newlabel: !#2!}%
% \@bsphack%
% \end{macrocode}
% Create a traditional \LaTeX\ label, as modified by \pkg{cleveref}:
% \begin{macrocode}
-\LWR@origlabel{#1}%
+\LWR@origlabel{#2}%
% \end{macrocode}
% Create a special label which holds the section number,
% |LWR@htmlfilenumber|, |LWR@lateximagedepth|, and |LWR@lateximagenumber|:
@@ -18898,16 +19655,15 @@ rowspan="#2" %
\LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}%
\LWR@traceinfo{LWR@newlabel: LWR@thisfilename is !\LWR@thisfilename!}%
\LWR@traceinfo{LWR@newlabel: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}}%
-\LWR@splabel{#1}%
-\LWR@subsublabel{#1}%
+\LWR@splabel{#2}%
+\LWR@sublabel{#2}%
% \@esphack%
\LWR@traceinfo{LWR@newlabel: done}%
}
% \end{macrocode}
% \end{macro}
%
-
-
+%
% \subsection{References}
@@ -18924,6 +19680,7 @@ rowspan="#2" %
\newcommand*{\LWR@startref}[1]
{%
\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}%
+\LWR@sanitize{#1}%
\LWR@traceinfo{LWR@startref A: !#1!}%
% \end{macrocode}
% Create the filename part of the link:
@@ -18962,14 +19719,18 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@startref D3}%
- #1%
+% \end{macrocode}
+% \cs{detokenize} is used to allow underscores in the labels:
+% \changes{v0.45}{2017/12/01}{Fix: Labels with underscores.}
+% \begin{macrocode}
+ \LWR@sanitized%
}%
}%
\LWR@traceinfo{LWR@startref E}%
% \end{macrocode}
% Closing quote:
% \begin{macrocode}
-"{}}%
+"}%
\LWR@traceinfo{LWR@startref F}%
}
% \end{macrocode}
@@ -18997,7 +19758,7 @@ rowspan="#2" %
% or without a link if starred per \pkg{hyperref}.
% \begin{macrocode}
\NewDocumentCommand{\LWR@newref}{s m}{%
-\LWR@traceinfo{LWR@newref #2}%
+\LWR@traceinfo{LWR@newref !#2!}%
\IfBooleanTF{#1}%
{\LWR@origref{#2}}%
{\LWR@subnewref{#2}{#2}}%
@@ -19007,6 +19768,7 @@ rowspan="#2" %
% \end{macro}
+
% \label{sec:pagerefpagefor}
% \begin{macro}{\pagerefPageFor} Text for page references.
%
@@ -19049,10 +19811,11 @@ rowspan="#2" %
% \end{macro}
+
% \begin{macro}{\Nameref} \marg{label}
% In print, adds the page number. In \HTML, does not.
% \begin{macrocode}
-\let\Nameref\nameref
+\LetLtxMacro\Nameref\nameref
% \end{macrocode}
% \end{macro}
@@ -19079,13 +19842,40 @@ rowspan="#2" %
% \EmulatesPackage{hyperref}[2015/08/01]% Disabled. Do not do this.
% \end{macrocode}
+
+
+% Emulates \pkg{hyperref}:
+% \begin{macro}{\@currentHref} Added to support \pkg{backref}.
+% \changes{v0.45}{2018/01/14}{Added.}
+% \begin{macrocode}
+\AtBeginDocument{
+\def\@currentHref{%
+autopage-\theLWR@currentautosec%
+}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
% Create a link with a text name:
% \begin{macro}{\LWR@subhyperref} \marg{URL} \marg{text}
% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.}
+% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@subhyperref}{m +m}{%
-\LWR@htmltag{a href="{#1}" target="\_{}blank"\LWR@orignewline}#2\LWR@htmltag{/a}%
+\LWR@traceinfo{LWR@subhyperref !#1!}%
+\LWR@sanitize{#1}%
+\LWR@htmltag{%
+ a href="\LWR@sanitized" %
+% a href="%
+% \begingroup\@sanitize#1\endgroup%
+% " %
+ target="\_{}blank"\LWR@orignewline%
+}%
+#2%
+\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
% \end{macrocode}
@@ -19093,10 +19883,19 @@ rowspan="#2" %
% \begin{macro}{\LWR@subhyperrefclass} \marg{URL} \marg{text} \marg{htmlclass}
% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.}
+% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@subhyperrefclass}{m +m m}{%
-\LWR@htmltag{a href="{#1}"
-class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
+% \LWR@sanitize{#1}%
+\LWR@htmltag{%
+% a href="\LWR@sanitized"
+ a href="%
+ \begingroup\@sanitize#1\endgroup%
+ " %
+ class="#3"\LWR@orignewline%
+}%
+#2%
+\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
% \end{macrocode}
@@ -19110,17 +19909,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% \changes{v0.43}{2017/10/31}{Made robust.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@hrefb}{O{} m +m}{%
-\LWR@subhyperref{#2}{#3}%
-\endgroup%
-\LWR@ensuredoingapar%
-}
-
-\DeclareRobustCommand*{\href}{%
+\NewDocumentCommand{\href}{O{} m +m}{%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
-\LWR@hrefb%
+\LWR@subhyperref{#2}{#3}%
}
% \end{macrocode}
% \end{macro}
@@ -19129,13 +19920,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% Print the name of the link without creating the link:
% \changes{v0.43}{2017/10/31}{Made robust.}
+% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
% \begin{macrocode}
-\newcommand*{\LWR@nolinkurlb}[1]{#1\endgroup\LWR@ensuredoingapar}
-
-\DeclareRobustCommand*{\nolinkurl}{%
+\newcommand*{\nolinkurl}[1]{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@nolinkurlb%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\LWR@templink%
}
% \end{macrocode}
% \end{macro}
@@ -19148,18 +19939,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% and also redefined by \pkg{lwarp-url}.
%
% \changes{v0.43}{2017/10/31}{Made robust.}
+% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@urlb}{m}{%
-\LWR@hrefb{#1}{#1}%
-}
-
-\DeclareRobustCommand*{\url}{%
+\NewDocumentCommand{\url}{m}{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@urlb%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\href{\LWR@templink}{\LWR@templink}%
}
-
-% \LetLtxMacro\url\LWR@urla
% \end{macrocode}
% \end{macro}
@@ -19172,8 +19959,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\newcommand*{\LWR@subinlineimage}[5][]{%
\ifblank{#1}%
-{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"{}}}%
-{\LWR@htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"{}}}%
+{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"}}%
+{\LWR@htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"}}%
}
% \end{macrocode}
% \end{macro}
@@ -19341,6 +20128,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@thisautoid}
% \end{macrocode}
+% \DescribeCounter{LWR@thisautoidWP}
+% A sequential counter for all word processor conversion \element{div}s.
+% This is used to convince LibreOffice to form a frame around this element.
+% \changes{v0.45}{2017/12/09}{Separate \ctr{LWR@thisautoidWP} for word processor \element{div}s.}
+% \begin{macrocode}
+\newcounter{LWR@thisautoidWP}
+% \end{macrocode}
+
% \DescribeBoolean{LWR@freezethisautoid}
% Prevents multiple increments of \cs{LWR@thisautoid} inside a float.
% \begin{macrocode}
@@ -19348,21 +20143,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\boolfalse{LWR@freezethisautoid}
% \end{macrocode}
-% \begin{macro}{\LWR@maybeincthisautoid}
-% Possibly increments the autoid counter.
-% \begin{macrocode}
-\newcommand*{\LWR@maybeincthisautoid}{%
-\ifbool{LWR@freezethisautoid}{}{\addtocounter{LWR@thisautoid}{1}}%
-}
-% \end{macrocode}
-% \end{macro}
-
% \begin{macro}{\LWR@newautoidanchor}
% Adds a new \element{autoid} anchor.
+% \changes{v0.45}{2017/12/07}{Fix: No anchor if frozen autoid.}
% \begin{macrocode}
\newcommand*{\LWR@newautoidanchor}{%
-\LWR@maybeincthisautoid%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\ifbool{LWR@freezethisautoid}{}{%
+ \addtocounter{LWR@thisautoid}{1}%
+ \LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
+}%
}
% \end{macrocode}
% \end{macro}
@@ -19407,8 +20196,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% |.lof|, etc. files just before each float's entry. These values are used
% by \cs{l@figure}, etc. to create the \HTML\ links in the List of Figures, etc.
%
-% \DescribeCounter{LWR@nextautoid} Tracks autoid for floats.
-% \DescribeCounter{LWR@nextautopage} Tracks autopage for floats.
+% \DescribeCounter{LWR@nextautoid} Tracks |autoid| for floats.
+% \DescribeCounter{LWR@nextautopage} Tracks |autopage| for floats.
%
% These are updated per float as the |.lof| file is read.
% \begin{macrocode}
@@ -19420,7 +20209,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\LWRsetnextfloat} \marg{autopage} \marg{autoid}
%
% This is written to the |.lof| file just before each float's usual entry.
-% The autopage and autoid are remembered for \cs{l@figure} to use when
+% The |autopage| and |autoid| are remembered for \cs{l@figure} to use when
% creating the \HTML\ links.
%
% \begin{macrocode}
@@ -19433,7 +20222,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \DescribeCounter{LWR@latestautopage}
% Updated each time a new \HTML\ file is begun.
-% \cs{LWRsetnextfloat} is written with this and the autoid
+% \cs{LWRsetnextfloat} is written with this and the |autoid|
% by the modified \cs{addcontentsline} just before each float's entry.
% \begin{macrocode}
\newcounter{LWR@latestautopage}
@@ -19544,7 +20333,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
\bgroup
\@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
{\egroup\LWR@LT@captionlistentry}}%
@@ -19554,7 +20343,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macro}
% \begin{macro}{\addcontentsline}
-% Patched to write the autopage and autoid before each float's entry.
+% Patched to write the |autopage| and |autoid| before each float's entry.
% No changes if writing |.toc|
% For a theorem, automatically defines \cs{ext@<type>} as needed, to
% mimic and reuse the float mechanism.
@@ -19579,10 +20368,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
% \end{macrocode}
% \end{macro}
-
+%
+%
+% \DescribePackage{capt-of}
+% \DescribePackage{caption} Either package provides \cs{captionof}, which
+% is later patched at the beginning of the document.
+%
% \begin{macro}{\captionof}
-% Patched to track the float number since this is used outside a float,
-% and also create an \HTML\ anchor for the virtual float.
+% Patched to handle paragraph tags.
% \begin{macrocode}
\AtBeginDocument{
\let\LWR@origcaptionof\captionof
@@ -19626,23 +20419,24 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \subsection{Reading and printing the TOC}
-% \begin{macro}{\LWR@myshorttoc} \marg{toc/lof/lot}
+% \begin{macro}{\LWR@myshorttoc} \marg{toc/lof/lot/sidetoc}
% \changes{v0.18}{2016/05/19}{Reorganize \cs{HomeHTMLFilename} logic.}
%
% Reads in and prints the \TOC/\LOF/\LOT\ at the current position.
% While doing so, makes the |@| character into a normal letter to allow
% formatting commands in the section names.
-
+%
% Unlike in regular \LaTeX{}, the file is not reset after being read, since
-% the \TOC\ may be referred to again in each \HTML\ page, and is
-% used for the side\TOC.
+% the side\TOC\ may be referred to again in each \HTML\ page.
% \begin{macrocode}
-\newcommand*{\LWR@myshorttoc}[1]{
-\LWR@ensuredoingapar
+\newcommand*{\LWR@myshorttoc}[1]{%
+\LWR@traceinfo{LWR@myshorttoc: #1}%
+\LWR@ensuredoingapar%
% \end{macrocode}
% Only if the file exists:
% \begin{macrocode}
-\IfFileExists{\jobname.#1}{
+\IfFileExists{\jobname.#1}{%
+\LWR@traceinfo{LWR@myshorttoc: loading}%
% \end{macrocode}
% Make |@| a regular letter.
% Many of the commands in the file will have |@| characters in them, so |@|
@@ -19654,20 +20448,21 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \watchout[disabled]
% the encoding change seems to be required, rather than leaving it |utf8|.
% \begin{macrocode}
-\begingroup
+\begingroup%
% \ifxetexorluatex%
% \else
% \inputencoding{latin1}% currently disabled
% \fi
-\makeatletter
+\makeatletter%
% \end{macrocode}
% Read in the \TOC\ file:
% \begin{macrocode}
-\@input{\jobname.#1}
+\@input{\jobname.#1}%
% \makeatother
-\endgroup
+\endgroup%
}%
{}%
+\LWR@traceinfo{LWR@myshorttoc: done}%
}
% \end{macrocode}
% \end{macro}
@@ -19723,10 +20518,28 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% \end{macro}
%
+%
+% \DescribeBoolean{LWR@copiedsidetoc} Used to only copy the
+% toc file to the sidetoc a single time.
+%
+% (\pkg{listings} and perhaps other packages would re-use \cs{tableofcontents}
+% for their own purposes, causing the sidetoc to be copied more than once, and
+% thus end up empty.)
+% \changes{v0.45}{2017/12/09}{Fix: Empty sidetoc.}
+% \begin{macrocode}
+\newbool{LWR@copiedsidetoc}
+\boolfalse{LWR@copiedsidetoc}
+% \end{macrocode}
+%
+%
+%
% \begin{macro}{\tableofcontents}
% Patch \cs{tableofcontents}, etc. to print footnotes first.
% \pkg{newfloat} uses \cs{listoffigures} for all future float types.
+% \changes{v0.45}{2017/12/07}{Fix: Patch \cs{AtBeginDocument}.}
+% \changes{v0.45}{2017/12/09}{Fix: Empty sidetoc.}
% \begin{macrocode}
+\AtBeginDocument{
\let\LWR@origtableofcontents\tableofcontents
\renewcommand*{\tableofcontents}{%
@@ -19745,11 +20558,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% Copy the |.toc| file to |.sidetoc| for printing the side\TOC.
% The original |.toc| file is renewed when \cs{tableofcontents} is finished.
% \begin{macrocode}
- \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \ifbool{LWR@copiedsidetoc}{}{%
+ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \booltrue{LWR@copiedsidetoc}%
+ }%
\LWR@printpendingfootnotes
\LWR@origtableofcontents
}
-}
+}% \tableofcontents
+}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -19926,7 +20743,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% Called by \cs{l@section}, etc. to create a hyperlink to a section.
%
-% The autopage label is always created just after the section.
+% The |autopage| label is always created just after the section opens.
%
% \begin{description}
% \item[\#1] is depth
@@ -19936,6 +20753,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{description}
% \begin{macrocode}
\NewDocumentCommand{\hypertoc}{m m +m m}{%
+\LWR@traceinfo{hypertoc !#1!#2!#3!#4!}%
% \end{macrocode}
% Respond to tocdepth:
% \begin{macrocode}
@@ -19946,24 +20764,30 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% of the given \HTML\ class.
% \begin{macrocode}
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4%
+ }{#3}{toc#2}%
\LWR@stoppars%
}
{}
+\LWR@traceinfo{hypertoc done}%
}
% \end{macrocode}
% \end{macro}
% \DescribeCounter{lofdepth} \TOC\ depth for figures.
% \begin{macrocode}
+\@ifclassloaded{memoir}{}{
\newcounter{lofdepth}
\setcounter{lofdepth}{1}
+}
% \end{macrocode}
% \DescribeCounter{lotdepth} \TOC\ depth for tables.
% \begin{macrocode}
+\@ifclassloaded{memoir}{}{
\newcounter{lotdepth}
\setcounter{lotdepth}{1}
+}
% \end{macrocode}
@@ -20119,14 +20943,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\@wrindex} \marg{term} \qquad
-% Redefined to write the |LWR@latestautopage| counter instead of |page|
+% Redefined to write the |LWR@autoindex| counter instead of |page|
% \changes{v0.28}{2017/04/13}{Improved indexing.}
% \begin{macrocode}
\def\LWR@wrindex#1{%
\addtocounter{LWR@autoindex}{1}%
-\LWR@newlabel{LWRindex-\theLWR@autoindex}%
+\LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}%
\protected@write\@indexfile{}%
-{\string\indexentry{#1}{\theLWR@autoindex}}%
+{\string\indexentry{#1}{\arabic{LWR@autoindex}}}%
\endgroup
\@esphack}
@@ -20189,15 +21013,72 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\providecommand{\glo@name}{}
\end{warpall}
% \end{macrocode}
+%
+%
+%
+%
+% \section{Bibliography presentation}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \begin{environment}{thebibliography}
+% \changes{v0.45}{2018/01/13}{Patched to emphasize titles.}
+%
+% To emphasize document titles in the bibliography,
+% the following redefines \cs{em} inside \env{thebibliography}
+% to gather everything until the next closing brace,
+% then display these tokens with \cs{textit}.
+%
+% {
+% \footnotesize\itshape
+% Adapted from |embracedef.sty|, which is by \textup{\textsc{Takayuki YATO}}: \\
+% \hspace*{2em}\url{https://gist.github.com/zr-tex8r/b72555e3e7ad2f0a37f1}
+% }
+% \begin{macrocode}
+\AtBeginDocument{
+\AtBeginEnvironment{thebibliography}{
+\providecommand*{\LWR@newem}[1]{\textit{#1}}
+
+\renewrobustcmd{\em}{%
+ \begingroup
+ \gdef\LWR@em@after{\LWR@em@finish\LWR@newem}%
+ \afterassignment\LWR@em@after
+ \toks@\bgroup
+}
+
+\def\LWR@em@finish#1{%
+ \xdef\LWR@em@after{\noexpand#1{\the\toks@}}%
+ \endgroup
+ \LWR@em@after\egroup
+}
+}% \AtBeginEnvironment{thebibliography}
+}% \AtBeginDocument
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
% \section{Restoring original formatting}
%
%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+%
+%
% \begin{macro}{\LWR@restoreorigformatting}
% Used to temporarily restore
-% the print-mode meaing of a number of formatting, graphics, and symbols-related
+% the print-mode meaning of a number of formatting, graphics, and symbols-related
% macros while generating \SVG\ math or a \env{lateximage}.
% A number of packages will \cs{appto} additional actions to this macro.
%
@@ -20286,7 +21167,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
\LetLtxMacro{\minipage}{\LWR@origminipage}%
-\let\endminipage\LWR@endminipage%
+\let\endminipage\LWR@origendminipage%
\LetLtxMacro{\parbox}{\LWR@origparbox}%
\let\TeX\LWR@origTeX%
\let\LaTeX\LWR@origLaTeX%
@@ -20309,9 +21190,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
% \end{macrocode}
% \end{macro}
-
-
-
+%
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+%
+%
+%
% \section{Math}
% \label{sec:math}
%
@@ -20778,14 +21663,14 @@ $#1$}
%
% \pkg{lwarp} points \cs{ltx@label} here.
% This is used by \cs{label} when inside a
-% \LaTeX{} AMS math environment's math display environment.
+% \LaTeX\ AMS math environment's math display environment.
%
% \cs{LWR@origltx@label} points to the \LaTeX\ original,
% modified by \pkg{lwarp}, then by \pkg{amsmath},
% then by \pkg{cleveref}.
% \begin{macrocode}
\newcommand*{\LWR@htmlmathlabel}[1]{%
-\LWR@traceinfo{LWR@htmlmathlabel #1}%
+\LWR@traceinfo{LWR@htmlmathlabelb #1}%
% \end{macrocode}
% If |mathjax| or |FormatWP|, print the \LaTeX\ expression:
% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} print LaTeX expression.}
@@ -20821,6 +21706,7 @@ $#1$}
% \end{macro}
+
% \begin{macro}{\LWR@beginhideamsmath}
% Starts hiding \LaTeX\ math inside an \HTML\ comment.
% \begin{macrocode}
@@ -21350,7 +22236,7 @@ $#1$}
% Two versions follow, depending on expansion needs.
% There may be a better way\dots
%
-% \changes{v0.36}{2017/08/16}{Fix for \protect\pkg{babel-french}.}
+% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
%
% \begin{macrocode}
\newcommand{\LWR@HTMLsanitize}[1]{%
@@ -21381,7 +22267,7 @@ $#1$}
%
% This version expands the argument before sanitizing it.
%
-% \changes{v0.36}{2017/08/16}{Fix for \protect\pkg{babel-french}.}
+% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
%
% \begin{macrocode}
\newcommand{\LWR@HTMLsanitizeexpand}[1]{%
@@ -21561,7 +22447,7 @@ $#1$}
\NewDocumentEnvironment{lateximage}{O{image}}
{%
-\LWR@traceinfo{lateximage: starting on page \arabic{page}}%
+\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
% \end{macrocode}
% Nested |lateximage|s remain one large |lateximage|:
% \begin{macrocode}
@@ -21605,7 +22491,9 @@ $#1$}
\addtocounter{LWR@externalfilecnt}{1}%
\LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}%
% \end{macrocode}
-% Figure out what the next page number will be:
+% Figure out what the next page number will be.
+% \cs{setcounterpageref} assigns |LWR@LIpage| to the page number for
+% the reference |LWRlateximageXXX|:
% \begin{macrocode}
\setcounterpageref{LWR@LIpage}{LWRlateximage\arabic{LWR@lateximagenumber}}%
\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
@@ -21614,14 +22502,14 @@ $#1$}
% of the image's page, and also will hold the link to the |.svg| file:
% \begin{macrocode}
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
- class="lateximagesource"{}} \LWR@orignewline
+ class="lateximagesource"} \LWR@orignewline
% \end{macrocode}
% Write instructions to the |lateximages.txt| file:
% \begin{macrocode}
\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR@lateximagesfile{|\theLWR@LIpage|\theLWR@externalfilecnt|}%
+ \immediate\write\LWR@lateximagesfile{|\arabic{LWR@LIpage}|\arabic{LWR@externalfilecnt}|}%
% \end{macrocode}
-% Place an open comment tag at the bottom of page; footnotes will be above this tag.
+% Place an open comment tag.
% This will hide any traces of the lateximage \PDF\ page which were picked up by
% |pdftotext|.
% \begin{macrocode}
@@ -21702,6 +22590,7 @@ $#1$}
% \end{macrocode}
% Close the \HTML\ comment which encapsulated any traces of the lateximage picked up by |pdftotext|:
% \begin{macrocode}
+ \LWR@origvspace*{.5\baselineskip}%
\LWR@htmlclosecomment{}\LWR@orignewline%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
% \end{macrocode}
@@ -22251,15 +23140,12 @@ $#1$}
%
% \begin{macrocode}
\LetLtxMacro\LWR@origlabel\label
-% \LetLtxMacro\label\LWR@newlabel
\RenewDocumentCommand{\label}{}{\LWR@newlabel}
\LetLtxMacro\LWR@origref\ref
-% \LetLtxMacro\ref\LWR@newref
\RenewDocumentCommand{\ref}{}{\LWR@newref}%
\LetLtxMacro\LWR@origpageref\pageref
-% \LetLtxMacro\pageref\LWR@newpageref
\RenewDocumentCommand{\pageref}{}{\LWR@newpageref}
\end{warpHTML}
@@ -22347,62 +23233,7 @@ $#1$}
% \subsection{Minipage handling}
% \label{sec:footnotesminipageplaced}
%
-% \begin{macro}{\LWR@endminipage}
-% Used to close a minipage.
-%
-% Copied the \LaTeX{} definition and modified to create a \element{div} of class \attribute{mpfootnotes}:
-% \begin{macrocode}
-\def\LWR@endminipage{%
- \par
- \unskip
- \ifvoid\@mpfootins\else
- \vskip\skip\@mpfootins
- \normalcolor
- \LWR@htmldivclass{mpfootnotes}
- \LWR@origmedskip
- \unvbox\@mpfootins
- \LWR@htmldivclassend{mpfootnotes}
- \fi
- \@minipagefalse
- \color@endgroup
- \egroup
- \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\LWR@subminipage}
-% Used to create a \PDF\ minipage without creating an \HTML\ minipage.
-% This allows footnotes to appear at the bottom of the minipage instead of
-% the bottom of the \HTML\ page.
-% \begin{macrocode}
-\newcommand*{\LWR@subminipage}{%
-\LWR@stoppars
-\LWR@origminipage{6in}
-% \end{macrocode}
-% |\raggedright| cancels hyphenation, which will be done by \HTML\ instead.
-% \begin{macrocode}
-\LWR@origraggedright%
-% \end{macrocode}
-% Resume paragraph tag handling for the contents of the minipage:
-% \begin{macrocode}
-\LWR@startpars%
-}
-% \end{macrocode}
-% \end{macro}
-
-
-% \begin{macro}{\LWR@endsubminipage}
-% Closes the subminipage.
-% \begin{macrocode}
-\newcommand*{\LWR@endsubminipage}{%
-\LWR@stoppars%
-\LWR@endminipage% The following empty line is required:
-
-}
-% \end{macrocode}
-% \end{macro}
-
-
+%
% \DescribeBoolean{LWR@minipagefullwidth} Should the next minipage have no \HTML\ |width|?
% \begin{macrocode}
\newbool{LWR@minipagefullwidth}
@@ -22463,16 +23294,32 @@ $#1$}
% \begin{macrocode}
\uselengthunit{PT}%
% \end{macrocode}
+% Temporarily open a group, in which width and height is
+% computed based on a virtual page size instead of
+% the extra-large \PDF\ page used during \HTML\ tag generation.
+%
+% The following used to be an actual \LaTeX\ minipage.
+% \changes{v0.45}{2017/12/01}{Fix: Improper \cs{prevdepth}.}
+% \begin{macrocode}
+\begingroup
+% \end{macrocode}
% Compute width, adjusted for frames:
% \begin{macrocode}
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
+% \end{macrocode}
+% Only create a new page if not yet nested:
+% \begin{macrocode}
+ \LWR@orignewpage%
+% \end{macrocode}
+% Adjust virtual page size:
+% \begin{macrocode}
\addtolength{\LWR@minipagewidth}{3em}% room for frames
\setlength{\linewidth}{6in}%
\setlength{\textwidth}{6in}%
\setlength{\textheight}{9in}%
}{}%
-\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
+\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}%
% \end{macrocode}
% Compute height:
% \begin{macrocode}
@@ -22483,9 +23330,9 @@ $#1$}
% \begin{macrocode}
\addtocounter{LWR@minipagedepth}{1}%
% \end{macrocode}
-% \LaTeX{} wants to start a paragraph for the new minipage, then start a paragraph again
-% for the contents of the minipage, so cancel the paragraph tag handling
-% until the minipage has begun.
+% \LaTeX{} wants to start a paragraph for the virtual minipage,
+% then start a paragraph again for the contents of the minipage,
+% so cancel the paragraph tag handling until the minipage has begun.
% \begin{macrocode}
\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars%
@@ -22495,16 +23342,14 @@ $#1$}
% \begin{macrocode}
\ifbool{FormatWP}{%
-\addtocounter{LWR@thisautoid}{1}%
-\booltrue{LWR@freezethisautoid}%
-\LWR@htmltag{div id="autoid-\arabic{LWR@thisautoid}" class="wpminipage"}%
+\addtocounter{LWR@thisautoidWP}{1}%
+\LWR@htmltag{div id="autoidWP-\arabic{LWR@thisautoidWP}" class="wpminipage"}%
}{}%
% \end{macrocode}
% Create the \element{div} tag with optional alignment style:
% \begin{macrocode}
\LWR@traceinfo{minipage: creating div class}%
-\LWR@orignewpage%
\LWR@htmltag{div class="minipage" style="%
\ifthenelse{\equal{#1}{t}}{vertical-align:bottom ; }{}%
\ifthenelse{\equal{#1}{c}}{vertical-align:middle ; }{}%
@@ -22527,18 +23372,18 @@ $#1$}
}%
\LWR@traceinfo{minipage: about to print the height}%
\IfValueT{#2}{height:\rndprintlength{\LWR@minipageheight} ; }%
-"{}}%
+"}%
% \end{macrocode}
-% Finish with an empty line to start \LaTeX{} minipage processing on a new line.
-% Use a large minipage area to avoid the unnecessary wrapping of tags.
+% Finish with an empty line to start the contents on a new line.
% \begin{macrocode}
-\LWR@origminipage{6in}% The preceding empty line is required.
+% The preceding empty line is required.
% \end{macrocode}
-% Set the user-accessible minipage and text width and height values inside the minipage.
-% These do not affect the actual size of the large minipage created by
-% \cs{LWR@origminipage} above, but are used by any reference to \cs{linewidth}, etc.
-% inside the \PDF\ minipage being created here.
+% Set the user-accessible line and text width and height values
+% inside the virtual minipage.
+% These do not affect the actual size of the \PDF\ output,
+% but are used by any reference to \cs{linewidth}, etc.
+% inside the virtual minipage being created here.
% \begin{macrocode}
\setlength{\linewidth}{#4}% the original width
\setlength{\textwidth}{6in}%
@@ -22548,6 +23393,12 @@ $#1$}
% \begin{macrocode}
\LWR@origraggedright%
% \end{macrocode}
+% Set minipage footnotes:
+% \begin{macrocode}
+\def\@mpfn{mpfootnote}%
+\def\thempfn{\thempfootnote}\c@mpfootnote\z@%
+\let\@footnotetext\@mpfootnotetext%
+% \end{macrocode}
% Resume paragraph tag handling for the contents of the minipage:
% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkMinipages}.}
% \begin{macrocode}
@@ -22558,24 +23409,32 @@ $#1$}
}{}%
\LWR@traceinfo{minipage: finished starting the minipage}%
-}
+}% finished \minipage
+{% \endminipage
+% \end{macrocode}
+% Print pending minipage footnotes:
+% \changes{v0.45}{2017/12/01}{Fix: Improper \cs{prevdepth}.}
+% \begin{macrocode}
+\LWR@printpendingmpfootnotes%
% \end{macrocode}
-% End the environment with \LaTeX{} processing and closing tag:
+% End the environment with closing tag:
% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkMinipages}.}
% \begin{macrocode}
-{%
\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
=== end minipage ===
}{}%
\LWR@stoppars%
-\LWR@endminipage% The following empty line is required:
+% \end{macrocode}
+% The following used to be an actual \LaTeX\ minipage.
+% \changes{v0.45}{2017/12/01}{Fix: Improper \cs{prevdepth}.}
+% \begin{macrocode}
+\endgroup%
\ifbool{FormatWP}{%
\LWR@htmlelementend{div}%
-\boolfalse{LWR@freezethisautoid}%
}{}%
\LWR@htmldivclassend{minipage}%
@@ -22605,9 +23464,9 @@ $#1$}
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
{
\LWR@traceinfo{parbox of width #4}%
-\begin{minipage}[#1][#2][#3]{#4}
+\begin{minipage}[#1][#2][#3]{#4}%
#5
-\end{minipage}
+\end{minipage}%
}
% \end{macrocode}
% \end{macro}
@@ -22651,12 +23510,18 @@ $#1$}
]%
{makebox}%
% \end{macrocode}
-% Without a width argument, the text is simply used inline:
+% \changes{v0.46}{2018/01/19}{Fix: Lateximage in a \cs{makebox}.}
+% ^^A Now prints directly instead of inside a \mbox.
% \begin{macrocode}
- {\mbox{#4}}%
+ {#4}%
}% scope
}%
-{\mbox{#4}}%
+% \end{macrocode}
+% Without a width argument, the text is simply used inline:
+% \changes{v0.46}{2018/01/19}{Fix: Lateximage in a \cs{makebox}.}
+% ^^A Now prints directly instead of inside a \mbox.
+% \begin{macrocode}
+{#4}% no width
}
% \end{macrocode}
% \end{macro}
@@ -22728,7 +23593,7 @@ padding:\rndprintlength{\fboxsep}%
% may have loaded:
% \begin{macrocode}
\newcommand{\LWRhtml@fbox}[1]{%
-\LWR@traceinfo{HTML fbox}
+\LWR@traceinfo{HTML fbox}%
\LWR@forceminwidth{\fboxrule}%
\InlineClass[%
\LWR@blackborderpadding%
@@ -23118,8 +23983,11 @@ width:\rndprintlength{\LWR@tempwidth}%
\LetLtxMacro{\itshape}{\LWR@nullitshape}%
\LetLtxMacro{\em}{\LWR@nullem}%
\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
-\renewcommand*{\HTMLunicode}[1]{}%
-\renewcommand*{\HTMLentity}[1]{}%
+\renewcommand*{\,}{-}%
+\renewcommand*{~}{-}%
+\renewcommand*{\textellipsis}{-}%
+\renewcommand*{\HTMLunicode}[1]{-}%
+\renewcommand*{\HTMLentity}[1]{-}%
% \end{macrocode}
% Ampersand becomes ``and'', which is a short word and is then removed from the filename.
% \begin{macrocode}
@@ -23326,20 +24194,22 @@ width:\rndprintlength{\LWR@tempwidth}%
\let\LWR@origvspace\vspace
\let\LWR@origrule\rule
\let\LWR@origmedskip\medskip
+\let\LWR@origbigskip\bigskip
\let\LWR@origtextellipsis\textellipsis
% \end{macrocode}
+% \changes{v0.45}{2017/12/29}{Improved: Robust \cs{\,}, \cs{~}, and \cs{textellipsis} commands.}
% Direct-formatting space commands become \HTML\ entities:
% \begin{macrocode}
-\renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
+\renewrobustcmd*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
% \end{macrocode}
% ^^A \renewcommand*{\,}{\HTMLunicode{2009}} % HTML thin wrappable space
% ^^A \renewcommand*{\,}{\HTMLentity{nbsp}} % regular-width non-breakable space
% \begin{macrocode}
-\renewcommand*{~}{\HTMLentity{nbsp}}
+\renewrobustcmd*{~}{\HTMLentity{nbsp}}
-\renewcommand*{\textellipsis}{\HTMLunicode{2026}}
+\renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}}
% \end{macrocode}
% Direct-formatting font sizes are ignored:
% \begin{macrocode}
@@ -23374,6 +24244,17 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
+
+% \begin{macro}{\newpage}
+% \changes{v0.45}{2018/01/12}{Added.}
+% \begin{macrocode}
+\renewcommand*{\newpage}{
+
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \begin{macro}{\newline}
% Uses the \HTML\ \element{br /} element.
% \begin{macrocode}
@@ -23800,7 +24681,7 @@ width:\rndprintlength{\LWR@tempwidth}%
% Emulate the hyperref |\phantomsection| command,
% often used to insert the bibliography into table of contents:
% \begin{macrocode}
-\newcommand*{\phantomsection}{%
+\DeclareDocumentCommand{\phantomsection}{}{%
\section*{}%
}
% \end{macrocode}
@@ -23886,6 +24767,8 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+%
% \begin{macro}{\LuaTeX}
% \begin{macro}{\LuaLaTeX} \LuaTeX, \LuaLaTeX
% \begin{macrocode}
@@ -23894,6 +24777,8 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+%
% \begin{macro}{\XeTeX}
% \begin{macro}{\XeLaTeX} \XeTeX, \XeLaTeX
% \nopagebreak
@@ -23918,6 +24803,8 @@ width:\rndprintlength{\LWR@tempwidth}%
\InlineClass{latexlogofont}{t}}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\BibTeX}
% \begin{macro}{\MakeIndex} \BibTeX, \MakeIndex
% \begin{macrocode}
@@ -23929,6 +24816,8 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+%
% \begin{macro}{\AmS} \AmS
% \nopagebreak
%
@@ -23938,11 +24827,15 @@ width:\rndprintlength{\LWR@tempwidth}%
{\InlineClass{amslogo}{\textit{A\textsubscript{M}S}}}}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\MiKTeX} \MiKTeX
% \begin{macrocode}
\newcommand*{\MiKTeX}{\InlineClass{latexlogofont}{MiK}\TeX}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macro}{\LyX} \LyX
% \nopagebreak
%
@@ -23951,10 +24844,14 @@ width:\rndprintlength{\LWR@tempwidth}%
\newcommand*{\LyX}{\InlineClass{lyxlogo}{LyX}}
% \end{macrocode}
% \end{macro}
+%
+%
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
%
+%
+%
% \subsection{Print logos}
%
% \codeprint
@@ -23997,14 +24894,51 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macro}
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
+
+% \section{Koma-script}
+%
+% Load patches to \pkg{koma-script}.
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
+\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
+\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
+% \end{macrocode}
+%
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
-
+% \section{Memoir}
+%
+% Load patches to \pkg{memoir}.
+%
+% \changes{v0.45}{2017/12/03}{\pkg{memoir}: Added.}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
@@ -24069,105 +25003,6 @@ width:\rndprintlength{\LWR@tempwidth}%
%
%
%
-% \iffalse
-%<*patch-komascript>
-% \fi
-%
-% \part{lwarp-patch-komascript.sty}
-%
-% \section{patch-komascript}
-%
-% \DescribePackage{lwarp-patch-komascript}
-% Patches for \pkg{komascript} classes.
-%
-% \pkg{lwarp} loads this package when
-% \pkg{scrbook}, \pkg{scrartcl}, or \pkg{scrreprt} are detected.
-%
-% \limitskomascript
-%
-% \changes{v0.44}{2017/11/19}{\pkg{lwarp-patch-komascript}: Added.}
-%
-% \codehtml
-%
-% \begin{macrocode}
-\ProvidesPackage{lwarp-patch-komascript}
-% \end{macrocode}
-%
-% \pkg{typearea} is emulated.
-% \begin{macrocode}
-\RequirePackage{lwarp-typearea}
-% \end{macrocode}
-%
-% \pkg{tocbasic} is emulated.
-% \begin{macrocode}
-\RequirePackage{lwarp-tocbasic}
-% \end{macrocode}
-%
-% \pkg{scrextend} patches most of the new macros.
-% \begin{macrocode}
-\RequirePackage{lwarp-scrextend}
-% \end{macrocode}
-%
-% The \cs{minisec} is placed inside a \element{div} of class \attribute{minisec}.
-% \begin{macrocode}
-\renewcommand*{\minisec}[1]{
-\begin{BlockClass}{minisec}
-#1
-\end{BlockClass}
-}
-% \end{macrocode}
-%
-% The part and chapter preambles are placed as plain text just after each heading.
-% \begin{macrocode}
-\@ifundefined{setpartpreamble}{}{
-\RenewDocumentCommand{\setpartpreamble}{o o +m}{%
-\renewcommand{\part@preamble}{#3}%
-}
-}
-
-\@ifundefined{setchapterpreamble}{}{
-\RenewDocumentCommand{\setchapterpreamble}{o o +m}{%
-\renewcommand{\chapter@preamble}{#3}%
-}
-}
-% \end{macrocode}
-%
-% Simple captions are used in all cases.
-% \begin{macrocode}
-\LetLtxMacro\captionbelow\caption
-\LetLtxMacro\captionabove\caption
-
-\LetLtxMacro\captionofbelow\captionof
-\LetLtxMacro\captionofabove\captionof
-
-\RenewDocumentEnvironment{captionbeside}{o m o o o s}
-{}
-{%
-\IfValueTF{#1}%
-{\caption[#1]{#2}}%
-{\caption{#2}}%
-}
-
-\RenewDocumentEnvironment{captionofbeside}{m o m o o o s}
-{}
-{%
-\IfValueTF{#2}%
-{\captionof{#1}[#2]{#3}}%
-{\captionof{#1}{#3}}%
-}
-
-\RenewDocumentCommand{\setcapindent}{s m}{}
-\renewcommand*{\setcaphanging}{}
-\renewcommand*{\setcapwidth}[2][]{}
-\renewcommand*{\setcapdynwidth}[2][]{}
-\RenewDocumentCommand{\setcapmargin}{s o m}{}
-% \end{macrocode}
-%
-% \iffalse
-%</patch-komascript>
-% \fi
-%
-%
%
% \iffalse
%<*a4>
@@ -24272,6 +25107,17 @@ width:\rndprintlength{\LWR@tempwidth}%
%
% \codehtml
%
+% \pkg{memoir} provides an \env{abstract} environment even though it
+% is not an \pkg{article} or \pkg{report} class.
+% Meanwhile, \pkg{lwarp} loads \pkg{book} to
+% emulate \pkg{memoir}, but \pkg{book} does not have an \env{abstract}
+% environment, so when the \pkg{abstract} package is loaded for emulation there
+% is no pre-existing \env{abstract} to redefine, which would cause an error.
+% Thus, a null \env{abstract} is provide here:
+% \begin{macrocode}
+\ProvideDocumentEnvironment{abstract}{}{}{}
+% \end{macrocode}
+%
% Accept all options for \pkg{lwarp-abstract}:
% \begin{macrocode}
\LWR@ProvidesPackagePass{abstract}
@@ -24294,6 +25140,34 @@ width:\rndprintlength{\LWR@tempwidth}%
\@bslabeldelim}%
}
+\@ifclassloaded{memoir}
+{
+ \renewenvironment{abstract}{%
+% \titlepage
+ \null\vfil
+ \@beginparpenalty\@lowpenalty
+ \if@bsrunin
+ \else
+ \if@bsstyle
+ \abstitlestyle{\BlockClassSingle{abstracttitle}{\abstractname}}
+ \else
+ \ifnumber@bs
+ \num@bs
+ \else
+ \begin{\absnamepos}%
+ \abstractnamefont \BlockClassSingle{abstracttitle}{\abstractname}
+ \@endparpenalty\@M
+ \end\absnamepos%
+%% \vspace{\abstitleskip}%
+ \fi
+ \fi
+ \vspace{\abstitleskip}%
+ \fi
+ \put@bsintoc%
+ \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
+ {\par\end{@bstr@ctlist}\vfil\null%\endtitlepage
+ }
+}{% not memoir
\if@titlepage
\renewenvironment{abstract}{%
% \titlepage
@@ -24342,7 +25216,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
{\par\end{@bstr@ctlist}}
\fi
-
+}% not memoir
% \end{macrocode}
% \iffalse
@@ -24621,6 +25495,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
% \credits{Publications Technical Group --- American Mathematical Society}
%
+% The original source code is located in |amsclass.dtx|, and printed in
+% |amsclass.pdf|.
+%
% \DescribePackage{amsthm}
% \pkg{amsthm} is patched for use by \pkg{lwarp}.
%
@@ -24711,10 +25588,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% Patches for \CSS:
% \begin{macrocode}
\def\@begintheorem#1#2[#3]{%
-\LWR@forcenewpage% new
- \BlockClass{amsthmbody\LWR@thisthmstyle}% new
- \deferred@thm@head{
- \the\thm@headfont \thm@indent
+ \item[
+% \deferred@thm@head{
+% \the\thm@headfont \thm@indent
\@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% new
\@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% new
\@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% new
@@ -24722,14 +25598,72 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\the\thm@headpunct~
\thmheadnl % possibly a newline.
\hskip\thm@headsep
- }%
+% }%
+ ]
\ignorespaces}
% \end{macrocode}
%
% Patched for \CSS:
+% \changes{v0.46}{2018/01/22}{\pkg{amsthm}: Adapted to \env{trivlist} changes.}
% \begin{macrocode}
-\def\@endtheorem{\endBlockClass\endtrivlist\@endpefalse }
+\def\@thm#1#2#3{%
+ \ifhmode\unskip\unskip\par\fi
+ \normalfont
+ \LWR@forcenewpage% new
+ \BlockClass{amsthmbody\LWR@thisthmstyle}% new
+ \trivlist
+ \let\thmheadnl\relax
+ \let\thm@swap\@gobble
+ \thm@notefont{\fontseries\mddefault\upshape}%
+ \thm@headpunct{.}% add period after heading
+ \thm@headsep 5\p@ plus\p@ minus\p@\relax
+ \thm@space@setup
+ #1% style overrides
+ \@topsep \thm@preskip % used by thm head
+ \@topsepadd \thm@postskip % used by \@endparenv
+ \def\@tempa{#2}\ifx\@empty\@tempa
+ \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
+ \else
+ \refstepcounter{#2}%
+ \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
+ \fi
+ \@tempa
+}
% \end{macrocode}
+% \pkg{cleveref} patches \cs{@thm} to do \cs{cref@thmoptarg} if an optional
+% argument is given. \pkg{lwarp} then patches \cs{cref@thmoptarg}
+% \cs{AtBeginDocument}.
+% \begin{macrocode}
+\AtBeginDocument{
+\def\cref@thmoptarg[#1]#2#3#4{%
+ \ifhmode\unskip\unskip\par\fi%
+ \normalfont%
+ \LWR@forcenewpage% new
+ \BlockClass{amsthmbody\LWR@thisthmstyle}% new
+ \trivlist%
+ \let\thmheadnl\relax%
+ \let\thm@swap\@gobble%
+ \thm@notefont{\fontseries\mddefault\upshape}%
+ \thm@headpunct{.}% add period after heading
+ \thm@headsep 5\p@ plus\p@ minus\p@\relax%
+ \thm@space@setup%
+ #2% style overrides
+ \@topsep \thm@preskip % used by thm head
+ \@topsepadd \thm@postskip % used by \@endparenv
+ \def\@tempa{#3}\ifx\@empty\@tempa%
+ \def\@tempa{\@oparg{\@begintheorem{#4}{}}[]}%
+ \else%
+ \refstepcounter[#1]{#3}% <<< cleveref modification
+ \def\@tempa{\@oparg{\@begintheorem{#4}{\csname the#3\endcsname}}[]}%
+ \fi%
+ \@tempa
+}%
+}% AtBeginDocument
+
+\def\@endtheorem{\endtrivlist\endBlockClass\@endpefalse }
+% \end{macrocode}
+%
+%
%
%
% Proof QED symbol:
@@ -24749,7 +25683,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
- \item[\hskip\labelsep
+ \item[
\InlineClass{amsthmproofname}{#1\@addpunct{.}}]\ignorespaces% changes
}{%
\InlineClass{theoremendmark}{\popQED}\endtrivlist%
@@ -24920,6 +25854,44 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \iffalse
+%<*array>
+% \fi
+%
+% \part{lwarp-array.sty}
+%
+% \section{array}
+%
+% \DescribePackage{array}
+% \pkg{array} is used as-is for print output, and emulated for \HTML.
+%
+% \changes{v0.45}{2017/12/03}{\pkg{array}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{array}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\LWR@origfirsthline\firsthline
+\let\LWR@origlasthline\lasthline
+
+\appto{\LWR@restoreorigformatting}{%
+\let\firsthline\LWR@origfirsthline%
+\let\lasthline\LWR@origlasthline%
+}
+
+\renewcommand*{\firsthline}{\LWR@hline}%
+\renewcommand*{\lasthline}{\LWR@hline}%
+% \end{macrocode}
+%
+% \iffalse
+%</array>
+% \fi
+%
+%
+%
%
% \iffalse
%<*atbegshi>
@@ -25025,6 +25997,48 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+%
+%
+% \iffalse
+%<*backref>
+% \fi
+%
+% \part{lwarp-backref.sty}
+
+% \section{backref}
+%
+% \credits{David Carlisle and Sebastian Rahtz}
+%
+% \DescribePackage{backref}
+% \pkg{backref} is patched for use by \pkg{lwarp}.
+%
+% Note that \pkg{backref} must be explicitly loaded,
+% \watchout[loading]
+% and is not automatically loaded by \pkg{hyperref} when
+% generating \HTML\ output.
+%
+% \changes{v0.45}{2018/01/14}{\pkg{backref}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{backref}
+% \end{macrocode}
+
+% Force the |hyperref| option:
+% \begin{macrocode}
+\def\backref{}\let\backrefxxx\hyper@section@backref
+% \end{macrocode}
+
+% \iffalse
+%</backref>
+% \fi
+%
+%
+%
+%
+%
+%
% \iffalse
%<*balance>
% \fi
@@ -25339,6 +26353,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \pkg{breakurl} is emulated.
%
% \changes{v0.43}{2017/10/31}{\pkg{breakurl}: Added.}
+% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
%
% \codehtml
%
@@ -25349,18 +26364,16 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\LetLtxMacro\burl\url
-\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
-\LWR@subhyperref{#3}{#2}% order reversed from \href
-\endgroup%
+\NewDocumentCommand{\burlalt}{O{} +m m}{%
\LWR@ensuredoingapar%
-}
-
-\DeclareRobustCommand*{\burlalt}{%
+\def\LWR@templink{#2}%
+\@onelevel@sanitize\LWR@templink%
+\def\LWR@templinktwo{#3}%
+\@onelevel@sanitize\LWR@templinktwo%
+\LWR@subhyperref{\LWR@templink}{\LWR@templinktwo}%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
-\LWR@burlaltb%
}
+
\LetLtxMacro\urlalt\burlalt
% \end{macrocode}
%
@@ -25497,6 +26510,45 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \iffalse
+%<*changebar>
+% \fi
+%
+% \part{lwarp-changebar.sty}
+%
+% \section{changebar}
+%
+% \DescribePackage{changebar}
+% \pkg{changebar} is ignored.
+%
+% \changes{v0.45}{2017/12/15}{\pkg{changebar}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{changebar}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\cbstart}{}
+\newcommand*{\cbend}{}
+\newenvironment*{\changebar}{}{}
+\newcommand*{\cbdelete}{}
+\newcommand*{\nochnagebars}{}
+\newcommand*{\cbcolor}[1]{}
+\newlength{\changebarwidth}
+\newlength{\deletebarwidth}
+\newlength{\changebarsep}
+\newcounter{changebargrey}
+% \end{macrocode}
+%
+% \iffalse
+%</changebar>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*changepage>
@@ -25525,17 +26577,22 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\DeclareRobustCommand{\checkoddpage}{\oddpagetrue}
\DeclareRobustCommand{\changetext}[5]{}
\DeclareRobustCommand{\changepage}[9]{}
+
+\@ifundefined{adjustwidth}{
\newenvironment{adjustwidth}[2]{}{}
\newenvironment{adjustwidth*}[2]{}{}
+}{
+\renewenvironment{adjustwidth}[2]{}{}
+\renewenvironment{adjustwidth*}[2]{}{}
+}
% \end{macrocode}
% \changes{v0.44}{2017/11/13}{\pkg{changepage}: Additional options.}
% \begin{macrocode}
-\newcommand*{\strictpagecheck}{}
-\newcommand*{\easypagecheck}{}
+\DeclareDocumentCommand{\strictpagecheck}{}
+\DeclareDocumentCommand{\easypagecheck}{}
% \end{macrocode}
-
% \iffalse
%</changepage>
% \fi
@@ -25606,6 +26663,50 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \iffalse
+%<*cite>
+% \fi
+%
+% \part{lwarp-cite.sty}
+
+% \section{cite}
+%
+% \credits{Donald Arseneau}
+%
+% \DescribePackage{cite}
+% \pkg{cite} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.45}{2018/01/13}{\pkg{cite}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{cite}
+% \end{macrocode}
+
+% For the [super] option, the \cs{kern} must be removed:
+% \begin{macrocode}
+\def\LWRCT@biblabel#1{\@citess{#1}\kern-\labelsep\,}
+
+\ifdefstrequal{\@biblabel}{\LWRCT@biblabel}
+{
+ \def\@biblabel#1{\@citess{#1}}
+}{}
+% \end{macrocode}
+
+% For the [super] option, \cs{textsuperscript} is used instead of math superscript:
+% \begin{macrocode}
+\def\@citess#1{\textsuperscript{#1}}
+
+\DeclareDocumentCommand\citepunct{}{,\,\relax}
+% \end{macrocode}
+
+% \iffalse
+%</cite>
+% \fi
+%
+%
+%
%
%
% \iffalse
@@ -25638,6 +26739,42 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \iffalse
+%<*continue>
+% \fi
+%
+% \part{lwarp-continue.sty}
+%
+% \section{continue}
+%
+% \DescribePackage{continue}
+% \pkg{continue} is ignored.
+%
+% \changes{v0.45}{2017/12/19}{\pkg{continue}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{continue}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\flagcont}{}
+\newcommand*{\flagend}{}
+\newcommand*{\flagword}{}
+\newcommand*{\preflagword}{}
+\newcommand*{\postflagword}{}
+\newlength\contsep
+\newlength\contdrop
+% \end{macrocode}
+%
+% \iffalse
+%</continue>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*crop>
@@ -25832,7 +26969,6 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
-%
% \iffalse
%<*draftwatermark>
% \fi
@@ -26041,6 +27177,49 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
% \iffalse
+%<*endfloat>
+% \fi
+%
+% \part{lwarp-endfloat.sty}
+%
+% \section{endfloat}
+%
+% \DescribePackage{endfloat}
+% \pkg{endfloat} is ignored.
+%
+% \changes{v0.45}{2017/12/19}{\pkg{endfloat}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{endfloat}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\figureplace{}
+\newcommand\tableplace{}
+\newcommand\floatplace[1]{}
+\newcounter{posttable}
+\newcounter{postfigure}
+\newcommand*{\theposttbl}{}
+\newcommand*{\thepostfig}{}
+\newcommand{\AtBeginFigures}[1]{}
+\newcommand{\AtBeginTables}[1]{}
+\newcommand{\AtBeginDelayedFloats}[1]{}
+\newcommand*{\processdelayedfloats}{}
+\newcommand*{\efloatseparator}{}
+% \end{macrocode}
+%
+% \iffalse
+%</endfloat>
+% \fi
+%
+%
+%
+%
+%
+%
+% \iffalse
%<*endnotes>
% \fi
@@ -26206,7 +27385,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \end{macrocode}
% \begin{macrocode}
-\newcommand{\qitem}[2]
+\DeclareDocumentCommand{\qitem}{m m}
{
\begin{BlockClass}{qitem}
#1
@@ -26220,14 +27399,14 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \end{macrocode}
% \begin{macrocode}
-\newcommand{\epigraph}[2]
+\DeclareDocumentCommand{\epigraph}{m m}
{
\begin{LWR@BlockClassWP}{text-align:right}{}{epigraph}
\qitem{#1}{#2}
\end{LWR@BlockClassWP}
}
-\newenvironment*{epigraphs}
+\DeclareDocumentEnvironment{epigraphs}{}
{\LWR@BlockClassWP{text-align:right}{}{epigraph}}
{\endLWR@BlockClassWP}
% \end{macrocode}
@@ -26236,12 +27415,23 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
% The following are null commands for source compatibility:
% \begin{macrocode}
+\newenvironment*{flushepinormal}{}{}
+% \end{macrocode}
+%
+% \changes{v0.45}{2017/12/22}{\pkg{epigraph}: Support for \pkg{memoir}.}
+% \begin{macrocode}
+\@ifclassloaded{memoir}{
+\setlength{\epigraphwidth}{.5\linewidth}
+\renewcommand{\textflush}{flushepinormal}
+\renewcommand{\epigraphhead}[2][0]{#2}
+\renewcommand{\dropchapter}[1]{}
+\renewcommand*{\undodrop}{}
+}{% not memoir
\newlength{\epigraphwidth}
\setlength{\epigraphwidth}{.5\linewidth}
-\newenvironment*{flushepinormal}{}{}
-\newcommand{\textflush}[1]{flushepinormal}
-\newcommand{\epigraphflush}[1]{flushright}
-\newcommand{\sourceflush}[1]{flushright}
+\newcommand{\textflush}{flushepinormal}
+\newcommand{\epigraphflush}{flushright}
+\newcommand{\sourceflush}{flushright}
\newcommand*{\epigraphsize}{\small}
\newlength{\epigraphrule}
\newlength{\beforeepigraphskip}
@@ -26249,6 +27439,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\newcommand{\epigraphhead}[2][0]{#2}
\newcommand{\dropchapter}[1]{}
\newcommand*{\undodrop}{}
+}% not memoir
+
+\let\cleartoevenpage\relax% also in nextpage
\newcommand{\cleartoevenpage}[1][]{}
% \end{macrocode}
%
@@ -26574,7 +27767,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\def\endLandscape{}
% \end{macrocode}
%
-% Low-level patches for \env{Verbatim}, \env{VerbatimInput}, \env{UseVerbatim}:
+% Low-level patches for \env{UseVerbatim} and friends:
%
% \begin{macrocode}
\let\LWRFB@UseVerbatim\UseVerbatim
@@ -26760,6 +27953,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
% \changes{v0.34}{2017/07/27}{\pkg{fancyvrb}: Added, no longer required.}
+% \changes{v0.45}{2018/01/07}{\pkg{fancyvrb}: Improvements.}
%
% \codehtml
% \begin{macrocode}
@@ -26767,7 +27961,6 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\LWR@ProvidesPackagePass{fancyvrb}
% \end{macrocode}
%
-
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
@@ -26795,30 +27988,46 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\LWR@traceinfo{Patching Verbatim.}
% \end{macrocode}
%
-% Remember the original defintion of \env{Verbatim}:
+%
+% \changes{v0.45}{2018/01/07}{\pkg{fancyvrb}: Improvements.}
% \begin{macrocode}
-\let\LWRFV@origVerbatim\Verbatim
+\preto\FVB@Verbatim{\LWR@forcenewpage}
+\preto\FVB@LVerbatim{\LWR@forcenewpage}
+% \preto\FVB@BVerbatim{\LWR@forcenewpage}% Fails, so done below.
% \end{macrocode}
%
-%
-% \begin{environment}{Verbatim}
-%
-% Patched to place the environment in a |fancyvrb| div,
-% and the label in a |fancyvrblabel| div.
-% Also corrects the left margin for line numbers.
-% Also uses |VerbatimHTMLWidth| to control placement of line numbers on the right.
-% Aligning the right margin requires knowing the width.
-%
-% \changes{v0.20}{2016/12/24}{Added.}
-%
+% Simplified to remove \PDF\ formatting:
+% \changes{v0.45}{2018/01/07}{\pkg{fancyvrb}: Improvements.}
% \begin{macrocode}
-\renewcommand*{\Verbatim}{%
-\LWR@forcenewpage
-\LWRFV@origVerbatim%
+\def\FV@BeginListFrame@Single{%
+ \FV@SingleFrameLine{\z@}%
+}
+
+\def\FV@EndListFrame@Single{%
+ \FV@SingleFrameLine{\@ne}%
+}
+
+\def\FV@BeginListFrame@Lines{%
+ \FV@SingleFrameLine{\z@}%
+}
+
+\def\FV@EndListFrame@Lines{%
+ \FV@SingleFrameLine{\@ne}%
}
+
+\renewcommand*{\FV@SingleFrameSep}{}
% \end{macrocode}
-% \end{environment}
%
+% Adds \HTML\ formatting:
+% \begin{macrocode}
+\def\FV@BUseVerbatim#1{%
+ \LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
+ \FV@BVerbatimBegin#1\FV@BVerbatimEnd%
+ \LWR@afterendverbatim%
+}
+% \end{macrocode}
+
+
% \begin{macro}{\LWR@FVstyle} Holds the style of the verbatim.
% \begin{macrocode}
\newcommand*{\LWR@FVstyle}{}
@@ -26831,12 +28040,16 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
-\hbox to\z@{\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}}%
+% \hbox to\z@{
+\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
+% }%
}
\newcommand*{\LWR@fvendnone}{%
\LWR@traceinfo{fvendnone}%
-\hbox to\z@{\LWR@afterendverbatim}%
+% \hbox to\z@{
+\LWR@afterendverbatim%
+% }%
}
\newcommand*{\LWR@fvstartsingle}{%
@@ -26854,7 +28067,10 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\newcommand*{\LWR@fvstartline}{%
\LWR@traceinfo{fvstartline}%
\LWR@fvstartnone%
+% \setlength{\LWR@templengthone}{\baselineskip}%
\FV@BeginListFrame@Lines%
+% \setlength{\baselineskip}{\LWR@templengthone}%
+% \setlength{\baselineskip}{5pt}%
}
\newcommand*{\LWR@fvendline}{%
@@ -26942,7 +28158,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% Original code is from the \pkg{fancyvrb} package.
% \begin{macrocode}
\def\FV@SingleFrameLine#1{%
- \hbox to\z@{%
+% \hbox to\z@{%
% \kern\leftmargin
\ifnum#1=\z@\relax
\let\FV@Label\FV@LabelBegin
@@ -26966,15 +28182,15 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\ifx\FV@LabelPositionBottomLine\relax
\else
\LWR@FVfindbordercolor
+
\LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
\LWR@origtextrm{\FV@LabelEnd}
\LWR@htmltagc{/div}
\fi
\fi
-
\fi
- \hss
- }
+% \hss
+% }
}
% \end{macrocode}
%
@@ -27001,16 +28217,15 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \begin{environment}{BVerbatim}
% \begin{macrocode}
\AtBeginEnvironment{BVerbatim}
-{
-\LWR@forcenewpage
-\LWR@atbeginverbatim{bverbatim}
-
+{%
+\LWR@forcenewpage% instead of \preto
+\LWR@atbeginverbatim{bverbatim}%
}
\AfterEndEnvironment{BVerbatim}
-{
-\leavevmode\par\LWR@origvspace{-\baselineskip}
-\LWR@afterendverbatim
+{%
+\leavevmode\par\LWR@origvspace{-\baselineskip}%
+\LWR@afterendverbatim%
}
% \end{macrocode}
% \end{environment}
@@ -27233,6 +28448,33 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
%
% \iffalse
+%<*flafter>
+% \fi
+%
+% \part{lwarp-flafter.sty}
+%
+% \section{flafter}
+%
+% \DescribePackage{flafter}
+% \pkg{flafter} is ignored.
+%
+% \changes{v0.45}{2017/12/02}{\pkg{flafter}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{flafter}
+\providecommand\fl@trace[1]{}
+% \end{macrocode}
+%
+% \iffalse
+%</flafter>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*float>
% \fi
@@ -27259,7 +28501,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% See \cref{sec:listof} for the \cs{listof} command.
-% \begin{macro}{\newfloat} \marg{1: type} \marg{2: placement}
+% \begin{noindmacro}{\newfloat} \marg{1: type} \marg{2: placement}
% \marg{3: ext} \oarg{4: within}
%
% Emulates the \cs{newfloat} command from the \pkg{float} package.
@@ -27268,21 +28510,22 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
% \begin{macrocode}
\NewDocumentCommand{\newfloat}{m m m o}{%
-\IfValueTF{#4}
-{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}
-{\DeclareFloatingEnvironment[fileext=#3]{#1}}
+\IfValueTF{#4}%
+{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}%
+{\DeclareFloatingEnvironment[fileext=#3]{#1}}%
% \end{macrocode}
% \pkg{newfloat} package automatically creates the \cs{listof} command
% for new floats, but \pkg{float} does not,
% so remove \cs{listof} here in case it is manually created later.
+% ^^A required?
% \begin{macrocode}
-\cslet{listof#1s}\relax
-\cslet{listof#1es}\relax
+\cslet{listof#1s}\relax%
+\cslet{listof#1es}\relax%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\floatname} \marg{type} \marg{name}
+% \begin{noindmacro}{\floatname} \marg{type} \marg{name}
%
% Sets the text name of the float, such as ``Figure''.
% \begin{macrocode}
@@ -27290,9 +28533,9 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\SetupFloatingEnvironment{#1}{name=#2}%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\floatplacement} \marg{type} \marg{placement}
+% \begin{noindmacro}{\floatplacement} \marg{type} \marg{placement}
%
% Float placement is ignored.
% \begin{macrocode}
@@ -27300,25 +28543,25 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\SetupFloatingEnvironment{#1}{placement=#2}%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\floatstyle} \marg{style}
+% \begin{noindmacro}{\floatstyle} \marg{style}
%
% Float styles are ignored.
% \begin{macrocode}
\newcommand{\floatstyle}[1]{%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\restylefloat} * \marg{style}
+% \begin{noindmacro}{\restylefloat} * \marg{style}
%
% Float styles are ignored.
% \begin{macrocode}
\NewDocumentCommand{\restylefloat}{s m}{%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
% \iffalse
%</float>
@@ -27662,11 +28905,11 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \end{macrocode}
% Reset key values:
% \begin{macrocode}
-\renewcommand*{\LWR@frowkeyplacement}{}
-\renewcommand*{\LWR@frowkeyname}{}
-\renewcommand*{\LWR@frowkeyfileext}{}
-\renewcommand*{\LWR@frowkeywithin}{}
-\renewcommand*{\LWR@frowkeycapstyle}{}
+\renewcommand*{\LWR@frowkeyplacement}{}%
+\renewcommand*{\LWR@frowkeyname}{}%
+\renewcommand*{\LWR@frowkeyfileext}{}%
+\renewcommand*{\LWR@frowkeywithin}{}%
+\renewcommand*{\LWR@frowkeycapstyle}{}%
% \end{macrocode}
% Read new key values:
% \begin{macrocode}
@@ -27676,24 +28919,24 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \end{macrocode}
% Create a new float with optional [within]:
% \begin{macrocode}
-\ifthenelse{\equal{\LWR@frowkeywithin}{}}
-{
- \LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\
+\ifthenelse{\equal{\LWR@frowkeywithin}{}}%
+{%
+ \LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\ %
\LWR@frowkeyfileext}%
- \newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}
+ \newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}%
}%
{%
- \LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\
+ \LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\ %
\LWR@frowkeyfileext\ \LWR@frowkeywithin}%
\newfloat{#1}{\LWR@frowkeyplacement}%
{\LWR@frowkeyfileext}[\LWR@frowkeywithin]%
- \LWR@traceinfo{finished newfloat #1}
+ \LWR@traceinfo{finished newfloat #1}%
}%
% \end{macrocode}
% Rename the float if a name was given:
% \begin{macrocode}
-\ifthenelse{\equal{\LWR@frowkeyname}{}}
-{}
+\ifthenelse{\equal{\LWR@frowkeyname}{}}%
+{}%
{\floatname{#1}{\LWR@frowkeyname}}%
}
% \end{macrocode}
@@ -27778,6 +29021,38 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
%
%
+% \iffalse
+%<*fltrace>
+% \fi
+%
+% \part{lwarp-fltrace.sty}
+%
+% \section{fltrace}
+%
+% \DescribePackage{fltrace}
+% \pkg{fltrace} is ignored.
+%
+% \changes{v0.45}{2017/12/02}{\pkg{fltrace}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{fltrace}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\tracefloats{}
+\def\tracefloatsoff{}
+\def\tracefloatvals{}
+% \end{macrocode}
+%
+% \iffalse
+%</fltrace>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*flushend>
@@ -28080,7 +29355,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
}
% \let\fn@endnote\color@endgroup% *** conflicts with lwarp
-\newcommand*{\fn@endnote}{%
+\def\fn@endnote{%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
\LWR@orignewline%
}
@@ -28159,6 +29434,35 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
%
%
+% \iffalse
+%<*footnpag>
+% \fi
+%
+% \part{lwarp-footnpag.sty}
+%
+% \section{footnpag}
+%
+% \DescribePackage{footnpag}
+% \pkg{footnpag} is ignored.
+%
+% \changes{v0.45}{2017/12/19}{\pkg{footnpag}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{footnpag}
+% \end{macrocode}
+%
+% \iffalse
+%</footnpag>
+% \fi
+%
+%
+%
+%
+%
+%
+%
%
% \iffalse
%<*framed>
@@ -28202,14 +29506,14 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\renewenvironment{shaded}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{framed}%
+\BlockClass[background: \#\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
\renewenvironment{shaded*}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{framed}%
+\BlockClass[background: \#\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
@@ -28417,6 +29721,41 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
%
%
+% \iffalse
+%<*fwlw>
+% \fi
+%
+% \part{lwarp-fwlw.sty}
+%
+% \section{fwlw}
+%
+% \DescribePackage{fwlw}
+% \pkg{fwlw} is ignored.
+%
+% \changes{v0.45}{2017/12/19}{\pkg{fwlw}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{fwlw}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newbox\FirstWordBox \global\setbox\FirstWordBox\hbox{}
+\newbox\NextWordBox \global\setbox\NextWordBox\hbox{}
+\newbox\LastWordBox \global\setbox\LastWordBox\hbox{}
+\def\ps@fwlwhead{}
+\def\ps@NextWordFoot{}
+% \end{macrocode}
+%
+% \iffalse
+%</fwlw>
+% \fi
+%
+%
+%
+%
+%
%
% \iffalse
%<*geometry>
@@ -28794,6 +30133,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \changes{v0.29}{2017/04/15}{Fix: Error when no optional arguments.}
% \changes{v0.40}{2017/09/08}{Add: Full \cs{graphicspath} support.}
% \changes{v0.42}{2017/10/26}{Fix: Filename expansion.}
+% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
{%
@@ -28826,6 +30166,8 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\Ginclude@graphics{\detokenize\expandafter{#4}}%
\endgroup%
\filename@parse{\LWR@parsedfilename}%
+\LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
+% \LWR@sanitize{\LWR@parsedfilename}%
% \end{macrocode}
%
% For correct em sizing during the width and height conversions:
@@ -28911,8 +30253,11 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
{% start of href
\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
\LWR@htmltag{% start of image tags
-img src="\LWR@parsedfilename" \LWR@orignewline%
-\LWR@origtilde{} alt="[\filename@base]" \LWR@orignewline%
+% img src="\LWR@sanitized" \LWR@orignewline%
+img src="%
+\begingroup\@sanitize\LWR@parsedfilename\endgroup%
+" \LWR@orignewline%
+% \LWR@origtilde{} alt="[\filename@base]" \LWR@orignewline%
% \end{macrocode}
% Only include a style tag if a width, height, angle, or scale was given:
% \begin{macrocode}
@@ -28954,7 +30299,6 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@origtilde{} class="\LWR@igclass" \LWR@orignewline%
}% end of image tags
}% end of href
-\endgroup
% \end{macrocode}
% Return to small-sized output:
% \begin{macrocode}
@@ -28985,10 +30329,8 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% This graphic should trigger an \HTML\ paragraph even if alone,
% so ensure that are doing paragraph handling:
% \begin{macrocode}
-\LWR@traceinfo{includegraphics}
+\LWR@traceinfo{includegraphics}%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
\LWR@includegraphicsb%
}% includegraphics
}% AtBeginDocument
@@ -29079,7 +30421,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@rotstyle{-ms-}{#2} %
\LWR@rotstyle{-webkit-}{#2} %
\LWR@rotstyle{}{#2} %
-"{}}\LWR@orignewline%
+"}\LWR@orignewline%
% \end{macrocode}
% Print the text to be rotated:
% \begin{macrocode}
@@ -29111,7 +30453,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
\LWR@scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
\LWR@scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
-"{}}%
+"}%
% \end{macrocode}
% Print the text to be scaled:
% \begin{macrocode}
@@ -29231,6 +30573,8 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
%
% \section{hang}
%
+% \credits{Andreas Nolda}
+%
% \DescribePackage{hang}
% \pkg{hang} is emulated.
%
@@ -29314,6 +30658,80 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
%
%
%
+% \iffalse
+%<*hanging>
+% \fi
+%
+% \part{lwarp-hanging.sty}
+%
+% \section{hanging}
+%
+% \DescribePackage{hanging}
+% \pkg{hanging} is emulated.
+%
+% \changes{v0.45}{2017/12/02}{\pkg{hanging}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{hanging}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\@ifclassloaded{memoir}{
+\let\hangpara\relax
+\let\hangparas\relax
+\let\endhangparas\relax
+\let\hangpunct\relax
+\let\endhangpunct\relax
+}{}
+% \end{macrocode}
+%
+% \begin{noindmacro}{\hangpara} \marg{indent} \marg{afternum}
+%
+% \textcolor{red}{Use \env{hangparas} instead.}
+% \begin{macrocode}
+\newcommand*{\hangpara}[2]{}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindenvironment}{hangparas} \marg{indent} \marg{afternum}
+% \begin{macrocode}
+\newenvironment*{hangparas}[2]
+{%
+ \uselengthunit{PT}%
+ \BlockClass[%
+ margin-left:\rndprintlength{#1}; %
+ text-indent:-\rndprintlength{#1}%
+ ]%
+ {hangingpar}%
+}
+{\endBlockClass}
+% \end{macrocode}
+% \end{noindenvironment}
+%
+% \begin{noindenvironment}{hangpunct}
+% \begin{macrocode}
+\newenvironment*{hangpunct}
+{\BlockClass{hangpunct}}
+{\endBlockClass}
+% \end{macrocode}
+% \end{noindenvironment}
+%
+% \begin{macrocode}
+\newcommand{\nhpt}{.}
+\newcommand{\nhlq}{‘}
+\newcommand{\nhrq}{’}
+% \end{macrocode}
+%
+% \iffalse
+%</hanging>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*hyperref>
@@ -29353,17 +30771,14 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% Insert an image with alt text:
%
% \changes{v0.43}{2017/10/31}{\pkg{hyperref}: Made robust.}
+% \changes{v0.45}{2017/12/29}{Improved filenames with underscores.}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@hyperimageb}{m +m}{%
-\LWR@htmltag{img src="#1" alt="#2" class="hyperimage"{}}%
-\endgroup%
+\NewDocumentCommand{\hyperimage}{m +m}{%
\LWR@ensuredoingapar%
-}
-
-\DeclareRobustCommand*{\hyperimage}{%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\LWR@htmltag{img src="\LWR@templink" alt="#2" class="hyperimage"}%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@hyperimageb%
}
% \end{macrocode}
% \end{noindmacro}
@@ -29377,7 +30792,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \begin{macrocode}
\NewDocumentCommand{\hyperdef}{m m +m}{%
\LWR@ensuredoingapar%
-\LWR@subsublabel{#1.#2}%
+\LWR@sublabel{#1.#2}%
#3%
}
% \end{macrocode}
@@ -29386,14 +30801,22 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
%
% \begin{noindmacro}{\LWR@hyperrefb} \marg{1: URL} \marg{2: category}
% \marg{3: name} \marg{4: text}
+% \changes{v0.45}{2018/01/02}{\pkg{hyperref}: Fix for underscores in \cs{hyperref}.}
%
% Creates an \HTML\ link to |URL#category.name| with the given text.
% \begin{macrocode}
\NewDocumentCommand{\LWR@hyperrefb}{m m m +m}{%
-\LWR@htmltag{a href="#1\LWR@hashmark#2.#3"}%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\def\LWR@templinktwo{#2}%
+\@onelevel@sanitize\LWR@templinktwo%
+\def\LWR@templinkthree{#3}%
+\@onelevel@sanitize\LWR@templinkthree%
+\LWR@htmltag{a href="\LWR@templink\LWR@hashmark%
+ \LWR@templinktwo.\LWR@templinkthree"%
+}%
#4%
\LWR@htmltag{/a}%
-\endgroup%
}
% \end{macrocode}
% \end{noindmacro}
@@ -29406,7 +30829,6 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@startref{#1}%
#2%
\LWR@htmltag{/a}%
-\endgroup%
}
% \end{macrocode}
% \end{noindmacro}
@@ -29419,7 +30841,6 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \begin{macrocode}
\DeclareRobustCommand*{\hyperref}{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
\@ifnextchar[\LWR@hyperrefc\LWR@hyperrefb%
}
% \end{macrocode}
@@ -29445,8 +30866,9 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% Creates a link to the anchor created by hypertarget,
% with the given link text.
%
+% Declared because also defined by \pkg{memoir}.
% \begin{macrocode}
-\NewDocumentCommand{\hyperlink}{m +m}{%
+\DeclareDocumentCommand{\hyperlink}{m +m}{%
\hyperref[#1]{#2}%
}
% \end{macrocode}
@@ -30947,6 +32369,22 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
%
% \changes{v0.17}{2016/04/14}{\pkg{mdframed}: Added.}
%
+%
+% \subsection{Limitations}
+%
+% \limitsmdframed
+%
+% Environments created or encapsulated by \pkg{mdframed} are enclosed in a
+% \margintag{CSS classes}
+% \element{div} of class |md<environmentname>|, or |mdframed| otherwise.
+%
+% Frame titles are placed into a \element{span} of class |mdframedtitle|.
+% Subtitles are in a \element{span} of class |mdframedsubtitle|,
+% and likewise for subsubtitles.
+%
+% Pre-existing hooks are used to patch extra functions before and after the frames.
+%
+%
% \subsection{Package loading}
%
% \codehtml
@@ -30967,21 +32405,41 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \end{macrocode}
%
%
-% \subsection{Limitations}
+% \subsection{Patches}
%
-% \limitsmdframed
-%
-% Environments created or encapsulated by \pkg{mdframed} are enclosed in a
-% \margintag{CSS classes}
-% \element{div} of class |md<environmentname>|, or |mdframed| otherwise.
-%
-% Frame titles are placed into a \element{span} of class |mdframedtitle|.
-% Subtitles are in a \element{span} of class |mdframedsubtitle|,
-% and likewise for subsubtitles.
-%
-% Pre-existing hooks are used to patch extra functions before and after the frames.
+% Patch to remove \PDF\ formatting and add \HTML\ tags:
+% \begin{macrocode}
+\AtBeginDocument{
+\def\mdf@trivlist#1{%
+ \edef\mdf@temp{%
+% \topsep=\the\topsep\relax%
+% \partopsep=\the\partopsep\relax%
+% \parsep=\the\parsep\relax%
+ }%
+% \setlength{\topsep}{#1}%
+% \topskip\z@%
+% \partopsep\z@%
+% \parsep\z@%
+% \@nmbrlistfalse%
+% \@trivlist%
+% \labelwidth\z@%
+% \leftmargin\z@%
+% \itemindent\z@%
+ \let\@itemlabel\@empty%
+ \def\makelabel##1{##1}%
+% \item\relax\mdf@temp\relax%
+}
+
+\renewcommand*{\endmdf@trivlist}{%
+\LWR@traceinfo{endmdf@trivlist}%
+% \endtrivlist%
+\LWR@listend%
+}
+}% AtBeginDocument
+% \end{macrocode}
%
%
+% \subsection{Initial setup}
%
% ^^A \DescribeMacro{\mdfsetup}
% To handle CSS and paragraphs,
@@ -31032,6 +32490,7 @@ endinnercode={\LWR@stoppars},
% Encapsulate a frame inside a \element{div} of the desired |class|.
% \begin{macrocode}
\newcommand*{\LWR@mdframedstart}{%
+\LWR@traceinfo{LWR@mdframedstart start}%
% \end{macrocode}
% Turn off paragraph handling during the generation of
% the encapsulating tags:
@@ -31082,6 +32541,8 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
\LetLtxMacro{\hspace}{\LWR@orighspace}%
\LetLtxMacro\rule\LWR@origrule%
\LetLtxMacro\makebox\LWR@origmakebox%
+\LWR@startpars%
+\LWR@traceinfo{LWR@mdframedstart done}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -31092,6 +32553,7 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
% After closing the \element{div}, globally restore to the default environment type:
% \begin{macrocode}
\newcommand*{\LWR@mdframedend}{
+\LWR@traceinfo{LWR@mdframedend start}%
% \end{macrocode}
% Close the custom \element{div}:
% \begin{macrocode}
@@ -31104,6 +32566,70 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
% Resume paragraph handling:
% \begin{macrocode}
\LWR@startpars%
+\LWR@traceinfo{LWR@mdframedend done}%
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+% \subsection{Mdframed environment}
+%
+% \changes{v0.46}{2018/01/21}{\pkg{mdframed}: Fixes for \SVG\ math or \env{lateximage} in title.}
+% \begin{macrocode}
+\renewenvironment{mdframed}[1][]{%
+ \color@begingroup%
+ \mdfsetup{userdefinedwidth=\linewidth,#1}%
+ \mdf@startcode%
+ \mdf@preenvsetting%
+ \ifdefempty{\mdf@firstframetitle}{}%
+ {\let\mdf@frametitlesave\mdf@frametitle%
+ \let\mdf@frametitle\mdf@firstframetitle%
+ }%
+ \ifvmode\nointerlineskip\fi%
+ \ifdefempty{\mdf@frametitle}{}%
+ {\mdfframedtitleenv{\mdf@frametitle}%
+% \mdf@@frametitle@use%
+ }%
+ \mdf@trivlist{\mdf@skipabove@length}%%
+ \mdf@settings%
+% \mdf@lrbox{\mdf@splitbox@one}%
+% \mdf@startinnercode%
+ }%
+ {%
+% \mdf@@ignorelastdescenders%
+ \par%
+% \unskip\ifvmode\nointerlineskip\hrule \@height\z@ \@width\hsize\fi%%
+ \ifmdf@footnoteinside%
+ \def\mdf@reserveda{%
+ \mdf@footnoteoutput%
+% \mdf@endinnercode%
+% \endmdf@lrbox%
+% \ifdefempty{\mdf@frametitle}{}%
+% {\mdfframedtitleenv{\mdf@frametitle}\mdf@@frametitle@use}%
+% \detected@mdf@put@frame
+ }%
+ \else%
+ \def\mdf@reserveda{%
+% \mdf@endinnercode%
+% \endmdf@lrbox%
+% \ifdefempty{\mdf@frametitle}{}%
+% {\mdfframedtitleenv{\mdf@frametitle}\mdf@@frametitle@use}%
+% \detected@mdf@put@frame%
+ \mdf@footnoteoutput%
+ }%
+ \fi%
+ \mdf@reserveda%
+ \aftergroup\endmdf@trivlist%
+ \color@endgroup%
+ \mdf@endcode%
+}
+% \end{macrocode}
+%
+% \changes{v0.46}{2018/01/21}{\pkg{mdframed}: Fixes for footnotes.}
+% \begin{noindmacro}{\mdf@footnoteoutput}
+% \begin{macrocode}
+\renewrobustcmd*\mdf@footnoteoutput{%
+ \LWR@printpendingmpfootnotes%
}
% \end{macrocode}
% \end{noindmacro}
@@ -31121,7 +32647,8 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
\newlength{\LWR@titleroundcorner}
\renewrobustcmd\mdfframedtitleenv[1]{%
-\LWR@origmdfframedtitleenv{%
+\LWR@traceinfo{LWR@mdframedtitleenv start}%
+% \LWR@origmdfframedtitleenv{%
% \end{macrocode}
% Below, print \HTML\ pt lengths:
% \begin{macrocode}
@@ -31175,7 +32702,8 @@ border-radius:
% \begin{macrocode}
\LWR@htmltagc{/span}%
\end{LWR@nestspan}%
-}
+% }
+\LWR@traceinfo{LWR@mdframedtitleenv end}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -31191,6 +32719,7 @@ border-radius:
\NewDocumentCommand{\LWR@mdfsubtitlecommon}{m o m}
{% the following empty line is required
+\LWR@traceinfo{LWR@mdframedsubtitlecommon start}%
% \end{macrocode}
% Special handling for mdframed:
% Subtitles have \cs{par}s around them,
@@ -31248,14 +32777,13 @@ background:
\LWR@htmltagc{/span}% the following empty line is required
\end{LWR@nestspan}% must follow the /span or an extra <p> appears
+\LWR@traceinfo{LWR@mdframedsubtitlecommon end}%
}
% \end{macrocode}
% \end{noindmacro}
%
% \begin{noindmacro}{\LWR@mdfsubtitle} \oarg{options} \marg{title}
% \begin{macrocode}
-\let\LWR@origmdfsubtitle\mdfsubtitle
-
\newcommand*{\LWR@mdfsubtitle}{%
\LWR@mdfsubtitlecommon{sub}%
}
@@ -31266,8 +32794,6 @@ background:
%
% \begin{noindmacro}{\LWR@mdfsubsubtitle} \oarg{options} \marg{title}
% \begin{macrocode}
-\let\LWR@origmdfsubsubtitle\mdfsubsubtitle
-
\newcommand*{\LWR@mdfsubsubtitle}{%
\LWR@mdfsubtitlecommon{subsub}%
}
@@ -31316,7 +32842,7 @@ background:
% \end{noindmacro}
%
%
-% \begin{noindmacro}{\mdtheorem} \oarg{mdframed-options}{envname}
+% \begin{noindmacro}{\mdtheorem} \oarg{mdframed-options} \marg{envname}
% \oarg{numberedlike} \marg{caption} \oarg{within}
%
% Modified from the original to remember the environment.
@@ -31416,7 +32942,7 @@ background:
% \end{noindmacro}
%
%
-% \begin{noindmacro}{\newmdtheoremenv} \oarg{mdframed-options}{envname}
+% \begin{noindmacro}{\newmdtheoremenv} \oarg{mdframed-options} \marg{envname}
% \oarg{numberedlike} \marg{caption} \oarg{within}
%
% Modified from the original to remember the environment.
@@ -31446,6 +32972,33 @@ background:
%
%
% \iffalse
+%<*memhfixc>
+% \fi
+%
+% \part{lwarp-memhfixc.sty}
+%
+% \section{memhfixc}
+%
+% \DescribePackage{memhfixc}
+% \pkg{memhfixc} is ignored.
+%
+% \changes{v0.45}{2018/01/03}{\pkg{memhfixc}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{memhfixc}
+% \end{macrocode}
+%
+% \iffalse
+%</memhfixc>
+% \fi
+%
+%
+%
+%
+%
+% \iffalse
%<*metalogo>
% \fi
%
@@ -31582,6 +33135,38 @@ background:
%
%
%
+% \iffalse
+%<*midpage>
+% \fi
+%
+% \part{lwarp-midpage.sty}
+%
+% \section{midpage}
+%
+% \DescribePackage{midpage}
+% \pkg{midpage} is ignored.
+%
+% \changes{v0.39}{2017/08/27}{\pkg{midpage}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{midpage}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newenvironment{midpage}
+{\begin{BlockClass}[margin-top:6ex ; margin-bottom:6ex]{midpage}}
+{\end{BlockClass}}
+% \end{macrocode}
+%
+% \iffalse
+%</midpage>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*moreverb>
@@ -31609,8 +33194,6 @@ background:
\LWR@ProvidesPackagePass{moreverb}
% \end{macrocode}
%
-%
-%
% \begin{macrocode}
\BeforeBeginEnvironment{verbatimtab}{%
\LWR@forcenewpage
@@ -31685,11 +33268,12 @@ background:
\renewenvironment*{boxedverbatim}
{
\LWR@forcenewpage
-\LWR@atbeginverbatim{boxedverbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{boxedverbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
\verbatim%
}
{
\endverbatim%
+\unskip%
\LWR@afterendverbatim%
}
@@ -31804,7 +33388,7 @@ background:
% \begin{macrocode}
\NewDocumentEnvironment{multicols}{s m o}
% \end{macrocode}
-% \HTML\ \element{div} class to contain everything:
+% HTML \element{div} class to contain everything:
% \begin{macrocode}
{
\LWR@forcenewpage
@@ -31907,7 +33491,7 @@ background:
% \begin{macrocode}
\RenewDocumentCommand{\multirow}{O{c} m o m o +m}%
{%
-\LWR@traceinfo{*** multirow #1 #2 #4}
+\LWR@traceinfo{*** multirow #1 #2 #4}%
\LWR@maybenewtablerow%
\LWR@tabularleftedge%
% \end{macrocode}
@@ -32058,6 +33642,63 @@ class="td%
%
%
%
+% \iffalse
+%<*natbib>
+% \fi
+%
+% \part{lwarp-natbib.sty}
+
+% \section{natbib}
+%
+% \credits{Patrick W. Daly}
+%
+% \DescribePackage{natbib}
+% \pkg{natbib} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.45}{2018/01/13}{\pkg{natbib}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{natbib}
+% \end{macrocode}
+%
+% Replace math $<$ and $>$ with \cs{textless} and \cs{textgreater}:
+%
+% A macro to compare:
+% \begin{macrocode}
+\newcommand{\LWRNB@NAT@open}{$<$}
+% \end{macrocode}
+% To patch \cs{NAT@open} and \cs{NAT@close}
+% \begin{macrocode}
+\newcommand{\LWRNB@patchnatbibopenclose}{
+\ifdefstrequal{\NAT@open}{\LWRNB@NAT@open}
+{
+ \renewcommand{\NAT@open}{\textless}
+ \renewcommand{\NAT@close}{\textgreater}
+}{}
+}
+% \end{macrocode}
+% Do it now in case |angle| was selected as an option:
+% \begin{macrocode}
+\LWRNB@patchnatbibopenclose
+% \end{macrocode}
+% Also patch \cs{setcitestyle} to patch after settings are made:
+% \begin{macrocode}
+\let\LWRNB@origsetcitestyle\setcitestyle
+
+\renewcommand{\setcitestyle}[1]{%
+\LWRNB@origsetcitestyle{#1}%
+\LWRNB@patchnatbibopenclose%
+}
+% \end{macrocode}
+
+% \iffalse
+%</natbib>
+% \fi
+%
+%
+%
%
%
%
@@ -32082,7 +33723,7 @@ class="td%
% \begin{macrocode}
\LWR@ProvidesPackageDrop{needspace}
-\newcommand*{\needspace}[1]{}
+\DeclareDocumentCommand{\needspace}{m}{}
\DeclareDocumentCommand{\Needspace}{s m}{}
% \end{macrocode}
@@ -32183,10 +33824,10 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newcommand{\cleartoevenpage}[1][]{}
-\newcommand{\movetoevenpage}[1][]{}
-\newcommand{\cleartooddpage}[1][]{}
-\newcommand{\movetooddpage}[1][]{}
+\DeclareDocumentCommand{\cleartoevenpage}{o}{}
+\DeclareDocumentCommand{\movetoevenpage}{o}{}
+\DeclareDocumentCommand{\cleartooddpage}{o}{}
+\DeclareDocumentCommand{\movetooddpage}{o}{}
% \end{macrocode}
% \iffalse
@@ -32320,6 +33961,7 @@ class="td%
% \pkg{ntheorem} is patched for use by \pkg{lwarp}.
%
% \changes{v0.25}{2017/03/22}{\pkg{ntheorem}: Added.}
+% \changes{v0.46}{2018/01/22}{\pkg{ntheorem}: Adapted to \env{trivlist} changes.}
%
% \begin{table}[ht]
% \hrule
@@ -32391,6 +34033,87 @@ class="td%
\newcommand{\LWR@newtheoremstyle}{plain}
% \end{macrocode}
%
+%
+% \begin{macrocode}
+\AtBeginDocument{
+\@ifpackageloaded{cleveref}{
+\gdef\@thm#1#2#3{%
+ \if@thmmarks
+ \stepcounter{end\InTheoType ctr}%
+ \fi
+ \renewcommand{\InTheoType}{#1}%
+ \if@thmmarks
+ \stepcounter{curr#1ctr}%
+ \setcounter{end#1ctr}{0}%
+ \fi
+ \refstepcounter[#1]{#2}% <<< cleveref modification
+ \theorem@prework
+ \LWR@forcenewpage% new
+ \BlockClass{theorembody#1}%\LWR@thisthmstyle% new
+ \trivlist % latex's \trivlist, calling latex's \@trivlist unchanged
+ \ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist
+ \ifthm@inframe
+ \thm@topsep\theoreminframepreskipamount
+ \thm@topsepadd\theoreminframepostskipamount
+ \else
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd\theorempostskipamount
+ \fi
+ \else% oldframeskips
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd \theorempostskipamount
+ \ifvmode\advance\thm@topsepadd\partopsep\fi
+ \fi
+ \@topsep\thm@topsep
+ \@topsepadd\thm@topsepadd
+ \advance\linewidth -\theorem@indent
+ \advance\linewidth -\theorem@rightindent
+ \advance\@totalleftmargin \theorem@indent
+ \parshape \@ne \@totalleftmargin \linewidth
+ \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}
+}
+}{% not @ifpackageloaded{cleveref}
+\gdef\@thm#1#2#3{%
+ \if@thmmarks
+ \stepcounter{end\InTheoType ctr}%
+ \fi
+ \renewcommand{\InTheoType}{#1}%
+ \if@thmmarks
+ \stepcounter{curr#1ctr}%
+ \setcounter{end#1ctr}{0}%
+ \fi
+ \refstepcounter{#2}%
+ \theorem@prework
+ \LWR@forcenewpage% new
+ \BlockClass{theorembody#1}%\LWR@thisthmstyle% new
+ \trivlist % latex's \trivlist, calling latex's \@trivlist unchanged
+ \ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist
+ \ifthm@inframe
+ \thm@topsep\theoreminframepreskipamount
+ \thm@topsepadd\theoreminframepostskipamount
+ \else
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd\theorempostskipamount
+ \fi
+ \else% oldframeskips
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd \theorempostskipamount
+ \ifvmode\advance\thm@topsepadd\partopsep\fi
+ \fi
+ \@topsep\thm@topsep
+ \@topsepadd\thm@topsepadd
+ \advance\linewidth -\theorem@indent
+ \advance\linewidth -\theorem@rightindent
+ \advance\@totalleftmargin \theorem@indent
+ \parshape \@ne \@totalleftmargin \linewidth
+ \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}
+}
+}
+}% AtBeginDocument
+% \end{macrocode}
+%
+%
+%
% Patched to remember the style being used for new theorems:
% \begin{macrocode}
\gdef\theoremstyle#1{%
@@ -32476,7 +34199,7 @@ class="td%
\newcommand{\LWR@inctheorem}{%
\addtocounter{LWR@thisautoid}{1}%
\LWR@stoppars%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
\LWR@startpars%
}
% \end{macrocode}
@@ -32499,15 +34222,11 @@ class="td%
\expandafter\@ifundefined{th@#1}%
{\expandafter\gdef\csname th@#1\endcsname{%
\def\@begintheorem####1####2{%
-\LWR@forcenewpage% new
-\BlockClass{theorembody#1}%\LWR@thisthmstyle% new
-\LWR@inctheorem% new
-#2}%
+ \LWR@inctheorem% new
+ #2}%
\def\@opargbegintheorem####1####2####3{%
-\LWR@forcenewpage% new
-\BlockClass{theorembody#1}%\LWR@thisthmstyle% new
-\LWR@inctheorem% new
-#3}%
+ \LWR@inctheorem% new
+ #3}%
}%
}%
{\PackageError{\basename}{Theorem style #1 already defined}\@eha}
@@ -32518,96 +34237,76 @@ class="td%
%
% \begin{macrocode}
\renewtheoremstyle{plain}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
\renewtheoremstyle{break}%
{\item[
-% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}{##1\ ##2\theorem@separator}\newline
-% }\hbox{\strut}}}
]}%
{\item[
-% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}%
{##1\ ##2\ (##3)\theorem@separator}\newline
-% }\hbox{\strut}}}
]}
\renewtheoremstyle{change}%
- {\item[\hskip\labelsep
- \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderchange}{##2\ ##1\theorem@separator}]}%
- {\item[\hskip\labelsep
- \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderchange}{##2\ ##1\ (##3)\theorem@separator}]}
\renewtheoremstyle{changebreak}%
{\item[
-% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderchangebreak}%
{##2\ ##1\theorem@separator}\newline
-% }\hbox{\strut}}}
]}%
{\item[
-% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderchangebreak}%
{##2\ ##1\ (##3)\theorem@separator}\newline
-% }\hbox{\strut}}}
]}
\renewtheoremstyle{margin}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermargin}{##2 \qquad ##1\theorem@separator}
]}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermargin}{##2 \qquad ##1\ (##3)\theorem@separator}
]}
\renewtheoremstyle{marginbreak}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermarginbreak}%
{##2 \qquad ##1\theorem@separator}\newline
]}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermarginbreak}%
{##2 \qquad ##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{nonumberplain}%
- {\item[\theorem@headerfont\hskip\labelsep
+ {\item[
\InlineClass{theoremheaderplain}{##1\theorem@separator}]}%
- {\item[\theorem@headerfont\hskip \labelsep
+ {\item[
\InlineClass{theoremheaderplain}{##1\ (##3)\theorem@separator}]}
\renewtheoremstyle{nonumberbreak}%
{\item[
-% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}{##1\theorem@separator}\newline
-% }\hbox{\strut}}}
]}%
{\item[
-% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}{##1\ (##3)\theorem@separator}\newline
-% }\hbox{\strut}}}
]}
\renewtheoremstyle{empty}%
{\item[]}%
- {\item[\theorem@headerfont \hskip\labelsep\relax
+ {\item[
\InlineClass{theoremheaderplain}{##3}]}
\renewtheoremstyle{emptybreak}%
{\item[]}%
- {\item[\theorem@headerfont \hskip\labelsep\relax
+ {\item[
\InlineClass{theoremheaderplain}{##3}] \ \newline}
% \end{macrocode}
%
@@ -32618,18 +34317,21 @@ class="td%
% objects which are not a purely plain style:
% \begin{macrocode}
\ifbool{LWR@ntheoremamsthm}{}{%
-% upright text via CSS
+% \end{macrocode}
+% Upright text via CSS:
+% \begin{macrocode}
\newtheoremstyle{plainupright}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
-
-% upright text and small caps header via CSS
+% \end{macrocode}
+% Upright text and small caps header via CSS:
+% \begin{macrocode}
\newtheoremstyle{nonumberplainuprightsc}%
- {\item[\theorem@headerfont\hskip\labelsep
+ {\item[
\InlineClass{theoremheadersc}{##1\theorem@separator}]}%
- {\item[\theorem@headerfont\hskip \labelsep
+ {\item[
\InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]}
}% not amsthm
% \end{macrocode}
@@ -32640,6 +34342,26 @@ class="td%
% The following standard configuration is renewed using the new \CSS:
% \begin{macrocode}
\ifbool{LWR@ntheoremamsthm}{}{%
+ \theoremnumbering{arabic}
+ \theoremstyle{plain}
+ \RequirePackage{latexsym}
+ \theoremsymbol{\Box}
+ \theorembodyfont{\itshape}
+ \theoremheaderfont{\normalfont\bfseries}
+ \theoremseparator{}
+ \renewtheorem{Theorem}{Theorem}
+ \renewtheorem{theorem}{Theorem}
+ \renewtheorem{Satz}{Satz}
+ \renewtheorem{satz}{Satz}
+ \renewtheorem{Proposition}{Proposition}
+ \renewtheorem{proposition}{Proposition}
+ \renewtheorem{Lemma}{Lemma}
+ \renewtheorem{lemma}{Lemma}
+ \renewtheorem{Korollar}{Korollar}
+ \renewtheorem{korollar}{Korollar}
+ \renewtheorem{Corollary}{Corollary}
+ \renewtheorem{corollary}{Corollary}
+
\theoremstyle{plainupright}
\theorembodyfont{\upshape}
\theoremsymbol{\HTMLunicode{25A1}}% UTF-8 white box
@@ -32678,133 +34400,91 @@ class="td%
\gdef\th@plain{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderplain}{##1\ ##2.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3).}
]}}
\gdef\th@nonumberplain{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderplain}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderplain}{##1\ (##3).}
]}}
\gdef\th@definition{%
\def\theorem@headerfont{\normalfont\bfseries}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderdefinition}{##1\ ##2.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderdefinition}{##1\ ##2\ (##3).}
]}}
\gdef\th@nonumberdefinition{%
\def\theorem@headerfont{\normalfont\bfseries}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderdefinition}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderdefinition}{##1\ (##3).}
]}}
\gdef\th@remark{%
\def\theorem@headerfont{\itshape}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderremark}{##1\ ##2.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderremark}{##1\ ##2\ (##3).}
]}}
\gdef\th@nonumberremark{%
\def\theorem@headerfont{\itshape}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderremark}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderremark}{##1\ (##3).}
]}}
\gdef\th@proof{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyproof}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderproof}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyroof}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
-% \theorem@headerfont
+ \item[
\InlineClass{theoremheaderproof}{##1\ (##3).}
]}}
@@ -32845,7 +34525,7 @@ class="td%
\setendmarkfalse%
\fi%
}{}%
-\LWR@origendtheorem%
+\LWR@origendtheorem% also does \@endtrivlist
\ifbool{LWR@ntheoremmarks}{\global\setendmarktrue}{}%
\endBlockClass%
}
@@ -33006,6 +34686,31 @@ class="td%
%
%
%
+% \iffalse
+%<*pagesel>
+% \fi
+%
+% \part{lwarp-pagesel.sty}
+%
+% \section{pagesel}
+%
+% \DescribePackage{pagesel}
+% \pkg{pagesel} is ignored.
+%
+% \changes{v0.45}{2017/12/24}{\pkg{pagesel}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{pagesel}
+% \end{macrocode}
+%
+% \iffalse
+%</pagesel>
+% \fi
+%
+%
+%
%
% \iffalse
%<*paralist>
@@ -33098,7 +34803,7 @@ class="td%
%
% \section{pdflscape}
%
-% \DescribePackage{pdflscape} Emulated.
+% \DescribePackage{pdflscape} \pkg{pdflscape} is ignored.
%
% \changes{v0.34}{2017/08/03}{\pkg{pdflscape}: Added.}
%
@@ -33254,6 +34959,41 @@ class="td%
%
%
%
+%
+%
+% \iffalse
+%<*prettyref>
+% \fi
+%
+% \part{lwarp-prettyref.sty}
+
+% \section{prettyref}
+%
+% \credits{Kevin S. Ruland}
+%
+% \DescribePackage{prettyref}
+% \pkg{prettyref} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.45}{2017/12/11}{\pkg{prettyref}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{prettyref}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newrefformat{fig}{Figure \ref{#1}}
+\newrefformat{tab}{Table \ref{#1}}
+% \end{macrocode}
+
+% \iffalse
+%</prettyref>
+% \fi
+%
+%
+%
+%
% \iffalse
%<*preview>
% \fi
@@ -33713,23 +35453,27 @@ class="td%
%
% \begin{macrocode}
\RenewDocumentCommand{\newfloat}{m m m o}{%
-\IfValueTF{#4}
-{
- \DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}
-}
-{
- \DeclareFloatingEnvironment[fileext=#3]{#1}
- \DeclareFloatingEnvironment[fileext=#3]{sideways#1}
-}
-\csletcs{sideways#1}{#1}
-\csletcs{endsideways#1}{end#1}
+\IfValueTF{#4}%
+{%
+ \DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}%
+}%
+{%
+ \DeclareFloatingEnvironment[fileext=#3]{#1}%
+% \end{macrocode}
+% ^^A required:??
+% \begin{macrocode}
+ \DeclareFloatingEnvironment[fileext=#3]{sideways#1}%
+}%
+\csletcs{sideways#1}{#1}%
+\csletcs{endsideways#1}{end#1}%
% \end{macrocode}
% \pkg{newfloat} package automatically creates the \cs{listof} command
% for new floats, but \pkg{float} does not,
% so remove \cs{listof} here in case it is manually created later.
+% ^^A *8* keep the below?
% \begin{macrocode}
-\cslet{listof#1s}\relax
-\cslet{listof#1es}\relax
+\cslet{listof#1s}\relax%
+\cslet{listof#1es}\relax%
}
% \end{macrocode}
% \end{macro}
@@ -35060,24 +36804,30 @@ class="td%
\ifdim\dimen@>\FBso@max
\global\FBso@max\dimen@
\fi}%
- \vtop\bgroup
- \vbox\bgroup
+% \end{macrocode}
+% Do not use boxes, which interfere with |lateximage|s:
+% \changes{v0.45}{2018/01/12}{\pkg{subfig}: Fix: Math in subcaptions.}
+% \begin{macrocode}
+% \vtop%
+ \bgroup
+% \vbox%
+ \bgroup
\ifcase\@tempcnta
\@minipagefalse
\or
- \vskip\sf@top
+% \vskip\sf@top
\or
\ifdim \lastskip=\z@ \else
- \@tempskipb\sf@top\relax\@xaddvskip
+% \@tempskipb\sf@top\relax\@xaddvskip
\fi
\fi
\sf@ifpositiontop{%
\ifx \@empty#3\relax \else
\sf@subcaption{#1}{#2}{#3}%
- \vskip\sf@capskip
- \vskip\sf@captopadj
+% \vskip\sf@capskip
+% \vskip\sf@captopadj
\fi\egroup
- \hrule width0pt height0pt depth0pt
+% \hrule width0pt height0pt depth0pt
\LWR@startpars% new
% \box\@tempboxa
#4
@@ -35099,12 +36849,12 @@ class="td%
\LWR@stoppars% new
\egroup
\ifx \@empty#3\relax \else
- \vskip\sf@capskip
- \hrule width0pt height0pt depth0pt
+% \vskip\sf@capskip
+% \hrule width0pt height0pt depth0pt
\sf@subcaption{#1}{#2}{#3}%
\fi
}%
- \vskip\sf@bottom
+% \vskip\sf@bottom
\egroup
\@ifundefined{FBsc@max}{}%
{\addtocounter{FRobj}{-1}%
@@ -35162,7 +36912,10 @@ class="td%
{\@nameuse{sub\@captype name}}%
{\@nameuse{thesub\@captype}}%
{#3}
- \LWR@figcaption% new
+% \end{macrocode}
+% \changes{v0.45}{2017/12/18}{\pkg{subfig}: Fix for subcaption end tag.}
+% \begin{macrocode}
+ \endLWR@figcaption% new
\LWR@traceinfo{sfsubcap B2}% new
% }%
}%
@@ -35181,7 +36934,7 @@ class="td%
% \parbox[t][\FBsubcheight][t]{\the\@tempdima}
}%
\fi
- \vbox{%
+% \vbox{%
% \hb@xt@\the\@tempdima{%
% \hss
@@ -35196,7 +36949,7 @@ class="td%
% \hss
% }
- }
+% }
}%
\egroup
\LWR@startpars% new
@@ -35218,7 +36971,7 @@ class="td%
\let\caption@tfmt\@firstofone
}%
% \@setpar{\@@par\caption@@par}\caption@@par
-\renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% new
+ \renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% new
\caption@applyfont
\caption@fmt
{\ifcaption@star\else
@@ -35249,6 +37002,19 @@ class="td%
% \end{macrocode}
% \end{noindmacro}
+% ^^A *8* move to caption itself?
+% \begin{noindmacro}{\caption@@make@} \marg{} \marg{}
+% \begin{macrocode}
+\renewcommand{\caption@@make@}[2]{%
+ \caption@stepthecounter
+ \caption@beginhook
+ \caption@@@make{#1}{#2}%
+ \caption@endhook
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+
% \begin{noindmacro}{\subfloat@label}
% Patches for \cs{sf@sub@label}:
% \begin{macrocode}
@@ -35276,6 +37042,7 @@ class="td%
% \end{macrocode}
% \end{noindmacro}
%
+%
% \begin{noindmacro}{\sf@@subref} \marg{label}
%
% The starred version uses the printed |sub@<label>| which is stored as
@@ -35294,7 +37061,7 @@ class="td%
\def\@newsubfloat[#1]#2{%
\LWR@orig@newsubfloat[#1]{#2}%
-\renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}}
+\renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -35315,8 +37082,7 @@ class="td%
%
% ^^A \def\subfigure{\subfloat}
% ^^A \def\subtable{\subfloat}
-
-
+%
% \iffalse
%</subfig>
% \fi
@@ -35325,6 +37091,53 @@ class="td%
%
%
%
+% \iffalse
+%<*subfigure>
+% \fi
+%
+% \part{lwarp-subfigure.sty}
+%
+% \section{subfigure}
+%
+% \DescribePackage{subfigure}
+% \pkg{subfigure} is emulated by \pkg{subfig}.
+%
+% \changes{v0.45}{2017/12/02}{\pkg{subfigure}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{subfigure}
+\RequirePackage{subfig}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\LetLtxMacro\subfigure\subfloat
+\LetLtxMacro\subtable\subfloat
+\LetLtxMacro\Subref\subref
+\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{}
+\newif\ifsubfiguretopcap
+\newif\ifsubcaphang
+\newif\ifsubcapcenter
+\newif\ifsubcapcenterlast
+\newif\ifsubcapnooneline
+\newif\ifsubcapraggedright
+\newskip\subfigtopskip
+\newskip\subfigcapskip
+\newdimen\subfigcaptopadj
+\newskip\subfigbottomskip
+\newdimen\subfigcapmargin
+\newskip\subfiglabelskip
+\newcommand*{\subcapsize}{}
+\newcommand*{\subcaplabelfont}{}
+\newcommand*{\subcapfont}{}
+% \end{macrocode}
+%
+% \iffalse
+%</subfigure>
+% \fi
+%
+%
%
%
%
@@ -35384,15 +37197,15 @@ class="td%
\newcommand*{\shrinkheight}[1]{}
\NewDocumentEnvironment{supertabular}{s o m}
-{
-\LWR@traceinfo{supertabular}
-\table
-\LWRST@caption
-\begin{tabular}{#3}
+{%
+\LWR@traceinfo{supertabular}%
+\table%
+\LWRST@caption%
+\begin{tabular}{#3}%
\TabularMacro\ifdefvoid{\LWRST@firsthead}%
{\LWR@getmynexttoken}%
{\expandafter\LWR@getmynexttoken\LWRST@firsthead}%
-}
+}%
{%
\ifdefvoid{\LWRST@lasttail}%
{}%
@@ -35400,9 +37213,9 @@ class="td%
\TabularMacro\ResumeTabular%
\LWRST@lasttail%
}%
-\end{tabular}
-\endtable
-\LWR@traceinfo{supertabular done}
+\end{tabular}%
+\endtable%
+\LWR@traceinfo{supertabular done}%
}
\NewDocumentEnvironment{mpsupertabular}{s o m}
@@ -35520,11 +37333,11 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\NewDocumentEnvironment{tabularx}{m o m}
+\DeclareDocumentEnvironment{tabularx}{m o m}
{\tabular{#3}}
{\endtabular}
-\NewDocumentEnvironment{tabularx*}{m o m}
+\DeclareDocumentEnvironment{tabularx*}{m o m}
{\tabular{#3}}
{\endtabular}
% \end{macrocode}
@@ -35830,6 +37643,61 @@ class="td%
%
%
%
+% \iffalse
+%<*textfit>
+% \fi
+%
+% \part{lwarp-textfit.sty}
+%
+% \section{textfit}
+%
+% \DescribePackage{textfit}
+% \pkg{textfit} is emulated.
+%
+% Text is placed into a \element{span} of class \attribute{textfit}.
+% Sizes are approximated, and also limited by browser min/max font-size settings.
+%
+% \changes{v0.45}{2017/12/24}{\pkg{textfit}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{textfit}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newsavebox{\LWR@textfitbox}
+
+\newcommand*{\LWR@textfitscale}[2]{%
+\uselengthunit{PT}%
+\setlength{\LWR@templengthone}{#1}%
+\setlength{\LWR@templengthone}{%
+ 1em*\ratio{\LWR@templengthone}{\LWR@templengthtwo}%
+}%
+\InlineClass[font-size:\rndprintlength{\LWR@templengthone}]{textfit}{#2}%
+}
+
+\newcommand*{\scaletowidth}[2]{%
+\sbox{\LWR@textfitbox}{#2}%
+\settowidth{\LWR@templengthtwo}{\usebox{\LWR@textfitbox}}%
+\LWR@textfitscale{#1}{#2}%
+}
+
+\newcommand*{\scaletoheight}[2]{%
+\sbox{\LWR@textfitbox}{#2}%
+\settoheight{\LWR@templengthtwo}{\usebox{\LWR@textfitbox}}%
+\LWR@textfitscale{#1}{#2}%
+}
+% \end{macrocode}
+%
+% \iffalse
+%</textfit>
+% \fi
+%
+%
+%
+%
+%
%
% \iffalse
%<*textpos>
@@ -36004,103 +37872,106 @@ class="td%
% of class |theorembody<style>|.
%
% Each header is encased in an \cs{InlineClass} of class |theoremheader|.
+% \changes{v0.46}{2018/01/22}{\pkg{theorem}: Adapt to \env{trivlist} changes.}
% \begin{macrocode}
-\gdef\th@plain{%\normalfont\itshape
+\gdef\th@plain{%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2}
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2\ (##3)}
- ]}
+ ]
+ }
}
-\gdef\th@break{%\normalfont\slshape
+\gdef\th@break{%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip \labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2}\newline%
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip \labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2\ (##3)}\newline
- ]}
+ ]
+ }
}
-\gdef\th@marginbreak{%\normalfont\slshape
+\gdef\th@marginbreak{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep %
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1}\newline
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep %
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1\ %
(##3)}\newline
- ]}
+ ]
+ }
}
-\gdef\th@changebreak{%\normalfont\slshape
+\gdef\th@changebreak{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2\ ##1}\newline
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{ ##2\ ##1\ %
(##3)}\newline
- ]}
+ ]
+ }
}
-\gdef\th@change{%\normalfont\slshape
+\gdef\th@change{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2\ ##1}
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2\ ##1\ (##3)}
- ]}
+ ]
+ }
}
-\gdef\th@margin{%\normalfont\slshape
+\gdef\th@margin{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1}
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1\ (##3)}
- ]}
+ ]
+ }
}
% \end{macrocode}
%
% Patched for \CSS:
+% \changes{v0.46}{2018/01/22}{\pkg{theorem}: Adapt to \env{trivlist} changes.}
% \begin{macrocode}
-\gdef\@endtheorem{\endBlockClass\endtrivlist}
+\gdef\@thm#1#2{\refstepcounter{#1}%
+\LWR@forcenewpage% new
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \trivlist
+ \@topsep \theorempreskipamount % used by first \item
+ \@topsepadd \theorempostskipamount % used by \@endparenv
+ \@ifnextchar [%
+ {\@ythm{#1}{#2}}%
+ {\@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}}
+
+\gdef\@endtheorem{%
+\endtrivlist
+\endBlockClass
+}
% \end{macrocode}
%
% \iffalse
@@ -36227,11 +38098,6 @@ class="td%
% \hspace*{2em}test-if-a-package-or-package-option-is-loaded}
-% \codehtml
-% \begin{macrocode}
-\begin{warpHTML}
-% \end{macrocode}
-
% \begin{macrocode}
\newboolean{LWR@tikzbabel}
@@ -36267,10 +38133,6 @@ class="td%
% \end{macrocode}
% \end{environment}
-% \begin{macrocode}
-\end{warpHTML}
-% \end{macrocode}
-
% \iffalse
%</tikz>
% \fi
@@ -36533,13 +38395,26 @@ class="td%
% \section{titleref}
%
% \DescribePackage{titleref}
-% \pkg{titleref} is superceded by \pkg{hyperref} and \pkg{nameref}.
+% \pkg{titleref} is emulated.
%
% \changes{v0.34}{2017/07/26}{\pkg{titleref}: Prevented.}
+% \changes{v0.45}{2018/01/03}{\pkg{titleref}: Added.}
%
% \codehtml
% \begin{macrocode}
-\LWR@loadnever{titleref}{hyperref and nameref}
+\LWR@ProvidesPackageDrop{titleref}
+
+\LetLtxMacro\titleref\nameref
+
+\providecounter{LWR@currenttitle}
+
+\newcommand*{\currenttitle}{%
+ \addtocounter{LWR@currenttitle}{1}%
+ \label{currenttitle\arabic{LWR@currenttitle}}%
+ \nameref{currenttitle\arabic{LWR@currenttitle}}%
+}
+
+\newcommand*{\theTitleReference}[2]{}
% \end{macrocode}
%
% \iffalse
@@ -36971,7 +38846,7 @@ class="td%
% \end{macrocode}
% Make the footnote mark and some extra horizontal space for the tags:
% \begin{macrocode}
-\makethanksmark \LWR@orighspace{1in}
+\makethanksmark~%
% \end{macrocode}
% \begin{center}
% \begin{minipage}{.7\linewidth}
@@ -37036,7 +38911,7 @@ class="td%
% \begin{macro}{\@maketitle}
% Typesets the title, etc. Patched for \HTML.
%
-% \changes{v0.39}{2017/09/01}{Supports \protect\pkg{authblk} with
+% \changes{v0.39}{2017/09/01}{Supports \pkg{authblk} with
% \element{div}s of class \attribute{oneauthor} instead of tabular.}
% \changes{v0.39}{2017/09/03}{Removed minipages.}
% \changes{v0.39}{2017/09/04}{\pkg{titling} version.}
@@ -37122,11 +38997,15 @@ class="td%
%
% Set default titlepage thanks footnote marks. See \cref{sec:titlehtml}.
% \begin{macrocode}
+\@ifclassloaded{memoir}{
+ \thanksmarkseries{arabic}
+}{% not memoir
\if@titlepage
\thanksmarkseries{arabic}
\else
\thanksmarkseries{fnsymbol}
\fi
+}% not memoir
% \end{macrocode}
%
%
@@ -37247,13 +39126,13 @@ class="td%
% The following code is shared by \pkg{anonchap}.
%
% \begin{macrocode}
-\renewcommand{\simplechapter}[1][\@empty]{%
+\DeclareDocumentCommand{\simplechapter}{O{\@empty}}{%
\def\@chapcntformat##1{%
#1~\csname the##1\endcsname\simplechapterdelim\protect\quad%
}%
}
-\renewcommand{\restorechapter}{%
+\DeclareDocumentCommand{\restorechapter}{}{%
\let\@chapcntformat\@seccntformat%
}
% \end{macrocode}
@@ -37377,7 +39256,7 @@ class="td%
% \begin{noindmacro}{\cftdot}
% \begin{macrocode}
-\newcommand*{\cftdot}{.}
+\providecommand*{\cftdot}{.}
% \end{macrocode}
% \end{noindmacro}
@@ -37389,7 +39268,7 @@ class="td%
% \begin{noindmacro}{\cftnodots}
% \begin{macrocode}
-\newcommand*{\cftnodots}{5000}
+\providecommand*{\cftnodots}{5000}
% \end{macrocode}
% \end{noindmacro}
@@ -37401,46 +39280,47 @@ class="td%
% \begin{noindmacro}{\cftsetpnumwidth} \marg{length}
% \begin{macrocode}
-\newcommand*{\cftsetpnumwidth}[1]{}
+\DeclareDocumentCommand{\cftsetpnumwidth}{m}{}
% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\cftsetrmarg} \marg{length}
% \begin{macrocode}
-\newcommand*{\cftsetrmarg}[1]{}
+\DeclareDocumentCommand{\cftsetrmarg}{m}{}
% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\cftpnumalign} \marg{alignment}
% \begin{macrocode}
-\newcommand*{\cftpnumalign}[1]{}
+\DeclareDocumentCommand{\cftpnumalign}{m}{}
% \end{macrocode}
% \end{noindmacro}
% \begin{macrocode}
-\newlength{\cftparskip}
+\LWR@providelength{\cftparskip}
% \end{macrocode}
-
+% The part-related items are also provided by \pkg{memoir}:
% \begin{macrocode}
-\newlength{\cftbeforepartskip}
-\newlength{\cftpartindent}
-\newlength{\cftpartnumwidth}
-\newcommand*{\cftpartfont}{}
-\newcommand*{\cftpartpresnum}{}
-\newcommand*{\cftpartaftersnum}{}
-\newcommand*{\cftpartaftersnumb}{}
-\newcommand*{\cftpartleader}{}
-\newcommand*{\cftpartdotsep}{1}
-\newcommand*{\cftpartpagefont}{}
-\newcommand*{\cftpartafterpnum}{}
+\LWR@providelength{\cftbeforepartskip}
+\LWR@providelength{\cftpartindent}
+\LWR@providelength{\cftpartnumwidth}
+\providecommand*{\cftpartfont}{}
+\providecommand*{\cftpartpresnum}{}
+\providecommand*{\cftpartaftersnum}{}
+\providecommand*{\cftpartaftersnumb}{}
+\providecommand*{\cftpartleader}{}
+\providecommand*{\cftpartdotsep}{1}
+\providecommand*{\cftpartpagefont}{}
+\providecommand*{\cftpartafterpnum}{}
% \end{macrocode}
-
+%
+% \pkg{memoir} uses the full name ``chapter'' instead of ``chap'':
% \begin{macrocode}
-\newlength{\cftbeforechapskip}
-\newlength{\cftchapindent}
-\newlength{\cftchapnumwidth}
+\LWR@providelength{\cftbeforechapskip}
+\LWR@providelength{\cftchapindent}
+\LWR@providelength{\cftchapnumwidth}
\newcommand*{\cftchapfont}{}
\newcommand*{\cftchappresnum}{}
\newcommand*{\cftchapaftersnum}{}
@@ -37450,11 +39330,12 @@ class="td%
\newcommand*{\cftchappagefont}{}
\newcommand*{\cftchapafterpnum}{}
% \end{macrocode}
-
+%
+% The following do not appear in \pkg{memoir}:
% \begin{macrocode}
-\newlength{\cftbeforesecskip}
-\newlength{\cftsecindent}
-\newlength{\cftsecnumwidth}
+\LWR@providelength{\cftbeforesecskip}
+\LWR@providelength{\cftsecindent}
+\LWR@providelength{\cftsecnumwidth}
\newcommand*{\cftsecfont}{}
\newcommand*{\cftsecpresnum}{}
\newcommand*{\cftsecaftersnum}{}
@@ -37466,9 +39347,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforesubsecskip}
-\newlength{\cftsubsecindent}
-\newlength{\cftsubsecnumwidth}
+\LWR@providelength{\cftbeforesubsecskip}
+\LWR@providelength{\cftsubsecindent}
+\LWR@providelength{\cftsubsecnumwidth}
\newcommand*{\cftsubsecfont}{}
\newcommand*{\cftsubsecpresnum}{}
\newcommand*{\cftsubsecaftersnum}{}
@@ -37480,9 +39361,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforesubsubsecskip}
-\newlength{\cftsubsubsecindent}
-\newlength{\cftsubsubsecnumwidth}
+\LWR@providelength{\cftbeforesubsubsecskip}
+\LWR@providelength{\cftsubsubsecindent}
+\LWR@providelength{\cftsubsubsecnumwidth}
\newcommand*{\cftsubsubsecfont}{}
\newcommand*{\cftsubsubsecpresnum}{}
\newcommand*{\cftsubsubsecaftersnum}{}
@@ -37494,9 +39375,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforeparaskip}
-\newlength{\cftparaindent}
-\newlength{\cftparanumwidth}
+\LWR@providelength{\cftbeforeparaskip}
+\LWR@providelength{\cftparaindent}
+\LWR@providelength{\cftparanumwidth}
\newcommand*{\cftparafont}{}
\newcommand*{\cftparapresnum}{}
\newcommand*{\cftparaaftersnum}{}
@@ -37508,9 +39389,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforesubparaskip}
-\newlength{\cftsubparaindent}
-\newlength{\cftsubparanumwidth}
+\LWR@providelength{\cftbeforesubparaskip}
+\LWR@providelength{\cftsubparaindent}
+\LWR@providelength{\cftsubparanumwidth}
\newcommand*{\cftsubparafont}{}
\newcommand*{\cftsubparapresnum}{}
\newcommand*{\cftsubparaaftersnum}{}
@@ -37522,9 +39403,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforefigskip}
-\newlength{\cftfigindent}
-\newlength{\cftfignumwidth}
+\LWR@providelength{\cftbeforefigskip}
+\LWR@providelength{\cftfigindent}
+\LWR@providelength{\cftfignumwidth}
\newcommand*{\cftfigfont}{}
\newcommand*{\cftfigpresnum}{}
\newcommand*{\cftfigaftersnum}{}
@@ -37536,9 +39417,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforesubfigskip}
-\newlength{\cftsubfigindent}
-\newlength{\cftsubfignumwidth}
+\LWR@providelength{\cftbeforesubfigskip}
+\LWR@providelength{\cftsubfigindent}
+\LWR@providelength{\cftsubfignumwidth}
\newcommand*{\cftsubfigfont}{}
\newcommand*{\cftsubfigpresnum}{}
\newcommand*{\cftsubfigaftersnum}{}
@@ -37550,9 +39431,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforetabskip}
-\newlength{\cfttabindent}
-\newlength{\cfttabnumwidth}
+\LWR@providelength{\cftbeforetabskip}
+\LWR@providelength{\cfttabindent}
+\LWR@providelength{\cfttabnumwidth}
\newcommand*{\cfttabfont}{}
\newcommand*{\cfttabpresnum}{}
\newcommand*{\cfttabaftersnum}{}
@@ -37564,9 +39445,9 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newlength{\cftbeforesubtabskip}
-\newlength{\cftsubtabindent}
-\newlength{\cftsubtabnumwidth}
+\LWR@providelength{\cftbeforesubtabskip}
+\LWR@providelength{\cftsubtabindent}
+\LWR@providelength{\cftsubtabnumwidth}
\newcommand*{\cftsubtabfont}{}
\newcommand*{\cftsubtabpresnum}{}
\newcommand*{\cftsubtabaftersnum}{}
@@ -37578,7 +39459,7 @@ class="td%
% \end{macrocode}
% \begin{macrocode}
-\newcommand{\cftsetindents}[3]{}
+\DeclareDocumentCommand{\cftsetindents}{m m m}{}
% \end{macrocode}
% \begin{macrocode}
@@ -37590,30 +39471,41 @@ class="td%
% \begin{noindmacro}{\newlistentry} \oarg{within} \marg{counter} \marg{ext} \marg{level-1}
% \changes{v0.44}{2017/11/09}{\pkg{tocloft}: Added \cs{newlistentry}.}
% \begin{macrocode}
-\NewDocumentCommand{\newlistentry}{o m m m}
-{
-\IfValueTF{#1}
-{
- \newcounter{#2}[#1]
- \expandafter\edef\csname the#2\endcsname{
- \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}
- }
-}
-{\newcounter{#2}}
-\@namedef{l@#2}##1##2{\hypertocfloat{1}{#2}{#3}{##1}{##2}}
-\expandafter\newlength\csname cftbefore#2skip\endcsname
-\expandafter\newlength\csname cft#2indent\endcsname
-\expandafter\newlength\csname cft#2numwidth\endcsname
-\@namedef{cft#2font}{}
-\@namedef{cft#2presnum}{}
-\@namedef{cft#2aftersnum}{}
-\@namedef{cft#2aftersnumb}{}
-\@namedef{cft#2leader}{}
-\@namedef{cft#2dotsep}{1}
-\@namedef{cft#2pagefont}{}
-\@namedef{cft#2afterpnum}{}
-\@namedef{toclevel@#2}{#4}
-\@namedef{cft#2fillnum}##1{}
+\DeclareDocumentCommand{\newlistentry}{o m m m}
+{%
+\LWR@traceinfo{newlistentry #2 #3 #4}%
+\IfValueTF{#1}%
+{%
+ \@ifundefined{c@#2}{%
+ \newcounter{#2}[#1]%
+ \expandafter\edef\csname the#2\endcsname{%
+ \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}%
+ }%
+ }{}%
+}%
+{%
+ \@ifundefined{c@#2}{%
+ \newcounter{#2}%
+ }{}%
+}%
+\@namedef{l@#2}##1##2{%
+ \hypertocfloat{1}{#2}{#3}{##1}{##2}%
+ \def\cftwhatismyname{#2}% from memoir
+}%
+\expandafter\newlength\csname cftbefore#2skip\endcsname%
+\expandafter\newlength\csname cft#2indent\endcsname%
+\expandafter\newlength\csname cft#2numwidth\endcsname%
+\@namedef{cft#2font}{}%
+\@namedef{cft#2presnum}{}%
+\@namedef{cft#2aftersnum}{}%
+\@namedef{cft#2aftersnumb}{}%
+\@namedef{cft#2leader}{}%
+\@namedef{cft#2dotsep}{1}%
+\@namedef{cft#2pagefont}{}%
+\@namedef{cft#2afterpnum}{}%
+\@namedef{toclevel@#2}{#4}%
+\@namedef{cft#2fillnum}##1{}%
+\LWR@traceinfo{newlistentry done}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -37624,13 +39516,13 @@ class="td%
% Emulated through the \cs{newfloat} mechanism.
% \changes{v0.44}{2017/11/09}{\pkg{tocloft}: Improved \cs{newlistof}.}
% \begin{macrocode}
-\NewDocumentCommand{\newlistof}{o m m m}
+\DeclareDocumentCommand{\newlistof}{o m m m}
{%
\IfValueTF{#1}
{\newlistentry[#1]{#2}{#3}{0}}
{\newlistentry{#2}{#3}{0}}
\@namedef{ext@#2}{#3}
-\newcounter{#3depth}
+\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}
\setcounter{#3depth}{1}
\@namedef{cftmark#3}{}
\@namedef{listof#2}{\listof{#2}{#4}}
@@ -38033,6 +39925,36 @@ class="td%
%
%
%
+% \iffalse
+%<*turnthepage>
+% \fi
+%
+% \part{lwarp-turnthepage.sty}
+%
+% \section{turnthepage}
+%
+% \DescribePackage{turnthepage}
+% \pkg{turnthepage} is ignored.
+%
+% \changes{v0.45}{2017/12/19}{\pkg{turnthepage}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{turnthepage}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand{\turnthepage}{}
+% \end{macrocode}
+%
+% \iffalse
+%</turnthepage>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*typearea>
@@ -38288,7 +40210,7 @@ class="td%
% \begin{macrocode}
\LWR@restoreoriglists%
% \end{macrocode}
-% \DescribePackage{verse}\DescribePackage{memoir}\index{memoir>verse}
+% \DescribePackage{verse}\DescribeClass{memoir}\index{memoir>verse}
% The \pkg{verse} or \pkg{memoir} packages can place stanza numbers to the left
% with their \cs{flagverse} command. \DescribeMacro{\flagverse}
% Do not allow them to go into the left margin, which would cause |pdfcrop|
@@ -39132,7 +41054,7 @@ height:\rndprintlength{\LWR@tempheight}%
% \margintag{font size}
% \begin{macrocode}
\newcommand*{\LWR@htmlsmallfontstart}{%
-\LWR@htmltagc{span style="font-size:\xfracHTMLfontsize"{}}%
+\LWR@htmltagc{span style="font-size:\xfracHTMLfontsize"}%
\LWR@nestspan%
%
}
@@ -39373,15 +41295,15 @@ scaling = false
\newcommand*{\xentrystretch}[1]{}
\NewDocumentEnvironment{xtabular}{s o m}
-{
-\LWR@traceinfo{xtabular}
-\table
-\LWRXT@caption
-\begin{tabular}{#3}
+{%
+\LWR@traceinfo{xtabular}%
+\table%
+\LWRXT@caption%
+\begin{tabular}{#3}%
\TabularMacro\ifdefvoid{\LWRXT@firsthead}%
{\LWR@getmynexttoken}%
{\expandafter\LWR@getmynexttoken\LWRXT@firsthead}%
-}
+}%
{%
\ifdefvoid{\LWRXT@lasttail}%
{}%
@@ -39389,9 +41311,9 @@ scaling = false
\TabularMacro\ResumeTabular%
\LWRXT@lasttail%
}%
-\end{tabular}
-\endtable
-\LWR@traceinfo{xtabular done}
+\end{tabular}%
+\endtable%
+\LWR@traceinfo{xtabular done}%
}
\NewDocumentEnvironment{mpxtabular}{s o m}
@@ -39500,8 +41422,1462 @@ scaling = false
%
%
%
+% \iffalse
+%<*patch-komascript>
+% \fi
+%
+% \part{lwarp-patch-komascript.sty}
+%
+% \section{patch-komascript}
+%
+% \DescribePackage{lwarp-patch-komascript}
+% Patches for \pkg{komascript} classes.
+%
+% \pkg{lwarp} loads this package when
+% \pkg{scrbook}, \pkg{scrartcl}, or \pkg{scrreprt} classes are detected.
+%
+% \limitskomascript
+%
+% \changes{v0.44}{2017/11/19}{\pkg{lwarp-patch-komascript}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\ProvidesPackage{lwarp-patch-komascript}
+% \end{macrocode}
+%
+% \pkg{typearea} is emulated.
+% \begin{macrocode}
+\RequirePackage{lwarp-typearea}
+% \end{macrocode}
+%
+% \pkg{tocbasic} is emulated.
+% \begin{macrocode}
+\RequirePackage{lwarp-tocbasic}
+% \end{macrocode}
+%
+% \pkg{scrextend} patches most of the new macros.
+% \begin{macrocode}
+\RequirePackage{lwarp-scrextend}
+% \end{macrocode}
+%
+% The \cs{minisec} is placed inside a \element{div} of class \attribute{minisec}.
+% \begin{macrocode}
+\renewcommand*{\minisec}[1]{
+\begin{BlockClass}{minisec}
+#1
+\end{BlockClass}
+}
+% \end{macrocode}
+%
+% The part and chapter preambles are placed as plain text just after each heading.
+% \begin{macrocode}
+\@ifundefined{setpartpreamble}{}{
+\RenewDocumentCommand{\setpartpreamble}{o o +m}{%
+\renewcommand{\part@preamble}{#3}%
+}
+}
+
+\@ifundefined{setchapterpreamble}{}{
+\RenewDocumentCommand{\setchapterpreamble}{o o +m}{%
+\renewcommand{\chapter@preamble}{#3}%
+}
+}
+% \end{macrocode}
+%
+% Simple captions are used in all cases.
+% \begin{macrocode}
+\LetLtxMacro\captionbelow\caption
+\LetLtxMacro\captionabove\caption
+
+\LetLtxMacro\captionofbelow\captionof
+\LetLtxMacro\captionofabove\captionof
+
+\RenewDocumentEnvironment{captionbeside}{o m o o o s}
+{}
+{%
+\IfValueTF{#1}%
+{\caption[#1]{#2}}%
+{\caption{#2}}%
+}
+
+\RenewDocumentEnvironment{captionofbeside}{m o m o o o s}
+{}
+{%
+\IfValueTF{#2}%
+{\captionof{#1}[#2]{#3}}%
+{\captionof{#1}{#3}}%
+}
+
+\RenewDocumentCommand{\setcapindent}{s m}{}
+\renewcommand*{\setcaphanging}{}
+\renewcommand*{\setcapwidth}[2][]{}
+\renewcommand*{\setcapdynwidth}[2][]{}
+\RenewDocumentCommand{\setcapmargin}{s o m}{}
+% \end{macrocode}
+%
+% \iffalse
+%</patch-komascript>
+% \fi
+%
+%
+%
+%
+%
+%
+% \iffalse
+%<*patch-memoir>
+% \fi
+%
+% \part{lwarp-patch-memoir.sty}
+%
+% \section{patch-memoir}
+%
+%
+% \credits{Peter Wilson}
+%
+% \DescribePackage{lwarp-patch-memoir}
+% Patches for \pkg{memoir} class.
+%
+% \testthis
+%
+% \pkg{lwarp} loads this package when the \pkg{memoir} class is detected.
+%
+% \limitsmemoir
+%
+% \changes{v0.45}{2017/12/03}{\pkg{lwarp-patch-memoir}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\ProvidesPackage{lwarp-patch-memoir}
+% \end{macrocode}
+%
+% \subsection{Packages}
+% \label{sec:patch-memoir-packages}
+%
+% These are pre-loaded to provide emulation for many of \pkg{memoir}'s functions.
+% \pkg{memoir} pretends that \pkg{abstract}, etc. are already loaded, via its
+% ``emulated'' package mechanism, but \pkg{lwarp} is directly loading the ``|lwarp-|''
+% version of each, which happens to avoid \pkg{memoir}'s emulation system.
+% \begin{macrocode}
+\RequirePackage{lwarp-abstract}% req'd
+\RequirePackage{lwarp-array}% req'd
+\RequirePackage{lwarp-booktabs}% req'd
+% \RequirePackage{lwarp-ccaption}% to do
+\RequirePackage{lwarp-changepage}% req'd
+\RequirePackage{lwarp-crop}
+\RequirePackage{lwarp-dcolumn}% req'd
+\RequirePackage{lwarp-enumerate}% req'd
+\RequirePackage{lwarp-epigraph}% req'd
+\RequirePackage{lwarp-fancyvrb}% req'd
+\RequirePackage{lwarp-footmisc}% req'd
+\RequirePackage{lwarp-framed}% req'd
+\RequirePackage{lwarp-hanging}% req'd
+\DisemulatePackage{moreverb}
+\RequirePackage{lwarp-moreverb}
+\RequirePackage{lwarp-mparhack}
+\RequirePackage{lwarp-needspace}% req'd
+\RequirePackage{lwarp-nextpage}% req'd
+\RequirePackage{lwarp-pagenote}% req'd
+\RequirePackage{lwarp-parskip}
+\RequirePackage{lwarp-setspace}% req'd
+\RequirePackage{lwarp-showidx}
+\RequirePackage{lwarp-subfigure}% red'q
+% \end{macrocode}
+% \pkg{subfigure} is emulated via \pkg{subfig}, which pre-defines
+% |subfigure| and |subtable|, but \pkg{memoir} does not, so
+% they must be tested for here:
+% \begin{macrocode}
+\LetLtxMacro\LWR@memorignewsubfloat\newsubfloat
+\RenewDocumentCommand{\newsubfloat}{O{} m}{%
+ \@ifundefined{c@sub#2}{%
+ \LWR@memorignewsubfloat[#1]{#2}%
+ }{}%
+}
+
+\RequirePackage{lwarp-tabularx}% req'd
+\RequirePackage{lwarp-titling}% req'd
+% \RequirePackage{lwarp-tocbibind}% not emulated by memoir
+\RequirePackage{lwarp-tocloft}% req'd
+\RequirePackage{lwarp-verse}% req'd
+% \end{macrocode}
+%
+%
+% \subsection{Preliminary setup}
+%
+% Bypass the \pkg{memoir} package mechanism:
+% \begin{macrocode}
+\LetLtxMacro\LWR@origlabel\@mem@old@label
+% \end{macrocode}
+
+
+% Redefined to write the |LWR@autoindex| counter instead of |page|
+% \begin{macrocode}
+\AtBeginDocument{
+ \def\@@wrindexhyp#1||\\{%
+ \addtocounter{LWR@autoindex}{1}%
+ \LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}%
+ \ifshowindexmark\@showidx{#1}\fi
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1}{\arabic{LWR@autoindex}}}%
+ \endgroup
+ \@esphack}%
+}
+% \end{macrocode}
+
+
+%
+% \pkg{memoir} already set the page size to a default,
+% so it must be forced large for \pkg{lwarp}'s use,
+% to avoid tag overflows off the page.
+% \begin{macrocode}
+\setstocksize{190in}{20in}
+\setlrmarginsandblock{2in}{2in}{*}
+\setulmarginsandblock{1in}{1in}{*}
+% \end{macrocode}
+%
+%
+% \subsection{Laying out the page}
+%
+% \begin{macrocode}
+\renewcommand*{\stockavi}{}
+\renewcommand*{\stockav}{}
+\renewcommand*{\stockaiv}{}
+\renewcommand*{\stockaiii}{}
+\renewcommand*{\stockbvi}{}
+\renewcommand*{\stockbv}{}
+\renewcommand*{\stockbiv}{}
+\renewcommand*{\stockbiii}{}
+% \renewcommand*{\stockmetriccrownvo}{}% in docs but not in the package
+\renewcommand*{\stockmlargecrownvo}{}
+\renewcommand*{\stockmdemyvo}{}
+\renewcommand*{\stockmsmallroyalvo}{}
+\renewcommand*{\pageavi}{}
+\renewcommand*{\pageav}{}
+\renewcommand*{\pageaiv}{}
+\renewcommand*{\pageaiii}{}
+\renewcommand*{\pagebvi}{}
+\renewcommand*{\pagebv}{}
+\renewcommand*{\pagebiv}{}
+\renewcommand*{\pagebiii}{}
+% \renewcommand*{\pagemetriccrownvo}{}% in docs but not in the package
+\renewcommand*{\pagemlargecrownvo}{}
+\renewcommand*{\pagemdemyvo}{}
+\renewcommand*{\pagemsmallroyalvo}{}
+
+\renewcommand*{\stockdbill}{}
+\renewcommand*{\stockstatement}{}
+\renewcommand*{\stockexecutive}{}
+\renewcommand*{\stockletter}{}
+\renewcommand*{\stockold}{}
+\renewcommand*{\stocklegal}{}
+\renewcommand*{\stockledger}{}
+\renewcommand*{\stockbroadsheet}{}
+\renewcommand*{\pagedbill}{}
+\renewcommand*{\pagestatement}{}
+\renewcommand*{\pageexecutive}{}
+\renewcommand*{\pageletter}{}
+\renewcommand*{\pageold}{}
+\renewcommand*{\pagelegal}{}
+\renewcommand*{\pageledger}{}
+\renewcommand*{\pagebroadsheet}{}
+
+\renewcommand*{\stockpottvo}{}
+\renewcommand*{\stockfoolscapvo}{}
+\renewcommand*{\stockcrownvo}{}
+\renewcommand*{\stockpostvo}{}
+\renewcommand*{\stocklargecrownvo}{}
+\renewcommand*{\stocklargepostvo}{}
+\renewcommand*{\stocksmalldemyvo}{}
+\renewcommand*{\stockdemyvo}{}
+\renewcommand*{\stockmediumvo}{}
+\renewcommand*{\stocksmallroyalvo}{}
+\renewcommand*{\stockroyalvo}{}
+\renewcommand*{\stocksuperroyalvo}{}
+\renewcommand*{\stockimperialvo}{}
+\renewcommand*{\pagepottvo}{}
+\renewcommand*{\pagefoolscapvo}{}
+\renewcommand*{\pagecrownvo}{}
+\renewcommand*{\pagepostvo}{}
+\renewcommand*{\pagelargecrownvo}{}
+\renewcommand*{\pagelargepostvo}{}
+\renewcommand*{\pagesmalldemyvo}{}
+\renewcommand*{\pagedemyvo}{}
+\renewcommand*{\pagemediumvo}{}
+\renewcommand*{\pagesmallroyalvo}{}
+\renewcommand*{\pageroyalvo}{}
+\renewcommand*{\pagesuperroyalvo}{}
+\renewcommand*{\pageimperialvo}{}
+
+\renewcommand*{\memfontfamily}{}
+\renewcommand*{\memfontenc}{}
+\renewcommand*{\memfontpack}{}
+
+\renewcommand*{\anyptfilebase}{}
+\renewcommand*{\anyptsize}{10}
+
+\renewcommand*{\setstocksize}[2]{}
+\renewcommand*{\settrimmedsize}[3]{}
+\renewcommand*{\settrims}[2]{}
+
+% \newlength{\lxvchars}
+% \setlength{\lxvchars}{305pt}
+% \newlength{\xlvchars}
+% \setlength{\xlvchars}{190pt}
+\renewcommand*{\setxlvchars}[1]{}
+\renewcommand*{\setlxvchars}[1]{}
+
+\renewcommand*{\settypeblocksize}[3]{}
+\renewcommand*{\setlrmargins}[3]{}
+\renewcommand*{\setlrmarginsandblock}[3]{}
+\renewcommand*{\setbinding}[1]{}
+\renewcommand*{\setulmargins}[3]{}
+\renewcommand*{\setulmarginsandblock}[3]{}
+\renewcommand*{\setcolsepandrule}[2]{}
+
+\renewcommand*{\setheadfoot}[2]{}
+\renewcommand*{\setheaderspaces}[3]{}
+\renewcommand*{\setmarginnotes}[3]{}
+\renewcommand*{\setfootins}[2]{}
+\renewcommand*{\checkandfixthelayout}[1][]{}
+\renewcommand*{\checkthelayout}[1]{}
+\renewcommand*{\fixthelayout}{}
+%
+% \newlength{\stockheight}
+% \newlength{\trimtop}
+% \newlength{\trimedge}
+% \newlength{\stockwidth}
+% \newlength{\spinemargin}
+% \newlength{\foremargin}
+% \newlength{\uppermargin}
+% \newlength{\headmargin}
+%
+\renewcommand*{\typeoutlayout}{}
+\renewcommand*{\typeoutstandardlayout}{}
+\renewcommand*{\settypeoutlayoutunit}[1]{}
+\renewcommand*{\fixpdflayout}{}
+\renewcommand*{\fixdvipslayout}{}
+
+\renewcommand*{\medievalpage}[1][]{}
+\renewcommand*{\isopage}[1][]{}
+\renewcommand*{\semiisopage}[1][]{}
+
+\renewcommand{\setpagebl}[3]{}
+\renewcommand{\setpageml}[3]{}
+\renewcommand{\setpagetl}[3]{}
+\renewcommand{\setpagetm}[3]{}
+\renewcommand{\setpagetr}[3]{}
+\renewcommand{\setpagemr}[3]{}
+\renewcommand{\setpagebr}[3]{}
+\renewcommand{\setpagebm}[3]{}
+\renewcommand{\setpagecc}[3]{}
+% \end{macrocode}
+%
+% \subsection{Text and fonts}
+% \begin{macrocode}
+\let\miniscule\tiny
+\let\HUGE\Huge
+
+\renewcommand*{\abnormalparskip}[1]{}
+\renewcommand*{\nonzeroparskip}{}
+\renewcommand*{\traditionalparskip}{}
+
+\let\onelineskip\baselineskip
+
+\let\OnehalfSpacing\onehalfspacing
+\let\DoubleSpacing\doublespacing
+\renewcommand*{\setPagenoteSpacing}[1]{}
+\renewcommand*{\setFloatSpacing}[1]{}
+\let\SingleSpacing\singlespacing
+\let\setSingleSpace\SetSinglespace
+\let\SingleSpace\singlespace
+\let\endSingleSpace\endsinglespace
+\let\Spacing\spacing
+\let\endSpacing\endspacing
+\let\OnehalfSpace\onehalfspace
+\let\endOnehalfSpace\endonehalfspace
+\csletcs{OnehalfSpace*}{onehalfspace}
+\csletcs{endOnehalfSpace*}{endonehalfspace}
+\let\DoubleSpace\doublespace
+\let\endDoubleSpace\enddoublespace
+\csletcs{DoubleSpace*}{doublespace}
+\csletcs{endDoubleSpace*}{enddoublespace}
+\renewcommand*{\setDisplayskipStretch}[1]{}
+\renewcommand*{\memdskipstretch}{}
+\renewcommand*{\noDisplayskipStretch}{}
+\renewcommand*{\memdskips}{}
+
+\renewcommand*{\midsloppy}{}
+\renewenvironment*{midsloppypar}{}{}
+
+\renewcommand*{\sloppybottom}{}
+% \end{macrocode}
+%
+% \subsection{Titles}
+% \begin{macrocode}
+\csletcs{titlingpage*}{titlingpage}
+\csletcs{endtitlingpage*}{endtitlingpage}
+\let\andnext\and
+\renewcommand*{\thanksmarkstyle}[1]{}
+\renewcommand{\thanksfootmark}{%
+\thanksscript{\tamark}%
+}
+
+% \newlength{\thanksmarksep}
+% \end{macrocode}
+%
+% \subsection{Abstracts}
+% \begin{macrocode}
+\renewcommand*{\abstractcol}{}
+\renewcommand*{\abstractintoc}{}
+\renewcommand*{\abstractnum}{}
+\renewcommand*{\abstractrunin}{}
+% \end{macrocode}
+%
+% \subsection{Docment divisions}
+% \begin{macrocode}
+
+\def\@apppage{%
+ \part*{\appendixpagename}
+}
+\renewcommand\mempreaddapppagetotochook{}
+\renewcommand\mempostaddapppagetotochook{}
+
+\def\@sapppage{%
+ \part*{\appendixpagename}
+}
+
+\csletcs{frontmatter*}{frontmatter}
+\csletcs{mainmatter*}{mainmatter}
+\renewcommand*{\raggedbottomsection}{}
+\renewcommand*{\normalbottomsection}{}
+\renewcommand*{\bottomsectionskip}{}
+\renewcommand*{\bottomsectionpenalty}{}
+\csletcs{appendixpage*}{appendixpage}
+\renewcommand*{\namedsubappendices}{}
+\renewcommand*{\unnamedsubappendices}{}
+\renewcommand*{\setsecnumdepth}[1]{}% todo tocvsec2
+\renewcommand*{\maxsecnumdepth}[1]{}% todo tocvsec2
+\renewcommand*{\beforebookskip}{}
+\renewcommand*{\afterbookskip}{}
+\renewcommand*{\beforepartskip}{}
+\renewcommand*{\afterpartskip}{}
+\renewcommand*{\midbookskip}{}
+\renewcommand*{\midpartskip}{}
+\renewcommand*{\printbookname}{}
+\renewcommand*{\booknamefont}{}
+\renewcommand*{\booknamenum}{}
+\renewcommand*{\printbooknum}{}
+\renewcommand*{\booknumfont}{}
+\renewcommand*{\printpartname}{}
+\renewcommand*{\partnamefont}{}
+\renewcommand*{\partnamenum}{}
+\renewcommand*{\printpartnum}{}
+\renewcommand*{\partnumfont}{}
+\renewcommand*{\printbooktitle}[1]{}
+\renewcommand*{\booktitlefont}{}
+\renewcommand{\printparttitle}[1]{}
+\renewcommand*{\parttitlefont}{}
+\renewcommand*{\bookpageend}{}
+\renewcommand*{\bookblankpage}{}
+\renewcommand*{\nobookblankpage}{}
+\renewcommand*{\partpageend}{}
+\renewcommand*{\partblankpage}{}
+\renewcommand*{\nopartblankpage}{}
+\RenewDocumentCommand{\newleadpage}{s o m m}{}% todo
+\RenewDocumentCommand{\renewleadpage}{s o m m}{}% todo
+\renewcommand*{\leadpagetoclevel}{chapter}
+
+\renewcommand*{\openright}{}
+\renewcommand*{\openleft}{}
+\renewcommand*{\openany}{}
+\renewcommand*{\clearforchapter}{}
+\renewcommand*{\memendofchapterhook}{}
+\renewcommand*{\chapterheadstart}{}
+% \newlength{\beforechapskip}
+\renewcommand*{\afterchapternum}{}
+% \newlength{\midchapskip}
+\renewcommand*{\afterchaptertitle}{}
+% \newlength{\afterchapskip}
+\renewcommand*{\printchaptername}{}
+\renewcommand*{\chapnamefont}{}
+\renewcommand*{\chapternamenum}{}
+\renewcommand*{\printchapternum}{}
+\renewcommand*{\chapnumfont}{}
+\renewcommand{\printchaptertitle}[1]{}
+\renewcommand*{\chaptitlefont}{}
+\renewcommand*{\printchapternonum}{}
+\renewcommand*{\indentafterchapter}{}
+\renewcommand*{\noindentafterchapter}{}
+\renewcommand*{\insertchapterspace}{}
+
+\renewcommand*{\chapterstyle}[1]{}
+\renewcommand{\makechapterstyle}[2]{}
+\renewcommand*{\chapindent}{}
+\let\chapterprecis\cftchapterprecis
+\let\chapterprecishere\cftchapterprecishere
+\let\chapterprecistoc\cftchapterprecistoc
+\renewcommand*{\precisfont}{}
+\renewcommand*{\prechapterprecis}{}
+\renewcommand*{\postchapterprecis}{}
+\renewcommand{\precistoctext}[1]{}
+\renewcommand*{\precistocfont}{}
+\renewcommand*{\precistocformat}{}
+% \newlength{\prechapterprecisshift}
+
+\renewcommand*{\setbeforesecskip}[1]{}
+\renewcommand*{\setaftersecskip}[1]{}
+\renewcommand*{\setsecindent}[1]{}
+\renewcommand*{\setsecheadstyle}[1]{}
+\renewcommand*{\setbeforesubsecskip}[1]{}
+\renewcommand*{\setaftersubsecskip}[1]{}
+\renewcommand*{\setsubsecindent}[1]{}
+\renewcommand*{\setsubsecheadstyle}[1]{}
+\renewcommand*{\setbeforesubsubsecskip}[1]{}
+\renewcommand*{\setaftersubsubsecskip}[1]{}
+\renewcommand*{\setsubsubsecindent}[1]{}
+\renewcommand*{\setsubsubsecheadstyle}[1]{}
+\renewcommand*{\setbeforeparaskip}[1]{}
+\renewcommand*{\setafterparaskip}[1]{}
+\renewcommand*{\setparaindent}[1]{}
+\renewcommand*{\setparaheadstyle}[1]{}
+\renewcommand*{\setbeforesubparaskip}[1]{}
+\renewcommand*{\setaftersubparaskip}[1]{}
+\renewcommand*{\setsubparaindent}[1]{}
+\renewcommand*{\setsubparaheadstyle}[1]{}
+\renewcommand{\@hangfrom}[1]{#1}
+\renewcommand{\sethangfrom}[1]{}
+\renewcommand{\setsecnumformat}[1]{}
+
+\renewcommand*{\hangsecnum}{}
+\renewcommand*{\defaultsecnum}{}
+
+\renewcommand*{\sechook}{}
+\renewcommand{\setsechook}[1]{}
+\renewcommand*{\subsechook}{}
+\renewcommand{\setsubsechook}[1]{}
+\renewcommand*{\subsubsechook}{}
+\renewcommand{\setsubsubsechook}[1]{}
+\renewcommand*{\parahook}{}
+\renewcommand{\setparahook}[1]{}
+\renewcommand*{\subparahook}{}
+\renewcommand{\setsubparahook}[1]{}
+
+\RenewDocumentCommand{\plainbreak}{s m}{\begin{center}~\end{center}}
+
+\RenewDocumentCommand{\fancybreak}{s +m}{%
+\begin{center}#2\end{center}%
+}
+
+\RenewDocumentCommand{\plainfancybreak}{s m m +m}{%
+\begin{center}#4\end{center}%
+}
+
+\RenewDocumentCommand{\pfbreak}{s}{%
+\begin{center}
+\pfbreakdisplay
+\end{center}
+}
+
+% \newlength{\pfbreakskip}
+\renewcommand{\pfbreakdisplay}{*\quad*\quad*}
+
+\renewcommand{\makeheadstyles}[2]{}
+\renewcommand*{\headstyles}[1]{}
+% \end{macrocode}
+%
+% \subsection{Pagination and headers}
+% \begin{macrocode}
+\renewcommand*{\savepagenumber}{}
+\renewcommand*{\restorepagenumber}{}
+\renewcommand*{\uppercaseheads}{}
+\renewcommand*{\nouppercaseheads}{}
+
+\renewcommand*{\bookpagemark}[1]{}
+\renewcommand*{\partmark}[1]{}
+\renewcommand*{\bibmark}{}
+\renewcommand*{\indexmark}{}
+\renewcommand*{\glossarymark}{}
+
+\LWR@origpagestyle{empty}
+\renewcommand*{\ps@empty}{}
+\renewcommand*{\makepagestyle}[1]{}
+\renewcommand*{\emptypshook}{}%
+% \renewcommand*{\empty@oddhead}{}
+% \renewcommand*{\empty@oddfoot}{}
+% \renewcommand*{\empty@evenhead}{}
+% \renewcommand*{\empty@evenfoot}{}
+\renewcommand*{\@oddhead}{}
+\renewcommand*{\@oddfoot}{}
+\renewcommand*{\@evenhead}{}
+\renewcommand*{\@evenfoot}{}
+\renewcommand*{\aliaspagestyle}[2]{}
+\renewcommand*{\copypagestyle}[2]{}
+
+\renewcommand*{\makeevenhead}[4]{}
+\renewcommand*{\makeoddhead}[4]{}
+\renewcommand*{\makeevenfoot}[4]{}
+\renewcommand*{\makeoddfoot}[4]{}
+\renewcommand*{\makerunningwidth}[3]{}
+% \newlength{\headwidth}
+\renewcommand*{\makeheadrule}[3]{}
+\renewcommand*{\makefootrule}[3]{}
+\renewcommand*{\makeheadfootruleprefix}[3]{}
+% \newlength{\normalrulethickness}
+% \setlength{\normalrulethickness}{.4pt}
+% \newlength{\footruleheight}
+% \newlength{\footruleskip}
+\renewcommand*{\makeheadposition}[5]{}
+\renewcommand{\makepsmarks}[2]{}
+\renewcommand*{\makeheadfootstrut}[3]{}
+
+\renewcommand{\createplainmark}[3]{}
+\renewcommand{\memUChead}[1]{}
+\renewcommand{\createmark}[5]{}
+\renewcommand*{\clearplainmark}[1]{}
+\renewcommand*{\clearmark}[1]{}
+\renewcommand{\addtopsmarks}[3]{}
+\renewcommand{\ifonlyfloats}[2]{#2}
+\renewcommand*{\mergepagefloatstyle}[3]{}
+
+\renewcommand*{\framepichead}{}
+\renewcommand*{\framepictextfoot}{}
+\renewcommand*{\framepichook}{}
+\renewcommand*{\showheadfootlocoff}{}
+\renewcommand*{\showtextblocklocoff}{}
+% \end{macrocode}
+%
+% \subsection{Paragraphs and lists}
+% \begin{macrocode}
+\renewcommand{\hangfrom}[1]{#1}
+\let\centerfloat\centering
+\renewcommand*{\raggedyright}[1][]{}
+% \newlength{\ragrparindent}
+\renewcommand{\sourceatright}[2][]{\attribution{#2}}
+\let\memorigdbs\LWR@endofline
+\let\memorigpar\par
+\let\atcentercr\LWR@endofline
+\renewcommand*{\flushleftright}{}
+\renewcommand*{\linenottooshort}[1][]{}
+\renewcommand*{\russianpar}{}
+\renewcommand*{\lastlinerulefill}{}
+\renewcommand*{\lastlineparrule}{}
+\renewcommand*{\justlastraggedleft}{}
+\renewcommand*{\raggedrightthenleft}{}
+\renewcommand*{\leftcenterright}{}
+
+\renewcommand{\leftspringright}[4]{%
+\begin{minipage}{#1\linewidth}#3\end{minipage}\qquad%
+\begin{minipage}{#2\linewidth}\begin{flushright}#4\end{flushright}\end{minipage}%
+}
+
+\renewenvironment*{blockdescription}
+{\LWR@descriptionstart\LWR@origdescription}
+{\enddescription}
+\renewcommand*{\blockdescriptionlabel}[1]{\textbf{#1}}
+\renewenvironment*{labelled}[1]{\begin{description}}{\end{description}}
+\renewenvironment*{flexlabelled}[6]{\begin{description}}{\end{description}}
+\renewcommand*{\tightlists}{}
+\renewcommand*{\defaultlists}{}
+\RenewDocumentCommand{\firmlists}{s}{}
+\renewcommand*{\firmlist}{}
+\renewcommand*{\tightlist}{}
+\renewcommand*{\zerotrivseps}{}
+\renewcommand*{\savetrivseps}{}
+\renewcommand*{\restoretrivseps}{}
+% \end{macrocode}
+%
+% \subsection{Contents lists}
+% \begin{macrocode}
+\csletcs{tableofcontents*}{tableofcontents}
+\csletcs{listoffigures*}{listoffigures}
+\csletcs{listoftables*}{listoftables}
+\renewenvironment{KeepFromToc}{}{}
+\renewcommand*{\onecoltocetc}{}
+\renewcommand*{\twocoltocetc}{}
+\renewcommand*{\ensureonecol}{}
+\renewcommand*{\restorefromonecol}{}
+\renewcommand*{\doccoltocetc}{}
+\renewcommand*{\maxtocdepth}[1]{}% tocvsec2
+\renewcommand*{\settocdepth}[1]{}% tocvsec2
+
+\renewcommand{\tocheadstart}{}
+\renewcommand{\printtoctitle}[1]{}
+\renewcommand{\tocmark}{}
+\renewcommand{\aftertoctitle}{}
+\renewcommand{\lofheadstart}{}
+\renewcommand{\printloftitle}[1]{}
+\renewcommand{\lofmark}{}
+\renewcommand{\afterloftitle}{}
+\renewcommand{\lotheadstart}{}
+\renewcommand{\printlottitle}[1]{}
+\renewcommand{\lotmark}{}
+\renewcommand{\afterlottitle}{}
+
+\renewcommand*{\setpnumwidth}[1]{}
+\renewcommand*{\setrmarg}[1]{}
+\renewcommand*{\cftbookbreak}{}
+\renewcommand*{\cftpartbreak}{}
+\renewcommand*{\cftchapterbreak}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforebookskip}
+% \newlength{\cftbookindent}
+% \newlength{\cftbooknumwidth}
+\renewcommand*{\cftbookfont}{}
+\renewcommand*{\cftbookname}{}
+\renewcommand*{\cftbookpresnum}{}
+\renewcommand*{\cftbookaftersnum}{}
+\renewcommand*{\cftbookaftersnumb}{}
+\renewcommand*{\cftbookleader}{}
+\renewcommand*{\cftbookdotsep}{1}
+\renewcommand*{\cftbookpagefont}{}
+\renewcommand*{\cftbookafterpnum}{}
+\renewcommand*{\cftbookformatpnum}[1]{}
+\renewcommand*{\cftbookformatpnumhook}[1]{}
+% \end{macrocode}
+%
+% Part is already defined by \pkg{tocloft}.
+%
+% \begin{macrocode}
+% \newlength{\cftbeforechapterskip}
+% \newlength{\cftchapterindent}
+% \newlength{\cftchapternumwidth}
+\renewcommand*{\cftchapterfont}{}
+\renewcommand*{\cftchaptername}{}
+\renewcommand*{\cftchapterpresnum}{}
+\renewcommand*{\cftchapteraftersnum}{}
+\renewcommand*{\cftchapteraftersnumb}{}
+\renewcommand*{\cftchapterleader}{}
+\renewcommand*{\cftchapterdotsep}{1}
+\renewcommand*{\cftchapterpagefont}{}
+\renewcommand*{\cftchapterafterpnum}{}
+\renewcommand*{\cftchapterformatpnum}[1]{}
+\renewcommand*{\cftchapterformatpnumhook}[1]{}
+% \end{macrocode}
+%
+% ^^A *8* probably redundant:
+% \begin{macrocode}
+% \newlength{\cftbeforesectionskip}
+% \newlength{\cftsectionindent}
+% \newlength{\cftsectionnumwidth}
+\renewcommand*{\cftsectionfont}{}
+\renewcommand*{\cftsectionname}{}
+\renewcommand*{\cftsectionpresnum}{}
+\renewcommand*{\cftsectionaftersnum}{}
+\renewcommand*{\cftsectionaftersnumb}{}
+\renewcommand*{\cftsectionleader}{}
+\renewcommand*{\cftsectiondotsep}{1}
+\renewcommand*{\cftsectionpagefont}{}
+\renewcommand*{\cftsectionafterpnum}{}
+\renewcommand*{\cftsectionformatpnum}[1]{}
+\renewcommand*{\cftsectionformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforesubsectionskip}
+% \newlength{\cftsubsectionindent}
+% \newlength{\cftsubsectionnumwidth}
+\renewcommand*{\cftsubsectionfont}{}
+\renewcommand*{\cftsubsectionname}{}
+\renewcommand*{\cftsubsectionpresnum}{}
+\renewcommand*{\cftsubsectionaftersnum}{}
+\renewcommand*{\cftsubsectionaftersnumb}{}
+\renewcommand*{\cftsubsectionleader}{}
+\renewcommand*{\cftsubsectiondotsep}{1}
+\renewcommand*{\cftsubsectionpagefont}{}
+\renewcommand*{\cftsubsectionafterpnum}{}
+\renewcommand*{\cftsubsectionformatpnum}[1]{}
+\renewcommand*{\cftsubsectionformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforesubsubsectionskip}
+% \newlength{\cftsubsubsectionindent}
+% \newlength{\cftsubsubsectionnumwidth}
+\renewcommand*{\cftsubsubsectionfont}{}
+\renewcommand*{\cftsubsubsectionname}{}
+\renewcommand*{\cftsubsubsectionpresnum}{}
+\renewcommand*{\cftsubsubsectionaftersnum}{}
+\renewcommand*{\cftsubsubsectionaftersnumb}{}
+\renewcommand*{\cftsubsubsectionleader}{}
+\renewcommand*{\cftsubsubsectiondotsep}{1}
+\renewcommand*{\cftsubsubsectionpagefont}{}
+\renewcommand*{\cftsubsubsectionafterpnum}{}
+\renewcommand*{\cftsubsubsectionformatpnum}[1]{}
+\renewcommand*{\cftsubsubsectionformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforeparagraphskip}
+% \newlength{\cftparagraphindent}
+% \newlength{\cftparagraphnumwidth}
+\renewcommand*{\cftparagraphfont}{}
+\renewcommand*{\cftparagraphname}{}
+\renewcommand*{\cftparagraphpresnum}{}
+\renewcommand*{\cftparagraphaftersnum}{}
+\renewcommand*{\cftparagraphaftersnumb}{}
+\renewcommand*{\cftparagraphleader}{}
+\renewcommand*{\cftparagraphdotsep}{1}
+\renewcommand*{\cftparagraphpagefont}{}
+\renewcommand*{\cftparagraphafterpnum}{}
+\renewcommand*{\cftparagraphformatpnum}[1]{}
+\renewcommand*{\cftparagraphformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforesubparagraphskip}
+% \newlength{\cftsubparagraphindent}
+% \newlength{\cftsubparagraphnumwidth}
+\renewcommand*{\cftsubparagraphfont}{}
+\renewcommand*{\cftsubparagraphname}{}
+\renewcommand*{\cftsubparagraphpresnum}{}
+\renewcommand*{\cftsubparagraphaftersnum}{}
+\renewcommand*{\cftsubparagraphaftersnumb}{}
+\renewcommand*{\cftsubparagraphleader}{}
+\renewcommand*{\cftsubparagraphdotsep}{1}
+\renewcommand*{\cftsubparagraphpagefont}{}
+\renewcommand*{\cftsubparagraphafterpnum}{}
+\renewcommand*{\cftsubparagraphformatpnum}[1]{}
+\renewcommand*{\cftsubparagraphformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforefigureskip}
+% \newlength{\cftfigureindent}
+% \newlength{\cftfigurenumwidth}
+\renewcommand*{\cftfigurefont}{}
+\renewcommand*{\cftfigurename}{}
+\renewcommand*{\cftfigurepresnum}{}
+\renewcommand*{\cftfigureaftersnum}{}
+\renewcommand*{\cftfigureaftersnumb}{}
+\renewcommand*{\cftfigureleader}{}
+\renewcommand*{\cftfiguredotsep}{1}
+\renewcommand*{\cftfigurepagefont}{}
+\renewcommand*{\cftfigureafterpnum}{}
+\renewcommand*{\cftfigureformatpnum}[1]{}
+\renewcommand*{\cftfigureformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforesubfigureskip}
+% \newlength{\cftsubfigureindent}
+% \newlength{\cftsubfigurenumwidth}
+\newcommand*{\cftsubfigurefont}{}
+\newcommand*{\cftsubfigurename}{}
+\newcommand*{\cftsubfigurepresnum}{}
+\newcommand*{\cftsubfigureaftersnum}{}
+\newcommand*{\cftsubfigureaftersnumb}{}
+\newcommand*{\cftsubfigureleader}{}
+\newcommand*{\cftsubfiguredotsep}{1}
+\newcommand*{\cftsubfigurepagefont}{}
+\newcommand*{\cftsubfigureafterpnum}{}
+\newcommand*{\cftsubfigureformatpnum}[1]{}
+\newcommand*{\cftsubfigureformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforetableskip}
+% \newlength{\cfttableindent}
+% \newlength{\cfttablenumwidth}
+\renewcommand*{\cfttablefont}{}
+\renewcommand*{\cfttablename}{}
+\renewcommand*{\cfttablepresnum}{}
+\renewcommand*{\cfttableaftersnum}{}
+\renewcommand*{\cfttableaftersnumb}{}
+\renewcommand*{\cfttableleader}{}
+\renewcommand*{\cfttabledotsep}{1}
+\renewcommand*{\cfttablepagefont}{}
+\renewcommand*{\cfttableafterpnum}{}
+\renewcommand*{\cfttableformatpnum}[1]{}
+\renewcommand*{\cfttableformatpnumhook}[1]{}
+% \end{macrocode}
+
+% \begin{macrocode}
+% \newlength{\cftbeforesubtableskip}
+% \newlength{\cftsubtableindent}
+% \newlength{\cftsubtablenumwidth}
+\newcommand*{\cftsubtablefont}{}
+\newcommand*{\cftsubtablename}{}
+\newcommand*{\cftsubtablepresnum}{}
+\newcommand*{\cftsubtableaftersnum}{}
+\newcommand*{\cftsubtableaftersnumb}{}
+\newcommand*{\cftsubtableleader}{}
+\newcommand*{\cftsubtabledotsep}{1}
+\newcommand*{\cftsubtablepagefont}{}
+\newcommand*{\cftsubtableafterpnum}{}
+\newcommand*{\cftsubtableformatpnum}[1]{}
+\newcommand*{\cftsubtableformatpnumhook}[1]{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\booknumberline}[1]{}
+\renewcommand*{\partnumberline}[1]{}
+\renewcommand*{\chapternumberline}[1]{}
+\renewcommand*{\numberlinehook}[1]{}
+% \renewcommand*{\cftwhatismyname}{}%
+\renewcommand*{\booknumberlinehook}[1]{}
+\renewcommand*{\partnumberlinehook}[1]{}
+\renewcommand*{\chapternumberlinehook}[1]{}
+\renewcommand{\numberlinebox}[2]{}
+\renewcommand{\booknumberlinebox}[2]{}
+\renewcommand{\partnumberlinebox}[2]{}
+\renewcommand{\chapternumberlinebox}[2]{}
+%
+% \newlength{\cftparfillskip}
+\renewcommand*{\cftpagenumbersoff}[1]{}
+\renewcommand*{\cftpagenumberson}[1]{}
+\renewcommand*{\cftlocalchange}[3]{}
+\renewcommand*{\cftaddtitleline}[4]{}
+\renewcommand*{\cftaddnumtitleline}[4]{}
+\renewcommand{\cftinsertcode}[2]{}
+\renewcommand{\cftinserthook}[2]{}
+\renewcommand{\settocpreprocessor}[2]{}
+\DeclareRobustCommand{\cftpagenumbersoff}[1]{}
+\DeclareRobustCommand{\cftpagenumberson}[1]{}
+% \end{macrocode}
+%
+% \subsection{Floats and captions}
+%
+% \begin{noindmacro}{\newfloat} \oarg{1: within} \marg{2: type}
+% \marg{3: ext} \marg{4: capname}
+% \begin{macrocode}
+\RenewDocumentCommand{\newfloat}{o m m m}{%
+\IfValueTF{#1}%
+{\DeclareFloatingEnvironment[fileext=#3,within=#1,name={#4}]{#2}}%
+{\DeclareFloatingEnvironment[fileext=#3,name={#4}]{#2}}%
+% \end{macrocode}
+% \pkg{newfloat} package automatically creates the \cs{listof} command
+% for new floats, but \pkg{float} does not,
+% so remove \cs{listof} here in case it is manually created later.
+% ^^A *8* keep the following?
+% \begin{macrocode}
+\cslet{listof#2s}\relax%
+\cslet{listof#2es}\relax%
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+% \begin{noindmacro}{\newlistof} \oarg{within} \marg{type} \marg{ext} \marg{listofname}
+%
+% Emulated through the \cs{newfloat} mechanism.
+% Note that \pkg{memoir} uses a different syntax than \pkg{tocloft} for the name.
+% \begin{macrocode}
+\RenewDocumentCommand{\newlistof}{o m m m}
+{%
+\IfValueTF{#1}
+{\newlistentry[#1]{#2}{#3}{0}}
+{\newlistentry{#2}{#3}{0}}
+\@namedef{ext@#2}{#3}%
+\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}%
+\setcounter{#3depth}{1}%
+\@namedef{#3mark}{}%
+\@namedef{#2}{\listof{#2}{#4}}
+\@namedef{@cftmake#3title}{}
+\@ifundefined{cftbefore#3titleskip}{
+ \expandafter\newlength\csname cftbefore#3titleskip\endcsname
+ \expandafter\newlength\csname cftafter#3titleskip\endcsname
+}{}
+\@namedef{cft#3titlefont}{}
+\@namedef{cftafter#3title}{}
+\@namedef{cft#3prehook}{}
+\@namedef{cft#3posthook}{}
+}
+% \end{macrocode}
+% \end{noindmacro}
+%
+%
+% \begin{macrocode}
+\renewcommand{\setfloatadjustment}[2]{}
+% \end{macrocode}
+%
+% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
+% \begin{macrocode}
+\NewDocumentEnvironment{KFLTmemoir@marginfloat}{O{-1.2ex} m}
+{% start
+\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
+\captionsetup{type=#2}%
+}
+{%
+\endLWR@BlockClassWP%
+}
+
+\DeclareDocumentEnvironment{marginfigure}{o}
+ {\begin{KFLTmemoir@marginfloat}{figure}}
+ {\end{KFLTmemoir@marginfloat}}
+
+\DeclareDocumentEnvironment{margintable}{o}
+ {\begin{KFLTmemoir@marginfloat}{table}}
+ {\end{KFLTmemoir@marginfloat}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand{\setmarginfloatcaptionadjustment}[2]{}
+\renewcommand{\setmpjustification}[2]{}
+\renewcommand*{\mpjustification}{}
+\renewcommand*{\setfloatlocations}[2]{}
+\DeclareDocumentCommand{\suppressfloats}{o}{}
+\renewcommand*{\FloatBlock}{}
+\renewcommand*{\FloatBlockAllowAbove}{}
+\renewcommand*{\FloatBlockAllowBelow}{}
+\renewcommand*{\setFloatBlockFor}{}
+\renewcommand*{\captiondelim}[1]{\renewcommand*{\CaptionSeparator}{#1}}
+\renewcommand*{\captionnamefont}[1]{}
+\renewcommand*{\captiontitlefont}[1]{}
+\renewcommand*{\captionstyle}[2][]{}
+\renewcommand*{\centerlastline}{}
+\renewcommand*{\hangcaption}{}
+\renewcommand*{\indentcaption}[1]{}
+\renewcommand*{\normalcaption}{}
+\renewcommand*{\changecaptionwidth}{}
+\DeclareDocumentCommand{\captionwidth}{m}{}
+\renewcommand*{\normalcaptionwidth}{}
+\renewcommand{\precaption}[1]{}
+\renewcommand{\captiontitlefinal}[1]{}
+\renewcommand{\postcaption}[1]{}
+
+\renewcommand{\contcaption}[1]{%
+% \ContinuedFloat%
+% \caption{#1}%
+\begin{LWR@figcaption}% later becomes \caption*
+\csuse{\@captype name} \thechapter.\the\value{\@captype}\CaptionSeparator #1
+\end{LWR@figcaption}
+}
+% \end{macrocode}
+% The extra |\\| here forces a \element{br} in HTML when \cs{legend} is
+% used in a \cs{marginpar}.
+% \begin{macrocode}
+\renewcommand{\legend}[1]{\begin{center}#1\\\end{center}}
+
+\renewcommand{\namedlegend}[2][]{
+\begin{center}
+\csuse{fleg\@captype}\CaptionSeparator#2\\
+\end{center}
+\csuse{flegtoc\@captype}{#1}
+}
+
+\renewcommand{\flegtable}{\tablename}
+\renewcommand{\flegfigure}{\figurename}
+\renewcommand{\flegtoctable}{}
+\renewcommand{\flegtocfigure}{}
+
+\renewcommand{\newfixedcaption}[3][\caption]{%
+ \renewcommand{#2}{\def\@captype{#3}#1}}
+\renewcommand{\renewfixedcaption}[3][\caption]{%
+ \renewcommand{#2}{\def\@captype{#3}#1}}
+\renewcommand{\providefixedcaption}[3][\caption]{%
+ \providecommand{#2}{\def\@captype{#3}#1}}
+
+\renewcommand{\bitwonumcaption}[6][]{%
+\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
+\addtocounter{\@captype}{-1}%
+\begingroup%
+\csdef{\@captype name}{#4}%
+\ifblank{#5}{\caption{#6}}{\caption[#5]{#6}}%
+\endgroup%
+\ifblank{#1}{}{\label{#1}}%
+}
+
+\LetLtxMacro\bionenumcaption\bitwonumcaption% todo
+
+\renewcommand{\bicaption}[5][]{%
+\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
+\begin{LWR@figcaption}% later becomes \caption*
+#4 \thechapter.\the\value{\@captype}\CaptionSeparator #5
+\end{LWR@figcaption}
+\ifblank{#1}{}{\label{#1}}%
+}
+
+\renewcommand{\bicontcaption}[3]{%
+\contcaption{#1}%
+\begingroup%
+\csdef{\@captype name}{#2}%
+\contcaption{#3}%
+\endgroup%
+}
+
+\renewcommand{\midbicaption}[1]{}
+
+\renewcommand{\subcaption}[2][]{%
+\ifblank{#1}{\subfloat[#2]{}}{\subfloat[#1][#2]{}}%
+}
+
+\RenewDocumentCommand{\subtop}{O{} O{} m}{%
+\subfloat[#1][#2]{#3}%
+}
+
+\RenewDocumentCommand{\subbottom}{O{} O{} m}{%
+\subfloat[#1][#2]{#3}%
+}
+
+\renewcommand{\contsubcaption}{\ContinuedFloat\subcaption}
+
+\renewcommand{\contsubtop}{%
+\ContinuedFloat\addtocounter{\@captype}{1}%
+\subtop}
+
+\renewcommand{\contsubbottom}{%
+\ContinuedFloat\addtocounter{\@captype}{1}%
+\subbottom}
+
+\renewcommand{\subconcluded}{}
+
+\LetLtxMacro\subcaptionref\subref
+
+\renewcommand*{\tightsubcaptions}{}
+\renewcommand*{\loosesubcaptions}{}
+
+\renewcommand*{\subcaptionsize}[1]{}
+\renewcommand*{\subcaptionlabelfont}[1]{}
+\renewcommand*{\subcaptionfont}[1]{}
+\renewcommand*{\subcaptionstyle}[1]{}
+
+\renewcommand*{\hangsubcaption}{}
+\renewcommand*{\shortsubcaption}{}
+\renewcommand*{\normalsubcaption}{}
+
+\RenewDocumentEnvironment{sidecaption}{o m o}
+{}
+{
+\IfValueTF{#1}{\caption[#1]{#2}}{\caption{#2}}%
+\IfValueT{#3}{\label{#3}}%
+}
+
+% \newlength{\sidecapwidth}
+% \newlength{\sidecapsep}
+\renewcommand*{\setsidecaps}[2]{}
+\renewcommand*{\sidecapmargin}[1]{}
+% \newif\ifscapmargleft
+\scapmargleftfalse
+\renewcommand*{\setsidecappos}[1]{}
+
+\RenewDocumentEnvironment{sidecontcaption}{m o}
+{}
+{%
+\ContinuedFloat%
+\caption{#1}%
+% \end{macrocode}
+% Without \cs{@captype}, the section is referred to instead.
+% \begin{macrocode}
+\IfValueT{#2}{\label[\@captype]{#2}}%
+}
+% \end{macrocode}
+% \cs{sidenamedlegend} does not appear to use the TOC argument.
+% \begin{macrocode}
+\renewenvironment{sidenamedlegend}[2][]{
+\begin{center}
+\csuse{\@captype name}\CaptionSeparator#2
+\end{center}
+}
+{}
+
+\renewenvironment{sidelegend}[1]
+{\begin{center}
+#1
+
+}
+{\end{center}}
+
+\renewcommand*{\sidecapstyle}{}
+\renewcommand*{\overridescapmargin}[1]{}
+% \newlength{\sidecapraise}
+\renewcommand*{\sidecapfloatwidth}{\linewidth}
+
+\LetLtxMacro\ctabular\tabular
+\LetLtxMacro\endctabular\endtabular
+
+\renewcommand{\autorows}[5][]{%
+#5
+}
+
+\renewcommand{\autocols}[5][]{%
+#5
+}
+% \end{macrocode}
+%
+% \subsection{Page notes}
+%
+% \begin{macrocode}
+\renewcommand*{\feetabovefloat}{}
+\renewcommand*{\feetbelowfloat}{}
+\renewcommand*{\feetatbottom}{}
+
+\renewcommand*{\verbfootnote}[2][]{
+\PackageError{lwarp,memoir}
+{Verbatim footnotes are not yet supported by lwarp.}
+{This may be improved some day.}
+}
+
+\renewcommand*{\plainfootnotes}{}
+\renewcommand*{\twocolumnfootnotes}{}
+\renewcommand*{\threecolumnfootnotes}{}
+\renewcommand*{\paragraphfootnotes}{}
+\renewcommand*{\footfudgefiddle}{}
+
+\renewcommand*{\newfootnoteseries}[1]{
+\PackageError{lwarp,memoir}
+{Memoir footnote series are not yet supported by lwarp.}
+{This may be improved some day.}
+}
+
+\renewcommand*{\plainfootstyle}[1]{}
+\renewcommand*{\twocolumnfootstyle}[1]{}
+\renewcommand*{\threecolumnfootstyle}[1]{}
+\renewcommand*{\paragraphfootstyle}[1]{}
+
+\renewcommand*{\footfootmark}{}
+\renewcommand*{\footmarkstyle}[1]{}
+
+% \newlength{\footmarkwidth}
+% \newlength{\footmarksep}
+% \newlength{\footparindent}
+
+\renewcommand*{\foottextfont}{}
+
+\renewcommand*{\marginparmargin}[1]{}
+\renewcommand*{\sideparmargin}[1]{}
+
+\LetLtxMacro\sidepar\marginpar
+\renewcommand*{\sideparfont}{}
+\renewcommand*{\sideparform}{}
+\LWR@providelength{\sideparvshift}
+
+\renewcommand*{\parnopar}{}
+
+\renewcommand{\sidebar}[1]{\begin{quote}#1\end{quote}}
+\renewcommand*{\sidebarmargin}[1]{}
+\renewcommand*{\sidebarfont}{}
+\renewcommand*{\sidebarform}{}
+% \newlength{\sidebarhsep}
+% \newlength{\sidebarvsep}
+% \newlength{\sidebarwidth}
+% \newlength{\sidebartopsep}
+\renewcommand{\setsidebarheight}[1]{}
+\renewcommand*{\setsidebars}[6]{}
+\renewcommand*{\footnotesatfoot}{}
+\renewcommand*{\footnotesinmargin}{}
+
+\LetLtxMacro\sidefootnote\footnote
+\LetLtxMacro\sidefootnotemark\footnotemark
+\LetLtxMacro\sidefootnotetext\footnotetext
+
+\renewcommand*{\sidefootmargin}[1]{}
+% \newlength{\sidefoothsep}
+% \newlength{\sidefootvsep}
+% \newlength{\sidefootwidth}
+% \newlength{\sidefootadjust}
+% \newlength{\sidefootheight}
+\renewcommand*{\setsidefootheight}[1]{}
+% \renewcommand*{\sidefootfont}{}% in docs but not in the package
+\renewcommand*{\setsidefeet}[6]{}
+\renewcommand*{\sidefootmarkstyle}[1]{}
+\renewcommand*{\sidefoottextfont}{}
+\renewcommand*{\sidefootform}{}
+
+\renewcommand*{\continuousnotenums}{\pncontopttrue}% from pagenote
+\renewcommand*{\notepageref}{}
+\renewcommand*{\prenotetext}{}
+\renewcommand*{\postnotetext}{}
+\renewcommand*{\idtextinnotes}[1]{}
+\renewcommand*{\printpageinnotes}[1]{}
+\renewcommand*{\printpageinnoteshyperref}[1]{}
+\renewcommand*{\foottopagenote}{}
+\renewcommand*{\pagetofootnote}{}
+% \end{macrocode}
+%
+% \subsection{Decorative text}
+%
+% \begin{macrocode}
+\renewcommand*{\epigraphposition}[1]{}
+\renewcommand*{\epigraphtextposition}[1]{}
+\renewcommand*{\epigraphsourceposition}[1]{}
+\renewcommand*{\epigraphfontsize}[1]{}
+\renewcommand*{\epigraphforheader}[2][]{}
+\renewcommand*{\epigraphpicture}{}
+% \end{macrocode}
+%
+% \subsection{Poetry}
+%
+% \begin{macrocode}
+\renewcommand*{\vinphantom}{}
+\renewcommand*{\vleftofline}[1]{#1}
+% \let\linenumberfrequency\poemlines
+% \renewcommand*{\linenumberfont}[1]{}
+
+\DeclareDocumentCommand{\PoemTitle}{s o o m}{%
+\IfValueTF{#2}%
+{\poemtitle[#2]{#4}}%
+{\poemtitle{#4}}%
+}
+
+\renewcommand*{\NumberPoemTitle}{}
+\renewcommand*{\PlainPoemTitle}{}
+\renewcommand*{\poemtitlepstyle}{}
+\renewcommand*{\poemtitlestarmark}[1]{}
+\renewcommand*{\poemtitlestarpstyle}{}
+\renewcommand*{\PoemTitleheadstart}{}
+\renewcommand*{\printPoemTitlenonum}{}
+\renewcommand*{\printPoemTitlenum}{}
+\renewcommand*{\afterPoemTitlenum}{}
+\renewcommand*{\printPoemTitletitle}[1]{}
+\renewcommand*{\afterPoemTitle}{}
+\newlength{\midpoemtitleskip}
+\renewcommand*{\PoemTitlenumfont}{}
+\renewcommand*{\PoemTitlefont}{}
+% \end{macrocode}
+%
+% \subsection{Boxes, verbatims and files}
+%
+% \begin{macrocode}
+\renewenvironment{qframe}{\framed}{\endframed}
+\renewenvironment{qshade}{\shaded}{\endshaded}
+% \end{macrocode}
+%
+% Use the \pkg{comment} package:
+% \begin{macrocode}
+\renewcommand*{\commentsoff}[1]{\includecomment{#1}}
+\renewcommand*{\commentson}[1]{\excludecomment{#1}}
+\LetLtxMacro\renewcomment\commentson
+
+\renewcommand*{\setverbatimfont}[1]{}
+\renewcommand*{\tabson}[1]{}
+\renewcommand*{\tabsoff}{}
+\renewcommand*{\wrappingon}{}
+\renewcommand*{\wrappingoff}{}
+\renewcommand*{\verbatimindent}{}
+\renewcommand*{\verbatimbreakchar}[1]{}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DefineVerbatimEnvironment{fboxverbatim}{Verbatim}{frame=single}
+% \end{macrocode}
%
+% \env{boxedverbatim} is already defined by \pkg{moreverb}.
+% \env{boxedverbatim*} does not appear to work at all, even in a minimal print
+% \pkg{memoir} document.
%
+% \begin{macrocode}
+\renewcommand*{\bvbox}{}
+\renewcommand*{\bvtopandtail}{}
+\renewcommand*{\bvsides}{}
+\renewcommand*{\nobvbox}{}
+% \newlength\bvboxsep
+\renewcommand*{\bvtoprulehook}{}
+\renewcommand*{\bvtopmidhook}{}
+\renewcommand*{\bvendrulehook}{}
+\renewcommand*{\bvleftsidehook}{}
+\renewcommand*{\bvrightsidehook}{}
+\renewcommand*{\bvperpagetrue}{}
+\renewcommand*{\bvperpagefalse}{}
+\renewcommand{\bvtopofpage}[1]{}
+\renewcommand{\bvendofpage}[1]{}
+\renewcommand*{\linenumberfrequency}[1]{}
+\renewcommand*{\resetbvlinenumber}{}
+\renewcommand*{\setbvlinenums}[2]{}
+\renewcommand*{\linenumberfont}[1]{}
+\renewcommand*{\bvnumbersinside}{}
+\renewcommand*{\bvnumbersoutside}{}
+% \end{macrocode}
+%
+% \subsection{Cross referencing}
+%
+% \begin{macrocode}
+\renewcommand*{\fref}[1]{\cref{#1}}
+\renewcommand*{\tref}[1]{\cref{#1}}
+\renewcommand*{\pref}[1]{\cpageref{#1}}
+\renewcommand*{\Aref}[1]{\cref{#1}}
+\renewcommand*{\Bref}[1]{\cref{#1}}
+\renewcommand*{\Pref}[1]{\cref{#1}}
+\renewcommand*{\Sref}[1]{\cref{#1}}
+\renewcommand*{\figurerefname}{Figure}
+\renewcommand*{\tablerefname}{Table}
+\renewcommand*{\pagerefname}{page}
+\renewcommand*{\bookrefname}{Book~}
+\renewcommand*{\partrefname}{Part~}
+\renewcommand*{\chapterrefname}{Chapter~}
+\renewcommand*{\sectionrefname}{\S}
+\renewcommand*{\appendixrefname}{Appendix~}
+\LetLtxMacro\titleref\nameref
+\renewcommand*{\headnameref}{}
+\renewcommand*{\tocnameref}{}
+
+\providecounter{LWR@currenttitle}
+
+\renewcommand*{\currenttitle}{%
+ \addtocounter{LWR@currenttitle}{1}%
+ \label{currenttitle\arabic{LWR@currenttitle}}%
+ \nameref{currenttitle\arabic{LWR@currenttitle}}%
+}
+
+\renewcommand*{\theTitleReference}[2]{}
+\renewcommand*{\namerefon}{}
+\renewcommand*{\namerefoff}{}
+% \end{macrocode}
+%
+% \subsection{Back matter}
+%
+% \begin{macrocode}
+\DeclareDocumentCommand{\newblock}{}{}
+%
+\renewcommand*{\showindexmarks}{}
+\renewcommand*{\hideindexmarks}{}
+
+\renewcommand*{\xindyindex}{}
+% \end{macrocode}
+%
+% \subsection{Miscellaneous}
+%
+% \begin{macrocode}
+\renewcommand*{\changemarks}{}
+\renewcommand*{\nochangemarks}{}
+\renewcommand*{\added}[1]{}
+\renewcommand*{\deleted}[1]{}
+\renewcommand*{\changed}[1]{}
+
+\renewcommand*{\showtrimsoff}{}
+\renewcommand*{\showtrimson}{}
+\renewcommand*{\trimXmarks}{}
+\renewcommand*{\trimLmarks}{}
+\renewcommand*{\trimFrame}{}
+\renewcommand*{\trimNone}{}
+\renewcommand*\trimmarkscolor{}
+\renewcommand*{\trimmarks}{}
+\renewcommand*{\tmarktl}{}
+\renewcommand*{\tmarktr}{}
+\renewcommand*{\tmarkbr}{}
+\renewcommand*{\tmarkbl}{}
+\renewcommand*{\tmarktm}{}
+\renewcommand*{\tmarkmr}{}
+\renewcommand*{\tmarkbm}{}
+\renewcommand*{\tmarkml}{}
+\renewcommand*{\trimmark}{}
+\renewcommand*{\quarkmarks}{}
+\renewcommand*{\registrationColour}[1]{}
+
+\renewcommand*{\leavespergathering}[1]{}
+
+\renewcommand*{\noprelistbreak}{}
+
+\renewcommand*{\cleartorecto}{}
+\renewcommand*{\cleartoverso}{}
+
+\renewenvironment{vplace}[1][]{}{}
+% \end{macrocode}
+%
+% \subsection{Final patchwork}
+%
+% \begin{macrocode}
+\newlistof{tableofcontents}{toc}{\contentsname}
+\newlistof{listoffigures}{lof}{\listfigurename}
+\newlistof{listoftables}{lot}{\listtablename}
+% \end{macrocode}
+%
+% \iffalse
+%</patch-memoir>
+% \fi
%
%
%
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
index bf3172b44ed..c81bb886800 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
@@ -33,7 +33,6 @@ version 2005/12/01 or later.
\askforoverwritefalse
\generate{
\file{lwarp.sty}{\from{lwarp.dtx}{package}}
-\file{lwarp-patch-komascript.sty}{\from{lwarp.dtx}{patch-komascript}}
\file{lwarp-a4.sty}{\from{lwarp.dtx}{a4}}
\file{lwarp-a4wide.sty}{\from{lwarp.dtx}{a4wide}}
\file{lwarp-a5comb.sty}{\from{lwarp.dtx}{a5comb}}
@@ -48,8 +47,10 @@ version 2005/12/01 or later.
\file{lwarp-anysize.sty}{\from{lwarp.dtx}{anysize}}
\file{lwarp-appendix.sty}{\from{lwarp.dtx}{appendix}}
\file{lwarp-arabicfront.sty}{\from{lwarp.dtx}{arabicfront}}
+\file{lwarp-array.sty}{\from{lwarp.dtx}{array}}
\file{lwarp-atbegshi.sty}{\from{lwarp.dtx}{atbegshi}}
\file{lwarp-authblk.sty}{\from{lwarp.dtx}{authblk}}
+\file{lwarp-backref.sty}{\from{lwarp.dtx}{backref}}
\file{lwarp-balance.sty}{\from{lwarp.dtx}{balance}}
\file{lwarp-bigdelim.sty}{\from{lwarp.dtx}{bigdelim}}
\file{lwarp-bigstrut.sty}{\from{lwarp.dtx}{bigstrut}}
@@ -60,10 +61,13 @@ version 2005/12/01 or later.
\file{lwarp-breakurl.sty}{\from{lwarp.dtx}{breakurl}}
\file{lwarp-cancel.sty}{\from{lwarp.dtx}{cancel}}
\file{lwarp-ccaption.sty}{\from{lwarp.dtx}{ccaption}}
+\file{lwarp-changebar.sty}{\from{lwarp.dtx}{changebar}}
\file{lwarp-changepage.sty}{\from{lwarp.dtx}{changepage}}
\file{lwarp-chngpage.sty}{\from{lwarp.dtx}{chngpage}}
\file{lwarp-chappg.sty}{\from{lwarp.dtx}{chappg}}
+\file{lwarp-cite.sty}{\from{lwarp.dtx}{cite}}
\file{lwarp-color.sty}{\from{lwarp.dtx}{color}}
+\file{lwarp-continue.sty}{\from{lwarp.dtx}{continue}}
\file{lwarp-crop.sty}{\from{lwarp.dtx}{crop}}
\file{lwarp-cuted.sty}{\from{lwarp.dtx}{cuted}}
\file{lwarp-cutwin.sty}{\from{lwarp.dtx}{cutwin}}
@@ -74,6 +78,7 @@ version 2005/12/01 or later.
\file{lwarp-ebook.sty}{\from{lwarp.dtx}{ebook}}
\file{lwarp-ellipsis.sty}{\from{lwarp.dtx}{ellipsis}}
\file{lwarp-emptypage.sty}{\from{lwarp.dtx}{emptypage}}
+\file{lwarp-endfloat.sty}{\from{lwarp.dtx}{endfloat}}
\file{lwarp-endnotes.sty}{\from{lwarp.dtx}{endnotes}}
\file{lwarp-enumerate.sty}{\from{lwarp.dtx}{enumerate}}
\file{lwarp-enumitem.sty}{\from{lwarp.dtx}{enumitem}}
@@ -90,10 +95,12 @@ version 2005/12/01 or later.
\file{lwarp-fix2col.sty}{\from{lwarp.dtx}{fix2col}}
\file{lwarp-fixme.sty}{\from{lwarp.dtx}{fixme}}
\file{lwarp-fixmetodonotes.sty}{\from{lwarp.dtx}{fixmetodonotes}}
+\file{lwarp-flafter.sty}{\from{lwarp.dtx}{flafter}}
\file{lwarp-float.sty}{\from{lwarp.dtx}{float}}
\file{lwarp-floatflt.sty}{\from{lwarp.dtx}{floatflt}}
\file{lwarp-floatpag.sty}{\from{lwarp.dtx}{floatpag}}
\file{lwarp-floatrow.sty}{\from{lwarp.dtx}{floatrow}}
+\file{lwarp-fltrace.sty}{\from{lwarp.dtx}{fltrace}}
\file{lwarp-flushend.sty}{\from{lwarp.dtx}{flushend}}
\file{lwarp-fncychap.sty}{\from{lwarp.dtx}{fncychap}}
\file{lwarp-fnpos.sty}{\from{lwarp.dtx}{fnpos}}
@@ -102,16 +109,19 @@ version 2005/12/01 or later.
\file{lwarp-footnotehyper.sty}{\from{lwarp.dtx}{footnotehyper}}
\file{lwarp-fontenc.sty}{\from{lwarp.dtx}{fontenc}}
\file{lwarp-fontspec.sty}{\from{lwarp.dtx}{fontspec}}
+\file{lwarp-footnpag.sty}{\from{lwarp.dtx}{footnpag}}
\file{lwarp-framed.sty}{\from{lwarp.dtx}{framed}}
\file{lwarp-ftnright.sty}{\from{lwarp.dtx}{ftnright}}
\file{lwarp-fullpage.sty}{\from{lwarp.dtx}{fullpage}}
\file{lwarp-fullwidth.sty}{\from{lwarp.dtx}{fullwidth}}
+\file{lwarp-fwlw.sty}{\from{lwarp.dtx}{fwlw}}
\file{lwarp-geometry.sty}{\from{lwarp.dtx}{geometry}}
\file{lwarp-glossaries.sty}{\from{lwarp.dtx}{glossaries}}
\file{lwarp-graphicx.sty}{\from{lwarp.dtx}{graphicx}}
\file{lwarp-graphics.sty}{\from{lwarp.dtx}{graphics}}
\file{lwarp-grffile.sty}{\from{lwarp.dtx}{grffile}}
\file{lwarp-hang.sty}{\from{lwarp.dtx}{hang}}
+\file{lwarp-hanging.sty}{\from{lwarp.dtx}{hanging}}
\file{lwarp-hyperref.sty}{\from{lwarp.dtx}{hyperref}}
\file{lwarp-hyperxmp.sty}{\from{lwarp.dtx}{hyperxmp}}
\file{lwarp-idxlayout.sty}{\from{lwarp.dtx}{idxlayout}}
@@ -134,15 +144,18 @@ version 2005/12/01 or later.
\file{lwarp-marginnote.sty}{\from{lwarp.dtx}{marginnote}}
\file{lwarp-mcaption.sty}{\from{lwarp.dtx}{mcaption}}
\file{lwarp-mdframed.sty}{\from{lwarp.dtx}{mdframed}}
+\file{lwarp-memhfixc.sty}{\from{lwarp.dtx}{memhfixc}}
+\file{lwarp-metalogo.sty}{\from{lwarp.dtx}{metalogo}}
\file{lwarp-microtype.sty}{\from{lwarp.dtx}{microtype}}
\file{lwarp-midfloat.sty}{\from{lwarp.dtx}{midfloat}}
-\file{lwarp-metalogo.sty}{\from{lwarp.dtx}{metalogo}}
+\file{lwarp-midpage.sty}{\from{lwarp.dtx}{midpage}}
\file{lwarp-moreverb.sty}{\from{lwarp.dtx}{moreverb}}
\file{lwarp-morewrites.sty}{\from{lwarp.dtx}{morewrites}}
\file{lwarp-mparhack.sty}{\from{lwarp.dtx}{mparhack}}
\file{lwarp-multicol.sty}{\from{lwarp.dtx}{multicol}}
\file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}}
\file{lwarp-nameref.sty}{\from{lwarp.dtx}{nameref}}
+\file{lwarp-natbib.sty}{\from{lwarp.dtx}{natbib}}
\file{lwarp-needspace.sty}{\from{lwarp.dtx}{needspace}}
\file{lwarp-newclude.sty}{\from{lwarp.dtx}{newclude}}
\file{lwarp-newunicodechar.sty}{\from{lwarp.dtx}{newunicodechar}}
@@ -153,6 +166,7 @@ version 2005/12/01 or later.
\file{lwarp-ntheorem.sty}{\from{lwarp.dtx}{ntheorem}}
\file{lwarp-overpic.sty}{\from{lwarp.dtx}{overpic}}
\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}}
+\file{lwarp-pagesel.sty}{\from{lwarp.dtx}{pagesel}}
\file{lwarp-paralist.sty}{\from{lwarp.dtx}{paralist}}
\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}}
\file{lwarp-pdflscape.sty}{\from{lwarp.dtx}{pdflscape}}
@@ -160,6 +174,7 @@ version 2005/12/01 or later.
\file{lwarp-pfnote.sty}{\from{lwarp.dtx}{pfnote}}
\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}}
\file{lwarp-prelim2e.sty}{\from{lwarp.dtx}{prelim2e}}
+\file{lwarp-prettyref.sty}{\from{lwarp.dtx}{prettyref}}
\file{lwarp-preview.sty}{\from{lwarp.dtx}{preview}}
\file{lwarp-quotchap.sty}{\from{lwarp.dtx}{quotchap}}
\file{lwarp-ragged2e.sty}{\from{lwarp.dtx}{ragged2e}}
@@ -190,6 +205,7 @@ version 2005/12/01 or later.
\file{lwarp-soulutf8.sty}{\from{lwarp.dtx}{soulutf8}}
\file{lwarp-stabular.sty}{\from{lwarp.dtx}{stabular}}
\file{lwarp-subfig.sty}{\from{lwarp.dtx}{subfig}}
+\file{lwarp-subfigure.sty}{\from{lwarp.dtx}{subfigure}}
\file{lwarp-supertabular.sty}{\from{lwarp.dtx}{supertabular}}
\file{lwarp-syntonly.sty}{\from{lwarp.dtx}{syntonly}}
\file{lwarp-tabularx.sty}{\from{lwarp.dtx}{tabularx}}
@@ -197,6 +213,7 @@ version 2005/12/01 or later.
\file{lwarp-tabls.sty}{\from{lwarp.dtx}{tabls}}
\file{lwarp-textarea.sty}{\from{lwarp.dtx}{textarea}}
\file{lwarp-textcomp.sty}{\from{lwarp.dtx}{textcomp}}
+\file{lwarp-textfit.sty}{\from{lwarp.dtx}{textfit}}
\file{lwarp-textpos.sty}{\from{lwarp.dtx}{textpos}}
\file{lwarp-theorem.sty}{\from{lwarp.dtx}{theorem}}
\file{lwarp-threeparttable.sty}{\from{lwarp.dtx}{threeparttable}}
@@ -214,6 +231,7 @@ version 2005/12/01 or later.
\file{lwarp-todonotes.sty}{\from{lwarp.dtx}{todonotes}}
\file{lwarp-transparent.sty}{\from{lwarp.dtx}{transparent}}
\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}}
+\file{lwarp-turnthepage.sty}{\from{lwarp.dtx}{turnthepage}}
\file{lwarp-typearea.sty}{\from{lwarp.dtx}{typearea}}
\file{lwarp-ulem.sty}{\from{lwarp.dtx}{ulem}}
\file{lwarp-upref.sty}{\from{lwarp.dtx}{upref}}
@@ -227,6 +245,8 @@ version 2005/12/01 or later.
\file{lwarp-xmpincl.sty}{\from{lwarp.dtx}{xmpincl}}
\file{lwarp-xtab.sty}{\from{lwarp.dtx}{xtab}}
\file{lwarp-zwpagelayout.sty}{\from{lwarp.dtx}{zwpagelayout}}
+\file{lwarp-patch-komascript.sty}{\from{lwarp.dtx}{patch-komascript}}
+\file{lwarp-patch-memoir.sty}{\from{lwarp.dtx}{patch-memoir}}
}
\Msg{*********************************************************}
\Msg{*}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty
index d5f78b8c505..4d899d4076e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-abstract.sty
@@ -15,6 +15,7 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
+\ProvideDocumentEnvironment{abstract}{}{}{}
\LWR@ProvidesPackagePass{abstract}
\AtBeginDocument{
@@ -32,6 +33,33 @@
\@bslabeldelim}%
}
+\@ifclassloaded{memoir}
+{
+ \renewenvironment{abstract}{%
+ \null\vfil
+ \@beginparpenalty\@lowpenalty
+ \if@bsrunin
+ \else
+ \if@bsstyle
+ \abstitlestyle{\BlockClassSingle{abstracttitle}{\abstractname}}
+ \else
+ \ifnumber@bs
+ \num@bs
+ \else
+ \begin{\absnamepos}%
+ \abstractnamefont \BlockClassSingle{abstracttitle}{\abstractname}
+ \@endparpenalty\@M
+ \end\absnamepos%
+%% \vspace{\abstitleskip}%
+ \fi
+ \fi
+ \vspace{\abstitleskip}%
+ \fi
+ \put@bsintoc%
+ \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
+ {\par\end{@bstr@ctlist}\vfil\null%\endtitlepage
+ }
+}{% not memoir
\if@titlepage
\renewenvironment{abstract}{%
\null\vfil
@@ -79,7 +107,7 @@
\begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
{\par\end{@bstr@ctlist}}
\fi
-
+}% not memoir
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
index 6d2b70ba793..b411574059f 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
@@ -66,10 +66,7 @@
\LWR@haveamsthmnumber
\LWR@haveamsthmnote
\def\@begintheorem#1#2[#3]{%
-\LWR@forcenewpage% new
- \BlockClass{amsthmbody\LWR@thisthmstyle}% new
- \deferred@thm@head{
- \the\thm@headfont \thm@indent
+ \item[
\@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% new
\@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% new
\@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% new
@@ -77,9 +74,58 @@
\the\thm@headpunct~
\thmheadnl % possibly a newline.
\hskip\thm@headsep
- }%
+ ]
\ignorespaces}
-\def\@endtheorem{\endBlockClass\endtrivlist\@endpefalse }
+\def\@thm#1#2#3{%
+ \ifhmode\unskip\unskip\par\fi
+ \normalfont
+ \LWR@forcenewpage% new
+ \BlockClass{amsthmbody\LWR@thisthmstyle}% new
+ \trivlist
+ \let\thmheadnl\relax
+ \let\thm@swap\@gobble
+ \thm@notefont{\fontseries\mddefault\upshape}%
+ \thm@headpunct{.}% add period after heading
+ \thm@headsep 5\p@ plus\p@ minus\p@\relax
+ \thm@space@setup
+ #1% style overrides
+ \@topsep \thm@preskip % used by thm head
+ \@topsepadd \thm@postskip % used by \@endparenv
+ \def\@tempa{#2}\ifx\@empty\@tempa
+ \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
+ \else
+ \refstepcounter{#2}%
+ \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
+ \fi
+ \@tempa
+}
+\AtBeginDocument{
+\def\cref@thmoptarg[#1]#2#3#4{%
+ \ifhmode\unskip\unskip\par\fi%
+ \normalfont%
+ \LWR@forcenewpage% new
+ \BlockClass{amsthmbody\LWR@thisthmstyle}% new
+ \trivlist%
+ \let\thmheadnl\relax%
+ \let\thm@swap\@gobble%
+ \thm@notefont{\fontseries\mddefault\upshape}%
+ \thm@headpunct{.}% add period after heading
+ \thm@headsep 5\p@ plus\p@ minus\p@\relax%
+ \thm@space@setup%
+ #2% style overrides
+ \@topsep \thm@preskip % used by thm head
+ \@topsepadd \thm@postskip % used by \@endparenv
+ \def\@tempa{#3}\ifx\@empty\@tempa%
+ \def\@tempa{\@oparg{\@begintheorem{#4}{}}[]}%
+ \else%
+ \refstepcounter[#1]{#3}% <<< cleveref modification
+ \def\@tempa{\@oparg{\@begintheorem{#4}{\csname the#3\endcsname}}[]}%
+ \fi%
+ \@tempa
+}%
+}% AtBeginDocument
+
+\def\@endtheorem{\endtrivlist\endBlockClass\@endpefalse }
\AtBeginDocument{
\def\openbox{\text{\HTMLunicode{25A1}}}% UTF-8 white box
\def\blacksquare{\text{\HTMLunicode{220E}}}% UTF-8 end-of-proof
@@ -91,7 +137,7 @@
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
- \item[\hskip\labelsep
+ \item[
\InlineClass{amsthmproofname}{#1\@addpunct{.}}]\ignorespaces% changes
}{%
\InlineClass{theoremendmark}{\popQED}\endtrivlist%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty
new file mode 100644
index 00000000000..a3998ec7356
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty
@@ -0,0 +1,31 @@
+%%
+%% This is file `lwarp-array.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `array')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackagePass{array}
+\let\LWR@origfirsthline\firsthline
+\let\LWR@origlasthline\lasthline
+
+\appto{\LWR@restoreorigformatting}{%
+\let\firsthline\LWR@origfirsthline%
+\let\lasthline\LWR@origlasthline%
+}
+
+\renewcommand*{\firsthline}{\LWR@hline}%
+\renewcommand*{\lasthline}{\LWR@hline}%
+\endinput
+%%
+%% End of file `lwarp-array.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-backref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-backref.sty
new file mode 100644
index 00000000000..26ef59c8a4d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-backref.sty
@@ -0,0 +1,25 @@
+%%
+%% This is file `lwarp-backref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `backref')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{backref}
+
+\def\backref{}\let\backrefxxx\hyper@section@backref
+
+\endinput
+%%
+%% End of file `lwarp-backref.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
index 0e2ea60d61a..4dbc5689393 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
@@ -18,18 +18,16 @@
\LWR@ProvidesPackageDrop{breakurl}
\LetLtxMacro\burl\url
-\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
-\LWR@subhyperref{#3}{#2}% order reversed from \href
-\endgroup%
+\NewDocumentCommand{\burlalt}{O{} +m m}{%
\LWR@ensuredoingapar%
-}
-
-\DeclareRobustCommand*{\burlalt}{%
+\def\LWR@templink{#2}%
+\@onelevel@sanitize\LWR@templink%
+\def\LWR@templinktwo{#3}%
+\@onelevel@sanitize\LWR@templinktwo%
+\LWR@subhyperref{\LWR@templink}{\LWR@templinktwo}%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
-\LWR@burlaltb%
}
+
\LetLtxMacro\urlalt\burlalt
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-changebar.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-changebar.sty
new file mode 100644
index 00000000000..c298ef3c677
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-changebar.sty
@@ -0,0 +1,31 @@
+%%
+%% This is file `lwarp-changebar.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `changebar')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{changebar}
+\newcommand*{\cbstart}{}
+\newcommand*{\cbend}{}
+\newenvironment*{\changebar}{}{}
+\newcommand*{\cbdelete}{}
+\newcommand*{\nochnagebars}{}
+\newcommand*{\cbcolor}[1]{}
+\newlength{\changebarwidth}
+\newlength{\deletebarwidth}
+\newlength{\changebarsep}
+\newcounter{changebargrey}
+\endinput
+%%
+%% End of file `lwarp-changebar.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-changepage.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-changepage.sty
index cd1be1bf28c..c055a02b86d 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-changepage.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-changepage.sty
@@ -23,11 +23,17 @@
\DeclareRobustCommand{\checkoddpage}{\oddpagetrue}
\DeclareRobustCommand{\changetext}[5]{}
\DeclareRobustCommand{\changepage}[9]{}
+
+\@ifundefined{adjustwidth}{
\newenvironment{adjustwidth}[2]{}{}
\newenvironment{adjustwidth*}[2]{}{}
+}{
+\renewenvironment{adjustwidth}[2]{}{}
+\renewenvironment{adjustwidth*}[2]{}{}
+}
-\newcommand*{\strictpagecheck}{}
-\newcommand*{\easypagecheck}{}
+\DeclareDocumentCommand{\strictpagecheck}{}
+\DeclareDocumentCommand{\easypagecheck}{}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cite.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cite.sty
new file mode 100644
index 00000000000..6681dd37091
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cite.sty
@@ -0,0 +1,34 @@
+%%
+%% This is file `lwarp-cite.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `cite')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{cite}
+
+\def\LWRCT@biblabel#1{\@citess{#1}\kern-\labelsep\,}
+
+\ifdefstrequal{\@biblabel}{\LWRCT@biblabel}
+{
+ \def\@biblabel#1{\@citess{#1}}
+}{}
+
+\def\@citess#1{\textsuperscript{#1}}
+
+\DeclareDocumentCommand\citepunct{}{,\,\relax}
+
+\endinput
+%%
+%% End of file `lwarp-cite.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-continue.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-continue.sty
new file mode 100644
index 00000000000..80721c9dbd1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-continue.sty
@@ -0,0 +1,28 @@
+%%
+%% This is file `lwarp-continue.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `continue')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{continue}
+\newcommand*{\flagcont}{}
+\newcommand*{\flagend}{}
+\newcommand*{\flagword}{}
+\newcommand*{\preflagword}{}
+\newcommand*{\postflagword}{}
+\newlength\contsep
+\newlength\contdrop
+\endinput
+%%
+%% End of file `lwarp-continue.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-endfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-endfloat.sty
new file mode 100644
index 00000000000..97f39e23d8f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-endfloat.sty
@@ -0,0 +1,33 @@
+%%
+%% This is file `lwarp-endfloat.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `endfloat')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{endfloat}
+\newcommand\figureplace{}
+\newcommand\tableplace{}
+\newcommand\floatplace[1]{}
+\newcounter{posttable}
+\newcounter{postfigure}
+\newcommand*{\theposttbl}{}
+\newcommand*{\thepostfig}{}
+\newcommand{\AtBeginFigures}[1]{}
+\newcommand{\AtBeginTables}[1]{}
+\newcommand{\AtBeginDelayedFloats}[1]{}
+\newcommand*{\processdelayedfloats}{}
+\newcommand*{\efloatseparator}{}
+\endinput
+%%
+%% End of file `lwarp-endfloat.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
index a1378fd3f2c..df4cd6d0f67 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
@@ -20,7 +20,7 @@
\LWR@ProvidesPackageDrop{epigraph}
-\newcommand{\qitem}[2]
+\DeclareDocumentCommand{\qitem}{m m}
{
\begin{BlockClass}{qitem}
#1
@@ -32,22 +32,29 @@
\end{BlockClass}
}
-\newcommand{\epigraph}[2]
+\DeclareDocumentCommand{\epigraph}{m m}
{
\begin{LWR@BlockClassWP}{text-align:right}{}{epigraph}
\qitem{#1}{#2}
\end{LWR@BlockClassWP}
}
-\newenvironment*{epigraphs}
+\DeclareDocumentEnvironment{epigraphs}{}
{\LWR@BlockClassWP{text-align:right}{}{epigraph}}
{\endLWR@BlockClassWP}
+\newenvironment*{flushepinormal}{}{}
+\@ifclassloaded{memoir}{
+\setlength{\epigraphwidth}{.5\linewidth}
+\renewcommand{\textflush}{flushepinormal}
+\renewcommand{\epigraphhead}[2][0]{#2}
+\renewcommand{\dropchapter}[1]{}
+\renewcommand*{\undodrop}{}
+}{% not memoir
\newlength{\epigraphwidth}
\setlength{\epigraphwidth}{.5\linewidth}
-\newenvironment*{flushepinormal}{}{}
-\newcommand{\textflush}[1]{flushepinormal}
-\newcommand{\epigraphflush}[1]{flushright}
-\newcommand{\sourceflush}[1]{flushright}
+\newcommand{\textflush}{flushepinormal}
+\newcommand{\epigraphflush}{flushright}
+\newcommand{\sourceflush}{flushright}
\newcommand*{\epigraphsize}{\small}
\newlength{\epigraphrule}
\newlength{\beforeepigraphskip}
@@ -55,6 +62,9 @@
\newcommand{\epigraphhead}[2][0]{#2}
\newcommand{\dropchapter}[1]{}
\newcommand*{\undodrop}{}
+}% not memoir
+
+\let\cleartoevenpage\relax% also in nextpage
\newcommand{\cleartoevenpage}[1][]{}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
index ecb8727ca62..4a70cda4dd0 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
@@ -17,7 +17,6 @@
%% version 2005/12/01 or later.
\RequirePackage{xcolor}% for \convertcolorspec
\LWR@ProvidesPackagePass{fancyvrb}
-
\begin{warpHTML}
\fvset{frame=none}%
@@ -30,20 +29,40 @@
\AfterEndPreamble{
\LWR@traceinfo{Patching Verbatim.}
-\let\LWRFV@origVerbatim\Verbatim
-\renewcommand*{\Verbatim}{%
-\LWR@forcenewpage
-\LWRFV@origVerbatim%
+\preto\FVB@Verbatim{\LWR@forcenewpage}
+\preto\FVB@LVerbatim{\LWR@forcenewpage}
+\def\FV@BeginListFrame@Single{%
+ \FV@SingleFrameLine{\z@}%
+}
+
+\def\FV@EndListFrame@Single{%
+ \FV@SingleFrameLine{\@ne}%
+}
+
+\def\FV@BeginListFrame@Lines{%
+ \FV@SingleFrameLine{\z@}%
+}
+
+\def\FV@EndListFrame@Lines{%
+ \FV@SingleFrameLine{\@ne}%
}
+
+\renewcommand*{\FV@SingleFrameSep}{}
+\def\FV@BUseVerbatim#1{%
+ \LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
+ \FV@BVerbatimBegin#1\FV@BVerbatimEnd%
+ \LWR@afterendverbatim%
+}
+
\newcommand*{\LWR@FVstyle}{}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
-\hbox to\z@{\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}}%
+\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
}
\newcommand*{\LWR@fvendnone}{%
\LWR@traceinfo{fvendnone}%
-\hbox to\z@{\LWR@afterendverbatim}%
+\LWR@afterendverbatim%
}
\newcommand*{\LWR@fvstartsingle}{%
@@ -136,7 +155,6 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
\def\FV@SingleFrameLine#1{%
- \hbox to\z@{%
\ifnum#1=\z@\relax
\let\FV@Label\FV@LabelBegin
\else
@@ -156,15 +174,13 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\ifx\FV@LabelPositionBottomLine\relax
\else
\LWR@FVfindbordercolor
+
\LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
\LWR@origtextrm{\FV@LabelEnd}
\LWR@htmltagc{/div}
\fi
\fi
-
\fi
- \hss
- }
}
\def\FV@ListProcessLine#1{%
\hbox to \hsize{%
@@ -180,16 +196,15 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
}
\AtBeginEnvironment{BVerbatim}
-{
-\LWR@forcenewpage
-\LWR@atbeginverbatim{bverbatim}
-
+{%
+\LWR@forcenewpage% instead of \preto
+\LWR@atbeginverbatim{bverbatim}%
}
\AfterEndEnvironment{BVerbatim}
-{
-\leavevmode\par\LWR@origvspace{-\baselineskip}
-\LWR@afterendverbatim
+{%
+\leavevmode\par\LWR@origvspace{-\baselineskip}%
+\LWR@afterendverbatim%
}
} % \AfterEndPreamble
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-flafter.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-flafter.sty
new file mode 100644
index 00000000000..25a6c34b70c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-flafter.sty
@@ -0,0 +1,22 @@
+%%
+%% This is file `lwarp-flafter.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `flafter')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{flafter}
+\providecommand\fl@trace[1]{}
+\endinput
+%%
+%% End of file `lwarp-flafter.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
index 6ce7d78b9ca..c9ac7efb6a3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-float.sty
@@ -21,11 +21,11 @@
\NewDocumentCommand{\newfloat}{m m m o}{%
-\IfValueTF{#4}
-{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}
-{\DeclareFloatingEnvironment[fileext=#3]{#1}}
-\cslet{listof#1s}\relax
-\cslet{listof#1es}\relax
+\IfValueTF{#4}%
+{\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}}%
+{\DeclareFloatingEnvironment[fileext=#3]{#1}}%
+\cslet{listof#1s}\relax%
+\cslet{listof#1es}\relax%
}
\NewDocumentCommand{\floatname}{m +m}{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty
index efdf831f078..6eac63bcabd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatrow.sty
@@ -120,29 +120,29 @@
\define@key{frowkeys}{relatedcapstyle}{}%
\newcommand*{\DeclareNewFloatType}[2]{%
-\renewcommand*{\LWR@frowkeyplacement}{}
-\renewcommand*{\LWR@frowkeyname}{}
-\renewcommand*{\LWR@frowkeyfileext}{}
-\renewcommand*{\LWR@frowkeywithin}{}
-\renewcommand*{\LWR@frowkeycapstyle}{}
+\renewcommand*{\LWR@frowkeyplacement}{}%
+\renewcommand*{\LWR@frowkeyname}{}%
+\renewcommand*{\LWR@frowkeyfileext}{}%
+\renewcommand*{\LWR@frowkeywithin}{}%
+\renewcommand*{\LWR@frowkeycapstyle}{}%
\LWR@traceinfo{about to setkeys frowkeys}%
\setkeys{frowkeys}{#2}%
\LWR@traceinfo{finished setkeys frowkeys}%
-\ifthenelse{\equal{\LWR@frowkeywithin}{}}
-{
- \LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\
+\ifthenelse{\equal{\LWR@frowkeywithin}{}}%
+{%
+ \LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\ %
\LWR@frowkeyfileext}%
- \newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}
+ \newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}%
}%
{%
- \LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\
+ \LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\ %
\LWR@frowkeyfileext\ \LWR@frowkeywithin}%
\newfloat{#1}{\LWR@frowkeyplacement}%
{\LWR@frowkeyfileext}[\LWR@frowkeywithin]%
- \LWR@traceinfo{finished newfloat #1}
+ \LWR@traceinfo{finished newfloat #1}%
}%
-\ifthenelse{\equal{\LWR@frowkeyname}{}}
-{}
+\ifthenelse{\equal{\LWR@frowkeyname}{}}%
+{}%
{\floatname{#1}{\LWR@frowkeyname}}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fltrace.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fltrace.sty
new file mode 100644
index 00000000000..b41219370d1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fltrace.sty
@@ -0,0 +1,24 @@
+%%
+%% This is file `lwarp-fltrace.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `fltrace')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{fltrace}
+\def\tracefloats{}
+\def\tracefloatsoff{}
+\def\tracefloatvals{}
+\endinput
+%%
+%% End of file `lwarp-fltrace.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty
index 9da839dd532..cb86afd25fe 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnote.sty
@@ -20,7 +20,7 @@
\protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}%
}
-\newcommand*{\fn@endnote}{%
+\def\fn@endnote{%
\LWR@htmltagc{/\LWR@tagregularparagraph}%
\LWR@orignewline%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-footnpag.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnpag.sty
new file mode 100644
index 00000000000..c9cb7e00c97
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-footnpag.sty
@@ -0,0 +1,21 @@
+%%
+%% This is file `lwarp-footnpag.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `footnpag')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{footnpag}
+\endinput
+%%
+%% End of file `lwarp-footnpag.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty
index 50218d3d4ae..2382f8affa5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty
@@ -35,14 +35,14 @@
\renewenvironment{shaded}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{framed}%
+\BlockClass[background: \#\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
\renewenvironment{shaded*}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{framed}%
+\BlockClass[background: \#\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fwlw.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fwlw.sty
new file mode 100644
index 00000000000..2e23840efe8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fwlw.sty
@@ -0,0 +1,26 @@
+%%
+%% This is file `lwarp-fwlw.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `fwlw')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{fwlw}
+\newbox\FirstWordBox \global\setbox\FirstWordBox\hbox{}
+\newbox\NextWordBox \global\setbox\NextWordBox\hbox{}
+\newbox\LastWordBox \global\setbox\LastWordBox\hbox{}
+\def\ps@fwlwhead{}
+\def\ps@NextWordFoot{}
+\endinput
+%%
+%% End of file `lwarp-fwlw.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index 04c1b770d86..febcad9a763 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -159,6 +159,7 @@
\Ginclude@graphics{\detokenize\expandafter{#4}}%
\endgroup%
\filename@parse{\LWR@parsedfilename}%
+\LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
\large%
\setlength{\LWR@igwidth}{0pt}%
\setlength{\LWR@igheight}{0pt}%
@@ -219,8 +220,9 @@
{% start of href
\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
\LWR@htmltag{% start of image tags
-img src="\LWR@parsedfilename" \LWR@orignewline%
-\LWR@origtilde{} alt="[\filename@base]" \LWR@orignewline%
+img src="%
+\begingroup\@sanitize\LWR@parsedfilename\endgroup%
+" \LWR@orignewline%
\ifthenelse{
\NOT\equal{\LWR@igwidthstyle}{} \OR
\NOT\equal{\LWR@igheightstyle}{} \OR
@@ -254,7 +256,6 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@origtilde{} class="\LWR@igclass" \LWR@orignewline%
}% end of image tags
}% end of href
-\endgroup
\LWR@origscriptsize
\LWR@traceinfo{LWR@includegraphicsb done}%
}
@@ -271,10 +272,8 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\renewcommand*{\includegraphics}
{%
-\LWR@traceinfo{includegraphics}
+\LWR@traceinfo{includegraphics}%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
\LWR@includegraphicsb%
}% includegraphics
}% AtBeginDocument
@@ -312,7 +311,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@rotstyle{-ms-}{#2} %
\LWR@rotstyle{-webkit-}{#2} %
\LWR@rotstyle{}{#2} %
-"{}}\LWR@orignewline%
+"}\LWR@orignewline%
\begin{LWR@nestspan}%
#3%
\LWR@htmltagc{/span}%
@@ -328,7 +327,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\LWR@scalestyle{-ms-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
\LWR@scalestyle{-webkit-}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
\LWR@scalestyle{}{#1}{\IfNoValueTF{#2}{#1}{#2}} %
-"{}}%
+"}%
\begin{LWR@nestspan}%
#3%
\LWR@htmltagc{/span}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty
new file mode 100644
index 00000000000..27babf27838
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hanging.sty
@@ -0,0 +1,46 @@
+%%
+%% This is file `lwarp-hanging.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `hanging')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{hanging}
+\@ifclassloaded{memoir}{
+\let\hangpara\relax
+\let\hangparas\relax
+\let\endhangparas\relax
+\let\hangpunct\relax
+\let\endhangpunct\relax
+}{}
+\newcommand*{\hangpara}[2]{}
+
+\newenvironment*{hangparas}[2]
+{%
+ \uselengthunit{PT}%
+ \BlockClass[%
+ margin-left:\rndprintlength{#1}; %
+ text-indent:-\rndprintlength{#1}%
+ ]%
+ {hangingpar}%
+}
+{\endBlockClass}
+\newenvironment*{hangpunct}
+{\BlockClass{hangpunct}}
+{\endBlockClass}
+\newcommand{\nhpt}{.}
+\newcommand{\nhlq}{‘}
+\newcommand{\nhrq}{’}
+\endinput
+%%
+%% End of file `lwarp-hanging.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
index e59293feab1..9a3dbe39609 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
@@ -27,39 +27,40 @@
\newcommand*{\hypersetup}[1]{}
\newcommand*{\hyperbaseurl}[1]{}
-\NewDocumentCommand{\LWR@hyperimageb}{m +m}{%
-\LWR@htmltag{img src="#1" alt="#2" class="hyperimage"{}}%
-\endgroup%
+\NewDocumentCommand{\hyperimage}{m +m}{%
\LWR@ensuredoingapar%
-}
-
-\DeclareRobustCommand*{\hyperimage}{%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\LWR@htmltag{img src="\LWR@templink" alt="#2" class="hyperimage"}%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@hyperimageb%
}
\NewDocumentCommand{\hyperdef}{m m +m}{%
\LWR@ensuredoingapar%
-\LWR@subsublabel{#1.#2}%
+\LWR@sublabel{#1.#2}%
#3%
}
\NewDocumentCommand{\LWR@hyperrefb}{m m m +m}{%
-\LWR@htmltag{a href="#1\LWR@hashmark#2.#3"}%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\def\LWR@templinktwo{#2}%
+\@onelevel@sanitize\LWR@templinktwo%
+\def\LWR@templinkthree{#3}%
+\@onelevel@sanitize\LWR@templinkthree%
+\LWR@htmltag{a href="\LWR@templink\LWR@hashmark%
+ \LWR@templinktwo.\LWR@templinkthree"%
+}%
#4%
\LWR@htmltag{/a}%
-\endgroup%
}
\NewDocumentCommand{\LWR@hyperrefc}{O{label} +m}{
\LWR@startref{#1}%
#2%
\LWR@htmltag{/a}%
-\endgroup%
}
\DeclareRobustCommand*{\hyperref}{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
\@ifnextchar[\LWR@hyperrefc\LWR@hyperrefb%
}
@@ -68,7 +69,7 @@
#2%
}
-\NewDocumentCommand{\hyperlink}{m +m}{%
+\DeclareDocumentCommand{\hyperlink}{m +m}{%
\hyperref[#1]{#2}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
index bad9212e236..2c32ff0f9d3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
@@ -21,6 +21,19 @@
\LWR@ProvidesPackageDrop{mdframed}
\LWR@origRequirePackage{amsthm}
\LWR@origRequirePackage[framemethod=none]{mdframed}
+\AtBeginDocument{
+\def\mdf@trivlist#1{%
+ \edef\mdf@temp{%
+ }%
+ \let\@itemlabel\@empty%
+ \def\makelabel##1{##1}%
+}
+
+\renewcommand*{\endmdf@trivlist}{%
+\LWR@traceinfo{endmdf@trivlist}%
+\LWR@listend%
+}
+}% AtBeginDocument
\mdfsetup{
startcode={\LWR@mdframedstart\LWR@origraggedright},
endcode={\LWR@mdframedend},
@@ -36,6 +49,7 @@ endinnercode={\LWR@stoppars},
\rndprintlength{\csuse{mdf@#1@length}}
}
\newcommand*{\LWR@mdframedstart}{%
+\LWR@traceinfo{LWR@mdframedstart start}%
\LWR@stoppars%
\uselengthunit{PT}%
\LWR@htmltagc{div class="\LWR@mdthisenv" \LWR@orignewline
@@ -57,18 +71,57 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
\LetLtxMacro{\hspace}{\LWR@orighspace}%
\LetLtxMacro\rule\LWR@origrule%
\LetLtxMacro\makebox\LWR@origmakebox%
+\LWR@startpars%
+\LWR@traceinfo{LWR@mdframedstart done}%
}
\newcommand*{\LWR@mdframedend}{
+\LWR@traceinfo{LWR@mdframedend start}%
\LWR@htmldivclassend{\LWR@mdthisenv}
\gdef\LWR@mdthisenv{mdframed}
\LWR@startpars%
+\LWR@traceinfo{LWR@mdframedend done}%
+}
+\renewenvironment{mdframed}[1][]{%
+ \color@begingroup%
+ \mdfsetup{userdefinedwidth=\linewidth,#1}%
+ \mdf@startcode%
+ \mdf@preenvsetting%
+ \ifdefempty{\mdf@firstframetitle}{}%
+ {\let\mdf@frametitlesave\mdf@frametitle%
+ \let\mdf@frametitle\mdf@firstframetitle%
+ }%
+ \ifvmode\nointerlineskip\fi%
+ \ifdefempty{\mdf@frametitle}{}%
+ {\mdfframedtitleenv{\mdf@frametitle}%
+ }%
+ \mdf@trivlist{\mdf@skipabove@length}%%
+ \mdf@settings%
+ }%
+ {%
+ \par%
+ \ifmdf@footnoteinside%
+ \def\mdf@reserveda{%
+ \mdf@footnoteoutput%
+ }%
+ \else%
+ \def\mdf@reserveda{%
+ \mdf@footnoteoutput%
+ }%
+ \fi%
+ \mdf@reserveda%
+ \aftergroup\endmdf@trivlist%
+ \color@endgroup%
+ \mdf@endcode%
+}
+\renewrobustcmd*\mdf@footnoteoutput{%
+ \LWR@printpendingmpfootnotes%
}
\LetLtxMacro\LWR@origmdfframedtitleenv\mdfframedtitleenv
\newlength{\LWR@titleroundcorner}
\renewrobustcmd\mdfframedtitleenv[1]{%
-\LWR@origmdfframedtitleenv{%
+\LWR@traceinfo{LWR@mdframedtitleenv start}%
\uselengthunit{PT}%
\LWR@htmltagc{span class="mdframedtitle" \LWR@orignewline
style=" \LWR@orignewline
@@ -95,11 +148,12 @@ border-radius:
#1%
\LWR@htmltagc{/span}%
\end{LWR@nestspan}%
-}
+\LWR@traceinfo{LWR@mdframedtitleenv end}%
}
\NewDocumentCommand{\LWR@mdfsubtitlecommon}{m o m}
{% the following empty line is required
+\LWR@traceinfo{LWR@mdframedsubtitlecommon start}%
\let\par\LWR@origpar%
\LWR@htmltagc{span class="mdframed#1title"
style=" \LWR@orignewline
@@ -128,15 +182,12 @@ background:
\LWR@htmltagc{/span}% the following empty line is required
\end{LWR@nestspan}% must follow the /span or an extra <p> appears
+\LWR@traceinfo{LWR@mdframedsubtitlecommon end}%
}
-\let\LWR@origmdfsubtitle\mdfsubtitle
-
\newcommand*{\LWR@mdfsubtitle}{%
\LWR@mdfsubtitlecommon{sub}%
}
\let\mdfsubtitle\LWR@mdfsubtitle
-\let\LWR@origmdfsubsubtitle\mdfsubsubtitle
-
\newcommand*{\LWR@mdfsubsubtitle}{%
\LWR@mdfsubtitlecommon{subsub}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-memhfixc.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-memhfixc.sty
new file mode 100644
index 00000000000..0d797ec70d9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-memhfixc.sty
@@ -0,0 +1,21 @@
+%%
+%% This is file `lwarp-memhfixc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `memhfixc')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{memhfixc}
+\endinput
+%%
+%% End of file `lwarp-memhfixc.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty
new file mode 100644
index 00000000000..be0793d58fd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-midpage.sty
@@ -0,0 +1,24 @@
+%%
+%% This is file `lwarp-midpage.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `midpage')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{midpage}
+\newenvironment{midpage}
+{\begin{BlockClass}[margin-top:6ex ; margin-bottom:6ex]{midpage}}
+{\end{BlockClass}}
+\endinput
+%%
+%% End of file `lwarp-midpage.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
index 9c512389964..1cdc23f4ff3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
@@ -65,11 +65,12 @@
\renewenvironment*{boxedverbatim}
{
\LWR@forcenewpage
-\LWR@atbeginverbatim{boxedverbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{boxedverbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
\verbatim%
}
{
\endverbatim%
+\unskip%
\LWR@afterendverbatim%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
index 60435db9a66..cb12114ef03 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
@@ -22,7 +22,7 @@
\newcommand{\LWR@multirowborder}{}
\RenewDocumentCommand{\multirow}{O{c} m o m o +m}%
{%
-\LWR@traceinfo{*** multirow #1 #2 #4}
+\LWR@traceinfo{*** multirow #1 #2 #4}%
\LWR@maybenewtablerow%
\LWR@tabularleftedge%
\LWR@htmltag{td rowspan="#2" %
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-natbib.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-natbib.sty
new file mode 100644
index 00000000000..ec0e9d85218
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-natbib.sty
@@ -0,0 +1,38 @@
+%%
+%% This is file `lwarp-natbib.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `natbib')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{natbib}
+\newcommand{\LWRNB@NAT@open}{$<$}
+\newcommand{\LWRNB@patchnatbibopenclose}{
+\ifdefstrequal{\NAT@open}{\LWRNB@NAT@open}
+{
+ \renewcommand{\NAT@open}{\textless}
+ \renewcommand{\NAT@close}{\textgreater}
+}{}
+}
+\LWRNB@patchnatbibopenclose
+\let\LWRNB@origsetcitestyle\setcitestyle
+
+\renewcommand{\setcitestyle}[1]{%
+\LWRNB@origsetcitestyle{#1}%
+\LWRNB@patchnatbibopenclose%
+}
+
+\endinput
+%%
+%% End of file `lwarp-natbib.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty
index d207716e39c..c3ef6ca79b6 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-needspace.sty
@@ -19,7 +19,7 @@
\LWR@ProvidesPackageDrop{needspace}
-\newcommand*{\needspace}[1]{}
+\DeclareDocumentCommand{\needspace}{m}{}
\DeclareDocumentCommand{\Needspace}{s m}{}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-nextpage.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-nextpage.sty
index 0dcffdf7d0f..0d770048bc3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-nextpage.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-nextpage.sty
@@ -19,10 +19,10 @@
\LWR@ProvidesPackageDrop{nextpage}
-\newcommand{\cleartoevenpage}[1][]{}
-\newcommand{\movetoevenpage}[1][]{}
-\newcommand{\cleartooddpage}[1][]{}
-\newcommand{\movetooddpage}[1][]{}
+\DeclareDocumentCommand{\cleartoevenpage}{o}{}
+\DeclareDocumentCommand{\movetoevenpage}{o}{}
+\DeclareDocumentCommand{\cleartooddpage}{o}{}
+\DeclareDocumentCommand{\movetooddpage}{o}{}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
index 768fa0d3fdc..48259f312e3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
@@ -36,6 +36,81 @@
\LWR@ProvidesPackagePass{ntheorem}
\newcommand{\LWR@newtheoremstyle}{plain}
+\AtBeginDocument{
+\@ifpackageloaded{cleveref}{
+\gdef\@thm#1#2#3{%
+ \if@thmmarks
+ \stepcounter{end\InTheoType ctr}%
+ \fi
+ \renewcommand{\InTheoType}{#1}%
+ \if@thmmarks
+ \stepcounter{curr#1ctr}%
+ \setcounter{end#1ctr}{0}%
+ \fi
+ \refstepcounter[#1]{#2}% <<< cleveref modification
+ \theorem@prework
+ \LWR@forcenewpage% new
+ \BlockClass{theorembody#1}%\LWR@thisthmstyle% new
+ \trivlist % latex's \trivlist, calling latex's \@trivlist unchanged
+ \ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist
+ \ifthm@inframe
+ \thm@topsep\theoreminframepreskipamount
+ \thm@topsepadd\theoreminframepostskipamount
+ \else
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd\theorempostskipamount
+ \fi
+ \else% oldframeskips
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd \theorempostskipamount
+ \ifvmode\advance\thm@topsepadd\partopsep\fi
+ \fi
+ \@topsep\thm@topsep
+ \@topsepadd\thm@topsepadd
+ \advance\linewidth -\theorem@indent
+ \advance\linewidth -\theorem@rightindent
+ \advance\@totalleftmargin \theorem@indent
+ \parshape \@ne \@totalleftmargin \linewidth
+ \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}
+}
+}{% not @ifpackageloaded{cleveref}
+\gdef\@thm#1#2#3{%
+ \if@thmmarks
+ \stepcounter{end\InTheoType ctr}%
+ \fi
+ \renewcommand{\InTheoType}{#1}%
+ \if@thmmarks
+ \stepcounter{curr#1ctr}%
+ \setcounter{end#1ctr}{0}%
+ \fi
+ \refstepcounter{#2}%
+ \theorem@prework
+ \LWR@forcenewpage% new
+ \BlockClass{theorembody#1}%\LWR@thisthmstyle% new
+ \trivlist % latex's \trivlist, calling latex's \@trivlist unchanged
+ \ifuse@newframeskips % cf. latex.ltx for topsepadd: \@trivlist
+ \ifthm@inframe
+ \thm@topsep\theoreminframepreskipamount
+ \thm@topsepadd\theoreminframepostskipamount
+ \else
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd\theorempostskipamount
+ \fi
+ \else% oldframeskips
+ \thm@topsep\theorempreskipamount
+ \thm@topsepadd \theorempostskipamount
+ \ifvmode\advance\thm@topsepadd\partopsep\fi
+ \fi
+ \@topsep\thm@topsep
+ \@topsepadd\thm@topsepadd
+ \advance\linewidth -\theorem@indent
+ \advance\linewidth -\theorem@rightindent
+ \advance\@totalleftmargin \theorem@indent
+ \parshape \@ne \@totalleftmargin \linewidth
+ \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}
+}
+}
+}% AtBeginDocument
\gdef\theoremstyle#1{%
\@ifundefined{th@#1}{\@warning
{Unknown theoremstyle `#1'. Using `plain'}%
@@ -105,120 +180,127 @@
\newcommand{\LWR@inctheorem}{%
\addtocounter{LWR@thisautoid}{1}%
\LWR@stoppars%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
\LWR@startpars%
}
\gdef\newtheoremstyle#1#2#3{%
\expandafter\@ifundefined{th@#1}%
{\expandafter\gdef\csname th@#1\endcsname{%
\def\@begintheorem####1####2{%
-\LWR@forcenewpage% new
-\BlockClass{theorembody#1}%\LWR@thisthmstyle% new
-\LWR@inctheorem% new
-#2}%
+ \LWR@inctheorem% new
+ #2}%
\def\@opargbegintheorem####1####2####3{%
-\LWR@forcenewpage% new
-\BlockClass{theorembody#1}%\LWR@thisthmstyle% new
-\LWR@inctheorem% new
-#3}%
+ \LWR@inctheorem% new
+ #3}%
}%
}%
{\PackageError{\basename}{Theorem style #1 already defined}\@eha}
}
\renewtheoremstyle{plain}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
\renewtheoremstyle{break}%
{\item[
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}{##1\ ##2\theorem@separator}\newline
]}%
{\item[
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}%
{##1\ ##2\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{change}%
- {\item[\hskip\labelsep
- \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderchange}{##2\ ##1\theorem@separator}]}%
- {\item[\hskip\labelsep
- \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderchange}{##2\ ##1\ (##3)\theorem@separator}]}
\renewtheoremstyle{changebreak}%
{\item[
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderchangebreak}%
{##2\ ##1\theorem@separator}\newline
]}%
{\item[
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderchangebreak}%
{##2\ ##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{margin}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermargin}{##2 \qquad ##1\theorem@separator}
]}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermargin}{##2 \qquad ##1\ (##3)\theorem@separator}
]}
\renewtheoremstyle{marginbreak}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermarginbreak}%
{##2 \qquad ##1\theorem@separator}\newline
]}%
- {\item[\hskip\labelsep\theorem@headerfont
+ {\item[
\InlineClass{theoremheadermarginbreak}%
{##2 \qquad ##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{nonumberplain}%
- {\item[\theorem@headerfont\hskip\labelsep
+ {\item[
\InlineClass{theoremheaderplain}{##1\theorem@separator}]}%
- {\item[\theorem@headerfont\hskip \labelsep
+ {\item[
\InlineClass{theoremheaderplain}{##1\ (##3)\theorem@separator}]}
\renewtheoremstyle{nonumberbreak}%
{\item[
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}{##1\theorem@separator}\newline
]}%
{\item[
- \hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderbreak}{##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{empty}%
{\item[]}%
- {\item[\theorem@headerfont \hskip\labelsep\relax
+ {\item[
\InlineClass{theoremheaderplain}{##3}]}
\renewtheoremstyle{emptybreak}%
{\item[]}%
- {\item[\theorem@headerfont \hskip\labelsep\relax
+ {\item[
\InlineClass{theoremheaderplain}{##3}] \ \newline}
\ifbool{LWR@ntheoremamsthm}{}{%
\newtheoremstyle{plainupright}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
- {\item[\hskip\labelsep \theorem@headerfont
+ {\item[
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
-
\newtheoremstyle{nonumberplainuprightsc}%
- {\item[\theorem@headerfont\hskip\labelsep
+ {\item[
\InlineClass{theoremheadersc}{##1\theorem@separator}]}%
- {\item[\theorem@headerfont\hskip \labelsep
+ {\item[
\InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]}
}% not amsthm
\ifbool{LWR@ntheoremamsthm}{}{%
+ \theoremnumbering{arabic}
+ \theoremstyle{plain}
+ \RequirePackage{latexsym}
+ \theoremsymbol{\Box}
+ \theorembodyfont{\itshape}
+ \theoremheaderfont{\normalfont\bfseries}
+ \theoremseparator{}
+ \renewtheorem{Theorem}{Theorem}
+ \renewtheorem{theorem}{Theorem}
+ \renewtheorem{Satz}{Satz}
+ \renewtheorem{satz}{Satz}
+ \renewtheorem{Proposition}{Proposition}
+ \renewtheorem{proposition}{Proposition}
+ \renewtheorem{Lemma}{Lemma}
+ \renewtheorem{lemma}{Lemma}
+ \renewtheorem{Korollar}{Korollar}
+ \renewtheorem{korollar}{Korollar}
+ \renewtheorem{Corollary}{Corollary}
+ \renewtheorem{corollary}{Corollary}
+
\theoremstyle{plainupright}
\theorembodyfont{\upshape}
\theoremsymbol{\HTMLunicode{25A1}}% UTF-8 white box
@@ -250,119 +332,91 @@
\gdef\th@plain{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderplain}{##1\ ##2.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3).}
]}}
\gdef\th@nonumberplain{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderplain}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderplain}{##1\ (##3).}
]}}
\gdef\th@definition{%
\def\theorem@headerfont{\normalfont\bfseries}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderdefinition}{##1\ ##2.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderdefinition}{##1\ ##2\ (##3).}
]}}
\gdef\th@nonumberdefinition{%
\def\theorem@headerfont{\normalfont\bfseries}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderdefinition}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderdefinition}{##1\ (##3).}
]}}
\gdef\th@remark{%
\def\theorem@headerfont{\itshape}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderremark}{##1\ ##2.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderremark}{##1\ ##2\ (##3).}
]}}
\gdef\th@nonumberremark{%
\def\theorem@headerfont{\itshape}\normalfont%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderremark}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderremark}{##1\ (##3).}
]}}
\gdef\th@proof{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyproof}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderproof}{##1.}
]}%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembodyroof}% new
\LWR@inctheorem% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheaderproof}{##1\ (##3).}
]}}
@@ -394,7 +448,7 @@
\setendmarkfalse%
\fi%
}{}%
-\LWR@origendtheorem%
+\LWR@origendtheorem% also does \@endtrivlist
\ifbool{LWR@ntheoremmarks}{\global\setendmarktrue}{}%
\endBlockClass%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-pagesel.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-pagesel.sty
new file mode 100644
index 00000000000..bbc134dd980
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-pagesel.sty
@@ -0,0 +1,21 @@
+%%
+%% This is file `lwarp-pagesel.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `pagesel')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{pagesel}
+\endinput
+%%
+%% End of file `lwarp-pagesel.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
new file mode 100644
index 00000000000..b4137e1a4da
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-patch-memoir.sty
@@ -0,0 +1,1055 @@
+%%
+%% This is file `lwarp-patch-memoir.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `patch-memoir')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\ProvidesPackage{lwarp-patch-memoir}
+\RequirePackage{lwarp-abstract}% req'd
+\RequirePackage{lwarp-array}% req'd
+\RequirePackage{lwarp-booktabs}% req'd
+\RequirePackage{lwarp-changepage}% req'd
+\RequirePackage{lwarp-crop}
+\RequirePackage{lwarp-dcolumn}% req'd
+\RequirePackage{lwarp-enumerate}% req'd
+\RequirePackage{lwarp-epigraph}% req'd
+\RequirePackage{lwarp-fancyvrb}% req'd
+\RequirePackage{lwarp-footmisc}% req'd
+\RequirePackage{lwarp-framed}% req'd
+\RequirePackage{lwarp-hanging}% req'd
+\DisemulatePackage{moreverb}
+\RequirePackage{lwarp-moreverb}
+\RequirePackage{lwarp-mparhack}
+\RequirePackage{lwarp-needspace}% req'd
+\RequirePackage{lwarp-nextpage}% req'd
+\RequirePackage{lwarp-pagenote}% req'd
+\RequirePackage{lwarp-parskip}
+\RequirePackage{lwarp-setspace}% req'd
+\RequirePackage{lwarp-showidx}
+\RequirePackage{lwarp-subfigure}% red'q
+\LetLtxMacro\LWR@memorignewsubfloat\newsubfloat
+\RenewDocumentCommand{\newsubfloat}{O{} m}{%
+ \@ifundefined{c@sub#2}{%
+ \LWR@memorignewsubfloat[#1]{#2}%
+ }{}%
+}
+
+\RequirePackage{lwarp-tabularx}% req'd
+\RequirePackage{lwarp-titling}% req'd
+\RequirePackage{lwarp-tocloft}% req'd
+\RequirePackage{lwarp-verse}% req'd
+\LetLtxMacro\LWR@origlabel\@mem@old@label
+
+\AtBeginDocument{
+ \def\@@wrindexhyp#1||\\{%
+ \addtocounter{LWR@autoindex}{1}%
+ \LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}%
+ \ifshowindexmark\@showidx{#1}\fi
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1}{\arabic{LWR@autoindex}}}%
+ \endgroup
+ \@esphack}%
+}
+
+\setstocksize{190in}{20in}
+\setlrmarginsandblock{2in}{2in}{*}
+\setulmarginsandblock{1in}{1in}{*}
+\renewcommand*{\stockavi}{}
+\renewcommand*{\stockav}{}
+\renewcommand*{\stockaiv}{}
+\renewcommand*{\stockaiii}{}
+\renewcommand*{\stockbvi}{}
+\renewcommand*{\stockbv}{}
+\renewcommand*{\stockbiv}{}
+\renewcommand*{\stockbiii}{}
+\renewcommand*{\stockmlargecrownvo}{}
+\renewcommand*{\stockmdemyvo}{}
+\renewcommand*{\stockmsmallroyalvo}{}
+\renewcommand*{\pageavi}{}
+\renewcommand*{\pageav}{}
+\renewcommand*{\pageaiv}{}
+\renewcommand*{\pageaiii}{}
+\renewcommand*{\pagebvi}{}
+\renewcommand*{\pagebv}{}
+\renewcommand*{\pagebiv}{}
+\renewcommand*{\pagebiii}{}
+\renewcommand*{\pagemlargecrownvo}{}
+\renewcommand*{\pagemdemyvo}{}
+\renewcommand*{\pagemsmallroyalvo}{}
+
+\renewcommand*{\stockdbill}{}
+\renewcommand*{\stockstatement}{}
+\renewcommand*{\stockexecutive}{}
+\renewcommand*{\stockletter}{}
+\renewcommand*{\stockold}{}
+\renewcommand*{\stocklegal}{}
+\renewcommand*{\stockledger}{}
+\renewcommand*{\stockbroadsheet}{}
+\renewcommand*{\pagedbill}{}
+\renewcommand*{\pagestatement}{}
+\renewcommand*{\pageexecutive}{}
+\renewcommand*{\pageletter}{}
+\renewcommand*{\pageold}{}
+\renewcommand*{\pagelegal}{}
+\renewcommand*{\pageledger}{}
+\renewcommand*{\pagebroadsheet}{}
+
+\renewcommand*{\stockpottvo}{}
+\renewcommand*{\stockfoolscapvo}{}
+\renewcommand*{\stockcrownvo}{}
+\renewcommand*{\stockpostvo}{}
+\renewcommand*{\stocklargecrownvo}{}
+\renewcommand*{\stocklargepostvo}{}
+\renewcommand*{\stocksmalldemyvo}{}
+\renewcommand*{\stockdemyvo}{}
+\renewcommand*{\stockmediumvo}{}
+\renewcommand*{\stocksmallroyalvo}{}
+\renewcommand*{\stockroyalvo}{}
+\renewcommand*{\stocksuperroyalvo}{}
+\renewcommand*{\stockimperialvo}{}
+\renewcommand*{\pagepottvo}{}
+\renewcommand*{\pagefoolscapvo}{}
+\renewcommand*{\pagecrownvo}{}
+\renewcommand*{\pagepostvo}{}
+\renewcommand*{\pagelargecrownvo}{}
+\renewcommand*{\pagelargepostvo}{}
+\renewcommand*{\pagesmalldemyvo}{}
+\renewcommand*{\pagedemyvo}{}
+\renewcommand*{\pagemediumvo}{}
+\renewcommand*{\pagesmallroyalvo}{}
+\renewcommand*{\pageroyalvo}{}
+\renewcommand*{\pagesuperroyalvo}{}
+\renewcommand*{\pageimperialvo}{}
+
+\renewcommand*{\memfontfamily}{}
+\renewcommand*{\memfontenc}{}
+\renewcommand*{\memfontpack}{}
+
+\renewcommand*{\anyptfilebase}{}
+\renewcommand*{\anyptsize}{10}
+
+\renewcommand*{\setstocksize}[2]{}
+\renewcommand*{\settrimmedsize}[3]{}
+\renewcommand*{\settrims}[2]{}
+
+\renewcommand*{\setxlvchars}[1]{}
+\renewcommand*{\setlxvchars}[1]{}
+
+\renewcommand*{\settypeblocksize}[3]{}
+\renewcommand*{\setlrmargins}[3]{}
+\renewcommand*{\setlrmarginsandblock}[3]{}
+\renewcommand*{\setbinding}[1]{}
+\renewcommand*{\setulmargins}[3]{}
+\renewcommand*{\setulmarginsandblock}[3]{}
+\renewcommand*{\setcolsepandrule}[2]{}
+
+\renewcommand*{\setheadfoot}[2]{}
+\renewcommand*{\setheaderspaces}[3]{}
+\renewcommand*{\setmarginnotes}[3]{}
+\renewcommand*{\setfootins}[2]{}
+\renewcommand*{\checkandfixthelayout}[1][]{}
+\renewcommand*{\checkthelayout}[1]{}
+\renewcommand*{\fixthelayout}{}
+\renewcommand*{\typeoutlayout}{}
+\renewcommand*{\typeoutstandardlayout}{}
+\renewcommand*{\settypeoutlayoutunit}[1]{}
+\renewcommand*{\fixpdflayout}{}
+\renewcommand*{\fixdvipslayout}{}
+
+\renewcommand*{\medievalpage}[1][]{}
+\renewcommand*{\isopage}[1][]{}
+\renewcommand*{\semiisopage}[1][]{}
+
+\renewcommand{\setpagebl}[3]{}
+\renewcommand{\setpageml}[3]{}
+\renewcommand{\setpagetl}[3]{}
+\renewcommand{\setpagetm}[3]{}
+\renewcommand{\setpagetr}[3]{}
+\renewcommand{\setpagemr}[3]{}
+\renewcommand{\setpagebr}[3]{}
+\renewcommand{\setpagebm}[3]{}
+\renewcommand{\setpagecc}[3]{}
+\let\miniscule\tiny
+\let\HUGE\Huge
+
+\renewcommand*{\abnormalparskip}[1]{}
+\renewcommand*{\nonzeroparskip}{}
+\renewcommand*{\traditionalparskip}{}
+
+\let\onelineskip\baselineskip
+
+\let\OnehalfSpacing\onehalfspacing
+\let\DoubleSpacing\doublespacing
+\renewcommand*{\setPagenoteSpacing}[1]{}
+\renewcommand*{\setFloatSpacing}[1]{}
+\let\SingleSpacing\singlespacing
+\let\setSingleSpace\SetSinglespace
+\let\SingleSpace\singlespace
+\let\endSingleSpace\endsinglespace
+\let\Spacing\spacing
+\let\endSpacing\endspacing
+\let\OnehalfSpace\onehalfspace
+\let\endOnehalfSpace\endonehalfspace
+\csletcs{OnehalfSpace*}{onehalfspace}
+\csletcs{endOnehalfSpace*}{endonehalfspace}
+\let\DoubleSpace\doublespace
+\let\endDoubleSpace\enddoublespace
+\csletcs{DoubleSpace*}{doublespace}
+\csletcs{endDoubleSpace*}{enddoublespace}
+\renewcommand*{\setDisplayskipStretch}[1]{}
+\renewcommand*{\memdskipstretch}{}
+\renewcommand*{\noDisplayskipStretch}{}
+\renewcommand*{\memdskips}{}
+
+\renewcommand*{\midsloppy}{}
+\renewenvironment*{midsloppypar}{}{}
+
+\renewcommand*{\sloppybottom}{}
+\csletcs{titlingpage*}{titlingpage}
+\csletcs{endtitlingpage*}{endtitlingpage}
+\let\andnext\and
+\renewcommand*{\thanksmarkstyle}[1]{}
+\renewcommand{\thanksfootmark}{%
+\thanksscript{\tamark}%
+}
+
+\renewcommand*{\abstractcol}{}
+\renewcommand*{\abstractintoc}{}
+\renewcommand*{\abstractnum}{}
+\renewcommand*{\abstractrunin}{}
+
+\def\@apppage{%
+ \part*{\appendixpagename}
+}
+\renewcommand\mempreaddapppagetotochook{}
+\renewcommand\mempostaddapppagetotochook{}
+
+\def\@sapppage{%
+ \part*{\appendixpagename}
+}
+
+\csletcs{frontmatter*}{frontmatter}
+\csletcs{mainmatter*}{mainmatter}
+\renewcommand*{\raggedbottomsection}{}
+\renewcommand*{\normalbottomsection}{}
+\renewcommand*{\bottomsectionskip}{}
+\renewcommand*{\bottomsectionpenalty}{}
+\csletcs{appendixpage*}{appendixpage}
+\renewcommand*{\namedsubappendices}{}
+\renewcommand*{\unnamedsubappendices}{}
+\renewcommand*{\setsecnumdepth}[1]{}% todo tocvsec2
+\renewcommand*{\maxsecnumdepth}[1]{}% todo tocvsec2
+\renewcommand*{\beforebookskip}{}
+\renewcommand*{\afterbookskip}{}
+\renewcommand*{\beforepartskip}{}
+\renewcommand*{\afterpartskip}{}
+\renewcommand*{\midbookskip}{}
+\renewcommand*{\midpartskip}{}
+\renewcommand*{\printbookname}{}
+\renewcommand*{\booknamefont}{}
+\renewcommand*{\booknamenum}{}
+\renewcommand*{\printbooknum}{}
+\renewcommand*{\booknumfont}{}
+\renewcommand*{\printpartname}{}
+\renewcommand*{\partnamefont}{}
+\renewcommand*{\partnamenum}{}
+\renewcommand*{\printpartnum}{}
+\renewcommand*{\partnumfont}{}
+\renewcommand*{\printbooktitle}[1]{}
+\renewcommand*{\booktitlefont}{}
+\renewcommand{\printparttitle}[1]{}
+\renewcommand*{\parttitlefont}{}
+\renewcommand*{\bookpageend}{}
+\renewcommand*{\bookblankpage}{}
+\renewcommand*{\nobookblankpage}{}
+\renewcommand*{\partpageend}{}
+\renewcommand*{\partblankpage}{}
+\renewcommand*{\nopartblankpage}{}
+\RenewDocumentCommand{\newleadpage}{s o m m}{}% todo
+\RenewDocumentCommand{\renewleadpage}{s o m m}{}% todo
+\renewcommand*{\leadpagetoclevel}{chapter}
+
+\renewcommand*{\openright}{}
+\renewcommand*{\openleft}{}
+\renewcommand*{\openany}{}
+\renewcommand*{\clearforchapter}{}
+\renewcommand*{\memendofchapterhook}{}
+\renewcommand*{\chapterheadstart}{}
+\renewcommand*{\afterchapternum}{}
+\renewcommand*{\afterchaptertitle}{}
+\renewcommand*{\printchaptername}{}
+\renewcommand*{\chapnamefont}{}
+\renewcommand*{\chapternamenum}{}
+\renewcommand*{\printchapternum}{}
+\renewcommand*{\chapnumfont}{}
+\renewcommand{\printchaptertitle}[1]{}
+\renewcommand*{\chaptitlefont}{}
+\renewcommand*{\printchapternonum}{}
+\renewcommand*{\indentafterchapter}{}
+\renewcommand*{\noindentafterchapter}{}
+\renewcommand*{\insertchapterspace}{}
+
+\renewcommand*{\chapterstyle}[1]{}
+\renewcommand{\makechapterstyle}[2]{}
+\renewcommand*{\chapindent}{}
+\let\chapterprecis\cftchapterprecis
+\let\chapterprecishere\cftchapterprecishere
+\let\chapterprecistoc\cftchapterprecistoc
+\renewcommand*{\precisfont}{}
+\renewcommand*{\prechapterprecis}{}
+\renewcommand*{\postchapterprecis}{}
+\renewcommand{\precistoctext}[1]{}
+\renewcommand*{\precistocfont}{}
+\renewcommand*{\precistocformat}{}
+
+\renewcommand*{\setbeforesecskip}[1]{}
+\renewcommand*{\setaftersecskip}[1]{}
+\renewcommand*{\setsecindent}[1]{}
+\renewcommand*{\setsecheadstyle}[1]{}
+\renewcommand*{\setbeforesubsecskip}[1]{}
+\renewcommand*{\setaftersubsecskip}[1]{}
+\renewcommand*{\setsubsecindent}[1]{}
+\renewcommand*{\setsubsecheadstyle}[1]{}
+\renewcommand*{\setbeforesubsubsecskip}[1]{}
+\renewcommand*{\setaftersubsubsecskip}[1]{}
+\renewcommand*{\setsubsubsecindent}[1]{}
+\renewcommand*{\setsubsubsecheadstyle}[1]{}
+\renewcommand*{\setbeforeparaskip}[1]{}
+\renewcommand*{\setafterparaskip}[1]{}
+\renewcommand*{\setparaindent}[1]{}
+\renewcommand*{\setparaheadstyle}[1]{}
+\renewcommand*{\setbeforesubparaskip}[1]{}
+\renewcommand*{\setaftersubparaskip}[1]{}
+\renewcommand*{\setsubparaindent}[1]{}
+\renewcommand*{\setsubparaheadstyle}[1]{}
+\renewcommand{\@hangfrom}[1]{#1}
+\renewcommand{\sethangfrom}[1]{}
+\renewcommand{\setsecnumformat}[1]{}
+
+\renewcommand*{\hangsecnum}{}
+\renewcommand*{\defaultsecnum}{}
+
+\renewcommand*{\sechook}{}
+\renewcommand{\setsechook}[1]{}
+\renewcommand*{\subsechook}{}
+\renewcommand{\setsubsechook}[1]{}
+\renewcommand*{\subsubsechook}{}
+\renewcommand{\setsubsubsechook}[1]{}
+\renewcommand*{\parahook}{}
+\renewcommand{\setparahook}[1]{}
+\renewcommand*{\subparahook}{}
+\renewcommand{\setsubparahook}[1]{}
+
+\RenewDocumentCommand{\plainbreak}{s m}{\begin{center}~\end{center}}
+
+\RenewDocumentCommand{\fancybreak}{s +m}{%
+\begin{center}#2\end{center}%
+}
+
+\RenewDocumentCommand{\plainfancybreak}{s m m +m}{%
+\begin{center}#4\end{center}%
+}
+
+\RenewDocumentCommand{\pfbreak}{s}{%
+\begin{center}
+\pfbreakdisplay
+\end{center}
+}
+
+\renewcommand{\pfbreakdisplay}{*\quad*\quad*}
+
+\renewcommand{\makeheadstyles}[2]{}
+\renewcommand*{\headstyles}[1]{}
+\renewcommand*{\savepagenumber}{}
+\renewcommand*{\restorepagenumber}{}
+\renewcommand*{\uppercaseheads}{}
+\renewcommand*{\nouppercaseheads}{}
+
+\renewcommand*{\bookpagemark}[1]{}
+\renewcommand*{\partmark}[1]{}
+\renewcommand*{\bibmark}{}
+\renewcommand*{\indexmark}{}
+\renewcommand*{\glossarymark}{}
+
+\LWR@origpagestyle{empty}
+\renewcommand*{\ps@empty}{}
+\renewcommand*{\makepagestyle}[1]{}
+\renewcommand*{\emptypshook}{}%
+\renewcommand*{\@oddhead}{}
+\renewcommand*{\@oddfoot}{}
+\renewcommand*{\@evenhead}{}
+\renewcommand*{\@evenfoot}{}
+\renewcommand*{\aliaspagestyle}[2]{}
+\renewcommand*{\copypagestyle}[2]{}
+
+\renewcommand*{\makeevenhead}[4]{}
+\renewcommand*{\makeoddhead}[4]{}
+\renewcommand*{\makeevenfoot}[4]{}
+\renewcommand*{\makeoddfoot}[4]{}
+\renewcommand*{\makerunningwidth}[3]{}
+\renewcommand*{\makeheadrule}[3]{}
+\renewcommand*{\makefootrule}[3]{}
+\renewcommand*{\makeheadfootruleprefix}[3]{}
+\renewcommand*{\makeheadposition}[5]{}
+\renewcommand{\makepsmarks}[2]{}
+\renewcommand*{\makeheadfootstrut}[3]{}
+
+\renewcommand{\createplainmark}[3]{}
+\renewcommand{\memUChead}[1]{}
+\renewcommand{\createmark}[5]{}
+\renewcommand*{\clearplainmark}[1]{}
+\renewcommand*{\clearmark}[1]{}
+\renewcommand{\addtopsmarks}[3]{}
+\renewcommand{\ifonlyfloats}[2]{#2}
+\renewcommand*{\mergepagefloatstyle}[3]{}
+
+\renewcommand*{\framepichead}{}
+\renewcommand*{\framepictextfoot}{}
+\renewcommand*{\framepichook}{}
+\renewcommand*{\showheadfootlocoff}{}
+\renewcommand*{\showtextblocklocoff}{}
+\renewcommand{\hangfrom}[1]{#1}
+\let\centerfloat\centering
+\renewcommand*{\raggedyright}[1][]{}
+\renewcommand{\sourceatright}[2][]{\attribution{#2}}
+\let\memorigdbs\LWR@endofline
+\let\memorigpar\par
+\let\atcentercr\LWR@endofline
+\renewcommand*{\flushleftright}{}
+\renewcommand*{\linenottooshort}[1][]{}
+\renewcommand*{\russianpar}{}
+\renewcommand*{\lastlinerulefill}{}
+\renewcommand*{\lastlineparrule}{}
+\renewcommand*{\justlastraggedleft}{}
+\renewcommand*{\raggedrightthenleft}{}
+\renewcommand*{\leftcenterright}{}
+
+\renewcommand{\leftspringright}[4]{%
+\begin{minipage}{#1\linewidth}#3\end{minipage}\qquad%
+\begin{minipage}{#2\linewidth}\begin{flushright}#4\end{flushright}\end{minipage}%
+}
+
+\renewenvironment*{blockdescription}
+{\LWR@descriptionstart\LWR@origdescription}
+{\enddescription}
+\renewcommand*{\blockdescriptionlabel}[1]{\textbf{#1}}
+\renewenvironment*{labelled}[1]{\begin{description}}{\end{description}}
+\renewenvironment*{flexlabelled}[6]{\begin{description}}{\end{description}}
+\renewcommand*{\tightlists}{}
+\renewcommand*{\defaultlists}{}
+\RenewDocumentCommand{\firmlists}{s}{}
+\renewcommand*{\firmlist}{}
+\renewcommand*{\tightlist}{}
+\renewcommand*{\zerotrivseps}{}
+\renewcommand*{\savetrivseps}{}
+\renewcommand*{\restoretrivseps}{}
+\csletcs{tableofcontents*}{tableofcontents}
+\csletcs{listoffigures*}{listoffigures}
+\csletcs{listoftables*}{listoftables}
+\renewenvironment{KeepFromToc}{}{}
+\renewcommand*{\onecoltocetc}{}
+\renewcommand*{\twocoltocetc}{}
+\renewcommand*{\ensureonecol}{}
+\renewcommand*{\restorefromonecol}{}
+\renewcommand*{\doccoltocetc}{}
+\renewcommand*{\maxtocdepth}[1]{}% tocvsec2
+\renewcommand*{\settocdepth}[1]{}% tocvsec2
+
+\renewcommand{\tocheadstart}{}
+\renewcommand{\printtoctitle}[1]{}
+\renewcommand{\tocmark}{}
+\renewcommand{\aftertoctitle}{}
+\renewcommand{\lofheadstart}{}
+\renewcommand{\printloftitle}[1]{}
+\renewcommand{\lofmark}{}
+\renewcommand{\afterloftitle}{}
+\renewcommand{\lotheadstart}{}
+\renewcommand{\printlottitle}[1]{}
+\renewcommand{\lotmark}{}
+\renewcommand{\afterlottitle}{}
+
+\renewcommand*{\setpnumwidth}[1]{}
+\renewcommand*{\setrmarg}[1]{}
+\renewcommand*{\cftbookbreak}{}
+\renewcommand*{\cftpartbreak}{}
+\renewcommand*{\cftchapterbreak}{}
+
+\renewcommand*{\cftbookfont}{}
+\renewcommand*{\cftbookname}{}
+\renewcommand*{\cftbookpresnum}{}
+\renewcommand*{\cftbookaftersnum}{}
+\renewcommand*{\cftbookaftersnumb}{}
+\renewcommand*{\cftbookleader}{}
+\renewcommand*{\cftbookdotsep}{1}
+\renewcommand*{\cftbookpagefont}{}
+\renewcommand*{\cftbookafterpnum}{}
+\renewcommand*{\cftbookformatpnum}[1]{}
+\renewcommand*{\cftbookformatpnumhook}[1]{}
+\renewcommand*{\cftchapterfont}{}
+\renewcommand*{\cftchaptername}{}
+\renewcommand*{\cftchapterpresnum}{}
+\renewcommand*{\cftchapteraftersnum}{}
+\renewcommand*{\cftchapteraftersnumb}{}
+\renewcommand*{\cftchapterleader}{}
+\renewcommand*{\cftchapterdotsep}{1}
+\renewcommand*{\cftchapterpagefont}{}
+\renewcommand*{\cftchapterafterpnum}{}
+\renewcommand*{\cftchapterformatpnum}[1]{}
+\renewcommand*{\cftchapterformatpnumhook}[1]{}
+\renewcommand*{\cftsectionfont}{}
+\renewcommand*{\cftsectionname}{}
+\renewcommand*{\cftsectionpresnum}{}
+\renewcommand*{\cftsectionaftersnum}{}
+\renewcommand*{\cftsectionaftersnumb}{}
+\renewcommand*{\cftsectionleader}{}
+\renewcommand*{\cftsectiondotsep}{1}
+\renewcommand*{\cftsectionpagefont}{}
+\renewcommand*{\cftsectionafterpnum}{}
+\renewcommand*{\cftsectionformatpnum}[1]{}
+\renewcommand*{\cftsectionformatpnumhook}[1]{}
+
+\renewcommand*{\cftsubsectionfont}{}
+\renewcommand*{\cftsubsectionname}{}
+\renewcommand*{\cftsubsectionpresnum}{}
+\renewcommand*{\cftsubsectionaftersnum}{}
+\renewcommand*{\cftsubsectionaftersnumb}{}
+\renewcommand*{\cftsubsectionleader}{}
+\renewcommand*{\cftsubsectiondotsep}{1}
+\renewcommand*{\cftsubsectionpagefont}{}
+\renewcommand*{\cftsubsectionafterpnum}{}
+\renewcommand*{\cftsubsectionformatpnum}[1]{}
+\renewcommand*{\cftsubsectionformatpnumhook}[1]{}
+
+\renewcommand*{\cftsubsubsectionfont}{}
+\renewcommand*{\cftsubsubsectionname}{}
+\renewcommand*{\cftsubsubsectionpresnum}{}
+\renewcommand*{\cftsubsubsectionaftersnum}{}
+\renewcommand*{\cftsubsubsectionaftersnumb}{}
+\renewcommand*{\cftsubsubsectionleader}{}
+\renewcommand*{\cftsubsubsectiondotsep}{1}
+\renewcommand*{\cftsubsubsectionpagefont}{}
+\renewcommand*{\cftsubsubsectionafterpnum}{}
+\renewcommand*{\cftsubsubsectionformatpnum}[1]{}
+\renewcommand*{\cftsubsubsectionformatpnumhook}[1]{}
+
+\renewcommand*{\cftparagraphfont}{}
+\renewcommand*{\cftparagraphname}{}
+\renewcommand*{\cftparagraphpresnum}{}
+\renewcommand*{\cftparagraphaftersnum}{}
+\renewcommand*{\cftparagraphaftersnumb}{}
+\renewcommand*{\cftparagraphleader}{}
+\renewcommand*{\cftparagraphdotsep}{1}
+\renewcommand*{\cftparagraphpagefont}{}
+\renewcommand*{\cftparagraphafterpnum}{}
+\renewcommand*{\cftparagraphformatpnum}[1]{}
+\renewcommand*{\cftparagraphformatpnumhook}[1]{}
+
+\renewcommand*{\cftsubparagraphfont}{}
+\renewcommand*{\cftsubparagraphname}{}
+\renewcommand*{\cftsubparagraphpresnum}{}
+\renewcommand*{\cftsubparagraphaftersnum}{}
+\renewcommand*{\cftsubparagraphaftersnumb}{}
+\renewcommand*{\cftsubparagraphleader}{}
+\renewcommand*{\cftsubparagraphdotsep}{1}
+\renewcommand*{\cftsubparagraphpagefont}{}
+\renewcommand*{\cftsubparagraphafterpnum}{}
+\renewcommand*{\cftsubparagraphformatpnum}[1]{}
+\renewcommand*{\cftsubparagraphformatpnumhook}[1]{}
+
+\renewcommand*{\cftfigurefont}{}
+\renewcommand*{\cftfigurename}{}
+\renewcommand*{\cftfigurepresnum}{}
+\renewcommand*{\cftfigureaftersnum}{}
+\renewcommand*{\cftfigureaftersnumb}{}
+\renewcommand*{\cftfigureleader}{}
+\renewcommand*{\cftfiguredotsep}{1}
+\renewcommand*{\cftfigurepagefont}{}
+\renewcommand*{\cftfigureafterpnum}{}
+\renewcommand*{\cftfigureformatpnum}[1]{}
+\renewcommand*{\cftfigureformatpnumhook}[1]{}
+
+\newcommand*{\cftsubfigurefont}{}
+\newcommand*{\cftsubfigurename}{}
+\newcommand*{\cftsubfigurepresnum}{}
+\newcommand*{\cftsubfigureaftersnum}{}
+\newcommand*{\cftsubfigureaftersnumb}{}
+\newcommand*{\cftsubfigureleader}{}
+\newcommand*{\cftsubfiguredotsep}{1}
+\newcommand*{\cftsubfigurepagefont}{}
+\newcommand*{\cftsubfigureafterpnum}{}
+\newcommand*{\cftsubfigureformatpnum}[1]{}
+\newcommand*{\cftsubfigureformatpnumhook}[1]{}
+
+\renewcommand*{\cfttablefont}{}
+\renewcommand*{\cfttablename}{}
+\renewcommand*{\cfttablepresnum}{}
+\renewcommand*{\cfttableaftersnum}{}
+\renewcommand*{\cfttableaftersnumb}{}
+\renewcommand*{\cfttableleader}{}
+\renewcommand*{\cfttabledotsep}{1}
+\renewcommand*{\cfttablepagefont}{}
+\renewcommand*{\cfttableafterpnum}{}
+\renewcommand*{\cfttableformatpnum}[1]{}
+\renewcommand*{\cfttableformatpnumhook}[1]{}
+
+\newcommand*{\cftsubtablefont}{}
+\newcommand*{\cftsubtablename}{}
+\newcommand*{\cftsubtablepresnum}{}
+\newcommand*{\cftsubtableaftersnum}{}
+\newcommand*{\cftsubtableaftersnumb}{}
+\newcommand*{\cftsubtableleader}{}
+\newcommand*{\cftsubtabledotsep}{1}
+\newcommand*{\cftsubtablepagefont}{}
+\newcommand*{\cftsubtableafterpnum}{}
+\newcommand*{\cftsubtableformatpnum}[1]{}
+\newcommand*{\cftsubtableformatpnumhook}[1]{}
+\renewcommand*{\booknumberline}[1]{}
+\renewcommand*{\partnumberline}[1]{}
+\renewcommand*{\chapternumberline}[1]{}
+\renewcommand*{\numberlinehook}[1]{}
+\renewcommand*{\booknumberlinehook}[1]{}
+\renewcommand*{\partnumberlinehook}[1]{}
+\renewcommand*{\chapternumberlinehook}[1]{}
+\renewcommand{\numberlinebox}[2]{}
+\renewcommand{\booknumberlinebox}[2]{}
+\renewcommand{\partnumberlinebox}[2]{}
+\renewcommand{\chapternumberlinebox}[2]{}
+\renewcommand*{\cftpagenumbersoff}[1]{}
+\renewcommand*{\cftpagenumberson}[1]{}
+\renewcommand*{\cftlocalchange}[3]{}
+\renewcommand*{\cftaddtitleline}[4]{}
+\renewcommand*{\cftaddnumtitleline}[4]{}
+\renewcommand{\cftinsertcode}[2]{}
+\renewcommand{\cftinserthook}[2]{}
+\renewcommand{\settocpreprocessor}[2]{}
+\DeclareRobustCommand{\cftpagenumbersoff}[1]{}
+\DeclareRobustCommand{\cftpagenumberson}[1]{}
+\RenewDocumentCommand{\newfloat}{o m m m}{%
+\IfValueTF{#1}%
+{\DeclareFloatingEnvironment[fileext=#3,within=#1,name={#4}]{#2}}%
+{\DeclareFloatingEnvironment[fileext=#3,name={#4}]{#2}}%
+\cslet{listof#2s}\relax%
+\cslet{listof#2es}\relax%
+}
+\RenewDocumentCommand{\newlistof}{o m m m}
+{%
+\IfValueTF{#1}
+{\newlistentry[#1]{#2}{#3}{0}}
+{\newlistentry{#2}{#3}{0}}
+\@namedef{ext@#2}{#3}%
+\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}%
+\setcounter{#3depth}{1}%
+\@namedef{#3mark}{}%
+\@namedef{#2}{\listof{#2}{#4}}
+\@namedef{@cftmake#3title}{}
+\@ifundefined{cftbefore#3titleskip}{
+ \expandafter\newlength\csname cftbefore#3titleskip\endcsname
+ \expandafter\newlength\csname cftafter#3titleskip\endcsname
+}{}
+\@namedef{cft#3titlefont}{}
+\@namedef{cftafter#3title}{}
+\@namedef{cft#3prehook}{}
+\@namedef{cft#3posthook}{}
+}
+\renewcommand{\setfloatadjustment}[2]{}
+\NewDocumentEnvironment{KFLTmemoir@marginfloat}{O{-1.2ex} m}
+{% start
+\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
+\captionsetup{type=#2}%
+}
+{%
+\endLWR@BlockClassWP%
+}
+
+\DeclareDocumentEnvironment{marginfigure}{o}
+ {\begin{KFLTmemoir@marginfloat}{figure}}
+ {\end{KFLTmemoir@marginfloat}}
+
+\DeclareDocumentEnvironment{margintable}{o}
+ {\begin{KFLTmemoir@marginfloat}{table}}
+ {\end{KFLTmemoir@marginfloat}}
+\renewcommand{\setmarginfloatcaptionadjustment}[2]{}
+\renewcommand{\setmpjustification}[2]{}
+\renewcommand*{\mpjustification}{}
+\renewcommand*{\setfloatlocations}[2]{}
+\DeclareDocumentCommand{\suppressfloats}{o}{}
+\renewcommand*{\FloatBlock}{}
+\renewcommand*{\FloatBlockAllowAbove}{}
+\renewcommand*{\FloatBlockAllowBelow}{}
+\renewcommand*{\setFloatBlockFor}{}
+\renewcommand*{\captiondelim}[1]{\renewcommand*{\CaptionSeparator}{#1}}
+\renewcommand*{\captionnamefont}[1]{}
+\renewcommand*{\captiontitlefont}[1]{}
+\renewcommand*{\captionstyle}[2][]{}
+\renewcommand*{\centerlastline}{}
+\renewcommand*{\hangcaption}{}
+\renewcommand*{\indentcaption}[1]{}
+\renewcommand*{\normalcaption}{}
+\renewcommand*{\changecaptionwidth}{}
+\DeclareDocumentCommand{\captionwidth}{m}{}
+\renewcommand*{\normalcaptionwidth}{}
+\renewcommand{\precaption}[1]{}
+\renewcommand{\captiontitlefinal}[1]{}
+\renewcommand{\postcaption}[1]{}
+
+\renewcommand{\contcaption}[1]{%
+\begin{LWR@figcaption}% later becomes \caption*
+\csuse{\@captype name} \thechapter.\the\value{\@captype}\CaptionSeparator #1
+\end{LWR@figcaption}
+}
+\renewcommand{\legend}[1]{\begin{center}#1\\\end{center}}
+
+\renewcommand{\namedlegend}[2][]{
+\begin{center}
+\csuse{fleg\@captype}\CaptionSeparator#2\\
+\end{center}
+\csuse{flegtoc\@captype}{#1}
+}
+
+\renewcommand{\flegtable}{\tablename}
+\renewcommand{\flegfigure}{\figurename}
+\renewcommand{\flegtoctable}{}
+\renewcommand{\flegtocfigure}{}
+
+\renewcommand{\newfixedcaption}[3][\caption]{%
+ \renewcommand{#2}{\def\@captype{#3}#1}}
+\renewcommand{\renewfixedcaption}[3][\caption]{%
+ \renewcommand{#2}{\def\@captype{#3}#1}}
+\renewcommand{\providefixedcaption}[3][\caption]{%
+ \providecommand{#2}{\def\@captype{#3}#1}}
+
+\renewcommand{\bitwonumcaption}[6][]{%
+\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
+\addtocounter{\@captype}{-1}%
+\begingroup%
+\csdef{\@captype name}{#4}%
+\ifblank{#5}{\caption{#6}}{\caption[#5]{#6}}%
+\endgroup%
+\ifblank{#1}{}{\label{#1}}%
+}
+
+\LetLtxMacro\bionenumcaption\bitwonumcaption% todo
+
+\renewcommand{\bicaption}[5][]{%
+\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
+\begin{LWR@figcaption}% later becomes \caption*
+#4 \thechapter.\the\value{\@captype}\CaptionSeparator #5
+\end{LWR@figcaption}
+\ifblank{#1}{}{\label{#1}}%
+}
+
+\renewcommand{\bicontcaption}[3]{%
+\contcaption{#1}%
+\begingroup%
+\csdef{\@captype name}{#2}%
+\contcaption{#3}%
+\endgroup%
+}
+
+\renewcommand{\midbicaption}[1]{}
+
+\renewcommand{\subcaption}[2][]{%
+\ifblank{#1}{\subfloat[#2]{}}{\subfloat[#1][#2]{}}%
+}
+
+\RenewDocumentCommand{\subtop}{O{} O{} m}{%
+\subfloat[#1][#2]{#3}%
+}
+
+\RenewDocumentCommand{\subbottom}{O{} O{} m}{%
+\subfloat[#1][#2]{#3}%
+}
+
+\renewcommand{\contsubcaption}{\ContinuedFloat\subcaption}
+
+\renewcommand{\contsubtop}{%
+\ContinuedFloat\addtocounter{\@captype}{1}%
+\subtop}
+
+\renewcommand{\contsubbottom}{%
+\ContinuedFloat\addtocounter{\@captype}{1}%
+\subbottom}
+
+\renewcommand{\subconcluded}{}
+
+\LetLtxMacro\subcaptionref\subref
+
+\renewcommand*{\tightsubcaptions}{}
+\renewcommand*{\loosesubcaptions}{}
+
+\renewcommand*{\subcaptionsize}[1]{}
+\renewcommand*{\subcaptionlabelfont}[1]{}
+\renewcommand*{\subcaptionfont}[1]{}
+\renewcommand*{\subcaptionstyle}[1]{}
+
+\renewcommand*{\hangsubcaption}{}
+\renewcommand*{\shortsubcaption}{}
+\renewcommand*{\normalsubcaption}{}
+
+\RenewDocumentEnvironment{sidecaption}{o m o}
+{}
+{
+\IfValueTF{#1}{\caption[#1]{#2}}{\caption{#2}}%
+\IfValueT{#3}{\label{#3}}%
+}
+
+\renewcommand*{\setsidecaps}[2]{}
+\renewcommand*{\sidecapmargin}[1]{}
+\scapmargleftfalse
+\renewcommand*{\setsidecappos}[1]{}
+
+\RenewDocumentEnvironment{sidecontcaption}{m o}
+{}
+{%
+\ContinuedFloat%
+\caption{#1}%
+\IfValueT{#2}{\label[\@captype]{#2}}%
+}
+\renewenvironment{sidenamedlegend}[2][]{
+\begin{center}
+\csuse{\@captype name}\CaptionSeparator#2
+\end{center}
+}
+{}
+
+\renewenvironment{sidelegend}[1]
+{\begin{center}
+#1
+
+}
+{\end{center}}
+
+\renewcommand*{\sidecapstyle}{}
+\renewcommand*{\overridescapmargin}[1]{}
+\renewcommand*{\sidecapfloatwidth}{\linewidth}
+
+\LetLtxMacro\ctabular\tabular
+\LetLtxMacro\endctabular\endtabular
+
+\renewcommand{\autorows}[5][]{%
+#5
+}
+
+\renewcommand{\autocols}[5][]{%
+#5
+}
+\renewcommand*{\feetabovefloat}{}
+\renewcommand*{\feetbelowfloat}{}
+\renewcommand*{\feetatbottom}{}
+
+\renewcommand*{\verbfootnote}[2][]{
+\PackageError{lwarp,memoir}
+{Verbatim footnotes are not yet supported by lwarp.}
+{This may be improved some day.}
+}
+
+\renewcommand*{\plainfootnotes}{}
+\renewcommand*{\twocolumnfootnotes}{}
+\renewcommand*{\threecolumnfootnotes}{}
+\renewcommand*{\paragraphfootnotes}{}
+\renewcommand*{\footfudgefiddle}{}
+
+\renewcommand*{\newfootnoteseries}[1]{
+\PackageError{lwarp,memoir}
+{Memoir footnote series are not yet supported by lwarp.}
+{This may be improved some day.}
+}
+
+\renewcommand*{\plainfootstyle}[1]{}
+\renewcommand*{\twocolumnfootstyle}[1]{}
+\renewcommand*{\threecolumnfootstyle}[1]{}
+\renewcommand*{\paragraphfootstyle}[1]{}
+
+\renewcommand*{\footfootmark}{}
+\renewcommand*{\footmarkstyle}[1]{}
+
+
+\renewcommand*{\foottextfont}{}
+
+\renewcommand*{\marginparmargin}[1]{}
+\renewcommand*{\sideparmargin}[1]{}
+
+\LetLtxMacro\sidepar\marginpar
+\renewcommand*{\sideparfont}{}
+\renewcommand*{\sideparform}{}
+\LWR@providelength{\sideparvshift}
+
+\renewcommand*{\parnopar}{}
+
+\renewcommand{\sidebar}[1]{\begin{quote}#1\end{quote}}
+\renewcommand*{\sidebarmargin}[1]{}
+\renewcommand*{\sidebarfont}{}
+\renewcommand*{\sidebarform}{}
+\renewcommand{\setsidebarheight}[1]{}
+\renewcommand*{\setsidebars}[6]{}
+\renewcommand*{\footnotesatfoot}{}
+\renewcommand*{\footnotesinmargin}{}
+
+\LetLtxMacro\sidefootnote\footnote
+\LetLtxMacro\sidefootnotemark\footnotemark
+\LetLtxMacro\sidefootnotetext\footnotetext
+
+\renewcommand*{\sidefootmargin}[1]{}
+\renewcommand*{\setsidefootheight}[1]{}
+\renewcommand*{\setsidefeet}[6]{}
+\renewcommand*{\sidefootmarkstyle}[1]{}
+\renewcommand*{\sidefoottextfont}{}
+\renewcommand*{\sidefootform}{}
+
+\renewcommand*{\continuousnotenums}{\pncontopttrue}% from pagenote
+\renewcommand*{\notepageref}{}
+\renewcommand*{\prenotetext}{}
+\renewcommand*{\postnotetext}{}
+\renewcommand*{\idtextinnotes}[1]{}
+\renewcommand*{\printpageinnotes}[1]{}
+\renewcommand*{\printpageinnoteshyperref}[1]{}
+\renewcommand*{\foottopagenote}{}
+\renewcommand*{\pagetofootnote}{}
+\renewcommand*{\epigraphposition}[1]{}
+\renewcommand*{\epigraphtextposition}[1]{}
+\renewcommand*{\epigraphsourceposition}[1]{}
+\renewcommand*{\epigraphfontsize}[1]{}
+\renewcommand*{\epigraphforheader}[2][]{}
+\renewcommand*{\epigraphpicture}{}
+\renewcommand*{\vinphantom}{}
+\renewcommand*{\vleftofline}[1]{#1}
+
+\DeclareDocumentCommand{\PoemTitle}{s o o m}{%
+\IfValueTF{#2}%
+{\poemtitle[#2]{#4}}%
+{\poemtitle{#4}}%
+}
+
+\renewcommand*{\NumberPoemTitle}{}
+\renewcommand*{\PlainPoemTitle}{}
+\renewcommand*{\poemtitlepstyle}{}
+\renewcommand*{\poemtitlestarmark}[1]{}
+\renewcommand*{\poemtitlestarpstyle}{}
+\renewcommand*{\PoemTitleheadstart}{}
+\renewcommand*{\printPoemTitlenonum}{}
+\renewcommand*{\printPoemTitlenum}{}
+\renewcommand*{\afterPoemTitlenum}{}
+\renewcommand*{\printPoemTitletitle}[1]{}
+\renewcommand*{\afterPoemTitle}{}
+\newlength{\midpoemtitleskip}
+\renewcommand*{\PoemTitlenumfont}{}
+\renewcommand*{\PoemTitlefont}{}
+\renewenvironment{qframe}{\framed}{\endframed}
+\renewenvironment{qshade}{\shaded}{\endshaded}
+\renewcommand*{\commentsoff}[1]{\includecomment{#1}}
+\renewcommand*{\commentson}[1]{\excludecomment{#1}}
+\LetLtxMacro\renewcomment\commentson
+
+\renewcommand*{\setverbatimfont}[1]{}
+\renewcommand*{\tabson}[1]{}
+\renewcommand*{\tabsoff}{}
+\renewcommand*{\wrappingon}{}
+\renewcommand*{\wrappingoff}{}
+\renewcommand*{\verbatimindent}{}
+\renewcommand*{\verbatimbreakchar}[1]{}
+\DefineVerbatimEnvironment{fboxverbatim}{Verbatim}{frame=single}
+\renewcommand*{\bvbox}{}
+\renewcommand*{\bvtopandtail}{}
+\renewcommand*{\bvsides}{}
+\renewcommand*{\nobvbox}{}
+\renewcommand*{\bvtoprulehook}{}
+\renewcommand*{\bvtopmidhook}{}
+\renewcommand*{\bvendrulehook}{}
+\renewcommand*{\bvleftsidehook}{}
+\renewcommand*{\bvrightsidehook}{}
+\renewcommand*{\bvperpagetrue}{}
+\renewcommand*{\bvperpagefalse}{}
+\renewcommand{\bvtopofpage}[1]{}
+\renewcommand{\bvendofpage}[1]{}
+\renewcommand*{\linenumberfrequency}[1]{}
+\renewcommand*{\resetbvlinenumber}{}
+\renewcommand*{\setbvlinenums}[2]{}
+\renewcommand*{\linenumberfont}[1]{}
+\renewcommand*{\bvnumbersinside}{}
+\renewcommand*{\bvnumbersoutside}{}
+\renewcommand*{\fref}[1]{\cref{#1}}
+\renewcommand*{\tref}[1]{\cref{#1}}
+\renewcommand*{\pref}[1]{\cpageref{#1}}
+\renewcommand*{\Aref}[1]{\cref{#1}}
+\renewcommand*{\Bref}[1]{\cref{#1}}
+\renewcommand*{\Pref}[1]{\cref{#1}}
+\renewcommand*{\Sref}[1]{\cref{#1}}
+\renewcommand*{\figurerefname}{Figure}
+\renewcommand*{\tablerefname}{Table}
+\renewcommand*{\pagerefname}{page}
+\renewcommand*{\bookrefname}{Book~}
+\renewcommand*{\partrefname}{Part~}
+\renewcommand*{\chapterrefname}{Chapter~}
+\renewcommand*{\sectionrefname}{\S}
+\renewcommand*{\appendixrefname}{Appendix~}
+\LetLtxMacro\titleref\nameref
+\renewcommand*{\headnameref}{}
+\renewcommand*{\tocnameref}{}
+
+\providecounter{LWR@currenttitle}
+
+\renewcommand*{\currenttitle}{%
+ \addtocounter{LWR@currenttitle}{1}%
+ \label{currenttitle\arabic{LWR@currenttitle}}%
+ \nameref{currenttitle\arabic{LWR@currenttitle}}%
+}
+
+\renewcommand*{\theTitleReference}[2]{}
+\renewcommand*{\namerefon}{}
+\renewcommand*{\namerefoff}{}
+\DeclareDocumentCommand{\newblock}{}{}
+\renewcommand*{\showindexmarks}{}
+\renewcommand*{\hideindexmarks}{}
+
+\renewcommand*{\xindyindex}{}
+\renewcommand*{\changemarks}{}
+\renewcommand*{\nochangemarks}{}
+\renewcommand*{\added}[1]{}
+\renewcommand*{\deleted}[1]{}
+\renewcommand*{\changed}[1]{}
+
+\renewcommand*{\showtrimsoff}{}
+\renewcommand*{\showtrimson}{}
+\renewcommand*{\trimXmarks}{}
+\renewcommand*{\trimLmarks}{}
+\renewcommand*{\trimFrame}{}
+\renewcommand*{\trimNone}{}
+\renewcommand*\trimmarkscolor{}
+\renewcommand*{\trimmarks}{}
+\renewcommand*{\tmarktl}{}
+\renewcommand*{\tmarktr}{}
+\renewcommand*{\tmarkbr}{}
+\renewcommand*{\tmarkbl}{}
+\renewcommand*{\tmarktm}{}
+\renewcommand*{\tmarkmr}{}
+\renewcommand*{\tmarkbm}{}
+\renewcommand*{\tmarkml}{}
+\renewcommand*{\trimmark}{}
+\renewcommand*{\quarkmarks}{}
+\renewcommand*{\registrationColour}[1]{}
+
+\renewcommand*{\leavespergathering}[1]{}
+
+\renewcommand*{\noprelistbreak}{}
+
+\renewcommand*{\cleartorecto}{}
+\renewcommand*{\cleartoverso}{}
+
+\renewenvironment{vplace}[1][]{}{}
+\newlistof{tableofcontents}{toc}{\contentsname}
+\newlistof{listoffigures}{lof}{\listfigurename}
+\newlistof{listoftables}{lot}{\listtablename}
+\endinput
+%%
+%% End of file `lwarp-patch-memoir.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-prettyref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-prettyref.sty
new file mode 100644
index 00000000000..169c4f82724
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-prettyref.sty
@@ -0,0 +1,26 @@
+%%
+%% This is file `lwarp-prettyref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `prettyref')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{prettyref}
+
+\newrefformat{fig}{Figure \ref{#1}}
+\newrefformat{tab}{Table \ref{#1}}
+
+\endinput
+%%
+%% End of file `lwarp-prettyref.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty
index 011ab6d59a3..33d30c5224a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-rotfloat.sty
@@ -21,18 +21,18 @@
\RequirePackage{float}
\RenewDocumentCommand{\newfloat}{m m m o}{%
-\IfValueTF{#4}
-{
- \DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}
-}
-{
- \DeclareFloatingEnvironment[fileext=#3]{#1}
- \DeclareFloatingEnvironment[fileext=#3]{sideways#1}
-}
-\csletcs{sideways#1}{#1}
-\csletcs{endsideways#1}{end#1}
-\cslet{listof#1s}\relax
-\cslet{listof#1es}\relax
+\IfValueTF{#4}%
+{%
+ \DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}%
+}%
+{%
+ \DeclareFloatingEnvironment[fileext=#3]{#1}%
+ \DeclareFloatingEnvironment[fileext=#3]{sideways#1}%
+}%
+\csletcs{sideways#1}{#1}%
+\csletcs{endsideways#1}{end#1}%
+\cslet{listof#1s}\relax%
+\cslet{listof#1es}\relax%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty
index 0af502a7753..efb1a16c8ca 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty
@@ -46,24 +46,19 @@
\ifdim\dimen@>\FBso@max
\global\FBso@max\dimen@
\fi}%
- \vtop\bgroup
- \vbox\bgroup
+ \bgroup
+ \bgroup
\ifcase\@tempcnta
\@minipagefalse
\or
- \vskip\sf@top
\or
\ifdim \lastskip=\z@ \else
- \@tempskipb\sf@top\relax\@xaddvskip
\fi
\fi
\sf@ifpositiontop{%
\ifx \@empty#3\relax \else
\sf@subcaption{#1}{#2}{#3}%
- \vskip\sf@capskip
- \vskip\sf@captopadj
\fi\egroup
- \hrule width0pt height0pt depth0pt
\LWR@startpars% new
#4
\LWR@stoppars% new
@@ -81,12 +76,9 @@
\LWR@stoppars% new
\egroup
\ifx \@empty#3\relax \else
- \vskip\sf@capskip
- \hrule width0pt height0pt depth0pt
\sf@subcaption{#1}{#2}{#3}%
\fi
}%
- \vskip\sf@bottom
\egroup
\@ifundefined{FBsc@max}{}%
{\addtocounter{FRobj}{-1}%
@@ -124,7 +116,7 @@
{\@nameuse{sub\@captype name}}%
{\@nameuse{thesub\@captype}}%
{#3}
- \LWR@figcaption% new
+ \endLWR@figcaption% new
\LWR@traceinfo{sfsubcap B2}% new
}%
{\dimen@\ht0%
@@ -140,7 +132,6 @@
\def\next{
}%
\fi
- \vbox{%
\LWR@traceinfo{sfsubcap C1}% new
\caption@make
@@ -149,7 +140,6 @@
{#3}
\LWR@traceinfo{sfsubcap C1}% new
- }
}%
\egroup
\LWR@startpars% new
@@ -165,7 +155,7 @@
\let\caption@lsep\@empty
\let\caption@tfmt\@firstofone
}%
-\renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% new
+ \renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% new
\caption@applyfont
\caption@fmt
{\ifcaption@star\else
@@ -194,6 +184,13 @@
\LWR@stoppars% new
}
+\renewcommand{\caption@@make@}[2]{%
+ \caption@stepthecounter
+ \caption@beginhook
+ \caption@@@make{#1}{#2}%
+ \caption@endhook
+}
+
\def\subfloat@label{%
\LWR@ensuredoingapar% new
\@ifnextchar(% %) match left parenthesis
@@ -211,11 +208,10 @@
\def\@newsubfloat[#1]#2{%
\LWR@orig@newsubfloat[#1]{#2}%
-\renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}}
+\renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}}%
}
\renewcommand{\l@subfigure}[2]{\hypertocfloat{2}{subfigure}{lof}{#1}{#2}}
\renewcommand{\l@subtable}[2]{\hypertocfloat{2}{subtable}{lot}{#1}{#2}}
-
\endinput
%%
%% End of file `lwarp-subfig.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfigure.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfigure.sty
new file mode 100644
index 00000000000..82a09cc4dbc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfigure.sty
@@ -0,0 +1,41 @@
+%%
+%% This is file `lwarp-subfigure.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `subfigure')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{subfigure}
+\RequirePackage{subfig}
+\LetLtxMacro\subfigure\subfloat
+\LetLtxMacro\subtable\subfloat
+\LetLtxMacro\Subref\subref
+\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{}
+\newif\ifsubfiguretopcap
+\newif\ifsubcaphang
+\newif\ifsubcapcenter
+\newif\ifsubcapcenterlast
+\newif\ifsubcapnooneline
+\newif\ifsubcapraggedright
+\newskip\subfigtopskip
+\newskip\subfigcapskip
+\newdimen\subfigcaptopadj
+\newskip\subfigbottomskip
+\newdimen\subfigcapmargin
+\newskip\subfiglabelskip
+\newcommand*{\subcapsize}{}
+\newcommand*{\subcaplabelfont}{}
+\newcommand*{\subcapfont}{}
+\endinput
+%%
+%% End of file `lwarp-subfigure.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-supertabular.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-supertabular.sty
index 3d1a075ea57..a146d307b88 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-supertabular.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-supertabular.sty
@@ -45,15 +45,15 @@
\newcommand*{\shrinkheight}[1]{}
\NewDocumentEnvironment{supertabular}{s o m}
-{
-\LWR@traceinfo{supertabular}
-\table
-\LWRST@caption
-\begin{tabular}{#3}
+{%
+\LWR@traceinfo{supertabular}%
+\table%
+\LWRST@caption%
+\begin{tabular}{#3}%
\TabularMacro\ifdefvoid{\LWRST@firsthead}%
{\LWR@getmynexttoken}%
{\expandafter\LWR@getmynexttoken\LWRST@firsthead}%
-}
+}%
{%
\ifdefvoid{\LWRST@lasttail}%
{}%
@@ -61,9 +61,9 @@
\TabularMacro\ResumeTabular%
\LWRST@lasttail%
}%
-\end{tabular}
-\endtable
-\LWR@traceinfo{supertabular done}
+\end{tabular}%
+\endtable%
+\LWR@traceinfo{supertabular done}%
}
\NewDocumentEnvironment{mpsupertabular}{s o m}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty
index 3b1d41eb8a3..fab7370755b 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty
@@ -19,11 +19,11 @@
\LWR@ProvidesPackageDrop{tabularx}
-\NewDocumentEnvironment{tabularx}{m o m}
+\DeclareDocumentEnvironment{tabularx}{m o m}
{\tabular{#3}}
{\endtabular}
-\NewDocumentEnvironment{tabularx*}{m o m}
+\DeclareDocumentEnvironment{tabularx*}{m o m}
{\tabular{#3}}
{\endtabular}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-textfit.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-textfit.sty
new file mode 100644
index 00000000000..0865fc742e1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-textfit.sty
@@ -0,0 +1,43 @@
+%%
+%% This is file `lwarp-textfit.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `textfit')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{textfit}
+\newsavebox{\LWR@textfitbox}
+
+\newcommand*{\LWR@textfitscale}[2]{%
+\uselengthunit{PT}%
+\setlength{\LWR@templengthone}{#1}%
+\setlength{\LWR@templengthone}{%
+ 1em*\ratio{\LWR@templengthone}{\LWR@templengthtwo}%
+}%
+\InlineClass[font-size:\rndprintlength{\LWR@templengthone}]{textfit}{#2}%
+}
+
+\newcommand*{\scaletowidth}[2]{%
+\sbox{\LWR@textfitbox}{#2}%
+\settowidth{\LWR@templengthtwo}{\usebox{\LWR@textfitbox}}%
+\LWR@textfitscale{#1}{#2}%
+}
+
+\newcommand*{\scaletoheight}[2]{%
+\sbox{\LWR@textfitbox}{#2}%
+\settoheight{\LWR@templengthtwo}{\usebox{\LWR@textfitbox}}%
+\LWR@textfitscale{#1}{#2}%
+}
+\endinput
+%%
+%% End of file `lwarp-textfit.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty
index 8bf5db0c1e0..c0bad5e4b7f 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty
@@ -81,98 +81,99 @@
\AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% new
}%
\fi}
-\gdef\th@plain{%\normalfont\itshape
+\gdef\th@plain{%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2}
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2\ (##3)}
- ]}
+ ]
+ }
}
-\gdef\th@break{%\normalfont\slshape
+\gdef\th@break{%
\def\@begintheorem##1##2{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip \labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2}\newline%
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip \labelsep
+ \item[
\InlineClass{theoremheader}{##1\ ##2\ (##3)}\newline
- ]}
+ ]
+ }
}
-\gdef\th@marginbreak{%\normalfont\slshape
+\gdef\th@marginbreak{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep %
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1}\newline
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep %
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1\ %
(##3)}\newline
- ]}
+ ]
+ }
}
-\gdef\th@changebreak{%\normalfont\slshape
+\gdef\th@changebreak{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2\ ##1}\newline
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{ ##2\ ##1\ %
(##3)}\newline
- ]}
+ ]
+ }
}
-\gdef\th@change{%\normalfont\slshape
+\gdef\th@change{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2\ ##1}
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2\ ##1\ (##3)}
- ]}
+ ]
+ }
}
-\gdef\th@margin{%\normalfont\slshape
+\gdef\th@margin{%
\def\@begintheorem##1##2{
-\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
+ \item[
\InlineClass{theoremheader}{##2 \qquad ##1}
- ]}%
+ ]
+ }%
\def\@opargbegintheorem##1##2##3{%
+ \item[
+ \InlineClass{theoremheader}{##2 \qquad ##1\ (##3)}
+ ]
+ }
+}
+\gdef\@thm#1#2{\refstepcounter{#1}%
\LWR@forcenewpage% new
\BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{##2 \qquad ##1\ (##3)}
- ]}
+ \trivlist
+ \@topsep \theorempreskipamount % used by first \item
+ \@topsepadd \theorempostskipamount % used by \@endparenv
+ \@ifnextchar [%
+ {\@ythm{#1}{#2}}%
+ {\@begintheorem{#2}{\csname the#1\endcsname}\ignorespaces}}
+
+\gdef\@endtheorem{%
+\endtrivlist
+\endBlockClass
}
-\gdef\@endtheorem{\endBlockClass\endtrivlist}
\endinput
%%
%% End of file `lwarp-theorem.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
index 0f9c437c774..caca518a2c8 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
@@ -19,8 +19,6 @@
\LWR@ProvidesPackagePass{tikz}
-\begin{warpHTML}
-
\newboolean{LWR@tikzbabel}
\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0
@@ -41,8 +39,6 @@
{\catcode`\$=\active}%
}
-\end{warpHTML}
-
\endinput
%%
%% End of file `lwarp-tikz.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titleref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titleref.sty
index dd8376af42f..8e9892773a1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titleref.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titleref.sty
@@ -15,7 +15,19 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\LWR@loadnever{titleref}{hyperref and nameref}
+\LWR@ProvidesPackageDrop{titleref}
+
+\LetLtxMacro\titleref\nameref
+
+\providecounter{LWR@currenttitle}
+
+\newcommand*{\currenttitle}{%
+ \addtocounter{LWR@currenttitle}{1}%
+ \label{currenttitle\arabic{LWR@currenttitle}}%
+ \nameref{currenttitle\arabic{LWR@currenttitle}}%
+}
+
+\newcommand*{\theTitleReference}[2]{}
\endinput
%%
%% End of file `lwarp-titleref.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
index 68103bddc69..7da04f1da90 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
@@ -53,7 +53,7 @@
\renewcommand*{\LWR@maketitlesetup}{%
\def\@makefnmark{\textsuperscript{\@thefnmark}}
\long\def\@makefntext##1{%
-\makethanksmark \LWR@orighspace{1in}
+\makethanksmark~%
##1%
}%
}
@@ -104,11 +104,15 @@
\renewcommand{\thanksmarkseries}[1]{%
\def\@bsmarkseries{\renewcommand{\thefootnote}{\@nameuse{#1}{footnote}}}%
}
+\@ifclassloaded{memoir}{
+ \thanksmarkseries{arabic}
+}{% not memoir
\if@titlepage
\thanksmarkseries{arabic}
\else
\thanksmarkseries{fnsymbol}
\fi
+}% not memoir
\endinput
%%
%% End of file `lwarp-titling.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocbibind.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocbibind.sty
index 2b8e3c55ead..1481bcf32ec 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocbibind.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocbibind.sty
@@ -49,13 +49,13 @@
\let\subitem\LWR@indexsubitem%
\let\subsubitem\LWR@indexsubsubitem%
}{}
-\renewcommand{\simplechapter}[1][\@empty]{%
+\DeclareDocumentCommand{\simplechapter}{O{\@empty}}{%
\def\@chapcntformat##1{%
#1~\csname the##1\endcsname\simplechapterdelim\protect\quad%
}%
}
-\renewcommand{\restorechapter}{%
+\DeclareDocumentCommand{\restorechapter}{}{%
\let\@chapcntformat\@seccntformat%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
index 1fe9a61bf71..b93eddf47e1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
@@ -49,37 +49,36 @@
\newlength{\cftbeforelottitleskip}
\newlength{\cftafterlottitleskip}
-\newcommand*{\cftdot}{.}
+\providecommand*{\cftdot}{.}
\providecommand*{\cftdotsep}{1}
-\newcommand*{\cftnodots}{5000}
+\providecommand*{\cftnodots}{5000}
\providecommand{\cftdotfill}[1]{}
-\newcommand*{\cftsetpnumwidth}[1]{}
+\DeclareDocumentCommand{\cftsetpnumwidth}{m}{}
-\newcommand*{\cftsetrmarg}[1]{}
+\DeclareDocumentCommand{\cftsetrmarg}{m}{}
-\newcommand*{\cftpnumalign}[1]{}
+\DeclareDocumentCommand{\cftpnumalign}{m}{}
-\newlength{\cftparskip}
+\LWR@providelength{\cftparskip}
-\newlength{\cftbeforepartskip}
-\newlength{\cftpartindent}
-\newlength{\cftpartnumwidth}
-\newcommand*{\cftpartfont}{}
-\newcommand*{\cftpartpresnum}{}
-\newcommand*{\cftpartaftersnum}{}
-\newcommand*{\cftpartaftersnumb}{}
-\newcommand*{\cftpartleader}{}
-\newcommand*{\cftpartdotsep}{1}
-\newcommand*{\cftpartpagefont}{}
-\newcommand*{\cftpartafterpnum}{}
-
-\newlength{\cftbeforechapskip}
-\newlength{\cftchapindent}
-\newlength{\cftchapnumwidth}
+\LWR@providelength{\cftbeforepartskip}
+\LWR@providelength{\cftpartindent}
+\LWR@providelength{\cftpartnumwidth}
+\providecommand*{\cftpartfont}{}
+\providecommand*{\cftpartpresnum}{}
+\providecommand*{\cftpartaftersnum}{}
+\providecommand*{\cftpartaftersnumb}{}
+\providecommand*{\cftpartleader}{}
+\providecommand*{\cftpartdotsep}{1}
+\providecommand*{\cftpartpagefont}{}
+\providecommand*{\cftpartafterpnum}{}
+\LWR@providelength{\cftbeforechapskip}
+\LWR@providelength{\cftchapindent}
+\LWR@providelength{\cftchapnumwidth}
\newcommand*{\cftchapfont}{}
\newcommand*{\cftchappresnum}{}
\newcommand*{\cftchapaftersnum}{}
@@ -88,10 +87,9 @@
\newcommand*{\cftchapdotsep}{1}
\newcommand*{\cftchappagefont}{}
\newcommand*{\cftchapafterpnum}{}
-
-\newlength{\cftbeforesecskip}
-\newlength{\cftsecindent}
-\newlength{\cftsecnumwidth}
+\LWR@providelength{\cftbeforesecskip}
+\LWR@providelength{\cftsecindent}
+\LWR@providelength{\cftsecnumwidth}
\newcommand*{\cftsecfont}{}
\newcommand*{\cftsecpresnum}{}
\newcommand*{\cftsecaftersnum}{}
@@ -101,9 +99,9 @@
\newcommand*{\cftsecpagefont}{}
\newcommand*{\cftsecafterpnum}{}
-\newlength{\cftbeforesubsecskip}
-\newlength{\cftsubsecindent}
-\newlength{\cftsubsecnumwidth}
+\LWR@providelength{\cftbeforesubsecskip}
+\LWR@providelength{\cftsubsecindent}
+\LWR@providelength{\cftsubsecnumwidth}
\newcommand*{\cftsubsecfont}{}
\newcommand*{\cftsubsecpresnum}{}
\newcommand*{\cftsubsecaftersnum}{}
@@ -113,9 +111,9 @@
\newcommand*{\cftsubsecpagefont}{}
\newcommand*{\cftsubsecafterpnum}{}
-\newlength{\cftbeforesubsubsecskip}
-\newlength{\cftsubsubsecindent}
-\newlength{\cftsubsubsecnumwidth}
+\LWR@providelength{\cftbeforesubsubsecskip}
+\LWR@providelength{\cftsubsubsecindent}
+\LWR@providelength{\cftsubsubsecnumwidth}
\newcommand*{\cftsubsubsecfont}{}
\newcommand*{\cftsubsubsecpresnum}{}
\newcommand*{\cftsubsubsecaftersnum}{}
@@ -125,9 +123,9 @@
\newcommand*{\cftsubsubsecpagefont}{}
\newcommand*{\cftsubsubsecafterpnum}{}
-\newlength{\cftbeforeparaskip}
-\newlength{\cftparaindent}
-\newlength{\cftparanumwidth}
+\LWR@providelength{\cftbeforeparaskip}
+\LWR@providelength{\cftparaindent}
+\LWR@providelength{\cftparanumwidth}
\newcommand*{\cftparafont}{}
\newcommand*{\cftparapresnum}{}
\newcommand*{\cftparaaftersnum}{}
@@ -137,9 +135,9 @@
\newcommand*{\cftparapagefont}{}
\newcommand*{\cftparaafterpnum}{}
-\newlength{\cftbeforesubparaskip}
-\newlength{\cftsubparaindent}
-\newlength{\cftsubparanumwidth}
+\LWR@providelength{\cftbeforesubparaskip}
+\LWR@providelength{\cftsubparaindent}
+\LWR@providelength{\cftsubparanumwidth}
\newcommand*{\cftsubparafont}{}
\newcommand*{\cftsubparapresnum}{}
\newcommand*{\cftsubparaaftersnum}{}
@@ -149,9 +147,9 @@
\newcommand*{\cftsubparapagefont}{}
\newcommand*{\cftsubparaafterpnum}{}
-\newlength{\cftbeforefigskip}
-\newlength{\cftfigindent}
-\newlength{\cftfignumwidth}
+\LWR@providelength{\cftbeforefigskip}
+\LWR@providelength{\cftfigindent}
+\LWR@providelength{\cftfignumwidth}
\newcommand*{\cftfigfont}{}
\newcommand*{\cftfigpresnum}{}
\newcommand*{\cftfigaftersnum}{}
@@ -161,9 +159,9 @@
\newcommand*{\cftfigpagefont}{}
\newcommand*{\cftfigafterpnum}{}
-\newlength{\cftbeforesubfigskip}
-\newlength{\cftsubfigindent}
-\newlength{\cftsubfignumwidth}
+\LWR@providelength{\cftbeforesubfigskip}
+\LWR@providelength{\cftsubfigindent}
+\LWR@providelength{\cftsubfignumwidth}
\newcommand*{\cftsubfigfont}{}
\newcommand*{\cftsubfigpresnum}{}
\newcommand*{\cftsubfigaftersnum}{}
@@ -173,9 +171,9 @@
\newcommand*{\cftsubfigpagefont}{}
\newcommand*{\cftsubfigafterpnum}{}
-\newlength{\cftbeforetabskip}
-\newlength{\cfttabindent}
-\newlength{\cfttabnumwidth}
+\LWR@providelength{\cftbeforetabskip}
+\LWR@providelength{\cfttabindent}
+\LWR@providelength{\cfttabnumwidth}
\newcommand*{\cfttabfont}{}
\newcommand*{\cfttabpresnum}{}
\newcommand*{\cfttabaftersnum}{}
@@ -185,9 +183,9 @@
\newcommand*{\cfttabpagefont}{}
\newcommand*{\cfttabafterpnum}{}
-\newlength{\cftbeforesubtabskip}
-\newlength{\cftsubtabindent}
-\newlength{\cftsubtabnumwidth}
+\LWR@providelength{\cftbeforesubtabskip}
+\LWR@providelength{\cftsubtabindent}
+\LWR@providelength{\cftsubtabnumwidth}
\newcommand*{\cftsubtabfont}{}
\newcommand*{\cftsubtabpresnum}{}
\newcommand*{\cftsubtabaftersnum}{}
@@ -197,44 +195,55 @@
\newcommand*{\cftsubtabpagefont}{}
\newcommand*{\cftsubtabafterpnum}{}
-\newcommand{\cftsetindents}[3]{}
+\DeclareDocumentCommand{\cftsetindents}{m m m}{}
\newcommand{\pagenumbersoff}[1]{}
\newcommand{\pagenumberson}[1]{}
-\NewDocumentCommand{\newlistentry}{o m m m}
-{
-\IfValueTF{#1}
-{
- \newcounter{#2}[#1]
- \expandafter\edef\csname the#2\endcsname{
- \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}
- }
-}
-{\newcounter{#2}}
-\@namedef{l@#2}##1##2{\hypertocfloat{1}{#2}{#3}{##1}{##2}}
-\expandafter\newlength\csname cftbefore#2skip\endcsname
-\expandafter\newlength\csname cft#2indent\endcsname
-\expandafter\newlength\csname cft#2numwidth\endcsname
-\@namedef{cft#2font}{}
-\@namedef{cft#2presnum}{}
-\@namedef{cft#2aftersnum}{}
-\@namedef{cft#2aftersnumb}{}
-\@namedef{cft#2leader}{}
-\@namedef{cft#2dotsep}{1}
-\@namedef{cft#2pagefont}{}
-\@namedef{cft#2afterpnum}{}
-\@namedef{toclevel@#2}{#4}
-\@namedef{cft#2fillnum}##1{}
+\DeclareDocumentCommand{\newlistentry}{o m m m}
+{%
+\LWR@traceinfo{newlistentry #2 #3 #4}%
+\IfValueTF{#1}%
+{%
+ \@ifundefined{c@#2}{%
+ \newcounter{#2}[#1]%
+ \expandafter\edef\csname the#2\endcsname{%
+ \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}%
+ }%
+ }{}%
+}%
+{%
+ \@ifundefined{c@#2}{%
+ \newcounter{#2}%
+ }{}%
+}%
+\@namedef{l@#2}##1##2{%
+ \hypertocfloat{1}{#2}{#3}{##1}{##2}%
+ \def\cftwhatismyname{#2}% from memoir
+}%
+\expandafter\newlength\csname cftbefore#2skip\endcsname%
+\expandafter\newlength\csname cft#2indent\endcsname%
+\expandafter\newlength\csname cft#2numwidth\endcsname%
+\@namedef{cft#2font}{}%
+\@namedef{cft#2presnum}{}%
+\@namedef{cft#2aftersnum}{}%
+\@namedef{cft#2aftersnumb}{}%
+\@namedef{cft#2leader}{}%
+\@namedef{cft#2dotsep}{1}%
+\@namedef{cft#2pagefont}{}%
+\@namedef{cft#2afterpnum}{}%
+\@namedef{toclevel@#2}{#4}%
+\@namedef{cft#2fillnum}##1{}%
+\LWR@traceinfo{newlistentry done}%
}
-\NewDocumentCommand{\newlistof}{o m m m}
+\DeclareDocumentCommand{\newlistof}{o m m m}
{%
\IfValueTF{#1}
{\newlistentry[#1]{#2}{#3}{0}}
{\newlistentry{#2}{#3}{0}}
\@namedef{ext@#2}{#3}
-\newcounter{#3depth}
+\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}
\setcounter{#3depth}{1}
\@namedef{cftmark#3}{}
\@namedef{listof#2}{\listof{#2}{#4}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-turnthepage.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-turnthepage.sty
new file mode 100644
index 00000000000..2e99d817407
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-turnthepage.sty
@@ -0,0 +1,22 @@
+%%
+%% This is file `lwarp-turnthepage.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `turnthepage')
+%% This is a generated file.
+%% Copyright 2016-2017 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{turnthepage}
+\newcommand{\turnthepage}{}
+\endinput
+%%
+%% End of file `lwarp-turnthepage.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
index 8c9ccc12762..c5092c059df 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xfrac.sty
@@ -30,7 +30,7 @@
\begin{warpHTML}
\newcommand*{\LWR@htmlsmallfontstart}{%
-\LWR@htmltagc{span style="font-size:\xfracHTMLfontsize"{}}%
+\LWR@htmltagc{span style="font-size:\xfracHTMLfontsize"}%
\LWR@nestspan%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xtab.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xtab.sty
index 72f6e84aae5..5a850ed5391 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xtab.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xtab.sty
@@ -52,15 +52,15 @@
\newcommand*{\xentrystretch}[1]{}
\NewDocumentEnvironment{xtabular}{s o m}
-{
-\LWR@traceinfo{xtabular}
-\table
-\LWRXT@caption
-\begin{tabular}{#3}
+{%
+\LWR@traceinfo{xtabular}%
+\table%
+\LWRXT@caption%
+\begin{tabular}{#3}%
\TabularMacro\ifdefvoid{\LWRXT@firsthead}%
{\LWR@getmynexttoken}%
{\expandafter\LWR@getmynexttoken\LWRXT@firsthead}%
-}
+}%
{%
\ifdefvoid{\LWRXT@lasttail}%
{}%
@@ -68,9 +68,9 @@
\TabularMacro\ResumeTabular%
\LWRXT@lasttail%
}%
-\end{tabular}
-\endtable
-\LWR@traceinfo{xtabular done}
+\end{tabular}%
+\endtable%
+\LWR@traceinfo{xtabular done}%
}
\NewDocumentEnvironment{mpxtabular}{s o m}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index a0ac4d906f1..bd8ecd191dd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/11/22 v0.44 Allows LaTeX to directly produce HTML5 output.]
+ [2018/01/23 v0.46 Allows LaTeX to directly produce HTML5 output.]
@@ -48,7 +48,9 @@
\RequirePackage{upquote}
\else
\fi
-
+\newcommand*\LWR@providelength[1]{%
+ \ifdeflength{#1}{}{\newlength{#1}}%
+}
\RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc.
\RequirePackage{xpatch}
@@ -168,7 +170,6 @@
{\includecomment{LWR@createlwarpmk}}
{\excludecomment{LWR@createlwarpmk}}
-
\newcommand*{\LWR@loadafter}[1]{%
\@ifpackageloaded{#1}
{
@@ -181,6 +182,10 @@ after lwarp.}
{}
}
+\@ifclassloaded{memoir}
+{\newcommand*{\LWR@notmemoirloadafter}[1]{}}
+{\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter}
+
\newcommand*{\LWR@loadbefore}[1]{%
\@ifpackageloaded{#1}
{}
@@ -199,11 +204,10 @@ Package(s) #2 may be useful instead}
or is superceded by another package.
For a possible alternative, see package(s) #2.}
}
-
\LWR@loadafter{a4}
\LWR@loadafter{a4wide}
\LWR@loadafter{a5comb}
-\LWR@loadafter{abstract}
+\LWR@notmemoirloadafter{abstract}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
\LWR@loadafter{afterpage}
@@ -213,38 +217,44 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{amsthm}
\LWR@loadafter{anonchap}
\LWR@loadafter{anysize}
-\LWR@loadafter{appendix}
+\LWR@notmemoirloadafter{appendix}
\LWR@loadafter{arabicfront}
-\LWR@loadafter{array}
+\LWR@notmemoirloadafter{array}
\LWR@loadafter{atbegshi}
\LWR@loadafter{authblk}
+\LWR@loadafter{backref}
\LWR@loadafter{balance}
\LWR@loadafter{bigdelim}
\LWR@loadafter{bigstrut}
\LWR@loadafter{bookmark}
-\LWR@loadafter{booktabs}
+\LWR@notmemoirloadafter{booktabs}
\LWR@loadafter{boxedminipage}
\LWR@loadafter{boxedminipage2e}
\LWR@loadafter{breakurl}
\LWR@loadafter{cancel}
-\LWR@loadafter{ccaption}
-\LWR@loadafter{changepage}
-\LWR@loadafter{chngpage}
+\LWR@notmemoirloadafter{ccaption}
+\LWR@loadafter{changebar}
+\LWR@notmemoirloadafter{changepage}
+\LWR@notmemoirloadafter{chngpage}
\LWR@loadafter{chappg}
+\LWR@loadafter{cite}
\LWR@loadafter{color}
-\LWR@loadafter{crop}
+\LWR@loadafter{continue}
+\LWR@notmemoirloadafter{crop}
\LWR@loadafter{cuted}
\LWR@loadafter{cutwin}
\LWR@loadafter{dblfnote}
-\LWR@loadafter{dcolumn}
+\LWR@notmemoirloadafter{dcolumn}
\LWR@loadafter{draftwatermark}
\LWR@loadafter{easy-todo}
\LWR@loadafter{ebook}
\LWR@loadafter{ellipsis}
\LWR@loadafter{emptypage}
-\LWR@loadafter{enumerate}
+\LWR@loadafter{endfloat}
+\LWR@loadafter{endnotes}
+\LWR@notmemoirloadafter{enumerate}
\LWR@loadafter{enumitem}
-\LWR@loadafter{epigraph}
+\LWR@notmemoirloadafter{epigraph}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
@@ -257,20 +267,29 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{fix2col}
\LWR@loadafter{fixme}
\LWR@loadafter{fixmetodonotes}
+\LWR@loadafter{flafter}
\LWR@loadafter{float}
\LWR@loadafter{floatflt}
\LWR@loadafter{floatpag}
\LWR@loadafter{floatrow}
+\LWR@loadafter{fltrace}
\LWR@loadafter{flushend}
\LWR@loadafter{fncychap}
\LWR@loadafter{fnpos}
+\LWR@loadafter{footmisc}
+\LWR@loadafter{footnote}
+\LWR@loadafter{footnotehyper}
+\LWR@loadafter{footnpag}
+\LWR@loadafter{framed}
\LWR@loadafter{ftnright}
\LWR@loadafter{fullpage}
\LWR@loadafter{fullwidth}
+\LWR@loadafter{fwlw}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
\LWR@loadafter{grffile}
\LWR@loadafter{hang}
+\LWR@loadafter{hanging}
\LWR@loadafter{hyperref}
\LWR@loadafter{hyperxmp}
\LWR@loadafter{idxlayout}
@@ -292,29 +311,34 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{marginnote}
\LWR@loadafter{mcaption}
\LWR@loadafter{mdframed}
+\LWR@loadafter{memhfixc}
\LWR@loadafter{metalogo}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
-\LWR@loadafter{moreverb}
-\LWR@loadafter{mparhack}
+\LWR@loadafter{midpage}
+\LWR@notmemoirloadafter{moreverb}
+\LWR@notmemoirloadafter{mparhack}
\LWR@loadafter{multirow}
\LWR@loadafter{nameref}
-\LWR@loadafter{needspace}
+\LWR@loadafter{natbib}
+\LWR@notmemoirloadafter{needspace}
\LWR@loadafter{newtxmath}
-\LWR@loadafter{nextpage}
+\LWR@notmemoirloadafter{nextpage}
\LWR@loadafter{nonumonpart}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
\LWR@loadafter{overpic}
-\LWR@loadafter{pagenote}
+\LWR@notmemoirloadafter{pagenote}
+\LWR@loadafter{pagesel}
\LWR@loadafter{paralist}
-\LWR@loadafter{parskip}
+\LWR@notmemoirloadafter{parskip}
\LWR@loadafter{pdflscape}
\LWR@loadafter{pdfsync}
\LWR@loadafter{pfnote}
\LWR@loadafter{placeins}
\LWR@loadafter{prelim2e}
+\LWR@loadafter{prettyref}
\LWR@loadafter{preview}
\LWR@loadafter{quotchap}
\LWR@loadafter{ragged2e}
@@ -332,9 +356,9 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{scrlayer-scrpage}
\LWR@loadafter{section}
\LWR@loadafter{sectsty}
-\LWR@loadafter{setspace}
+\LWR@notmemoirloadafter{setspace}
\LWR@loadafter{shadow}
-\LWR@loadafter{showidx}
+\LWR@notmemoirloadafter{showidx}
\LWR@loadafter{showkeys}
\LWR@loadafter{sidecap}
\LWR@loadafter{sidenotes}
@@ -344,11 +368,13 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{soulutf8}
\LWR@loadafter{stabular}
\LWR@loadafter{subfig}
+\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
\LWR@loadafter{tabls}
-\LWR@loadafter{tabularx}
+\LWR@notmemoirloadafter{tabularx}
\LWR@loadafter{tabulary}
\LWR@loadafter{textarea}
+\LWR@loadafter{textfit}
\LWR@loadafter{textpos}
\LWR@loadafter{theorem}
\LWR@loadafter{threeparttable}
@@ -356,18 +382,19 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{titleps}
\LWR@loadafter{titlesec}
\LWR@loadafter{titletoc}
-\LWR@loadafter{titling}
-\LWR@loadafter{tocbibind}
-\LWR@loadafter{tocloft}
+\LWR@notmemoirloadafter{titling}
+\LWR@notmemoirloadafter{tocbibind}
+\LWR@notmemoirloadafter{tocloft}
\LWR@loadafter{tocstyle}
\LWR@loadafter{todo}
\LWR@loadafter{todonotes}
\LWR@loadafter{transparent}
\LWR@loadafter{trivfloat}
+\LWR@loadafter{turnthepage}
\LWR@loadafter{ulem}
\LWR@loadafter{upref}
\LWR@loadafter{varioref}
-\LWR@loadafter{verse}
+\LWR@notmemoirloadafter{verse}
\LWR@loadafter{wallpaper}
\LWR@loadafter{watermark}
\LWR@loadafter{wrapfig}
@@ -514,7 +541,9 @@ top=1in,bottom=1in,%
}
\newcommand*{\LWR@lookforpackagename}[1]{%
\LWR@findword{\LWR@requirepackagenames}{#1}[\LWR@strresult]%
+\LWR@traceinfo{LWR@lookforpackagename with blanks: !\LWR@strresult!}%
\StrSubstitute[100]{\LWR@strresult}{ }{}[\LWR@strresulttwo]%
+\LWR@traceinfo{LWR@lookforpackagename without blanks: !\LWR@strresulttwo!}%
\IfStrEq{\LWR@strresulttwo}{}%
{}% no filename
{% yes filename
@@ -525,7 +554,12 @@ top=1in,bottom=1in,%
{\LWR@strresult}%
{lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
}%
-{}% no lwarp-* file
+{
+ \StrSubstitute%
+ {\LWR@requirepackagenames}%
+ {\LWR@strresult}%
+ {\LWR@strresulttwo}[\LWR@requirepackagenames]%
+}% no lwarp-* file
}% yes filename
}
\RenewDocumentCommand{\RequirePackage}{o m o}{%
@@ -637,15 +671,22 @@ top=1in,bottom=1in,%
\newread\LWR@copyinfile % open the file to read from
\newcommand*{\LWR@copyfile}[2]{%
+\LWR@traceinfo{LWR@copyfile: copying #1 to #2}
+
\immediate\openout\LWR@copyoutfile=#2
\openin\LWR@copyinfile=#1
\begingroup\endlinechar=-1
\makeatletter
+
+\LWR@traceinfo{LWR@copyfile: about to loop}
+
\loop\unless\ifeof\LWR@copyinfile
+ \LWR@traceinfo{LWR@copyfile: one line}
\read\LWR@copyinfile to\LWR@fileline % Read one line and store it into \LWR@fileline
\immediate\write\LWR@copyoutfile{\unexpanded\expandafter{\LWR@fileline}}%
\repeat
-\closeout\LWR@copyoutfile
+\immediate\closeout\LWR@copyoutfile
+\LWR@traceinfo{LWR@copyfile: done}
\endgroup
}
@@ -678,12 +719,6 @@ top=1in,bottom=1in,%
\end{warpall}
-\begin{warpHTML}
-\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
-\end{warpHTML}
-
\begin{warpall}
\newbool{FormatEPUB}
\boolfalse{FormatEPUB}
@@ -726,7 +761,7 @@ top=1in,bottom=1in,%
\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
\renewcommand*{\LWR@tagparagraph}{h6}
\renewcommand*{\LWR@tagparagraphend}{/h6}
-\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\renewcommand*{\LWR@tagsubparagraphend}{/span}
}% WPTitleHeading
{% not WPTitleHeading, part and section starting at h1
@@ -763,7 +798,7 @@ top=1in,bottom=1in,%
\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
\renewcommand*{\LWR@tagparagraph}{h6}
\renewcommand*{\LWR@tagparagraphend}{/h6}
-\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\renewcommand*{\LWR@tagsubparagraphend}{/span}
}% not WPTitleHeading
}% chapter defined
@@ -818,7 +853,7 @@ top=1in,bottom=1in,%
\let\LWR@origpagestyle\pagestyle
\let\LWR@origthispagestyle\thispagestyle
-\let\LWR@origpagenumbering\pagenumbering
+\LetLtxMacro\LWR@origpagenumbering\pagenumbering
\LetLtxMacro{\LWR@origminipage}{\minipage}
\let\LWR@origendminipage\endminipage
@@ -965,7 +1000,7 @@ homehtmlfilename = "\HomeHTMLFilename"%
\begin{filecontents*}{lwarp.css}
/*
CSS stylesheet for the LaTeX lwarp package
- Copyright 2016-2017 Brian Dunn — BD Tech Concepts LLC
+ Copyright 2016-2018 Brian Dunn — BD Tech Concepts LLC
*/
/* a fix for older browsers: */
@@ -1010,6 +1045,7 @@ body {
}
p {margin: 1.5ex 0em 1.5ex 0em ;}
+table p {margin: .5ex 0em .5ex 0em ;}
/* Holds a section number to add space between it and the name */
span.sectionnumber { margin-right: 0em }
@@ -1380,7 +1416,7 @@ ol {
}
ul, body dir, body menu {
- margin: 1ex 1em 1ex 0em;
+ margin: 3ex 1em 3ex 0em;
line-height: 1.2;
}
@@ -1570,7 +1606,8 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
.mdframedtitle {
padding: .5em ;
display: block ;
- font-size: 130%
+ font-size: 130% ;
+ margin-bottom: 1ex ;
}
.mdframedsubtitle {
@@ -1599,6 +1636,12 @@ div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
display: block ;
}
+.shaded {
+ margin: 3ex 0em 3ex 0em ;
+ padding: .3ex 1em .3ex 1em ;
+ display: block ;
+}
+
.snugframed {
margin: 3ex 0em 3ex 0em ;
border: 1px solid black;
@@ -2676,7 +2719,17 @@ nav.botnavigation {
(require "texindy.xdy")
(require "page-ranges.xdy")
(require "book-order.xdy")
+(require "page-ranges.xdy")
(markup-locref :open "\hyperindexref{" :close "}")
+(define-location-class "arabic-page-numbers"
+ ("arabic-numbers") :min-range-length 1)
+(define-location-class-order ("roman-page-numbers"
+ "arabic-page-numbers"
+ "alpha-page-numbers"
+ "Roman-page-numbers"
+ "Alpha-page-numbers"
+ "see"
+ "seealso"))
\end{filecontents*}
\end{warpprint}
@@ -2750,7 +2803,10 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
MathJax.Hub.Config({
extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
jax: ["input/TeX","output/HTML-CSS"],
- tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
+ tex2jax: {
+ inlineMath: [["$","$"],["\\(","\\)"]] ,
+ processClass: "tabbing|verse"
+ },
TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
});
MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
@@ -2787,11 +2843,11 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
\begin{filecontents*}{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2017 Brian Dunn
+-- Copyright 2016-2018 Brian Dunn
-- Print the usage of the lwarpmk command:
-printversion = "v0.44"
+printversion = "v0.46"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3366,57 +3422,57 @@ end -- not --version
\NewDocumentCommand{\pushclose}{m m}
{
-\let\LWR@closetwelve\LWR@closeeleven
-\let\LWR@closeeleven\LWR@closeten
-\let\LWR@closeten\LWR@closenine
-\let\LWR@closenine\LWR@closeeight
-\let\LWR@closeeight\LWR@closeseven
-\let\LWR@closeseven\LWR@closesix
-\let\LWR@closesix\LWR@closefive
-\let\LWR@closefive\LWR@closefour
-\let\LWR@closefour\LWR@closethree
-\let\LWR@closethree\LWR@closetwo
-\let\LWR@closetwo\LWR@closeone
-\let\LWR@closeone#1
-\let\LWR@closedepthtwelve\LWR@closedeptheleven
-\let\LWR@closedepthelevel\LWR@closedepthten
-\let\LWR@closedepthten\LWR@closedepthnine
-\let\LWR@closedepthnine\LWR@closedeptheight
-\let\LWR@closedeptheight\LWR@closedepthseven
-\let\LWR@closedepthseven\LWR@closedepthsix
-\let\LWR@closedepthsix\LWR@closedepthfive
-\let\LWR@closedepthfive\LWR@closedepthfour
-\let\LWR@closedepthfour\LWR@closedepththree
-\let\LWR@closedepththree\LWR@closedepthtwo
-\let\LWR@closedepthtwo\LWR@closedepthone
-\let\LWR@closedepthone#2
+\global\let\LWR@closetwelve\LWR@closeeleven
+\global\let\LWR@closeeleven\LWR@closeten
+\global\let\LWR@closeten\LWR@closenine
+\global\let\LWR@closenine\LWR@closeeight
+\global\let\LWR@closeeight\LWR@closeseven
+\global\let\LWR@closeseven\LWR@closesix
+\global\let\LWR@closesix\LWR@closefive
+\global\let\LWR@closefive\LWR@closefour
+\global\let\LWR@closefour\LWR@closethree
+\global\let\LWR@closethree\LWR@closetwo
+\global\let\LWR@closetwo\LWR@closeone
+\global\let\LWR@closeone#1
+\global\let\LWR@closedepthtwelve\LWR@closedeptheleven
+\global\let\LWR@closedeptheleven\LWR@closedepthten
+\global\let\LWR@closedepthten\LWR@closedepthnine
+\global\let\LWR@closedepthnine\LWR@closedeptheight
+\global\let\LWR@closedeptheight\LWR@closedepthseven
+\global\let\LWR@closedepthseven\LWR@closedepthsix
+\global\let\LWR@closedepthsix\LWR@closedepthfive
+\global\let\LWR@closedepthfive\LWR@closedepthfour
+\global\let\LWR@closedepthfour\LWR@closedepththree
+\global\let\LWR@closedepththree\LWR@closedepthtwo
+\global\let\LWR@closedepthtwo\LWR@closedepthone
+\global\let\LWR@closedepthone#2
}
\newcommand*{\popclose}
{
-\let\LWR@closeone\LWR@closetwo
-\let\LWR@closetwo\LWR@closethree
-\let\LWR@closethree\LWR@closefour
-\let\LWR@closefour\LWR@closefive
-\let\LWR@closefive\LWR@closesix
-\let\LWR@closesix\LWR@closeseven
-\let\LWR@closeseven\LWR@closeeight
-\let\LWR@closeeight\LWR@closenine
-\let\LWR@closenine\LWR@closeten
-\let\LWR@closeten\LWR@closeeleven
-\let\LWR@closeeleven\LWR@closetwelve
-\let\LWR@closedepthone\LWR@closedepthtwo
-\let\LWR@closedepthtwo\LWR@closedepththree
-\let\LWR@closedepththree\LWR@closedepthfour
-\let\LWR@closedepthfour\LWR@closedepthfive
-\let\LWR@closedepthfive\LWR@closedepthsix
-\let\LWR@closedepthsix\LWR@closedepthseven
-\let\LWR@closedepthseven\LWR@closedeptheight
-\let\LWR@closedeptheight\LWR@closedepthnine
-\let\LWR@closedepthnine\LWR@closedepthten
-\let\LWR@closedepthten\LWR@closedeptheleven
-\let\LWR@closedeptheleven\LWR@closedepthtwelve
+\global\let\LWR@closeone\LWR@closetwo
+\global\let\LWR@closetwo\LWR@closethree
+\global\let\LWR@closethree\LWR@closefour
+\global\let\LWR@closefour\LWR@closefive
+\global\let\LWR@closefive\LWR@closesix
+\global\let\LWR@closesix\LWR@closeseven
+\global\let\LWR@closeseven\LWR@closeeight
+\global\let\LWR@closeeight\LWR@closenine
+\global\let\LWR@closenine\LWR@closeten
+\global\let\LWR@closeten\LWR@closeeleven
+\global\let\LWR@closeeleven\LWR@closetwelve
+\global\let\LWR@closedepthone\LWR@closedepthtwo
+\global\let\LWR@closedepthtwo\LWR@closedepththree
+\global\let\LWR@closedepththree\LWR@closedepthfour
+\global\let\LWR@closedepthfour\LWR@closedepthfive
+\global\let\LWR@closedepthfive\LWR@closedepthsix
+\global\let\LWR@closedepthsix\LWR@closedepthseven
+\global\let\LWR@closedepthseven\LWR@closedeptheight
+\global\let\LWR@closedeptheight\LWR@closedepthnine
+\global\let\LWR@closedepthnine\LWR@closedepthten
+\global\let\LWR@closedepthten\LWR@closedeptheleven
+\global\let\LWR@closedeptheleven\LWR@closedepthtwelve
}
\end{warpHTML}
@@ -3434,6 +3490,21 @@ end -- not --version
\begin{warpHTML}
+\newcommand*{\LWR@sanitized}{}
+
+\newcommand*{\LWR@sanitize}[1]{%
+\LWR@traceinfo{LWR@sanitize: !#1!}%
+\edef\LWR@sanitized{#1}%
+\LWR@traceinfo{LWR@sanitize expanded: !\LWR@sanitized!}%
+\edef\LWR@sanitized{\detokenize\expandafter{\LWR@sanitized}}%
+\LWR@traceinfo{LWR@sanitize result: !\LWR@sanitized!}%
+}
+
+\end{warpHTML}
+
+
+\begin{warpHTML}
+
\let\LWR@origampersand\&
\newcommand*{\HTMLentity}[1]{%
\begingroup%
@@ -3443,7 +3514,7 @@ end -- not --version
}
\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}}
-\renewcommand*{\&}{\HTMLentity{amp}}
+\renewrobustcmd*{\&}{\HTMLentity{amp}}
\let\LWR@origtextless\textless
\renewcommand*{\textless}{\HTMLentity{lt}}
@@ -3477,8 +3548,7 @@ end -- not --version
\setcounter{LWR@htmlfilenumber}{0}
\newcommand*{\LWR@htmlsectionfilename}[1]{%
-\LWR@traceinfo{LWR@htmlsectionfilename A}%
-\LWR@traceinfo{about to assign temp}%
+\LWR@traceinfo{LWR@htmlsectionfilename A !\detokenize{#1}!}%
\edef\LWR@tempone{#1}%
\LWR@traceinfo{about to compare with ??}%
\ifthenelse{\equal{\LWR@tempone}{??}}%
@@ -3511,9 +3581,9 @@ end -- not --version
}
\newcommand*{\LWR@htmlrefsectionfilename}[1]{%
-\LWR@traceinfo{LWR@htmlrefsectionfilename A: !#1!}%
+\LWR@traceinfo{LWR@htmlrefsectionfilename: !\detokenize{#1}!}%
\LWR@htmlsectionfilename{\LWR@htmlfileref{#1}}%
-\LWR@traceinfo{LWR@htmlrefsectionfilename B}%
+\LWR@traceinfo{LWR@htmlrefsectionfilename: done}%
}
\end{warpHTML}
@@ -3541,16 +3611,26 @@ end -- not --version
\begin{warpHTML}
-\newcommand*{\PrintStack}{
+\newcommand*{\LWR@subprintstack}{
+\LWR@closedepthone\ \LWR@closedepthtwo\ \LWR@closedepththree\
+\LWR@closedepthfour\ \LWR@closedepthfive\ \LWR@closedepthsix\
+\LWR@closedepthseven\ \LWR@closedeptheight\ \LWR@closedepthnine\
+\LWR@closedepthten\ \LWR@closedeptheleven\ \LWR@closedepthtwelve\
+}
+
+\newcommand*{\LWRPrintStack}{
\LWR@startpars
-\LWR@closedepthone{} \LWR@closedepthtwo{} \LWR@closedepththree{}
-\LWR@closedepthfour{} \LWR@closedepthfive{} \LWR@closedepthsix{}
-\LWR@closedepthseven{} \LWR@closedeptheight{} \LWR@closedepthnine{}
-\LWR@closedepthten{} \LWR@closedeptheleven{} \LWR@closedepthtwelve{}
+\LWR@subprintstack
}
\end{warpHTML}
+\begin{warpprint}
+
+\newcommand*{\LWRPrintStack}{}
+
+\end{warpprint}
+
\begin{warpHTML}
@@ -3562,9 +3642,19 @@ end -- not --version
}
\newcommand*{\LWR@closeprevious}[1]{
-\LWR@stoppars
-\whileboolexpr{not test{\ifnumcomp{\LWR@closedepthone}{<}{#1}}}%
- {\LWR@closeoneprevious}
+\LWR@traceinfo{LWR@closeprevious to depth #1, depths are \LWR@subprintstack}%
+\LWR@stoppars%
+\whileboolexpr{test{\ifnumcomp{\LWR@closedepthone}{>}{#1}}}%
+{%
+ \LWR@traceinfo{LWR@closeprevious: closing out depth \LWR@closedepthone}%
+ \LWR@closeoneprevious%
+}%
+\ifboolexpr{test{\ifnumcomp{\LWR@closedepthone}{=}{#1}}}%
+{%
+ \LWR@traceinfo{LWR@closeprevious: closing out depth \LWR@closedepthone}%
+ \LWR@closeoneprevious%
+}{}%
+\LWR@traceinfo{LWR@closeprevious: done, depths are \LWR@subprintstack}%
}
\end{warpHTML}
@@ -3574,7 +3664,9 @@ end -- not --version
\begin{warpHTML}
\newcommand{\LWR@forcenewpage}{%
+\ifinner\else%
\LWR@stoppars\LWR@orignewpage\LWR@startpars%
+\fi%
}
\renewcommand*{\pagestyle}[1]{}
\renewcommand*{\thispagestyle}[1]{}
@@ -3584,7 +3676,7 @@ end -- not --version
\renewcommand*{\flushbottom}{}
\renewcommand*{\sloppy}{}
\renewcommand*{\fussy}{}
-\renewcommand*{\pagenumbering}[1]{}
+\RenewDocumentCommand{\pagenumbering}{s m}{}
\end{warpHTML}
@@ -3603,9 +3695,9 @@ end -- not --version
\newcommand*{\LWR@tagsubsectionend}{/h5}
\newcommand*{\LWR@tagsubsubsection}{h6}
\newcommand*{\LWR@tagsubsubsectionend}{/h6}
-\newcommand*{\LWR@tagparagraph}{span class="paragraph"{}}
+\newcommand*{\LWR@tagparagraph}{span class="paragraph"}
\newcommand*{\LWR@tagparagraphend}{/span}
-\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\newcommand*{\LWR@tagsubparagraph}{span class="subparagraph"}
\newcommand*{\LWR@tagsubparagraphend}{/span}
\newcommand*{\LWR@tagregularparagraph}{p}
@@ -3619,19 +3711,19 @@ end -- not --version
{%
\frenchbsetup{FrenchFootnotes=false}%
\LetLtxMacro\LWR@FBcancel\NoAutoSpacing%
- \renewcommand*{\FBcolonspace}{%
+ \renewrobustcmd*{\FBcolonspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;%
\endgroup%
}%
- \renewcommand*{\FBthinspace}{%
+ \renewrobustcmd*{\FBthinspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand\#x202f;% \,
\endgroup%
}%
- \renewcommand*{\FBguillspace}{%
+ \renewrobustcmd*{\FBguillspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;% ~, for \og xyz \fg{}
@@ -3649,7 +3741,7 @@ end -- not --version
\LWR@origampersand{}nbsp;% ~
\endgroup%
}%
- \renewcommand*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
+ \renewrobustcmd*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
\ifFBunicode%
\else%
\DeclareTextSymbol{\FBtextellipsis}{LY1}{133}%
@@ -3661,10 +3753,13 @@ end -- not --version
\newcommand*{\LWR@htmltagc}[1]{%
{%
+\LWR@traceinfo{LWR@htmltagc !\detokenize{#1}!}%
\begingroup%
\LWR@FBcancel%
\ifmmode\else\protect\LWR@origttfamily\fi%
-\protect\LWR@origtextless#1\protect\LWR@origtextgreater%
+\protect\LWR@origtextless%
+#1%
+\protect\LWR@origtextgreater%
\endgroup%
}%
}
@@ -3676,7 +3771,7 @@ end -- not --version
\newenvironment*{LWR@nestspan}
{%
-\LWR@traceinfo{LWR@nestspan}%
+\LWR@traceinfo{LWR@nestspan starting}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{%
\LWR@traceinfo{LWR@nestspan: inside a lateximage}%
@@ -3693,12 +3788,14 @@ end -- not --version
}%
\renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}%
}% not in a lateximage
+\LWR@traceinfo{LWR@nestspan starting: done}%
}% starting env
{% ending env
+\LWR@traceinfo{LWR@nestspan ending}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{\addtocounter{LWR@spandepth}{-1}}%
-\LWR@traceinfo{LWR@nestspan: done}%
+\LWR@traceinfo{LWR@nestspan ending: done}%
}
\AfterEndEnvironment{LWR@nestspan}{\global\let\par\LWR@closeparagraph}
@@ -3724,14 +3821,8 @@ end -- not --version
}
-\newcommand*{\LWR@htmltagb}[1]{%
+\newcommand*{\LWR@htmltag}[1]{%
\LWR@htmltagc{#1}%
-\endgroup%
-}
-
-\newcommand*{\LWR@htmltag}{%
-\begingroup\catcode`\_=12
-\LWR@htmltagb%
}
@@ -3762,14 +3853,8 @@ end -- not --version
#1%
}%
\LWR@htmlclosecomment{}}
-\newcommand{\LWR@htmlblockcommentb}[1]
-{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars\endgroup}
-
-\newcommand{\LWR@htmlblockcomment}
-{%
-\begingroup\catcode`\_=12
-\LWR@htmlblockcommentb%
-}
+\newcommand{\LWR@htmlblockcomment}[1]
+{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars}
\newcommand*{\LWR@htmlblocktag}[1]{%
\LWR@stoppars%
@@ -3835,12 +3920,8 @@ end -- not --version
\begin{warpHTML}
\NewDocumentEnvironment{BlockClass}{o m}%
-{
-\LWR@htmldivclass[#1]{#2}
-}
-{
-\LWR@htmldivclassend{#2}
-}
+{\LWR@htmldivclass[#1]{#2}}
+{\LWR@htmldivclassend{#2}}
\end{warpHTML}
\begin{warpprint}
\NewDocumentEnvironment{BlockClass}{o m}{}{}%
@@ -3869,10 +3950,10 @@ end -- not --version
\LWR@stoppars%
\ifbool{FormatWP}%
{%
- \LWR@maybeincthisautoid%
+ \addtocounter{LWR@thisautoidWP}{1}%
\LWR@htmltag{%
div class="#3" %
- id="autoid-\arabic{LWR@thisautoid}"%
+ id="autoidWP-\arabic{LWR@thisautoidWP}"%
\ifblank{#1}{}{ style="#1"}%
}%
}% FormatWP
@@ -3950,11 +4031,6 @@ end -- not --version
{}% no nested par tags
{% yes nest par tags
\LWR@htmltagc{\LWR@tagregularparagraph}%
- \ifnumcomp{\@listdepth}{>}{0}%
- {%
- \LWR@orighspace{1in}%
- }%
- {}%
\global\booltrue{LWR@doingapar}%
\let\par\LWR@closeparagraph%
}% end of yes nest par tags
@@ -3991,7 +4067,21 @@ end -- not --version
{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
{}%
}% not handling pars
-\LWR@origpar%
+\ifboolexpr{%
+ not bool {LWR@doingapar} and
+ test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and
+ test {
+ \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}}
+ } and
+ bool {LWR@intabularmetadata} and
+ not bool {LWR@tableparcell} and
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}}
+}%
+{%
+ \LWR@getmynexttoken%
+}{%
+ \LWR@origpar%
+}%
}
\end{warpHTML}
@@ -4001,6 +4091,7 @@ end -- not --version
\newcommand*{\LWR@startpars}%
{%
+\LWR@traceinfo{LWR@startpars}%
\ifnumcomp{\value{LWR@spandepth}}{>}{0}%
{}%
{%
@@ -4014,6 +4105,7 @@ end -- not --version
\global\setbool{LWR@doingstartpars}{true}%
\global\boolfalse{LWR@doingapar}%
}% nestspan
+\LWR@traceinfo{LWR@startpars: done}%
}
\newcommand*{\LWR@stoppars}%
@@ -4047,30 +4139,14 @@ end -- not --version
\newcommand{\LWR@firstpagetop}{} % for the home page alone
\newcommand{\LWR@pagetop}{} % for all other pages
\newcommand{\LWR@pagebottom}{}
-
-\newcommand{\LWR@setfirstpagetopb}[1]{%
-\renewcommand{\LWR@firstpagetop}{#1}
-\catcode`\_=8
+\newcommand{\HTMLFirstPageTop}[1]{%
+ \renewcommand{\LWR@firstpagetop}{#1}%
}
-\newcommand{\HTMLFirstPageTop}{%
-\catcode`\_=12
-\LWR@setfirstpagetopb
+\newcommand{\HTMLPageTop}[1]{%
+ \renewcommand{\LWR@pagetop}{#1}%
}
-\newcommand{\LWR@setpagetopb}[1]{%
-\renewcommand{\LWR@pagetop}{#1}
-\catcode`\_=8
-}
-\newcommand{\HTMLPageTop}{%
-\catcode`\_=12
-\LWR@setpagetopb
-}
-\newcommand{\LWR@setpagebottomb}[1]{%
-\renewcommand{\LWR@pagebottom}{#1}
-\catcode`\_=8
-}
-\newcommand{\HTMLPageBottom}{%
-\catcode`\_=12
-\LWR@setpagebottomb
+\newcommand{\HTMLPageBottom}[1]{%
+ \renewcommand{\LWR@pagebottom}{#1}%
}
\end{warpall}
@@ -4081,15 +4157,11 @@ end -- not --version
\newcommand*{\LWR@currentcss}{lwarp.css}
-\newcommand*{\LWR@newcssb}[1]{%
-\renewcommand*{\LWR@currentcss}{#1}
-\catcode`\_=8
+\newcommand*{\CSSFilename}[1]{%
+\renewcommand*{\LWR@currentcss}{#1}%
+\@onelevel@sanitize\LWR@currentcss%
}
-\newcommand*{\CSSFilename}{
-\catcode`\_=12
-\LWR@newcssb
-}
\end{warpHTML}
\begin{warpprint}
\newcommand*{\CSSFilename}[1]{}
@@ -4137,7 +4209,7 @@ end -- not --version
\begin{warpHTML}
\newbox\LWR@footnotes
-\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1}
+\long\def\@makefntext#1{\textsuperscript{\@thefnmark}~#1}
\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}
\long\def\LWR@footnotetext#1{%
\LWR@traceinfo{LWR@footnotetext}%
@@ -4169,9 +4241,10 @@ end -- not --version
}%
\let\@footnotetext\LWR@footnotetext
+\newbox\LWR@mpfootnotes
\long\def\@mpfootnotetext#1{%
-\global\setbox\@mpfootins\vbox{%
- \unvbox\@mpfootins
+\global\setbox\LWR@mpfootnotes\vbox{%
+ \unvbox\LWR@mpfootnotes
\reset@font\footnotesize
\hsize\columnwidth
\@parboxrestore
@@ -4216,6 +4289,17 @@ end -- not --version
{}%
}
+\newcommand*{\LWR@printpendingmpfootnotes}{%
+\ifvoid\LWR@mpfootnotes\else
+ \LWR@forcenewpage
+ \begin{BlockClass}{footnotes}
+ \LWR@origvspace*{\baselineskip}
+ \unvbox\LWR@mpfootnotes
+ \setbox\LWR@mpfootnotes=\vbox{}
+ \end{BlockClass}
+\fi
+}
+
\end{warpHTML}
\begin{warpHTML}
@@ -4244,7 +4328,8 @@ end -- not --version
\end{BlockClass}
}%
}
-
+\renewcommand*{\reversemarginpar}{}
+\renewcommand*{\normalmarginpar}{}
\end{warpHTML}
\begin{warpprint}
@@ -4271,10 +4356,12 @@ end -- not --version
\newcommand*{\LWR@filenamenoblanks}[1]{%
\begingroup
-\LWR@nullfonts
+\LWR@nullfonts%
\renewcommand*{\LWR@htmltagc}[1]{}%
-\edef\LWR@thisnewfilename{#1}
-\fullexpandarg
+\LWR@traceinfo{LWR@filenamenoblanks \#1: !#1!}%
+\edef\LWR@thisnewfilename{#1}%
+\LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}%
+\fullexpandarg%
\StrSubstitute{\LWR@thisnewfilename}{ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename]
@@ -4294,6 +4381,8 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}%
{\textgreater}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\#}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{\_}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\{}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\}}{-}[\LWR@thisnewfilename]
@@ -4301,6 +4390,7 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}%
{\textbackslash}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{~}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{[}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{]}{-}[\LWR@thisnewfilename]
@@ -4334,6 +4424,7 @@ end -- not --version
}
\newcommand*{\LWR@newhtmlfile}[1]{
+\LWR@traceinfo{LWR@newhtmlfile: !#1!}
\LWR@htmlelementclassend{section}{textbody}
@@ -4364,6 +4455,7 @@ end -- not --version
{\LWR@filenamenoblanks{#1}}
{\renewcommand*{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}}
+\LWR@traceinfo{LWR@newhtmlfile: about to print start file}%
\LWR@htmlblockcomment{%
|Start file|%
\LWR@htmlsectionfilename{\LWR@thisfilename}|%
@@ -4400,6 +4492,7 @@ end -- not --version
\LWR@stoppars
\setcounter{LWR@latestautopage}{\value{page}}
+\LWR@traceinfo{LWR@newhtmlfile: done}
}
\end{warpHTML}
@@ -4441,10 +4534,13 @@ end -- not --version
}
\newcommand*{\LWR@createautosec}[1]{%
-\LWR@htmltag{#1 id="autosec-\thepage"{}}%
+\LWR@htmltag{#1 id="autosec-\arabic{page}"}%
}
-\NewDocumentCommand{\LWR@pushoneclose}{m m}{\pushclose{#2}{#1}}
+\NewDocumentCommand{\LWR@pushoneclose}{m m}{%
+\LWR@traceinfo{LWR@pushoneclose #1}%
+ \pushclose{#2}{#1}%
+}
\NewDocumentCommand{\LWR@startnewdepth}{m m}{%
\LWR@closeprevious{#1}%
@@ -4462,7 +4558,7 @@ end -- not --version
\LWR@stoppars%
\global\boolfalse{LWR@minipagethispar}%
\LWR@traceinfo{LWR@section: testing whether to start a new HTML file}%
-\IfBooleanTF{#1}{\LWR@traceinfo{LWR@section: starred}}{}%
+\IfBooleanT{#1}{\LWR@traceinfo{LWR@section: starred}}%
\ifbool{LWR@forcinghtmlpage}{\LWR@traceinfo{LWR@section: forcinghtmlpage}}{}%
\ifthenelse{%
\(%
@@ -4478,7 +4574,11 @@ end -- not --version
\cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}%
\)%
\AND%
- \NOT\isempty{#3}% phantomsection
+ \(% phantomsection
+ \NOT\isempty{#3}%
+ \OR%
+ \(\NOT\equal{#1}{\BooleanTrue}\)%
+ \)%
}%
{% new file
\LWR@traceinfo{LWR@section: new HTML file}%
@@ -4487,7 +4587,7 @@ end -- not --version
{\LWR@newhtmlfile{#2}}%
}% new file
{% not new file
- \LWR@traceinfo{LWR@section: not a new HTML file}%
+ \LWR@traceinfo{LWR@section: not a new HTML file, about to LWR@orignewpage}%
\LWR@orignewpage%
}% not new file
@@ -4508,10 +4608,12 @@ end -- not --version
}%
{\LWR@startpars}%
{}%
+\LWR@traceinfo{LWR@section: about to LWR@createautosec}%
\LWR@createautosec{\csuse{LWR@tag#4}}%
\setcounter{LWR@currentautosec}{\value{page}}
\IfBooleanTF{#1}%
{%
+\LWR@traceinfo{LWR@section: starred}%
\ifbool{LWR@forcinghtmltoc}%
{\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}}%
{}%
@@ -4564,8 +4666,11 @@ end -- not --version
\LWR@traceinfo{LWR@section: finished print section number}%
}{}%
}% end of not starred
+\LWR@traceinfo{LWR@section: about to print the section name}%
#3%
+\LWR@traceinfo{LWR@section: about to close the heading tag}%
\LWR@htmltag{\csuse{LWR@tag#4end}}%
+\LWR@traceinfo{LWR@section: about to create the LaTeX label}%
\label{autopage-\theLWR@currentautosec}%
\ifthenelse{%
\cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}%
@@ -4611,14 +4716,18 @@ end -- not --version
\@ifundefined{chapter}
{}
{%
-\DeclareDocumentCommand{\chapter}{s o m}{%
-\LWR@traceinfo{chapter #3}%
+\DeclareDocumentCommand{\chapter}{s o o m}{%
+\IfValueTF{#2}{
+\LWR@traceinfo{chapter #2}%
+}{
+\LWR@traceinfo{chapter #4}%
+}
\LWR@maybeprintpendingfootnotes{\LWR@depthchapter}%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}%
-\LWR@section{#1}{#2}{#3}{chapter}%
+\LWR@section{#1}{#2}{#4}{chapter}%
\@printcites% for quotchap package
@@ -4627,13 +4736,18 @@ end -- not --version
}
}
-\DeclareDocumentCommand{\section}{s o m}{%
+\DeclareDocumentCommand{\section}{s o o m}{%
+\IfValueTF{#2}{
+\LWR@traceinfo{section #2}%
+}{
+\LWR@traceinfo{section #4}%
+}
\LWR@maybeprintpendingfootnotes{\LWR@depthsection}%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthsection}{\LWR@printclosesection}%
-\LWR@section{#1}{#2}{#3}{section}%
+\LWR@section{#1}{#2}{#4}{section}%
}
\DeclareDocumentCommand{\subsection}{s o m}{%
@@ -4697,7 +4811,7 @@ end -- not --version
\LWR@traceinfo{LWR@filestart: B}
\LWR@htmltag{!DOCTYPE html}\LWR@orignewline
\LWR@traceinfo{LWR@filestart: C}
-\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"{}}\LWR@orignewline
+\LWR@htmltag{html lang="\LWR@currentHTMLLanguage"}\LWR@orignewline
\LWR@htmltag{head}\LWR@orignewline
\LWR@htmltag{meta charset="UTF-8" /}\LWR@orignewline
\ifthenelse{\equal{\theHTMLAuthor}{}}%
@@ -4715,7 +4829,7 @@ content="width=device-width, initial-scale=1.0" /}%
\LWR@orignewline
\LWR@htmltag{!{-}{-}[if lt IE 9]}\LWR@orignewline
\LWR@htmltag{%
-script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"{}}%
+script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"}%
\LWR@htmltag{/script}\LWR@orignewline
\LWR@htmltag{![endif]{-}{-}}\LWR@orignewline
\ifthenelse{\equal{\theHTMLTitle}{}}%
@@ -4759,7 +4873,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\edef\LWR@strresult{\HTMLFilename}
\edef\HTMLFilename{\detokenize\expandafter{\LWR@strresult}}
\LWR@origonecolumn%
-\LWR@origpagestyle{empty}
+\LWR@origpagestyle{empty}%
\LWR@origscriptsize%
\LWR@origraggedright%
\LetLtxMacro{\\}{\LWR@endofline}%
@@ -4788,6 +4902,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\ConTeXt\LWR@ConTeXt
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
+\mainmatter
+\LWR@origpagenumbering{arabic}
\LWR@traceinfo{LWR@lwarpStart: Starting new file.}
\LWR@filestart{}
\LWR@traceinfo{LWR@lwarpStart: Generating first header.}
@@ -4797,9 +4913,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@stoppars
\LWR@htmltag{/header}\LWR@orignewline
\LWR@traceinfo{LWR@lwarpStart: Generating textbody.}
-\LWR@htmltag{section class="textbody"{}}
-\mainmatter
-\LWR@origpagenumbering{arabic}
+\LWR@htmltag{section class="textbody"}
\LWR@patchlists
\catcode`\$=\active
\LWR@startpars
@@ -4865,7 +4979,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}% AtBeginDocument
\end{warpprint}
\begin{warpHTML}
-\renewenvironment*{titlepage}
+\DeclareDocumentEnvironment{titlepage}{}
{
\renewrobustcmd{\affiliation}[1]{\\ \InlineClass{affiliation}{##1}}
\LWR@printpendingfootnotes
@@ -4930,6 +5044,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\printdate}{{\small\textit{\@date}}}
\end{warpprint}
\begin{warpHTML}
+\@ifclassloaded{memoir}
+{
+\newcommand{\LWR@setfootnoteseries}{%
+ \renewcommand\thefootnote{\@arabic\c@footnote}%
+}
+}{% not memoir
\if@titlepage
\newcommand{\LWR@setfootnoteseries}{%
\renewcommand\thefootnote{\@arabic\c@footnote}%
@@ -4939,11 +5059,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
}
\fi
+}% not memoir
\newcommand*{\LWR@maketitlesetup}{%
\LWR@setfootnoteseries%
\def\@makefnmark{\textsuperscript{\thefootnote}}
\long\def\@makefntext##1{%
-\textsuperscript{\@thefnmark} \LWR@orighspace{1in}
+\textsuperscript{\@thefnmark}~%
##1%
}%
}
@@ -5118,7 +5239,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifbool{LWR@verbtags}{%
\LWR@htmltag{pre class="#2"
\ifthenelse{\equal{#1}{}}{}{style="#1"}%
-}% pre
+}\LWR@orignewline% pre
}{}%
\begingroup%
\LWR@origttfamily%
@@ -5128,8 +5249,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@afterendverbatim}{%
+
\endgroup%
-\unskip%
\ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/pre}
}{}%
@@ -5148,8 +5269,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\AfterEndPreamble{
\LWR@traceinfo{Patching verbatim.}
\AtBeginEnvironment{verbatim}{%
-\LWR@forcenewpage
-\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@forcenewpage%
+\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
}
\AfterEndEnvironment{verbatim}{%
\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
@@ -5175,14 +5296,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand{\@begintheorem}[2]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
-\InlineClass{theoremlabel}{#1\ #2\ }
+\trivlist
+\item[\InlineClass{theoremlabel}{#1\ #2\ }]\itshape
}
\renewcommand{\@opargbegintheorem}[3]{%
\LWR@forcenewpage
\BlockClass{theoremcontents}
-\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }
+\trivlist
+\item[\InlineClass{theoremlabel}{#1\ #2\ (#3)\ }]\itshape
}
\renewcommand*{\@endtheorem}{%
+\endtrivlist
\endBlockClass% theoremcontents
}
@@ -5193,6 +5317,45 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printcloselist}{\LWR@printcloseitemize}
\newcommand*{\LWR@printopenlist}{ul style="list-style-type:none"}
+
+\def\@mklab#1{%
+ #1}
+
+\def\@donoparitem{%
+ \@noparitemfalse
+}
+\def\@item[#1]{%
+ \if@noparitem
+ \@donoparitem
+ \else
+ \par
+ \ifhmode
+ \par
+ \fi
+ \if@newlist
+ \if@nobreak
+ \@nbitem
+ \else
+ \fi
+ \else
+ \fi
+ \global\@inlabeltrue
+ \fi
+ \@minipagefalse
+ \global\@newlistfalse
+ \if@noitemarg
+ \@noitemargfalse
+ \if@nmbrlist
+ \refstepcounter\@listctr
+ \fi
+ \fi
+ #1
+ \ignorespaces%
+}
+
+\def\@nbitem{%
+}
+
\newcommand*{\LWR@listitem}{%
\LWR@stoppars%
\LWR@startnewdepth{\LWR@depthlistitem}{\LWR@printcloselistitem}%
@@ -5202,6 +5365,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand*{\LWR@liststart}{%
+\LWR@traceinfo{LWR@liststart}%
\LWR@stoppars%
\LWR@pushoneclose{\LWR@depthlist}{\LWR@printcloselist}%
\LWR@htmltag{\LWR@printopenlist}\LWR@orignewline%
@@ -5216,11 +5380,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setlength{\itemindent}{0pt}%
\setlength{\labelsep}{1em}%
}
-
\newcommand*{\LWR@listend}{%
+\LWR@traceinfo{LWR@listend}%
\LWR@stoppars%
-\LWR@closeprevious{\LWR@depthlistitem}%
-\LWR@closeoneprevious%
+\LWR@closeprevious{\LWR@depthlist}%
\LWR@startpars%
}
@@ -5256,7 +5419,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LetLtxMacro{\hspace}{\LWR@nohspace}%
\LWR@origitem[]%
\LetLtxMacro{\hspace}{\LWR@hspace}%
-\LWR@orighspace{1in}
\LWR@htmltag{dt}#1\LWR@htmltag{/dt}%
\LWR@orignewline%
\LWR@htmltag{dd}%
@@ -5277,11 +5439,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@patchlists}{%
\let\item\LWR@listitem%
\renewcommand*{\@trivlist}{%
+ \LWR@traceinfo{@trivlist start}%
\LWR@liststart%
\LWR@orig@trivlist%
+ \LWR@traceinfo{@trivlist done}%
+ }%
+ \renewcommand*{\endtrivlist}{%
+ \LWR@traceinfo{endtrivlist start}%
+ \LWR@origendtrivlist\LWR@listend%
+ \LWR@traceinfo{endtrivlist done}%
}%
- \renewcommand*{\endtrivlist}{\LWR@origendtrivlist\LWR@listend}%
\renewcommand*{\trivlist}{%
+ \LWR@traceinfo{trivlist}%
\LWR@origtrivlist%
\def\makelabel####1{\LWR@orighspace{3em}####1}%
}%
@@ -5356,6 +5525,33 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newbool{LWR@intabularmetadata}
\boolfalse{LWR@intabularmetadata}
+\newcounter{LWR@tabulardepth}
+\setcounter{LWR@tabulardepth}{0}
+\newcounter{LWR@tabularpardepth}
+\setcounter{LWR@tabularpardepth}{0}
+\newcommand*{\LWR@colsresult}{}%temp storage for column format results
+\newcommand*{\LWR@pposition}{}
+\newcommand*{\LWR@pleft}{}
+\newcommand*{\LWR@pright}{}
+
+\newcommand*{\LWR@tablecolspec}{}
+
+\providecommand*{\LWR@strresult}{}
+\providecommand*{\LWR@strresulttwo}{}
+
+\newcommand*{\LWR@origcolspec}{}
+
+\newcounter{LWR@tablecolspecwidth}
+
+\newcounter{LWR@tablecolspecindex}
+
+\newcounter{LWR@tablecolindex}
+
+\newcounter{LWR@tabletotalcols}
+
+\newcounter{LWR@tabletotalcolsnext}
+
+
\newcommand*{\LWR@insertatbangcols}{%
\ifbool{LWR@skipatbang}%
@@ -5396,20 +5592,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@skippingmcolrowcell}%
\global\boolfalse{LWR@skipatbang}%
}
-
-\newcounter{LWR@tabulardepth}
-\setcounter{LWR@tabulardepth}{0}
-
\let\LWR@origampmacro&
\end{warpHTML}
\begin{warpall}
\newcommand{\StartDefiningTabulars}{%
-\LWR@traceinfo{StartDefiningTabulars}
+\LWR@traceinfo{StartDefiningTabulars}%
\warpHTMLonly{\catcode`\&=\active}%
}
\newcommand{\EndDefiningTabulars}{%
-\LWR@traceinfo{EndDefiningTabulars}
+\LWR@traceinfo{EndDefiningTabulars}%
\warpHTMLonly{\catcode`\&=4}%
}
@@ -5487,30 +5679,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@getmynexttoken%
}
-
-\newcommand*{\LWR@colsresult}{}%temp storage for column format results
-\newcommand*{\LWR@pposition}{}
-\newcommand*{\LWR@pleft}{}
-\newcommand*{\LWR@pright}{}
-
-\newcommand*{\LWR@tablecolspec}{}
-
-\providecommand*{\LWR@strresult}{}
-\providecommand*{\LWR@strresulttwo}{}
-
-\newcommand*{\LWR@origcolspec}{}
-
-\newcounter{LWR@tablecolspecwidth}
-
-\newcounter{LWR@tablecolspecindex}
-
-\newcounter{LWR@tablecolindex}
-
-\newcounter{LWR@tabletotalcols}
-
-\newcounter{LWR@tabletotalcolsnext}
-
-
\newcommand*{\LWR@colparameter}{}
\newcommand*{\LWR@parseatcolumn}{%
\LWR@traceinfo{at column}%
@@ -5710,12 +5878,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printbartag}[1]{%
+\LWR@traceinfo{LWR@printbartag !#1!}%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
{}% muting or empty
{% not muting
\edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
\ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
}% not muting
+\LWR@traceinfo{LWR@printbartag done}%
}
@@ -5762,6 +5932,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@tabledatasinglecolumntag}%
{%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag}%
\LWR@maybenewtablerow%
\ifbool{LWR@intabularmetadata}%
{%
@@ -5769,6 +5940,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{% not exiting tabular
\LWR@tabularleftedge%
\StrChar{\LWR@tablecolspec}{\arabic{LWR@tablecolindex}}[\LWR@strresult]%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: about to print td tag}%
\LWR@htmltag{td class="td%
\LWR@strresult%
\LWR@addcmidruletrim%
@@ -5781,6 +5953,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addformatwpalignment{\LWR@thiscolspec}%
\LWR@tdendstyles%
}%
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
\ifboolexpr{%
test{ \ifdefstring{\LWR@strresult}{p} } or
test{ \ifdefstring{\LWR@strresult}{m} } or
@@ -5791,8 +5964,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
test{ \ifdefstring{\LWR@strresult}{X} }
}%
{% allow pars
- \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}%
\global\booltrue{LWR@tableparcell}%
+ \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done with LWR@startpars}%
}% allow pars
{}% no pars
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
@@ -5803,6 +5978,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\boolfalse{LWR@intabularmetadata}%
}% not exiting tabular
}{}% in tabular metadata
+\LWR@traceinfo{LWR@tabledatasinglecolumntag: done}%
}%
@@ -6272,6 +6448,10 @@ rowspan="#2" %
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\hline}%
{\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\firsthline}%
+ {\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\lasthline}%
+ {\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\toprule}%
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\midrule}%
@@ -6292,7 +6472,11 @@ rowspan="#2" %
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\rdelim}%
{\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\par}%
+ {\let\mynext\LWR@donothing}{}%
+\LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}%
\mynext%
+\LWR@traceinfo{LWR@tabledatacolumntag: done}%
}
\end{warpHTML}
@@ -6432,11 +6616,13 @@ rowspan="#2" %
\global\boolfalse{LWR@emptyatbang}%
\StartDefiningTabulars%
\protected\gdef&{\LWR@tabularampersand}%
+\addtocounter{LWR@tabularpardepth}{1}%
\LWR@traceinfo{LWR@tabular: about to LWR@getmynexttoken}%
\LWR@getmynexttoken%
}%
{%
\LWR@traceinfo{LWR@tabular ending}%
+\addtocounter{LWR@tabularpardepth}{-1}%
\ifboolexpr{%
test {%
\ifnumcomp{\value{LWR@tablecolindex}}{<}{\value{LWR@tabletotalcols}}
@@ -6469,8 +6655,6 @@ rowspan="#2" %
\end{warpHTML}
-
-
\begin{warpHTML}
@@ -6498,7 +6682,8 @@ rowspan="#2" %
\zref@addprop{special}{zLWR@lateximagedepth}
\zref@addprop{special}{zLWR@lateximagenumber}
\newcommand*{\LWR@spref}[2]{%
-\zref@extractdefault{#1}{#2}{??}}
+\zref@extractdefault{#1}{#2}{??}%
+}
\newcommand*{\LWR@nameref}[1]{%
\LWR@spref{#1}{zLWR@name}%
}
@@ -6512,40 +6697,44 @@ rowspan="#2" %
\LWR@spref{#1}{zLWR@lateximagenumber}%
}
\newcommand*{\LWR@splabel}[1]{%
+\LWR@traceinfo{LWR@splabel !#1!}%
\LWR@setlatestname{\@currentlabelname}%
-\zref@labelbylist{#1}{special}}
+\zref@labelbylist{#1}{special}%
+}
-\newcommand*{\LWR@subsublabel}[1]{%
+\newcommand*{\LWR@sublabel}[1]{%
+\LWR@traceinfo{LWR@sublabel !#1!}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{% not lateximage
+ \LWR@sanitize{#1}%
\ifbool{LWR@doingstartpars}%
{% pars allowed
- \ifbool{LWR@doingapar}
+ \ifbool{LWR@doingapar}%
{% par started
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
}% par started
{% par not started
\LWR@stoppars%
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
\LWR@startpars%
}% par not started
}% pars allowed
{% pars not allowed
- \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@htmltag{a id="\LWR@sanitized"}\LWR@htmltag{/a}%
}% pars not allowed
}% not lateximage
}
-\NewDocumentCommand{\LWR@newlabel}{m o}{%
+\NewDocumentCommand{\LWR@newlabel}{d() m o}{%
\LWR@traceinfo{LWR@newlabel: starting}%
-\LWR@traceinfo{LWR@newlabel: !#1!}%
-\LWR@origlabel{#1}%
+\LWR@traceinfo{LWR@newlabel: !#2!}%
+\LWR@origlabel{#2}%
\LWR@traceinfo{LWR@newlabel: filesectionnames is \ifbool{FileSectionNames}{true}{false}}%
\LWR@traceinfo{LWR@newlabel: LWR@thisfilename is !\LWR@thisfilename!}%
\LWR@traceinfo{LWR@newlabel: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}}%
-\LWR@splabel{#1}%
-\LWR@subsublabel{#1}%
+\LWR@splabel{#2}%
+\LWR@sublabel{#2}%
\LWR@traceinfo{LWR@newlabel: done}%
}
@@ -6553,6 +6742,7 @@ rowspan="#2" %
\newcommand*{\LWR@startref}[1]
{%
\edef\LWR@lidref{\LWR@lateximagedepthref{#1}}%
+\LWR@sanitize{#1}%
\LWR@traceinfo{LWR@startref A: !#1!}%
\LWR@htmltag{a href="%
\LWR@traceinfo{LWR@startref B}%
@@ -6574,11 +6764,11 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@startref D3}%
- #1%
+ \LWR@sanitized%
}%
}%
\LWR@traceinfo{LWR@startref E}%
-"{}}%
+"}%
\LWR@traceinfo{LWR@startref F}%
}
@@ -6590,7 +6780,7 @@ rowspan="#2" %
}
\NewDocumentCommand{\LWR@newref}{s m}{%
-\LWR@traceinfo{LWR@newref #2}%
+\LWR@traceinfo{LWR@newref !#2!}%
\IfBooleanTF{#1}%
{\LWR@origref{#2}}%
{\LWR@subnewref{#2}{#2}}%
@@ -6613,59 +6803,65 @@ rowspan="#2" %
\LWR@traceinfo{nameref D}%
}
-\let\Nameref\nameref
+\LetLtxMacro\Nameref\nameref
+\AtBeginDocument{
+\def\@currentHref{%
+autopage-\theLWR@currentautosec%
+}
+}
+
\NewDocumentCommand{\LWR@subhyperref}{m +m}{%
-\LWR@htmltag{a href="{#1}" target="\_{}blank"\LWR@orignewline}#2\LWR@htmltag{/a}%
+\LWR@traceinfo{LWR@subhyperref !#1!}%
+\LWR@sanitize{#1}%
+\LWR@htmltag{%
+ a href="\LWR@sanitized" %
+ target="\_{}blank"\LWR@orignewline%
+}%
+#2%
+\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
\NewDocumentCommand{\LWR@subhyperrefclass}{m +m m}{%
-\LWR@htmltag{a href="{#1}"
-class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
-\LWR@ensuredoingapar%
-}
-
-\NewDocumentCommand{\LWR@hrefb}{O{} m +m}{%
-\LWR@subhyperref{#2}{#3}%
-\endgroup%
+\LWR@htmltag{%
+ a href="%
+ \begingroup\@sanitize#1\endgroup%
+ " %
+ class="#3"\LWR@orignewline%
+}%
+#2%
+\LWR@htmltag{/a}%
\LWR@ensuredoingapar%
}
-\DeclareRobustCommand*{\href}{%
+\NewDocumentCommand{\href}{O{} m +m}{%
\LWR@ensuredoingapar%
-\begingroup%
-\catcode`\_=12
-\LWR@hrefb%
+\LWR@subhyperref{#2}{#3}%
}
-\newcommand*{\LWR@nolinkurlb}[1]{#1\endgroup\LWR@ensuredoingapar}
-
-\DeclareRobustCommand*{\nolinkurl}{%
+\newcommand*{\nolinkurl}[1]{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@nolinkurlb%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\LWR@templink%
}
-\NewDocumentCommand{\LWR@urlb}{m}{%
-\LWR@hrefb{#1}{#1}%
-}
-
-\DeclareRobustCommand*{\url}{%
+\NewDocumentCommand{\url}{m}{%
\LWR@ensuredoingapar%
-\begingroup\catcode`\_=12
-\LWR@urlb%
+\def\LWR@templink{#1}%
+\@onelevel@sanitize\LWR@templink%
+\href{\LWR@templink}{\LWR@templink}%
}
-
\newcommand*{\LWR@subinlineimage}[5][]{%
\ifblank{#1}%
-{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"{}}}%
-{\LWR@htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"{}}}%
+{\LWR@htmltag{img src="#3.#4" alt="#3" style="#5" class="#2"}}%
+{\LWR@htmltag{img src="#3.#4" alt="#1" style="#5" class="#2"}}%
}
\end{warpHTML}
@@ -6719,16 +6915,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@thisautoid}
+\newcounter{LWR@thisautoidWP}
+
\newbool{LWR@freezethisautoid}
\boolfalse{LWR@freezethisautoid}
-\newcommand*{\LWR@maybeincthisautoid}{%
-\ifbool{LWR@freezethisautoid}{}{\addtocounter{LWR@thisautoid}{1}}%
-}
-
\newcommand*{\LWR@newautoidanchor}{%
-\LWR@maybeincthisautoid%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\ifbool{LWR@freezethisautoid}{}{%
+ \addtocounter{LWR@thisautoid}{1}%
+ \LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
+}%
}
\newcommand*{\@captype}{}
@@ -6800,7 +6996,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\def\LWR@LTcaptionlistentry{%
\LWR@ensuredoingapar%
-\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"{}}\LWR@htmltag{/a}%
+\LWR@htmltag{a id="autoid-\arabic{LWR@thisautoid}"}\LWR@htmltag{/a}%
\bgroup
\@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
{\egroup\LWR@LT@captionlistentry}}%
@@ -6821,7 +7017,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}% not TOC
\LWR@origaddcontentsline{#1}{#2}{#3}%
}
-
\AtBeginDocument{
\let\LWR@origcaptionof\captionof
@@ -6837,16 +7032,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begin{warpHTML}
-
-\newcommand*{\LWR@myshorttoc}[1]{
-\LWR@ensuredoingapar
-\IfFileExists{\jobname.#1}{
-\begingroup
-\makeatletter
-\@input{\jobname.#1}
-\endgroup
+\newcommand*{\LWR@myshorttoc}[1]{%
+\LWR@traceinfo{LWR@myshorttoc: #1}%
+\LWR@ensuredoingapar%
+\IfFileExists{\jobname.#1}{%
+\LWR@traceinfo{LWR@myshorttoc: loading}%
+\begingroup%
+\makeatletter%
+\@input{\jobname.#1}%
+\endgroup%
}%
{}%
+\LWR@traceinfo{LWR@myshorttoc: done}%
}
\NewDocumentCommand{\LWR@subtableofcontents}{m m}{%
@@ -6867,6 +7064,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@orig@starttoc{#1}
\LWR@htmlelementclassend{nav}{#1}
}
+\newbool{LWR@copiedsidetoc}
+\boolfalse{LWR@copiedsidetoc}
+\AtBeginDocument{
\let\LWR@origtableofcontents\tableofcontents
\renewcommand*{\tableofcontents}{%
@@ -6876,11 +7076,15 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
{
- \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \ifbool{LWR@copiedsidetoc}{}{%
+ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \booltrue{LWR@copiedsidetoc}%
+ }%
\LWR@printpendingfootnotes
\LWR@origtableofcontents
}
-}
+}% \tableofcontents
+}% AtBeginDocument
\let\LWR@origlistoffigures\listoffigures
@@ -6960,20 +7164,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro\numberline\LWR@numberline
\NewDocumentCommand{\hypertoc}{m m +m m}{%
+\LWR@traceinfo{hypertoc !#1!#2!#3!#4!}%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
\LWR@startpars%
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4%
+ }{#3}{toc#2}%
\LWR@stoppars%
}
{}
+\LWR@traceinfo{hypertoc done}%
}
+\@ifclassloaded{memoir}{}{
\newcounter{lofdepth}
\setcounter{lofdepth}{1}
+}
+\@ifclassloaded{memoir}{}{
\newcounter{lotdepth}
\setcounter{lotdepth}{1}
+}
\newcommand{\hypertocfloat}[5]{%
\LWR@startpars
@@ -7053,9 +7264,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\def\LWR@wrindex#1{%
\addtocounter{LWR@autoindex}{1}%
-\LWR@newlabel{LWRindex-\theLWR@autoindex}%
+\LWR@newlabel{LWRindex-\arabic{LWR@autoindex}}%
\protected@write\@indexfile{}%
-{\string\indexentry{#1}{\theLWR@autoindex}}%
+{\string\indexentry{#1}{\arabic{LWR@autoindex}}}%
\endgroup
\@esphack}
@@ -7080,7 +7291,29 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begin{warpall}
\providecommand{\glo@name}{}
\end{warpall}
+\begin{warpHTML}
+\AtBeginDocument{
+\AtBeginEnvironment{thebibliography}{
+\providecommand*{\LWR@newem}[1]{\textit{#1}}
+
+\renewrobustcmd{\em}{%
+ \begingroup
+ \gdef\LWR@em@after{\LWR@em@finish\LWR@newem}%
+ \afterassignment\LWR@em@after
+ \toks@\bgroup
+}
+\def\LWR@em@finish#1{%
+ \xdef\LWR@em@after{\noexpand#1{\the\toks@}}%
+ \endgroup
+ \LWR@em@after\egroup
+}
+}% \AtBeginEnvironment{thebibliography}
+}% \AtBeginDocument
+
+\end{warpHTML}
+
+\begin{warpHTML}
\newcommand*{\LWR@restoreorigformatting}{%
\LWR@traceinfo{LWR@restoreorigformatting}%
\linespread{1}%
@@ -7150,7 +7383,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
\LetLtxMacro{\minipage}{\LWR@origminipage}%
-\let\endminipage\LWR@endminipage%
+\let\endminipage\LWR@origendminipage%
\LetLtxMacro{\parbox}{\LWR@origparbox}%
\let\TeX\LWR@origTeX%
\let\LaTeX\LWR@origLaTeX%
@@ -7163,7 +7396,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@restoreoriglists%
\LWR@FBcancel%
}
-
+\end{warpHTML}
\begin{warpHTML}
\let\LWR@origtextdollar\$
@@ -7332,7 +7565,7 @@ $#1$}
\boolfalse{LWR@amsmultline}
\newcommand*{\LWR@htmlmathlabel}[1]{%
-\LWR@traceinfo{LWR@htmlmathlabel #1}%
+\LWR@traceinfo{LWR@htmlmathlabelb #1}%
\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{%
\text{
@@ -7747,7 +7980,7 @@ $#1$}
\NewDocumentEnvironment{lateximage}{O{image}}
{%
-\LWR@traceinfo{lateximage: starting on page \arabic{page}}%
+\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
{%
\addtocounter{LWR@lateximagedepth}{1}%
@@ -7767,9 +8000,9 @@ $#1$}
\setcounterpageref{LWR@LIpage}{LWRlateximage\arabic{LWR@lateximagenumber}}%
\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
- class="lateximagesource"{}} \LWR@orignewline
+ class="lateximagesource"} \LWR@orignewline
\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
- \immediate\write\LWR@lateximagesfile{|\theLWR@LIpage|\theLWR@externalfilecnt|}%
+ \immediate\write\LWR@lateximagesfile{|\arabic{LWR@LIpage}|\arabic{LWR@externalfilecnt}|}%
\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
\addtocounter{LWR@lateximagedepth}{1}%
@@ -7803,6 +8036,7 @@ $#1$}
\LWR@origendminipage%
\LWR@orignewpage%
\LWR@origscriptsize%
+ \LWR@origvspace*{.5\baselineskip}%
\LWR@htmlclosecomment{}\LWR@orignewline%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
\LWR@subinlineimage[#1]{lateximage}%
@@ -8059,35 +8293,6 @@ $#1$}
\newlength{\LWR@minipagewidth}
\newlength{\LWR@minipageheight}
-\def\LWR@endminipage{%
- \par
- \unskip
- \ifvoid\@mpfootins\else
- \vskip\skip\@mpfootins
- \normalcolor
- \LWR@htmldivclass{mpfootnotes}
- \LWR@origmedskip
- \unvbox\@mpfootins
- \LWR@htmldivclassend{mpfootnotes}
- \fi
- \@minipagefalse
- \color@endgroup
- \egroup
- \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
-
-\newcommand*{\LWR@subminipage}{%
-\LWR@stoppars
-\LWR@origminipage{6in}
-\LWR@origraggedright%
-\LWR@startpars%
-}
-
-\newcommand*{\LWR@endsubminipage}{%
-\LWR@stoppars%
-\LWR@endminipage% The following empty line is required:
-
-}
-
\newbool{LWR@minipagefullwidth}
\boolfalse{LWR@minipagefullwidth}
\newcommand*{\minipagefullwidth}{\booltrue{LWR@minipagefullwidth}}
@@ -8101,14 +8306,16 @@ $#1$}
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
{%
\uselengthunit{PT}%
+\begingroup
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
+ \LWR@orignewpage%
\addtolength{\LWR@minipagewidth}{3em}% room for frames
\setlength{\linewidth}{6in}%
\setlength{\textwidth}{6in}%
\setlength{\textheight}{9in}%
}{}%
-\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
+\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}%
\setlength{\LWR@minipageheight}{\textheight}% default unless specified
\IfValueT{#2}{\setlength{\LWR@minipageheight}{#2}}%
\addtocounter{LWR@minipagedepth}{1}%
@@ -8116,13 +8323,11 @@ $#1$}
\LWR@stoppars%
\ifbool{FormatWP}{%
-\addtocounter{LWR@thisautoid}{1}%
-\booltrue{LWR@freezethisautoid}%
-\LWR@htmltag{div id="autoid-\arabic{LWR@thisautoid}" class="wpminipage"}%
+\addtocounter{LWR@thisautoidWP}{1}%
+\LWR@htmltag{div id="autoidWP-\arabic{LWR@thisautoidWP}" class="wpminipage"}%
}{}%
\LWR@traceinfo{minipage: creating div class}%
-\LWR@orignewpage%
\LWR@htmltag{div class="minipage" style="%
\ifthenelse{\equal{#1}{t}}{vertical-align:bottom ; }{}%
\ifthenelse{\equal{#1}{c}}{vertical-align:middle ; }{}%
@@ -8142,13 +8347,15 @@ $#1$}
}%
\LWR@traceinfo{minipage: about to print the height}%
\IfValueT{#2}{height:\rndprintlength{\LWR@minipageheight} ; }%
-"{}}%
+"}%
-\LWR@origminipage{6in}% The preceding empty line is required.
\setlength{\linewidth}{#4}% the original width
\setlength{\textwidth}{6in}%
\setlength{\textheight}{9in}%
\LWR@origraggedright%
+\def\@mpfn{mpfootnote}%
+\def\thempfn{\thempfootnote}\c@mpfootnote\z@%
+\let\@footnotetext\@mpfootnotetext%
\LWR@startpars%
\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
@@ -8156,20 +8363,20 @@ $#1$}
}{}%
\LWR@traceinfo{minipage: finished starting the minipage}%
-}
-{%
+}% finished \minipage
+{% \endminipage
+\LWR@printpendingmpfootnotes%
\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
=== end minipage ===
}{}%
\LWR@stoppars%
-\LWR@endminipage% The following empty line is required:
+\endgroup%
\ifbool{FormatWP}{%
\LWR@htmlelementend{div}%
-\boolfalse{LWR@freezethisautoid}%
}{}%
\LWR@htmldivclassend{minipage}%
@@ -8183,9 +8390,9 @@ $#1$}
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
{
\LWR@traceinfo{parbox of width #4}%
-\begin{minipage}[#1][#2][#3]{#4}
+\begin{minipage}[#1][#2][#3]{#4}%
#5
-\end{minipage}
+\end{minipage}%
}
\LetLtxMacro\LWR@origmakebox\makebox
@@ -8205,10 +8412,10 @@ $#1$}
width:\rndprintlength{\LWR@tempwidth}%
]%
{makebox}%
- {\mbox{#4}}%
+ {#4}%
}% scope
}%
-{\mbox{#4}}%
+{#4}% no width
}
\LetLtxMacro\LWR@origframebox\framebox
@@ -8234,7 +8441,7 @@ padding:\rndprintlength{\fboxsep}%
}
\let\LWRprint@fbox\fbox
\newcommand{\LWRhtml@fbox}[1]{%
-\LWR@traceinfo{HTML fbox}
+\LWR@traceinfo{HTML fbox}%
\LWR@forceminwidth{\fboxrule}%
\InlineClass[%
\LWR@blackborderpadding%
@@ -8419,8 +8626,11 @@ width:\rndprintlength{\LWR@tempwidth}%
\LetLtxMacro{\itshape}{\LWR@nullitshape}%
\LetLtxMacro{\em}{\LWR@nullem}%
\LetLtxMacro{\normalfont}{\LWR@nullnormalfont}%
-\renewcommand*{\HTMLunicode}[1]{}%
-\renewcommand*{\HTMLentity}[1]{}%
+\renewcommand*{\,}{-}%
+\renewcommand*{~}{-}%
+\renewcommand*{\textellipsis}{-}%
+\renewcommand*{\HTMLunicode}[1]{-}%
+\renewcommand*{\HTMLentity}[1]{-}%
\renewcommand*{\&}{and}%
\renewcommand{\textsuperscript}[1]{##1}%
\renewcommand{\textsubscript}[1]{##1}%
@@ -8497,13 +8707,14 @@ width:\rndprintlength{\LWR@tempwidth}%
\let\LWR@origvspace\vspace
\let\LWR@origrule\rule
\let\LWR@origmedskip\medskip
+\let\LWR@origbigskip\bigskip
\let\LWR@origtextellipsis\textellipsis
-\renewcommand*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
+\renewrobustcmd*{\,}{\HTMLunicode{202f}} % HTML thin non-breakable space
-\renewcommand*{~}{\HTMLentity{nbsp}}
+\renewrobustcmd*{~}{\HTMLentity{nbsp}}
-\renewcommand*{\textellipsis}{\HTMLunicode{2026}}
+\renewrobustcmd*{\textellipsis}{\HTMLunicode{2026}}
\let\LWR@orignormalsize\normalsize
\let\LWR@origsmall\small
\let\LWR@origfootnotesize\footnotesize
@@ -8533,6 +8744,10 @@ width:\rndprintlength{\LWR@tempwidth}%
}
+\renewcommand*{\newpage}{
+
+}
+
\newcommand*{\LWR@newlinebr}{\unskip\LWR@htmltag{br /}\LWR@orignewline}%
\let\newline\LWR@newlinebr
@@ -8674,7 +8889,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\begin{warpHTML}
-\newcommand*{\phantomsection}{%
+\DeclareDocumentCommand{\phantomsection}{}{%
\section*{}%
}
@@ -8757,6 +8972,16 @@ width:\rndprintlength{\LWR@tempwidth}%
\end{warpHTML}
+\begin{warpHTML}
+\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
+\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
+\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
+\end{warpHTML}
+
+\begin{warpHTML}
+\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{}
+\end{warpHTML}
+
\endinput
%%