summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua2
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl62
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/README.txt2
-rw-r--r--Master/texmf-dist/doc/latex/lwarp/lwarp.pdfbin1501624 -> 1583065 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/lwarp/lwarpmk.lua2
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx3199
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.ins2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty7
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty13
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty31
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty60
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty32
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-morewrites.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty3
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty28
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-overpic.sty42
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty10
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty40
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty23
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty1
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty17
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty7
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty9
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty42
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty1
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty1
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty942
36 files changed, 3600 insertions, 1096 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
index 7ef5650b5d1..7d0dbb62ac5 100755
--- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
+++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.41"
+printversion = "v0.42"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 9165f0463d7..98ef87b44a7 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,13 +1,13 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 45613 2017-10-26 23:18:10Z preining $
+# $Id: tlmgr.pl 45623 2017-10-27 14:41:58Z preining $
#
# Copyright 2008-2017 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
-my $svnrev = '$Revision: 45613 $';
-my $datrev = '$Date: 2017-10-27 01:18:10 +0200 (Fri, 27 Oct 2017) $';
+my $svnrev = '$Revision: 45623 $';
+my $datrev = '$Date: 2017-10-27 16:41:58 +0200 (Fri, 27 Oct 2017) $';
my $tlmgrrevision;
my $prg;
if ($svnrev =~ m/: ([0-9]+) /) {
@@ -104,7 +104,7 @@ use TeXLive::TLDownload;
use TeXLive::TLConfFile;
use TeXLive::TLCrypto;
TeXLive::TLUtils->import(qw(member info give_ctan_mirror win32 dirname
- mkdirhier copy debug tlcmp));
+ mkdirhier copy debug tlcmp repository_to_array));
use TeXLive::TLPaper;
#
@@ -1419,7 +1419,7 @@ sub action_info {
if ($^O =~ /^MSWin/i) {
# that should not happen, we are shipping Tk!!
require Win32;
- my $msg = "Cannot load JSON:PP, that should not happen as we ship it!\n(Error message: $@)\n";
+ my $msg = "Cannot load JSON, that should not happen as we ship it!\n(Error message: $@)\n";
Win32::MsgBox($msg, 1|Win32::MB_ICONSTOP(), "Warning");
} else {
printf STDERR "
@@ -3643,7 +3643,9 @@ sub show_one_package_json {
#return($F_WARNING);
return($F_OK);
}
- my $tlp = ($is_available ? $remtlp : $loctlp);
+ # prefer local TLPs as they have RELOC replaced by proper paths
+ my $tlp = ($is_installed ? $loctlp : $remtlp);
+ #my $tlp = ($is_available ? $remtlp : $loctlp);
# add available, installed, lrev, rrev fields and remove revision field
my $str = $tlp->as_json(available => ($is_available ? $JSON::true : $JSON::false),
installed => ($is_installed ? $JSON::true : $JSON::false),
@@ -4154,30 +4156,6 @@ sub array_to_repository {
}
return "@ret";
}
-sub repository_to_array {
- my $r = shift;
- my %r;
- my @repos = split ' ', $r;
- if ($#repos == 0) {
- # only one repo, this is the main one!
- $r{'main'} = $repos[0];
- return %r;
- }
- for my $rr (@repos) {
- my $tag;
- my $url;
- # decode spaces and % in reverse order
- $rr =~ s/%20/ /g;
- $rr =~ s/%25/%/g;
- $tag = $url = $rr;
- if ($rr =~ m/^([^#]+)#(.*)$/) {
- $tag = $2;
- $url = $1;
- }
- $r{$tag} = $url;
- }
- return %r;
-}
sub merge_sub_packages {
my %pkgs;
for my $p (@_) {
@@ -5918,29 +5896,29 @@ sub texconfig_conf_mimic {
info(give_version());
info("==================== executables found by searching PATH =================\n");
info("PATH: $PATH\n");
- for my $cmd (qw/kpsewhich updmap fmtutil tlmgr tex pdftex luatex xetex
- mktexpk dvips dvipdfmx/) {
+ for my $cmd (sort(qw/kpsewhich updmap fmtutil tlmgr tex pdftex luatex xetex
+ mktexpk dvips dvipdfmx/)) {
info(sprintf("%-10s %s\n", "$cmd:", TeXLive::TLUtils::which($cmd)));
}
info("=========================== active config files ==========================\n");
+ for my $m (sort(qw/fmtutil.cnf config.ps mktex.cnf pdftexconfig.tex/)) {
+ info(sprintf("%-17s %s", "$m:", `kpsewhich $m`));
+ }
for my $m (qw/texmf.cnf updmap.cfg/) {
for my $f (`kpsewhich -all $m`) {
info(sprintf("%-17s %s", "$m:", $f));
}
}
- for my $m (qw/fmtutil.cnf config.ps mktex.cnf pdftexconfig.tex/) {
- info(sprintf("%-17s %s", "$m:", `kpsewhich $m`));
- }
#tlwarn("$prg: missing finding of XDvi, config!\n");
info("============================= font map files =============================\n");
- for my $m (qw/psfonts.map pdftex.map ps2pk.map kanjix.map/) {
+ for my $m (sort(qw/psfonts.map pdftex.map ps2pk.map kanjix.map/)) {
info(sprintf("%-12s %s", "$m:", `kpsewhich $m`));
}
info("=========================== kpathsea variables ===========================\n");
- for my $v (qw/TEXMFMAIN TEXMFDIST TEXMFLOCAL TEXMFSYSVAR TEXMFSYSCONFIG TEXMFVAR TEXMFCONFIG TEXMFHOME VARTEXFONTS TEXMF SYSTEXMF TEXMFDBS WEB2C TEXPSHEADERS TEXCONFIG ENCFONTS TEXFONTMAPS/) {
+ for my $v (sort(qw/TEXMFMAIN TEXMFDIST TEXMFLOCAL TEXMFSYSVAR TEXMFSYSCONFIG TEXMFVAR TEXMFCONFIG TEXMFHOME VARTEXFONTS TEXMF SYSTEXMF TEXMFDBS WEB2C TEXPSHEADERS TEXCONFIG ENCFONTS TEXFONTMAPS/)) {
info("$v=" . `kpsewhich -var-value=$v`);
}
@@ -6752,7 +6730,7 @@ and the repository are not compatible:
}
# check for being frozen
- if ($remotetlpdb->option("frozen")) {
+ if ($remotetlpdb->config_frozen) {
my $frozen_msg = <<FROZEN;
TeX Live $TeXLive::TLConfig::ReleaseYear is frozen forever and will no
longer be updated. This happens in preparation for a new release.
@@ -7500,7 +7478,8 @@ Dump the remote TLPDB.
=item B<--json>
Instead of dumping the actual content, the database is dumped as
-JSON.
+JSON. For the format of JSON output see C<tlpkg/doc/JSON-formats.txt>,
+format definition C<TLPDB>.
=back
@@ -7693,7 +7672,8 @@ the name of all dependencies separated by C<:>.
In case the only value passed to C<--data> is C<json>, the output is a
JSON encoded array where each array element is the JSON representation of
-the internal object.
+a single C<TLPOBJ> but with additional information. For details see
+C<tlpkg/doc/JSON-formats.txt>, format definition: C<TLPOBJINFO>.
=back
@@ -9166,7 +9146,7 @@ This script and its documentation were written for the TeX Live
distribution (L<http://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 45613 2017-10-26 23:18:10Z preining $
+$Id: tlmgr.pl 45623 2017-10-27 14:41:58Z preining $
=cut
# to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt
index d98b7eb6f50..c740bf01bfa 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.41 README.txt
+LaTeX lwarp package v0.42 README.txt
Files included are:
diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
index ee9b98d5e54..f01233eab15 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 7ef5650b5d1..7d0dbb62ac5 100755
--- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
+++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
@@ -4,7 +4,7 @@
-- Print the usage of the lwarpmk command:
-printversion = "v0.41"
+printversion = "v0.42"
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 92616ef0d2a..26c9ba2770f 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2017/10/07 v0.41 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2017/10/30 v0.42 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -74,6 +74,7 @@
\newunicodechar{₦}{\textnaira}
\newunicodechar{₱}{\textpeso}
\newunicodechar{℞}{\textrecipe}
+\newunicodechar{⸘}{\textinterrobangdown}
\newunicodechar{‱}{\textpertenthousand}
\newunicodechar{฿}{\textbaht}
\newunicodechar{℠}{\textservicemark}
@@ -89,6 +90,8 @@
\usepackage{titlesec}
+% \usepackage[nobottomtitles*]{titlesec}
+% \renewcommand{\bottomtitlespace}{.\textheight}
\titleformat{\part}[hang]
{\LARGE\ttfamily\bfseries}{}{0pt}{}[\marginpar{\hfill{}File\,\thepart}]
@@ -116,6 +119,7 @@
\usepackage{array}
\usepackage{longtable}
\usepackage{booktabs}
+\usepackage{threeparttable}
\usepackage{multirow}
\usepackage{bigdelim}
@@ -141,6 +145,7 @@
\setlength{\cftsubsubsecindent}{2.8em}
\setlength{\cftsubsubsecnumwidth}{4em}
+\usepackage[notbib,notindex,nottoc]{tocbibind}
\usepackage{titleps}
@@ -241,15 +246,16 @@ Keywords={LaTeX, HTML, conversion}%
\newrobustcmd{\acro}[1]{\textsc{\lowercase{#1}}}
\newrobustcmd{\element}[1]{\texttt{<#1>}}
\newrobustcmd{\attribute}[1]{\texttt{#1}}
+\newrobustcmd{\UI}[1]{\textbf{\textsf{#1}}}
\newrobustcmd{\TOC}{\acro{TOC}}
\newrobustcmd{\LOF}{\acro{LOF}}
\newrobustcmd{\LOT}{\acro{LOT}}
\newrobustcmd{\HTML}{\acro{HTML}}
-\newrobustcmd{\HTMLfive}{\HTML\oldstylenums{5}}
+\newrobustcmd{\HTMLfive}{\HTML\textsc{5}}
\newrobustcmd{\CSS}{\acro{CSS}}
-\newrobustcmd{\CSSthree}{\CSS\oldstylenums{3}}
+\newrobustcmd{\CSSthree}{\CSS\textsc{3}}
\newrobustcmd{\EPUB}{\acro{EPUB}}
\newrobustcmd{\SVG}{\acro{SVG}}
\newrobustcmd{\PNG}{\acro{PNG}}
@@ -443,7 +449,7 @@ For now, the number list is simply turned off.
The glossaries may be placed in a numbered or unnumbered section, given
\margintag{placement and \acro{TOC} options}
-a \acro{TOC} entry, and placed inline or on their own \HTML page:
+a \acro{TOC} entry, and placed inline or on their own \HTML\ page:
\begin{description}
\item [Numbered section, on its own \HTML\ page:]
@@ -574,8 +580,19 @@ if \texttt{FileDepth} allows:
}
-\newcommand{\limitstext}{\cs{textbf}, etc.\ are supported,
-but \cs{bfseries}, etc.\ are not yet supported.}
+\newcommand{\limitstext}{%
+\cs{textbf}, etc.\ are supported,
+\watchout[\cs{bfseries}, etc.]
+but \cs{bfseries}, etc.\ are not yet supported.
+
+\texttt{\&}, \texttt{\textless}, and \texttt{\textgreater}
+\watchout[HTML special chars]
+have special meanings in \HTML.
+If \cs{\&}, \cs{textless}, and \cs{textgreater} are used, the proper result
+should occur in \HTML, but there may be \HTML\ parsing problems
+if these special characters occur unescaped in program listings
+or other verbatim text.
+}
\newcommand{\limitshspace}{%
\DescribeMacro{\hspace}%
@@ -703,13 +720,43 @@ by setting \cs{LateximageFontSizeName} to a font size name --- \emph{without the
\newcommand{\limitsmath}{%
-\limitsntheoremnumbering
+\subsubsection{Rendering tradeoffs}
Math may be rendered
\margintag{Math rendering}
as \SVG\ graphics or using the \textsc{MathJax} JavaScript display engine.
\index{JavaScript>MathJax}
+In its current implementation,
+\margintag{SVG files}
+rendering math as images creates a new \SVG\ file for each expression.
+In text with many references to math variables,
+this can result in a large number of files with
+duplicate content.
+In the future, some method of content-based naming and check-summing
+may be used to remove the need for duplicate files.
+
+Another approach could be
+\margintag{SVG inline}
+to in-line the \SVG\ files directly into the \HTML.
+This may reduce the number of files and potentially speed loading the images,
+but slows the display of the rest of the document before the images are loaded.
+
+Others converters have used \PNG\ files,
+\margintag{PNG files}
+sometimes pre-scaled for print resolution but displayed
+on-screen at a scaled down size. This allows high-quality print output at the expense
+of larger files, but \SVG\ files are the preferred approach for scalable graphics.
+
+Conversion to \MathML\ might be a better approach,
+\margintag{MathML}
+among other things allowing a more compact representation of math than \SVG\ drawings.
+Problems with \MathML\ include limited browser support and some
+issues with the fine control of the appearance of the result.
+Also see \cref{sec:epub} regarding \EPUB\ output with MathJax.
+
+\subsubsection{SVG option}
+
For \SVG\ math,
\margintag{SVG math option}
math is rendered as usual by \LaTeX{} into the initial \PDF\ file using the
@@ -726,33 +773,16 @@ math, allowing copy/paste of the \LaTeX{} math expression into other documents.
\limitslateximagefontsize
-As currently implemented,
-\margintag{SVG files}
-each instance of math creates a new \SVG\ file. In text with
-many references to math variables, this can result in a large number of files with
-duplicate content. In the future, some method of content-based naming and checksumming
-may be used to remove the need for duplicate files.
+For \SVG\ math, text copy/paste from the \HTML\ \element{alt} tags lists the
+\margintag{SVG math copy/paste}
+equation number or tag for single equations, along with the \LaTeX\ code
+for the math expression.
+For \AmS\ environments with multiple numbers in the same environment,
+only the first and last is copy/pasted, as a range.
+No tags are listed inside a starred \AmS\ environment, although the \cs{tag}
+macro will still appear inside the \LaTeX\ math expression.
-Another approach would be
-\margintag{SVG inline}
-to in-line the \SVG\ files directly into the \HTML.
-This avoids having a large number of files and potentially speeds loading the images,
-but dis-allows the possibility of sharing one file among many instances without
-user intervention.
-
-Others have used \PNG\ files,
-\margintag{PNG files}
-sometimes pre-scaled for print resolution but displayed
-on-screen at a scaled down size. This allows high-quality print output at the expense
-of larger files, but \SVG\ files are also larger as well.
-
-Conversion to \MathML\ might be a better approach,
-\margintag{MathML}
-among other things
-allowing a more compact representation of math than \SVG\ drawings.
-Problems with \MathML\ include limited browser support and some
-issues with the fine control of the appearance of the result.
-Also see \cref{sec:epub} regarding \EPUB\ output with MathJax.
+\subsubsection{MathJax option}
The popular MathJax alternative (\url{mathjax.org}) may be used to display math.
\margintag{MathJax math option}
@@ -806,13 +836,35 @@ Limitations when using MathJax include:
where it will be rendered as normal text.
\watchout[siunitx inside an equation]
- \href{https://github.com/mathjax/MathJax-third-party-extensions/tree/master/siunitx}
- {\texttt{https://github.com/mathjax/MathJax-third-party-extensions/\\
- \hspace*{2em}tree/master/siunitx}}
+ \href{https://github.com/burnpanck/MathJax-siunitx}
+ {\texttt{https://github.com/burnpanck/MathJax-siunitx}}
+
+ Also see \cref{sec:limitssiunitx}.
+
+\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},
+ along with occasionally-used macros such as \cs{footnote} and \cs{relax}.
\item MathJax does not automatically support custom \LaTeX{} macros,
- \margintag{\LaTeX{} macros}
- but they may be set up by the user.
+ \margintag{custom MathJax macros}
+ \index{MathJax>custom macros}
+ but they may be created by the user inside a math expression:
+ \begin{sourcedisplay}
+ \cs{begin}\{document\}\\
+ \textrm{(\dots)} \\
+ \cs{begin}\{warpHTML\} \% Only for HTML output, \\
+ \cs{ifbool}\{mathjax\} \% and only for MathJax output: \\
+ \{ \\
+ \hspace*{2em}\% New macros for MathJax are \\
+ \hspace*{2em}\% placed inside a math expression: \\
+ \hspace*{2em}\cs{(} \\
+ \hspace*{4em}\cs{newcommand}\{\cs{expval}\}[1]\{\cs{langle}\#1\cs{rangle}\} \\
+ \hspace*{4em}\cs{newcommand}\{\cs{abs}\}[1]\{\cs{lvert}\#1\cs{rvert}\} \\
+ \hspace*{2em}\cs{)} \\
+ \}\{\} \\
+ \cs{end}\{warpHTML\} \\
+ \end{sourcedisplay}
\end{itemize}
}
@@ -981,6 +1033,15 @@ Use \CSS\ or \cs{textcolor} where possible.
\margintag{\cs{color} and \cs{pagecolor}}
}
+\newcommand{\limitsoverpic}{%
+The macros \cs{overpicfontsize} and \cs{overpicfontskip} are used during
+\watchout[scaling]
+\HTML\ generation. These are sent to \cs{fontsize} to adjust the font
+size for scaling differences between the print and \HTML\ versions of the
+document. Renew these macros before using the \env{overpic} and \env{Overpic}
+environments.
+}
+
\newcommand{\limitstabular}{%
Tabular mostly works as expected, but pay special attention to the
following, especially if working with environments, macros inside tabulars,
@@ -1242,10 +1303,10 @@ are above or below the delimiter:
\begin{sourcedisplay}
\hrule\smallskip
\cs{begin}\{tabular\}\{lll\} \\
-\textcolor{green}{<empty>} \& a \& b \textbackslash\textbackslash \\
+\textcolor{green!50!black}{<empty>} \& a \& b \textbackslash\textbackslash \\
\cs{ldelim}\{\textbackslash\{\}\{2\}\{.25in\}[left ] \& c \& d \textbackslash\textbackslash \\
\textcolor{red}{\cs{mrowcell}} \& e \& f \textbackslash\textbackslash \\
-\textcolor{green}{<empty>} \& g \& h \textbackslash\textbackslash \\
+\textcolor{green!50!black}{<empty>} \& g \& h \textbackslash\textbackslash \\
\cs{end}\{tabular\}
\smallskip\hrule
\begin{tabular}{lll}
@@ -1479,11 +1540,27 @@ Possible solutions include:
\end{itemize}
}
+\newcommand{\limitskeyfloat}{%
+If placing a \cs{keyfig}[H] inside a \env{keywrap},
+\watchout[\env{keywrap}]
+use an absolute width for
+\cs{keyfig}, instead of \texttt{lw}-proportional widths.
+(The [H] option forces the use of a minipage, which internally adjusts for
+a virtual 6-inch wide minipage, which then corrupts the \texttt{lw} option.)
+}
+
\newcommand{\limitssiunitx}{%
-Do not use \cmds{per-mode=fraction}, which cannot be seen by the final \cmds{pdftotext} conversion.
+Do not use \cmds{per-mode=fraction},
\watchout[per-mode]
+which cannot be seen by the final \cmds{pdftotext} conversion.
Some units will require that the expression be placed inside math mode.
+\watchout[math mode required]
+
+\textcolor{red}{NOTE: As of this writing, the \pkg{siunitx} extension
+for MathJax is not currently hosted at any public CDN,
+thus \pkg{siunitx} is not usable with MathJax unless a local copy
+of this extension is created first.}
}
\newcommand{\limitsnicefrac}{%
@@ -1541,14 +1618,14 @@ changes do not affect the \HTML\ output.
\newcommand{\limitsnewtxmath}{%
The proper load order is:
\watchout[loading sequence]
-\begin{enumerate}
-\item \dots
-\item \texttt{\cs{usepackage}\{lwarp\}}
-\item \dots
-\item \texttt{\cs{usepackage}\{amsthm\}}
-\item \texttt{\cs{usepackage}\{newtxmath\}}
-\item \dots
-\end{enumerate}
+\begin{sourcedisplay}
+\textrm{\dots} \\
+\cs{usepackage}\{lwarp\} \\
+\textrm{\dots} \\
+\cs{usepackage}\{amsthm\} \\
+\cs{usepackage}\{newtxmath\} \\
+\textrm{\dots} \\
+\end{sourcedisplay}
}
@@ -1595,7 +1672,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{14314}
+% \CheckSum{14824}
%
% \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
@@ -1678,6 +1755,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.39}{2017/09/05}{\ 2017/09/05}
% \changes{v0.40}{2017/09/25}{\ 2017/09/25}
% \changes{v0.41}{2017/10/07}{\ 2017/10/07}
+% \changes{v0.42}{2017/10/30}{\ 2017/10/30}
@@ -1700,7 +1778,7 @@ This boolean may be tested by the user for later use.
%
% {\Huge The \textbf{lwarp} package}
%
-% {\Large \textup{\LaTeX{} to \HTMLfive}}
+% {\Large \textup{\LaTeX{} to HTML}}
%
% \bigskip
%
@@ -1787,6 +1865,58 @@ This boolean may be tested by the user for later use.
% \end{center}
%
% \clearpage
+%
+% \section{Supporting \protect\TeX\ development}
+% \changes{v0.42}{2017/10/30}{Docs: Added support page.}
+%
+% \TeX\ development:
+% \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.
+% \end{itemize}
+%
+% Please consider helping by joining and/or contributing to the \TeX\ Users Group,
+% a United States 501(c)(3) tax-exempt charitable organization.
+% Contributions are accepted by credit card, check, or Pay Pal, via the United Way,
+% or by USA or European bank transfer.
+% Membership in TUG supports the development of \TeX{}Live, the major \TeX\ distribution.
+%
+% Donations may be directed towards individual projects:
+% \begin{description}[nosep]
+% \item[TUG Bursary Fund:] Assistance for attending annual TUG meetings.
+% \item[CTAN:] The Comprehensive \TeX\ Archive Network --- Central storage for \TeX.
+% \item[TeX Development Fund:] Support for specific projects.
+% \item[EduTeX:] Teaching and using \TeX\ in schools and universities.
+% \item[GUST e-foundry fonts:] Enhanced for math and additional language groups.
+% \item[LaTeX Project:] Modernizing the \LaTeX\ core.
+% \item[Libre Font Fund:] Fonts, tools (FontForge), and distribution (the Open Font Library).
+% \item[LuaTeX:] Combining the pdf\TeX\ engine and the Lua language.
+% \item[MetaPost:] Postscript graphics.
+% \item[MacTeX:] \TeX\ for Mac.
+% \item[PDF Accessibility:] Modern PDF standards.
+% \item[Other:] Additional projects may be specified.
+% \end{description}
+%
+% To make a contribution: \hfill
+% \href{https://www.tug.org/donate.html}{\texttt{https://www.tug.org/donate.html}}
+%
+% For users of MiK\TeX: \hfill
+% \href{https://miktex.org/donations.html}{\texttt{https://miktex.org/donations.html}}
+%
+% For country-specific \TeX\ users groups: \hfill
+% \href{http://tug.org/usergroups.html}{\texttt{http://tug.org/usergroups.html}}
+%
+% \clearpage
%
%
% \tableofcontents
@@ -1800,8 +1930,6 @@ This boolean may be tested by the user for later use.
%
% \clearpage
%
-% \part{lwarp.sty}
-%
% \section{Updates}
% \label{sec:updates}
%
@@ -1812,6 +1940,42 @@ 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.42:] \
+% \begin{itemize}
+% \item Improved assitance for word-processor conversions when
+% \margintag{word-processor conversion}
+% boolean |FormatWP| is set |true|.
+% See \cref{sec:wordprocessorconversion}.
+% \begin{itemize}
+% \item \textcolor{red}{The} \watchout[name change]
+% \textcolor{red}{boolean |FormatWordProcessor| has
+% been renamed |FormatWP|.}
+% \item \textcolor{red}{The} \watchout[name change]
+% \textcolor{red}{boolean |HTMLMarkFloats| has
+% been renamed |WPMarkFloats|.}
+% \item New booleans control whether to place additional
+% marks around minipages, at the table of contents,
+% at the \acro{LOF} and \acro{LOT}, and whether to
+% print math as \LaTeX\ source for copy/paste into the
+% LibreOffice Writer TeXMaths extension.
+% \item Improved formatting for numerous objects.
+% See \cref{sec:wordprocessorconversion}.
+% \end{itemize}
+% \item Add: \env{tabbing} environment.
+% \margintag{\env{tabbing}}
+% \item Add: \pkg{overpic} package. See \cref{sec:overpic}.
+% \margintag{\pkg{overpic}}
+% \item Fix: Text copy/paste of \AmS\ math environment numbers and names.
+% \margintag{math}
+% \item Improved \cs{ensuremath}.
+% \item MathJax with \pkg{siunitx}: Updated script and documentation.
+% \item \pkg{textcomp}: Improved \cs{interrobangdown}.
+% \margintag{symbols}
+% \item \pkg{realscripts}: Fix for subscripts in a \env{lateximage}.
+% \item \pkg{morewrites}: Enforces loading before \pkg{lwarp}.
+% \margintag{load order}
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.41:] \
% \begin{itemize}
% \item Added tabular vertical rules, subject to some limitations.
@@ -2159,9 +2323,11 @@ This boolean may be tested by the user for later use.
% \item Boolean |FormatWordProcessor| changes \HTML\ output for easier conversion
% by a word processor. Removes headers and nav, prints footnotes per section,
% and also forces single-file output and turns off \HTML\ debug comments.
+% Name changed to |FormatWP| as of v0.42.
% \item Boolean |HTMLMarkFloats| adds text marks around floats only if
% |FormatWordProcessor|. These make it easier to identify float boundaries,
% which are to be manually converted to word-processor frames.
+% Name changed to |WPMarkFloats| as of v0.42.
% \item Updated for the new MathJax \acro{CDN} repository.
% \item Adds \pkg{tabulary}.
% \item Supports the options syntax for \pkg{graphics}.
@@ -2344,7 +2510,7 @@ This boolean may be tested by the user for later use.
%
% Furthermore, \SVG\ images allow math to be presented with
% the same precise formatting as in the print version.
-% Math is accompanied by ALT tags holding the \LaTeX{} source for the expression, allowing it to be
+% Math is accompanied by \element{alt} tags holding the \LaTeX{} source for the expression, allowing it to be
% copy/pasted into other documents.\footnote{There seems to be some debate as to whether
% \MathML\ is actually an improvement over \LaTeX{} for sharing math. The author has no
% particular opinion on the matter, except to say that in this case \LaTeX{} is much easier to implement!}
@@ -2472,7 +2638,7 @@ This boolean may be tested by the user for later use.
%
% \midrule
%
-% Math: & Supported. Converted to \SVG\ images with \HTML\ \cmds{ALT} tags containing the
+% Math: & Supported. Converted to \SVG\ images with \HTML\ \element{alt} tags containing the
% \LaTeX{} source for the math expression.
% MathJax supported as an alternative.
% \AmS{} environments are supported.
@@ -2509,11 +2675,10 @@ This boolean may be tested by the user for later use.
% References to \PDF\ files are changed to \SVG, other image types
% are accepted as well.
% \cs{rotatebox} and \cs{scalebox} are supported as well as \HTML\ can handle.
-% \pkg{grffile} is supported. \\
-%
-% \pkg{rotating}: & Emulated. All objects are displayed unrotated. \\
+% \pkg{rotating} is emulated but all objects are unrotated.
+% \pkg{picture} and \pkg{tikz} are converted to an \SVG\ image.
+% \pkg{grffile} and \pkg{overpic} are supported. \\
%
-% \pkg{picture} and \pkg{tikz}: & Converted to an \SVG\ image. \\
%
% \midrule
%
@@ -4747,13 +4912,11 @@ This boolean may be tested by the user for later use.
%
%
% \subsection{Math}
-% \label{sec:limitsmath}
%
+% \changes{v0.42}{2017/10/30}{Docs: Reorganized math limitations}
+% \label{sec:limitsmath}
% \limitsmath
%
-% For an example of using custom \LaTeX\ macros with MathJax,
-% \margintag{custom MathJax macros}
-% see page \pageref{ex:mathjaxmacros}.
%
%
% \subsubsection{\pkg{ntheorem} package}
@@ -4762,6 +4925,7 @@ This boolean may be tested by the user for later use.
%
%
% \subsubsection{\pkg{siunitx} package}
+% \label{sec:limitssiunitx}
%
% \DescribePackage{siunitx}
% \limitssiunitx
@@ -4800,6 +4964,10 @@ This boolean may be tested by the user for later use.
%
% \limitsxcolor
%
+% \subsubsection{\pkg{overpic} package}
+%
+% \limitsoverpic
+%
%
% \subsection{Tabular}
% \label{sec:limitstabular}
@@ -4845,6 +5013,11 @@ This boolean may be tested by the user for later use.
% \limitsfloatrow
%
%
+% \subsubsection{\pkg{keyfloat} package}
+%
+% \limitskeyfloat
+%
+%
% \subsection{Miscellaneous}
%
%
@@ -4898,7 +5071,7 @@ This boolean may be tested by the user for later use.
% converting \pkg{lwarp} \HTML\ output to \EPUB:
%
% \DescribeBoolean{FormatEPUB}
-% \begin{docsidebar}
+% \begin{docsidebar}[\texttt{FormatEPUB}]
% \raggedright
% Default false.
% |FormatEPUB| changes \HTML\ output for easy \EPUB\ conversion
@@ -4914,8 +5087,10 @@ This boolean may be tested by the user for later use.
% \end{sourcedisplay}
% to the project's source preamble after |\usepackage{lwarp}|.
% The \EPUB\ version of the document cannot co-exist with the
-% regular \HTML\ version, so \userentry{lwarpmk cleanall} then
+% regular \HTML\ version, so
+% \userentry{lwarpmk cleanall}
% \userentry{lwarpmk html}
+% \userentry{lwarpmk limages}
% to recompile with the |FormatEPUB| boolean turned on.
% Several changes are then made to the \HTML\ output:
% \begin{itemize}
@@ -4955,7 +5130,7 @@ This boolean may be tested by the user for later use.
% \begin{UIdisplay}
% Match HTML tags with tag name:
% \end{UIdisplay}
-% to \element{h4}. (Or \element{h3} for document classes with \cs{chapter}s.)
+% to ``h4''. (Or ``h3'' for document classes with \cs{chapter}s.)
% The \textsf{Detect chapters at} field should then show
% \begin{UIdisplay}
% //h:h4 \qquad \textrm{---\,or\,---} \qquad //h:h3
@@ -4989,6 +5164,11 @@ This boolean may be tested by the user for later use.
% \clearpage
%
% \section{Word-processor conversion}
+% \label{sec:wordprocessorconversion}
+% \index{word processor>HTML conversion settings}
+% \index{HTML>conversion settings>word processor}
+% \index{LibreOffice>import into}
+% \index{export>to word processor}
%
% \pkg{lwarp} may be told to modify its \HTML\ output to make it
% easier to import the \HTML\ document into a word processor.
@@ -5000,11 +5180,13 @@ This boolean may be tested by the user for later use.
% as shown below.
%
%
+% \subsection{Activating word-processor conversion}
+%
% A special boolean is provided to simplify the process of
% converting \pkg{lwarp} \HTML\ output to \EPUB:
%
-% \DescribeBoolean{FormatWordProcessor}
-% \begin{docsidebar}
+% \DescribeBoolean{FormatWP}
+% \begin{docsidebar}[\texttt{FormatWP}]
% \raggedright
% Default false.
% Changes \HTML\ output for easier conversion
@@ -5012,18 +5194,25 @@ This boolean may be tested by the user for later use.
% Removes headers and nav, prints footnotes per section,
% and also forces single-file output and turns off \HTML\ debug
% comments.
+% Additionally, honors the booleans |WPMarkFloats|, |WPMarkMinipages|,
+% |WPMarkTOC|, and |WPMarkLOFT|.
% \end{docsidebar}
-% \index{word processor>HTML conversion settings}
-% \index{HTML>conversion settings>word processor}
%
% To help modify \pkg{lwarp} \HTML\ output for easier
% import to a word processor, add
% \begin{sourcedisplay}
-% |\booltrue{FormatWordProcessor}|
+% |\booltrue{FormatWP}|
% \end{sourcedisplay}
% to the project's source preamble after \pkg{lwarp} is loaded.
-% Several changes are then made to the \HTML\ output:
+% The following changes are then made to the \HTML\ output:
+% \margintag{formatting adjustments}
% \begin{itemize}
+% \item If using a class without chapters, \cs{section} and lower are
+% shifted up in level for the \HTML\ heading tags. The \CSS\ has
+% not been changed, so the section heading formats will not match the normal
+% \HTML\ output, but when imported to LibreOffice Writer the higher
+% section headings will import as \UI{Heading~1} for the title, \UI{Heading~2}
+% for \cs{section}, etc.
% \item Headers, footers, and navigation are removed at file splits.
% \item Any accumulated footnotes are printed at the bottom of each file split.
% These will have to be manually moved to their proper place in
@@ -5036,40 +5225,286 @@ This boolean may be tested by the user for later use.
% marking the opening/closing of sections and \element{div}s,
% but they are no longer useful when the document has been
% imported into a word processor.
+% \item An additional \element{div} with an \attribute{id} encapsulates
+% each float and minipage, which on import into LibreOffice Writer
+% causes a thin frame to appear around the text block for each.
+% \item Float captions are given an explicit italic formatting.
+% \item Tabular rule borders are made explicit for LibreOffice Writer.
+% LibreOffice displays a light border around each cell while editing,
+% even those which have no border when printed,
+% and \pkg{lwarp} also uses a light border for thin rules,
+% so it will be best to judge the results using
+% the print preview instead of while editing in LibreOffice.
+% \item \cs{includegraphics} and \SVG\ math width and height
+% are made explicit for LibreOffice.
+% \item \cs{hspace} is approximated by a number of \cs{quad}s,
+% and rules are approximated by a number of underscores.
+% \item Explicit \HTML\ styles are given to:
+% \begin{itemize}
+% \item \cs{textsc}, etc.
+% \item \cs{underline}, \pkg{soul} and \pkg{ulem} markup.
+% \item \env{center}, \env{flushleft}, \env{flushright}.
+% \item \cs{marginpar}, \pkg{keyfloat}, \pkg{sidenotes}, \pkg{floatflt},
+% and \pkg{wrapfig}.
+% \item \pkg{fancybox} \cs{shadowbox}, etc.
+% \item The \LaTeX\ and \TeX\ logos.
+% \end{itemize}
+% \item Honors several booleans:
+% \begin{description}
+% \item[\texttt{WPMarkFloats}:] Marks the begin and end of floats.
+% \item[\texttt{WPMarkMinipages}:] Marks the begin and end of minipages.
+% \item[\texttt{WPMarkTOC}:] Marks the location of the Table of Contents.
+% \item[\texttt{WPMarkLOFT}:] Marks the locations of the List of Figures/Tables.
+% \item[\texttt{WPMarkMath}:] Prints \LaTeX\ math instead of using images.
+% \item[\texttt{WPTitleHeading}:] Adjusts title and section headings.
+% \end{description}
+% Several of these may be used to add markers to the HTML text
+% which help determine where to adjust the word processor document after
+% import.
+
% \end{itemize}
%
-% An additional boolean may be set to help mark float boundaries:
%
-% \newcommand{\describeHTMLMarkFloats}{
-% Default true.
+% \subsection{Additional modifications}
+%
+% \newcommand{\describeWPMarkFloats}{
+% Default |false|.
% Adds
% \begin{sourcedisplay}
-% === table begin \\
+% === begin table === \\
% \dots \\
-% === end
+% === end ===
% \end{sourcedisplay}
% or
% \begin{sourcedisplay}
-% === figure begin \\
+% === begin figure === \\
% \dots \\
-% === end
+% === end ===
% \end{sourcedisplay}
% around floats while formatting for word processors.
% This helps identify boundaries of floats to be manually converted
-% to word-processor frames.
+% to word-processor frames and captions.
% }
%
-% \DescribeBoolean{HTMLMarkFloats}
-% \begin{docsidebar}
+% \DescribeBoolean{WPMarkFloats}
+% \begin{docsidebar}[\texttt{WPMarkFloats}]
% \raggedright
-% \describeHTMLMarkFloats
+% \describeWPMarkFloats
% \end{docsidebar}
-% \index{word processor>HTML conversion settings}
-% \index{HTML>conversion settings>word processor}
%
-% When enabled, markers are placed around each float, helping the
-% user to identify float boundaries for further conversion to
-% word processor frames and captions.
+%
+% \newcommand{\describeWPMarkMinipages}{
+% Default |false|.
+% Adds
+% \begin{sourcedisplay}
+% === begin minipage === \\
+% \dots \\
+% === end minipage ===
+% \end{sourcedisplay}
+% around minipages while formatting for word processors.
+% This helps identify boundaries of minipages to be manually converted
+% to word-processor frames.
+% }
+%
+% \DescribeBoolean{WPMarkMinipages}
+% \begin{docsidebar}[\texttt{WPMarkMinipages}]
+% \raggedright
+% \describeWPMarkMinipages
+% \end{docsidebar}
+%
+%
+% \newcommand{\describeWPMarkTOC}{
+% Default |true|.
+% While formatting for word processors, adds
+% \begin{sourcedisplay}
+% === table of contents === \\
+% \end{sourcedisplay}
+% where the Table of Contents would have been.
+% This helps identify where to insert the actual \acro{TOC}.
+%
+% \emph{If set |false|, the actual \acro{TOC} is printed instead.}
+% }
+%
+% \DescribeBoolean{WPMarkTOC}
+% \begin{docsidebar}[\texttt{WPMarkTOC}]
+% \raggedright
+% \describeWPMarkTOC
+% \end{docsidebar}
+%
+%
+% \newcommand{\describeWPMarkLOFT}{
+% Default |false|.
+% While formatting for word processors, adds
+% \begin{sourcedisplay}
+% === list of figures === \quad \textrm{\textit{and\,/\,or}} \\
+% === list of tables === \\
+% \end{sourcedisplay}
+% where each of these lists would have been.
+% This helps identify where to insert the actual lists.
+%
+% \emph{If set |false|, the actual lists are printed instead.}
+% }
+%
+% \DescribeBoolean{WPMarkLOFT}
+% \begin{docsidebar}[\texttt{WPMarkLOFT}]
+% \raggedright
+% \describeWPMarkLOFT
+% \end{docsidebar}
+%
+%
+% \newcommand{\describeWPMarkMath}{
+% Default |false|.
+% While formatting for word processors,
+% prints math as \LaTeX\ code instead of creating \SVG\ images or MathJax.
+% This is useful for cut/paste into the LibreOffice Writer TeXMaths extension.
+% }
+%
+% \DescribeBoolean{WPMarkMath}
+% \DescribeProgram{TeXMaths}
+% \margintag{siunitx}
+% \begin{docsidebar}[\texttt{WPMarkMath}]
+% \raggedright
+% \describeWPMarkMath
+%
+% When using the \pkg{siunitx} package, enter
+% \begin{sourcedisplay}
+% \cs{usepackage}\{siunitx\}
+% \end{sourcedisplay}
+% in the TeXMaths preamble.
+% Equation numbering is problematic for \AmS\ math environments.
+% \end{docsidebar}
+% \index{siunitx>with TeXMaths}
+% \index{math>word processor conversion}
+%
+%
+% \newcommand*{\describeWPTitleHeading}{
+% Default |false|.
+% While formatting for word processors,
+% |true| sets the document title to \element{h1}, which is expected for \HTML\ documents,
+% but also causes the lower-level section headings to start at \UI{Heading 2} when
+% imported into LibreOffice.
+% Set to |false| to cause the title to be plain text, and the section headings
+% to begin at \UI{Heading 1}.
+%
+% See \cref{tab:WPsectionheadings} on \cpageref{tab:WPsectionheadings}.
+% }
+%
+% \DescribeBoolean{WPTitleHeading}
+% \margintag{section headings}
+% \begin{docsidebar}[\texttt{WPTitleHeading}]
+% \raggedright
+% \describeWPTitleHeading
+% \end{docsidebar}
+% \index{section>heading, word processor}
+% \index{heading, word processor}
+% \index{word processor>section headings}
+% \index{LibreOffice>section headings}
+%
+% \begin{table}
+% \centering
+% \begin{threeparttable}
+% \caption{Section HTML headings for word-processor conversion}
+% \label{tab:WPsectionheadings}
+% \begin{tabular}{lcccc}
+% \toprule
+% ~ & \multicolumn{4}{c}{HTML headings\tnote{\textasteriskcentered}} \\
+% \cmidrule{2-5}
+% ~ & \multicolumn{2}{c}{With \cs{chapter}} & \multicolumn{2}{c}{Without \cs{chapter}} \\
+% \cmidrule(r){2-3} \cmidrule(l){4-5}
+% ~ & \multicolumn{2}{c}{|WPTitleHeading|} & \multicolumn{2}{c}{|WPTitleHeading|} \\
+% Section & |true| & |false| & |true| & |false| \\
+% \midrule
+% Title & \element{h1} & plain & \element{h1} & plain \\
+% \cs{part} & \element{h2} & \element{h1} & \element{h2} & \element{h1} \\
+% \cs{chapter} & \element{h3} & \element{h2} & --- & --- \\
+% \cs{section} & \element{h4} & \element{h3} & \element{h3} & \element{h2} \\
+% \cs{subsection} & \element{h5} & \element{h4} & \element{h4} & \element{h3} \\
+% \cs{paragraph} & \element{h6} & \element{h5} & \element{h5} & \element{h4} \\
+% \cs{subparagraph} & span & \element{h6} & \element{h6} & \element{h5} \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \footnotesize
+% \item[\textasteriskcentered] For default depths when not |FormatWP|,
+% see \cref{tab:depthsheadings} on \cpageref{tab:depthsheadings}.
+% \end{tablenotes}
+% \end{threeparttable}
+% \smallskip\hrule
+% \end{table}
+%
+% \subsection{Recommendations}
+% \index{word processor>conversion recommendations}
+% \index{LibreOffice>conversion recommendations}
+%
+% For use with LibreOffice Writer, it is recommended to:
+% \margintag{TOC, LOF, LOT}
+% \begin{enumerate}[nosep]
+% \item Set \cs{booltrue}\{FormatWP\}.
+% \item Set \cs{booltrue}\{WPMarkTOC\} and \cs{boolfalse}\{WPMarkLOFT\}.
+% \item Use \pkg{lwarp} to generate the \HTML\ document.
+% \item Copy/paste from the \HTML\ document into an empty LibreOffice Writer document.
+% \item Manually insert a LibreOffice \acro{TOC} in the LibreOffice document.
+% \item Manually add frames around each float, adding a caption which is cut/pasted from
+% each float's simulated caption.
+% \item Manually create cross references.
+% \end{enumerate}
+% This process yields a document with an actual LibreOffice Table of Contents,
+% but a simulated List of Figures and List of Tables.
+%
+% For \pkg{siunitx}, remember to adjust the preamble as mentioned above.
+% \margintag{siunitx}
+%
+% LibreOffice has options in the View menu to turn on/off the display of
+% \margintag{LO view border options}
+% thin borders around table cells and text objects.
+%
+%
+% \subsection{Limitations}
+%
+% Floats and captions are not explicitly converted to LibreOffice floats with their
+% own captions. Floats are surrounded by a thin frame in the LibreOffice editor,
+% and may be marked with |WPMarkFloats|, but are not given a proper LibreOffice
+% object frame.
+% Captions are given an explicit italic formatting,
+% but not a proper LibreOffice paragraph style.
+%
+% Cross references are not actual LibreOffice linked cross references.
+%
+% The List of Figures and List of Tables are not linked.
+% The pasted pseudo \acro{LOF} and \acro{LOT} match the numbering
+% of the \LaTeX\ and \HTML\ versions.
+%
+% Equation numbering is not automatic, but the equation numbers in \SVG\ math
+% will match the \LaTeX\ and \HTML\ output.
+% SVG math is recommended when using the \AmS\ environments, which may have
+% multiple numbered equations per object.
+%
+% As of when last checked, LibreOffice ignores the following:
+% \begin{itemize}
+% \item Minipage alignment.
+% \item Tabular cell vertical alignment.
+% \item Image rotation and scaling.
+% \item Rounded border corners, which are also used by:
+% \begin{itemize}
+% \item \cs{textcircled}
+% \item \pkg{booktabs} trim
+% \end{itemize}
+% \item \cs{hspace} and rules, also used by \pkg{algorithmic}.
+% \item Coloring of text decorations, used by \pkg{soul} and \pkg{ulem}.
+% \item Overline text decoration, used by \pkg{romanbar}.
+% \end{itemize}
+%
+% Libreoffice also has limitations with frames and backgrounds:
+% \begin{itemize}
+% \item Multiple lines in an object are framed individually instead of as a whole.
+% \item Nested frames are not handled correctly.
+% \item Images inside boxes are not framed correctly.
+% \item Spans with background colors and frames are not displayed correctly.
+% \end{itemize}
+%
+%
+%
+%
%
%
% \clearpage
@@ -5219,12 +5654,12 @@ This boolean may be tested by the user for later use.
%
% Also see: \\
% \Cref{sec:printcommands}: \nameref{sec:printcommands} \\
-% \Cref{sec:successfulcommands}: \nameref{sec:successfulcommands} \\
% \Cref{sec:limitations}: \nameref{sec:limitations}
%
% \changes{v0.14}{2016/03/26}{Docs: Troubleshooting cross-references.}
% \changes{v0.16}{2016/04/08}{Docs: Text not converting.}
% \changes{v0.34}{2017/08/08}{Docs: Misplaced alignment character.}
+% \changes{v0.42}{2017/10/13}{Docs: Improper \cs{prevdepth}.}
%
% \begin{description}
%
@@ -5247,7 +5682,21 @@ This boolean may be tested by the user for later use.
% \item Be sure that a print version of the document compiles and
% that your document's \LaTeX{} code is correct, before attempting
% to generate an \HTML\ version.
-% \end{itemize}
+%
+% \begin{description}
+% \item [``Leaders not followed by proper glue'':] This can be caused by
+% a missing |l@<floattype>| or |l@<sectiontype>| definition.
+% See \pkg{lwarp}'s definitions for examples.
+%
+% \item [``Improper \cs{prevdepth}'':] Something tried to use
+% \cs{ensuremath} where \pkg{lwarp} then tries 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.
+% \end{description}
+% \end{itemize}
%
% \item [Missing sections:] ~
% \begin{itemize}
@@ -5257,8 +5706,10 @@ This boolean may be tested by the user for later use.
% \end{itemize}
%
% \item [Missing HTML files:] \
+% \begin{itemize}
% \item See the warning regarding changes to the \HTML\ settings
% at \cref{sec:htmlsettings}.
+% \end{itemize}
%
% \item [Missing / incorrect cross-references:] ~
% \index{cross-references>missing or incorrect}
@@ -5300,13 +5751,11 @@ This boolean may be tested by the user for later use.
% \item |lwarpmk limages| to refresh the |lateximage| images.
% \end{itemize}
%
-% \item[SVG images:] \limitssvgimages
+% \item[SVG images:] \
%
-% \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.
+% \limitssvgimages
%
-% \item [Plain-looking document:] ~
+% \item [Plain-looking document:] \
% \begin{itemize}
% \item The document's \CSS\ stylesheet may not be available, or may be
% linked incorrectly. Verify any \cs{CSSFilename} statements point to
@@ -5386,6 +5835,8 @@ This boolean may be tested by the user for later use.
%
%
%
+% \part{lwarp.sty}
+%
%
% \section{Implementation}
%
@@ -5420,7 +5871,7 @@ This boolean may be tested by the user for later use.
% Testing has primarily been done with the Iceweasel/Firefox browser.
%
%
-% \section{Stack depths}
+% \section{Section depths and HTML headings}
% \label{sec:stackdepths}
% \index{HTML>headings}
% \index{section>depths}\index{stack depths}
@@ -5436,10 +5887,13 @@ This boolean may be tested by the user for later use.
% sections and lists of a deeper level to keep the \HTML\ tags nested correctly.
%
% \begin{table}
+% \centering
+% \begin{threeparttable}
% \caption{Section depths and HTML headings\label{tab:depthsheadings}}
% \begin{tabular}{lcl}
% \toprule
-% Section & \parbox[c]{.35in}{\LaTeX{} depth} & \HTML\ headings \\
+% Section & \parbox[b]{.35in}{\centering\LaTeX\ depth} &
+% HTML headings \tnote{\textasteriskcentered} \\
% \midrule
% title of the entire website & & \element{h1} \\
% none & -5 & new for this package \\
@@ -5454,6 +5908,15 @@ This boolean may be tested by the user for later use.
% listitem & 7 & new for this package, used for list items \\
% \bottomrule
% \end{tabular}
+% \begin{tablenotes}
+% \footnotesize
+% \item{\textasteriskcentered} If |FormatWP| is true,
+% section headings may be adjusted, depending on |WPTitleHeading|.
+% See \cref{tab:WPsectionheadings} on \cpageref{tab:WPsectionheadings}.
+% \end{tablenotes}
+% \end{threeparttable}
+% \smallskip
+% \hrule
% \end{table}
%
% Support for the \pkg{memoir} package will require the addition of a |book|
@@ -6122,6 +6585,8 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{flushend}
\LWR@loadafter{fncychap}
\LWR@loadafter{fnpos}
+% fontenc must be loaded before lwarp
+% fontspec must be loaded before lwarp
\LWR@loadafter{ftnright}
\LWR@loadafter{fullpage}
\LWR@loadafter{fullwidth}
@@ -6134,6 +6599,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{hyperxmp}
\LWR@loadafter{idxlayout}
\LWR@loadafter{indentfirst}
+% inputenc must be loaded before lwarp
\LWR@loadafter{keyfloat}
\LWR@loadafter{layout}
\LWR@loadafter{letterspace}
@@ -6152,17 +6618,21 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
\LWR@loadafter{moreverb}
+% morewrites must be loaded before lwarp
\LWR@loadafter{mparhack}
%\LWR@loadafter{multicol}% loaded by ltxdoc
\LWR@loadafter{multirow}
\LWR@loadafter{nameref}
\LWR@loadafter{needspace}
+% newclude must be loaded before lwarp
\LWR@loadafter{newtxmath}
+% newunicodechar must be loaded before lwarp
\LWR@loadafter{nextpage}
\LWR@loadafter{nonumonpart}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
+\LWR@loadafter{overpic}
\LWR@loadafter{pagenote}
\LWR@loadafter{paralist}
\LWR@loadafter{parskip}
@@ -6655,7 +7125,7 @@ top=1in,bottom=1in,%
% \DescribePackage{environ}
%
-% Used to encapsulate math environments for re-use in \HTML\ ALT text.
+% Used to encapsulate math environments for re-use in \HTML\ \element{alt} text.
%
% \begin{macrocode}
\RequirePackage{environ}
@@ -7018,6 +7488,7 @@ top=1in,bottom=1in,%
% \section{Debugging messages}
+% \codeall
% \begin{macrocode}
\begin{warpall}
% \end{macrocode}
@@ -7076,6 +7547,10 @@ top=1in,bottom=1in,%
}
% \end{macrocode}
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
@@ -7084,6 +7559,12 @@ top=1in,bottom=1in,%
% These booleans modify the \HTML\ output in various ways
% to improve conversion to \EPUB\ or word processor imports.
%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+% \subsection{User-level controls}
%
% \DescribeBoolean{FormatEPUB} Default false.
% Changes \HTML\ output for easy \EPUB\ conversion
@@ -7100,7 +7581,7 @@ top=1in,bottom=1in,%
% \end{macrocode}
%
%
-% \DescribeBoolean{FormatWordProcessor} Default false.
+% \DescribeBoolean{FormatWP} Default false.
% Changes \HTML\ output for easier conversion
% by a word processor.
% Removes headers and nav, prints footnotes per section,
@@ -7109,33 +7590,161 @@ top=1in,bottom=1in,%
% \index{word processor>HTML conversion settings}
% \index{HTML>conversion settings>word processor}
%
-% \changes{v0.28}{2017/04/09}{Added boolean \texttt{FormatWordProcessor}.}
+% \changes{v0.28}{2017/04/09}{Added boolean \texttt{FormatWP}.}
%
% \begin{macrocode}
-\newbool{FormatWordProcessor}
-\boolfalse{FormatWordProcessor}
+\newbool{FormatWP}
+\boolfalse{FormatWP}
% \end{macrocode}
%
%
-% \DescribeBoolean{HTMLMarkFloats}
-% \describeHTMLMarkFloats
+% \DescribeBoolean{WPMarkFloats}
+% \describeWPMarkFloats
% \footnote{Perhaps some day word processors will have \HTML\ import options
-% for identifying \element{div} classes for figures and tables,
-% along with the associated captions.}
+% for identifying \element{figure} and \element{figcaption} tags
+% for figures and tables.}
% \index{word processor>HTML conversion settings}
% \index{HTML>conversion settings>word processor}
%
-% \changes{v0.28}{2017/04/09}{Added boolean \texttt{HTMLMarkFloats}}
+% \changes{v0.28}{2017/04/09}{Added boolean \protect\texttt{HTMLMarkFloats}, changed
+% to \protect\texttt{WPMarkFloats} as of v0.42.}
%
% \begin{macrocode}
-\newbool{HTMLMarkFloats}
-\booltrue{HTMLMarkFloats}
+\newbool{WPMarkFloats}
+\boolfalse{WPMarkFloats}
+% \end{macrocode}
+
+% \DescribeBoolean{WPMarkMinipages}
+% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkMinipages}.}
+% \describeWPMarkMinipages
+% \begin{macrocode}
+\newbool{WPMarkMinipages}
+\boolfalse{WPMarkMinipages}
+% \end{macrocode}
+
+% \DescribeBoolean{WPMarkTOC}
+% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkTOC}.}
+% \describeWPMarkTOC
+% \begin{macrocode}
+\newbool{WPMarkTOC}
+\booltrue{WPMarkTOC}
+% \end{macrocode}
+
+
+% \DescribeBoolean{WPMarkLOFT}
+% \changes{v0.42}{2017/10/19}{Added boolean \protect\texttt{WPMarkLOFT}.}
+% \describeWPMarkLOFT
+% \begin{macrocode}
+\newbool{WPMarkLOFT}
+\boolfalse{WPMarkLOFT}
+% \end{macrocode}
+
+
+% \DescribeBoolean{WPMarkMath}
+% \changes{v0.42}{2017/10/19}{Added boolean \protect\texttt{WPMarkMath}.}
+% \describeWPMarkMath
+% \begin{macrocode}
+\newbool{WPMarkMath}
+\boolfalse{WPMarkMath}
+% \end{macrocode}
+
+
+% \DescribeBoolean{WPTitleHeading}
+% \changes{v0.42}{2017/10/19}{Added boolean \protect\texttt{WPTitleHeading}.}
+% \describeWPTitleHeading
+% \begin{macrocode}
+\newbool{WPTitleHeading}
+\boolfalse{WPTitleHeading}
% \end{macrocode}
% \begin{macrocode}
\end{warpall}
% \end{macrocode}
+%
+% \subsection{Heading adjustments}
+%
+% \changes{v0.42}{2017/10/19}{If \protect\texttt{FormatWP},
+% shift section headings.}
+% If formatting the \HTML\ for a word processor, adjust heading levels.
+%
+% If |WPTitleHeading| is true, adjust so that |part| is \UI{Heading~1}.
+%
+% If |WPTitleHeading| is false, use \element{h1} for the title,
+% and set |part| to \UI{Heading~2}.
+%
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AtBeginDocument{
+\ifbool{FormatWP}{
+\@ifundefined{chapter}{
+\ifbool{WPTitleHeading}{% part and section starting at h2
+\renewcommand*{\LWR@tagtitle}{h1}
+\renewcommand*{\LWR@tagtitleend}{/h1}
+\renewcommand*{\LWR@tagpart}{h2}
+\renewcommand*{\LWR@tagpartend}{/h2}
+\renewcommand*{\LWR@tagsection}{h3}
+\renewcommand*{\LWR@tagsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsection}{h4}
+\renewcommand*{\LWR@tagsubsectionend}{/h4}
+\renewcommand*{\LWR@tagsubsubsection}{h5}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
+\renewcommand*{\LWR@tagparagraph}{h6}
+\renewcommand*{\LWR@tagparagraphend}{/h6}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraphend}{/span}
+}% WPTitleHeading
+{% not WPTitleHeading, part and section starting at h1
+\renewcommand*{\LWR@tagtitle}{div class="title"}
+\renewcommand*{\LWR@tagtitleend}{/div}
+\renewcommand*{\LWR@tagpart}{h1}
+\renewcommand*{\LWR@tagpartend}{/h1}
+\renewcommand*{\LWR@tagsection}{h2}
+\renewcommand*{\LWR@tagsectionend}{/h2}
+\renewcommand*{\LWR@tagsubsection}{h3}
+\renewcommand*{\LWR@tagsubsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsubsection}{h4}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h4}
+\renewcommand*{\LWR@tagparagraph}{h5}
+\renewcommand*{\LWR@tagparagraphend}{/h5}
+\renewcommand*{\LWR@tagsubparagraph}{h6}
+\renewcommand*{\LWR@tagsubparagraphend}{/h6}
+}% not WPTitleHeading
+}% chapter undefined
+{% chapter defined
+\ifbool{WPTitleHeading}{}
+{% not WPTitleHeading, part and chapter starting at h1
+\renewcommand*{\LWR@tagtitle}{div class="title"}
+\renewcommand*{\LWR@tagtitleend}{/div}
+\renewcommand*{\LWR@tagpart}{h1}
+\renewcommand*{\LWR@tagpartend}{/h1}
+\renewcommand*{\LWR@tagchapter}{h2}
+\renewcommand*{\LWR@tagchapterend}{/h2}
+\renewcommand*{\LWR@tagsection}{h3}
+\renewcommand*{\LWR@tagsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsection}{h4}
+\renewcommand*{\LWR@tagsubsectionend}{/h4}
+\renewcommand*{\LWR@tagsubsubsection}{h5}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
+\renewcommand*{\LWR@tagparagraph}{h6}
+\renewcommand*{\LWR@tagparagraphend}{/h6}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraphend}{/span}
+}% not WPTitleHeading
+}% chapter defined
+}{}% FormatWP
+}% AtBeginDocument
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
% \section{Remembering original formatting macros}
@@ -7179,8 +7788,12 @@ top=1in,bottom=1in,%
\let\LWR@origsp\sp
\let\LWR@origsb\sb
-\let\LWR@origtextsuperscript\textsuperscript
-\let\LWR@origtextsubscript\textsubscript
+\LetLtxMacro\LWR@origtextsuperscript\textsuperscript
+\LetLtxMacro\LWR@orig@textsuperscript\@textsuperscript
+\AtBeginDocument{
+\LetLtxMacro\LWR@origtextsubscript\textsubscript
+\LetLtxMacro\LWR@orig@textsubscript\@textsubscript
+}
\LetLtxMacro\LWR@origunderline\underline
\let\LWR@origscriptsize\scriptsize
@@ -7589,6 +8202,13 @@ span.poemtitle {
font-size: 120% ; font-weight: bold;
}
+pre.tabbing {
+ font-family: "Linux Libertine Mono O", "Lucida Console",
+ "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
+ "Liberation Mono", "FreeMono", "Andale Mono",
+ "Nimbus Mono L", "Courier New", monospace;
+}
+
blockquote {
margin-left: 0px ;
margin-right: 0px ;
@@ -7986,6 +8606,11 @@ div.onehalfspace { line-height: 1.5 ; }
div.doublespace { line-height: 2 ; }
+/* Word processor format output: */
+div.wpfigure { border: 1px solid red ; margin: .5ex ; padding: .5ex ; }
+div.wptable { border: 1px solid blue ; margin: .5ex ; padding: .5ex ; }
+div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
+
@@ -9319,8 +9944,9 @@ nav.botnavigation {
% the resulting \HTML\ files.
%
% \changes{v0.28}{2017/04/11}{File \protect\texttt{lwarp\_mathjax.txt}: Updated \protect\acro{CDN} repository.}
-% \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.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.}
%
%
% \begin{macrocode}
@@ -9387,15 +10013,16 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
"https://cdn.mathjax.org/mathjax/contrib";
</script>
-<!-- https://github.com/mathjax/MathJax-third-party-extensions/
- tree/master/siunitx -->
+<!-- https://github.com/burnpanck/MathJax-siunitx -->
+
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
- extensions: ["tex2jax.js","[Contrib]/siunitx/siunitx.js"],
+ extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
});
+ MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
</script>
<script type="text/x-mathjax-config">
@@ -9460,7 +10087,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.41"
+printversion = "v0.42"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -10212,7 +10839,7 @@ end -- not --version
% \begin{macrocode}
\NewDocumentCommand{\LWR@setexparray}{m m m}{%
\ifthenelse{\isempty{#3}}%
-{\csdef{#1#2}{}}
+{\csdef{#1#2}{}}%
{\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}%
}
% \end{macrocode}
@@ -10677,6 +11304,8 @@ end -- not --version
% \subsection{Mapping \LaTeX{} Sections to HTML Sections}
% \begin{macrocode}
+\newcommand*{\LWR@tagtitle}{h1}
+\newcommand*{\LWR@tagtitleend}{/h1}
\newcommand*{\LWR@tagpart}{h2}
\newcommand*{\LWR@tagpartend}{/h2}
\newcommand*{\LWR@tagchapter}{h3}
@@ -11188,6 +11817,51 @@ end -- not --version
% \end{macro}
+% \begin{environment}{LWR@BlockClassWP} \marg{WPstyle} \marg{HTMLstyle} \marg{class} \quad
+% Low-level interface for \element{div} classes with an automatic float ID.
+% These are often used when |\ifbool{FormatWP}|.
+%
+% \changes{v0.42}{2017/10/26}{Added to factor code.}
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}%
+{%
+\LWR@stoppars%
+\ifbool{FormatWP}%
+{%
+ \LWR@maybeincthisfloat%
+ \LWR@htmltag{%
+ div class="#3" %
+ id="autofloat-\arabic{LWR@thisfloat}"%
+ \ifblank{#1}{}{ style="#1"}%
+ }%
+}% FormatWP
+{% not FormatWP
+ \LWR@htmltag{%
+ div class="#3"%
+ \ifblank{#2}{}{ style="#2"}%
+ }%
+}% not FormatWP
+\LWR@startpars%
+}
+{\LWR@htmldivclassend{#3}}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \codeprint
+% \begin{macrocode}
+\begin{warpprint}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
+\end{warpprint}
+% \end{macrocode}
+% \end{environment}
+%
+%
+
+
+
% \subsection{Closing HTML tags}
% \codehtml
@@ -11972,7 +12646,7 @@ end -- not --version
% Used to print footnotes before sections only if formatting for an \EPUB\ or word processor:
% \begin{macrocode}
\newcommand*{\LWR@epubprintpendingfootnotes}{%
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}%
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}%
{\LWR@printpendingfootnotes}%
{}%
}
@@ -11996,10 +12670,17 @@ end -- not --version
% \begin{macro}{\marginpar} \oarg{left} \marg{right}
%
% \changes{v0.21}{2017/02/11}{Fixed source listing.}
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} emulate a wrapfig.}
%
% \begin{macrocode}
\renewcommand{\marginpar}[2][]{%
-\LWR@htmlspanclass{marginpar}{#2}%
+\ifbool{FormatWP}%
+{%
+\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock}
+#2
+\end{LWR@BlockClassWP}
+}%
+{\LWR@htmlspanclass{marginpar}{#2}}%
}
% \end{macrocode}
% \end{macro}
@@ -12105,7 +12786,7 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\LWR@origampersand}{-}[\LWR@thisnewfilename]
+ {\LWR@origampersand}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{+}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{/}{-}[\LWR@thisnewfilename]
@@ -12116,16 +12797,16 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}{@}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{"}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textless}{-}[\LWR@thisnewfilename]
+ {\textless}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textgreater}{-}[\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}%
-{\textbackslash}{-}[\LWR@thisnewfilename]
+ {\textbackslash}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename]
% "~{}" for babel
@@ -12212,7 +12893,7 @@ end -- not --version
% No bottom navigation if are finishing the home page or
% formatting for \EPUB\ or a word-processor.
% \begin{macrocode}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}}
% \end{macrocode}
@@ -12262,7 +12943,7 @@ end -- not --version
%
% No navigation between files if formatting for an \EPUB\ or word processor:
% \begin{macrocode}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@topnavigation}
@@ -12270,7 +12951,7 @@ end -- not --version
%
% No header if between files if formatting for an \EPUB\ or word processor:
% \begin{macrocode}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{
\LWR@htmlelement{header}
@@ -12285,7 +12966,7 @@ end -- not --version
% Print title only if there is one.
% Skip if formatting for an \EPUB\ or word processor:
% \begin{macrocode}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\ifcsvoid{thetitle}{}{\LWR@printthetitle}}
@@ -12293,7 +12974,7 @@ end -- not --version
%
% No side\TOC\ if formatting for an \EPUB\ or word processor:
% \begin{macrocode}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@sidetoc}
@@ -13132,7 +13813,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% force filedepth to single-file only,
% force \HTML\ debug comments off.
% \begin{macrocode}
-\ifbool{FormatWordProcessor}{%
+\ifbool{FormatWP}{%
\setcounter{FileDepth}{-5}%
\boolfalse{HTMLDebugComments}%
}{}
@@ -13273,13 +13954,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% \end{macro}
-% ^^A % Not yet working:
-% ^^A % \begin{macrocode}
-% ^^A % \AfterEndPreamble{
-% ^^A % \LWR@traceinfo{Patching @ensuredmath}% *8*
-% ^^A % \let\@ensuredmath\LWR@ensuredmath
-% ^^A % }
-% ^^A % \end{macrocode}
% \begin{macrocode}
\end{warpHTML}
@@ -13347,7 +14021,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% Presumably has a table-of-contents.
% \begin{macrocode}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{
\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}
@@ -13618,9 +14292,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\printtitle}
{
\LWR@stoppars
-\LWR@htmltag{h1}%
+\LWR@htmltag{\LWR@tagtitle}%
\@title%
-\LWR@htmltag{/h1}
+\LWR@htmltag{\LWR@tagtitleend}
\LWR@startpars
}
% \end{macrocode}
@@ -13633,9 +14307,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printthetitle}
{
\LWR@stoppars
-\LWR@htmltag{h1}%
+\LWR@htmltag{\LWR@tagtitle}%
\thetitle%
-\LWR@htmltag{/h1}
+\LWR@htmltag{\LWR@tagtitleend}
\LWR@startpars
}
% \end{macrocode}
@@ -13879,9 +14553,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% \begin{macrocode}
\DeclareDocumentCommand{\@maketitle}{}{%
- \LWR@stoppars\LWR@htmltag{h1}
+ \LWR@stoppars\LWR@htmltag{\LWR@tagtitle}
\@title
- \LWR@htmltag{/h1}\LWR@startpars
+ \LWR@htmltag{\LWR@tagtitleend}\LWR@startpars
\begin{BlockClass}{author}
\renewcommand{\and}{
\end{BlockClass}
@@ -14170,7 +14844,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
-% \section{Verbatim}
+% \section{Verbatim and tabbing}
% \changes{v0.34}{2017/07/27}{Verbatim refactored to
% remove \protect\pkg{fancyvrb} requirement.}
@@ -14303,11 +14977,33 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@forcenewpage
\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
}
-\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim}
+\AfterEndEnvironment{verbatim}{%
+ \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
+}
}
% \end{macrocode}
% \end{environment}
+
+% \begin{environment}{tabbing}
+%
+% \changes{v0.42}{2017/10/13}{Added.}
+%
+% \begin{macrocode}
+\AfterEndPreamble{
+\LWR@traceinfo{Patching tabbing.}
+\AtBeginEnvironment{tabbing}{%
+\LWR@forcenewpage
+\LWR@atbeginverbatim{tabbing}\unskip\LWR@origvspace*{-\baselineskip}%
+}
+\AfterEndEnvironment{tabbing}{%
+ \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
+}
+}
+% \end{macrocode}
+% \end{environment}
+
+
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
@@ -15365,7 +16061,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% converted to \HTML.
%
% \begin{table}
-% \caption{Tabular \HTML\ column conversions\label{tab:columnconversions}}
+% \caption{Tabular HTML column conversions\label{tab:columnconversions}}
% \index{tabular>HTML colummn conversion}
% \index{HTML>tabular column conversion}
%
@@ -15394,6 +16090,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \item [S:] Converted to 'r'. From the \pkg{siunitx} package.
% \item [D:] Converted to 'c'. From the \pkg{dcolumn} package.
% \item [@, !, \textgreater{}, \textless{}:] One each, in that order.
+% \item [\textbar:] Vertical rule.
% \item [Unknown:] Converted to 'l'.
% \item [\cs{newcolumn}:] Currently treated as unknown.
% \end{description}
@@ -15590,16 +16287,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\newcommand*{\LWR@printbartag}[1]{%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
-{%
-}%
-{ % not muting
- \ifstrequal{#1}{leftedge}{%
- \LWR@getexparray{LWR@colbarspec}{leftedge} %
- }%
- {
- \LWR@getexparray{LWR@colbarspec}{#1} %
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
- } %
+{}% muting or empty
+{% not muting
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
+ \ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
}% not muting
}
% \end{macrocode}
@@ -15630,7 +16321,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@subaddcmidruletrim{}{}%
\LWR@printbartag{#2}%
"%
+ \LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@tdendstyles%
}%
% \end{macrocode}
% Create an empty cell if muting for the \cs{bottomrule}:
@@ -15719,7 +16412,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+% \end{macrocode}
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} add cell alignment.}
+% \begin{macrocode}
+ \LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@addformatwpalignment%
+ \LWR@tdendstyles%
}%
% \end{macrocode}
% If this is a p, m, b, or X column, allow paragraphs:
@@ -15800,9 +16499,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \DescribeLength{\LWR@thiscmidrulewidth}
-% The width of the next rule, defaulting to \cs{lightrulewidth}.
+% The width of the next rule, defaulting to \cs{LWR@cmidrulewidth}.
%
-% If not \cs{lightrulewidth}, a style will be used to generate
+% If not \cs{LWR@cmidrulewidth}, a style will be used to generate
% the custom width.
%
% Assigned from the |LWR@midrules| array.
@@ -15877,17 +16576,56 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
-% Used to compute margins, tabular trims
+% Used to compute margins, tabular trims:
% \begin{macrocode}
\newlength{\LWR@templengthone}%
\newlength{\LWR@templengthtwo}%
% \end{macrocode}
+% Used to add a style to a table data cell:
+% \begin{macrocode}
+\newboolean{LWR@tdhavecellstyle}
+% \end{macrocode}
+
+% \begin{macro}{\LWR@tdstartstyles}
+% Begins possibly adding a table data cell style.
+% \begin{macrocode}
+\newcommand*{\LWR@tdstartstyles}{\global\boolfalse{LWR@tdhavecellstyle}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@tdaddstyle}
+% Starts adding a table data cell style.
+% \begin{macrocode}
+\newcommand*{\LWR@tdaddstyle}{%
+\ifbool{LWR@tdhavecellstyle}%
+{; }%
+{ style="}%
+\booltrue{LWR@tdhavecellstyle}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@tdendstyles}
+% Finishes possibly adding a table data cell style.
+% Prints the closing quote.
+% \begin{macrocode}
+\newcommand*{\LWR@tdendstyles}{%
+\ifbool{LWR@tdhavecellstyle}{%
+ "%
+ \global\boolfalse{LWR@tdhavecellstyle}%
+}{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \begin{macro}{\LWR@subaddcmidruletrim} \marg{lefttrim} \marg{righttrim}
% Adds a \cs{cmidrule} with optional trim.
%
% \changes{v0.41}{2017/10/05}{Added.}
+% \changes{v0.42}{2017/10/19}{0pt if no rule given.}
%
% \begin{macrocode}
\newcommand*{\LWR@subaddcmidruletrim}[2]{%
@@ -15902,7 +16640,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Remember the width of the rule:
% \begin{macrocode}
\setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
-}{}%
+}%
+{%
+ \setlength{\LWR@thiscmidrulewidth}{0pt}%
+}%
}
% \end{macrocode}
% \end{macro}
@@ -15927,20 +16668,35 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% If not default width, add a custom style with width and color
% depending on |thiswidth|.
+%
+% Must be placed between \cs{LWR@tdstartstyles} and \cs{LWR@tdendstyles}.
+%
+% \changes{v0.42}{2017/10/10}{If \protect\texttt{FormatWP} force explicit border.}
+%
% \begin{macrocode}
\newcommand{\LWR@addrulewidth}[2]{%
% \end{macrocode}
% Only add a custom width if |thiswidth| is different than the |defaultwidth|:
% \begin{macrocode}
-\ifdimcomp{#1}{=}{#2}%
+\ifboolexpr{%
+ test{\ifdimcomp{#1}{=}{0pt}}%
+ or ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )%
+}%
{}% default width
{% custom width
% \end{macrocode}
% Ensure that the width is wide enough to display in the browser:
% \begin{macrocode}
\LWR@forceminwidth{#1}%
- \uselengthunit{PT} % explicit space
- style="border-top:\rndprintlength{\LWR@atleastonept} solid %
+% \end{macrocode}
+% Begin adding a style:
+% \begin{macrocode}
+ \LWR@tdaddstyle%
+% \end{macrocode}
+% The style itself:
+% \begin{macrocode}
+ \uselengthunit{PT}%
+ border-top:\rndprintlength{\LWR@atleastonept} solid %
% \end{macrocode}
% The darkness of the color depends on the thickness of the rule:
% \begin{macrocode}
@@ -15951,7 +16707,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{\#808080}%
{black}%
}% lightrule or heavier
- "%
}% custom width
}
% \end{macrocode}
@@ -15959,6 +16714,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\LWR@addcmidrulewidth}
+% Adds a \attribute{style} for the rule width.
+%
+% Must be placed between \cs{LWR@tdstartstyles} and \cs{LWR@tdendstyles}.
% \begin{macrocode}
\newcommand{\LWR@addcmidrulewidth}{%
\LWR@addrulewidth{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
@@ -15968,6 +16726,41 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
+% \begin{macro}{\LWR@WPcell} \marg{text-align} \marg{vertical-align}
+% \begin{macrocode}
+\newcommand*{\LWR@WPcell}[2]{%
+\LWR@tdaddstyle%
+text-align:#1; vertical-align:#2%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@addformatwpalignment}
+% If |FormatWP|, adds a \attribute{style} for the alignment.
+%
+% Must be placed between \cs{LWR@tdstartstyles} and \cs{LWR@tdendstyles}.
+%
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} add explicit style
+% for cell alignment.}
+% \begin{macrocode}
+\newcommand*{\LWR@addformatwpalignment}{%
+\ifbool{FormatWP}{%
+\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]%
+\ifdefstring{\LWR@strresult}{l}{\LWR@WPcell{left}{middle}}{}%
+\ifdefstring{\LWR@strresult}{c}{\LWR@WPcell{center}{middle}}{}%
+\ifdefstring{\LWR@strresult}{r}{\LWR@WPcell{right}{middle}}{}%
+\ifdefstring{\LWR@strresult}{p}{\LWR@WPcell{left}{bottom}}{}%
+\ifdefstring{\LWR@strresult}{m}{\LWR@WPcell{left}{middle}}{}%
+\ifdefstring{\LWR@strresult}{b}{\LWR@WPcell{left}{top}}{}%
+\ifdefstring{\LWR@strresult}{P}{\LWR@WPcell{center}{bottom}}{}%
+\ifdefstring{\LWR@strresult}{M}{\LWR@WPcell{center}{middle}}{}%
+\ifdefstring{\LWR@strresult}{B}{\LWR@WPcell{center}{top}}{}%
+}{}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \subsection{Multicolumns}
% \subsubsection{Parsing multicolumns}
@@ -16214,7 +17007,13 @@ rowspan="#2" %
% Close the class tag's opening quote:
% \begin{macrocode}
"%
+% \end{macrocode}
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} add cell alignment.}
+% \begin{macrocode}
+\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+\LWR@addformatwpalignment%
+\LWR@tdendstyles%
}% end of the opening table data tag
\global\boolfalse{LWR@intabularmetadata}%
\LWR@parsemulticolumnalignment{#4}{\LWR@printmccoldata}%
@@ -16304,9 +17103,9 @@ rowspan="#2" %
% Star version, show a caption but do not make a LOT entry:
% \begin{macrocode}
{% yes star
- \LWR@htmlblocktag{figcaption}%
+ \LWR@figcaption%
#3%
- \LWR@htmlblocktag{/figcaption}%
+ \endLWR@figcaption%
}%
{% No star:
% \end{macrocode}
@@ -16327,9 +17126,9 @@ rowspan="#2" %
% \end{macrocode}
% Create an \HTML\ caption. Afterwards, maybe make a LOT entry.
% \begin{macrocode}
- \LWR@htmlblocktag{figcaption}%
+ \LWR@figcaption%
\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
- \LWR@htmlblocktag{/figcaption}%
+ \endLWR@figcaption%
% \end{macrocode}
% See if an optional caption was given:
% \begin{macrocode}
@@ -16843,16 +17642,25 @@ rowspan="#2" %
% If so, optional space below the line may be specified, but will be ignored.
%
% \changes{v0.40}{2017/09/06}{Added.}
+% \changes{v0.42}{2017/10/19}{If \protect\texttt{FormatWP} force explicit border.}
%
% \begin{macrocode}
\AtBeginDocument{
\@ifpackageloaded{lwarp-tabls}
-{\newcommand*{\LWR@hline}[1][]{%
- \booltrue{LWR@doinghline}%
- \LWR@getmynexttoken}}
-{\newcommand*{\LWR@hline}{%
- \booltrue{LWR@doinghline}%
- \LWR@getmynexttoken}}
+{
+\newcommand*{\LWR@hline}[1][]{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+}
+{
+\newcommand*{\LWR@hline}{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+}
}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -16967,19 +17775,28 @@ rowspan="#2" %
{\LWR@docmidrule{##1}\LWR@getmynexttoken}%
% \end{macrocode}
% \changes{v0.41}{2017/10/03}{Improved rules.}
+% \changes{v0.42}{2017/10/19}{If \protect\texttt{FormatWP} force explicit border.}
% \begin{macrocode}
\DeclareDocumentCommand{\toprule}{o d()}
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doingtbrule}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
\LWR@getmynexttoken}%
%
\DeclareDocumentCommand{\midrule}{o d()}%
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doinghline}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ }%
\LWR@getmynexttoken}%
%
\DeclareDocumentCommand{\cmidrule}{O{\LWR@cmidrulewidth} d() m}%
@@ -16989,7 +17806,11 @@ rowspan="#2" %
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doingtbrule}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
\LWR@getmynexttoken}%
%
\DeclareDocumentCommand{\addlinespace}{o}{}%
@@ -17708,13 +18529,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\LWR@floatbegin} \marg{type} \oarg{placement}
%
% Begins a \cs{newfloat} environment.
+%
% \begin{macrocode}
\NewDocumentCommand{\LWR@floatbegin}{m o}{%
-\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{%
-
-=== #1 begin
-
-}{}%
+\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars
% \end{macrocode}
% There is a new float, so increment the unique float counter:
@@ -17724,20 +18542,30 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
%
% \begin{macrocode}
-\begingroup
+\begingroup%
% \end{macrocode}
% Settings while inside the environment:
% \begin{macrocode}
-\LWR@origraggedright
+\LWR@origraggedright%
% \end{macrocode}
% Open an \HTML\ |figure| tag:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} add a text frame.}
% \begin{macrocode}
-\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}
+\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}%
+\ifbool{FormatWP}{%
+ \LWR@orignewline%
+ \LWR@BlockClassWP{}{}{wp#1}%
+}{}%
% \end{macrocode}
% \begin{macrocode}
-\renewcommand*{\@captype}{#1}
-\caption@settype{#1}
-\LWR@startpars
+\renewcommand*{\@captype}{#1}%
+\caption@settype{#1}%
+\LWR@startpars%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+
+=== begin #1 ===
+
+}{}%
}
% \end{macrocode}
% \end{macro}
@@ -17758,16 +18586,22 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% Ends a \cs{newfloat} environment.
% \begin{macrocode}
\newcommand*{\LWR@floatend}{%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+
+=== end ===
+
+}{}%
\LWR@stoppars%
+% \end{macrocode}
+% Close an \HTML\ |figure| tag:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} add a text frame.}
+% \begin{macrocode}
+\ifbool{FormatWP}{\endLWR@BlockClassWP}{}%
\LWR@htmlelementend{figure}%
\endgroup%
\boolfalse{LWR@freezethisfloat}%
\LWR@startpars%
-\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{%
-
-=== end
-
-}{}%
+\ifbool{FormatWP}{\newline}{}%
}
% \end{macrocode}
% \end{macro}
@@ -17881,6 +18715,29 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\setcounter{LWR@latestautopage}{1}
% \end{macrocode}
+
+% \begin{environment}{LWR@figcaption}
+% \qquad Encapsulates a caption inside \element{figcaption},
+% and if |FormatWP| then also a \element{div} with an italic style.
+% \changes{v0.42}{2017/10/20}{If \protect\texttt{FormatWP} forces italic captions.}
+% \begin{macrocode}
+\newenvironment*{LWR@figcaption}
+{%
+\LWR@htmlblocktag{figcaption}
+\ifbool{FormatWP}{%
+\begin{BlockClass}[font-style:italic]{italic}
+\LWR@origvspace*{\baselineskip}
+}{}%
+}
+{%
+\ifbool{FormatWP}{\end{BlockClass}}{}%
+\LWR@htmlblocktag{/figcaption}%
+}
+% \end{macrocode}
+% \end{environment}
+
+
+
% \begin{macrocode}
\let\LWR@origcaption@begin\caption@begin
\let\LWR@origcaption@end\caption@end
@@ -17909,7 +18766,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% Enclose the original caption code inside an \HTML\ tag:
% \begin{macrocode}
-\LWR@htmlblocktag{figcaption}%
+\LWR@figcaption%
\LWR@origcaption@begin%
}
% \end{macrocode}
@@ -17928,7 +18785,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% Closing tag:
% \begin{macrocode}
-\LWR@htmlblocktag{/figcaption}%
+\endLWR@figcaption%
\endgroup%
% \leavevmode% avoid bad space factor (0) error
\LWR@traceinfo{LWR@caption@end: done}%
@@ -18129,6 +18986,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\@starttoc} \marg{ext}
%
% Patch \cs{@starttoc} to encapsulate the \TOC\ inside \HTML\ tags:
% \begin{macrocode}
@@ -18140,20 +18998,26 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@htmlelementclassend{nav}{#1}
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\tableofcontents}
% Patch \cs{tableofcontents}, etc. to print footnotes first.
% \pkg{newfloat} uses \cs{listoffigures} for all future float types.
% \begin{macrocode}
\let\LWR@origtableofcontents\tableofcontents
-\let\LWR@origlistoffigures\listoffigures
-\let\LWR@origlistoftables\listoftables
\renewcommand*{\tableofcontents}{%
% \end{macrocode}
% Do not print the table of contents if formatting for a word processor,
% which will presumably auto-generate its own updated table of contents:
+% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkTOC}.}
% \begin{macrocode}
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkTOC}}{
+
+=== table of contents ===
+
+}
+{
% \end{macrocode}
% Copy the |.toc| file to |.sidetoc| for printing the side\TOC.
% The original |.toc| file is renewed when \cs{tableofcontents} is finished.
@@ -18163,20 +19027,46 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@origtableofcontents
}
}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\listoffigures}
+% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkLOFT}.}
+% \begin{macrocode}
+\let\LWR@origlistoffigures\listoffigures
+
\renewcommand*{\listoffigures}{
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+
+=== list of figures ===
+
+}
+{
\LWR@printpendingfootnotes
\LWR@origlistoffigures
}
}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\listoftables}
+% \changes{v0.42}{2017/10/18}{Added boolean \protect\texttt{WPMarkLOFT}.}
+% \begin{macrocode}
+\let\LWR@origlistoftables\listoftables
\renewcommand*{\listoftables}{
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+
+=== list of tables ===
+
+}
+{
\LWR@printpendingfootnotes
\LWR@origlistoftables
}
}
% \end{macrocode}
+% \end{macro}
% \subsection{High-level TOC commands}
@@ -18575,37 +19465,134 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
+% \section{Restoring original formatting}
+%
+%
+% \begin{macro}{\LWR@restoreorigformatting}
+% Used to temporarily restore
+% the print-mode meaing 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.
+%
+% Various packages add to this macro using \cs{appto}.
+%
+% \label{sec:restoreorigformatting}
+%
+% \changes{v0.34}{2017/08/05}{Improved font control.}
+% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
+% \changes{v0.36}{2017/08/16}{\pkg{siunitx}: Improved super/subscripts in a \env{lateximage}.}
+% \changes{v0.39}{2017/09/01}{Appended with \cs{appto} instead of calling various macros.}
+% \changes{v0.40}{2017/09/09}{Improved symbols inside a \env{lateximage}.}
+% \changes{v0.40}{2017/09/09}{Improved \protect\LaTeX\ logos inside a \env{lateximage}.}
+% \changes{v0.40}{2017/09/09}{Nullified \cs{InlineClass}, etc. inside a \env{lateximage}.}
+% \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.}
+%
+% \begin{macrocode}
+\newcommand*{\LWR@restoreorigformatting}{%
+\LWR@traceinfo{LWR@restoreorigformatting}%
+\linespread{1}%
+\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
+\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
+\renewcommand{\BlockClassSingle}[2]{##2}%
+\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LetLtxMacro\rule\LWR@origrule%
+\let\,\LWR@origcomma% disable HTML short unbreakable space
+\let\textellipsis\LWR@origtextellipsis%
+\let\textless\LWR@origtextless%
+\let\textgreater\LWR@origtextgreater%
+\LetLtxMacro{\textrm}{\LWR@origtextrm}%
+\LetLtxMacro{\textsf}{\LWR@origtextsf}%
+\LetLtxMacro{\texttt}{\LWR@origtexttt}%
+\LetLtxMacro{\textbf}{\LWR@origtextbf}%
+\LetLtxMacro{\textmd}{\LWR@origtextmd}%
+\LetLtxMacro{\textit}{\LWR@origtextit}%
+\LetLtxMacro{\textsl}{\LWR@origtextsl}%
+\LetLtxMacro{\textsc}{\LWR@origtextsc}%
+\LetLtxMacro{\textup}{\LWR@origtextup}%
+\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
+\LetLtxMacro{\emph}{\LWR@origemph}%
+\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
+\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
+\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
+\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
+\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
+\LetLtxMacro{\upshape}{\LWR@origupshape}%
+\LetLtxMacro{\slshape}{\LWR@origslshape}%
+\LetLtxMacro{\scshape}{\LWR@origscshape}%
+\LetLtxMacro{\itshape}{\LWR@origitshape}%
+\LetLtxMacro{\em}{\LWR@origem}%
+\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
+\let\sp\LWR@origsp%
+\let\sb\LWR@origsb%
+\LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
+\LetLtxMacro\@textsuperscript\LWR@orig@textsuperscript%
+\LetLtxMacro\textsubscript\LWR@origtextsubscript%
+\LetLtxMacro\@textsubscript\LWR@orig@textsubscript%
+\LetLtxMacro\underline\LWR@origunderline%
+\let~\LWR@origtilde%
+\let\enskip\LWR@origenskip%
+\let\quad\LWR@origquad%
+\let\qquad\LWR@origqquad%
+\LetLtxMacro{\tabular}{\LWR@origtabular}%
+\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
+\LetLtxMacro\toprule\LWR@origtoprule%
+\LetLtxMacro\midrule\LWR@origmidrule%
+\LetLtxMacro\cmidrule\LWR@origcmidrule%
+\LetLtxMacro\bottomrule\LWR@origbottomrule%
+\LetLtxMacro\addlinespace\LWR@origaddlinespace%
+\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
+\LetLtxMacro\specialrule\LWR@origspecialrule%
+\let\newline\LWR@orignewline%
+\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
+\LetLtxMacro\includegraphics\LWR@origincludegraphics%
+\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
+\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
+\let\reflectbox\LWR@origreflectbox%
+\LetLtxMacro\resizebox\LWR@origresizebox%
+\let\framebox\LWR@origframebox%
+\let\makebox\LWR@origmakebox%
+\let\fbox\LWRprint@fbox%
+\let\fboxBlock\LWRprint@fbox%
+\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
+\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
+\LetLtxMacro{\minipage}{\LWR@origminipage}%
+\let\endminipage\LWR@endminipage%
+\LetLtxMacro{\parbox}{\LWR@origparbox}%
+\let\TeX\LWR@origTeX%
+\let\LaTeX\LWR@origLaTeX%
+\let\LaTeXe\LWR@origLaTeXe%
+\renewcommand*{\Xe}{X\textsubscript{E}}%
+\LetLtxMacro\@ensuredmath\LWR@origensuredmath%
+%
+\LWR@restoreorigaccents%
+%
+\LWR@FBcancel%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
% \section{Math}
% \label{sec:math}
%
+%
+%
+% \subsection{Limitations}
+%
% \limitsmath
%
%
-% \label{ex:mathjaxmacros}
-% As an example of using custom \LaTeX\ macros with MathJax,
-% \margintag{custom MathJax macros}
-% place the following at the start of the document,
-% after |\begin{document}|:
-% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
-% \begin{warpHTML} % Only for HTML output,
-% \ifbool{mathjax} % and only for MathJax output:
-% {
-% \( % New macros for MathJax are placed inside a math expression:
-% \newcommand{\expval}[1]{\langle#1\rangle}
-% \newcommand{\abs}[1]{\lvert#1\rvert}
-% \)
-% }{}
-% \end{warpHTML}
-% \end{Verbatim}
-
-
+%
+% \subsection{Inline and display math}
+%
+%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
-
% \DescribeMacro{\$}
% Plain dollar signs appearing in the \HTML\ output may be interpreted
% by MathJax to be math shifts.
@@ -18635,8 +19622,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
-% \subsection{Inline and display math}
-
% \begin{macrocode}
\LetLtxMacro\LWR@origdollar$
\LetLtxMacro\LWR@secondorigdollar$% balance for editor syntax highlighting
@@ -18660,48 +19645,70 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\LWR@doubledollar}
+%
% \changes{v0.19}{2016/05/25}{MathJax support.}
+% \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.}
+% \changes{v0.42}{2017/10/16}{Improved line spacing with mathjax.}
+%
% Redefine the double dollar sign to place math inside a \env{lateximage}, or use MathJax:
% \begin{macrocode}
\gdef\LWR@doubledollar$#1$${
-\ifbool{mathjax}%
+% \end{macrocode}
+% If MathJax or formatting for a word processor, print the \LaTeX\ expression:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} print LaTeX expression.}
+% \begin{macrocode}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
% \end{macrocode}
% For MathJax, print the math between |\[| and |\]|:
% \begin{macrocode}
-{\textbackslash[\LWR@HTMLsanitize{#1}\textbackslash]}
+{
+
+ \textbackslash[%
+ \LWR@HTMLsanitize{#1}%
+ \textbackslash]
+
+}% mathjax
% \end{macrocode}
-% For SVG, print the math inside a \env{lateximage}, with an ALT tag of the \LaTeX\ code:
+% For SVG, print the math inside a \env{lateximage},
+% with an \element{alt} tag of the \LaTeX\ code:
% \begin{macrocode}
{% not mathjax
-\begin{lateximage}%
-[\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
-\LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
-\end{lateximage}
+ \begin{lateximage}%
+ [\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
+ \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
+ \end{lateximage}%
-}
+}% not mathjax
}%
% \end{macrocode}
% \end{macro}
-
+%
+%
% \begin{macro}{\LWR@singledollar}
+%
% \changes{v0.19}{2016/05/25}{MathJax support.}
+%
% Redefine the single dollar sign to place math inside a \env{lateximage}, or use MathJax:
+%
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} print LaTeX expression.}
% \begin{macrocode}
\gdef\LWR@subsingledollar#1{%
-\ifbool{mathjax}%
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
% \end{macrocode}
% For MathJax, print the math between |\(| and |\)|:
% \begin{macrocode}
-{\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}
+{%
+ {\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}%
+}% mathjax
% \end{macrocode}
-% For SVG, print the math inside a \env{lateximage}, with an ALT tag of the \LaTeX\ code:
+% For SVG, print the math inside a \env{lateximage}, with an \element{alt} tag of the \LaTeX\ code:
% \begin{macrocode}
{% not mathjax
- \begin{lateximage}%
- [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
- \LWR@origdollar#1\LWR@origdollar%
- \end{lateximage}%
+ \begin{lateximage}%
+ [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
+ \LWR@origdollar#1\LWR@origdollar%
+ \end{lateximage}%
}%
}
@@ -18731,12 +19738,17 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\@ensuredmath} \marg{expression} Not yet adapted to \pkg{lwarp}.
%
+% \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.}
+%
% \begin{macrocode}
-\let\LWR@orig@ensuredmath\@ensuredmath
+\LetLtxMacro\LWR@origensuredmath\@ensuredmath
-\newcommand*{\LWR@ensuredmath}[1]{%
-\LWR@traceinfo{@ensuredmath: page \thepage: \detokenize{#1}}%
-\LWR@subsingledollar{#1}%
+\renewcommand{\@ensuredmath}[1]{%
+\ifmmode%
+ \LWR@origensuredmath{#1}%
+\else%
+ \LWR@subsingledollar{\relax#1}%
+\fi%
}
% \end{macrocode}
% \end{macro}
@@ -18823,105 +19835,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macro}
%
%
-%
-%
-% \begin{macro}{\LWR@restoreorigformatting}
-% While producing \SVG\ math or a \env{lateximage},
-% use regular \LaTeX\ formatting instead of \HTML\ tags.
-%
-% Various packages add to this macro using \cs{appto}.
-%
-% \label{sec:restoreorigformatting}
-%
-% \changes{v0.34}{2017/08/05}{Improved font control.}
-% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
-% \changes{v0.36}{2017/08/16}{\pkg{siunitx}: Improved super/subscripts in a \env{lateximage}.}
-% \changes{v0.39}{2017/09/01}{Appended with \cs{appto} instead of calling various macros.}
-% \changes{v0.40}{2017/09/09}{Improved symbols inside a \env{lateximage}.}
-% \changes{v0.40}{2017/09/09}{Improved \protect\LaTeX\ logos inside a \env{lateximage}.}
-% \changes{v0.40}{2017/09/09}{Nullified \cs{InlineClass}, etc. inside a \env{lateximage}.}
-%
-% \begin{macrocode}
-\newcommand*{\LWR@restoreorigformatting}{%
-\LWR@traceinfo{LWR@restoreorigformatting}%
-\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
-\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
-\renewcommand{\BlockClassSingle}[2]{##2}%
-\LetLtxMacro{\hspace}{\LWR@orighspace}%
-\LetLtxMacro\rule\LWR@origrule%
-\let\,\LWR@origcomma% disable HTML short unbreakable space
-\let\textellipsis\LWR@origtextellipsis%
-\let\textless\LWR@origtextless%
-\let\textgreater\LWR@origtextgreater%
-\LetLtxMacro{\textrm}{\LWR@origtextrm}%
-\LetLtxMacro{\textsf}{\LWR@origtextsf}%
-\LetLtxMacro{\texttt}{\LWR@origtexttt}%
-\LetLtxMacro{\textbf}{\LWR@origtextbf}%
-\LetLtxMacro{\textmd}{\LWR@origtextmd}%
-\LetLtxMacro{\textit}{\LWR@origtextit}%
-\LetLtxMacro{\textsl}{\LWR@origtextsl}%
-\LetLtxMacro{\textsc}{\LWR@origtextsc}%
-\LetLtxMacro{\textup}{\LWR@origtextup}%
-\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
-\LetLtxMacro{\emph}{\LWR@origemph}%
-\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
-\LetLtxMacro{\upshape}{\LWR@origupshape}%
-\LetLtxMacro{\slshape}{\LWR@origslshape}%
-\LetLtxMacro{\scshape}{\LWR@origscshape}%
-\LetLtxMacro{\itshape}{\LWR@origitshape}%
-\LetLtxMacro{\em}{\LWR@origem}%
-\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
-\let\sp\LWR@origsp%
-\let\sb\LWR@origsb%
-\let\textsuperscript\LWR@origtextsuperscript%
-\let\textsubscript\LWR@origtextsubscript%
-\LetLtxMacro\underline\LWR@origunderline%
-\let~\LWR@origtilde%
-\let\enskip\LWR@origenskip%
-\let\quad\LWR@origquad%
-\let\qquad\LWR@origqquad%
-\LetLtxMacro{\tabular}{\LWR@origtabular}%
-\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
-\LetLtxMacro\toprule\LWR@origtoprule%
-\LetLtxMacro\midrule\LWR@origmidrule%
-\LetLtxMacro\cmidrule\LWR@origcmidrule%
-\LetLtxMacro\bottomrule\LWR@origbottomrule%
-\LetLtxMacro\addlinespace\LWR@origaddlinespace%
-\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
-\LetLtxMacro\specialrule\LWR@origspecialrule%
-\let\newline\LWR@orignewline%
-\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
-\LetLtxMacro\includegraphics\LWR@origincludegraphics%
-\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
-\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
-\let\reflectbox\LWR@origreflectbox%
-\LetLtxMacro\resizebox\LWR@origresizebox%
-\let\framebox\LWR@origframebox%
-\let\makebox\LWR@origmakebox%
-\let\fbox\LWRprint@fbox%
-\let\fboxBlock\LWRprint@fbox%
-\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
-\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
-\LetLtxMacro{\minipage}{\LWR@origminipage}%
-\let\endminipage\LWR@endminipage%
-\LetLtxMacro{\parbox}{\LWR@origparbox}%
-\let\TeX\LWR@origTeX%
-\let\LaTeX\LWR@origLaTeX%
-\let\LaTeXe\LWR@origLaTeXe%
-\renewcommand*{\Xe}{X\textsubscript{E}}%
-%
-\LWR@restoreorigaccents%
-%
-\LWR@FBcancel%
-}
-% \end{macrocode}
-% \end{macro}
-
-
% \begin{macro}{\LWR@hidelatexequation} \marg{environment} \marg{contents}
%
% Creates the \LaTeX{} version of the equation
@@ -19020,7 +19933,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% For \SVG\ math output,
% the contents are typeset using the original \env{equation}
-% inside a \env{lateximage}, along with an ALT tag
+% inside a \env{lateximage}, along with an \element{alt} tag
% containing a detokenized copy of the \LaTeX\ source for
% the math.
%
@@ -19032,7 +19945,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\NewEnviron{equation}{%
-\ifbool{mathjax}
+% \end{macrocode}
+% If |mathjax| or |FormatWP|, print the \LaTeX\ expression:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} print LaTeX expression.}
+% \begin{macrocode}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
% \end{macrocode}
% MathJax output:
% \begin{macrocode}
@@ -19049,16 +19966,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
% \end{macrocode}
% SVG output:
-% Create the |lateximage| along with an \HTML\ ALT tag
+% Create the |lateximage| along with an \HTML\ \element{alt} tag
% having an equation number, the \LaTeX{} equation environment
% commmands, and the contents of the environment's \cs{BODY}.
% \begin{macrocode}
{% not mathjax
% \end{macrocode}
-% Begin the \env{lateximage} with an ALT tag containing the math source:
+% Begin the \env{lateximage} with an \element{alt} tag containing the math source:
% \begin{macrocode}
- \begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
+ \begin{lateximage}[(\LWR@equationtag) \textbackslash{begin\{equation\}} %
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} %
\textbackslash{end\{equation\}}]% alt tag
% \end{macrocode}
% Create the actual \LaTeX-formatted equation inside
@@ -19068,13 +19985,19 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BODY% contents collected by NewEnviron
\LWR@origendequation
\end{lateximage}%
-}
+}% not mathjax
% \end{macrocode}
% After the environment, if MathJax, print the math to the \HTML\ output
% for MathJax processing:
% \begin{macrocode}
-}[\ifbool{mathjax}{\LWR@addmathjax{equation}{\BODY}}{}]
+}[%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {%
+ \LWR@addmathjax{equation}{\BODY}%
+ }{}%
+
+]
% \end{macrocode}
% \end{environment}
@@ -19111,7 +20034,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\newcommand*{\LWR@htmlmathlabel}[1]{%
\LWR@traceinfo{LWR@htmlmathlabel #1}%
-\ifbool{mathjax}{%
+% \end{macrocode}
+% If |mathjax| or |FormatWP|, print the \LaTeX\ expression:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} print LaTeX expression.}
+% \begin{macrocode}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
% \end{macrocode}
% The combined \LaTeX\ \& \HTML\ label is printed in a \cs{text} field:
% \begin{macrocode}
@@ -19182,8 +20110,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% and thus requires special handling.
%
% For \SVG\ math: Each envrionment is encapsulated inside a \env{lateximage} environment,
-% along with a special |LWRAMSMATHBODY| argument
-% telling \env{lateximage} to use as the \HTML\ ALT tag the environment's contents which
+% along with a special optional argument of \cs{LWR@amsmathbody}
+% or \cs{LWR@amsmathbodynumbered}
+% telling \env{lateximage} to use as the \HTML\ \element{alt} tag
+% the environment's contents which
% were automatically captured by the \AmS{} environment.
%
% For MathJax: Each environment is syched with \LaTeX's equation numbers,
@@ -19214,10 +20144,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcommand{\LWR@eqnarrayfactor}{%
% \end{macrocode}
%
-% Different behavior depending on MathJax vs \SVG\ math:
+% If |mathjax| or |FormatWP|, print the \LaTeX\ expression:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} print LaTeX expression.}
% \begin{macrocode}
-\ifbool{mathjax}
-{
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
% \end{macrocode}
%
% If MathJax, the environment contents (the \cs{BODY}) are executed in a
@@ -19258,8 +20189,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% For numbered \SVG\ equations, first create a \env{lateximage} with
% an \attribute{alt} attribute containing sanitized copy of the source code:
+% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
% \begin{macrocode}
- \begin{lateximage}[\LWR@addmathjax{eqnarray}{\BODY}]
+ \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
+ \LWR@addmathjax{eqnarray}{\BODY}]
% \end{macrocode}
% Then create the image contents using an actual \env{eqnarray}:
% \begin{macrocode}
@@ -19312,20 +20245,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{multline}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\booltrue{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{multline}]
}
}
\AfterEndEnvironment{multline}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
@@ -19342,20 +20275,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{multline*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\booltrue{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{multline*}]
}
}
\AfterEndEnvironment{multline*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
@@ -19373,20 +20306,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{gather}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{gather}]
}
}
\AfterEndEnvironment{gather}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{gather}{\the\@envbody}
@@ -19401,20 +20334,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{gather*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{gather*}]
}
}
\AfterEndEnvironment{gather*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{gather*}{\the\@envbody}
@@ -19430,20 +20363,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{align}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{align}]
}
}
\AfterEndEnvironment{align}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{align}{\the\@envbody}
@@ -19459,20 +20392,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{align*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{align*}]
}
}
\AfterEndEnvironment{align*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{align*}{\the\@envbody}
@@ -19488,20 +20421,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{flalign}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{flalign}]
}
}
\AfterEndEnvironment{flalign}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{flalign}{\the\@envbody}
@@ -19517,20 +20450,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\BeforeBeginEnvironment{flalign*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{flalign*}]
}
}
\AfterEndEnvironment{flalign*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{flalign*}{\the\@envbody}
@@ -19550,14 +20483,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \section{Lateximages}
-
-% A |\lateximage| is typeset on its own \PDF\ page inside an \HTML\ comment
+%
+% \subsection{Description}
+%
+% \DescribeEnv{lateximage}
+% A \env{lateximage} is a piece of the document which is typeset in
+% \LaTeX\ then included in the \HTML\ output as an image.
+% This is used for math if \SVG\ math is chosen, and also
+% for the \env{picture}, \env{tikzpicture}, and other environments.
+%
+% Before typesetting the \env{lateximage} a large number of formatting,
+% graphics, and symbols-related macros are temporarily restored
+% to their print-mode meaning by \cs{LWR@restoreorigformatting}.
+% (See \cref{sec:restoreorigformatting}.)
+%
+% A \env{lateximage} is typeset on its own \PDF\ page inside an \HTML\ comment
% which starts on the preceeding page and ends on following page, and instructions are written to
% |lateximage.txt| for |lwarpmk| to extract the |\lateximage| from the page of the \PDF\ file
% then generate an accompanying |.svg| file image file. Meanwhile, instructions to
% show this image are placed into the \HTML\ file after the comment.
%
-% An \HTML\ span is created to hold both the \HTML\ comment,
+% An \HTML\ \element{span} is created to hold both the \HTML\ comment,
% which will have the |pdftotext| conversion,
% and also the link to the final |.svg| image.
%
@@ -19569,6 +20515,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \limitslateximagefontsize
%
%
+% \subsection{Support counters and macros}
%
% \codehtml
% \begin{macrocode}
@@ -19608,6 +20555,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
+% \subsection{Font size}
% \codeall
% \begin{macrocode}
@@ -19620,6 +20568,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% should blend well with the surrounding \HTML\ text size.
%
% \emph{Do not include the leading backslash in the name.}
+% \watchout[no backslash]
+%
% \begin{macrocode}
\newcommand*{\LateximageFontSizeName}{large}
% \end{macrocode}
@@ -19630,6 +20580,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
+% \subsection{Sanitizing math expressions for HTML}
% \codehtml
% \begin{macrocode}
@@ -19640,7 +20591,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% Math expressions are converted to |lateximage|s, and some math environments may contain
% ``\&'', ``\textless'', or ``\textgreater'', which should not be allowed
-% inside an \HTML\ ALT tag, so must convert them to \HTML\ entities.
+% inside an \HTML\ \element{alt} tag, so must convert them to \HTML\ entities.
%
% Two versions follow, depending on expansion needs.
% There may be a better way\dots
@@ -19701,8 +20652,143 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macro}
+% \subsection{Equation numbers}
-% \begin{environment}{lateximage} \oarg{alttag}
+% \DescribeCounter{LWR@startingequation}
+% For use with |lateximage| and multi-line numbered equations.
+% Remembers the next equation number so that it may be printed
+% in the alt tag.
+%
+% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
+%
+% \begin{macrocode}
+\newcounter{LWR@startingequation}
+
+\@ifundefined{chapter}
+{
+\renewcommand{\theLWR@startingequation}{%
+\arabic{LWR@startingequation}%
+}
+}
+{% chapter defined
+\renewcommand{\theLWR@startingequation}{%
+\ifnumcomp{\value{chapter}}{>}{0}{\arabic{chapter}.}{}%
+\arabic{LWR@startingequation}%
+}
+}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR@isstartingequation}
+% True for the first equation tag, false for later tags in the same environment.
+% \begin{macrocode}
+\newbool{LWR@isstartingequation}
+% \end{macrocode}
+
+
+% \begin{macro}{\LWR@startingequationtag} \quad
+% Prints the starting equation number or tag.
+% \begin{macrocode}
+\let\LWR@startingequationtag\theLWR@startingequation
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@equationtag} \quad
+% Prints the ending equation number or tag.
+% \begin{macrocode}
+\let\LWR@equationtag\theequation
+% \end{macrocode}
+% \end{macro}
+
+
+% Only if \SVG\ math, patch \cs{tag} after packages have loaded,
+% in case someone else modified \cs{tag}.
+% \begin{macrocode}
+\AtBeginDocument{
+
+\ifbool{mathjax}{}{% not mathjax
+% \end{macrocode}
+
+% \begin{macro}{\LWR@remembertag} \marg{tag}
+%
+% For use inside the math environments while using \SVG\ math.
+% Sets \cs{theLWR@startingequation} and \cs{theequation}
+% to the given tag.
+%
+% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
+%
+% \begin{macrocode}
+\NewDocumentCommand{\LWR@remembertag}{m}{%
+\ifbool{LWR@isstartingequation}%
+{%
+ \global\boolfalse{LWR@isstartingequation}%
+ \xdef\LWR@startingequationtag{#1}%
+}%
+{}%
+\xdef\LWR@equationtag{#1}%
+}%
+% \end{macrocode}
+% \end{macro}
+
+% Patches for \AmS\ math \cs{tag} macro to remember the first tag:
+% \begin{macrocode}
+\LetLtxMacro\LWR@origmake@df@tag@@\make@df@tag@@
+\LetLtxMacro\LWR@origmake@df@tag@@@\make@df@tag@@@
+
+\renewcommand*{\make@df@tag@@}[1]{%
+\LWR@remembertag{#1}%
+\LWR@origmake@df@tag@@{#1}%
+}
+
+\renewcommand*{\make@df@tag@@@}[1]{%
+\LWR@remembertag{#1}%
+\LWR@origmake@df@tag@@@{#1}%
+}
+
+}% not mathjax
+}% AtBeginDocument
+% \end{macrocode}
+
+
+% \subsection{HTML \element{alt} tags}
+
+% \begin{macro}{\LWR@amsmathbody} \marg{envname}
+% For use inside the optional argument to a \env{lateximage}
+% to add the contents of a AMS math environment to the \element{alt} tag.
+%
+% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
+%
+% \begin{macrocode}
+\newcommand*{\LWR@amsmathbody}[1]
+{%
+\textbackslash\{begin\}\{#1\} %
+\LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+\textbackslash\{end\}\{#1\}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@amsmathbodynumbered} \marg{envname}
+% For use inside the optional argument to a \env{lateximage}
+% to add the contents of a AMS math environment to the \element{alt} tag,
+% prefixed by the equation numbers.
+%
+% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
+%
+% \begin{macrocode}
+\newcommand*{\LWR@amsmathbodynumbered}[1]
+{%
+\ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
+{(\LWR@equationtag)}%
+{(\LWR@startingequationtag--\LWR@equationtag)} %
+\LWR@amsmathbody{#1} %
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \subsection{\env{lateximage}}
+
+% \begin{environment}{lateximage} \oarg{\element{alt} tag}
%
% \changes{v0.18}{2016/05/18}{Surpress extra space.}
% \changes{v0.18}{2016/05/18}{pdfcrop: -{}-hires added.}
@@ -19718,9 +20804,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\catcode`\$=\active%
+
\NewDocumentEnvironment{lateximage}{O{image}}
{%
\LWR@traceinfo{lateximage: starting on page \arabic{page}}%
+% \end{macrocode}
+% Nested |lateximage|s remain one large |lateximage|:
+% \begin{macrocode}
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
% \end{macrocode}
% If nesting inside an already-existing lateximage, simply record one more level:
@@ -19733,6 +20823,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
{% start of outer-most lateximage
% \end{macrocode}
+% Remember the next equation number to be allocated, in case it must be
+% printed in a multi-equation environment:
+% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
+% \begin{macrocode}
+ \setcounter{LWR@startingequation}{\value{equation}}%
+ \addtocounter{LWR@startingequation}{1}%
+ \booltrue{LWR@isstartingequation}%
+ \let\LWR@startingequationtag\theLWR@startingequation%
+ \let\LWR@equationtag\theequation%
+% \end{macrocode}
% Starting a new lateximage:
% \begin{macrocode}
\addtocounter{LWR@lateximagenumber}{1}%
@@ -19780,7 +20880,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% Start the new \PDF\ page:
% \begin{macrocode}
- \LWR@traceinfo{lateximage: about to create new page}%
+ \LWR@traceinfo{lateximage: about to create a new page}%
\LWR@orignewpage%
% \end{macrocode}
% Typeset the image in a ``standard'' width page and font size:
@@ -19816,13 +20916,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro\)\LWR@origcloseparen%
\LetLtxMacro\[\LWR@origopenbracket%
\LetLtxMacro\]\LWR@origclosebracket%
- \let\@ensuredmath\LWR@orig@ensuredmath%
}% end of outer-most lateximage
\LWR@traceinfo{lateximage: finished start of environment}%
}% end of \begin{lateximage}
% \end{macrocode}
%
% When the environment closes:
+% \margintag{\cs{endlateximage}}
%
% \begin{macrocode}
{% start of \end{lateximage}
@@ -19852,25 +20952,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
% \end{macrocode}
% Create a link to the lateximage, allowing its natural height:
-%
-% If the alt tag is given as ``LWRAMSMATHBODY'', then use the text collected by the
-% amsmath multline, gather, or align environments.
% \begin{macrocode}
- \ifthenelse{\equal{#1}{LWRAMSMATHBODY}}%
- {%
- \LWR@subinlineimage[%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
- ]%
- {lateximage}%
- {lateximages\OSPathSymbol{}lateximage-\theLWR@externalfilecnt}%
- {svg}%
- {}%
- }%
- {%
\LWR@subinlineimage[#1]{lateximage}%
{lateximages\OSPathSymbol{}lateximage-\theLWR@externalfilecnt}{svg}{}%
- }%
-% \LWR@orignewline% Removed to prevent extra space.
% \end{macrocode}
% Be sure that are doing a paragraph:
% \begin{macrocode}
@@ -19915,22 +20999,28 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{environment}{center}
% Replace \env{center} functionality with \CSS\ tags:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} use explicit \attribute{text-align}.}
% \begin{macrocode}
\renewenvironment*{center}
{
\LWR@forcenewpage
-\BlockClass{center}
+\ifbool{FormatWP}
+{\BlockClass[text-align:center]{center}}
+{\BlockClass{center}}
}
{\endBlockClass}
% \end{macrocode}
% \end{environment}
+
% \begin{environment}{flushright}
% \begin{macrocode}
\renewenvironment*{flushright}
{
\LWR@forcenewpage
-\BlockClass{flushright}
+\ifbool{FormatWP}
+{\BlockClass[text-align:right]{flushright}}
+{\BlockClass{flushright}}
}
{\endBlockClass}
% \end{macrocode}
@@ -19941,7 +21031,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\renewenvironment*{flushleft}
{
\LWR@forcenewpage
-\BlockClass{flushleft}
+\ifbool{FormatWP}
+{\BlockClass[text-align:left]{flushleft}}
+{\BlockClass{flushleft}}
}
{\endBlockClass}
% \end{macrocode}
@@ -20000,7 +21092,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \label{sec:siunitx}
% \DescribePackage{siunitx}
-%
+% The \pkg{lwarp} core passes a few options to \pkg{siunitx}.
+
% \limitssiunitx
%
% \changes{v0.36}{2017/08/16}{\pkg{siunitx}: Fix for \pkg{babel-french}.}
@@ -20030,24 +21123,33 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
-
-% \section{Graphics}
-
-% \DescribePackage{graphics}
-%
-% \DescribePackage{graphicx}
+% \section{Graphics print-mode modifications}
%
% \index{images>graphicx package}
%
+% \subsection{General limitations}
% \limitsgraphics
%
-
+% \subsection{Print-mode modifications}
+% \label{sec:graphicsprint}
+%
% \codeprint
%
% For print output, accept and then discard the new |class| key:
% \begin{macrocode}
\begin{warpprint}
\define@key{Gin}{class}{}
+% \end{macrocode}
+%
+% Print-mode additions for the \pkg{overpic} package.
+% See \cref{sec:overpic} for the \HTML\ version.
+% \begin{macrocode}
+\AtBeginDocument{
+\@ifpackageloaded{overpic}{
+\newcommand*{\overpicfontsize}{12}
+\newcommand*{\overpicfontskip}{14}
+}{}
+}
\end{warpprint}
% \end{macrocode}
@@ -20057,9 +21159,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
-% \subsection{\protect\pkg{xcolor} print-mode additions}
+% \section{Xcolor boxes}
+%
% \label{sec:xcolorpatches}
%
+% \DescribePackage{xcolor}
+% A few new definitions are provided for enhanced \HTML\ colored boxes,
+% and \cs{fcolorbox} is slightly modified.
+% Print-mode version are also provided.
+%
+%
% Print-mode versions of new \pkg{xcolor} defintions.
% These are defined inside \env{warpall} because they are also used
% for \HTML\ while inside a \env{lateximage}.
@@ -20591,7 +21700,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
{%
-\uselengthunit{in}%
+% \end{macrocode}
+% Units for printing dimensions to \HTML:
+% \begin{macrocode}
+\uselengthunit{PT}%
+% \end{macrocode}
+% Compute width, adjusted for frames:
+% \begin{macrocode}
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
\addtolength{\LWR@minipagewidth}{3em}% room for frames
@@ -20600,16 +21715,34 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\setlength{\textheight}{9in}%
}{}%
\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
-\addtocounter{LWR@minipagedepth}{1}%
+% \end{macrocode}
+% Compute height:
+% \begin{macrocode}
\setlength{\LWR@minipageheight}{\textheight}% default unless specified
\IfValueT{#2}{\setlength{\LWR@minipageheight}{#2}}%
% \end{macrocode}
+% Track nesting depth:
+% \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.
% \begin{macrocode}
+\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars%
% \end{macrocode}
+% If |FormatWP|, add a text frame:
+% \changes{v0.42}{2017/10/26}{If \protect\texttt{FormatWP} add a text frame.}
+% \begin{macrocode}
+\ifbool{FormatWP}{%
+
+\addtocounter{LWR@thisfloat}{1}%
+\booltrue{LWR@freezethisfloat}%
+\LWR@htmltag{div id="autofloat-\arabic{LWR@thisfloat}" class="wpminipage"}%
+
+}{}%
+% \end{macrocode}
% Create the \element{div} tag with optional alignment style:
% \begin{macrocode}
\LWR@traceinfo{minipage: creating div class}%
@@ -20658,21 +21791,41 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@origraggedright%
% \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}
\LWR@startpars%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
+
+=== begin minipage ===
+
+}{}%
\LWR@traceinfo{minipage: finished starting the minipage}%
}
% \end{macrocode}
% End the environment with \LaTeX{} processing and 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:
+\ifbool{FormatWP}{%
+
+\LWR@htmlelementend{div}%
+\boolfalse{LWR@freezethisfloat}%
+
+}{}%
\LWR@htmldivclassend{minipage}%
+
\LWR@origvspace{1\baselineskip}% required for subcaption
\addtocounter{LWR@minipagedepth}{-1}%
\LWR@startpars%
+\ifbool{FormatWP}{\newline}{}%
% \end{macrocode}
% Prevent paragraph tags around horizontal white space
% until the start of the next paragraph:
@@ -20787,7 +21940,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% \begin{macro}{\LWR@blackborderpadding}
-% Prints the \HTML attributes for a black border and padding.
+% Prints the \HTML\ attributes for a black border and padding.
%
% \cs{LWR@forceminwidth} must be used first in order to set the border width.
%
@@ -21025,6 +22178,25 @@ width:\rndprintlength{\LWR@tempwidth}%
% \changes{v0.34}{2017/08/05}{Improved font control.}
% \changes{v0.35}{2017/08/08}{Fix: \cs{textbf} and related.}
+% \changes{v0.42}{2017/10/20}{\cs{textbf} and related: If \protect\texttt{FormatWP}, use explicit styles for
+% \cs{textsc}, etc.}
+
+
+% \begin{macro}{\LWR@HTMLtextstyle} \marg{FormatWP style} \marg{class} \marg{text}
+%
+% If |FormatWP|, adds an explicit style to the text span class.
+% This is used by LibreOffice to mark its imported text using the given style.
+% \changes{v0.42}{2017/10/20}{Added.}
+% \begin{macrocode}
+\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{%
+\ifbool{FormatWP}%
+{\LWR@htmlspanclass[#1]{#2}{#3}}%
+{\LWR@htmlspanclass{#2}{#3}}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \begin{macro}{\emph} \marg{text}
% \begin{macrocode}
@@ -21034,14 +22206,19 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\textmd} \marg{text}
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{\LWR@htmlspanclass{textmd}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{%
+\LWR@HTMLtextstyle{font-weight:normal}{textmd}{#1}%
+}
\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1}
+
\LetLtxMacro{\textmd}{\LWR@HTMLtextmd}
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\textbf} \marg{text}
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}}
@@ -21050,17 +22227,25 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\textrm} \marg{text}
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{\LWR@htmlspanclass{textrm}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{%
+\LWR@HTMLtextstyle{font-family:serif}{textrm}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
+
\LetLtxMacro{\textrm}{\LWR@HTMLtextrm}
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\textsf} \marg{text}
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{\LWR@htmlspanclass{textsf}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{%
+\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}%
+}
\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
\LetLtxMacro{\textsf}{\LWR@HTMLtextsf}
% \end{macrocode}
@@ -21077,8 +22262,12 @@ width:\rndprintlength{\LWR@tempwidth}%
% \begin{macro}{\textup} \marg{text}
% \changes{v0.28}{2017/04/13}{Fixed span class.}
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLtextup}[1]{\LWR@htmlspanclass{textup}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextup}[1]{%
+\LWR@HTMLtextstyle{font-variant:normal}{textup}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextup}[1]{#1}
+
\LetLtxMacro{\textup}{\LWR@HTMLtextup}
% \end{macrocode}
% \end{macro}
@@ -21093,20 +22282,30 @@ width:\rndprintlength{\LWR@tempwidth}%
% \begin{macro}{\textsc} \marg{text}
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{\LWR@htmlspanclass{textsc}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{%
+\LWR@HTMLtextstyle{font-variant:small-caps}{textsc}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
+
\LetLtxMacro{\textsc}{\LWR@HTMLtextsc}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\textsl} \marg{text}
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{\LWR@htmlspanclass{testsl}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{%
+\LWR@HTMLtextstyle{font-style:oblique}{textsl}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
+
\LetLtxMacro{\textsl}{\LWR@HTMLtextsl}
% \end{macrocode}
% \end{macro}
+
+
% \begin{macro}{\textnormal} \marg{text}
% \begin{macrocode}
\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
@@ -21171,6 +22370,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\LetLtxMacro\underline\LWR@origunderline%
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
+\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
}
% \end{macrocode}
% \end{macro}
@@ -21255,13 +22455,32 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\@textsuperscript} \marg{text}
+% \changes{v0.42}{2017/10/16}{Added.}
+% \begin{macrocode}
+\renewcommand{\@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\textsubscript} \marg{text}
% \begin{macrocode}
+\AtBeginDocument{
\renewcommand{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@textsubscript} \marg{text}
+% \changes{v0.42}{2017/10/16}{Added.}
+% \begin{macrocode}
+\AtBeginDocument{
+\renewcommand{\@textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+}
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\up} \marg{text} Prints superscript.
%
% This is \cs{let} at the beginning of the document in case some other package
@@ -21285,8 +22504,14 @@ width:\rndprintlength{\LWR@tempwidth}%
% \begin{macro}{\underline} \marg{text}
% \changes{v0.40}{2017/09/12}{Added.}
+% \changes{v0.42}{2017/10/20}{If \protect\texttt{FormatWP}, use explicit styles for
+% \cs{underline}, etc.}
% \begin{macrocode}
-\renewcommand{\underline}[1]{\InlineClass{underline}{#1}}
+\renewcommand{\underline}[1]{%
+\LWR@HTMLtextstyle%
+ {text-decoration:underline;text-decoration-skip}%
+ {underline}{#1}%
+}
% \end{macrocode}
% \end{macro}
@@ -21542,17 +22767,33 @@ width:\rndprintlength{\LWR@tempwidth}%
% \begin{macrocode}
\ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}}
{%
- \HTMLunicode{2009}% thin breakable space
+ \HTMLunicode{2009}% thin breakable space
}%
% \end{macrocode}
% Print the span with the converted width. Not rounded.
% \begin{macrocode}
{%
- \uselengthunit{PT}%
- \LWR@htmltagc{%
- span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"%
- }%
- \LWR@htmltagc{/span}%
+ \uselengthunit{PT}%
+ \LWR@htmltagc{%
+ span style="width:\printlength{\LWR@tempwidth}; %
+ display:inline-block"%
+ }%
+% \end{macrocode}
+% If formatting for a word processor, approximate with a number of \cs{quad}s,
+% in case a span of a given width is not supported:
+% \changes{v0.42}{2017/10/27}{If \protect\texttt{FormatWP} add \cs{quad}s.}
+% \begin{macrocode}
+ \ifbool{FormatWP}{%
+ \setlength{\LWR@templengthone}{\LWR@tempwidth}%
+ \whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+ \quad%
+ \addtolength{\LWR@templengthone}{-1em}%
+ }%
+ }{}%
+% \end{macrocode}
+% Close the span:
+% \begin{macrocode}
+ \LWR@htmltagc{/span}%
}%
% \end{macrocode}
% If had a minipage this paragraph, try to inline the
@@ -21705,7 +22946,7 @@ width:\rndprintlength{\LWR@tempwidth}%
% The background color is used to draw the filled rule.
% The color may be changed by \cs{textcolor}.
% \begin{macrocode}
- background:\LWR@currenttextcolor; %
+ \ifbool{FormatWP}{}{background:\LWR@currenttextcolor; }%
% \end{macrocode}
% The width and height are printed, converted to PT:
% \begin{macrocode}
@@ -21737,6 +22978,21 @@ width:\rndprintlength{\LWR@tempwidth}%
% \begin{macrocode}
display:inline-block;"%
}%
+% \end{macrocode}
+% If formatting for a word processor, approximate with a number of underscores,
+% in case a span of a given width is not supported:
+% \changes{v0.42}{2017/10/27}{If \protect\texttt{FormatWP} add \cs{quad}s.}
+% \begin{macrocode}
+ \ifbool{FormatWP}{%
+ \setlength{\LWR@templengthone}{\LWR@tempwidth}%
+ \whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+ \_{}%
+ \addtolength{\LWR@templengthone}{-1em}%
+ }%
+ }{}%
+% \end{macrocode}
+% Close the span:
+% \begin{macrocode}
\LWR@htmltagc{/span}%
% \end{macrocode}
% If had a minipage this paragraph, try to inline the
@@ -21820,24 +23076,39 @@ width:\rndprintlength{\LWR@tempwidth}%
%
% |latexlogofont| is a \CSS\ class used to select the font for the rest of the logo in
% \LaTeX, \LuaTeX, \ConTeXt, etc.
+% \changes{v0.42}{2017/10/20}{If \protect\texttt{FormatWP} use explicit style.}
% \begin{macrocode}
\let\LWR@origTeX\TeX
\newcommand*{\LWR@TeX}
-{\InlineClass{latexlogofont}%
-{\InlineClass{latexlogo}{T\textsubscript{e}X}}}
+{%
+ \InlineClass{latexlogofont}%
+ {%
+ \LWR@HTMLtextstyle%
+ {text-transform:uppercase}%
+ {latexlogo}%
+ {T\textsubscript{e}X}%
+ }%
+}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\LaTeX}
+% \changes{v0.42}{2017/10/20}{If \protect\texttt{FormatWP} use explicit style.}
% \begin{macro}{\LaTeXe} \LaTeX, \LaTeXe
% \begin{macrocode}
\let\LWR@origLaTeX\LaTeX
\newcommand*{\LWR@LaTeX}
-{\InlineClass{latexlogofont}%
-{\InlineClass{latexlogo}%
-{L\textsuperscript{a}T\textsubscript{e}X}}}
+{%
+ \InlineClass{latexlogofont}%
+ {%
+ \LWR@HTMLtextstyle%
+ {text-transform:uppercase}%
+ {latexlogo}%
+ {L\textsuperscript{a}T\textsubscript{e}X}%
+ }%
+}
\let\LWR@origLaTeXe\LaTeXe
@@ -22002,9 +23273,10 @@ width:\rndprintlength{\LWR@tempwidth}%
%
%
%
-%
% \changes{v0.20}{2016/12/12}{Code factored into independent \texttt{lwarp\_html} files.}
%
+% The following adjustments apply to the lwarp-* package listings:
+%
% \titleformat{\part}[hang]
% {\hrule\nopagebreak[4]\large\ttfamily\bfseries}{}{0pt}{}[\marginpar{\hfill{}File\,\thepart}]
% \titlespacing*{\part}{0pt}{*4}{0ex}
@@ -22017,7 +23289,11 @@ width:\rndprintlength{\LWR@tempwidth}%
% {\large\rmfamily\bfseries}{}{0pt}{}[\marginpar{\hfill\textsection\,\thesubsection}]
% \titlespacing*{\subsection}{0pt}{0ex}{0ex}
%
-% \renewcommand{\bottomtitlespace}{.5\textheight}
+% \titleformat{\subsubsection}[hang]
+% {\normalsize\rmfamily\bfseries}{}{0pt}{}[\marginpar{\hfill\textsection\,\thesubsubsection}]
+% \titlespacing*{\subsection}{0pt}{0ex}{0ex}
+%
+% \renewcommand{\bottomtitlespace}{.2\textheight}
%
%
% \clearpage
@@ -22200,7 +23476,6 @@ width:\rndprintlength{\LWR@tempwidth}%
% \end{macrocode}
-
% \iffalse
%</abstract>
% \fi
@@ -22368,6 +23643,8 @@ margin-right:\rndprintlength{\LWR@templengthtwo}%
%
% \limitscombiningfloats
%
+% \changes{v0.42}{2017/10/27}{\pkg{algorithmic}: If \protect\texttt{FormatWP} add \cs{quad}s.}
+%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
@@ -22384,6 +23661,13 @@ margin-right:\rndprintlength{\LWR@templengthtwo}%
\LWR@htmltagc{%
span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
}%
+\ifbool{FormatWP}{%
+\setlength{\LWR@templengthone}{\the\ALG@thistlm}%
+\whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+\quad%
+\addtolength{\LWR@templengthone}{-1em}%
+}%
+}{}%
\LWR@htmltagc{/span}%
}%
%
@@ -22456,8 +23740,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
% \changes{v0.25}{2017/03/15}{\pkg{amsthm}: Added.}
%
-% \begin{description}
-% \item[CSS styling of theorems and proofs:] \
+% \begin{table}[ht]
+% \hrule\smallskip
+% \caption{AMSthm package --- CSS styling of theorems and proofs}
% \begin{description}
% \item [Theorem:] \element{div} of class |amsthmbody<theoremstyle>|
% \item [Theorem Name:] \element{span} of class |amsthmname<theoremtyle>|
@@ -22467,7 +23752,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \item [Proof Name:] \element{span} of class |amsthmproofname|
% \end{description}
% where |<theoremstyle>| is |plain|, |definition|, etc.
-% \end{description}
+% \smallskip
+% \hrule
+% \end{table}
%
%
% \codehtml
@@ -22848,7 +24135,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% The delimiter character is given a \element{span} class of \attribute{ldelim} or
% \attribute{rdelim}, and the default \CSS\ sets this to \attribute{font-size:200\%}
%
-% \limitsbigdelim
+% \limitsbigdelim\bigskip
%
% \changes{v0.39}{2017/08/31}{\pkg{bigdelim}: Added.}
% \changes{v0.40}{2017/09/09}{\pkg{bigdelim}: Improved documentation.}
@@ -23753,7 +25040,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \DescribePackage{epigraph}
% \pkg{epigraph} is emulated during \HTML\ output, and
% the \pkg{epigraph} package is ignored.
-
+%
+% \changes{v0.42}{2017/10/27}{\pkg{epigraph}: If \protect\texttt{FormatWP} add HTML styles.}
+%
% \codehtml
% \begin{macrocode}
@@ -23765,7 +25054,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
{
\begin{BlockClass}{qitem}
#1
-\begin{BlockClass}{epigraphsource}
+\ifbool{FormatWP}
+{\begin{BlockClass}[border-top:1px solid gray]{epigraphsource}}
+{\begin{BlockClass}{epigraphsource}}
#2
\end{BlockClass}
\end{BlockClass}
@@ -23775,14 +25066,14 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\newcommand{\epigraph}[2]
{
-\begin{BlockClass}{epigraph}
+\begin{LWR@BlockClassWP}{text-align:right}{}{epigraph}
\qitem{#1}{#2}
-\end{BlockClass}
+\end{LWR@BlockClassWP}
}
\newenvironment*{epigraphs}
-{\BlockClass{epigraph}}
-{\endBlockClass}
+{\LWR@BlockClassWP{text-align:right}{}{epigraph}}
+{\endLWR@BlockClassWP}
% \end{macrocode}
%
% Use \CSS\ to format epigraphs.
@@ -23990,6 +25281,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
% \changes{v0.34}{2017/07/27}{\pkg{fancybox}: Added.}
+% \changes{v0.42}{2017/10/27}{\pkg{fancybox}: If \protect\texttt{FormatWP} add HTML styles.}
%
% \codehtml
% \begin{macrocode}
@@ -24003,14 +25295,26 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
%
% \begin{macrocode}
-\renewcommand*{\@shadowbox}[1]{\InlineClass{shadowbox}{#1}}
+\renewcommand*{\@shadowbox}[1]{%
+\ifbool{FormatWP}%
+{\InlineClass[border:1px solid black]{shadowbox}{#1}}%
+{\InlineClass{shadowbox}{#1}}%
+}
-\renewcommand*{\@doublebox}[1]{\InlineClass{doublebox}{#1}}
+\renewcommand*{\@doublebox}[1]{%
+\ifbool{FormatWP}%
+{\InlineClass[border:1px double black]{doublebox}{#1}}%
+{\InlineClass{doublebox}{#1}}%
+}
\renewcommand*{\@ovalbox}[2]{%
-\ifthenelse{\isequivalentto{#1}{\thinlines}}
-{\InlineClass{ovalbox}{#2}}
-{\InlineClass{Ovalbox}{#2}}
+\ifbool{FormatWP}%
+{\InlineClass[border:1px solid black; border-radius:1ex]{ovalbox}{#2}}%
+{%
+ \ifthenelse{\isequivalentto{#1}{\thinlines}}%
+ {\InlineClass{ovalbox}{#2}}%
+ {\InlineClass{Ovalbox}{#2}}%
+}%
}
% \end{macrocode}
%
@@ -24041,9 +25345,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
%
% \begin{macrocode}
\renewcommand{\GenericCaption}[1]{%
-\LWR@htmlblocktag{figcaption}%
+\LWR@figcaption%
#1%
-\LWR@htmlblocktag{/figcaption}%
+\endLWR@figcaption%
}
% \end{macrocode}
%
@@ -24688,29 +25992,45 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
%
%
+% \begin{noindenvironment} \oarg{offset} \marg{type} \marg{width}
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
+% \changes{v0.42}{2017/10/26}{\pkg{floatflt}: Added width.}
% \begin{macrocode}
-\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m}
-{% start
-\LWR@maybeincthisfloat%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"}
-\LWR@startpars%
+\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m m}
+{%
+\setlength{\LWR@templengthone}{#3}%
+\uselengthunit{PT}%
+\LWR@BlockClassWP{%
+ float:right; %
+ width:\rndprintlength{\LWR@templengthone}; %
+ margin:10pt%
+}{%
+ width:\rndprintlength{\LWR@templengthone}%
+}%
+{marginblock}%
\captionsetup{type=#2}%
}
-{
-\LWR@htmldivclassend{div}
+{%
+\endLWR@BlockClassWP%
}
-
+% \end{macrocode}
+% \end{noindenvironment}
+%
+% \begin{noindenvironment}{floatingfigure} \oarg{placement} \marg{width}
+% \begin{macrocode}
\DeclareDocumentEnvironment{floatingfigure}{o m}
- {\begin{KFLTfloatflt@marginfloat}{figure}}
+ {\begin{KFLTfloatflt@marginfloat}{figure}{#2}}
{\end{KFLTfloatflt@marginfloat}}
-
-\DeclareDocumentEnvironment{floatingtable}{o +m}
- {\begin{KFLTfloatflt@marginfloat}{table}#2}
+% \end{macrocode}
+% \end{noindenvironment}
+%
+% \begin{noindenvironment}{floatingtable} \oarg{placement}
+% \begin{macrocode}
+\DeclareDocumentEnvironment{floatingtable}{o}
+ {\begin{KFLTfloatflt@marginfloat}{table}{1.5in}}
{\end{KFLTfloatflt@marginfloat}}
% \end{macrocode}
+% \end{noindenvironment}
%
% \iffalse
%</floatflt>
@@ -26005,6 +27325,8 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \end{macrocode}
+% \subsection{Printing HTML styles}
+
% \begin{macro}{\LWR@rotstyle} \marg{prefix} \marg{degrees}
%
% Prints the rotate style with the given prefix.
@@ -26051,6 +27373,27 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \end{macrocode}
+% Used to determine the actual image size if needed:
+% \begin{macrocode}
+\newsavebox{\LWR@imagesizebox}
+% \end{macrocode}
+
+
+% \begin{macrocode}
+\let\LWR@origGin@setfile\Gin@setfile
+% \end{macrocode}
+
+
+% Define the new class key for the print-mode version of \cs{includegraphics},
+% which is enabled inside a \env{lateximage}.
+% \changes{v0.42}{2017/10/24}{\pkg{includegraphics}: Fix: Class key.}
+% \begin{macrocode}
+\AtBeginDocument{
+\define@key{Gin}{class}{}
+}
+% \end{macrocode}
+
+
% \begin{macro}{\LWR@includegraphicsb} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
%
% \pkg{graphics} syntax is \cs{includegraphics} * \oarg{llx,lly} \oarg{urx,ury} \marg{file}
@@ -26069,6 +27412,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \changes{v0.28}{2017/04/12}{Adapts to \pkg{graphics} syntax.}
% \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.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
{%
@@ -26093,11 +27437,13 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
}{}%
% \end{macrocode}
% \begin{macrocode}
+\begingroup%
\renewcommand*{\Gin@setfile}[3]{%
\LWR@traceinfo{Gin@setfile ##3}%
\xdef\LWR@parsedfilename{##3}%
}%
-\Ginclude@graphics{\detokenize{#4}}%
+\Ginclude@graphics{\detokenize\expandafter{#4}}%
+\endgroup%
\filename@parse{\LWR@parsedfilename}%
% \end{macrocode}
%
@@ -26126,6 +27472,53 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
{\setkeys{igraph}{}}%
}%
% \end{macrocode}
+%
+% If formatting for a word processor, find and set the actual image size,
+% without rotation, using \PDF\ instead of \SVG\ to find the original bounding box:
+% \changes{v0.42}{2017/10/24}{If \protect\texttt{FormatWP}, use explicit size.}
+% \begin{macrocode}
+\ifbool{FormatWP}{%
+ \begingroup%
+ \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+ \define@key{Gin}{angle}{}%
+ \IfBooleanTF{#1}%
+ {% starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2][#3]{#4}}%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2]{#4}}%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*{#4}}%
+ }%
+ }%
+ }% starred
+ {% not starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2][#3]{#4}}%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2]{#4}}%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics{#4}}%
+ }%
+ }%
+ }% not starred
+ \endgroup%
+ \uselengthunit{PT}%
+ \settowidth{\LWR@igwidth}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igwidthstyle}{width:\rndprintlength{\LWR@igwidth}}%
+ \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igheightstyle}{height:\rndprintlength{\LWR@igheight}}%
+}{}%
+% \end{macrocode}
+%
% Create the \HTML\ reference with the graphicspath, filename, extension,
% alt tag, style, and class.
%
@@ -26199,9 +27592,12 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% The user should always refer to |.pdf| in the document source.
% \begin{macrocode}
+\AtBeginDocument{
+
+\LWR@traceinfo{Patching includegraphics.}
+
\LetLtxMacro\LWR@origincludegraphics\includegraphics
-\AtBeginDocument{
\renewcommand*{\includegraphics}
{%
% \end{macrocode}
@@ -26219,6 +27615,8 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \end{macro}
+% \subsection{Boxes}
+
% \begin{macro}{\LWR@rotboxorigin} Holds the origin key letters.
% \begin{macrocode}
\newcommand*{\LWR@rotboxorigin}{}
@@ -26371,8 +27769,6 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
}
% \end{macrocode}
% \end{macro}
-
-
%
% \iffalse
%</graphics>
@@ -26946,6 +28342,8 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \DescribePackage{keyfloat}
% \pkg{keyfloat} is supported with minor adjustments.
%
+% \limitskeyfloat
+%
% \changes{v0.20}{2017/01/16}{\pkg{keyfloat}: Added.}
% \changes{v0.31}{2017/05/12}{\pkg{keyfloat}: Improved compatibility.}
%
@@ -27001,27 +28399,24 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\NewEnviron{KFLT@boxinner}
{%
-\LWR@traceinfo{kflt@boxinner}%
+\LWR@traceinfo{KFLT@boxinner}%
\LWR@stoppars%
\KFLT@frame{\BODY}%
\LWR@startpars%
-\LWR@traceinfo{ended kflt@boxinner}%
+\LWR@traceinfo{KFLT@boxinner: done}%
}
% \end{macrocode}
+% \changes{v0.42}{2017/10/26}{\pkg{keyfloat}: If \texttt{FormatWP} add explicit HTML style.}
% \begin{macrocode}
\DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m}
-{% start
-\LWR@maybeincthisfloat%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"}
-\LWR@startpars%
+{%
+\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
\captionsetup{type=#2}%
}
-{
-\LWR@htmldivclassend{div}
+{%
+\endLWR@BlockClassWP%
}
% \end{macrocode}
@@ -27041,10 +28436,20 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \begin{macrocode}
\DeclareDocumentEnvironment{keywrap}{m +m}
{%
-\begin{BlockClass}{marginblock}
-\setlength{\linewidth}{#1}
+\LWR@ensuredoingapar%
+\setlength{\LWR@templengthone}{#1}%
+\uselengthunit{PT}%
+\begin{LWR@BlockClassWP}{%
+ float:right; width:\rndprintlength{\LWR@templengthone}; %
+ margin:10pt%
+}%
+{%
+ width:\rndprintlength{\LWR@templengthone}%
+}%
+{marginblock}%
+\setlength{\linewidth}{.95\LWR@templengthone}%
#2%
-\end{BlockClass}
+\end{LWR@BlockClassWP}%
}
{%
}
@@ -27840,6 +29245,8 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
%
% \changes{v0.17}{2016/04/14}{\pkg{mdframed}: Added.}
%
+% \subsection{Package loading}
+%
% \codehtml
% \begin{macrocode}
\RequirePackage{xcolor}% for \convertcolorspec
@@ -27847,6 +29254,18 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
% \end{macrocode}
%
%
+% \pkg{amsthm} must be loaded before \pkg{mdframed}
+% \begin{macrocode}
+\LWR@origRequirePackage{amsthm}
+% \end{macrocode}
+%
+% Do not require \tikz{} or pstricks:
+% \begin{macrocode}
+\LWR@origRequirePackage[framemethod=none]{mdframed}
+% \end{macrocode}
+%
+%
+% \subsection{Limitations}
%
% \limitsmdframed
%
@@ -27860,16 +29279,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
%
% Pre-existing hooks are used to patch extra functions before and after the frames.
%
-
-% \pkg{amsthm} must be loaded before \pkg{mdframed}
-% \begin{macrocode}
-\LWR@origRequirePackage{amsthm}
-% \end{macrocode}
%
-% Do not require \tikz{} or pstricks:
-% \begin{macrocode}
-\LWR@origRequirePackage[framemethod=none]{mdframed}
-% \end{macrocode}
%
% ^^A \DescribeMacro{\mdfsetup}
% To handle CSS and paragraphs,
@@ -27888,6 +29298,8 @@ endinnercode={\LWR@stoppars},
% \end{macrocode}
%
%
+% \subsection{Color and length HTML conversion}
+%
% \begin{noindmacro}{\LWR@mdfprintcolor} \marg{mdfcolorkey}
%
% Given the \pkg{mdframed} key, print the color.
@@ -27908,7 +29320,9 @@ endinnercode={\LWR@stoppars},
}
% \end{macrocode}
% \end{noindmacro}
-
+%
+%
+% \subsection{Environment encapsulation}
%
% \begin{noindmacro}{\LWR@mdframedstart}
% Actions before an mdframe starts.
@@ -27993,6 +29407,8 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
% \end{noindmacro}
%
%
+% \subsection{Titles and subtitles}
+%
% \begin{noindmacro}{\mdfframedtitleenv} \marg{title}
%
% Encapsulation of the original which places the title
@@ -28158,6 +29574,7 @@ background:
% \end{noindmacro}
%
%
+% \subsection{New environments}
%
% \begin{noindmacro}{\LWR@mdthisenv}
% Stores the environment of the frame about to be created:
@@ -28474,6 +29891,7 @@ background:
%
%
% \changes{v0.34}{2017/08/02}{\pkg{moreverb}: Added.}
+% \changes{v0.42}{2017/10/27}{\pkg{moreverb}: Simplified formatting of listings.}
%
% \codehtml
% \begin{macrocode}
@@ -28524,22 +29942,29 @@ background:
% \unskip\LWR@origvspace*{-\baselineskip}%
\LWR@afterendverbatim%
}
+% \end{macrocode}
-\renewcommand{\listinglabel}[1]{\InlineClass{listinglabel}{\the#1}}
-
-\def\thelisting@line{%
-\@tempcnta=\listing@line%
-\divide\@tempcnta\listing@step \multiply\@tempcnta\listing@step%
-\ifnum\listing@line=\@ne%
-\listinglabel\listing@line%
-\else%
-\ifnum\@tempcnta=\listing@line%
-\listinglabel\listing@line%
-\else%
-\InlineClass{listinglabel}{}%
-\fi%
-\fi}
+% ^^A UNNECESSARY, AND CAUSED PROBLEMS WITH FORMATTING FOR A WORD PROCESSOR:
+% ^^A \renewcommand{\listinglabel}[1]{%
+% ^^A \ifbool{FormatWP}
+% ^^A {\InlineClass{listinglabel}{\qquad\the#1\quad}}%
+% ^^A {\InlineClass{listinglabel}{\the#1}}%
+% ^^A }
+%
+% ^^A \def\thelisting@line{%
+% ^^A \@tempcnta=\listing@line%
+% ^^A \divide\@tempcnta\listing@step \multiply\@tempcnta\listing@step%
+% ^^A \ifnum\listing@line=\@ne%
+% ^^A \listinglabel\listing@line%
+% ^^A \else%
+% ^^A \ifnum\@tempcnta=\listing@line%
+% ^^A \listinglabel\listing@line%
+% ^^A \else%
+% ^^A \InlineClass{listinglabel}{\ifbool{FormatWP}{\qquad\quad}{}}%
+% ^^A \fi%
+% ^^A \fi}
+% \begin{macrocode}
\LetLtxMacro\LWRMV@@listinginput\@listinginput
\renewcommand{\@listinginput}[3][]{
@@ -28576,6 +30001,40 @@ background:
%
%
%
+% \iffalse
+%<*morewrites>
+% \fi
+%
+% \part{lwarp-morewrites.sty}
+%
+% \section{morewrites}
+%
+% \DescribePackage{morewrites}
+% Error if \pkg{morewrites} is loaded after \pkg{lwarp}.
+%
+% \changes{v0.42}{2017/10/19}{\pkg{morewrites}: Added.}
+%
+
+% Discard all options for \pkg{lwarp-morewrites}:
+
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{morewrites}
+% \end{macrocode}
+
+% \begin{macrocode}
+\LWR@loadbefore{morewrites}
+% \end{macrocode}
+
+% \iffalse
+%</morewrites>
+% \fi
+%
+%
+%
+%
+%
%
% \iffalse
%<*mparhack>
@@ -28777,7 +30236,13 @@ class="td%
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+% \end{macrocode}
+% \changes{v0.42}{2017/10/26}{\pkg{multirow}: If \protect\texttt{FormatWP} add cell alignment.}
+% \begin{macrocode}
+\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+\LWR@addformatwpalignment%
+\LWR@tdendstyles%
}%
% \end{macrocode}
% \changes{v0.41}{2017/10/05}{Fix: \protect\textless\ spec.}
@@ -29141,17 +30606,26 @@ class="td%
%
% \changes{v0.25}{2017/03/22}{\pkg{ntheorem}: Added.}
%
-% \begin{description}
-% \item[CSS styling of theorems and proofs:] \
+% \begin{table}[ht]
+% \hrule
+% \smallskip
+% \caption{Ntheorem package --- CSS styling of theorems and proofs}\unskip
% \begin{description}
% \item [Theorem:] \element{div} of class |theorembody<theoremstyle>|
% \item [Theorem Header:] \element{span} of class |theoremheader<style>|
% \end{description}
% where |<theoremstyle>| is |plain|, |break|, etc.
-% \end{description}
+% \smallskip
+% \hrule
+% \end{table}
+%
+%
+% \subsection{Limitations}
%
% \limitsntheorem
%
+% \subsection{Options}
+%
% Options |amsthm| or |standard| choose which set of theorems and proofs
% to initialize.
%
@@ -29195,6 +30669,7 @@ class="td%
% \end{macrocode}
%
%
+% \subsection{Remembering the theorem style}
%
% Storage for the style being used for new theorems.
% \begin{macrocode}
@@ -29215,7 +30690,8 @@ class="td%
}
}
% \end{macrocode}
-
+%
+%
% Patched to remember the style for this theorem type,
% and set it later when the environment is started.
% \begin{macrocode}
@@ -29277,6 +30753,8 @@ class="td%
% \end{macrocode}
%
%
+% \subsection{HTML cross-referencing}
+%
% Mimics a float by incrementing the float counter and generating
% an \HTML\ anchor. These are used for list-of-theorem cross-references.
% \begin{macrocode}
@@ -29289,6 +30767,8 @@ class="td%
% \end{macrocode}
%
%
+% \subsection{\cs{newtheoremstyle}}
+%
% The following are patched for \CSS.
%
% These were in individual files |thp.sty| for plain,
@@ -29317,7 +30797,11 @@ class="td%
}%
{\PackageError{\basename}{Theorem style #1 already defined}\@eha}
}
-
+% \end{macrocode}
+%
+% \subsection{Standard styles}
+%
+% \begin{macrocode}
\renewtheoremstyle{plain}%
{\item[\hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
@@ -29334,7 +30818,8 @@ class="td%
{\item[
% \rlap{\vbox{\hbox{
\hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderbreak}{##1\ ##2\ (##3)\theorem@separator}\newline
+ \InlineClass{theoremheaderbreak}%
+ {##1\ ##2\ (##3)\theorem@separator}\newline
% }\hbox{\strut}}}
]}
@@ -29349,14 +30834,16 @@ class="td%
\renewtheoremstyle{changebreak}%
{\item[
% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderchangebreak}{##2\ ##1\theorem@separator}\newline
+ \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
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderchangebreak}%
+ {##2\ ##1\ (##3)\theorem@separator}\newline
% }\hbox{\strut}}}
]}
@@ -29370,10 +30857,12 @@ class="td%
\renewtheoremstyle{marginbreak}%
{\item[\hskip\labelsep\theorem@headerfont
- \InlineClass{theoremheadermarginbreak}{##2 \qquad ##1\theorem@separator}\newline
+ \InlineClass{theoremheadermarginbreak}%
+ {##2 \qquad ##1\theorem@separator}\newline
]}%
{\item[\hskip\labelsep\theorem@headerfont
- \InlineClass{theoremheadermarginbreak}{##2 \qquad ##1\ (##3)\theorem@separator}\newline
+ \InlineClass{theoremheadermarginbreak}%
+ {##2 \qquad ##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{nonumberplain}%
@@ -29407,6 +30896,9 @@ class="td%
\InlineClass{theoremheaderplain}{##3}] \ \newline}
% \end{macrocode}
%
+%
+% \subsection{Additional objects}
+%
% The following manually adjust the \CSS\ for the standard configuration
% objects which are not a purely plain style:
% \begin{macrocode}
@@ -29424,10 +30916,15 @@ class="td%
\InlineClass{theoremheadersc}{##1\theorem@separator}]}%
{\item[\theorem@headerfont\hskip \labelsep
\InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]}
+}% not amsthm
% \end{macrocode}
%
+%
+% \subsection{Renewed standard configuration}
+%
% The following standard configuration is renewed using the new \CSS:
% \begin{macrocode}
+\ifbool{LWR@ntheoremamsthm}{}{%
\theoremstyle{plainupright}
\theorembodyfont{\upshape}
\theoremsymbol{\HTMLunicode{25A1}}% UTF-8 white box
@@ -29457,6 +30954,8 @@ class="td%
% \end{macrocode}
%
%
+% \subsection{\protect\texttt{amsthm} option}
+%
% Only if the |amsthm| option was given:
% \begin{macrocode}
\ifbool{LWR@ntheoremamsthm}{
@@ -29618,6 +31117,9 @@ class="td%
}{}% amsthm option
% \end{macrocode}
%
+%
+% \subsection{Ending a theorem}
+%
% Patched for \CSS:
% \begin{macrocode}
\let\LWR@origendtheorem\@endtheorem
@@ -29633,13 +31135,17 @@ class="td%
\endBlockClass%
}
% \end{macrocode}
-
+%
+%
+% \subsection{\cs{NoEndMark}}
+%
% \begin{macrocode}
\gdef\NoEndMark{\global\setendmarkfalse}
% \end{macrocode}
-
-
-
+%
+%
+% \subsection{List-of}
+%
% Redefined to reuse the float mechanism to add list-of-theorem links:
%
% \cs{thm@thmline} \marg{1: printed type} \marg{2: \#} \marg{3: optional} \marg{4: page}
@@ -29658,8 +31164,8 @@ class="td%
% \begin{macrocode}
\def\thm@@thmline{\thm@@thmline@name}
% \end{macrocode}
-
-
+%
+%
% Patch for \CSS:
% \begin{macrocode}
\def\listtheorems#1{
@@ -29671,10 +31177,12 @@ class="td%
\LWR@htmlelementclassend{nav}{lothm}%
}
% \end{macrocode}
-
+%
+%
+% \subsection{Symbols}
+%
% Proof QED symbol:
% \begin{macrocode}
-
\newcommand{\qed}{\qquad\the\qedsymbol}
\AtBeginDocument{
@@ -29684,6 +31192,8 @@ class="td%
}
% \end{macrocode}
%
+% \subsection{Cross-referencing}
+%
% \cs{thref} \marg{label}
% \begin{macrocode}
\newcommand*{\thref}[1]{\cref{#1}}
@@ -29697,6 +31207,58 @@ class="td%
%
%
%
+% \iffalse
+%<*overpic>
+% \fi
+%
+% \part{lwarp-overpic.sty}
+
+% \section{overpic}
+% \label{sec:overpic}
+%
+% \DescribePackage{overpic}
+% \pkg{overpic} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.42}{2017/10/16}{\pkg{overpic}: Added.}
+%
+% \limitsoverpic
+%
+% See \cref{sec:graphicsprint} for the print-mode version of
+% \cs{overpicfontsize} and \cs{overpicfontskip}.
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{overpic}
+% \end{macrocode}
+
+% \begin{macrocode}
+\newcommand*{\overpicfontsize}{12}
+\newcommand*{\overpicfontskip}{14}
+
+\BeforeBeginEnvironment{overpic}{%
+ \lateximage%
+ \fontsize{\overpicfontsize}{\overpicfontskip}%
+ \selectfont%
+}
+
+\AfterEndEnvironment{overpic}{\endlateximage}
+
+\BeforeBeginEnvironment{Overpic}{%
+ \lateximage%
+ \fontsize{\overpicfontsize}{\overpicfontskip}%
+ \selectfont%
+}
+
+\AfterEndEnvironment{Overpic}{\endlateximage}
+% \end{macrocode}
+
+% \iffalse
+%</overpic>
+% \fi
+%
+%
+%
%
% \iffalse
%<*pagenote>
@@ -30103,6 +31665,7 @@ class="td%
% See |lwarp.css| for the \element{span} of class \attribute{supsubscript}.
%
% \changes{v0.38}{2017/08/26}{\pkg{realscripts}: Added.}
+% \changes{v0.42}{2017/10/16}{\pkg{realscripts}: Fix for subscripts in a \env{lateximage}.}
%
% \codehtml
%
@@ -30111,12 +31674,6 @@ class="td%
% \end{macrocode}
%
% \begin{macrocode}
-\let\LWR@origtextsuperscript\textsuperscript
-\let\LWR@origtextsubscript\textsubscript
-
-\RenewDocumentCommand{\textsuperscript}{s}{\LWR@origtextsuperscript}
-\RenewDocumentCommand{\textsubscript}{s}{\LWR@origtextsubscript}
-
\let\realsuperscript\textsuperscript
\let\realsubscript\textsubscript
@@ -30794,18 +32351,15 @@ class="td%
%
%
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
+% \changes{v0.42}{2017/10/26}{\pkg{sidenotes}: If \texttt{FormatWP} add explicit HTML style.}
% \begin{macrocode}
\NewDocumentEnvironment{KFLTsidenotes@marginfloat}{O{-1.2ex} m}
{% start
-\LWR@maybeincthisfloat%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"}
-\LWR@startpars%
+\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
\captionsetup{type=#2}%
}
-{
-\LWR@htmldivclassend{div}
+{%
+\endLWR@BlockClassWP%
}
\RenewDocumentEnvironment{marginfigure}{o}
@@ -30871,7 +32425,53 @@ class="td%
\DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
}% AtBeginDocument
+% \end{macrocode}
+% \changes{v0.42}{2017/10/16}{\pkg{siunitx}: Improved \cs{ensuremath}.}
+% The following is executed by \pkg{siunitx} at the end of \cs{document}.
+% \cs{@ensuredmath} is not supported inside an \cs{hbox}, so it must
+% temporarily be restored to its original.
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_undefine:N \__siunitx_set_math_fam:n
+\cs_new_protected:Npn \__siunitx_set_math_fam:n #1 {
+ \LWR@traceinfo{sunitx set math fam}
+ \int_new:c { c__siunitx_math #1 _int }
+ \group_begin:
+ \LetLtxMacro\@ensuredmath\LWR@origensuredmath
+ \hbox_set:Nn \l__siunitx_tmp_box
+ {
+ \ensuremath
+ {
+ \use:c { math #1 }
+ {
+ \int_gset:cn { c__siunitx_math #1 _int } { \fam }
+ }
+ }
+ }
+ \group_end:
+ \LWR@traceinfo{sunitx set math fam: done}
+}
+
+\cs_undefine:N \__siunitx_combined_output:n
+\cs_new_protected:Npn \__siunitx_combined_output:n #1 {
+ \group_begin:
+ \LetLtxMacro\@ensuredmath\LWR@origensuredmath
+ \bool_if:NTF \l__siunitx_number_parse_bool
+ {
+ \tl_clear:N \l__siunitx_number_out_tl
+ \bool_set_false:N \l__siunitx_number_compound_bool
+ \__siunitx_number_output_parse:n {#1}
+ }
+ {
+ \__siunitx_unit_output_pre_print:
+ \__siunitx_print:nn { number } { \ensuremath {#1} }
+ \__siunitx_unit_output_print:
+ }
+ \group_end:
+}
+
+\ExplSyntaxOff
% \end{macrocode}
% \iffalse
@@ -30896,6 +32496,7 @@ class="td%
% \DescribePackage{soul} Emulated.
%
% \changes{v0.27}{2017/04/02}{\pkg{soul}: Added.}
+% \changes{v0.42}{2017/10/20}{\pkg{soul}: If \protect\texttt{FormatWP}, add explicit styles.}
%
% \codehtml
%
@@ -30915,34 +32516,56 @@ class="td%
\newcommand*{\LWR@soulhlcolor}{}
% \end{macrocode}
%
+% \begin{noindmacro}{\so} \marg{text}
+%
% Basic markup with \CSS:
% \begin{macrocode}
-\newcommand{\so}[1]{\InlineClass{letterspacing}{#1}}
-\newcommand{\caps}[1]{\InlineClass{capsspacing}{#1}}
+\newcommand{\so}[1]{%
+\LWR@HTMLtextstyle{letter-spacing:.2ex}{letterspacing}{#1}%
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+% \begin{noindmacro}{\caps} \marg{text}
+% \begin{macrocode}
+\newcommand{\caps}[1]{%
+\LWR@HTMLtextstyle%
+ {font-variant:small-caps;letter-spacing:.1ex}%
+ {capsspacing}{#1}%
+}
% \end{macrocode}
+% \end{noindmacro}
+%
+% \begin{noindmacro}{\LWR@soulcolor}
+% \marg{text} \marg{color} \marg{class} \marg{colorstyle} \marg{FormatWPstyle}
%
% Add colors if not empty:
% \begin{macrocode}
-\newcommand{\LWR@soulcolor}[4]{%
+\newcommand{\LWR@soulcolor}[5]{%
\ifcsempty{#2}%
+{\LWR@HTMLtextstyle{#5}{#3}{#1}}%
{%
-\InlineClass{#3}{#1}}%
-{%
-\convertcolorspec{named}{\csuse{#2}}{HTML}\LWR@tempcolor%
-\InlineClass[#4: \#\LWR@tempcolor]{#3}{#1}%
+ \convertcolorspec{named}{\csuse{#2}}{HTML}\LWR@tempcolor%
+ \LWR@HTMLtextstyle{#5;#4:\#\LWR@tempcolor}{#3}{#1}%
}%
}
+% \end{macrocode}
+% \end{noindmacro}
+% \begin{macrocode}
\newcommand{\ul}[1]{%
\LWR@soulcolor{#1}{LWR@soululcolor}{uline}{text-decoration-color}%
+ {text-decoration:underline;text-decoration-skip;}%
}
\newcommand{\st}[1]{
\LWR@soulcolor{#1}{LWR@soulstcolor}{sout}{text-decoration-color}%
+ {text-decoration:line-through}%
}
\newcommand{\hl}[1]{
\LWR@soulcolor{#1}{LWR@soulhlcolor}{highlight}{background-color}%
+ {background:\#F8E800}
}
% \end{macrocode}
%
@@ -31063,7 +32686,8 @@ class="td%
\LWR@ProvidesPackagePass{subfig}
% \end{macrocode}
-% \cs{sf@@@subfloat} \marg{1 type} \oarg{2 lof entry} \oarg{3 caption} \marg{4 contents}
+% \begin{noindmacro}{\sf@@@subfloat}
+% \marg{1 type} \oarg{2 lof entry} \oarg{3 caption} \marg{4 contents}
%
% The outer minipage allows side-by-side subfloats with \cs{hfill} between.
% \begin{macrocode}
@@ -31154,8 +32778,10 @@ class="td%
\endgroup\ignorespaces%
}%
% \end{macrocode}
+% \end{noindmacro}
-% \cs{sf@subcaption} \marg{1 type} \marg{2 lof entry} \marg{3 caption}
+% \begin{noindmacro}{\sf@subcaption}
+% \marg{1 type} \marg{2 lof entry} \marg{3 caption}
% \begin{macrocode}
\long\def\sf@subcaption#1#2#3{%
\LWR@stoppars% new
@@ -31190,12 +32816,12 @@ class="td%
{
% \parbox[t]{\the\@tempdima}{%
\LWR@traceinfo{sfsubcap B1}% new
- \LWR@htmlblocktag{figcaption}% new
+ \LWR@figcaption% new
\caption@make
{\@nameuse{sub\@captype name}}%
{\@nameuse{thesub\@captype}}%
{#3}
- \LWR@htmlblocktag{/figcaption}% new
+ \LWR@figcaption% new
\LWR@traceinfo{sfsubcap B2}% new
% }%
}%
@@ -31235,8 +32861,10 @@ class="td%
\LWR@startpars% new
}
% \end{macrocode}
+% \end{noindmacro}
-% \cs{caption@@@make} \marg{caption label} \marg{caption text}
+% \begin{noindmacro}{\caption@@@make}
+% \marg{caption label} \marg{caption text}
% \begin{macrocode}
\renewcommand\caption@@@make[2]{%
\LWR@startpars% new
@@ -31278,8 +32906,9 @@ class="td%
\LWR@stoppars% new
}
% \end{macrocode}
+% \end{noindmacro}
-
+% \begin{noindmacro}{\subfloat@label}
% Patches for \cs{sf@sub@label}:
% \begin{macrocode}
\def\subfloat@label{%
@@ -31291,11 +32920,12 @@ class="td%
\@nameuse{p@sub\@captype}%
\@nameuse{thesub\@captype}.)}}
% \end{macrocode}
-
-
+% \end{noindmacro}
% Patches for \cs{subref}.
%
+% \begin{noindmacro}{\sf@subref} \marg{label}
+%
% The unstarred version uses a \cs{ref} link whose printed text
% comes from the |sub@<label>|:
% \begin{macrocode}
@@ -31303,13 +32933,21 @@ class="td%
\LWR@subnewref{#1}{sub@#1}%
}
% \end{macrocode}
+% \end{noindmacro}
+%
+% \begin{noindmacro}{\sf@@subref} \marg{label}
+%
% The starred version uses the printed |sub@<label>| which is stored as
% if it were a page number:
% \begin{macrocode}
\renewcommand{\sf@@subref}[1]{\LWR@origpageref{sub@#1}}
% \end{macrocode}
+% \end{noindmacro}
+%
%
% Defining new subfloats. The |l@sub<type>| for each is redefined.
+%
+% \begin{noindmacro}{\@newsubfloat} \oarg{keys/values} \marg{float name}
% \begin{macrocode}
\LetLtxMacro\LWR@orig@newsubfloat\@newsubfloat
@@ -31318,14 +32956,24 @@ class="td%
\renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}}
}
% \end{macrocode}
+% \end{noindmacro}
%
% Pre-defined for figures and tables:
+%
+% \begin{noindmacro}{\l@subfigure} \marg{text} \marg{pagenum}
% \begin{macrocode}
\renewcommand{\l@subfigure}[2]{\hypertocfloat{2}{subfigure}{lof}{#1}{#2}}
+% \end{macrocode}
+% \end{noindmacro}
+%
+% \begin{noindmacro}{\l@subtable} \marg{text} \marg{pagenum}
+% \begin{macrocode}
\renewcommand{\l@subtable}[2]{\hypertocfloat{2}{subtable}{lot}{#1}{#2}}
-% \def\subfigure{\subfloat}
-% \def\subtable{\subfloat}
% \end{macrocode}
+% \end{noindmacro}
+%
+% ^^A \def\subfigure{\subfloat}
+% ^^A \def\subtable{\subfloat}
% \iffalse
@@ -31628,12 +33276,18 @@ class="td%
% \DescribePackage{textcomp}
% \pkg{textcomp} is patched for use by \pkg{lwarp}.
%
+% \subsection{Limitations}
+%
% \limitstextcomp
%
+%
+% \subsection{Package loading}
+%
% \changes{v0.37}{2017/08/18}{\pkg{textcomp}: Improved support.}
% \changes{v0.38}{2017/08/21}{\pkg{textcomp}: Removed from \pkg{lwarp} core.}
% \changes{v0.40}{2017/09/07}{\pkg{textcomp}: Additional symbols,
% improved XeLaTeX and LuaLaTeX support.}
+% \changes{v0.42}{2017/10/13}{\pkg{textcomp}: Improved \cs{interrobangdown}.}
%
% \codehtml
%
@@ -31642,6 +33296,8 @@ class="td%
% \end{macrocode}
%
%
+% \subsection{Remembering original defintions}
+%
% The following are restored for print when inside a \env{lateximage}:
% \begin{macrocode}
\let\LWR@origtextdegree\textdegree
@@ -31657,6 +33313,7 @@ class="td%
\let\LWR@origtextnaira\textnaira
\let\LWR@origtextpeso\textpeso
\let\LWR@origtextrecipe\textrecipe
+\let\LWR@origtextinterrobangdown\textinterrobangdown
\let\LWR@origtextpertenthousand\textpertenthousand
\let\LWR@origtextbaht\textbaht
\let\LWR@origtextdiscount\textdiscount
@@ -31676,9 +33333,16 @@ class="td%
\LetLtxMacro\LWR@origcapitaldotaccent\capitaldotaccent
\LetLtxMacro\LWR@origtextcircled\textcircled
% \end{macrocode}
+%
+%
+% \subsection{HTML symbols}
+%
% For \HTML, use \HTML\ entities or direct Unicode, depending on the engine.
%
% \cs{AtBeginDocument} improves support for \LuaLaTeX\ and \XeLaTeX.
+%
+% \subsubsection{pdf\protect\LaTeX\ symbols}
+%
% \begin{macrocode}
\AtBeginDocument{
\ifPDFTeX
@@ -31695,12 +33359,16 @@ class="td%
\renewcommand*{\textnaira}{\HTMLunicode{20A6}}
\renewcommand*{\textpeso}{\HTMLunicode{20B1}}
\renewcommand*{\textrecipe}{\HTMLunicode{211E}}
+\renewcommand*{\textinterrobangdown}{\HTMLunicode{2E18}}
\renewcommand*{\textpertenthousand}{\HTMLunicode{2031}}
\renewcommand*{\textbaht}{\HTMLunicode{0E3F}}
\renewcommand*{\textdiscount}{\%}
\renewcommand*{\textservicemark}{\HTMLunicode{2120}}
\else
% \end{macrocode}
+%
+% \subsubsection{\protect\XeLaTeX\ and \protect\LuaLaTeX\ symbols}
+%
% NOTE: Some of the following do not print well in the listing.
% Consult the .dtx or .sty file for the actual characters.
% \begin{macrocode}
@@ -31717,12 +33385,17 @@ class="td%
\renewcommand*{\textnaira}{₦}
\renewcommand*{\textpeso}{₱}
\renewcommand*{\textrecipe}{℞}
+\renewcommand*{\textinterrobangdown}{⸘}
\renewcommand*{\textpertenthousand}{‱}
\renewcommand*{\textbaht}{฿}
\renewcommand*{\textdiscount}{\%}
\renewcommand*{\textservicemark}{℠}
\fi
% \end{macrocode}
+%
+%
+% \subsection{HTML dicritics}
+%
% For \HTML, Unicode diacritical marks are used:
% \begin{macrocode}
\renewcommand*{\capitalcedilla}[1]{#1\HTMLunicode{0327}}
@@ -31747,6 +33420,9 @@ class="td%
}% AtBeginDocument
% \end{macrocode}
%
+%
+% \subsection{Inside a \env{lateximage}}
+%
% When a \env{lateximage} is begun:
% \begin{macrocode}
\appto{\LWR@restoreorigformatting}{%
@@ -31763,6 +33439,7 @@ class="td%
\let\textnaira\LWR@origtextnaira%
\let\textpeso\LWR@origtextpeso%
\let\textrecipe\LWR@origtextrecipe%
+\let\textinterrobangdown\LWR@origtextinterrobangdown%
\let\textpertenthousand\LWR@origtextpertenthousand%
\let\textbaht\LWR@origtextbaht%
\let\textdiscount\LWR@origtextdiscount%
@@ -31858,14 +33535,18 @@ class="td%
%
% \changes{v0.25}{2017/03/16}{\pkg{theorem}: Added.}
%
-% \begin{description}
-% \item[CSS styling of theorems and proofs:] \
+% \begin{table}[ht]
+% \hrule
+% \smallskip
+% \caption{Theorem package --- CSS styling of theorems and proofs}
% \begin{description}
% \item [Theorem:] \element{div} of class |theorembody<theoremstyle>|
% \item [Theorem Header:] \element{span} of class |theoremheader|
% \end{description}
% where |<theoremstyle>| is |plain|, |break|, etc.
-% \end{description}
+% \smallskip
+% \hrule
+% \end{table}
%
%
% \codehtml
@@ -31874,6 +33555,9 @@ class="td%
\LWR@ProvidesPackagePass{theorem}
% \end{macrocode}
+
+% \subsection{Remembering the theorem style}
+
% Storage for the style being used for new theorems:
% \begin{macrocode}
\newcommand{\LWR@newtheoremstyle}{plain}
@@ -31948,6 +33632,8 @@ class="td%
% \end{macrocode}
%
%
+% \subsection{CSS patches}
+%
% The following are patched for \CSS.
%
% These were in individual files |thp.sty| for plain,
@@ -32259,21 +33945,27 @@ class="td%
% \cs{pagestyle} and \cs{thispagestyle} are already disabled in the \pkg{lwarp} code.
%
% \begin{noindmacro}{\newpagestyle} \marg{name} \oarg{style} \marg{commands}
-% \begin{noindmacro}{\renewpagestyle} \marg{name} \oarg{style} \marg{commands}
% \begin{macrocode}
\NewDocumentCommand{\newpagestyle}{m o m}{}
-\NewDocumentCommand{\renewpagestyle}{m o m}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\renewpagestyle} \marg{name} \oarg{style} \marg{commands}
+% \begin{macrocode}
+\NewDocumentCommand{\renewpagestyle}{m o m}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\sethead} \oarg{el} \oarg{ec} \oarg{er} \marg{ol} \marg{oc} \marg{or}
-% \begin{noindmacro}{\setfoot} \oarg{el} \oarg{ec} \oarg{er} \marg{ol} \marg{oc} \marg{or}
% \begin{macrocode}
\NewDocumentCommand{\sethead}{o o o m m m}{}
-\NewDocumentCommand{\setfoot}{o o o m m m}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\setfoot} \oarg{el} \oarg{ec} \oarg{er} \marg{ol} \marg{oc} \marg{or}
+% \begin{macrocode}
+\NewDocumentCommand{\setfoot}{o o o m m m}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\settitlemarks} * \marg{names}
@@ -32283,30 +33975,39 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\headrule}
-% \begin{noindmacro}{\footrule}
% \begin{macrocode}
\newcommand*{\headrule}{}
-\newcommand*{\footrule}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\footrule}
+% \begin{macrocode}
+\newcommand*{\footrule}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\setheadrule} \marg{length}
-% \begin{noindmacro}{\setfootrule} \marg{length}
% \begin{macrocode}
\newcommand*{\setheadrule}[1]{}
-\newcommand*{\setfootrule}[1]{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\setfootrule} \marg{length}
+% \begin{macrocode}
+\newcommand*{\setfootrule}[1]{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\makeheadrule}
-% \begin{noindmacro}{\makefootrule}
% \begin{macrocode}
\newcommand*{\makeheadrule}{}
-\newcommand*{\makefootrule}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\makefootrule}
+% \begin{macrocode}
+\newcommand*{\makefootrule}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\setmarkboth} \marg{code}
@@ -32322,24 +34023,39 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\bottitlemarks}
-% \begin{noindmacro}{\toptitlemarks}
-% \begin{noindmacro}{\firsttitlemarks}
-% \begin{noindmacro}{\nexttitlemarks}
-% \begin{noindmacro}{\outertitlemarks}
-% \begin{noindmacro}{\innertitlemarks}
% \begin{macrocode}
\newcommand*{\bottitlemarks}{}
-\newcommand*{\toptitlemarks}{}
-\newcommand*{\firsttitlemarks}{}
-\newcommand*{\nexttoptitlemarks}{}
-\newcommand*{\outertitlemarks}{}
-\newcommand*{\innertitlemarks}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\toptitlemarks}
+% \begin{macrocode}
+\newcommand*{\toptitlemarks}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\firsttitlemarks}
+% \begin{macrocode}
+\newcommand*{\firsttitlemarks}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\nexttitlemarks}
+% \begin{macrocode}
+\newcommand*{\nexttoptitlemarks}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\outertitlemarks}
+% \begin{macrocode}
+\newcommand*{\outertitlemarks}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\innertitlemarks}
+% \begin{macrocode}
+\newcommand*{\innertitlemarks}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\newtitlemark} * \marg{name}
@@ -32361,21 +34077,27 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\setfloathead} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
-% \begin{noindmacro}{\setfloatfoot} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
% \begin{macrocode}
\NewDocumentCommand{\setfloathead}{s o o o m m m m m}{}
-\NewDocumentCommand{\setfloatfoot}{s o o o m m m m m}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\setfloatfoot} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
+% \begin{macrocode}
+\NewDocumentCommand{\setfloatfoot}{s o o o m m m m m}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\nextfloathead} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
-% \begin{noindmacro}{\nextfloatfoot} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
% \begin{macrocode}
\NewDocumentCommand{\nextfloathead}{s o o o m m m m m}{}
-\NewDocumentCommand{\nextfloatfoot}{s o o o m m m m m}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\nextfloatfoot} * \oarg{.} \oarg{.} \oarg{.} \marg{.} \marg{.} \marg{.} \marg{extra} \oarg{which}
+% \begin{macrocode}
+\NewDocumentCommand{\nextfloatfoot}{s o o o m m m m m}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\newmarkset} \marg{markset}
@@ -32391,24 +34113,39 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\botextramarks} \marg{markset}
-% \begin{noindmacro}{\topextramarks} \marg{markset}
-% \begin{noindmacro}{\firstextramarks} \marg{markset}
-% \begin{noindmacro}{\nextextramarks} \marg{markset}
-% \begin{noindmacro}{\outerextramarks} \marg{markset}
-% \begin{noindmacro}{\innerextramarks} \marg{markset}
% \begin{macrocode}
\newcommand{\botextramarks}[1]{}
-\newcommand{\topextramarks}[1]{}
-\newcommand{\firstextramarks}[1]{}
-\newcommand{\nexttopextramarks}[1]{}
-\newcommand{\outerextramarks}[1]{}
-\newcommand{\innerextramarks}[1]{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\topextramarks} \marg{markset}
+% \begin{macrocode}
+\newcommand{\topextramarks}[1]{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\firstextramarks} \marg{markset}
+% \begin{macrocode}
+\newcommand{\firstextramarks}[1]{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\nextextramarks} \marg{markset}
+% \begin{macrocode}
+\newcommand{\nexttopextramarks}[1]{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\outerextramarks} \marg{markset}
+% \begin{macrocode}
+\newcommand{\outerextramarks}[1]{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\innerextramarks} \marg{markset}
+% \begin{macrocode}
+\newcommand{\innerextramarks}[1]{}
+% \end{macrocode}
% \end{noindmacro}
% \iffalse
@@ -32509,26 +34246,42 @@ class="td%
% \begin{noindmacro}{\filright}
-% \begin{noindmacro}{\filcenter}
-% \begin{noindmacro}{\filleft}
-% \begin{noindmacro}{\fillast}
-% \begin{noindmacro}{\filinner}
-% \begin{noindmacro}{\filouter}
% \begin{macrocode}
\newcommand*{\filright}{}
-\newcommand*{\filcenter}{}
-\newcommand*{\filleft}{}
-\newcommand*{\fillast}{}
-\newcommand*{\filinner}{}
-\newcommand*{\filouter}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\filcenter}
+% \begin{macrocode}
+\newcommand*{\filcenter}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\filleft}
+% \begin{macrocode}
+\newcommand*{\filleft}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\fillast}
+% \begin{macrocode}
+\newcommand*{\fillast}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\filinner}
+% \begin{macrocode}
+\newcommand*{\filinner}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\filouter}
+% \begin{macrocode}
+\newcommand*{\filouter}{}
+% \end{macrocode}
% \end{noindmacro}
+
% \begin{noindmacro}{\wordsep}
% \begin{macrocode}
\newcommand\wordsep{\fontdimen\tw@\font \@plus
@@ -32551,15 +34304,21 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\iftitlemeasuring} \marg{true} \marg{false}
-% \begin{noindmacro}{\assignpagestyle} \marg{command} \marg{pagestyle}
-% \begin{noindmacro}{\titleclass} \marg{name} \oarg{startlevel} \marg{class} \oarg{cmd}
% \begin{macrocode}
\newcommand{\iftitlemeasuring}[2]{#2}
-\newcommand{\assignpagestyle}[2]{#2}
-\NewDocumentCommand{\titleclass}{m o m o}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\assignpagestyle} \marg{command} \marg{pagestyle}
+% \begin{macrocode}
+\newcommand{\assignpagestyle}[2]{#2}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\titleclass} \marg{name} \oarg{startlevel} \marg{class} \oarg{cmd}
+% \begin{macrocode}
+\NewDocumentCommand{\titleclass}{m o m o}
+% \end{macrocode}
% \end{noindmacro}
% \iffalse
@@ -32618,21 +34377,27 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\thecontentslabel}
-% \begin{noindmacro}{\thecontentspage}
% \begin{macrocode}
\newcommand*{\thecontentslabel}{thecontentslabel}
-\newcommand*{\thecontentspage}{thecontentspage}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\thecontentspage}
+% \begin{macrocode}
+\newcommand*{\thecontentspage}{thecontentspage}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\contentslabel} \oarg{format} \marg{space}
-% \begin{noindmacro}{\contentspage} \oarg{format}
% \begin{macrocode}
\newcommand{\contentslabel}[2][]{\thecontentslabel}
-\newcommand{\contentspage}[1][]{\thecontentspage}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\contentspage} \oarg{format}
+% \begin{macrocode}
+\newcommand{\contentspage}[1][]{\thecontentspage}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\contentspush} \marg{text}
@@ -32648,15 +34413,21 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\startcontents} \oarg{name}
-% \begin{noindmacro}{\stopcontents} \oarg{name}
-% \begin{noindmacro}{\resumecontents} \oarg{name}
% \begin{macrocode}
\newcommand*{\startcontents}[1][]{}
-\newcommand*{\stopcontents}[1][]{}
-\newcommand*{\resumecontents}[1][]{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\stopcontents} \oarg{name}
+% \begin{macrocode}
+\newcommand*{\stopcontents}[1][]{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\resumecontents} \oarg{name}
+% \begin{macrocode}
+\newcommand*{\resumecontents}[1][]{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\printcontents} \oarg{name} \marg{prefix} \marg{start} \marg{code}
@@ -32666,15 +34437,21 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\startlist} \oarg{name} \marg{list}
-% \begin{noindmacro}{\stoplist} \oarg{name} \marg{list}
-% \begin{noindmacro}{\resumelist} \oarg{name} \marg{list}
% \begin{macrocode}
\newcommand{\startlist}[2][]{}
-\newcommand{\stoplist}[2][]{}
-\newcommand{\resumelist}[2][]{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\stoplist} \oarg{name} \marg{list}
+% \begin{macrocode}
+\newcommand{\stoplist}[2][]{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\resumelist} \oarg{name} \marg{list}
+% \begin{macrocode}
+\newcommand{\resumelist}[2][]{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\printlist} \oarg{name} \marg{list} \marg{prefix} \marg{code}
@@ -32897,9 +34674,9 @@ class="td%
\DeclareDocumentCommand{\@maketitle}{}{%
\maketitlehooka
{
- \LWR@stoppars\LWR@htmltag{h1}
+ \LWR@stoppars\LWR@htmltag{\LWR@tagtitle}
\@bspretitle \@title \@bsposttitle
- \LWR@htmltag{/h1}\LWR@startpars
+ \LWR@htmltag{\LWR@tagtitleend}\LWR@startpars
}
\maketitlehookb
{
@@ -33107,15 +34884,21 @@ class="td%
% \begin{noindmacro}{\cftmarktoc}
-% \begin{noindmacro}{\cfttoctitlefont}
-% \begin{noindmacro}{\cftaftertoctitle}
% \begin{macrocode}
\newcommand*{\cftmarktoc}{}
-\newcommand*{\cfttoctitlefont}{}
-\newcommand*{\cftaftertoctitle}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cfttoctitlefont}
+% \begin{macrocode}
+\newcommand*{\cfttoctitlefont}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftaftertoctitle}
+% \begin{macrocode}
+\newcommand*{\cftaftertoctitle}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{macrocode}
@@ -33125,15 +34908,21 @@ class="td%
% \begin{noindmacro}{\cftmarklof}
-% \begin{noindmacro}{\cftloftitlefont}
-% \begin{noindmacro}{\cftafterloftitle}
% \begin{macrocode}
\newcommand*{\cftmarklof}{}
-\newcommand*{\cftloftitlefont}{}
-\newcommand*{\cftafterloftitle}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftloftitlefont}
+% \begin{macrocode}
+\newcommand*{\cftloftitlefont}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftafterloftitle}
+% \begin{macrocode}
+\newcommand*{\cftafterloftitle}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{macrocode}
@@ -33143,15 +34932,21 @@ class="td%
% \begin{noindmacro}{\cftmarklot}
-% \begin{noindmacro}{\cftlottitlefont}
-% \begin{noindmacro}{\cftafterlottitle}
% \begin{macrocode}
\newcommand*{\cftmarklot}{}
-\newcommand*{\cftlottitlefont}{}
-\newcommand*{\cftafterlottitle}{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftlottitlefont}
+% \begin{macrocode}
+\newcommand*{\cftlottitlefont}{}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftafterlottitle}
+% \begin{macrocode}
+\newcommand*{\cftafterlottitle}{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{macrocode}
@@ -33161,15 +34956,21 @@ class="td%
% \begin{noindmacro}{\cftdot}
-% \begin{noindmacro}{\cftdotsep}
-% \begin{noindmacro}{\cftnodots}
% \begin{macrocode}
\newcommand*{\cftdot}{.}
-\providecommand*{\cftdotsep}{1}
-\newcommand*{\cftnodots}{5000}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftdotsep}
+% \begin{macrocode}
+\providecommand*{\cftdotsep}{1}
+% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftnodots}
+% \begin{macrocode}
+\newcommand*{\cftnodots}{5000}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\cftdotfill} \marg{sep}
@@ -33179,12 +34980,15 @@ class="td%
% \end{noindmacro}
% \begin{noindmacro}{\cftsetpnumwidth} \marg{length}
-% \begin{noindmacro}{\cftsetrmarg} \marg{length}
% \begin{macrocode}
\newcommand*{\cftsetpnumwidth}[1]{}
-\newcommand*{\cftsetrmarg}[1]{}
% \end{macrocode}
% \end{noindmacro}
+
+% \begin{noindmacro}{\cftsetrmarg} \marg{length}
+% \begin{macrocode}
+\newcommand*{\cftsetrmarg}[1]{}
+% \end{macrocode}
% \end{noindmacro}
% \begin{noindmacro}{\cftpnumalign} \marg{alignment}
@@ -33389,8 +35193,7 @@ class="td%
% \end{macrocode}
% \end{noindmacro}
-
-% \cs{cftchapterprecis} from \pkg{tocloft}:
+% \begin{noindmacro}{\cftchapterprecis} \marg{text}
% \begin{macrocode}
\newcommand{\cftchapterprecis}[1]{%
\cftchapterprecishere{#1}
@@ -33404,6 +35207,7 @@ class="td%
}
}
% \end{macrocode}
+% \end{noindmacro}
% \iffalse
%</tocloft>
@@ -33634,31 +35438,59 @@ class="td%
% Basic markup commands, using \CSS:
% \begin{macrocode}
\NewDocumentCommand{\uline}{+m}{%
-\InlineClass{uline}{#1}%
+\LWR@HTMLtextstyle%
+ {text-decoration:underline;text-decoration-skip}%
+ {uline}{#1}%
}
\NewDocumentCommand{\uuline}{+m}{%
-\InlineClass{uuline}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;text-decoration-skip;%
+ text-decoration-style:double%
+ }%
+ {uuline}{#1}%
}
\NewDocumentCommand{\uwave}{+m}{%
-\InlineClass{uwave}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;text-decoration-skip;%
+ text-decoration-style:wavy%
+ }%
+ {uwave}{#1}%
}
\NewDocumentCommand{\sout}{+m}{%
-\InlineClass{sout}{#1}%
+\LWR@HTMLtextstyle%
+ {text-decoration:line-through}%
+ {sout}{#1}%
}
\NewDocumentCommand{\xout}{+m}{%
-\InlineClass{xout}{#1}%
+\LWR@HTMLtextstyle%
+ {text-decoration:line-through}%
+ {xout}{#1}%
}
\NewDocumentCommand{\dashuline}{+m}{%
-\InlineClass{dashuline}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;%
+ text-decoration-skip;%
+ text-decoration-style:dashed%
+ }%
+ {dashuline}{#1}%
}
\NewDocumentCommand{\dotuline}{+m}{%
-\InlineClass{dotuline}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;%
+ text-decoration-skip;%
+ text-decoration-style:dotted%
+ }%
+ {dotuline}{#1}%
}
% \end{macrocode}
%
@@ -33816,6 +35648,7 @@ class="td%
}
}{}
+\LWR@traceinfo{Finished patching verse.}
}% AfterEndPreamble
% \end{macrocode}
% \end{environment}
@@ -33897,19 +35730,15 @@ class="td%
% \begin{macrocode}
\LWR@ProvidesPackageDrop{wrapfig}
% \end{macrocode}
-
-% Computed width of a wrapped object.
-% Used to print the \HTML\ style.
-% \begin{macrocode}
-\newlength{\LWR@wrapwidth}
-% \end{macrocode}
-
-
+%
+%
+% \changes{v0.42}{2017/10/26}{\pkg{wrapfig}: If \texttt{FormatWP}
+% add explicit HTML style.}
+%
% \begin{macrocode}
\newcommand*{\LWR@wrapposition}{}
\newcommand*{\LWR@subwrapfigure}[2]{%
-\LWR@maybeincthisfloat%
\renewcommand*{\LWR@wrapposition}{}%
\ifthenelse{%
\equal{#1}{r}\OR\equal{#1}{R}\OR%
@@ -33917,16 +35746,16 @@ class="td%
}%
{\renewcommand*{\LWR@wrapposition}{float:right}}%
{\renewcommand*{\LWR@wrapposition}{float:left}}%
-\setlength{\LWR@wrapwidth}{#2}%
-\addtolength{\LWR@wrapwidth}{4em}%
+\setlength{\LWR@templengthone}{#2}%
\uselengthunit{PT}%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"
-style="width:\rndprintlength{\LWR@wrapwidth} ; %
-\LWR@wrapposition"%
+\LWR@BlockClassWP{%
+ width:\rndprintlength{\LWR@templengthone}; \LWR@wrapposition; %
+ margin:10pt%
}%
-\LWR@startpars
+{%
+ width:\rndprintlength{\LWR@templengthone}; \LWR@wrapposition%
+}%
+{marginblock}%
}
@@ -33936,7 +35765,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\captionsetup{type=figure}%
}
{%
-\LWR@htmldivclassend{div}
+\endLWR@BlockClassWP%
}
@@ -33946,7 +35775,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\captionsetup{type=table}%
}
{%
-\LWR@htmldivclassend{div}
+\endLWR@BlockClassWP%
}
@@ -33956,7 +35785,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\captionsetup{type=#1}%
}
{%
-\LWR@htmldivclassend{div}
+\endLWR@BlockClassWP%
}
\newlength{\wrapoverhang}
@@ -33982,14 +35811,16 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
% \DescribePackage{xcolor}
% \pkg{xcolor} is supported by lwarp.
%
-% \limitsxcolor
-%
% \changes{v0.36}{2017/08/10}{\pkg{xcolor}: Uses \cs{fboxrule} and \cs{fboxsep}.}
% \changes{v0.36}{2017/08/10}{\pkg{xcolor}: Added \cs{fcolorboxBlock}, \cs{colorboxBlock}.}
% \changes{v0.36}{2017/08/10}{\pkg{xcolor}: Fix: Background \protect\texttt{none} in print mode.}
% \changes{v0.36}{2017/08/12}{\pkg{xcolor}: \cs{fcolorbox} etc. now work inside \env{lateximage}.}
%
%
+% \subsection{Limitations}
+%
+% \limitsxcolor
+%
%
% \subsection{Xcolor definitions: location and timing}
%
@@ -34109,7 +35940,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
% \end{description}
%
%
-% \subsection{Code}
+% \subsection{Package loading}
%
% \codehtml
% \begin{macrocode}
@@ -34119,7 +35950,10 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
-
+%
+%
+% \subsection{Remembering and restoring original definitions}
+%
% Remember the following print-mode actions to be restored
% when inside a \env{lateximage} environment:
% \begin{macrocode}
@@ -34147,6 +35981,9 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
}
% \end{macrocode}
%
+%
+% \subsection{HTML color style}
+%
% \begin{noindmacro}{\LWR@tempcolor}
% The color converted to \HTML\ colorspace.
% \begin{macrocode}
@@ -34183,8 +36020,10 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
% \end{noindmacro}
%
%
+% \subsection{HTML border}
+%
% \begin{noindmacro}{\LWR@borderpadding} \marg{colorstyle} \marg{color}
-% Prints the \HTML attributes for a black border and padding.
+% Prints the \HTML\ attributes for a black border and padding.
%
% \cs{LWR@forceminwidth} must be used first in order to set the border width.
%
@@ -34198,7 +36037,7 @@ padding:\rndprintlength{\fboxsep}%
% \end{noindmacro}
%
%
-%
+% \subsection{High-level macros}
%
% \DescribeMacro{\color}
% \cs{color} appears in the \LaTeX{} \PDF\ output,
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
index d13f0495ae2..e8c31efeb6a 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
@@ -126,6 +126,7 @@ version 2005/12/01 or later.
\file{lwarp-midfloat.sty}{\from{lwarp.dtx}{midfloat}}
\file{lwarp-metalogo.sty}{\from{lwarp.dtx}{metalogo}}
\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}}
@@ -138,6 +139,7 @@ version 2005/12/01 or later.
\file{lwarp-nopageno.sty}{\from{lwarp.dtx}{nopageno}}
\file{lwarp-nowidow.sty}{\from{lwarp.dtx}{nowidow}}
\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-paralist.sty}{\from{lwarp.dtx}{paralist}}
\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty
index 9adcd25396f..7a3ab4aaa6e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-algorithmicx.sty
@@ -26,6 +26,13 @@
\LWR@htmltagc{%
span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
}%
+\ifbool{FormatWP}{%
+\setlength{\LWR@templengthone}{\the\ALG@thistlm}%
+\whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+\quad%
+\addtolength{\LWR@templengthone}{-1em}%
+}%
+}{}%
\LWR@htmltagc{/span}%
}%
\let\origComment\Comment%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
index 6175f28ab95..a1378fd3f2c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-epigraph.sty
@@ -18,14 +18,15 @@
-
\LWR@ProvidesPackageDrop{epigraph}
\newcommand{\qitem}[2]
{
\begin{BlockClass}{qitem}
#1
-\begin{BlockClass}{epigraphsource}
+\ifbool{FormatWP}
+{\begin{BlockClass}[border-top:1px solid gray]{epigraphsource}}
+{\begin{BlockClass}{epigraphsource}}
#2
\end{BlockClass}
\end{BlockClass}
@@ -33,14 +34,14 @@
\newcommand{\epigraph}[2]
{
-\begin{BlockClass}{epigraph}
+\begin{LWR@BlockClassWP}{text-align:right}{}{epigraph}
\qitem{#1}{#2}
-\end{BlockClass}
+\end{LWR@BlockClassWP}
}
\newenvironment*{epigraphs}
-{\BlockClass{epigraph}}
-{\endBlockClass}
+{\LWR@BlockClassWP{text-align:right}{}{epigraph}}
+{\endLWR@BlockClassWP}
\newlength{\epigraphwidth}
\setlength{\epigraphwidth}{.5\linewidth}
\newenvironment*{flushepinormal}{}{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
index 43185f35f5d..2b37662cbe5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
@@ -17,14 +17,26 @@
%% version 2005/12/01 or later.
\begin{warpHTML}
\LWR@ProvidesPackagePass{fancybox}
-\renewcommand*{\@shadowbox}[1]{\InlineClass{shadowbox}{#1}}
+\renewcommand*{\@shadowbox}[1]{%
+\ifbool{FormatWP}%
+{\InlineClass[border:1px solid black]{shadowbox}{#1}}%
+{\InlineClass{shadowbox}{#1}}%
+}
-\renewcommand*{\@doublebox}[1]{\InlineClass{doublebox}{#1}}
+\renewcommand*{\@doublebox}[1]{%
+\ifbool{FormatWP}%
+{\InlineClass[border:1px double black]{doublebox}{#1}}%
+{\InlineClass{doublebox}{#1}}%
+}
\renewcommand*{\@ovalbox}[2]{%
-\ifthenelse{\isequivalentto{#1}{\thinlines}}
-{\InlineClass{ovalbox}{#2}}
-{\InlineClass{Ovalbox}{#2}}
+\ifbool{FormatWP}%
+{\InlineClass[border:1px solid black; border-radius:1ex]{ovalbox}{#2}}%
+{%
+ \ifthenelse{\isequivalentto{#1}{\thinlines}}%
+ {\InlineClass{ovalbox}{#2}}%
+ {\InlineClass{Ovalbox}{#2}}%
+}%
}
\let\LWR@origSbox\Sbox
@@ -38,9 +50,9 @@
\csgpreto{Beqnarray*}{\boolfalse{LWR@numbereqnarray}}
\renewcommand{\GenericCaption}[1]{%
-\LWR@htmlblocktag{figcaption}%
+\LWR@figcaption%
#1%
-\LWR@htmlblocktag{/figcaption}%
+\endLWR@figcaption%
}
\RenewDocumentEnvironment{Btrivlist}{m o}
{\begin{BlockClass}{Btrivlist}\tabular{#1}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty
index dc14571e023..f661c366309 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-floatflt.sty
@@ -16,25 +16,28 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{floatflt}
-\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m}
-{% start
-\LWR@maybeincthisfloat%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"}
-\LWR@startpars%
+\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m m}
+{%
+\setlength{\LWR@templengthone}{#3}%
+\uselengthunit{PT}%
+\LWR@BlockClassWP{%
+ float:right; %
+ width:\rndprintlength{\LWR@templengthone}; %
+ margin:10pt%
+}{%
+ width:\rndprintlength{\LWR@templengthone}%
+}%
+{marginblock}%
\captionsetup{type=#2}%
}
-{
-\LWR@htmldivclassend{div}
+{%
+\endLWR@BlockClassWP%
}
-
\DeclareDocumentEnvironment{floatingfigure}{o m}
- {\begin{KFLTfloatflt@marginfloat}{figure}}
+ {\begin{KFLTfloatflt@marginfloat}{figure}{#2}}
{\end{KFLTfloatflt@marginfloat}}
-
-\DeclareDocumentEnvironment{floatingtable}{o +m}
- {\begin{KFLTfloatflt@marginfloat}{table}#2}
+\DeclareDocumentEnvironment{floatingtable}{o}
+ {\begin{KFLTfloatflt@marginfloat}{table}{1.5in}}
{\end{KFLTfloatflt@marginfloat}}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index ac05d9f80b5..8895747c1c2 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -114,6 +114,7 @@
\define@key{igraph}{read}{}
\define@key{igraph}{command}{}
+
\newcommand*{\LWR@rotstyle}[2]{%
#1transform:rotate(-#2deg);
}
@@ -128,6 +129,14 @@
\def\LWR@opacity{1}
+\newsavebox{\LWR@imagesizebox}
+
+\let\LWR@origGin@setfile\Gin@setfile
+
+\AtBeginDocument{
+\define@key{Gin}{class}{}
+}
+
\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
{%
\LWR@traceinfo{LWR@includegraphicsb #4}%
@@ -142,11 +151,13 @@
\setlength{\textheight}{9in}%
}%
}{}%
+\begingroup%
\renewcommand*{\Gin@setfile}[3]{%
\LWR@traceinfo{Gin@setfile ##3}%
\xdef\LWR@parsedfilename{##3}%
}%
-\Ginclude@graphics{\detokenize{#4}}%
+\Ginclude@graphics{\detokenize\expandafter{#4}}%
+\endgroup%
\filename@parse{\LWR@parsedfilename}%
\large%
\setlength{\LWR@igwidth}{0pt}%
@@ -163,6 +174,46 @@
{\setkeys{igraph}{#2}}%
{\setkeys{igraph}{}}%
}%
+\ifbool{FormatWP}{%
+ \begingroup%
+ \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+ \define@key{Gin}{angle}{}%
+ \IfBooleanTF{#1}%
+ {% starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2][#3]{#4}}%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2]{#4}}%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*{#4}}%
+ }%
+ }%
+ }% starred
+ {% not starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2][#3]{#4}}%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2]{#4}}%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics{#4}}%
+ }%
+ }%
+ }% not starred
+ \endgroup%
+ \uselengthunit{PT}%
+ \settowidth{\LWR@igwidth}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igwidthstyle}{width:\rndprintlength{\LWR@igwidth}}%
+ \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igheightstyle}{height:\rndprintlength{\LWR@igheight}}%
+}{}%
\LWR@traceinfo{LWR@includegraphicsb: about to create href}%
\href{\LWR@parsedfilename}%
{% start of href
@@ -212,9 +263,12 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
+\AtBeginDocument{
+
+\LWR@traceinfo{Patching includegraphics.}
+
\LetLtxMacro\LWR@origincludegraphics\includegraphics
-\AtBeginDocument{
\renewcommand*{\includegraphics}
{%
\LWR@traceinfo{includegraphics}
@@ -225,6 +279,7 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
}% includegraphics
}% AtBeginDocument
+
\newcommand*{\LWR@rotboxorigin}{}
\newcommand*{\LWR@originname}[1]{%
\ifthenelse{\equal{#1}{t}}{top}{}%
@@ -292,7 +347,6 @@ img src="\LWR@parsedfilename" \LWR@orignewline%
\AtBeginDocument{
\renewcommand{\resizebox}[3]{#3}
}
-
\endinput
%%
%% End of file `lwarp-graphics.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
index a30e33a9074..86e466408e4 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty
@@ -26,24 +26,20 @@
\NewEnviron{KFLT@boxinner}
{%
-\LWR@traceinfo{kflt@boxinner}%
+\LWR@traceinfo{KFLT@boxinner}%
\LWR@stoppars%
\KFLT@frame{\BODY}%
\LWR@startpars%
-\LWR@traceinfo{ended kflt@boxinner}%
+\LWR@traceinfo{KFLT@boxinner: done}%
}
\DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m}
-{% start
-\LWR@maybeincthisfloat%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"}
-\LWR@startpars%
+{%
+\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
\captionsetup{type=#2}%
}
-{
-\LWR@htmldivclassend{div}
+{%
+\endLWR@BlockClassWP%
}
\DeclareDocumentEnvironment{marginfigure}{o}
@@ -56,10 +52,20 @@
\DeclareDocumentEnvironment{keywrap}{m +m}
{%
-\begin{BlockClass}{marginblock}
-\setlength{\linewidth}{#1}
+\LWR@ensuredoingapar%
+\setlength{\LWR@templengthone}{#1}%
+\uselengthunit{PT}%
+\begin{LWR@BlockClassWP}{%
+ float:right; width:\rndprintlength{\LWR@templengthone}; %
+ margin:10pt%
+}%
+{%
+ width:\rndprintlength{\LWR@templengthone}%
+}%
+{marginblock}%
+\setlength{\linewidth}{.95\LWR@templengthone}%
#2%
-\end{BlockClass}
+\end{LWR@BlockClassWP}%
}
{%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
index 9aa0f793047..bad9212e236 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
@@ -19,7 +19,6 @@
\RequirePackage{xcolor}% for \convertcolorspec
\LWR@ProvidesPackageDrop{mdframed}
-
\LWR@origRequirePackage{amsthm}
\LWR@origRequirePackage[framemethod=none]{mdframed}
\mdfsetup{
@@ -36,7 +35,6 @@ endinnercode={\LWR@stoppars},
\newcommand*{\LWR@mdfprintlength}[1]{%
\rndprintlength{\csuse{mdf@#1@length}}
}
-
\newcommand*{\LWR@mdframedstart}{%
\LWR@stoppars%
\uselengthunit{PT}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
index 8816b81c49a..9c512389964 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
@@ -52,20 +52,6 @@
\LWR@afterendverbatim%
}
-\renewcommand{\listinglabel}[1]{\InlineClass{listinglabel}{\the#1}}
-
-\def\thelisting@line{%
-\@tempcnta=\listing@line%
-\divide\@tempcnta\listing@step \multiply\@tempcnta\listing@step%
-\ifnum\listing@line=\@ne%
-\listinglabel\listing@line%
-\else%
-\ifnum\@tempcnta=\listing@line%
-\listinglabel\listing@line%
-\else%
-\InlineClass{listinglabel}{}%
-\fi%
-\fi}
\LetLtxMacro\LWRMV@@listinginput\@listinginput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-morewrites.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-morewrites.sty
new file mode 100644
index 00000000000..b3f99274978
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-morewrites.sty
@@ -0,0 +1,26 @@
+%%
+%% This is file `lwarp-morewrites.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `morewrites')
+%% 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{morewrites}
+
+\LWR@loadbefore{morewrites}
+
+\endinput
+%%
+%% End of file `lwarp-morewrites.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
index 95c0eb81367..6dcd5d69290 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
@@ -40,7 +40,10 @@ class="td%
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+\LWR@addformatwpalignment%
+\LWR@tdendstyles%
}%
\LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}%
\begingroup\LetLtxMacro{\\}{\LWR@endofline}#6\endgroup%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
index 63d3fc41746..760535b8269 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ntheorem.sty
@@ -48,7 +48,6 @@
}
}
-
\gdef\@xnthm#1#2[#3]{%
\ifthm@tempif
\csedef{LWR@thmstyle#1}{\LWR@newtheoremstyle}% new
@@ -126,7 +125,6 @@
}%
{\PackageError{\basename}{Theorem style #1 already defined}\@eha}
}
-
\renewtheoremstyle{plain}%
{\item[\hskip\labelsep \theorem@headerfont
\InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
@@ -140,7 +138,8 @@
]}%
{\item[
\hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderbreak}{##1\ ##2\ (##3)\theorem@separator}\newline
+ \InlineClass{theoremheaderbreak}%
+ {##1\ ##2\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{change}%
@@ -153,12 +152,14 @@
\renewtheoremstyle{changebreak}%
{\item[
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderchangebreak}{##2\ ##1\theorem@separator}\newline
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderchangebreak}%
+ {##2\ ##1\theorem@separator}\newline
]}%
{\item[
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderchangebreak}{##2\ ##1\ (##3)\theorem@separator}\newline
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderchangebreak}%
+ {##2\ ##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{margin}%
@@ -171,10 +172,12 @@
\renewtheoremstyle{marginbreak}%
{\item[\hskip\labelsep\theorem@headerfont
- \InlineClass{theoremheadermarginbreak}{##2 \qquad ##1\theorem@separator}\newline
+ \InlineClass{theoremheadermarginbreak}%
+ {##2 \qquad ##1\theorem@separator}\newline
]}%
{\item[\hskip\labelsep\theorem@headerfont
- \InlineClass{theoremheadermarginbreak}{##2 \qquad ##1\ (##3)\theorem@separator}\newline
+ \InlineClass{theoremheadermarginbreak}%
+ {##2 \qquad ##1\ (##3)\theorem@separator}\newline
]}
\renewtheoremstyle{nonumberplain}%
@@ -214,6 +217,8 @@
\InlineClass{theoremheadersc}{##1\theorem@separator}]}%
{\item[\theorem@headerfont\hskip \labelsep
\InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]}
+}% not amsthm
+\ifbool{LWR@ntheoremamsthm}{}{%
\theoremstyle{plainupright}
\theorembodyfont{\upshape}
\theoremsymbol{\HTMLunicode{25A1}}% UTF-8 white box
@@ -393,9 +398,7 @@
\ifbool{LWR@ntheoremmarks}{\global\setendmarktrue}{}%
\endBlockClass%
}
-
\gdef\NoEndMark{\global\setendmarkfalse}
-
\renewcommand{\thm@@thmline@noname}[4]{%
\hypertocfloat{1}{theorem}{thm}{#2 #3}{}%
}
@@ -404,7 +407,6 @@
\hypertocfloat{1}{theorem}{thm}{#1 #2 #3}{}%
}
\def\thm@@thmline{\thm@@thmline@name}
-
\def\listtheorems#1{
\LWR@htmlelementclass{nav}{lothm}%
\begingroup
@@ -413,8 +415,6 @@
\endgroup
\LWR@htmlelementclassend{nav}{lothm}%
}
-
-
\newcommand{\qed}{\qquad\the\qedsymbol}
\AtBeginDocument{
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-overpic.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-overpic.sty
new file mode 100644
index 00000000000..5f09308af45
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-overpic.sty
@@ -0,0 +1,42 @@
+%%
+%% This is file `lwarp-overpic.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `overpic')
+%% 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{overpic}
+
+\newcommand*{\overpicfontsize}{12}
+\newcommand*{\overpicfontskip}{14}
+
+\BeforeBeginEnvironment{overpic}{%
+ \lateximage%
+ \fontsize{\overpicfontsize}{\overpicfontskip}%
+ \selectfont%
+}
+
+\AfterEndEnvironment{overpic}{\endlateximage}
+
+\BeforeBeginEnvironment{Overpic}{%
+ \lateximage%
+ \fontsize{\overpicfontsize}{\overpicfontskip}%
+ \selectfont%
+}
+
+\AfterEndEnvironment{Overpic}{\endlateximage}
+
+\endinput
+%%
+%% End of file `lwarp-overpic.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
index 3982325d1a5..804a294623a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
@@ -16,12 +16,6 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{realscripts}
-\let\LWR@origtextsuperscript\textsuperscript
-\let\LWR@origtextsubscript\textsubscript
-
-\RenewDocumentCommand{\textsuperscript}{s}{\LWR@origtextsuperscript}
-\RenewDocumentCommand{\textsubscript}{s}{\LWR@origtextsubscript}
-
\let\realsuperscript\textsuperscript
\let\realsubscript\textsubscript
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty
index 42b5c1e5339..1549c9e3582 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-sidenotes.sty
@@ -38,15 +38,11 @@
}
\NewDocumentEnvironment{KFLTsidenotes@marginfloat}{O{-1.2ex} m}
{% start
-\LWR@maybeincthisfloat%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"}
-\LWR@startpars%
+\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
\captionsetup{type=#2}%
}
-{
-\LWR@htmldivclassend{div}
+{%
+\endLWR@BlockClassWP%
}
\RenewDocumentEnvironment{marginfigure}{o}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
index 124652703f2..aa9924e05f8 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
@@ -26,6 +26,46 @@
\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
}% AtBeginDocument
+\ExplSyntaxOn
+\cs_undefine:N \__siunitx_set_math_fam:n
+\cs_new_protected:Npn \__siunitx_set_math_fam:n #1 {
+ \LWR@traceinfo{sunitx set math fam}
+ \int_new:c { c__siunitx_math #1 _int }
+ \group_begin:
+ \LetLtxMacro\@ensuredmath\LWR@origensuredmath
+ \hbox_set:Nn \l__siunitx_tmp_box
+ {
+ \ensuremath
+ {
+ \use:c { math #1 }
+ {
+ \int_gset:cn { c__siunitx_math #1 _int } { \fam }
+ }
+ }
+ }
+ \group_end:
+ \LWR@traceinfo{sunitx set math fam: done}
+}
+
+\cs_undefine:N \__siunitx_combined_output:n
+\cs_new_protected:Npn \__siunitx_combined_output:n #1 {
+ \group_begin:
+ \LetLtxMacro\@ensuredmath\LWR@origensuredmath
+ \bool_if:NTF \l__siunitx_number_parse_bool
+ {
+ \tl_clear:N \l__siunitx_number_out_tl
+ \bool_set_false:N \l__siunitx_number_compound_bool
+ \__siunitx_number_output_parse:n {#1}
+ }
+ {
+ \__siunitx_unit_output_pre_print:
+ \__siunitx_print:nn { number } { \ensuremath {#1} }
+ \__siunitx_unit_output_print:
+ }
+ \group_end:
+}
+
+\ExplSyntaxOff
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty
index aec6a684692..1dfaabf8668 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty
@@ -22,28 +22,37 @@
\newcommand*{\LWR@soulstcolor}{}
\newcommand*{\LWR@soulhlcolor}{}
-\newcommand{\so}[1]{\InlineClass{letterspacing}{#1}}
-\newcommand{\caps}[1]{\InlineClass{capsspacing}{#1}}
-\newcommand{\LWR@soulcolor}[4]{%
+\newcommand{\so}[1]{%
+\LWR@HTMLtextstyle{letter-spacing:.2ex}{letterspacing}{#1}%
+}
+
+\newcommand{\caps}[1]{%
+\LWR@HTMLtextstyle%
+ {font-variant:small-caps;letter-spacing:.1ex}%
+ {capsspacing}{#1}%
+}
+\newcommand{\LWR@soulcolor}[5]{%
\ifcsempty{#2}%
+{\LWR@HTMLtextstyle{#5}{#3}{#1}}%
{%
-\InlineClass{#3}{#1}}%
-{%
-\convertcolorspec{named}{\csuse{#2}}{HTML}\LWR@tempcolor%
-\InlineClass[#4: \#\LWR@tempcolor]{#3}{#1}%
+ \convertcolorspec{named}{\csuse{#2}}{HTML}\LWR@tempcolor%
+ \LWR@HTMLtextstyle{#5;#4:\#\LWR@tempcolor}{#3}{#1}%
}%
}
\newcommand{\ul}[1]{%
\LWR@soulcolor{#1}{LWR@soululcolor}{uline}{text-decoration-color}%
+ {text-decoration:underline;text-decoration-skip;}%
}
\newcommand{\st}[1]{
\LWR@soulcolor{#1}{LWR@soulstcolor}{sout}{text-decoration-color}%
+ {text-decoration:line-through}%
}
\newcommand{\hl}[1]{
\LWR@soulcolor{#1}{LWR@soulhlcolor}{highlight}{background-color}%
+ {background:\#F8E800}
}
\newcommand*{\soulaccent}[1]{}
\newcommand*{\soulregister}[2]{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty
index e5e1ab4fcd7..0af502a7753 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-subfig.sty
@@ -119,12 +119,12 @@
\@ifundefined{FBsc@max}%
{
\LWR@traceinfo{sfsubcap B1}% new
- \LWR@htmlblocktag{figcaption}% new
+ \LWR@figcaption% new
\caption@make
{\@nameuse{sub\@captype name}}%
{\@nameuse{thesub\@captype}}%
{#3}
- \LWR@htmlblocktag{/figcaption}% new
+ \LWR@figcaption% new
\LWR@traceinfo{sfsubcap B2}% new
}%
{\dimen@\ht0%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty
index c1eae9e4b71..40112a31421 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty
@@ -30,6 +30,7 @@
\let\LWR@origtextnaira\textnaira
\let\LWR@origtextpeso\textpeso
\let\LWR@origtextrecipe\textrecipe
+\let\LWR@origtextinterrobangdown\textinterrobangdown
\let\LWR@origtextpertenthousand\textpertenthousand
\let\LWR@origtextbaht\textbaht
\let\LWR@origtextdiscount\textdiscount
@@ -63,6 +64,7 @@
\renewcommand*{\textnaira}{\HTMLunicode{20A6}}
\renewcommand*{\textpeso}{\HTMLunicode{20B1}}
\renewcommand*{\textrecipe}{\HTMLunicode{211E}}
+\renewcommand*{\textinterrobangdown}{\HTMLunicode{2E18}}
\renewcommand*{\textpertenthousand}{\HTMLunicode{2031}}
\renewcommand*{\textbaht}{\HTMLunicode{0E3F}}
\renewcommand*{\textdiscount}{\%}
@@ -81,6 +83,7 @@
\renewcommand*{\textnaira}{₦}
\renewcommand*{\textpeso}{₱}
\renewcommand*{\textrecipe}{℞}
+\renewcommand*{\textinterrobangdown}{⸘}
\renewcommand*{\textpertenthousand}{‱}
\renewcommand*{\textbaht}{฿}
\renewcommand*{\textdiscount}{\%}
@@ -117,6 +120,7 @@
\let\textnaira\LWR@origtextnaira%
\let\textpeso\LWR@origtextpeso%
\let\textrecipe\LWR@origtextrecipe%
+\let\textinterrobangdown\LWR@origtextinterrobangdown%
\let\textpertenthousand\LWR@origtextpertenthousand%
\let\textbaht\LWR@origtextbaht%
\let\textdiscount\LWR@origtextdiscount%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty
index 2a597dada71..8bf5db0c1e0 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-theorem.sty
@@ -18,6 +18,7 @@
\LWR@ProvidesPackagePass{theorem}
+
\newcommand{\LWR@newtheoremstyle}{plain}
\gdef\theoremstyle#1{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty
index be307149118..1cc8bb7a6ac 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titleps.sty
@@ -19,20 +19,25 @@
\LWR@ProvidesPackageDrop{titleps}
\NewDocumentCommand{\newpagestyle}{m o m}{}
+
\NewDocumentCommand{\renewpagestyle}{m o m}{}
\NewDocumentCommand{\sethead}{o o o m m m}{}
+
\NewDocumentCommand{\setfoot}{o o o m m m}{}
\NewDocumentCommand{\settitlemarks}{s m}{}
\newcommand*{\headrule}{}
+
\newcommand*{\footrule}{}
\newcommand*{\setheadrule}[1]{}
+
\newcommand*{\setfootrule}[1]{}
\newcommand*{\makeheadrule}{}
+
\newcommand*{\makefootrule}{}
\newcommand{\setmarkboth}[1]{}
@@ -40,10 +45,15 @@
\NewDocumentCommand{\widenhead}{s o o m m}{}
\newcommand*{\bottitlemarks}{}
+
\newcommand*{\toptitlemarks}{}
+
\newcommand*{\firsttitlemarks}{}
+
\newcommand*{\nexttoptitlemarks}{}
+
\newcommand*{\outertitlemarks}{}
+
\newcommand*{\innertitlemarks}{}
\NewDocumentCommand{\newtitlemark}{s m}{}
@@ -53,9 +63,11 @@
\newcommand{\ifsamemark}[4]{}
\NewDocumentCommand{\setfloathead}{s o o o m m m m m}{}
+
\NewDocumentCommand{\setfloatfoot}{s o o o m m m m m}{}
\NewDocumentCommand{\nextfloathead}{s o o o m m m m m}{}
+
\NewDocumentCommand{\nextfloatfoot}{s o o o m m m m m}{}
\newcommand{\newmarkset}[1]{}
@@ -63,10 +75,15 @@
\NewDocumentCommand{\newextramarkset}{s m m}{}
\newcommand{\botextramarks}[1]{}
+
\newcommand{\topextramarks}[1]{}
+
\newcommand{\firstextramarks}[1]{}
+
\newcommand{\nexttopextramarks}[1]{}
+
\newcommand{\outerextramarks}[1]{}
+
\newcommand{\innerextramarks}[1]{}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty
index 73f92bf8dfa..797865b5c2f 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titlesec.sty
@@ -35,10 +35,15 @@
\NewDocumentCommand{\titlespacing}{s m m m m o}{}
\newcommand*{\filright}{}
+
\newcommand*{\filcenter}{}
+
\newcommand*{\filleft}{}
+
\newcommand*{\fillast}{}
+
\newcommand*{\filinner}{}
+
\newcommand*{\filouter}{}
\newcommand\wordsep{\fontdimen\tw@\font \@plus
@@ -51,7 +56,9 @@
\newcommand*{\ttl@row}[2][]{}
\newcommand{\iftitlemeasuring}[2]{#2}
+
\newcommand{\assignpagestyle}[2]{#2}
+
\NewDocumentCommand{\titleclass}{m o m o}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty
index b545422099c..32cf62a33e4 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titletoc.sty
@@ -30,9 +30,11 @@
\newcommand{\contentsmargin}[2][]{}
\newcommand*{\thecontentslabel}{thecontentslabel}
+
\newcommand*{\thecontentspage}{thecontentspage}
\newcommand{\contentslabel}[2][]{\thecontentslabel}
+
\newcommand{\contentspage}[1][]{\thecontentspage}
\newcommand{\contentspush}[1]{}
@@ -40,13 +42,17 @@
\newcommand{\contentsuse}[2]{}
\newcommand*{\startcontents}[1][]{}
+
\newcommand*{\stopcontents}[1][]{}
+
\newcommand*{\resumecontents}[1][]{}
\newcommand{\printcontents}[4][]{}
\newcommand{\startlist}[2][]{}
+
\newcommand{\stoplist}[2][]{}
+
\newcommand{\resumelist}[2][]{}
\newcommand{\printlist}[4][]{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
index 47d9b18a9ad..68103bddc69 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
@@ -69,9 +69,9 @@
\DeclareDocumentCommand{\@maketitle}{}{%
\maketitlehooka
{
- \LWR@stoppars\LWR@htmltag{h1}
+ \LWR@stoppars\LWR@htmltag{\LWR@tagtitle}
\@bspretitle \@title \@bsposttitle
- \LWR@htmltag{/h1}\LWR@startpars
+ \LWR@htmltag{\LWR@tagtitleend}\LWR@startpars
}
\maketitlehookb
{
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
index ac033b8d0f9..1e05d8fe368 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tocloft.sty
@@ -23,33 +23,42 @@
\newcommand{\tocloftpagestyle}[1]{}
\newcommand*{\cftmarktoc}{}
+
\newcommand*{\cfttoctitlefont}{}
+
\newcommand*{\cftaftertoctitle}{}
\newlength{\cftbeforetoctitleskip}
\newlength{\cftaftertoctitleskip}
\newcommand*{\cftmarklof}{}
+
\newcommand*{\cftloftitlefont}{}
+
\newcommand*{\cftafterloftitle}{}
\newlength{\cftbeforeloftitleskip}
\newlength{\cftafterloftitleskip}
\newcommand*{\cftmarklot}{}
+
\newcommand*{\cftlottitlefont}{}
+
\newcommand*{\cftafterlottitle}{}
\newlength{\cftbeforelottitleskip}
\newlength{\cftafterlottitleskip}
\newcommand*{\cftdot}{.}
+
\providecommand*{\cftdotsep}{1}
+
\newcommand*{\cftnodots}{5000}
\providecommand{\cftdotfill}[1]{}
\newcommand*{\cftsetpnumwidth}[1]{}
+
\newcommand*{\cftsetrmarg}[1]{}
\newcommand*{\cftpnumalign}[1]{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty
index c89139bd40d..bd89310b269 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ulem.sty
@@ -18,31 +18,59 @@
\LetLtxMacro\LWR@ulemorigemph\emph
\LetLtxMacro\LWR@ulemorigtextbf\textbf
\NewDocumentCommand{\uline}{+m}{%
-\InlineClass{uline}{#1}%
+\LWR@HTMLtextstyle%
+ {text-decoration:underline;text-decoration-skip}%
+ {uline}{#1}%
}
\NewDocumentCommand{\uuline}{+m}{%
-\InlineClass{uuline}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;text-decoration-skip;%
+ text-decoration-style:double%
+ }%
+ {uuline}{#1}%
}
\NewDocumentCommand{\uwave}{+m}{%
-\InlineClass{uwave}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;text-decoration-skip;%
+ text-decoration-style:wavy%
+ }%
+ {uwave}{#1}%
}
\NewDocumentCommand{\sout}{+m}{%
-\InlineClass{sout}{#1}%
+\LWR@HTMLtextstyle%
+ {text-decoration:line-through}%
+ {sout}{#1}%
}
\NewDocumentCommand{\xout}{+m}{%
-\InlineClass{xout}{#1}%
+\LWR@HTMLtextstyle%
+ {text-decoration:line-through}%
+ {xout}{#1}%
}
\NewDocumentCommand{\dashuline}{+m}{%
-\InlineClass{dashuline}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;%
+ text-decoration-skip;%
+ text-decoration-style:dashed%
+ }%
+ {dashuline}{#1}%
}
\NewDocumentCommand{\dotuline}{+m}{%
-\InlineClass{dotuline}{#1}%
+\LWR@HTMLtextstyle%
+ {%
+ text-decoration:underline;%
+ text-decoration-skip;%
+ text-decoration-style:dotted%
+ }%
+ {dotuline}{#1}%
}
\NewDocumentCommand{\ULthickness}{}{}
\newlength{\ULdepth}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
index 3c52cad9193..461d3a5ed41 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
@@ -41,6 +41,7 @@
}
}{}
+\LWR@traceinfo{Finished patching verse.}
}% AfterEndPreamble
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty
index 4eb11999622..ef8270c1804 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-wrapfig.sty
@@ -19,13 +19,9 @@
\LWR@ProvidesPackageDrop{wrapfig}
-
-\newlength{\LWR@wrapwidth}
-
\newcommand*{\LWR@wrapposition}{}
\newcommand*{\LWR@subwrapfigure}[2]{%
-\LWR@maybeincthisfloat%
\renewcommand*{\LWR@wrapposition}{}%
\ifthenelse{%
\equal{#1}{r}\OR\equal{#1}{R}\OR%
@@ -33,16 +29,16 @@
}%
{\renewcommand*{\LWR@wrapposition}{float:right}}%
{\renewcommand*{\LWR@wrapposition}{float:left}}%
-\setlength{\LWR@wrapwidth}{#2}%
-\addtolength{\LWR@wrapwidth}{4em}%
+\setlength{\LWR@templengthone}{#2}%
\uselengthunit{PT}%
-\LWR@forcenewpage
-\LWR@stoppars%
-\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"
-style="width:\rndprintlength{\LWR@wrapwidth} ; %
-\LWR@wrapposition"%
+\LWR@BlockClassWP{%
+ width:\rndprintlength{\LWR@templengthone}; \LWR@wrapposition; %
+ margin:10pt%
+}%
+{%
+ width:\rndprintlength{\LWR@templengthone}; \LWR@wrapposition%
}%
-\LWR@startpars
+{marginblock}%
}
\NewDocumentEnvironment{wrapfigure}{o m o m}
@@ -51,7 +47,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\captionsetup{type=figure}%
}
{%
-\LWR@htmldivclassend{div}
+\endLWR@BlockClassWP%
}
\NewDocumentEnvironment{wraptable}{o m o m}
@@ -60,7 +56,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\captionsetup{type=table}%
}
{%
-\LWR@htmldivclassend{div}
+\endLWR@BlockClassWP%
}
\NewDocumentEnvironment{wrapfloat}{m o m o m}
@@ -69,7 +65,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\captionsetup{type=#1}%
}
{%
-\LWR@htmldivclassend{div}
+\endLWR@BlockClassWP%
}
\newlength{\wrapoverhang}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
index 73ef5eb9276..6ab31aea5eb 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
@@ -20,7 +20,6 @@
\LWR@ProvidesPackagePass{xcolor}
\begin{warpHTML}
-
\LetLtxMacro\LWRprint@textcolor\textcolor
\LetLtxMacro\LWRprint@pagecolor\pagecolor
\LetLtxMacro\LWRprint@nopagecolor\nopagecolor
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index b5810e6e6b6..333d89cbbad 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,8 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/10/07 v0.41 Allows LaTeX to directly produce HTML5 output.]
+ [2017/10/30 v0.42 Allows LaTeX to directly produce HTML5 output.]
+
@@ -290,6 +291,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{nopageno}
\LWR@loadafter{nowidow}
\LWR@loadafter{ntheorem}
+\LWR@loadafter{overpic}
\LWR@loadafter{pagenote}
\LWR@loadafter{paralist}
\LWR@loadafter{parskip}
@@ -644,15 +646,96 @@ top=1in,bottom=1in,%
\LWR@traceinfo{AtBeginDocument}
}
+\end{warpall}
+
+\begin{warpall}
\newbool{FormatEPUB}
\boolfalse{FormatEPUB}
-\newbool{FormatWordProcessor}
-\boolfalse{FormatWordProcessor}
-\newbool{HTMLMarkFloats}
-\booltrue{HTMLMarkFloats}
+\newbool{FormatWP}
+\boolfalse{FormatWP}
+\newbool{WPMarkFloats}
+\boolfalse{WPMarkFloats}
+
+\newbool{WPMarkMinipages}
+\boolfalse{WPMarkMinipages}
+
+\newbool{WPMarkTOC}
+\booltrue{WPMarkTOC}
+
+\newbool{WPMarkLOFT}
+\boolfalse{WPMarkLOFT}
+
+\newbool{WPMarkMath}
+\boolfalse{WPMarkMath}
+
+\newbool{WPTitleHeading}
+\boolfalse{WPTitleHeading}
\end{warpall}
+\begin{warpHTML}
+\AtBeginDocument{
+\ifbool{FormatWP}{
+\@ifundefined{chapter}{
+\ifbool{WPTitleHeading}{% part and section starting at h2
+\renewcommand*{\LWR@tagtitle}{h1}
+\renewcommand*{\LWR@tagtitleend}{/h1}
+\renewcommand*{\LWR@tagpart}{h2}
+\renewcommand*{\LWR@tagpartend}{/h2}
+\renewcommand*{\LWR@tagsection}{h3}
+\renewcommand*{\LWR@tagsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsection}{h4}
+\renewcommand*{\LWR@tagsubsectionend}{/h4}
+\renewcommand*{\LWR@tagsubsubsection}{h5}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
+\renewcommand*{\LWR@tagparagraph}{h6}
+\renewcommand*{\LWR@tagparagraphend}{/h6}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraphend}{/span}
+}% WPTitleHeading
+{% not WPTitleHeading, part and section starting at h1
+\renewcommand*{\LWR@tagtitle}{div class="title"}
+\renewcommand*{\LWR@tagtitleend}{/div}
+\renewcommand*{\LWR@tagpart}{h1}
+\renewcommand*{\LWR@tagpartend}{/h1}
+\renewcommand*{\LWR@tagsection}{h2}
+\renewcommand*{\LWR@tagsectionend}{/h2}
+\renewcommand*{\LWR@tagsubsection}{h3}
+\renewcommand*{\LWR@tagsubsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsubsection}{h4}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h4}
+\renewcommand*{\LWR@tagparagraph}{h5}
+\renewcommand*{\LWR@tagparagraphend}{/h5}
+\renewcommand*{\LWR@tagsubparagraph}{h6}
+\renewcommand*{\LWR@tagsubparagraphend}{/h6}
+}% not WPTitleHeading
+}% chapter undefined
+{% chapter defined
+\ifbool{WPTitleHeading}{}
+{% not WPTitleHeading, part and chapter starting at h1
+\renewcommand*{\LWR@tagtitle}{div class="title"}
+\renewcommand*{\LWR@tagtitleend}{/div}
+\renewcommand*{\LWR@tagpart}{h1}
+\renewcommand*{\LWR@tagpartend}{/h1}
+\renewcommand*{\LWR@tagchapter}{h2}
+\renewcommand*{\LWR@tagchapterend}{/h2}
+\renewcommand*{\LWR@tagsection}{h3}
+\renewcommand*{\LWR@tagsectionend}{/h3}
+\renewcommand*{\LWR@tagsubsection}{h4}
+\renewcommand*{\LWR@tagsubsectionend}{/h4}
+\renewcommand*{\LWR@tagsubsubsection}{h5}
+\renewcommand*{\LWR@tagsubsubsectionend}{/h5}
+\renewcommand*{\LWR@tagparagraph}{h6}
+\renewcommand*{\LWR@tagparagraphend}{/h6}
+\renewcommand*{\LWR@tagsubparagraph}{span class="subparagraph"{}}
+\renewcommand*{\LWR@tagsubparagraphend}{/span}
+}% not WPTitleHeading
+}% chapter defined
+}{}% FormatWP
+}% AtBeginDocument
+
+\end{warpHTML}
+
\begin{warpHTML}
@@ -685,8 +768,12 @@ top=1in,bottom=1in,%
\let\LWR@origsp\sp
\let\LWR@origsb\sb
-\let\LWR@origtextsuperscript\textsuperscript
-\let\LWR@origtextsubscript\textsubscript
+\LetLtxMacro\LWR@origtextsuperscript\textsuperscript
+\LetLtxMacro\LWR@orig@textsuperscript\@textsuperscript
+\AtBeginDocument{
+\LetLtxMacro\LWR@origtextsubscript\textsubscript
+\LetLtxMacro\LWR@orig@textsubscript\@textsubscript
+}
\LetLtxMacro\LWR@origunderline\underline
\let\LWR@origscriptsize\scriptsize
@@ -968,6 +1055,13 @@ span.poemtitle {
font-size: 120% ; font-weight: bold;
}
+pre.tabbing {
+ font-family: "Linux Libertine Mono O", "Lucida Console",
+ "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
+ "Liberation Mono", "FreeMono", "Andale Mono",
+ "Nimbus Mono L", "Courier New", monospace;
+}
+
blockquote {
margin-left: 0px ;
margin-right: 0px ;
@@ -1345,6 +1439,11 @@ div.singlespace { line-height: 1.2 ; }
div.onehalfspace { line-height: 1.5 ; }
div.doublespace { line-height: 2 ; }
+/* Word processor format output: */
+div.wpfigure { border: 1px solid red ; margin: .5ex ; padding: .5ex ; }
+div.wptable { border: 1px solid blue ; margin: .5ex ; padding: .5ex ; }
+div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}
+
/* Minipage environments, vertically aligned to top, center, bottom: */
.minipage, .fminipage, .fcolorminipage {
/* display: inline-block ; */
@@ -2593,15 +2692,16 @@ MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
"https://cdn.mathjax.org/mathjax/contrib";
</script>
-<!-- https://github.com/mathjax/MathJax-third-party-extensions/
- tree/master/siunitx -->
+<!-- https://github.com/burnpanck/MathJax-siunitx -->
+
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
- extensions: ["tex2jax.js","[Contrib]/siunitx/siunitx.js"],
+ extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
});
+ MathJax.Ajax.config.path['siunitx'] = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
</script>
<script type="text/x-mathjax-config">
@@ -2639,7 +2739,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.41"
+printversion = "v0.42"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3272,7 +3372,7 @@ end -- not --version
\begin{warpHTML}
\NewDocumentCommand{\LWR@setexparray}{m m m}{%
\ifthenelse{\isempty{#3}}%
-{\csdef{#1#2}{}}
+{\csdef{#1#2}{}}%
{\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}%
}
\newcommand*{\LWR@getexparray}[2]{\csuse{#1#2}}
@@ -3438,6 +3538,8 @@ end -- not --version
\begin{warpHTML}
+\newcommand*{\LWR@tagtitle}{h1}
+\newcommand*{\LWR@tagtitleend}{/h1}
\newcommand*{\LWR@tagpart}{h2}
\newcommand*{\LWR@tagpartend}{/h2}
\newcommand*{\LWR@tagchapter}{h3}
@@ -3720,6 +3822,33 @@ end -- not --version
\NewDocumentCommand{\InlineClass}{o m +m}{#3}%
\end{warpprint}
+\begin{warpHTML}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}%
+{%
+\LWR@stoppars%
+\ifbool{FormatWP}%
+{%
+ \LWR@maybeincthisfloat%
+ \LWR@htmltag{%
+ div class="#3" %
+ id="autofloat-\arabic{LWR@thisfloat}"%
+ \ifblank{#1}{}{ style="#1"}%
+ }%
+}% FormatWP
+{% not FormatWP
+ \LWR@htmltag{%
+ div class="#3"%
+ \ifblank{#2}{}{ style="#2"}%
+ }%
+}% not FormatWP
+\LWR@startpars%
+}
+{\LWR@htmldivclassend{#3}}
+\end{warpHTML}
+\begin{warpprint}
+\NewDocumentEnvironment{LWR@BlockClassWP}{m m m}{}{}%
+\end{warpprint}
+
\begin{warpHTML}
@@ -4019,7 +4148,7 @@ end -- not --version
\fi
}
\newcommand*{\LWR@epubprintpendingfootnotes}{%
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}%
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}%
{\LWR@printpendingfootnotes}%
{}%
}
@@ -4029,7 +4158,13 @@ end -- not --version
\begin{warpHTML}
\renewcommand{\marginpar}[2][]{%
-\LWR@htmlspanclass{marginpar}{#2}%
+\ifbool{FormatWP}%
+{%
+\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}{marginblock}
+#2
+\end{LWR@BlockClassWP}
+}%
+{\LWR@htmlspanclass{marginpar}{#2}}%
}
\end{warpHTML}
@@ -4062,7 +4197,7 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{'}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\LWR@origampersand}{-}[\LWR@thisnewfilename]
+ {\LWR@origampersand}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{+}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{,}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{/}{-}[\LWR@thisnewfilename]
@@ -4073,16 +4208,16 @@ end -- not --version
\StrSubstitute{\LWR@thisnewfilename}{@}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{"}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textless}{-}[\LWR@thisnewfilename]
+ {\textless}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
-{\textgreater}{-}[\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}%
-{\textbackslash}{-}[\LWR@thisnewfilename]
+ {\textbackslash}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{^}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{~{}}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{[}{-}[\LWR@thisnewfilename]
@@ -4132,7 +4267,7 @@ end -- not --version
\LWR@htmlelementend{footer}
}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}}
@@ -4156,11 +4291,11 @@ end -- not --version
\LWR@filestart{ — #1}% there is an EMdash in front of the #1
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@topnavigation}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{
\LWR@htmlelement{header}
@@ -4170,11 +4305,11 @@ end -- not --version
\LWR@htmlelementend{header}
}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\ifcsvoid{thetitle}{}{\LWR@printthetitle}}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{\LWR@sidetoc}
@@ -4514,7 +4649,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@LwarpStart}
{%
\LWR@traceinfo{LWR@lwarpStart}
-\ifbool{FormatWordProcessor}{%
+\ifbool{FormatWP}{%
\setcounter{FileDepth}{-5}%
\boolfalse{HTMLDebugComments}%
}{}
@@ -4571,7 +4706,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\catcode`\$=3% math shift until lwarp starts
-
\end{warpHTML}
@@ -4599,7 +4733,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@htmlelementend{footer}
-\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
+\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWP}}
{}
{
\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}
@@ -4650,17 +4784,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\printtitle}
{
\LWR@stoppars
-\LWR@htmltag{h1}%
+\LWR@htmltag{\LWR@tagtitle}%
\@title%
-\LWR@htmltag{/h1}
+\LWR@htmltag{\LWR@tagtitleend}
\LWR@startpars
}
\newcommand*{\LWR@printthetitle}
{
\LWR@stoppars
-\LWR@htmltag{h1}%
+\LWR@htmltag{\LWR@tagtitle}%
\thetitle%
-\LWR@htmltag{/h1}
+\LWR@htmltag{\LWR@tagtitleend}
\LWR@startpars
}
@@ -4737,9 +4871,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\let\and\relax
}
\DeclareDocumentCommand{\@maketitle}{}{%
- \LWR@stoppars\LWR@htmltag{h1}
+ \LWR@stoppars\LWR@htmltag{\LWR@tagtitle}
\@title
- \LWR@htmltag{/h1}\LWR@startpars
+ \LWR@htmltag{\LWR@tagtitleend}\LWR@startpars
\begin{BlockClass}{author}
\renewcommand{\and}{
\end{BlockClass}
@@ -4915,7 +5049,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@forcenewpage
\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
}
-\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim}
+\AfterEndEnvironment{verbatim}{%
+ \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
+}
+}
+
+\AfterEndPreamble{
+\LWR@traceinfo{Patching tabbing.}
+\AtBeginEnvironment{tabbing}{%
+\LWR@forcenewpage
+\LWR@atbeginverbatim{tabbing}\unskip\LWR@origvspace*{-\baselineskip}%
+}
+\AfterEndEnvironment{tabbing}{%
+ \unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
+}
}
\end{warpHTML}
@@ -5406,16 +5553,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@printbartag}[1]{%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
-{%
-}%
-{ % not muting
- \ifstrequal{#1}{leftedge}{%
- \LWR@getexparray{LWR@colbarspec}{leftedge} %
- }%
- {
- \LWR@getexparray{LWR@colbarspec}{#1} %
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
- } %
+{}% muting or empty
+{% not muting
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
+ \ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
}% not muting
}
@@ -5431,7 +5572,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@subaddcmidruletrim{}{}%
\LWR@printbartag{#2}%
"%
+ \LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@tdendstyles%
}%
\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
{}%
@@ -5471,7 +5614,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+ \LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+ \LWR@addformatwpalignment%
+ \LWR@tdendstyles%
}%
\ifthenelse{%
\equal{\LWR@strresult}{p}\OR%
@@ -5545,13 +5691,34 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newlength{\LWR@templengthone}%
\newlength{\LWR@templengthtwo}%
+\newboolean{LWR@tdhavecellstyle}
+
+\newcommand*{\LWR@tdstartstyles}{\global\boolfalse{LWR@tdhavecellstyle}}
+
+\newcommand*{\LWR@tdaddstyle}{%
+\ifbool{LWR@tdhavecellstyle}%
+{; }%
+{ style="}%
+\booltrue{LWR@tdhavecellstyle}%
+}
+
+\newcommand*{\LWR@tdendstyles}{%
+\ifbool{LWR@tdhavecellstyle}{%
+ "%
+ \global\boolfalse{LWR@tdhavecellstyle}%
+}{}%
+}
+
\newcommand*{\LWR@subaddcmidruletrim}[2]{%
\setlength{\LWR@templengthone}{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}%
\ifdimcomp{\LWR@templengthone}{>}{0pt}%
{%
\LWR@origtilde tdrule#1#2%
\setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
-}{}%
+}%
+{%
+ \setlength{\LWR@thiscmidrulewidth}{0pt}%
+}%
}
\newcommand*{\LWR@addcmidruletrim}{%
@@ -5561,12 +5728,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
\newcommand{\LWR@addrulewidth}[2]{%
-\ifdimcomp{#1}{=}{#2}%
+\ifboolexpr{%
+ test{\ifdimcomp{#1}{=}{0pt}}%
+ or ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )%
+}%
{}% default width
{% custom width
\LWR@forceminwidth{#1}%
- \uselengthunit{PT} % explicit space
- style="border-top:\rndprintlength{\LWR@atleastonept} solid %
+ \LWR@tdaddstyle%
+ \uselengthunit{PT}%
+ border-top:\rndprintlength{\LWR@atleastonept} solid %
\ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
{\#A0A0A0}%
{% lightrule or heaver
@@ -5574,7 +5745,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{\#808080}%
{black}%
}% lightrule or heavier
- "%
}% custom width
}
@@ -5582,6 +5752,26 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@addrulewidth{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
}
+\newcommand*{\LWR@WPcell}[2]{%
+\LWR@tdaddstyle%
+text-align:#1; vertical-align:#2%
+}
+
+\newcommand*{\LWR@addformatwpalignment}{%
+\ifbool{FormatWP}{%
+\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]%
+\ifdefstring{\LWR@strresult}{l}{\LWR@WPcell{left}{middle}}{}%
+\ifdefstring{\LWR@strresult}{c}{\LWR@WPcell{center}{middle}}{}%
+\ifdefstring{\LWR@strresult}{r}{\LWR@WPcell{right}{middle}}{}%
+\ifdefstring{\LWR@strresult}{p}{\LWR@WPcell{left}{bottom}}{}%
+\ifdefstring{\LWR@strresult}{m}{\LWR@WPcell{left}{middle}}{}%
+\ifdefstring{\LWR@strresult}{b}{\LWR@WPcell{left}{top}}{}%
+\ifdefstring{\LWR@strresult}{P}{\LWR@WPcell{center}{bottom}}{}%
+\ifdefstring{\LWR@strresult}{M}{\LWR@WPcell{center}{middle}}{}%
+\ifdefstring{\LWR@strresult}{B}{\LWR@WPcell{center}{top}}{}%
+}{}%
+}
+
\newcounter{LWR@tablemulticolswidth}
@@ -5687,7 +5877,10 @@ rowspan="#2" %
\LWR@addleftmostbartag%
\LWR@printbartag{\theLWR@tablecolspos}%
"%
+\LWR@tdstartstyles%
\LWR@addcmidrulewidth%
+\LWR@addformatwpalignment%
+\LWR@tdendstyles%
}% end of the opening table data tag
\global\boolfalse{LWR@intabularmetadata}%
\LWR@parsemulticolumnalignment{#4}{\LWR@printmccoldata}%
@@ -5718,9 +5911,9 @@ rowspan="#2" %
\LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{P}{% \LWR@domulticolumn
\IfBooleanTF{#1}% star?
{% yes star
- \LWR@htmlblocktag{figcaption}%
+ \LWR@figcaption%
#3%
- \LWR@htmlblocktag{/figcaption}%
+ \endLWR@figcaption%
}%
{% No star:
\ifbool{LWR@starredlongtable}%
@@ -5733,9 +5926,9 @@ rowspan="#2" %
\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
}%
}{}%
- \LWR@htmlblocktag{figcaption}%
+ \LWR@figcaption%
\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
- \LWR@htmlblocktag{/figcaption}%
+ \endLWR@figcaption%
\ifthenelse{\equal{#2}{}}% TOC entry empty
{}%
{% TOC entry not empty
@@ -5931,12 +6124,20 @@ rowspan="#2" %
\newcommand*{\LWR@origspecialrule}[3]{\hline}
\AtBeginDocument{
\@ifpackageloaded{lwarp-tabls}
-{\newcommand*{\LWR@hline}[1][]{%
- \booltrue{LWR@doinghline}%
- \LWR@getmynexttoken}}
-{\newcommand*{\LWR@hline}{%
- \booltrue{LWR@doinghline}%
- \LWR@getmynexttoken}}
+{
+\newcommand*{\LWR@hline}[1][]{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+}
+{
+\newcommand*{\LWR@hline}{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+}
}% AtBeginDocument
\AtBeginDocument{
@@ -5982,13 +6183,21 @@ rowspan="#2" %
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doingtbrule}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
\LWR@getmynexttoken}%
\DeclareDocumentCommand{\midrule}{o d()}%
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doinghline}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ }%
\LWR@getmynexttoken}%
\DeclareDocumentCommand{\cmidrule}{O{\LWR@cmidrulewidth} d() m}%
{\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}%
@@ -5996,7 +6205,11 @@ rowspan="#2" %
{%
\IfValueTF{##1}%
{\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
- {\booltrue{LWR@doingtbrule}}%
+ {%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ }%
\LWR@getmynexttoken}%
\DeclareDocumentCommand{\addlinespace}{o}{}%
\DeclareDocumentCommand{\morecmidrules}{}{}%
@@ -6258,34 +6471,41 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\begin{warpHTML}
\NewDocumentCommand{\LWR@floatbegin}{m o}{%
-\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{%
-
-=== #1 begin
-
-}{}%
+\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars
\addtocounter{LWR@thisfloat}{1}%
\booltrue{LWR@freezethisfloat}%
-\begingroup
-\LWR@origraggedright
-\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}
-\renewcommand*{\@captype}{#1}
-\caption@settype{#1}
-\LWR@startpars
+\begingroup%
+\LWR@origraggedright%
+\LWR@htmltag{figure id="autofloat-\arabic{LWR@thisfloat}" class="#1"}%
+\ifbool{FormatWP}{%
+ \LWR@orignewline%
+ \LWR@BlockClassWP{}{}{wp#1}%
+}{}%
+\renewcommand*{\@captype}{#1}%
+\caption@settype{#1}%
+\LWR@startpars%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+
+=== begin #1 ===
+
+}{}%
}
\let\@float\LWR@floatbegin
\let\@dblfloat\LWR@floatbegin
\newcommand*{\LWR@floatend}{%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+
+=== end ===
+
+}{}%
\LWR@stoppars%
+\ifbool{FormatWP}{\endLWR@BlockClassWP}{}%
\LWR@htmlelementend{figure}%
\endgroup%
\boolfalse{LWR@freezethisfloat}%
\LWR@startpars%
-\ifthenelse{\boolean{FormatWordProcessor}\AND\boolean{HTMLMarkFloats}}{%
-
-=== end
-
-}{}%
+\ifbool{FormatWP}{\newline}{}%
}
\let\end@float\LWR@floatend
\let\end@dblfloat\LWR@floatend
@@ -6317,6 +6537,19 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@latestautopage}
\setcounter{LWR@latestautopage}{1}
+\newenvironment*{LWR@figcaption}
+{%
+\LWR@htmlblocktag{figcaption}
+\ifbool{FormatWP}{%
+\begin{BlockClass}[font-style:italic]{italic}
+\LWR@origvspace*{\baselineskip}
+}{}%
+}
+{%
+\ifbool{FormatWP}{\end{BlockClass}}{}%
+\LWR@htmlblocktag{/figcaption}%
+}
+
\let\LWR@origcaption@begin\caption@begin
\let\LWR@origcaption@end\caption@end
\let\LWR@orig@@par\@@par
@@ -6328,7 +6561,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}%
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}{##5}%
-\LWR@htmlblocktag{figcaption}%
+\LWR@figcaption%
\LWR@origcaption@begin%
}
@@ -6336,7 +6569,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
{%
\LWR@origcaption@end%
\LWR@origvspace*{\baselineskip}%
-\LWR@htmlblocktag{/figcaption}%
+\endLWR@figcaption%
\endgroup%
\LWR@traceinfo{LWR@caption@end: done}%
}
@@ -6426,25 +6659,43 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@htmlelementclassend{nav}{#1}
}
\let\LWR@origtableofcontents\tableofcontents
-\let\LWR@origlistoffigures\listoffigures
-\let\LWR@origlistoftables\listoftables
\renewcommand*{\tableofcontents}{%
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkTOC}}{
+
+=== table of contents ===
+
+}
+{
\LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
\LWR@printpendingfootnotes
\LWR@origtableofcontents
}
}
+
+\let\LWR@origlistoffigures\listoffigures
+
\renewcommand*{\listoffigures}{
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+
+=== list of figures ===
+
+}
+{
\LWR@printpendingfootnotes
\LWR@origlistoffigures
}
}
+\let\LWR@origlistoftables\listoftables
+
\renewcommand*{\listoftables}{
-\ifbool{FormatWordProcessor}{}{
+\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+
+=== list of tables ===
+
+}
+{
\LWR@printpendingfootnotes
\LWR@origlistoftables
}
@@ -6617,6 +6868,84 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\providecommand{\glo@name}{}
\end{warpall}
+\newcommand*{\LWR@restoreorigformatting}{%
+\LWR@traceinfo{LWR@restoreorigformatting}%
+\linespread{1}%
+\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
+\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
+\renewcommand{\BlockClassSingle}[2]{##2}%
+\LetLtxMacro{\hspace}{\LWR@orighspace}%
+\LetLtxMacro\rule\LWR@origrule%
+\let\,\LWR@origcomma% disable HTML short unbreakable space
+\let\textellipsis\LWR@origtextellipsis%
+\let\textless\LWR@origtextless%
+\let\textgreater\LWR@origtextgreater%
+\LetLtxMacro{\textrm}{\LWR@origtextrm}%
+\LetLtxMacro{\textsf}{\LWR@origtextsf}%
+\LetLtxMacro{\texttt}{\LWR@origtexttt}%
+\LetLtxMacro{\textbf}{\LWR@origtextbf}%
+\LetLtxMacro{\textmd}{\LWR@origtextmd}%
+\LetLtxMacro{\textit}{\LWR@origtextit}%
+\LetLtxMacro{\textsl}{\LWR@origtextsl}%
+\LetLtxMacro{\textsc}{\LWR@origtextsc}%
+\LetLtxMacro{\textup}{\LWR@origtextup}%
+\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
+\LetLtxMacro{\emph}{\LWR@origemph}%
+\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
+\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
+\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
+\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
+\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
+\LetLtxMacro{\upshape}{\LWR@origupshape}%
+\LetLtxMacro{\slshape}{\LWR@origslshape}%
+\LetLtxMacro{\scshape}{\LWR@origscshape}%
+\LetLtxMacro{\itshape}{\LWR@origitshape}%
+\LetLtxMacro{\em}{\LWR@origem}%
+\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
+\let\sp\LWR@origsp%
+\let\sb\LWR@origsb%
+\LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
+\LetLtxMacro\@textsuperscript\LWR@orig@textsuperscript%
+\LetLtxMacro\textsubscript\LWR@origtextsubscript%
+\LetLtxMacro\@textsubscript\LWR@orig@textsubscript%
+\LetLtxMacro\underline\LWR@origunderline%
+\let~\LWR@origtilde%
+\let\enskip\LWR@origenskip%
+\let\quad\LWR@origquad%
+\let\qquad\LWR@origqquad%
+\LetLtxMacro{\tabular}{\LWR@origtabular}%
+\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
+\LetLtxMacro\toprule\LWR@origtoprule%
+\LetLtxMacro\midrule\LWR@origmidrule%
+\LetLtxMacro\cmidrule\LWR@origcmidrule%
+\LetLtxMacro\bottomrule\LWR@origbottomrule%
+\LetLtxMacro\addlinespace\LWR@origaddlinespace%
+\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
+\LetLtxMacro\specialrule\LWR@origspecialrule%
+\let\newline\LWR@orignewline%
+\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
+\LetLtxMacro\includegraphics\LWR@origincludegraphics%
+\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
+\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
+\let\reflectbox\LWR@origreflectbox%
+\LetLtxMacro\resizebox\LWR@origresizebox%
+\let\framebox\LWR@origframebox%
+\let\makebox\LWR@origmakebox%
+\let\fbox\LWRprint@fbox%
+\let\fboxBlock\LWRprint@fbox%
+\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
+\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
+\LetLtxMacro{\minipage}{\LWR@origminipage}%
+\let\endminipage\LWR@endminipage%
+\LetLtxMacro{\parbox}{\LWR@origparbox}%
+\let\TeX\LWR@origTeX%
+\let\LaTeX\LWR@origLaTeX%
+\let\LaTeXe\LWR@origLaTeXe%
+\renewcommand*{\Xe}{X\textsubscript{E}}%
+\LetLtxMacro\@ensuredmath\LWR@origensuredmath%
+\LWR@restoreorigaccents%
+\LWR@FBcancel%
+}
\begin{warpHTML}
@@ -6630,7 +6959,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@externalfilecnt}
-
\LetLtxMacro\LWR@origdollar$
\LetLtxMacro\LWR@secondorigdollar$% balance for editor syntax highlighting
@@ -6644,26 +6972,33 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\protected\gdef${\@ifnextchar$\LWR@doubledollar\LWR@singledollar}%
\gdef\LWR@doubledollar$#1$${
-\ifbool{mathjax}%
-{\textbackslash[\LWR@HTMLsanitize{#1}\textbackslash]}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+
+ \textbackslash[%
+ \LWR@HTMLsanitize{#1}%
+ \textbackslash]
+
+}% mathjax
{% not mathjax
-\begin{lateximage}%
-[\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
-\LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
-\end{lateximage}
+ \begin{lateximage}%
+ [\textbackslash{[} \LWR@HTMLsanitize{#1} \textbackslash{]}]%
+ \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
+ \end{lateximage}%
-}
+}% not mathjax
}%
-
\gdef\LWR@subsingledollar#1{%
-\ifbool{mathjax}%
-{\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
+ {\textbackslash(\LWR@HTMLsanitize{#1}\textbackslash)}%
+}% mathjax
{% not mathjax
- \begin{lateximage}%
- [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
- \LWR@origdollar#1\LWR@origdollar%
- \end{lateximage}%
+ \begin{lateximage}%
+ [\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)]%
+ \LWR@origdollar#1\LWR@origdollar%
+ \end{lateximage}%
}%
}
@@ -6677,11 +7012,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\endgroup
-\let\LWR@orig@ensuredmath\@ensuredmath
+\LetLtxMacro\LWR@origensuredmath\@ensuredmath
-\newcommand*{\LWR@ensuredmath}[1]{%
-\LWR@traceinfo{@ensuredmath: page \thepage: \detokenize{#1}}%
-\LWR@subsingledollar{#1}%
+\renewcommand{\@ensuredmath}[1]{%
+\ifmmode%
+ \LWR@origensuredmath{#1}%
+\else%
+ \LWR@subsingledollar{\relax#1}%
+\fi%
}
\let\math\relax
@@ -6713,81 +7051,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
}
}{}% not eq > 0
}
-\newcommand*{\LWR@restoreorigformatting}{%
-\LWR@traceinfo{LWR@restoreorigformatting}%
-\RenewDocumentCommand{\InlineClass}{o m +m}{##3}%
-\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
-\renewcommand{\BlockClassSingle}[2]{##2}%
-\LetLtxMacro{\hspace}{\LWR@orighspace}%
-\LetLtxMacro\rule\LWR@origrule%
-\let\,\LWR@origcomma% disable HTML short unbreakable space
-\let\textellipsis\LWR@origtextellipsis%
-\let\textless\LWR@origtextless%
-\let\textgreater\LWR@origtextgreater%
-\LetLtxMacro{\textrm}{\LWR@origtextrm}%
-\LetLtxMacro{\textsf}{\LWR@origtextsf}%
-\LetLtxMacro{\texttt}{\LWR@origtexttt}%
-\LetLtxMacro{\textbf}{\LWR@origtextbf}%
-\LetLtxMacro{\textmd}{\LWR@origtextmd}%
-\LetLtxMacro{\textit}{\LWR@origtextit}%
-\LetLtxMacro{\textsl}{\LWR@origtextsl}%
-\LetLtxMacro{\textsc}{\LWR@origtextsc}%
-\LetLtxMacro{\textup}{\LWR@origtextup}%
-\LetLtxMacro{\textnormal}{\LWR@origtextnormal}%
-\LetLtxMacro{\emph}{\LWR@origemph}%
-\LetLtxMacro{\rmfamily}{\LWR@origrmfamily}%
-\LetLtxMacro{\sffamily}{\LWR@origsffamily}%
-\LetLtxMacro{\ttfamily}{\LWR@origttfamily}%
-\LetLtxMacro{\bfseries}{\LWR@origbfseries}%
-\LetLtxMacro{\mdseries}{\LWR@origmdseries}%
-\LetLtxMacro{\upshape}{\LWR@origupshape}%
-\LetLtxMacro{\slshape}{\LWR@origslshape}%
-\LetLtxMacro{\scshape}{\LWR@origscshape}%
-\LetLtxMacro{\itshape}{\LWR@origitshape}%
-\LetLtxMacro{\em}{\LWR@origem}%
-\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
-\let\sp\LWR@origsp%
-\let\sb\LWR@origsb%
-\let\textsuperscript\LWR@origtextsuperscript%
-\let\textsubscript\LWR@origtextsubscript%
-\LetLtxMacro\underline\LWR@origunderline%
-\let~\LWR@origtilde%
-\let\enskip\LWR@origenskip%
-\let\quad\LWR@origquad%
-\let\qquad\LWR@origqquad%
-\LetLtxMacro{\tabular}{\LWR@origtabular}%
-\LetLtxMacro{\endtabular}{\LWR@origendtabular}%
-\LetLtxMacro\toprule\LWR@origtoprule%
-\LetLtxMacro\midrule\LWR@origmidrule%
-\LetLtxMacro\cmidrule\LWR@origcmidrule%
-\LetLtxMacro\bottomrule\LWR@origbottomrule%
-\LetLtxMacro\addlinespace\LWR@origaddlinespace%
-\LetLtxMacro\morecmidrules\LWR@origmorecmidrules%
-\LetLtxMacro\specialrule\LWR@origspecialrule%
-\let\newline\LWR@orignewline%
-\LetLtxMacro{\raisebox}{\LWR@origraisebox}%
-\LetLtxMacro\includegraphics\LWR@origincludegraphics%
-\LetLtxMacro{\scalebox}{\LWR@origscalebox}%
-\LetLtxMacro{\rotatebox}{\LWR@origrotatebox}%
-\let\reflectbox\LWR@origreflectbox%
-\LetLtxMacro\resizebox\LWR@origresizebox%
-\let\framebox\LWR@origframebox%
-\let\makebox\LWR@origmakebox%
-\let\fbox\LWRprint@fbox%
-\let\fboxBlock\LWRprint@fbox%
-\LetLtxMacro{\fminipage}{\LWRprint@fminipage}%
-\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}%
-\LetLtxMacro{\minipage}{\LWR@origminipage}%
-\let\endminipage\LWR@endminipage%
-\LetLtxMacro{\parbox}{\LWR@origparbox}%
-\let\TeX\LWR@origTeX%
-\let\LaTeX\LWR@origLaTeX%
-\let\LaTeXe\LWR@origLaTeXe%
-\renewcommand*{\Xe}{X\textsubscript{E}}%
-\LWR@restoreorigaccents%
-\LWR@FBcancel%
-}
-
\NewDocumentCommand{\LWR@hidelatexequation}{m +m}{%
\LWR@stoppars
\LWR@htmlopencomment
@@ -6818,29 +7081,36 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\NewEnviron{equation}{%
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\LWR@hidelatexequation{equation}{\BODY}
}
{% not mathjax
- \begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
+ \begin{lateximage}[(\LWR@equationtag) \textbackslash{begin\{equation\}} %
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} %
\textbackslash{end\{equation\}}]% alt tag
\LWR@origequation
\BODY% contents collected by NewEnviron
\LWR@origendequation
\end{lateximage}%
-}
+}% not mathjax
-}[\ifbool{mathjax}{\LWR@addmathjax{equation}{\BODY}}{}]
+}[%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {%
+ \LWR@addmathjax{equation}{\BODY}%
+ }{}%
+
+]
\newbool{LWR@amsmultline}
\boolfalse{LWR@amsmultline}
\newcommand*{\LWR@htmlmathlabel}[1]{%
\LWR@traceinfo{LWR@htmlmathlabel #1}%
-\ifbool{mathjax}{%
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
\text{
\ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}
\LWR@htmlclosecomment%
@@ -6876,8 +7146,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newbool{LWR@numbereqnarray}
\booltrue{LWR@numbereqnarray}
\newcommand{\LWR@eqnarrayfactor}{%
-\ifbool{mathjax}
-{
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{%
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\ifbool{LWR@numbereqnarray}
@@ -6896,7 +7166,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
{% not mathjax
\ifbool{LWR@numbereqnarray}
{
- \begin{lateximage}[\LWR@addmathjax{eqnarray}{\BODY}]
+ \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
+ \LWR@addmathjax{eqnarray}{\BODY}]
\LWR@origeqnarray
\BODY
\LWR@origendeqnarray
@@ -6922,20 +7193,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\csgpreto{eqnarray*}{\boolfalse{LWR@numbereqnarray}}
\BeforeBeginEnvironment{multline}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\booltrue{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{multline}]
}
}
\AfterEndEnvironment{multline}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
@@ -6947,20 +7218,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{multline*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\booltrue{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{multline*}]
}
}
\AfterEndEnvironment{multline*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\boolfalse{LWR@amsmultline}
@@ -6973,20 +7244,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{gather}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{gather}]
}
}
\AfterEndEnvironment{gather}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{gather}{\the\@envbody}
@@ -6997,20 +7268,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{gather*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{gather*}]
}
}
\AfterEndEnvironment{gather*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{gather*}{\the\@envbody}
@@ -7021,20 +7292,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{align}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{align}]
}
}
\AfterEndEnvironment{align}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{align}{\the\@envbody}
@@ -7045,20 +7316,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{align*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{align*}]
}
}
\AfterEndEnvironment{align*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{align*}{\the\@envbody}
@@ -7069,20 +7340,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{flalign}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbodynumbered{flalign}]
}
}
\AfterEndEnvironment{flalign}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{flalign}{\the\@envbody}
@@ -7093,20 +7364,20 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\BeforeBeginEnvironment{flalign*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@syncmathjax
\boolfalse{LWR@amsmultline}
\LWR@beginhideamsmath
}
{
- \lateximage[LWRAMSMATHBODY]
+ \lateximage[\LWR@amsmathbody{flalign*}]
}
}
\AfterEndEnvironment{flalign*}{
-\ifbool{mathjax}
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
{
\LWR@endhideamsmath
\LWR@addmathjax{flalign*}{\the\@envbody}
@@ -7117,7 +7388,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\end{warpHTML}
-
\begin{warpHTML}
\newcounter{LWR@lateximagenumber}
\setcounter{LWR@lateximagenumber}{0}
@@ -7129,12 +7399,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\newcounter{LWR@LIpage}
\end{warpHTML}
+
\begin{warpall}
\newcommand*{\LateximageFontSizeName}{large}
\end{warpall}
+
\begin{warpHTML}
\newcommand{\LWR@HTMLsanitize}[1]{%
@@ -7178,6 +7450,75 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\endgroup%
}
+
+\newcounter{LWR@startingequation}
+
+\@ifundefined{chapter}
+{
+\renewcommand{\theLWR@startingequation}{%
+\arabic{LWR@startingequation}%
+}
+}
+{% chapter defined
+\renewcommand{\theLWR@startingequation}{%
+\ifnumcomp{\value{chapter}}{>}{0}{\arabic{chapter}.}{}%
+\arabic{LWR@startingequation}%
+}
+}
+
+\newbool{LWR@isstartingequation}
+
+\let\LWR@startingequationtag\theLWR@startingequation
+
+\let\LWR@equationtag\theequation
+
+\AtBeginDocument{
+
+\ifbool{mathjax}{}{% not mathjax
+
+\NewDocumentCommand{\LWR@remembertag}{m}{%
+\ifbool{LWR@isstartingequation}%
+{%
+ \global\boolfalse{LWR@isstartingequation}%
+ \xdef\LWR@startingequationtag{#1}%
+}%
+{}%
+\xdef\LWR@equationtag{#1}%
+}%
+
+\LetLtxMacro\LWR@origmake@df@tag@@\make@df@tag@@
+\LetLtxMacro\LWR@origmake@df@tag@@@\make@df@tag@@@
+
+\renewcommand*{\make@df@tag@@}[1]{%
+\LWR@remembertag{#1}%
+\LWR@origmake@df@tag@@{#1}%
+}
+
+\renewcommand*{\make@df@tag@@@}[1]{%
+\LWR@remembertag{#1}%
+\LWR@origmake@df@tag@@@{#1}%
+}
+
+}% not mathjax
+}% AtBeginDocument
+
+
+\newcommand*{\LWR@amsmathbody}[1]
+{%
+\textbackslash\{begin\}\{#1\} %
+\LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+\textbackslash\{end\}\{#1\}%
+}
+
+\newcommand*{\LWR@amsmathbodynumbered}[1]
+{%
+\ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
+{(\LWR@equationtag)}%
+{(\LWR@startingequationtag--\LWR@equationtag)} %
+\LWR@amsmathbody{#1} %
+}
+
+
\catcode`\$=\active%
\NewDocumentEnvironment{lateximage}{O{image}}
@@ -7188,6 +7529,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\addtocounter{LWR@lateximagedepth}{1}%
}%
{% start of outer-most lateximage
+ \setcounter{LWR@startingequation}{\value{equation}}%
+ \addtocounter{LWR@startingequation}{1}%
+ \booltrue{LWR@isstartingequation}%
+ \let\LWR@startingequationtag\theLWR@startingequation%
+ \let\LWR@equationtag\theequation%
\addtocounter{LWR@lateximagenumber}{1}%
\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}%
\boolfalse{mathjax}
@@ -7203,7 +7549,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
\addtocounter{LWR@lateximagedepth}{1}%
- \LWR@traceinfo{lateximage: about to create new page}%
+ \LWR@traceinfo{lateximage: about to create a new page}%
\LWR@orignewpage%
\LWR@traceinfo{lateximage: about to create minipage}%
\LWR@origminipage{6in}%
@@ -7222,7 +7568,6 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro\)\LWR@origcloseparen%
\LetLtxMacro\[\LWR@origopenbracket%
\LetLtxMacro\]\LWR@origclosebracket%
- \let\@ensuredmath\LWR@orig@ensuredmath%
}% end of outer-most lateximage
\LWR@traceinfo{lateximage: finished start of environment}%
}% end of \begin{lateximage}
@@ -7236,20 +7581,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LWR@origscriptsize%
\LWR@htmlclosecomment{}\LWR@orignewline%
\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
- \ifthenelse{\equal{#1}{LWRAMSMATHBODY}}%
- {%
- \LWR@subinlineimage[%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
- ]%
- {lateximage}%
- {lateximages\OSPathSymbol{}lateximage-\theLWR@externalfilecnt}%
- {svg}%
- {}%
- }%
- {%
\LWR@subinlineimage[#1]{lateximage}%
{lateximages\OSPathSymbol{}lateximage-\theLWR@externalfilecnt}{svg}{}%
- }%
\LWR@ensuredoingapar%
\LWR@htmltag{/span}%
\ifbool{HTMLDebugComments}{%
@@ -7272,21 +7605,27 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\renewenvironment*{center}
{
\LWR@forcenewpage
-\BlockClass{center}
+\ifbool{FormatWP}
+{\BlockClass[text-align:center]{center}}
+{\BlockClass{center}}
}
{\endBlockClass}
\renewenvironment*{flushright}
{
\LWR@forcenewpage
-\BlockClass{flushright}
+\ifbool{FormatWP}
+{\BlockClass[text-align:right]{flushright}}
+{\BlockClass{flushright}}
}
{\endBlockClass}
\renewenvironment*{flushleft}
{
\LWR@forcenewpage
-\BlockClass{flushleft}
+\ifbool{FormatWP}
+{\BlockClass[text-align:left]{flushleft}}
+{\BlockClass{flushleft}}
}
{\endBlockClass}
@@ -7309,6 +7648,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
+
\begin{warpHTML}
\PassOptionsToPackage{
@@ -7319,10 +7659,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\end{warpHTML}
-
-
\begin{warpprint}
\define@key{Gin}{class}{}
+\AtBeginDocument{
+\@ifpackageloaded{overpic}{
+\newcommand*{\overpicfontsize}{12}
+\newcommand*{\overpicfontskip}{14}
+}{}
+}
\end{warpprint}
\begin{warpall}
@@ -7530,7 +7874,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\boolfalse{LWR@minipagethispar}
\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}
{%
-\uselengthunit{in}%
+\uselengthunit{PT}%
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
\addtolength{\LWR@minipagewidth}{3em}% room for frames
@@ -7539,10 +7883,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\setlength{\textheight}{9in}%
}{}%
\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
-\addtocounter{LWR@minipagedepth}{1}%
\setlength{\LWR@minipageheight}{\textheight}% default unless specified
\IfValueT{#2}{\setlength{\LWR@minipageheight}{#2}}%
+\addtocounter{LWR@minipagedepth}{1}%
+\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars%
+\ifbool{FormatWP}{%
+
+\addtocounter{LWR@thisfloat}{1}%
+\booltrue{LWR@freezethisfloat}%
+\LWR@htmltag{div id="autofloat-\arabic{LWR@thisfloat}" class="wpminipage"}%
+
+}{}%
\LWR@traceinfo{minipage: creating div class}%
\LWR@orignewpage%
\LWR@htmltag{div class="minipage" style="%
@@ -7572,16 +7924,34 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\setlength{\textheight}{9in}%
\LWR@origraggedright%
\LWR@startpars%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
+
+=== begin minipage ===
+
+}{}%
\LWR@traceinfo{minipage: finished starting the minipage}%
}
{%
+\ifboolexpr{bool{FormatWP} and bool{WPMarkMinipages}}{%
+
+=== end minipage ===
+
+}{}%
\LWR@stoppars%
\LWR@endminipage% The following empty line is required:
+\ifbool{FormatWP}{%
+
+\LWR@htmlelementend{div}%
+\boolfalse{LWR@freezethisfloat}%
+
+}{}%
\LWR@htmldivclassend{minipage}%
+
\LWR@origvspace{1\baselineskip}% required for subcaption
\addtocounter{LWR@minipagedepth}{-1}%
\LWR@startpars%
+\ifbool{FormatWP}{\newline}{}%
\global\booltrue{LWR@minipagethispar}%
}
\RenewDocumentCommand{\parbox}{O{t} o O{t} m +m}
@@ -7717,23 +8087,38 @@ width:\rndprintlength{\LWR@tempwidth}%
\begin{warpHTML}
+\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{%
+\ifbool{FormatWP}%
+{\LWR@htmlspanclass[#1]{#2}{#3}}%
+{\LWR@htmlspanclass{#2}{#3}}%
+}
+
\DeclareRobustCommand{\LWR@HTMLemph}[1]{\LWR@htmlspan{em}{#1}}
\DeclareRobustCommand{\LWR@nullemph}[1]{#1}
\LetLtxMacro{\emph}{\LWR@HTMLemph}
-\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{\LWR@htmlspanclass{textmd}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextmd}[1]{%
+\LWR@HTMLtextstyle{font-weight:normal}{textmd}{#1}%
+}
\DeclareRobustCommand{\LWR@nulltextmd}[1]{#1}
+
\LetLtxMacro{\textmd}{\LWR@HTMLtextmd}
\DeclareRobustCommand{\LWR@HTMLtextbf}[1]{\LWR@htmlspan{b}{#1}}
\DeclareRobustCommand{\LWR@nulltextbf}[1]{#1}
\LetLtxMacro{\textbf}{\LWR@HTMLtextbf}
-\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{\LWR@htmlspanclass{textrm}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextrm}[1]{%
+\LWR@HTMLtextstyle{font-family:serif}{textrm}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextrm}[1]{#1}
+
\LetLtxMacro{\textrm}{\LWR@HTMLtextrm}
-\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{\LWR@htmlspanclass{textsf}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsf}[1]{%
+\LWR@HTMLtextstyle{font-family:sans}{textsf}{#1}%
+}
\DeclareRobustCommand{\LWR@nulltextsf}[1]{#1}
\LetLtxMacro{\textsf}{\LWR@HTMLtextsf}
@@ -7741,20 +8126,32 @@ width:\rndprintlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@nulltexttt}[1]{#1}
\LetLtxMacro{\texttt}{\LWR@HTMLtexttt}
-\DeclareRobustCommand{\LWR@HTMLtextup}[1]{\LWR@htmlspanclass{textup}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextup}[1]{%
+\LWR@HTMLtextstyle{font-variant:normal}{textup}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextup}[1]{#1}
+
\LetLtxMacro{\textup}{\LWR@HTMLtextup}
\DeclareRobustCommand{\LWR@HTMLtextit}[1]{\LWR@htmlspan{i}{#1}}
\DeclareRobustCommand{\LWR@nulltextit}[1]{#1}
\LetLtxMacro{\textit}{\LWR@HTMLtextit}
-\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{\LWR@htmlspanclass{textsc}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsc}[1]{%
+\LWR@HTMLtextstyle{font-variant:small-caps}{textsc}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextsc}[1]{#1}
+
\LetLtxMacro{\textsc}{\LWR@HTMLtextsc}
-\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{\LWR@htmlspanclass{testsl}{#1}}
+\DeclareRobustCommand{\LWR@HTMLtextsl}[1]{%
+\LWR@HTMLtextstyle{font-style:oblique}{textsl}{#1}%
+}
+
\DeclareRobustCommand{\LWR@nulltextsl}[1]{#1}
+
\LetLtxMacro{\textsl}{\LWR@HTMLtextsl}
\DeclareRobustCommand{\LWR@HTMLtextnormal}[1]{\textmd{\textrm{\textup{#1}}}}
@@ -7804,6 +8201,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\LetLtxMacro\underline\LWR@origunderline%
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{+o +m +m}{##3}%
+\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
}
\renewcommand*{\mdseries}{}
@@ -7832,13 +8230,25 @@ width:\rndprintlength{\LWR@tempwidth}%
\renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
+\renewcommand{\@textsuperscript}[1]{\LWR@htmlspan{sup}{#1}}
+
+\AtBeginDocument{
\renewcommand{\textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+}
+
+\AtBeginDocument{
+\renewcommand{\@textsubscript}[1]{\LWR@htmlspan{sub}{#1}}
+}
\AtBeginDocument{\let\up\textsuperscript}
\AtBeginDocument{\let\fup\textsuperscript}
-\renewcommand{\underline}[1]{\InlineClass{underline}{#1}}
+\renewcommand{\underline}[1]{%
+\LWR@HTMLtextstyle%
+ {text-decoration:underline;text-decoration-skip}%
+ {underline}{#1}%
+}
\renewcommand*{\hfill}{\qquad}
@@ -7940,14 +8350,22 @@ width:\rndprintlength{\LWR@tempwidth}%
\LWR@minipagestoppars%
\ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}}
{%
- \HTMLunicode{2009}% thin breakable space
+ \HTMLunicode{2009}% thin breakable space
}%
{%
- \uselengthunit{PT}%
- \LWR@htmltagc{%
- span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"%
- }%
- \LWR@htmltagc{/span}%
+ \uselengthunit{PT}%
+ \LWR@htmltagc{%
+ span style="width:\printlength{\LWR@tempwidth}; %
+ display:inline-block"%
+ }%
+ \ifbool{FormatWP}{%
+ \setlength{\LWR@templengthone}{\LWR@tempwidth}%
+ \whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+ \quad%
+ \addtolength{\LWR@templengthone}{-1em}%
+ }%
+ }{}%
+ \LWR@htmltagc{/span}%
}%
\LWR@minipagestartpars%
}% width not 0
@@ -7992,7 +8410,7 @@ width:\rndprintlength{\LWR@tempwidth}%
\LWR@htmltagc{%
span
style="%
- background:\LWR@currenttextcolor; %
+ \ifbool{FormatWP}{}{background:\LWR@currenttextcolor; }%
width:\printlength{\LWR@tempwidth}; %
height:\printlength{\LWR@tempheight}; %
\IfValueT{#1}%
@@ -8009,6 +8427,13 @@ width:\rndprintlength{\LWR@tempwidth}%
}%
display:inline-block;"%
}%
+ \ifbool{FormatWP}{%
+ \setlength{\LWR@templengthone}{\LWR@tempwidth}%
+ \whiledo{\lengthtest{\LWR@templengthone>1em}}{%
+ \_{}%
+ \addtolength{\LWR@templengthone}{-1em}%
+ }%
+ }{}%
\LWR@htmltagc{/span}%
\LWR@minipagestartpars%
}% non-zero width
@@ -8032,14 +8457,27 @@ width:\rndprintlength{\LWR@tempwidth}%
\let\LWR@origTeX\TeX
\newcommand*{\LWR@TeX}
-{\InlineClass{latexlogofont}%
-{\InlineClass{latexlogo}{T\textsubscript{e}X}}}
+{%
+ \InlineClass{latexlogofont}%
+ {%
+ \LWR@HTMLtextstyle%
+ {text-transform:uppercase}%
+ {latexlogo}%
+ {T\textsubscript{e}X}%
+ }%
+}
\let\LWR@origLaTeX\LaTeX
\newcommand*{\LWR@LaTeX}
-{\InlineClass{latexlogofont}%
-{\InlineClass{latexlogo}%
-{L\textsuperscript{a}T\textsubscript{e}X}}}
+{%
+ \InlineClass{latexlogofont}%
+ {%
+ \LWR@HTMLtextstyle%
+ {text-transform:uppercase}%
+ {latexlogo}%
+ {L\textsuperscript{a}T\textsubscript{e}X}%
+ }%
+}
\let\LWR@origLaTeXe\LaTeXe