summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/lwarp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-17 21:15:43 +0000
committerKarl Berry <karl@freefriends.org>2017-08-17 21:15:43 +0000
commit0f4a34d1fe6262bc72205b50adb2ae5ab576d427 (patch)
tree96d07059e14ae2c49b831c16e2cf0de025d41d5c /Master/texmf-dist/source/latex/lwarp
parent0b34e84c6dde5d7877c9b07fc95374374aaba3c6 (diff)
lwarp (17aug17)
git-svn-id: svn://tug.org/texlive/trunk@45054 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/lwarp')
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.dtx3991
-rw-r--r--Master/texmf-dist/source/latex/lwarp/lwarp.ins2
2 files changed, 2549 insertions, 1444 deletions
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
index 1256bf03bc4..577293502a1 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/08/08 v0.35 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2017/08/17 v0.36 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -55,6 +55,8 @@
\newunicodechar{ô}{\^{o}}
\newunicodechar{Ô}{\^{O}}
\newunicodechar{ê}{\^{e}}
+\newunicodechar{Ω}{\textohm}
+\newunicodechar{μ}{\textmu}
\usepackage[log-declarations=false]{xparse}
@@ -104,10 +106,10 @@
\usepackage{titleps}
\newpagestyle{pageheadfoot}{
- \headrule
- \sethead{\pkg{lwarp}}{}{\thepage}
+ \headrule
+ \sethead{\pkg{lwarp}}{}{\thepage}
% \renewcommand{\makefootrule}{\rule[2.5ex]{\linewidth}{.4pt}}
- \setfoot{}{}{}
+ \setfoot{}{}{}
}
\pagestyle{pageheadfoot}
@@ -494,43 +496,43 @@ Limitations when using MathJax include:
\DescribeProgram{MathJax}
\begin{itemize}
\item In document classes which have chapters,
- \margintag{chapter numbers}%
- \index{MathJax>tagged equations}%
- \index{tagged equations>Mathjax}%
- \cs{tag}ged equations have the chapter number prepended in \HTML\ output, unlike \LaTeX.
- \cs{tag*} equations (correctly) do not.
- This may be improved with future versions of the MathJax support script.
+ \margintag{chapter numbers}%
+ \index{MathJax>tagged equations}%
+ \index{tagged equations>Mathjax}%
+ \cs{tag}ged equations have the chapter number prepended in \HTML\ output, unlike \LaTeX.
+ \cs{tag*} equations (correctly) do not.
+ This may be improved with future versions of the MathJax support script.
- \href{https://groups.google.com/forum/\#!topic/mathjax-users/jUtewUcE2bY}
- {\texttt{https://groups.google.com/forum/\#!topic/\\
- \hspace*{2em}mathjax-users/jUtewUcE2bY}}
+ \href{https://groups.google.com/forum/\#!topic/mathjax-users/jUtewUcE2bY}
+ {\texttt{https://groups.google.com/forum/\#!topic/\\
+ \hspace*{2em}mathjax-users/jUtewUcE2bY}}
\item MathJax itself does not support subequations.
- \margintag{subequations}
+ \margintag{subequations}
\index{MathJax>subequations}%
\index{subequations>MathJax}%
- This may be improved by parsing the \LaTeX{}
- math expression to manually insert tags, but this has not yet been done.
+ This may be improved by parsing the \LaTeX{}
+ math expression to manually insert tags, but this has not yet been done.
\item Footnotes inside equations are not yet supported while using MathJax.
- \margintag{footnotes in math}
+ \margintag{footnotes in math}
\item Math appearing inside a lateximage,
- \margintag{lateximage}
- and therefore also inside a \tikz{} or \env{picture}
- environment, is rendered as SVG math even if MathJax is used in the rest of the document.
+ \margintag{lateximage}
+ and therefore also inside a \tikz{} or \env{picture}
+ environment, is rendered as SVG math even if MathJax is used in the rest of the document.
\item Usage of \pkg{siunitx} inside a math equation
- \margintag{siunitx}
- is supported via a third-party MathJax extension.
- While inside a math expression, do not use \cs{SI} or \cs{si} inside \cs{text},
- where it will be rendered as normal text.
- \watchout[siunitx inside an equation]
+ \margintag{siunitx}
+ is supported via a third-party MathJax extension.
+ While inside a math expression, do not use \cs{SI} or \cs{si} inside \cs{text},
+ 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/mathjax/MathJax-third-party-extensions/tree/master/siunitx}
+ {\texttt{https://github.com/mathjax/MathJax-third-party-extensions/\\
+ \hspace*{2em}tree/master/siunitx}}
\item MathJax does not automatically support custom \LaTeX{} macros,
- \margintag{\LaTeX{} macros}
- but they may be set up by the user.
+ \margintag{\LaTeX{} macros}
+ but they may be set up by the user.
\end{itemize}
}
@@ -637,8 +639,24 @@ see \cref{sec:tutorialmathjax} to use MathJax instead.
}
\newcommand{\limitsxcolor}{%
+\cs{colorboxBlock} and \cs{fcolorboxBlock} are provided for
+\margintag{\cs{colorboxBlock} and \cs{fcolorboxBlock}}
+increased \HTML\ compatibility, and they are identical to
+\cs{colorbox} and \cs{fcolorbox} in print mode. In \HTML\ mode
+they place their contents into a \element{div} instead of a \element{span}.
+These \element{div}s are set to \attribute{display:~inline-block} so
+adjacent \cs{colorboxBlock}s appear side-by-side in \HTML, although
+text is placed before or after each.
+
+Print-mode definitions for \cs{colorboxBlock} and \cs{fcolorboxBlock}
+are created by \pkg{lwarp}'s core if \pkg{xcolor} is loaded.
+
+\cs{fcolorbox} and \cs{fcolorboxBlock} allow a background color of \texttt{none},
+\margintag{background: \texttt{none}}
+in which case only the frame is drawn, which can be useful for \HTML.
+
Color definitions, models, and mixing are fully supported
-\margintag{support}
+\margintag{color support}
without any changes required.
Colored tables are ignored so far. Use \CSS\ to style tables.
@@ -655,93 +673,93 @@ Use \CSS\ or \cs{textcolor} where possible.
\newcommand{\limitstabular}{%
\begin{itemize}
\item When defining environments or macros which include \env{tabular}
- plus\watchout[misplaced alignment alignment tab character \&]
- \index{alignment tab character \&, misplaced}
- \index{misplaced alignment tab character \&}
- instances of the \texttt{\&} character, it may be
- necessary to make \texttt{\&} active before the environment or macro is defined,
- then restore \texttt{\&} to its default catcode after, using the following commands:
- \begin{sourcedisplay}
- \cs{StartDefiningTabulars} \\
- <define macros or environments using \env{tabular} and \texttt{\&} here> \\
- \cs{EndDefiningTabulars}
- \end{sourcedisplay}
+ plus\watchout[misplaced alignment alignment tab character \&]
+ \index{alignment tab character \&, misplaced}
+ \index{misplaced alignment tab character \&}
+ instances of the \texttt{\&} character, it may be
+ necessary to make \texttt{\&} active before the environment or macro is defined,
+ then restore \texttt{\&} to its default catcode after, using the following commands:
+ \begin{sourcedisplay}
+ \cs{StartDefiningTabulars} \\
+ <define macros or environments using \env{tabular} and \texttt{\&} here> \\
+ \cs{EndDefiningTabulars}
+ \end{sourcedisplay}
\item Vertical rules are not yet supported.
- \margintag{column types}
+ \margintag{column types}
\item \texttt{*} in a column specification is not used (so far).
- Repeat the column type the correct number of times.
+ Repeat the column type the correct number of times.
\item Only one each of \texttt{@}, \texttt{!}, \texttt{>}, and \texttt{<}
- may be used at each column, and they are used in that order.
+ may be used at each column, and they are used in that order.
\item \cs{newcolumntype} is ignored; unknown column types are set to \texttt{l}.
\item \pkg{tabularx} ignores the width, but \texttt{X} columns do produce paragraph
- columns or multicolumns.
+ columns or multicolumns.
\item Multirow and multicolumn cannot be used at the same time.
- \watchout[\cs{multirow} \& \cs{multicolumn}]
- (No rectangular holes wider than one column or taller than one row.)
+ \watchout[\cs{multirow} \& \cs{multicolumn}]
+ (No rectangular holes wider than one column or taller than one row.)
\item For multirow, insert \cs{mrowcell} into any empty multi-row cells.
- This will be a null function for the print output, and is a placeholder for
- \watchout[\cs{multirow}]
- parsing the table for \HTML\ output.
+ This will be a null function for the print output, and is a placeholder for
+ \watchout[\cs{multirow}]
+ parsing the table for \HTML\ output.
\item If a multirow reaches to the bottom of a table,
- and \cs{bottomrule} does not go over to that edge,
- \margintag{\cs{multirow} with rules}
- try adding a line of empty cells below the \cs{bottomrule}.
- This may be a browser bug.
- \changes{v0.19}{2016/05/28}{Docs: \env{multirow} browser bug workaround.}
+ and \cs{bottomrule} does not go over to that edge,
+ \margintag{\cs{multirow} with rules}
+ try adding a line of empty cells below the \cs{bottomrule}.
+ This may be a browser bug.
+ \changes{v0.19}{2016/05/28}{Docs: \env{multirow} browser bug workaround.}
\item If a \cs{midrule} is desired after the last row,
- \margintag{rule at last row}
- an additional row of blank cells must be used.
+ \margintag{rule at last row}
+ an additional row of blank cells must be used.
\item Multiple paragraphs in one cell of a p, b, m column
- must have \cs{newline} between paragraphs.
- \watchout[paragraphs]
+ must have \cs{newline} between paragraphs.
+ \watchout[paragraphs]
\item \cs{cmidrule} does not support width or trim options
- due to \CSS\ limitations.
- \margintag{\cs{cmidrule} width, trim}
+ due to \CSS\ limitations.
+ \margintag{\cs{cmidrule} width, trim}
\item \cs{cmidrule} borders are generated by the individual cells
- \margintag{\cs{cmidrule} and \cs{multicolumn}}
- on the following row,
- and so do not necessarily work correctly when the following row
- has \cs{multicolumn} cells below \cs{cmidrule} borders.
+ \margintag{\cs{cmidrule} and \cs{multicolumn}}
+ on the following row,
+ and so do not necessarily work correctly when the following row
+ has \cs{multicolumn} cells below \cs{cmidrule} borders.
\item For \pkg{longtable}, place headings and footings which
- \margintag{\env{longtable} headings}
- do not apply to \HTML\ inside \cs{warpprintonly\{\}}.
+ \margintag{\env{longtable} headings}
+ do not apply to \HTML\ inside \cs{warpprintonly\{\}}.
\item For \cs{toprule} and \cs{bottomrule},
- when combined with a \env{warpprint} or \env{warpHTML} environment,
- \watchout[\cs{warpprintonly}]
- if a ``misplaced \cs{noalign}'' error occurs,
- change \\
- \hspace*{.375in}\cmds{This \& That \cs{endhead}} \\
- to \\
- \hspace*{.375in}\cmds{\cs{warpprintonly}\{This \& That \cs{endhead}\}} \\
- and likewise with the other \cs{end} headings.
- Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \HTML\ output.
+ when combined with a \env{warpprint} or \env{warpHTML} environment,
+ \watchout[\cs{warpprintonly}]
+ if a ``misplaced \cs{noalign}'' error occurs,
+ change \\
+ \hspace*{.375in}\cmds{This \& That \cs{endhead}} \\
+ to \\
+ \hspace*{.375in}\cmds{\cs{warpprintonly}\{This \& That \cs{endhead}\}} \\
+ and likewise with the other \cs{end} headings.
+ Keep the \cs{endfirsthead} row unchanged, as it is still relevent to \HTML\ output.
\item For S columns (from the \pkg{siunitx} package),
- \watchout[S columns]
- while producing print output,
- anything non-numeric must be placed
- inside \{ \} braces, including commands such as \cs{multirow}.
- While producing \HTML\ output, though, anything placed inside
- braces is not seen by \pkg{lwarp}'s tabular handling algorithm.
- To resolve this problem, make a copy of the row, with one version
- for print output, containing the extra braces, and another version
- for \HTML\ output, without the extra braces, such as: \\
- \hspace*{.375in} \cs{warpprintonly}\{\texttt{1 \& 2 \& \textcolor{red}{\{}\cs{multirow}\{2\}\{2cm\}\{Text\}\textcolor{red}{\}} \& 3 \textbackslash\textbackslash\}} \\
- \hspace*{.375in} \cs{warpHTMLonly}\{\texttt{1 \& 2 \& \cs{multirow}\{2\}\{2cm\}\{Text\} \& 3 \textbackslash\textbackslash\}}
+ \watchout[S columns]
+ while producing print output,
+ anything non-numeric must be placed
+ inside \{ \} braces, including commands such as \cs{multirow}.
+ While producing \HTML\ output, though, anything placed inside
+ braces is not seen by \pkg{lwarp}'s tabular handling algorithm.
+ To resolve this problem, make a copy of the row, with one version
+ for print output, containing the extra braces, and another version
+ for \HTML\ output, without the extra braces, such as: \\
+ \hspace*{.375in} \cs{warpprintonly}\{\texttt{1 \& 2 \& \textcolor{red}{\{}\cs{multirow}\{2\}\{2cm\}\{Text\}\textcolor{red}{\}} \& 3 \textbackslash\textbackslash\}} \\
+ \hspace*{.375in} \cs{warpHTMLonly}\{\texttt{1 \& 2 \& \cs{multirow}\{2\}\{2cm\}\{Text\} \& 3 \textbackslash\textbackslash\}}
\end{itemize}
}
@@ -751,22 +769,22 @@ Longtable \cs{endhead}, \cs{endfoot}, and \cs{endlastfoot} rows are
not used for \HTML, and these rows should be disabled.
\watchout
Use
- \begin{sourcedisplay}
- \cs{warpprintonly}\{row contents\}
- \end{sourcedisplay}
+ \begin{sourcedisplay}
+ \cs{warpprintonly}\{row contents\}
+ \end{sourcedisplay}
instead of
- \begin{sourcedisplay}
- \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\}
- \end{sourcedisplay}
+ \begin{sourcedisplay}
+ \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\}
+ \end{sourcedisplay}
Doing so helps avoid ``Misplaced \cs{noalign}.'' when using \cs{begin}\{warpprint\}.
Keep the \cs{endfirsthead} row, which is still relevent to \HTML\ output.
\cs{kill} is ignored, place a \cs{kill} line inside
\watchout
- \begin{sourcedisplay}
- \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\}
- \end{sourcedisplay}
+ \begin{sourcedisplay}
+ \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\}
+ \end{sourcedisplay}
or place it inside \cs{warpingprintonly}.
}
@@ -978,19 +996,21 @@ Possible solutions include:
\begin{itemize}
\item Use fixed lengths. \pkg{lwarp} will scale the \HTML\ lengths appropriately.
\item Use \env{warpprint} and \env{warpHTML} environments to select appropriate
- values for each case.
+ values for each case.
\item Inside a \env{warpHTML} environment, manually change
- \cs{FBwidth} or \cs{FBheight} before the \cs{ffigbox} or \cs{ttabbox}.
- Use \cs{FBwidth} or \cs{FBheight} normally afterwards; it will be used as
- expected in print output, and will use your custom-selected value in \HTML\
- output. This custom value will be used repeatedly,
- until it is manually changed to a new value.
+ \cs{FBwidth} or \cs{FBheight} before the \cs{ffigbox} or \cs{ttabbox}.
+ Use \cs{FBwidth} or \cs{FBheight} normally afterwards; it will be used as
+ expected in print output, and will use your custom-selected value in \HTML\
+ output. This custom value will be used repeatedly,
+ until it is manually changed to a new value.
\end{itemize}
}
\newcommand{\limitssiunitx}{%
Do not use \cmds{per-mode=fraction}, which cannot be seen by the final \cmds{pdftotext} conversion.
\watchout[per-mode]
+
+Place the \cs{SI} expression inside math mode for anything which requires math mode units.
}
\newcommand{\limitsnicefrac}{%
@@ -1124,7 +1144,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{12319}
+% \CheckSum{12815}
%
% \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
@@ -1200,6 +1220,8 @@ This boolean may be tested by the user for later use.
% \changes{v0.34}{2017/07/25}{File: \texttt{README.txt}: updated.}
% \changes{v0.34}{2017/07/25}{Docs: Horizontal space limitations.}
% \changes{v0.35}{2017/08/08}{\ 2017/08/08}
+% \changes{v0.36}{2017/08/17}{\ 2017/08/17}
+% \changes{v0.36}{2017/08/15}{Source: Improved formatting.}
@@ -1279,7 +1301,7 @@ This boolean may be tested by the user for later use.
%
% \noindent
% \textcolor{red!30!black}{\bfseries
-% Note that this is still a ``beta'' version of \pkg{lwarp},
+% Note that this is still an ``alpha'' version of \pkg{lwarp},
% and some things may change in response to user feedback and
% further project development.
% }
@@ -1334,6 +1356,29 @@ 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.36:] \
+% \begin{itemize}
+% \item Recorganized the documentation section regarding special cases and limitations.
+% (\Cref{sec:limitations})
+% \item Improved source formatting.
+% \item \cs{fbox} and related now use \cs{fboxsep} and \cs{fboxrule}.
+% \margintag{boxes and frames}
+% \item \cs{makebox} and \cs{framebox} now use width and position.
+% \item \cs{fcolorbox} and related now work inside a \env{lateximage}.
+% \item \pkg{babel-french}: Improvements for French variants, load order,
+% \margintag{babel-french}
+% footnotes, ellipses.
+% \item Improved footnote numbering.
+% \margintag{footnotes}
+% \env{lateximage} footnotes now appear as regular footnotes to match
+% the numbering of the print version.
+% Also fixed a regression with MathJax.
+% \item Improved \pkg{siunitx} units.
+% \margintag{siunitx}
+% \item Fix for filenames while using MathJax.
+% \item Fix for \cs{rule} when \pkg{xcolor} is not loaded.
+% \item Added \pkg{transparent}, \pkg{upref}.
+% \end{itemize}
% \item[v0.35:] Fix: \cs{textbf} and related.
% \item[v0.34:] \
% \begin{itemize}
@@ -1394,6 +1439,7 @@ This boolean may be tested by the user for later use.
% \item Adds fixed-width \HTML\ spaces around punctuation
% \margintag{babel-french}
% when using \pkg{babel-french}.
+% \LuaTeX\ does not yet use the extra punctuation spacing.
% \end{itemize}
% \needspace{2\baselineskip}
% \item[v0.33:] \
@@ -1867,7 +1913,7 @@ This boolean may be tested by the user for later use.
% Converted to up to three columns with an optional heading,
% per browser support. Single-column if unsupported.\\
% \midrule
-% \pkg{siunitx}: & Supported except for \cmds{per-mode=fraction}. \\
+% \pkg{siunitx}: & Mostly supported except for \cmds{per-mode=fraction}. \\
% \pkg{xfrac}: & Supported \\
% \midrule
% Direct formatting: & \cs{emph}, \cs{textsuperscript},
@@ -3746,14 +3792,14 @@ This boolean may be tested by the user for later use.
%
%
%
-% \subsection{Special cases and limitations}
+% \section{Special cases and limitations}
% \label{sec:limitations}
%
-%
% \label{sec:successfulcommands}
% \index{HTML>commands for a successful conversion}
%
% \changes{v0.14}{2016/03/26}{Docs: Commands for a successful \HTML\ conversion.}
+% \changes{v0.36}{2017/08/11}{Docs: Reorganized: Special cases and limitations.}
%
% Also see \cref{sec:troubleshooting}: \nameref{sec:troubleshooting}.
%
@@ -3761,13 +3807,7 @@ This boolean may be tested by the user for later use.
% for a smooth conversion to both \HTML\ and print-formatted outputs:
%
%
-% \subsubsection{Page references} The printed page does not translate to the \HTML\
-% page, so references to page numbers are converted to parentheses containing
-% \cs{pagerefPageFor}, which defaults to ``see '',
-% followed by a hyperlink to the appropriate
-% object. Ex: ``Sec.~\textcolor{red}{1.23}
-% on page (see sec.~\textcolor{red}{1.23})''.
-% \cs{pagerefPageFor} may be redefined to ``page for '', empty, etc.
+% \subsection{Formatting}
%
%
% \subsubsection{Text formatting}
@@ -3794,6 +3834,7 @@ This boolean may be tested by the user for later use.
% Use a trailing backslash: |\item[label] \|
% \index{item>empty}\index{list item, empty}
%
+%
% \subsubsection{Filenames in lists}
%
% \index{underscore>filename}\index{file>underscore}
@@ -3807,58 +3848,7 @@ This boolean may be tested by the user for later use.
%
%
%
-% \subsubsection{Cross-references}
-%
-% \limitsreferences
-%
-% \subsubsection{\pkg{cleveref} and \pkg{varioref} packages}
-%
-% \changes{v0.22}{2017/03/01}{\pkg{varioref}: Supported.}
-%
-% \limitspageref
-%
-% \subsubsection{Hyperlinks, \pkg{hyperref}, and \pkg{url}}
-%
-% \limitshyperlinks
-%
-%
-% \subsubsection{Footnotes and page notes}
-%
-% \limitsfootnotes
-%
-%
-% \subsubsection{Math}
-% \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}
-%
-% \limitsntheorem
-%
-%
-% \subsubsection{Graphics}
-%
-% \limitsgraphics
-%
-%
-% \subsubsection{\pkg{xcolor} package}
-%
-% \limitsxcolor
-%
-%
-% \subsubsection{Tabular}
-% \label{sec:limitstabular}
-% \limitstabular
-%
-%
-% \subsubsection{\pkg{longtable} package}
-%
-% \limitslongtable
+% \subsection{Boxes and minipages}
%
%
% \subsubsection{Save Boxes}
@@ -3933,6 +3923,10 @@ This boolean may be tested by the user for later use.
% For \HTML\ output, this forms a \element{div} of class |framed|, the contents
% preserve their \HTML\ formatting, and valid \HTML\ is created for a \env{tabular}.
% Also see below regarding the ``Misplaced alignment tab character \&'' error.
+% \item [To create colored frames and boxes:] See \cref{sec:xcolor} for \pkg{xcolor}'s
+% \margintag{colored boxes and frames:}
+% \cs{colorbox} and \cs{fcolorbox},
+% and \pkg{lwarp}'s additional \cs{colorboxBlock} and \cs{fcolorboxBlock}.
% \item [To frame tables or verbatim environments:] Place the contents
% inside a \env{fminipage}, or perhaps a \cs{fboxBlock} for a \env{tabular}.
% Also, if using \cs{fboxblock} with \env{tabular},
@@ -3941,7 +3935,7 @@ This boolean may be tested by the user for later use.
% before the start of the macro which uses \cs{fboxBlock} and the \env{tabular},
% and \cs{EndDefiningTabulars} afterwards.
% Also see the \pkg{lwarp} documentation for the \pkg{fancybox} package.
-% \item [To frame equations:] See the \pkg{lwarp} documentation for the \pkg{fancybox} package.
+% \item [To frame equations:] See \cref{sec:fancybox} for the \pkg{fancybox} package.
% \item [For fancy framed minipages:] See packages \pkg{boxedminipage},
% \pkg{shadow}, \pkg{fancybox}, \pkg{framed}, \pkg{mdframed}.
% \item [Custom environments:] Use a custom environment to create a sidebar,
@@ -3959,7 +3953,6 @@ This boolean may be tested by the user for later use.
% \end{description}
%
%
-%
% \subsubsection{\pkg{fancybox} package}
%
% \limitsfancybox
@@ -3969,35 +3962,51 @@ This boolean may be tested by the user for later use.
%
% \limitsmdframed
%
-%
-% \subsubsection{\pkg{float}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together}
%
-% \limitscombiningfloats
%
%
-% \subsubsection{\pkg{caption} and \pkg{subcaption} packages}
+% \subsection{Cross-references}
%
-% \limitscaption
+% \limitsreferences
%
+% \subsubsection{Page references} The printed page does not translate to the \HTML\
+% page, so references to page numbers are converted to parentheses containing
+% \cs{pagerefPageFor}, which defaults to ``see '',
+% followed by a hyperlink to the appropriate
+% object. Ex: ``Sec.~\textcolor{red}{1.23}
+% on page (see sec.~\textcolor{red}{1.23})''.
+% \cs{pagerefPageFor} may be redefined to ``page for '', empty, etc.
%
-% \subsubsection{\pkg{subfig} package}
%
-% \limitssubfig
+% \subsubsection{\pkg{cleveref} and \pkg{varioref} packages}
%
+% \changes{v0.22}{2017/03/01}{\pkg{varioref}: Supported.}
%
-% \subsubsection{\pkg{floatrow} package}
+% \limitspageref
%
-% \limitsfloatrow
+% \subsubsection{Hyperlinks, \pkg{hyperref}, and \pkg{url}}
%
+% \limitshyperlinks
%
-% \subsubsection{\pkg{abstract} package}
%
-% \limitsabstract
+% \subsubsection{Footnotes and page notes}
%
+% \limitsfootnotes
%
-% \subsubsection{\pkg{verse} and \pkg{memoir}}
%
-% \limitsverse
+% \subsection{Math}
+% \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}
+%
+% \limitsntheorem
%
%
% \subsubsection{\pkg{siunitx} package}
@@ -4013,6 +4022,70 @@ This boolean may be tested by the user for later use.
% \limitsnicefrac
%
%
+% \subsubsection{\pkg{newtxmath} package}
+%
+% \DescribePackage{newtxmath}
+% \limitsnewtxmath
+%
+%
+% \subsection{Graphics}
+%
+% \limitsgraphics
+%
+%
+% \subsubsection{\pkg{xcolor} package}
+%
+% \limitsxcolor
+%
+%
+% \subsection{Tabular}
+% \label{sec:limitstabular}
+% \limitstabular
+%
+%
+% \subsubsection{\pkg{longtable} package}
+%
+% \limitslongtable
+%
+%
+%
+%
+% \subsubsection{\pkg{float}, \pkg{trivfloat}, and/or \pkg{algorithmicx} together}
+%
+% \limitscombiningfloats
+%
+%
+% \subsubsection{\pkg{caption} and \pkg{subcaption} packages}
+%
+% \limitscaption
+%
+%
+%
+% \subsection{Floats}
+%
+%
+% \subsubsection{\pkg{subfig} package}
+%
+% \limitssubfig
+%
+%
+% \subsubsection{\pkg{floatrow} package}
+%
+% \limitsfloatrow
+%
+%
+% \subsection{Miscellaneous}
+%
+% \subsubsection{\pkg{abstract} package}
+%
+% \limitsabstract
+%
+%
+% \subsubsection{\pkg{verse} and \pkg{memoir}}
+%
+% \limitsverse
+%
+%
% \subsubsection{\pkg{newclude} package}
%
% \changes{v0.14}{2016/03/29}{Docs: Newclude limitations.}
@@ -4021,11 +4094,6 @@ This boolean may be tested by the user for later use.
% \limitsnewclude
%
%
-% \subsubsection{\pkg{newtxmath} package}
-%
-% \DescribePackage{newtxmath}
-% \limitsnewtxmath
-%
%
% \subsubsection{\pkg{babel} package}
%
@@ -5270,8 +5338,10 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{titlesec}
\LWR@loadafter{titletoc}
\LWR@loadafter{tocloft}
+\LWR@loadafter{transparent}
\LWR@loadafter{trivfloat}
\LWR@loadafter{ulem}
+\LWR@loadafter{upref}
\LWR@loadafter{varioref}
\LWR@loadafter{verse}
\LWR@loadafter{wallpaper}
@@ -5427,11 +5497,11 @@ For a possible alternative, see package(s) #2.}
\RequirePackage {microtype}
\microtypesetup{
- protrusion=false,
- expansion=false,
- tracking=false,
- kerning=false,
- spacing=false}
+ protrusion=false,
+ expansion=false,
+ tracking=false,
+ kerning=false,
+ spacing=false}
\DisableLigatures[f,q,t,T,Q]{encoding = *,family = *}
% \end{macrocode}
@@ -5840,10 +5910,10 @@ top=1in,bottom=1in,%
% \begin{macrocode}
\IfFileExists{lwarp-\LWR@strresulttwo.sty}%
{% lwarp-* file found
- \StrSubstitute%
- {\LWR@requirepackagenames}%
- {\LWR@strresult}%
- {lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
+ \StrSubstitute%
+ {\LWR@requirepackagenames}%
+ {\LWR@strresult}%
+ {lwarp-\LWR@strresulttwo}[\LWR@requirepackagenames]%
}%
{}% no lwarp-* file
}% yes filename
@@ -5880,14 +5950,14 @@ top=1in,bottom=1in,%
% \begin{macrocode}
\IfValueTF{#1}
{% options given
- \IfValueTF{#3}% version given?
- {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}[#3]}
- {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}}
+ \IfValueTF{#3}% version given?
+ {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}[#3]}
+ {\LWR@origRequirePackage[#1]{\LWR@requirepackagenames}}
}
{% no options given
- \IfValueTF{#3}% version given?
- {\LWR@origRequirePackage{\LWR@requirepackagenames}[#3]}
- {\LWR@origRequirePackage{\LWR@requirepackagenames}}
+ \IfValueTF{#3}% version given?
+ {\LWR@origRequirePackage{\LWR@requirepackagenames}[#3]}
+ {\LWR@origRequirePackage{\LWR@requirepackagenames}}
}
}
\LetLtxMacro{\usepackage}{\RequirePackage}
@@ -5999,8 +6069,8 @@ top=1in,bottom=1in,%
\newcommand{\LWR@traceinfo}[1]{%
\ifbool{LWR@tracinglwarp}%
{%
-\typeout{*** lwarp: #1}%
-% \PackageInfo{lwarp}{#1 : }%
+ \typeout{*** lwarp: #1}%
+ % \PackageInfo{lwarp}{#1 : }%
}%
{}%
}
@@ -6138,6 +6208,8 @@ top=1in,bottom=1in,%
\let\LWR@origraggedright\raggedright
\let\LWR@origonecolumn\onecolumn
+\let\LWR@origsp\sp
+\let\LWR@origsb\sb
\let\LWR@origtextsuperscript\textsuperscript
\let\LWR@origtextsubscript\textsubscript
@@ -6183,6 +6255,60 @@ top=1in,bottom=1in,%
+% \section{Textcomp and SIunitx}
+
+% Mimic the \pkg{textcomp} package if it not loaded,
+% then create \HTML\ versions.
+
+% \changes{v0.36}{2017/08/17}{\pkg{siunitx}: Improved symbol support.}
+
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+% \end{macrocode}
+
+% \begin{macrocode}
+\AtBeginDocument{% in case textcomp was not loaded
+
+\providecommand*{\textdegree}{DEG}
+\providecommand*{\textcelsius}{DEGC}
+\providecommand*{\textohm}{OHM}
+\providecommand*{\textmu}{MU}
+
+\let\LWR@origtextdegree\textdegree
+\let\LWR@origtextcelsius\textcelsius
+\let\LWR@origtextohm\textohm
+\let\LWR@origtextmu\textmu
+
+\ifPDFTeX
+\renewcommand*{\textdegree}{\HTMLentity{deg}}
+\renewcommand*{\textcelsius}{\HTMLentity{deg}\,C}
+\renewcommand*{\textohm}{\HTMLunicode{2126}}
+\renewcommand*{\textmu}{\HTMLunicode{00B5}}
+\else
+\renewcommand*{\textdegree}{°}
+\renewcommand*{\textcelsius}{°C}
+\renewcommand*{\textohm}{Ω}
+\renewcommand*{\textmu}{μ}
+\fi
+
+\@ifpackageloaded{siunitx}
+{
+\DeclareSIUnit\bohr{\textit{a}\textsubscript{0}}
+\DeclareSIUnit\clight{\textit{c}\textsubscript{0}}
+\DeclareSIUnit\elementarycharge{\textit{e}}
+\DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
+\DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
+\DeclareSIUnit\planckbar{\HTMLunicode{210F}}
+}% siunitx loaded
+{}
+
+}% AtBeginDocument
+
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+
@@ -6441,8 +6567,8 @@ span.poemtitle {
}
blockquote {
- margin-left: 0px ;
- margin-right: 0px ;
+ margin-left: 0px ;
+ margin-right: 0px ;
}
blockquote p {
@@ -6450,12 +6576,12 @@ blockquote p {
text-align: left ;
font-size: .85em ;
margin-left: 3em ;
- margin-right: 3em ;
+ margin-right: 3em ;
}
blockquotation {
- margin-left: 0px ;
- margin-right: 0px ;
+ margin-left: 0px ;
+ margin-right: 0px ;
}
blockquotation p {
@@ -6463,7 +6589,7 @@ blockquotation p {
text-align: left ;
font-size: .85em ;
margin-left: 3em ;
- margin-right: 3em ;
+ margin-right: 3em ;
}
div.epigraph {
@@ -6632,7 +6758,7 @@ div.titlepage {
font-size: .85em ;
margin: 3ex 1em 0ex 1em ;
padding-bottom: 1ex ;
- border-top: 1px solid silver ;
+ border-top: 1px solid silver ;
}
.marginpar {
@@ -6818,7 +6944,7 @@ div.doublespace { line-height: 2 ; }
/* Minipage environments, vertically aligned to top, center, bottom: */
-.minipage {
+.minipage, .fminipage, .fcolorminipage {
/* display: inline-block ; */
/* Mini pages which follow each other will be tiled. */
margin: .25em .25em .25em .25em;
@@ -6832,6 +6958,16 @@ div.doublespace { line-height: 2 ; }
/* Have not yet researched this. */
.minipage p {margin: .75ex 0em .75ex 0em ;}
+.fboxBlock .minipage, .colorbox .minipage, .colorboxBlock .minipage,
+.fcolorbox .minipage, .fcolorboxBlock .minipage
+ {border: none ; background: none;}
+
+.fbox, .fboxBlock { border: 1px solid black ; }
+
+.fbox, .fboxBlock, .fcolorbox, .fcolorboxBlock, .colorbox, .colorboxBlock,
+.fminipage, .fcolorminipage
+ {display: inline-block}
+
.shadowbox, .shabox {
border: 1px solid black;
box-shadow: 3px 3px 3px #808080 ;
@@ -6859,8 +6995,6 @@ div.doublespace { line-height: 2 ; }
.Ovalbox { border-width: 2px ; }
-
-
.framebox {
border: 1px solid black;
border-radius: 0px ;
@@ -6908,7 +7042,7 @@ div.doublespace { line-height: 2 ; }
/* framed package */
-.framed, pre.boxedverbatim {
+.framed, pre.boxedverbatim, fcolorbox {
margin: 3ex 0em 3ex 0em ;
border: 1px solid black;
border-radius: 0px ;
@@ -6932,8 +7066,8 @@ div.doublespace { line-height: 2 ; }
}
.framedtitle {
- margin: 0em ;
- padding: 0em ;
+ margin: 0em ;
+ padding: 0em ;
font-size: 130%
}
@@ -6947,8 +7081,8 @@ dl {
}
dl dt {
- margin-top: 1ex;
- margin-left: 1em ;
+ margin-top: 1ex;
+ margin-left: 1em ;
font-weight: bold;
}
@@ -7060,8 +7194,8 @@ figcaption , .lstlistingtitle {
font-size: .85em ;
text-align: center ;
font-weight: bold ;
- margin-top: 1ex ;
- margin-bottom: 1ex ;
+ margin-top: 1ex ;
+ margin-bottom: 1ex ;
}
figure.subfigure figcaption, figure.subtable figcaption {
@@ -7077,8 +7211,8 @@ div.nonfloatcaption {
/* For a \RawCaption inside a minipage inside a figure's floatrow: */
figure div.floatrow div.minipage figcaption {
- border: none ;
- background: none ;
+ border: none ;
+ background: none ;
}
@@ -7182,13 +7316,13 @@ span.callout {
background-color:black;
color:white;
padding:0px .25em 0px .25em;
- margin: 0 ;
+ margin: 0 ;
font-weight: bold;
font-size:.72em ;
}
div.programlisting pre.verbatim span.callout{
- font-size: .85em ;
+ font-size: .85em ;
}
@@ -7369,7 +7503,7 @@ span.theoremheaderchangebreak,
span.theoremheaderchange,
span.theoremheadermargin
{
- font-style:normal ; font-weight: bold ; margin-right: 1em ;
+ font-style:normal ; font-weight: bold ; margin-right: 1em ;
}
span.amsthmnameplain,
@@ -7377,7 +7511,7 @@ span.amsthmnamedefinition,
span.amsthmnumberplain,
span.amsthmnumberdefinition
{
- font-style:normal ; font-weight: bold ;
+ font-style:normal ; font-weight: bold ;
}
@@ -7398,10 +7532,10 @@ span.amsthmproofname
span.theoremheadersc
{
- font-style:normal ;
- font-variant: small-caps ;
- font-weight: normal ;
- margin-right: 1em ;
+ font-style:normal ;
+ font-variant: small-caps ;
+ font-weight: normal ;
+ margin-right: 1em ;
}
.theoremendmark {float:right}
@@ -7413,8 +7547,8 @@ div.theorembodychangebreak,
div.theorembodychange,
div.theorembodymargin
{
- font-style:italic;
- margin-top: 3ex ; margin-bottom: 3ex ;
+ font-style:italic;
+ margin-top: 3ex ; margin-bottom: 3ex ;
}
div.theorembodydefinition, div.theorembodyremark, div.theorembodyproof,
@@ -7422,8 +7556,8 @@ div.theorembodyplainupright, nonumberplainuprightsc,
div.amsthmbodydefinition, div.amsthmbodyremark,
div.amsthmproof
{
- font-style: normal ;
- margin-top: 3ex ; margin-bottom: 3ex ;
+ font-style: normal ;
+ margin-top: 3ex ; margin-bottom: 3ex ;
}
span.amsthmnoteremark {}
@@ -7505,7 +7639,7 @@ http://nitens.org/taraborelli/texlogo
.lyxlogo {
font-family: "URW Classico", Optima, "Linux Biolinum O",
"DejaVu Sans", "Bitstream Vera Sans", Geneva,
- Verdana, sans-serif ;
+ Verdana, sans-serif ;
}
@@ -7598,7 +7732,7 @@ h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
"Nimbus Roman No 9 L", "FreeSerif",
"Hoefler Text", Times, "Times New Roman", serif;
font-variant: small-caps ;
- font-weight: normal ;
+ font-weight: normal ;
color: #304070 ;
text-shadow: 2px 2px 3px #808080;
}
@@ -7711,7 +7845,7 @@ div.sidebartitle{
"FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
font-weight:bold;
font-variant: small-caps ;
- font-size: 1.5em ;
+ font-size: 1.5em ;
color: #304070 ;
text-align: center ;
text-shadow: 1px 1px 2px #808080;
@@ -7722,14 +7856,14 @@ div.sidebartitle{
.minipage {
background-color: #eeeee7 ;
border: 1px solid silver ;
- border-radius: 1ex ;
+ border-radius: 1ex ;
}
.framed .minipage , .framedleftbar .minipage {
- border: none ;
- background: none ;
- padding: 0ex ;
- margin: 0ex ;
+ border: none ;
+ background: none ;
+ padding: 0ex ;
+ margin: 0ex ;
}
figure.figure .minipage, figcaption .minipage { border: none; }
@@ -7746,7 +7880,7 @@ figure , div.marginblock {
figure figure {
border: 1px solid silver ;
margin: 0em ;
- box-shadow: none ;
+ box-shadow: none ;
}
/*
@@ -8252,7 +8386,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.35"
+printversion = "v0.36"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -8441,8 +8575,8 @@ function reruntoget (filesource)
local fsource = io.open(filesource)
for line in fsource:lines() do
if ( string.find(line,"Rerun to get") ~= nil ) then
- io.close(fsource)
- return true
+ io.close(fsource)
+ return true
end
end
io.close(fsource)
@@ -9171,37 +9305,37 @@ end -- not --version
\edef\LWR@tempone{#1}%
\LWR@traceinfo{about to compare with ??}%
\ifthenelse{\equal{\LWR@tempone}{??}}%
-{%
-\LWR@traceinfo{found ??}%
-}{%
-\LWR@traceinfo{not found ??}%
-}%
+{\LWR@traceinfo{found ??}}%
+{\LWR@traceinfo{not found ??}}%
\LWR@traceinfo{about to compare with zero or empty}%
\ifthenelse{%
-\equal{\LWR@tempone}{0}%
-\OR \equal{\LWR@tempone}{}%
-\OR \equal{\LWR@tempone}{??}%
+ \equal{\LWR@tempone}{0}%
+ \OR \equal{\LWR@tempone}{}%
+ \OR \equal{\LWR@tempone}{??}%
}%
{%
-\LWR@traceinfo{LWR@htmlsectionfilename B \HomeHTMLFilename.html}%
-\HomeHTMLFilename.html%
+ \LWR@traceinfo{LWR@htmlsectionfilename B \HomeHTMLFilename.html}%
+ \HomeHTMLFilename.html%
}%
% \end{macrocode}
% For a \LaTeX\ section named ``Index'' or ``index'' without a prefix, create a filename
% with a leading underscore to avoid colliding with the \HTML\ filename |index.html|:
% \begin{macrocode}
{%
-\LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}%
-\ifthenelse{%
-\equal{\HTMLFilename}{} \AND \equal{\LWR@tempone}{Index} \OR \equal{\LWR@tempone}{index}%
-}%
-{%
-\LWR@traceinfo{prefixing the index name with an underscore.}%
-\_#1.html}%
+ \LWR@traceinfo{LWR@htmlsectionfilename C \LWR@tempone}%
+ \ifthenelse{%
+ \equal{\HTMLFilename}{} \AND
+ \equal{\LWR@tempone}{Index} \OR
+ \equal{\LWR@tempone}{index}%
+ }%
+ {%
+ \LWR@traceinfo{prefixing the index name with an underscore.}%
+ \_#1.html%
+ }%
% \end{macrocode}
% Otherwise, create a filename with the chosen prefix:
% \begin{macrocode}
-{\HTMLFilename#1.html}%
+ {\HTMLFilename#1.html}%
}%
\LWR@traceinfo{LWR@htmlsectionfilename Z}%
}
@@ -9426,30 +9560,71 @@ end -- not --version
% \end{macrocode}
-% \subsection{HTML tags}
+
+% \subsection{Babel-French}
+
% \changes{v0.34}{2017/08/03}{\pkg{babel-french}: Adds fixed-width HTML spaces to punctuation.}
-% Adjust \pkg{babel-french} for \HTML\ spaces:
+% \changes{v0.36}{2017/08/15}{\pkg{babel-french}: Adjustements for French variants,
+% load order, footnotes, ellipses.}
+%
+% Adjust \pkg{babel-french} for \HTML\ spaces.
+% So far, this only works for |pdflatex| and |xelatex|.
+%
+% \credits{Daniel Flipo}
+%
% \begin{macrocode}
-\@ifpackagewith{babel}{french}{
-\renewcommand*{\FBcolonspace}{~}
-\renewcommand*{\FBthinspace}{\,}
-}{}
-% \end{macrocode}
+\providecommand*{\LWR@FBcancel}{}
-% \begin{macro}{\LWR@FBcancel} Cancels \HTML\ spacing for \pkg{babel-french}
-% \begin{macrocode}
-\@ifpackagewith{babel}{french}{%
-\newcommand{\LWR@FBcancel}{%
-\csdef{FBcolonspace}{}%
-\csdef{FBthinspace}{}%
+\AtBeginDocument{
+\@ifundefined{frenchbsetup}
+{}
+{
+ \frenchbsetup{FrenchFootnotes=false}
+ % OR: redefine \insertfootnotemarkFB?
+ \LetLtxMacro\LWR@FBcancel\NoAutoSpacing
+ \renewcommand*{\FBcolonspace}{%
+ \begingroup%
+ \LWR@FBcancel%
+ \LWR@origampersand{}nbsp;%
+ \endgroup%
+ }
+ \renewcommand*{\FBthinspace}{%
+ \begingroup%
+ \LWR@FBcancel%
+ \LWR@origampersand\#x202f;% \,
+ \endgroup%
+ }
+ \renewcommand*{\FBguillspace}{%
+ \begingroup%
+ \LWR@FBcancel%
+ \LWR@origampersand{}nbsp;% ~, for \og xyz \fg{}
+ \endgroup%
+ }
+ \DeclareDocumentCommand{\FBmedkern}{}{%
+ \begingroup%
+ \LWR@FBcancel%
+ \LWR@origampersand\#x202f;% \,
+ \endgroup%
+ }
+ \DeclareDocumentCommand{\FBthickkern}{}{%
+ \begingroup%
+ \LWR@FBcancel%
+ \LWR@origampersand{}nbsp;% ~
+ \endgroup%
+ }
+ \ifFBunicode
+ \else
+ \DeclareTextSymbol{\FBtextellipsis}{LY1}{133}
+ \DeclareTextCommandDefault{\FBtextellipsis}{\textellipsis\xspace}
+ \fi
}
}
-{% not french:
-\newcommand{\LWR@FBcancel}{}
-}%
% \end{macrocode}
-% \end{macro}
+
+
+% \subsection{HTML tags}
+
% \begin{macro}{\LWR@htmltagc} \marg{tag}
% Break ligatures and use upright apostrophes in \HTML\ tags.
@@ -9496,30 +9671,27 @@ end -- not --version
\LWR@traceinfo{LWR@nestspan}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
{%
-\LWR@traceinfo{LWR@nestspan: inside a lateximage}%
+ \LWR@traceinfo{LWR@nestspan: inside a lateximage}%
}%
{% not in a lateximage
-\LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}%
-\addtocounter{LWR@spandepth}{1}%
-\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
-\RenewDocumentEnvironment{BlockClass}{o m}{}{}%
-\renewcommand{\BlockClassSingle}[2]{##2}%
-\renewcommand{\LWR@forcenewpage}{}%
-\renewcommand{\LWR@itemizestart}{%
-\let\item\LWR@nestspanitem%
-% \global\boolfalse{LWR@allownestspanitembreak}%
-}%
-\renewcommand{\LWR@itemizeend}{}%
-\renewcommand{\LWR@enumeratestart}{%
-\let\item\LWR@nestspanitem%
-% \global\boolfalse{LWR@allownestspanitembreak}%
-}%
-\renewcommand{\LWR@enumerateend}{}%
-\renewcommand{\LWR@descriptionstart}{%
-\let\item\LWR@nestspanitem%
-% \global\boolfalse{LWR@allownestspanitembreak}%
-}%
-\renewcommand{\LWR@descriptionend}{}%
+ \LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}%
+ \addtocounter{LWR@spandepth}{1}%
+ \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+ \RenewDocumentEnvironment{BlockClass}{o m}{}{}%
+ \renewcommand{\BlockClassSingle}[2]{##2}%
+ \renewcommand{\LWR@forcenewpage}{}%
+ \renewcommand{\LWR@itemizestart}{%
+ \let\item\LWR@nestspanitem%
+ }%
+ \renewcommand{\LWR@itemizeend}{}%
+ \renewcommand{\LWR@enumeratestart}{%
+ \let\item\LWR@nestspanitem%
+ }%
+ \renewcommand{\LWR@enumerateend}{}%
+ \renewcommand{\LWR@descriptionstart}{%
+ \let\item\LWR@nestspanitem%
+ }%
+ \renewcommand{\LWR@descriptionend}{}%
}% not in a lateximage
}%
{%
@@ -9665,6 +9837,8 @@ end -- not --version
%
% Factored and reused in several places.
%
+% The trailing spaces allow more places for a line break.
+%
% \changes{v0.20}{2017/01/17}{Factored code.}
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
%
@@ -9672,11 +9846,11 @@ end -- not --version
\NewDocumentCommand{\LWR@subhtmlelementclass}{m o m}{%
\IfValueTF{#2}%
{% option
-\ifthenelse{\equal{#2}{}}%
-{\LWR@htmltag{#1 class="#3"}}% empty option
-{\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option
+ \ifthenelse{\equal{#2}{}}%
+ {\LWR@htmltag{#1 class="#3" }}% empty option
+ {\LWR@htmltag{#1 class="#3" style="#2" }}% non-empty option
}% option
-{\LWR@htmltag{#1 class="#3"}}% no option
+{\LWR@htmltag{#1 class="#3" }}% no option
}
% \end{macrocode}
% \end{macro}
@@ -9703,7 +9877,7 @@ end -- not --version
\LWR@stoppars%
\LWR@htmltag{/#1}%
\ifbool{HTMLDebugComments}{%
-\LWR@htmlcomment{End of #1 ``#2''}%
+ \LWR@htmlcomment{End of #1 ``#2''}%
}{}%
\LWR@startpars%
}
@@ -9987,46 +10161,47 @@ end -- not --version
% See if have already started a \env{lateximage} or a \element{span}.
% If so, do not generate nested paragraph tags.
% \begin{macrocode}
-\ifthenelse{%
-\cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR%
-\cnttest{\value{LWR@spandepth}}{>}{0}%
-}% nested par tags?
+ \ifthenelse{%
+ \cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR%
+ \cnttest{\value{LWR@spandepth}}{>}{0}%
+ }% nested par tags?
% \end{macrocode}
% If so: Do nothing if already started a \env{lateximage} page. Cannot nest a \env{lateximage}.
% Also do nothing if already inside a \element{span}. Do not nest paragraph tags
% inside a \element{span}.
% \begin{macrocode}
-{}% no nested par tags
+ {}% no nested par tags
% \end{macrocode}
% Else: No \env{lateximage} or \element{span} has been started yet,
% so it's OK to generate paragraph tags.
% \begin{macrocode}
-{% yes nest par tags
-\LWR@htmltagc{\LWR@tagregularparagraph}%
+ {% yes nest par tags
+ \LWR@htmltagc{\LWR@tagregularparagraph}%
% \end{macrocode}
% Manually indent item list labels to avoid left margin intrustion:
%
% See if are nested inside an item list:
% \begin{macrocode}
-\ifnumcomp{\@listdepth}{>}{0}%
-{%
+ \ifnumcomp{\@listdepth}{>}{0}%
+ {%
% \end{macrocode}
% If so, leave some horizontal room in the \LaTeX{} \PDF\ output for list labels:
% \begin{macrocode}
-\LWR@orighspace{1in}%
-}{}%
+ \LWR@orighspace{1in}%
+ }%
+ {}%
% \end{macrocode}
% Now have started a paragraph.
% \begin{macrocode}
-\global\booltrue{LWR@doingapar}%
+ \global\booltrue{LWR@doingapar}%
% \end{macrocode}
% At the endof each paragraph,
% generate closing tag and do regular |/par| stuff.
% (Attempting to use the \pkg{everyhook} |cr| hook
% for \cs{LWR@closeparagraph} does not work well.)
% \begin{macrocode}
-\let\par\LWR@closeparagraph%
-}% end of yes nest par tags
+ \let\par\LWR@closeparagraph%
+ }% end of yes nest par tags
}% end of handling pars
{}% not handling pars
}
@@ -10038,6 +10213,7 @@ end -- not --version
% \begin{macro}{\LWR@closeparagraph}
% \changes{v0.20}{2017/01/17}{No break tags in the start/end of a tabular.}
% \changes{v0.20}{2017/01/17}{\cs{unskip} extra spaces.}
+% \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.}
% \begin{macrocode}
\newcommand*{\LWR@closeparagraph}
{%
@@ -10052,52 +10228,51 @@ end -- not --version
% \end{macrocode}
% See if already started a \env{lateximage} or a \element{span}:
% \begin{macrocode}
-\ifthenelse{%
-\cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR%
-\cnttest{\value{LWR@spandepth}}{>}{0}%
-}%
+ \ifthenelse{%
+ \cnttest{\value{LWR@lateximagedepth}}{>}{0} \OR%
+ \cnttest{\value{LWR@spandepth}}{>}{0}%
+ }%
% \end{macrocode}
% Do nothing if already started a \env{lateximage} or a \element{span},
% but add a parbreak if in a span but not a \env{lateximage}.
% \begin{macrocode}
-{% no nested par tags
-\ifthenelse{%
-\cnttest{\value{LWR@spandepth}}{>}{0}%
-\AND%
-\cnttest{\value{LWR@lateximagedepth}}{=}{0}%
-}%
-{%
-\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}%
-}%
-{}%
-}% no nested par tags
+ {% no nested par tags
+ \ifthenelse{%
+ \cnttest{\value{LWR@spandepth}}{>}{0}%
+ \AND%
+ \cnttest{\value{LWR@lateximagedepth}}{=}{0}%
+ }%
+ {\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
+ {}%
+ }% no nested par tags
% \end{macrocode}
% If have not already started a \env{lateximage} or a \element{span}:
% \begin{macrocode}
-{% yes nest par tags
+ {% yes nest par tags
% \end{macrocode}
-% Print a closing tag:
+% Print a closing tag and some extra vertical space:
% \begin{macrocode}
-\unskip%
-\LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \unskip%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@orignewline%
% \end{macrocode}
% No longer doing a paragraph:
% \begin{macrocode}
-\global\boolfalse{LWR@doingapar}%
+ \global\boolfalse{LWR@doingapar}%
% Disable the special \env{minipage} \& \cs{hspace} interaction
% until a new minipage is found:
% \begin{macrocode}
-\global\boolfalse{LWR@minipagethispar}%
-}% end of yes nest par tags
+ \global\boolfalse{LWR@minipagethispar}%
+ }% end of yes nest par tags
}% end of handling pars
% \end{macrocode}
% Add a parbreak if in a span,
% but not in a table outside a row:
% \begin{macrocode}
{% not handling pars
-\ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
-{\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
-{}%
+ \ifthenelse{\cnttest{\value{LWR@spandepth}}{>}{0}}%
+ {\ifbool{LWR@intabularmetadata}{}{\unskip\LWR@htmltagc{br /}}}%
+ {}%
}% not handling pars
% \end{macrocode}
% Finish with regular paragraph processing
@@ -10144,33 +10319,33 @@ end -- not --version
% \end{macrocode}
% See if currently handling \HTML\ paragraphs:
% \begin{macrocode}
-\ifbool{LWR@doingstartpars}%
+ \ifbool{LWR@doingstartpars}%
% \end{macrocode}
% If already in paragraph mode, do nothing.
% \begin{macrocode}
-{}%
+ {}%
% \end{macrocode}
% If not currently in paragraph mode:
% \begin{macrocode}
-{%
+ {%
% \end{macrocode}
% At the start of each paragraph, generate an opening tag:
% \begin{macrocode}
-\PushPreHook{par}{\LWR@openparagraph}%
+ \PushPreHook{par}{\LWR@openparagraph}%
% \end{macrocode}
% At the end of each paragraph, generate closing tag and do regular |/par| actions:
% \begin{macrocode}
-\let\par\LWR@closeparagraph
+ \let\par\LWR@closeparagraph
-}% an intentionally blank line
+ }% an intentionally blank line
% \end{macrocode}
% Are now handling paragraphs, but have not yet actually started one:
% \begin{macrocode}
-\global\setbool{LWR@doingstartpars}{true}%
+ \global\setbool{LWR@doingstartpars}{true}%
% \end{macrocode}
% No <par> tag yet to undo:
% \begin{macrocode}
-\global\boolfalse{LWR@doingapar}%
+ \global\boolfalse{LWR@doingapar}%
}% nestspan
}
% \end{macrocode}
@@ -10180,6 +10355,8 @@ end -- not --version
% \begin{macro}{\LWR@stoppars}
% Stop handling \HTML\ paragraphs.
% Any currently open \HTML\ paragraph is closed, and no more will be opened.
+%
+% \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.}
% \begin{macrocode}
\newcommand*{\LWR@stoppars}%
{%
@@ -10192,53 +10369,52 @@ end -- not --version
% \end{macrocode}
% See if currently handling \HTML\ paragraphs:
% \begin{macrocode}
-\ifbool{LWR@doingapar}%
+ \ifbool{LWR@doingapar}%
% \end{macrocode}
% if currently in an \HTML\ paragraph:
% \begin{macrocode}
-{%
+ {%
% \end{macrocode}
% Print a closing tag:
% \begin{macrocode}
-\unskip%
-\LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \unskip%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@orignewline%
% \end{macrocode}
% No longer have an open \HTML\ paragraph:
% \begin{macrocode}
-\global\boolfalse{LWR@doingapar}%
+ \global\boolfalse{LWR@doingapar}%
% \end{macrocode}
% Disable the special \env{minipage} \& \cs{hspace} interaction
% until a new minipage is found:
% \begin{macrocode}
-\global\boolfalse{LWR@minipagethispar}
+ \global\boolfalse{LWR@minipagethispar}
-}% an intentionally blank line
+ }% an intentionally blank line
% \end{macrocode}
% If was not in an \HTML\ paragraph:
% \begin{macrocode}
-{}%
+ {}%
% \end{macrocode}
% See if currently allowing \HTML\ paragraphs:
% \begin{macrocode}
-\ifbool{LWR@doingstartpars}%
+ \ifbool{LWR@doingstartpars}%
% \end{macrocode}
% If so: clear the |par| hook to no longer catch paragraphs:
% \begin{macrocode}
-{%
-\ClearPreHook{par}%
-}%
+ {\ClearPreHook{par}}%
% \end{macrocode}
% Else: do nothing
% \begin{macrocode}
-{}%
+ {}%
% \end{macrocode}
% no longer in paragraph mode
% \begin{macrocode}
-\global\setbool{LWR@doingstartpars}{false}%
+ \global\setbool{LWR@doingstartpars}{false}%
% \end{macrocode}
% no \element{p} tag to undo:
% \begin{macrocode}
-\global\boolfalse{LWR@doingapar}%
+ \global\boolfalse{LWR@doingapar}%
}% nestspan
}
% \end{macrocode}
@@ -10465,7 +10641,9 @@ end -- not --version
% See \cref{sec:footnotesregular} for the implementation.
%
% \subsection{Minipage footnotes}
-% See \cref{sec:footnotesminipage} for minipage footnotes.
+% See \cref{sec:footnotesminipage} for how minipage footnotes are gathered.
+% See \cref{sec:footnotesminipageplaced} for how minipage footnotes are placed into
+% the document.
%
% \subsection{Titlepage thanks}
% See \cref{sec:titlehtml} for titlepage footnotes.
@@ -10485,71 +10663,151 @@ end -- not --version
% \end{macrocode}
%
% Much of the following has unneeded print-mode formatting removed.
+%
+% \begin{macro}{\@makefntext} \marg{text}
% \begin{macrocode}
\long\def\@makefntext#1{\textsuperscript{\@thefnmark} #1}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makefnmark}
+% \begin{macrocode}
\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}
% \end{macrocode}
+% \end{macro}
+%
%
% Footnotes may be in regular text, in which case paragraphs are tagged,
-% or in a table data cell, in which case paragraph tags must be added manually.
+% or in a table data cell or \env{lateximage},
+% in which case paragraph tags must be added manually.
+%
+% In a \env{lateximage} during \HTML\ output, the \env{lateximage} is placed
+% inside a print-mode \env{minipage}, but the footnotes are broken out by:
+% \begin{sourcedisplay}
+% \cs{def}\cs{@mpfn}\{footnote\} \\
+% \cs{def}\cs{thempfn}\{\cs{thefootnote}\} \\
+% \cs{let}\cs{@footnotetext}\cs{LWR@footnotetext}
+% \end{sourcedisplay}
+%
+% \begin{macro}{\LWR@footnotetext} \marg{text}
%
% \changes{v0.27}{2017/04/04}{Fix for table footnote par tags.}
+% \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.}
+% \changes{v0.36}{2017/08/16}{Force \protect\HTML\ superscripts.}
%
% \begin{macrocode}
-\long\def\@footnotetext#1{%
-\global\setbox\LWR@footnotes=\vbox{\unvbox\LWR@footnotes%
-\protected@edef\@currentlabel{%
-\csname p@footnote\endcsname\@thefnmark%
-}% @currentlabel
-\color@begingroup%
-\ifbool{LWR@doingstartpars}{}{\LWR@htmltagc{\LWR@tagregularparagraph}}%
-\@makefntext{#1}%
-\ifbool{LWR@doingstartpars}{\par}{\LWR@htmltagc{/\LWR@tagregularparagraph}}%
-\color@endgroup%
+\long\def\LWR@footnotetext#1{%
+\global\setbox\LWR@footnotes=\vbox{%
+% \end{macrocode}
+% Add to any current footnotes:
+% \begin{macrocode}
+ \unvbox\LWR@footnotes%
+% \end{macrocode}
+% Remember the footnote number for \cs{ref}:
+% \begin{macrocode}
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark%
+ }% @currentlabel
+% \end{macrocode}
+% Open a group:
+% \begin{macrocode}
+ \color@begingroup%
+% \end{macrocode}
+% Use \HTML\ superscripts even inside a \env{lateximage}:
+% \begin{macrocode}
+ \renewcommand{\textsuperscript}[1]{\LWR@htmlspan{sup}{##1}}%
+% \end{macrocode}
+% Use paragraph tags if in a tabular data cell or a \env{lateximage}:
+% \begin{macrocode}
+ \ifthenelse{%
+ \boolean{LWR@doingstartpars} \AND%
+ \cnttest{\value{LWR@lateximagedepth}}{=}{0}%
+ }%
+ {}%
+ {\LWR@htmltagc{\LWR@tagregularparagraph}}%
+% \end{macrocode}
+% Append the footnote to the list:
+% \begin{macrocode}
+ \@makefntext{#1}%
+% \end{macrocode}
+% Closing paragraph tag:
+% \begin{macrocode}
+ \ifthenelse{%
+ \boolean{LWR@doingstartpars} \AND%
+ \cnttest{\value{LWR@lateximagedepth}}{=}{0}%
+ }%
+ {\par}%
+ {%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@orignewline%
+ }%
+% \end{macrocode}
+% Close the group:
+% \begin{macrocode}
+ \color@endgroup%
}% vbox
}%
+% \end{macrocode}
+% \end{macro}
-\long\def\@mpfootnotetext#1{%
-\global\setbox\@mpfootins\vbox{%
-\unvbox\@mpfootins
-\reset@font\footnotesize
-\hsize\columnwidth
-\@parboxrestore
-\protected@edef\@currentlabel
-{\csname p@mpfootnote\endcsname\@thefnmark}%
-\color@begingroup
-\@makefntext{%
-\ignorespaces#1%
-}%
+% \begin{macro}{\@footnotetext} \marg{text}
+% \begin{macrocode}
+\let\@footnotetext\LWR@footnotetext
% \end{macrocode}
+% \end{macro}
%
-% Don't add the closing paragraph tag if are inside a \env{lateximage}:
+%
+%
+% \subsection{Minipage footnote implementation}
+% \label{sec:footnotesminipage}
+%
+% \begin{macro}{\@mpfootnotetext} \marg{text}
% \begin{macrocode}
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
-{}%
-{\LWR@htmltagc{/\LWR@tagregularparagraph}}%
+\long\def\@mpfootnotetext#1{%
+\global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \ignorespaces#1%
+ }%
% \end{macrocode}
-%
+% Don't add the closing paragraph tag if are inside a \env{lateximage}:
% \begin{macrocode}
-\color@endgroup}%
+ \ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+ {}%
+ {%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@orignewline%
+ }%
+ \color@endgroup%
+}% vbox
}
% \end{macrocode}
+% \end{macro}
%
-% Enclose the footnotes in a class, print, then clear:
+%
+% \begin{macro}{\LWR@printpendingfootnotes}
+% Enclose the footnotes in a class, print, then clear.
% \begin{macrocode}
\newcommand*{\LWR@printpendingfootnotes}{%
\ifvoid\LWR@footnotes\else
-\LWR@forcenewpage
-\begin{BlockClass}{footnotes}
-\LWR@origmedskip
-\unvbox\LWR@footnotes
-\setbox\LWR@footnotes=\vbox{}
-\end{BlockClass}
+ \LWR@forcenewpage
+ \begin{BlockClass}{footnotes}
+ \LWR@origmedskip
+ \unvbox\LWR@footnotes
+ \setbox\LWR@footnotes=\vbox{}
+ \end{BlockClass}
\fi
}
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\LWR@epubprintpendingfootnotes}
% Used to print footnotes before sections only if formatting for an \EPUB\ or word processor:
% \begin{macrocode}
\newcommand*{\LWR@epubprintpendingfootnotes}{%
@@ -10558,6 +10816,7 @@ end -- not --version
{}%
}
% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
\end{warpHTML}
@@ -10781,11 +11040,11 @@ end -- not --version
\ifbool{FormatEPUB}
{}
{
-\LWR@htmlelement{footer}
+ \LWR@htmlelement{footer}
-\LWR@pagebottom
+ \LWR@pagebottom
-\LWR@htmlelementend{footer}
+ \LWR@htmlelementend{footer}
}
% \end{macrocode}
%
@@ -10853,11 +11112,11 @@ end -- not --version
\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
{}
{
-\LWR@htmlelement{header}
+ \LWR@htmlelement{header}
-\LWR@pagetop
+ \LWR@pagetop
-\LWR@htmlelementend{header}
+ \LWR@htmlelementend{header}
}
% \end{macrocode}
@@ -10979,7 +11238,7 @@ end -- not --version
% Typeset a section number and its trailing space with CSS formatting:
% \begin{macrocode}
\newcommand*{\LWR@sectionnumber}[1]{%
-\InlineClass{sectionnumber}{#1} %
+\InlineClass{sectionnumber}{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -11050,6 +11309,7 @@ end -- not --version
% \begin{macro}{\LWR@section} * \oarg{TOC name} \marg{name} \marg{sectiontype}
%
% \changes{v0.20}{2017/01/09}{Combined higher-level sections together into files.}
+% \changes{v0.36}{2017/08/15}{Improved spacing.}
%
% The common actions for the high-level sectioning commands.
% \begin{macrocode}
@@ -11068,45 +11328,45 @@ end -- not --version
% \end{macrocode}
% Generate a new LaTeX page so that \TOC\ and index page number points to the section:
% \begin{macrocode}
-\LWR@orignewpage%
+ \LWR@orignewpage%
}{% not starred
-\ifthenelse{%
-\cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}%
-\AND%
-\(%
-\NOT\boolean{CombineHigherDepths}\OR%
-\cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}%
-\)%
-}%
+ \ifthenelse{%
+ \cnttest{\csuse{LWR@depth#4}}{<=}{\value{FileDepth}}%
+ \AND%
+ \(%
+ \NOT\boolean{CombineHigherDepths}\OR%
+ \cnttest{\csuse{LWR@depth#4}}{<=}{\value{LWR@prevFileDepth}}%
+ \)%
+ }%
% \end{macrocode}
% If so: start a new \HTML\ file:
% \begin{macrocode}
-{% new file
-\LWR@traceinfo{LWR@section: new HTML file}%
+ {% new file
+ \LWR@traceinfo{LWR@section: new HTML file}%
% \end{macrocode}
% See if there was an optional TOC name entry:
% \begin{macrocode}
-\IfNoValueTF{#2}%
+ \IfNoValueTF{#2}%
% \end{macrocode}
% If no optional entry
% \begin{macrocode}
-{\LWR@newhtmlfile{#3}}%
+ {\LWR@newhtmlfile{#3}}%
% \end{macrocode}
% If yes an optional entry
% \begin{macrocode}
-{\LWR@newhtmlfile{#2}}%
-}% new file
+ {\LWR@newhtmlfile{#2}}%
+ }% new file
% \end{macrocode}
% Else: No new \HTML\ file:
% \begin{macrocode}
-{% not new file
+ {% not new file
% \end{macrocode}
% Generate a new LaTeX page so that \TOC\ and index page number points to the section:
% \begin{macrocode}
-\LWR@orignewpage%
+ \LWR@orignewpage%
-}% not new file
+ }% not new file
}% not starred
% \end{macrocode}
% Remember this section's name for \cs{nameref}:
@@ -11119,17 +11379,17 @@ end -- not --version
% \begin{macrocode}
\ifbool{HTMLDebugComments}{%
-\LWR@htmlcomment{Opening #4 ``#3''{}}
-}{}
+ \LWR@htmlcomment{Opening #4 ``#3''{}}%
+}{}%
% \end{macrocode}
% For inline sections paragraph and subparagraph, start a new paragraph now:
% \begin{macrocode}
\ifthenelse{%
-\cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}%
+ \cnttest{\csuse{LWR@depth#4}}{>=}{\LWR@depthparagraph}%
}%
-{\LWR@startpars}
-{}
+{\LWR@startpars}%
+{}%
% \end{macrocode}
% Create the opening tag with an autosec:
% \begin{macrocode}
@@ -11143,72 +11403,72 @@ end -- not --version
% \end{macrocode}
% Only add a numbered TOC entry if section number is not too deep:
% \begin{macrocode}
-\ifthenelse{%
-\cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}%
-}%
-{% if secnumdepth
+ \ifthenelse{%
+ \cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}%
+ }%
+ {% if secnumdepth
% \end{macrocode}
% If in the main matter, step the counter and add the TOC entry.
% For |article| class, \pkg{lwarp} assumes that all is mainmatter.
% \begin{macrocode}
-\LWR@traceinfo{LWR@section: about to test main matter}%
-\ifbool{LWR@mainmatter}%
-{%
-\LWR@traceinfo{LWR@section: yes mainmatter}%
-\refstepcounter{#4}%
+ \LWR@traceinfo{LWR@section: about to test main matter}%
+ \ifbool{LWR@mainmatter}%
+ {%
+ \LWR@traceinfo{LWR@section: yes mainmatter}%
+ \refstepcounter{#4}%
% \end{macrocode}
% Add main matter numbered TOC entry with the TOC name or the regular name:
% \begin{macrocode}
-\LWR@traceinfo{LWR@section: about to addcontentsline}%
-\addcontentsline{toc}{#4}%
-{\protect\LWR@sectionnumber{\csuse{the#4}}%
-\IfValueTF{#2}{#2}{#3}}%
-\LWR@traceinfo{LWR@section: finished addcontentsline}%
-}% end of if main matter
+ \LWR@traceinfo{LWR@section: about to addcontentsline}%
+ \addcontentsline{toc}{#4}%
+ {\protect\LWR@sectionnumber{\csuse{the#4}}%
+ \IfValueTF{#2}{ #2}{ #3}}%
+ \LWR@traceinfo{LWR@section: finished addcontentsline}%
+ }% end of if main matter
% \end{macrocode}
% If not main matter, add unnumbered TOC name or regular name:
% \begin{macrocode}
-{% not main matter
-\LWR@traceinfo{LWR@section: no main matter}%
-\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
-}% end of not main matter
-}% end of secnumdepth
+ {% not main matter
+ \LWR@traceinfo{LWR@section: no main matter}%
+ \addcontentsline{toc}{#4}{\IfValueTF{#2}{ #2}{ #3}}%
+ }% end of not main matter
+ }% end of secnumdepth
% \end{macrocode}
% Deeper than secnumdepth, so add an unnumbered TOC entry:
% \begin{macrocode}
-{%
-\addcontentsline{toc}{#4}{\IfValueTF{#2}{#2}{#3}}%
-}%
+ {%
+ \addcontentsline{toc}{#4}{\IfValueTF{#2}{ #2}{ #3}}%
+ }%
% \end{macrocode}
% For part, print the section type:
% \begin{macrocode}
-\ifbool{LWR@mainmatter}%
-{%
-\ifthenelse{%
-\(\cnttest{\csuse{LWR@depth#4}}{<=}%
-{\value{secnumdepth}}\) \AND
-\(\cnttest{\csuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)
-}%
-{\csuse{#4name}~{}}%
-{}%
+ \ifbool{LWR@mainmatter}%
+ {%
+ \ifthenelse{%
+ \(\cnttest{\csuse{LWR@depth#4}}{<=}%
+ {\value{secnumdepth}}\) \AND%
+ \(\cnttest{\csuse{LWR@depth#4}}{<=}{\LWR@depthpart}\)%
+ }%
+ {\csuse{#4name}~{}}%
+ {}%
% \end{macrocode}
% Print the section number:
% \begin{macrocode}
-\LWR@traceinfo{LWR@section: about to print section number}%
-\ifthenelse{%
-\cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}%
-}%
-{\protect\LWR@sectionnumber{\csuse{the#4}}}%
-{}%
-\LWR@traceinfo{LWR@section: finished print section number}%
-}{}%
+ \LWR@traceinfo{LWR@section: about to print section number}%
+ \ifthenelse{%
+ \cnttest{\csuse{LWR@depth#4}}{<=}{\value{secnumdepth}}%
+ }%
+ {\protect\LWR@sectionnumber{\csuse{the#4}}~}%
+ {}%
+ \LWR@traceinfo{LWR@section: finished print section number}%
+ }{}%
}% end of not starred
% \end{macrocode}
% Print the section name:
% \begin{macrocode}
-#3
+#3%
% \end{macrocode}
-% close the heading tag, such as /H2
+% Close the heading tag, such as /H2:
% \begin{macrocode}
\LWR@htmltag{\csuse{LWR@tag#4end}}%
% \end{macrocode}
@@ -11219,7 +11479,8 @@ end -- not --version
% Start paragraph handing unless is an inline paragraph or subparagraph:
% \begin{macrocode}
\ifthenelse{%
-\cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}}%
+ \cnttest{\csuse{LWR@depth#4}}{<}{\LWR@depthparagraph}%
+}%
{\LWR@startpars}%
{}%
% \end{macrocode}
@@ -11233,8 +11494,10 @@ end -- not --version
% a new \HTML\ page for the section following it
% while |CombineHigherDepths| was true.
% \begin{macrocode}
-\IfBooleanTF{#1}{}{% not starred
-\setcounter{LWR@prevFileDepth}{\csuse{LWR@depth#4}}%
+\IfBooleanTF{#1}%
+{}%
+{% not starred
+ \setcounter{LWR@prevFileDepth}{\csuse{LWR@depth#4}}%
}% not starred
\LWR@traceinfo{LWR@section: done}%
}
@@ -11498,10 +11761,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\ifbool{mathjax}%
{%
-\boolfalse{LWR@verbtags}
-\verbatiminput{lwarp_mathjax.txt}%
-\booltrue{LWR@verbtags}
-\LWR@stoppars
+ \boolfalse{LWR@verbtags}
+ \verbatiminput{lwarp_mathjax.txt}%
+ \booltrue{LWR@verbtags}
+ \LWR@stoppars
}% end of mathjax
{}%
% \end{macrocode}
@@ -11552,8 +11815,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% force \HTML\ debug comments off.
% \begin{macrocode}
\ifbool{FormatWordProcessor}{%
-\setcounter{FileDepth}{-5}%
-\boolfalse{HTMLDebugComments}%
+ \setcounter{FileDepth}{-5}%
+ \boolfalse{HTMLDebugComments}%
}{}
% \end{macrocode}
%
@@ -11738,8 +12001,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@requesttoc}[2]{%
\ifbool{#1}
{
-\expandafter\newwrite\csuse{tf@#2}
-\immediate\openout \csuse{tf@#2} \jobname.#2\relax
+ \expandafter\newwrite\csuse{tf@#2}
+ \immediate\openout \csuse{tf@#2} \jobname.#2\relax
}{}
}
% \end{macrocode}
@@ -11783,7 +12046,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifthenelse{\boolean{FormatEPUB}\OR\boolean{FormatWordProcessor}}
{}
{
-\ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}
+ \ifnumcomp{\value{LWR@htmlfilenumber}}{>}{0}{\LWR@botnavigation}{}
}
% \end{macrocode}
% \begin{macrocode}
@@ -12202,9 +12465,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifthenelse{\equal{\thepublished}{}}
{}
{
-\begin{BlockClass}{published}
-\@published
-\end{BlockClass}
+ \begin{BlockClass}{published}
+ \@published
+ \end{BlockClass}
}
}
% \end{macrocode}
@@ -12245,9 +12508,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifthenelse{\equal{\thesubtitle}{}}
{}
{
-\begin{BlockClass}{subtitle}
-\@subtitle
-\end{BlockClass}
+ \begin{BlockClass}{subtitle}
+ \@subtitle
+ \end{BlockClass}
}
}
% \end{macrocode}
@@ -12347,12 +12610,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\vspace*{\droptitle}
\maketitlehooka
\ifcsempty{@published}
- {}
- {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {}
+ {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
{\@bspretitle \@title \@bsposttitle}
\ifcsempty{@subtitle}
- {}
- {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ {}
+ {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
\maketitlehookb
{\@bspreauthor \@author \@bspostauthor}
\maketitlehookc
@@ -12396,12 +12659,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\vspace*{\droptitle}
\maketitlehooka
\ifcsempty{@published}
- {}
- {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {}
+ {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
{\@bspretitle \@title \@bsposttitle}
\ifcsempty{@subtitle}
- {}
- {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ {}
+ {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
\maketitlehookb
{\@bspreauthor \@author \@bspostauthor}
\maketitlehookc
@@ -12496,6 +12759,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\def\@makefnmark{\textsuperscript{\thefootnote}}
% \end{macrocode}
+%
% \begin{center}
% \begin{minipage}{.7\linewidth}
% \cs{thefootnote} \goesto\ \cs{nameuse}\{arabic\}\{footnote\}, or
@@ -12583,19 +12847,19 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macro}{\@maketitle} Typesets the title, etc. for \HTML:
% \begin{macrocode}
\DeclareDocumentCommand{\@maketitle}{}{%
- \maketitlehooka
- \ifcsempty{@published}
- {}
- {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
- {\@bspretitle \@title \@bsposttitle}
- \ifcsempty{@subtitle}
- {}
- {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
- \maketitlehookb
- {\@bspreauthor \@author \@bspostauthor}
- \maketitlehookc
- {\@bspredate \@date \@bspostdate}
- \maketitlehookd
+ \maketitlehooka
+ \ifcsempty{@published}
+ {}
+ {{\@bsprepublished \@published \@bspostpublished}\maketitlehookaa}
+ {\@bspretitle \@title \@bsposttitle}
+ \ifcsempty{@subtitle}
+ {}
+ {\maketitlehookaaa{\@bspresubtitle \@subtitle \@bspostsubtitle}}
+ \maketitlehookb
+ {\@bspreauthor \@author \@bspostauthor}
+ \maketitlehookc
+ {\@bspredate \@date \@bspostdate}
+ \maketitlehookd
}
% \end{macrocode}
% \end{macro}
@@ -12862,17 +13126,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% as loading the MathJax script.
% \begin{macrocode}
\ifbool{LWR@verbtags}{%
-\LWR@htmltag{pre class="#2"
-\ifthenelse{\equal{#1}{}}{}{style="#1"}%
+ \LWR@htmltag{pre class="#2"
+ \ifthenelse{\equal{#1}{}}{}{style="#1"}%
}% pre
}{}%
% \end{macrocode}
% Use a mono-spaced font to preserve horizontal positioning.
% If horizontal alignment is important for the user, use a mono-spaced font
% in the \CSS\ for the |verse| class.
+%
+% Also turn off \pkg{babel-french} extra space before punctuation:
% \begin{macrocode}
\begingroup%
\LWR@origttfamily%
+\LWR@FBcancel%
% \end{macrocode}
% Do not produce \HTML\ tags for \cs{hspace} inside a verse |par|.
% Restore plain \LaTeX{} \cs{hspace} functionality:
@@ -13322,13 +13589,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\booltrue{LWR@intabularmetadata}%
\ifbool{LWR@exitingtabular}{}%
{% not exiting tabular
-\ifbool{LWR@skippingmrowcell}{}%
-{% not skippingmrowcell
+ \ifbool{LWR@skippingmrowcell}{}%
+ {% not skippingmrowcell
% \end{macrocode}
% Insert any |<| then any |@| and |!| column contents:
% \begin{macrocode}
-\unskip%
-\LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}%
+ \unskip%
+ \LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}%
% % \LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}%
% \LWR@printatbang{at}{\theLWR@tablecolspos}%
% % \LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}%
@@ -13336,22 +13603,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% Close paragraphs:
% \begin{macrocode}
-\ifbool{LWR@tableparcell}{\LWR@stoppars}{}%
-\global\boolfalse{LWR@tableparcell}%
+ \ifbool{LWR@tableparcell}{\LWR@stoppars}{}%
+ \global\boolfalse{LWR@tableparcell}%
% \end{macrocode}
% Close the table data cell.
% Skip the |@| and |!| cells if are closing a multicolumn cell.
% \begin{macrocode}
-\leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline%
-\ifbool{LWR@skipatbang}%
-{\boolfalse{LWR@skipatbang}}%
-{%
-% \LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}%
-\LWR@printatbang{at}{\theLWR@tablecolspos}%
-% \LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}%
-\LWR@printatbang{bang}{\theLWR@tablecolspos}%
-}% not skipping at or bang
-}% not skipping mrowcell
+ \leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline%
+ \ifbool{LWR@skipatbang}%
+ {\boolfalse{LWR@skipatbang}}%
+ {%
+ \LWR@printatbang{at}{\theLWR@tablecolspos}%
+ \LWR@printatbang{bang}{\theLWR@tablecolspos}%
+ }% not skipping at or bang
+ }% not skipping mrowcell
}% not exiting tabular
\global\boolfalse{LWR@skippingmrowcell}%
}
@@ -13445,16 +13710,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% If not skipping a multirow cell, close the current data cell.
% \begin{macrocode}
-\unskip%
-\LWR@closetabledatacell%
+ \unskip%
+ \LWR@closetabledatacell%
% \end{macrocode}
% Move to the next column.
% \begin{macrocode}
-\addtocounter{LWR@tablecolspos}{1}%
+ \addtocounter{LWR@tablecolspos}{1}%
% \end{macrocode}
% Look at the next token to decide multi or single column data tag.
% \begin{macrocode}
-\LWR@getmynexttoken%
+ \LWR@getmynexttoken%
}%
% \end{macrocode}
% If not inside a tabular, performs the original action:
@@ -13629,16 +13894,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{have now read the next token}%
\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}
{% left edge of the table:
-\LWR@traceinfo{at the left edge}%
-\LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@colparameter}%
-\LWR@traceinfo{at the left edge: %
- \LWR@getexparray{LWR@colatspec}{leftedge}}%
+ \LWR@traceinfo{at the left edge}%
+ \LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@colparameter}%
+ \LWR@traceinfo{at the left edge: %
+ \LWR@getexparray{LWR@colatspec}{leftedge}}%
}%
{% not at the left edge:
-\LWR@traceinfo{not at the left edge}%
-\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@colparameter}%
-\LWR@traceinfo{at \theLWR@tabletotalcols: %
- \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols}}%
+ \LWR@traceinfo{not at the left edge}%
+ \LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@colparameter}%
+ \LWR@traceinfo{at \theLWR@tabletotalcols: %
+ \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols}}%
}%
\let\LWR@colparameter\relax%
\booltrue{LWR@validtablecol}%
@@ -13672,13 +13937,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{have now read the next token}%
\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}
{% left edge of the table:
-\LWR@traceinfo{at the left edge}%
-\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}%
+ \LWR@traceinfo{at the left edge}%
+ \LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}%
}%
{% not at the left edge:
-\LWR@traceinfo{not at the left edge}%
-\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@colparameter}%
-\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colparameter!}%
+ \LWR@traceinfo{not at the left edge}%
+ \LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@colparameter}%
+ \LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colparameter!}%
}%
\let\LWR@colparameter\relax%
\booltrue{LWR@validtablecol}%
@@ -14011,8 +14276,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% If this column was an invalid column type, convert it to an |l| column:
% \begin{macrocode}
\ifbool{LWR@validtablecol}{}{%
-\LWR@traceinfo{invalid column type: \LWR@strresult}%
-\LWR@parsenormalcolumn{l}%
+ \LWR@traceinfo{invalid column type: \LWR@strresult}%
+ \LWR@parsenormalcolumn{l}%
}%
\addtocounter{LWR@tablecolspos}{1}%
}%
@@ -14037,18 +14302,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% Remember that now have started the row:
% \begin{macrocode}
-\global\booltrue{LWR@startedrow}%
+ \global\booltrue{LWR@startedrow}%
% \end{macrocode}
% Create the row tag, with a class if necessary.
% \begin{macrocode}
-\global\booltrue{LWR@intabularmetadata}%
-\ifbool{LWR@doinghline}%
-{\LWR@htmltag{tr class="hline"{}}\LWR@orignewline}%
-{% not doing hline
-\ifbool{LWR@doingtbrule}%
-{\LWR@htmltag{tr class="tbrule"{}}\LWR@orignewline}%
-{\LWR@htmltag{tr}\LWR@orignewline}%
-}% end of not doing hline
+ \global\booltrue{LWR@intabularmetadata}%
+ \ifbool{LWR@doinghline}%
+ {\LWR@htmltag{tr class="hline"{}}\LWR@orignewline}%
+ {% not doing hline
+ \ifbool{LWR@doingtbrule}%
+ {\LWR@htmltag{tr class="tbrule"{}}\LWR@orignewline}%
+ {\LWR@htmltag{tr}\LWR@orignewline}%
+ }% end of not doing hline
}% end of not started the row
}
% \end{macrocode}
@@ -14066,11 +14331,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \ifthenelse{\isempty{\LWR@atbangspec}}%
{}%
{%
-\LWR@htmltag{td class="td#1%
-\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
-"}%
-\LWR@atbangspec%
-\LWR@htmltag{/td}\LWR@orignewline%
+ \LWR@htmltag{td class="td#1%
+ \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
+ "}%
+ \LWR@atbangspec%
+ \LWR@htmltag{/td}\LWR@orignewline%
}%
}%
% \end{macrocode}
@@ -14091,61 +14356,64 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \end{macrocode}
% Don't start a new paragraph tag if have already started one:
% \begin{macrocode}
-\ifbool{LWR@intabularmetadata}{%
+\ifbool{LWR@intabularmetadata}%
+{%
% \end{macrocode}
% If have found the end of tabular command, do not create the next data cell:
% \begin{macrocode}
-\ifbool{LWR@exitingtabular}{}%
-{% not exiting tabular
+ \ifbool{LWR@exitingtabular}{}%
+ {% not exiting tabular
% \end{macrocode}
% Print the |@| and |!| contents before first column:
% \begin{macrocode}
-\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}%
-{%
-\LWR@printatbang{at}{leftedge}%
-\LWR@printatbang{bang}{leftedge}%
-}% left edge
-{}% not left edge
+ \ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}%
+ {%
+ \LWR@printatbang{at}{leftedge}%
+ \LWR@printatbang{bang}{leftedge}%
+ }% left edge
+ {}% not left edge
% \end{macrocode}
% Fetch the current column's alignment character into |\LWR@strresult|:
% \begin{macrocode}
-\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]%
+ \StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]%
% \end{macrocode}
% print the start of a new table data cell:
% \begin{macrocode}
-\LWR@htmltag{td class="td%
+ \LWR@htmltag{td class="td%
% \end{macrocode}
% append this column's spec:
% \begin{macrocode}
-\LWR@strresult%
+ \LWR@strresult%
% \end{macrocode}
% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag:
% \begin{macrocode}
-\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
-"{}}%
+ \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}%
+ {rule}%
+ {}%
+ "{}}%
% \end{macrocode}
% If this is a p, m, b, or X column, allow paragraphs:
% \begin{macrocode}
-\ifthenelse{%
-\equal{\LWR@strresult}{p}\OR%
-\equal{\LWR@strresult}{m}\OR%
-\equal{\LWR@strresult}{b}\OR%
-\equal{\LWR@strresult}{P}\OR%
-\equal{\LWR@strresult}{M}\OR%
-\equal{\LWR@strresult}{B}\OR%
-\equal{\LWR@strresult}{X}%
-}%
-{% allow pars
-\LWR@startpars%
-\global\booltrue{LWR@tableparcell}%
-}% allow pars
-{}% no pars
+ \ifthenelse{%
+ \equal{\LWR@strresult}{p}\OR%
+ \equal{\LWR@strresult}{m}\OR%
+ \equal{\LWR@strresult}{b}\OR%
+ \equal{\LWR@strresult}{P}\OR%
+ \equal{\LWR@strresult}{M}\OR%
+ \equal{\LWR@strresult}{B}\OR%
+ \equal{\LWR@strresult}{X}%
+ }%
+ {% allow pars
+ \LWR@startpars%
+ \global\booltrue{LWR@tableparcell}%
+ }% allow pars
+ {}% no pars
% \end{macrocode}
% Print the |>| contents:
% \begin{macrocode}
-\LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}%
-\global\boolfalse{LWR@intabularmetadata}%
-}% not exiting tabular
+ \LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}%
+ \global\boolfalse{LWR@intabularmetadata}%
+ }% not exiting tabular
}{}% in tabular metadata
}%
% \end{macrocode}
@@ -14472,9 +14740,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Remember the latest name for \cs{nameref}:
% \begin{macrocode}
\IfValueTF{#2}{% optional given?
-\ifthenelse{\equal{#2}{}}% optional empty?
-{\LWR@setlatestname{#3}}% empty
-{\LWR@setlatestname{#2}}% given and non-empty
+ \ifthenelse{\equal{#2}{}}% optional empty?
+ {\LWR@setlatestname{#3}}% empty
+ {\LWR@setlatestname{#2}}% given and non-empty
}% optional given
{\LWR@setlatestname{#3}}% no optional
% \end{macrocode}
@@ -14493,9 +14761,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% Star version, show a caption but do not make a LOT entry:
% \begin{macrocode}
{% yes star
-\LWR@htmlblocktag{figcaption}%
-#3%
-\LWR@htmlblocktag{/figcaption}%
+ \LWR@htmlblocktag{figcaption}%
+ #3%
+ \LWR@htmlblocktag{/figcaption}%
}%
{% No star:
% \end{macrocode}
@@ -14503,62 +14771,62 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
%
% Don't step the counter if |\caption[]{A caption.}|
% \begin{macrocode}
-\ifbool{LWR@starredlongtable}%
-{%
-\ifthenelse{\equal{#2}{}}% TOC entry
-{}%
-{%
-\refstepcounter{\LTcaptype}%
-\protected@edef\@currentlabel{%
-\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
-}%
-}{}%
+ \ifbool{LWR@starredlongtable}%
+ {%
+ \ifthenelse{\equal{#2}{}}% TOC entry
+ {}%
+ {%
+ \refstepcounter{\LTcaptype}%
+ \protected@edef\@currentlabel{%
+ \csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+ }%
+ }{}%
% \end{macrocode}
% Create an \HTML\ caption. Afterwards, maybe make a LOT entry.
% \begin{macrocode}
-\LWR@htmlblocktag{figcaption}%
-\csuse{fnum@\LTcaptype}\CaptionSeparator#3%
-\LWR@htmlblocktag{/figcaption}%
+ \LWR@htmlblocktag{figcaption}%
+ \csuse{fnum@\LTcaptype}\CaptionSeparator#3%
+ \LWR@htmlblocktag{/figcaption}%
% \end{macrocode}
% See if an optional caption was given:
% \begin{macrocode}
-\ifthenelse{\equal{#2}{}}% TOC entry empty
+ \ifthenelse{\equal{#2}{}}% TOC entry empty
% \end{macrocode}
% if the optional caption was given, but empty, do not form a TOC entry
% \begin{macrocode}
-{}%
+ {}%
% \end{macrocode}
% If the optional caption was given, but might only be |[]|:
% \begin{macrocode}
-{% TOC entry not empty
-\IfNoValueTF{#2}% No TOC entry?
+ {% TOC entry not empty
+ \IfNoValueTF{#2}% No TOC entry?
% \end{macrocode}
% The optional caption is |[]|:
% \begin{macrocode}
-{% No TOC entry
-\addcontentsline%
-{\csuse{ext@\LTcaptype}}%
-{\LTcaptype}%
-{%
-\protect\numberline%
-{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
-{\ignorespaces #3\protect\relax}%
-}%
-}% end of No TOC entry
+ {% No TOC entry
+ \addcontentsline%
+ {\csuse{ext@\LTcaptype}}%
+ {\LTcaptype}%
+ {%
+ \protect\numberline%
+ {\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+ {\ignorespaces #3\protect\relax}%
+ }%
+ }% end of No TOC entry
% \end{macrocode}
% The optional caption has text enclosed:
% \begin{macrocode}
-{% yes TOC entry
-\addcontentsline%
-{\csuse{ext@\LTcaptype}}%
-{\LTcaptype}%
-{%
-\protect\numberline%
-{\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
-{\ignorespaces #2\protect\relax}%
-}%
-}% end of yes TOC entry
-}% end of TOC entry not empty
+ {% yes TOC entry
+ \addcontentsline%
+ {\csuse{ext@\LTcaptype}}%
+ {\LTcaptype}%
+ {%
+ \protect\numberline%
+ {\csuse{p@\LTcaptype}\csuse{the\LTcaptype}}%
+ {\ignorespaces #2\protect\relax}%
+ }%
+ }% end of yes TOC entry
+ }% end of TOC entry not empty
}% end of no star
% \end{macrocode}
% Skip any trailing |@| or |!| columns for this cell:
@@ -14638,10 +14906,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% If at the left-most column, also skip the leftmost |@| and |!| cells:
% \begin{macrocode}
\ifthenelse{\value{LWR@tablecolspos}=1}{%
-\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}%
-\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
-\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}%
-\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
+ \edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}%
+ \ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
+ \edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}%
+ \ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
}{}%
}
% \end{macrocode}
@@ -14857,6 +15125,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% since \pkg{siunitx} might redefine tabular in the user's document.
%
% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
+% \changes{v0.36}{2017/08/16}{Fix for \protect\pkg{babel-french}.}
%
% \begin{macrocode}
\StartDefiningTabulars
@@ -14878,6 +15147,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \begin{macrocode}
\global\boolfalse{LWR@doingtbrule}%
% \end{macrocode}
+% For \pkg{babel-french}:
+% \begin{macrocode}
+\LWR@FBcancel%
+% \end{macrocode}
% Have not yet found the end of tabular command:
% \begin{macrocode}
\boolfalse{LWR@exitingtabular}%
@@ -15055,7 +15328,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% \item [\cs{ltx@label}:] \LaTeX\ \cs{label},
% (\HTML: patched by \pkg{lwarp},) later patched by \pkg{cleveref}.
% \end{description}
-% \item [Added by \pkg{cleverref}:] \hfill (print and \HTML)
+% \item [Added by \pkg{cleveref}:] \hfill (print and \HTML)
% \begin{description}
% \item [\cs{refstepcounter:}] Added: sets \cs{cref@currentlabel}.
% \item [\cs{cref@currentlabel}:] (|<type>|=|<ctr>| unless an alias is used):
@@ -15242,21 +15515,21 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% If not doing a lateximage, create an \HTML\ ID tag:
% (To be factored\dots)
% \begin{macrocode}
-\ifbool{LWR@doingstartpars}%
-{% pars allowed
-\ifbool{LWR@doingapar}
-{% par started
-\LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
-}% par started
-{% par not started
-\LWR@stoppars%
-\LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
-\LWR@startpars%
-}% par not started
-}% pars allowed
-{% pars not allowed
-\LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
-}% pars not allowed
+ \ifbool{LWR@doingstartpars}%
+ {% pars allowed
+ \ifbool{LWR@doingapar}
+ {% par started
+ \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ }% par started
+ {% par not started
+ \LWR@stoppars%
+ \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ \LWR@startpars%
+ }% par not started
+ }% pars allowed
+ {% pars not allowed
+ \LWR@htmltag{a id="#1"{}}\LWR@htmltag{/a}%
+ }% pars not allowed
}% not lateximage
}
% \end{macrocode}
@@ -15334,24 +15607,25 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
% so create a link with an unknown destination:
% \begin{macrocode}
{%
-\LWR@traceinfo{LWR@startref D0: ??}%
-??}%
+ \LWR@traceinfo{LWR@startref D0: ??}%
+ ??%
+}%
% \end{macrocode}
% If |LWR@lateximagedepth| is known.
% Use a lateximage if the depth is greater than zero,
% or a regular link otherwise:
% \begin{macrocode}
{%
-\LWR@traceinfo{LWR@startref D1: \LWR@lidref}%
-\ifthenelse{\cnttest{\LWR@lidref}{>}{0}}%
-{%
-\LWR@traceinfo{LWR@startref D2: \LWR@lidref}%
-lateximage\LWR@lateximagenumberref{#1}%
-}%
-{%
-\LWR@traceinfo{LWR@startref D3}%
-#1%
-}%
+ \LWR@traceinfo{LWR@startref D1: \LWR@lidref}%
+ \ifthenelse{\cnttest{\LWR@lidref}{>}{0}}%
+ {%
+ \LWR@traceinfo{LWR@startref D2: \LWR@lidref}%
+ lateximage\LWR@lateximagenumberref{#1}%
+ }%
+ {%
+ \LWR@traceinfo{LWR@startref D3}%
+ #1%
+ }%
}%
\LWR@traceinfo{LWR@startref E}%
% \end{macrocode}
@@ -15903,12 +16177,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\renewcommand*{\addcontentsline}[3]{%
\ifthenelse{\equal{#1}{toc}}{}{%
-\ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{}
-\addtocontents{\@nameuse{ext@#2}}{%
-\protect\LWRsetnextfloat%
-{\arabic{LWR@latestautopage}}%
-{\arabic{LWR@thisfloat}}%
-}% addtocontents
+ \ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{}
+ \addtocontents{\@nameuse{ext@#2}}{%
+ \protect\LWRsetnextfloat%
+ {\arabic{LWR@latestautopage}}%
+ {\arabic{LWR@thisfloat}}%
+ }% addtocontents
}% not toc
\LWR@origaddcontentsline{#1}{#2}{#3}%
}
@@ -16074,22 +16348,22 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% Copy the |.toc| file to |.sidetoc| for printing the side\TOC.
% The original |.toc| file is renewed when \cs{tableofcontents} is finished.
% \begin{macrocode}
-\LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
-\LWR@printpendingfootnotes
-\LWR@origtableofcontents
+ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \LWR@printpendingfootnotes
+ \LWR@origtableofcontents
}
}
\renewcommand*{\listoffigures}{
\ifbool{FormatWordProcessor}{}{
-\LWR@printpendingfootnotes
-\LWR@origlistoffigures
+ \LWR@printpendingfootnotes
+ \LWR@origlistoffigures
}
}
\renewcommand*{\listoftables}{
\ifbool{FormatWordProcessor}{}{
-\LWR@printpendingfootnotes
-\LWR@origlistoftables
+ \LWR@printpendingfootnotes
+ \LWR@origlistoftables
}
}
% \end{macrocode}
@@ -16238,14 +16512,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% Respond to tocdepth:
% \begin{macrocode}
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
-\LWR@startpars%
+ \LWR@startpars%
% \end{macrocode}
% Create an \HTML\ link to filename\#autosec-(page), with text of the caption,
% of the given \HTML\ class.
% \begin{macrocode}
-\LWR@subhyperrefclass{%
-\LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}%
-\LWR@stoppars%
+ \LWR@subhyperrefclass{%
+ \LWR@htmlrefsectionfilename{autopage-#4}\#autosec-#4}{#3}{toc#2}%
+ \LWR@stoppars%
}
{}
}
@@ -16294,17 +16568,17 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\LWR@traceinfo{hypertocfloat depth is #1 #3depth is \arabic{#3depth}}%
\ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}{%
-\LWR@startpars%
+ \LWR@startpars%
% \end{macrocode}
% Create an \HTML\ link to
% filename\#autofloat-(float number), with text of the caption,
% of the given \HTML\ class.
% \begin{macrocode}
-\LWR@subhyperrefclass{%
-\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
-\#autofloat-\arabic{LWR@nextautofloat}}%
-{#4}{toc#2}%
-\LWR@stoppars%
+ \LWR@subhyperrefclass{%
+ \LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
+ \#autofloat-\arabic{LWR@nextautofloat}}%
+ {#4}{toc#2}%
+ \LWR@stoppars%
}{}%
}
% \end{macrocode}
@@ -16314,11 +16588,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macrocode}
\renewcommand{\l@part}[2]{\hypertoc{-1}{part}{#1}{#2}}
\DeclareDocumentCommand{\l@chapter}{m m}
- {\hypertoc{0}{chapter}{#1}{#2}}
+ {\hypertoc{0}{chapter}{#1}{#2}}
\renewcommand{\l@section}[2]{\hypertoc{1}{section}{#1}{#2}}
\renewcommand{\l@subsection}[2]{\hypertoc{2}{subsection}{#1}{#2}}
\renewcommand{\l@subsubsection}[2]
- {\hypertoc{3}{subsubsection}{#1}{#2}}
+ {\hypertoc{3}{subsubsection}{#1}{#2}}
\renewcommand{\l@paragraph}[2]{\hypertoc{4}{paragraph}{#1}{#2}}
\renewcommand{\l@subparagraph}[2]{\hypertoc{5}{subparagraph}{#1}{#2}}
\renewcommand{\l@figure}[2]{\hypertocfloat{1}{figure}{lof}{#1}{#2}}
@@ -16364,8 +16638,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% the documentclass.
% \begin{macrocode}
\@ifundefined{chapter}
- {\newcommand*{\LWR@indexsection}{\section{\indexname}}}
- {\newcommand*{\LWR@indexsection}{\chapter{\indexname}}}
+ {\newcommand*{\LWR@indexsection}{\section{\indexname}}}
+ {\newcommand*{\LWR@indexsection}{\chapter{\indexname}}}
% \end{macrocode}
% \end{macro}
@@ -16617,10 +16891,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% For SVG, print the math inside a \env{lateximage}, with an 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}%
}%
}
@@ -16725,18 +16999,18 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% Tell MathJax that the next set of equations begins with the current \LaTeX{} equation
% number, plus one.
% \begin{macrocode}
-\setcounter{LWR@nextequation}{\value{equation}}
-\addtocounter{LWR@nextequation}{1}
+ \setcounter{LWR@nextequation}{\value{equation}}
+ \addtocounter{LWR@nextequation}{1}
% \end{macrocode}
% Place the MathJax command inside ``\cs{(}'' and ``\cs{)}'' characters,
% to be printed to \HTML, not interpreted by \LaTeX.
% \begin{macrocode}
-\InlineClass{hidden}{
-\textbackslash(
-\textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
-\textbackslash)
-}
-}{}% not eq > 1
+ \InlineClass{hidden}{
+ \textbackslash(
+ \textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
+ \textbackslash)
+ }
+}{}% not eq > 0
}
% \end{macrocode}
% \end{macro}
@@ -16747,10 +17021,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\LWR@restoreorigformatting}
% While producing \SVG\ math or a \env{lateximage},
% use regular \LaTeX\ formatting instead of \HTML\ tags.
+% \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}.}
% \begin{macrocode}
\newcommand*{\LWR@restoreorigformatting}{%
+\LWR@traceinfo{LWR@restoreorigformatting}%
\LetLtxMacro{\hspace}{\LWR@orighspace}%
\LetLtxMacro\rule\LWR@origrule%
\let\,\LWR@origcomma% disable HTML short unbreakable space
@@ -16776,9 +17053,14 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\LetLtxMacro{\itshape}{\LWR@origitshape}%
\LetLtxMacro{\em}{\LWR@origem}%
\LetLtxMacro{\normalfont}{\LWR@orignormalfont}%
-\renewcommand*{\thefootnote}{\fnsymbol{footnote}}%
+\let\sp\LWR@origsp%
+\let\sb\LWR@origsb%
\let\textsuperscript\LWR@origtextsuperscript%
\let\textsubscript\LWR@origtextsubscript%
+\let\textdegree\LWR@origtextdegree%
+\let\textcelsius\LWR@origtextcelsius%
+\let\textohm\LWR@origtextohm%
+\let\textmu\LWR@origtextmu%
\let~\LWR@origtilde%
\let\enskip\LWR@origenskip%
\let\quad\LWR@origquad%
@@ -16799,13 +17081,16 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\let\reflectbox\LWR@origreflectbox%
\let\framebox\LWR@origframebox%
\let\makebox\LWR@origmakebox%
-\let\fbox\LWR@origfbox%
-\let\fboxBlock\LWR@origfbox%
-\LetLtxMacro{\fminipage}{\LWR@fminipageprint}%
-\LetLtxMacro{\endfminipage}{\endLWR@fminipageprint}%
+\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}%
+\LWR@restoreorigxcolor%
+\LWR@restoremoreorigxcolor%
+\LWR@FBcancel%
}
% \end{macrocode}
% \end{macro}
@@ -16930,11 +17215,11 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% Print commands to syncronize MathJax's equation number and format
% to the current \LaTeX\ chapter/section and equation number:
% \begin{macrocode}
-\LWR@syncmathjax
+ \LWR@syncmathjax
% \end{macrocode}
% Print the \LaTeX\ math inside an \HTML\ comment:
% \begin{macrocode}
-\LWR@hidelatexequation{equation}{\BODY}
+ \LWR@hidelatexequation{equation}{\BODY}
}
% \end{macrocode}
% SVG output:
@@ -16946,17 +17231,17 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% Begin the \env{lateximage} with an ALT tag containing the math source:
% \begin{macrocode}
-\begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
- \textbackslash{end\{equation\}}]% alt tag
+ \begin{lateximage}[(\theequation) \textbackslash{begin\{equation\}}%
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}}%
+ \textbackslash{end\{equation\}}]% alt tag
% \end{macrocode}
% Create the actual \LaTeX-formatted equation inside
% the |lateximage| using the contents of the environment.
% \begin{macrocode}
-\LWR@origequation
-\BODY% contents collected by NewEnviron
-\LWR@origendequation
-\end{lateximage}%
+ \LWR@origequation
+ \BODY% contents collected by NewEnviron
+ \LWR@origendequation
+ \end{lateximage}%
}
% \end{macrocode}
@@ -17004,12 +17289,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% The combined \LaTeX\ \& \HTML\ label is printed in a \cs{text} field:
% \begin{macrocode}
-\text{
+ \text{
% \end{macrocode}
% Shift the label over to the right side of the environment to avoid
% over-printing the math:
% \begin{macrocode}
-\ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}
+ \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}
% \end{macrocode}
% Temporarily end the \HTML\ comment,
% insert the \LaTeX{} \& \HTML\ label, then
@@ -17017,13 +17302,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \cs{@firstofone} is required to remove extra braces
% introduced by the \pkg{amsmath} package.)
% \begin{macrocode}
-\LWR@htmlclosecomment%
-\LWR@origltx@label{#1}%
-\LWR@htmlopencomment%
-}% text
+ \LWR@htmlclosecomment%
+ \LWR@origltx@label{#1}%
+ \LWR@htmlopencomment%
+ }% text
}% mathjax
{%
-\LWR@origltx@label{#1}%
+ \LWR@origltx@label{#1}%
}%
}
% \end{macrocode}
@@ -17113,59 +17398,61 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \HTML\ comment to trigger the correct equation number increment (if not starred),
% then are included verbatim in the output for MathJax to interpret:
% \begin{macrocode}
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\ifbool{LWR@numbereqnarray}
-{
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \ifbool{LWR@numbereqnarray}
+ {
% \end{macrocode}
%
% If numbering the equations, execute a copy inside an \HTML\ comment block:
% \begin{macrocode}
-\LWR@beginhideamsmath
-\LWR@origeqnarray
-\BODY
-\LWR@origendeqnarray
-\LWR@endhideamsmath
+ \LWR@beginhideamsmath
+ \LWR@origeqnarray
+ \BODY
+ \LWR@origendeqnarray
+ \LWR@endhideamsmath
% \end{macrocode}
%
% Then print the (sanitized) contents to the output for MathJax to interpret:
% \begin{macrocode}
-\LWR@addmathjax{eqnarray}{\BODY}
-}{% not LWR@numbereqnarray
+ \LWR@addmathjax{eqnarray}{\BODY}
+ }%
+ {% not LWR@numbereqnarray
% \end{macrocode}
%
% If not numbering equations, just create the contents for MathJax:
% \begin{macrocode}
-\LWR@addmathjax{eqnarray*}{\BODY}
-}% LWR@numbereqnarray
+ \LWR@addmathjax{eqnarray*}{\BODY}
+ }% LWR@numbereqnarray
}% mathjax
{% not mathjax
-\ifbool{LWR@numbereqnarray}
-{
+ \ifbool{LWR@numbereqnarray}
+ {
% \end{macrocode}
%
% For numbered \SVG\ equations, first create a \env{lateximage} with
% an \attribute{alt} attribute containing sanitized copy of the source code:
% \begin{macrocode}
-\begin{lateximage}[\LWR@addmathjax{eqnarray}{\BODY}]
+ \begin{lateximage}[\LWR@addmathjax{eqnarray}{\BODY}]
% \end{macrocode}
% Then create the image contents using an actual \env{eqnarray}:
% \begin{macrocode}
-\LWR@origeqnarray
-\BODY
-\LWR@origendeqnarray
-\end{lateximage}
-}{% not LWR@numbereqnarray
+ \LWR@origeqnarray
+ \BODY
+ \LWR@origendeqnarray
+ \end{lateximage}
+ }%
+ {% not LWR@numbereqnarray
% \end{macrocode}
% If not numbered, do the same, but an extra \cs{nonumber} seems to be required:
% \begin{macrocode}
-\begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]
-\LWR@origeqnarray
-\BODY
-\nonumber
-\LWR@origendeqnarray
-\end{lateximage}
-}% LWR@numbereqnarray
+ \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]
+ \LWR@origeqnarray
+ \BODY
+ \nonumber
+ \LWR@origendeqnarray
+ \end{lateximage}
+ }% LWR@numbereqnarray
}% not mathjax
% \end{macrocode}
%
@@ -17201,12 +17488,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\booltrue{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \booltrue{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17214,9 +17501,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\boolfalse{LWR@amsmultline}
-\LWR@addmathjax{multline}{\the\@envbody}
+ \LWR@endhideamsmath
+ \boolfalse{LWR@amsmultline}
+ \LWR@addmathjax{multline}{\the\@envbody}
}
{\endlateximage}
@@ -17231,12 +17518,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\booltrue{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \booltrue{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17244,9 +17531,9 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\boolfalse{LWR@amsmultline}
-\LWR@addmathjax{multline*}{\the\@envbody}
+ \LWR@endhideamsmath
+ \boolfalse{LWR@amsmultline}
+ \LWR@addmathjax{multline*}{\the\@envbody}
}
{\endlateximage}
@@ -17262,12 +17549,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17275,8 +17562,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\LWR@addmathjax{gather}{\the\@envbody}
+ \LWR@endhideamsmath
+ \LWR@addmathjax{gather}{\the\@envbody}
}
{\endlateximage}
@@ -17290,12 +17577,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17303,8 +17590,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\LWR@addmathjax{gather*}{\the\@envbody}
+ \LWR@endhideamsmath
+ \LWR@addmathjax{gather*}{\the\@envbody}
}
{\endlateximage}
@@ -17319,12 +17606,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17332,8 +17619,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\LWR@addmathjax{align}{\the\@envbody}
+ \LWR@endhideamsmath
+ \LWR@addmathjax{align}{\the\@envbody}
}
{\endlateximage}
@@ -17348,12 +17635,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17361,8 +17648,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\LWR@addmathjax{align*}{\the\@envbody}
+ \LWR@endhideamsmath
+ \LWR@addmathjax{align*}{\the\@envbody}
}
{\endlateximage}
@@ -17377,12 +17664,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17390,8 +17677,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\LWR@addmathjax{flalign}{\the\@envbody}
+ \LWR@endhideamsmath
+ \LWR@addmathjax{flalign}{\the\@envbody}
}
{\endlateximage}
@@ -17406,12 +17693,12 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@syncmathjax
-\boolfalse{LWR@amsmultline}
-\LWR@beginhideamsmath
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
}
{
-\lateximage[LWRAMSMATHBODY]
+ \lateximage[LWRAMSMATHBODY]
}
}
@@ -17419,8 +17706,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
\ifbool{mathjax}
{
-\LWR@endhideamsmath
-\LWR@addmathjax{flalign*}{\the\@envbody}
+ \LWR@endhideamsmath
+ \LWR@addmathjax{flalign*}{\the\@envbody}
}
{\endlateximage}
@@ -17536,8 +17823,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
%
% Two versions follow, depending on expansion needs.
% There may be a better way\dots
+%
+% \changes{v0.36}{2017/08/16}{Fix for \protect\pkg{babel-french}.}
+%
% \begin{macrocode}
\newcommand{\LWR@HTMLsanitize}[1]{%
+\begingroup%
+\LWR@FBcancel%
\protect\StrSubstitute{\detokenize{#1}}%
{\detokenize{&}}%
{\detokenize{&amp;}}[\LWR@strresult]%
@@ -17554,6 +17846,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
{\#}%
[\LWR@strresult]%
\LWR@strresult%
+\endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -17561,8 +17854,13 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \begin{macro}{\LWR@HTMLsanitizeexpand} \marg{text}
%
% This version expands the argument before sanitizing it.
+%
+% \changes{v0.36}{2017/08/16}{Fix for \protect\pkg{babel-french}.}
+%
% \begin{macrocode}
\newcommand{\LWR@HTMLsanitizeexpand}[1]{%
+\begingroup%
+\LWR@FBcancel%
\protect\StrSubstitute{\detokenize\expandafter{#1}}%
{\detokenize{&}}%
{\detokenize{&amp;}}%
@@ -17576,6 +17874,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
{\detokenize{&gt;}}%
[\LWR@strresult]%
\LWR@strresult%
+\endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -17592,18 +17891,21 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \changes{v0.34}{2017/07/29}{Fix: \env{lateximage} with
% \env{minipage}, \cs{parbox}, \cs{makebox}, \cs{fbox}, \cs{framebox},
% \cs{raisebox}, \cs{scalebox}, \cs{reflectbox}.}
+% \changes{v0.36}{2017/08/16}{Footnotes appear in regular text instead of
+% the \protect\env{lateximage} \protect\env{minipage}.}
%
% \begin{macrocode}
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{O{image}}{%
+\NewDocumentEnvironment{lateximage}{O{image}}
+{%
\LWR@traceinfo{lateximage: starting on page \arabic{page}}%
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
% \end{macrocode}
% If nesting inside an already-existing lateximage, simply record one more level:
% \begin{macrocode}
{%
-\addtocounter{LWR@lateximagedepth}{1}%
+ \addtocounter{LWR@lateximagedepth}{1}%
}%
% \end{macrocode}
% Otherwise, this is the outer-most lateximage:
@@ -17612,139 +17914,158 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}%
% \end{macrocode}
% Starting a new lateximage:
% \begin{macrocode}
-\addtocounter{LWR@lateximagenumber}{1}%
-\LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}%
+ \addtocounter{LWR@lateximagenumber}{1}%
+ \LWR@traceinfo{lateximage: LWR@lateximagenumber is \arabic{LWR@lateximagenumber}}%
% \end{macrocode}
% While inside a lateximage, locally do not use mathjax:
% \begin{macrocode}
-\boolfalse{mathjax}
+ \boolfalse{mathjax}
% \end{macrocode}
% Be sure that are doing a paragraph:
% \begin{macrocode}
-\LWR@ensuredoingapar%
+ \LWR@ensuredoingapar%
% \end{macrocode}
% Next file:
% \begin{macrocode}
-\addtocounter{LWR@externalfilecnt}{1}%
-\LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}%
+ \addtocounter{LWR@externalfilecnt}{1}%
+ \LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}%
% \end{macrocode}
% Figure out what the next page number will be:
% \begin{macrocode}
-\setcounterpageref{LWR@LIpage}{LWRlateximage\theLWR@lateximagenumber}%
-\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
+ \setcounterpageref{LWR@LIpage}{LWRlateximage\theLWR@lateximagenumber}%
+ \LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
% \end{macrocode}
% Create an \HTML\ span which will hold the comment which contains the |pdftotext| translation
% of the image's page, and also will hold the link to the |.svg| file:
% \begin{macrocode}
-\LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
-class="lateximagesource"{}} \LWR@orignewline
+ \LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
+ class="lateximagesource"{}} \LWR@orignewline
% \end{macrocode}
% Write instructions to the |lateximages.txt| file:
% \begin{macrocode}
-\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
-\immediate\write\LWR@file{|\theLWR@LIpage|\theLWR@externalfilecnt|}%
+ \LWR@traceinfo{lateximage: about to write to lateximages.txt}%
+ \immediate\write\LWR@file{|\theLWR@LIpage|\theLWR@externalfilecnt|}%
% \end{macrocode}
% Place an open comment tag at the bottom of page; footnotes will be above this tag.
% This will hide any traces of the lateximage \PDF\ page which were picked up by
% |pdftotext|.
% \begin{macrocode}
-\LWR@traceinfo{lateximage: about to create open comment}%
-\LWR@htmlopencomment%
+ \LWR@traceinfo{lateximage: about to create open comment}%
+ \LWR@htmlopencomment%
% \end{macrocode}
% One level deeper:
% \begin{macrocode}
-\addtocounter{LWR@lateximagedepth}{1}%
+ \addtocounter{LWR@lateximagedepth}{1}%
% \end{macrocode}
% Start the new \PDF\ page:
% \begin{macrocode}
-\LWR@traceinfo{lateximage: about to create new page}%
-\LWR@orignewpage%
+ \LWR@traceinfo{lateximage: about to create new page}%
+ \LWR@orignewpage%
% \end{macrocode}
% Typeset the image in a ``standard'' width page and font size:
% \begin{macrocode}
-\LWR@traceinfo{lateximage: about to create minipage}%
-\LWR@origminipage{6in}%
-\csuse{LWR@orig\LateximageFontSizeName}%
+ \LWR@traceinfo{lateximage: about to create minipage}%
+ \LWR@origminipage{6in}%
+ \csuse{LWR@orig\LateximageFontSizeName}%
% \end{macrocode}
% Temporarily restore formatting to its \PDF\ definitions:
% Do not produce \HTML\ tags for \cs{hspace}, etc. inside a lateximage.
% \begin{macrocode}
-\LWR@traceinfo{lateximage: about to temporarily restore formatting}%
-\LWR@restoreorigformatting%
-\LWR@traceinfo{lateximage: about to create label}%
-\LWR@origlabel{LWRlateximage\arabic{LWR@lateximagenumber}}%
-\LWR@traceinfo{lateximage: finished creating the label}%
-\LetLtxMacro$\LWR@origdollar%
-\catcode`\$=3% math shift
-\LetLtxMacro\(\LWR@origopenparen%
-\LetLtxMacro\)\LWR@origcloseparen%
-\LetLtxMacro\[\LWR@origopenbracket%
-\LetLtxMacro\]\LWR@origclosebracket%
-\let\@ensuredmath\LWR@orig@ensuredmath%
+ \LWR@traceinfo{lateximage: about to temporarily restore formatting}%
+ \LWR@restoreorigformatting%
+% \end{macrocode}
+% Use full-page footnotes instead of minipage footnotes.
+% These become \HTML\ footnotes.
+% \begin{macrocode}
+ \def\@mpfn{footnote}%
+ \def\thempfn{\thefootnote}%
+ \let\@footnotetext\LWR@footnotetext%
+% \end{macrocode}
+% Create the |LWRlateximage<number>| label:
+% \begin{macrocode}
+ \LWR@traceinfo{lateximage: about to create label}%
+ \LWR@origlabel{LWRlateximage\arabic{LWR@lateximagenumber}}%
+ \LWR@traceinfo{lateximage: finished creating the label}%
+% \end{macrocode}
+% Enable print-mode math functions:
+% \begin{macrocode}
+ \LetLtxMacro$\LWR@origdollar%
+ \catcode`\$=3% math shift
+ \LetLtxMacro\(\LWR@origopenparen%
+ \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:
+%
+% \begin{macrocode}
{% start of \end{lateximage}
\LWR@traceinfo{lateximage: starting end of environment}%
+% \end{macrocode}
+% Nested more than one deep?
+% \begin{macrocode}
\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{1}}%
% \end{macrocode}
% If nesting inside an already-existing lateximage, simply record one more level:
% \begin{macrocode}
-{%
-\addtocounter{LWR@lateximagedepth}{-1}%
-}%
+{\addtocounter{LWR@lateximagedepth}{-1}}%
% \end{macrocode}
-% if this is the outer-most lateximage:
+% If this is the outer-most lateximage:
% \begin{macrocode}
{% end of outer-most lateximage
% \end{macrocode}
% Finish the lateximage minipage and start a new \PDF\ page:
% \begin{macrocode}
-\LWR@origendminipage%
-\LWR@orignewpage%
-\LWR@origscriptsize%
+ \LWR@origendminipage%
+ \LWR@orignewpage%
+ \LWR@origscriptsize%
% \end{macrocode}
% Close the \HTML\ comment which encapsulated any traces of the lateximage picked up by |pdftotext|:
% \begin{macrocode}
-\LWR@htmlclosecomment{}\LWR@orignewline%
-\LWR@traceinfo{lateximage: The page after the image is \arabic{page}}%
+ \LWR@htmlclosecomment{}\LWR@orignewline%
+ \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}{}%
-}%
+ \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}
-\LWR@ensuredoingapar%
+ \LWR@ensuredoingapar%
% \end{macrocode}
% Close the \HTML\ span which has the |pdftotext| comment and also the link to the |.svg| image:
% \begin{macrocode}
-\LWR@htmltag{/span}%
-\ifbool{HTMLDebugComments}{%
-\LWR@htmlcomment{End of lateximage}%
-}{}%
+ \LWR@htmltag{/span}%
+ \ifbool{HTMLDebugComments}{%
+ \LWR@htmlcomment{End of lateximage}%
+ }{}%
% \LWR@orignewline% Removed to prevent extra space.
% \end{macrocode}
% Undo one lateximage level:
% \begin{macrocode}
-\addtocounter{LWR@lateximagedepth}{-1}%
+ \addtocounter{LWR@lateximagedepth}{-1}%
}% end of outer-most lateximage
\LWR@traceinfo{lateximage: done}%
}%
@@ -17828,6 +18149,7 @@ class="lateximagesource"{}} \LWR@orignewline
%
% \limitssiunitx
%
+% \changes{v0.36}{2017/08/16}{\pkg{siunitx}: Fix for \pkg{babel-french}.}
% \codehtml
% \begin{macrocode}
@@ -17838,11 +18160,12 @@ class="lateximagesource"{}} \LWR@orignewline
% Options for siunitx:
% \begin{macrocode}
\PassOptionsToPackage{
- detect-mode=true,
- per-mode=symbol, % fraction is not seen by pdftotext
- text-celsius = {\HTMLentity{deg}C},
- text-degree = {\HTMLentity{deg}},
+ detect-mode=true,
+ per-mode=symbol, % fraction is not seen by pdftotext
+% text-celsius = {\protect\LWRsiunitx@degree{}C},
+% text-degree = {\protect\LWRsiunitx@degree},
}{siunitx}
+
% \end{macrocode}
% \begin{macrocode}
@@ -17935,23 +18258,23 @@ class="lateximagesource"{}} \LWR@orignewline
% \end{macrocode}
% Default to use the converted fixed length given:
% \begin{macrocode}
-\uselengthunit{PT}%
-\renewcommand*{\LWR@igwidthstyle}{width:\rndprintlength{\LWR@igwidth}}%
+ \uselengthunit{PT}%
+ \renewcommand*{\LWR@igwidthstyle}{width:\rndprintlength{\LWR@igwidth}}%
% \end{macrocode}
% If ex or em dimensions were given, use those instead:
% \begin{macrocode}
-\IfEndWith{#1}{ex}%
-{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes ex
-{}% not ex
-\IfEndWith{#1}{em}%
-{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes em
-{}% not em
-\IfEndWith{#1}{\%}%
-{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes percent
-{}% not percent
-\IfEndWith{#1}{px}%
-{\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes px
-{}% not px
+ \IfEndWith{#1}{ex}%
+ {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes ex
+ {}% not ex
+ \IfEndWith{#1}{em}%
+ {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes em
+ {}% not em
+ \IfEndWith{#1}{\%}%
+ {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes percent
+ {}% not percent
+ \IfEndWith{#1}{px}%
+ {\renewcommand*{\LWR@igwidthstyle}{width:#1}}% yes px
+ {}% not px
}{}% end of length > 0pt
}
% \end{macrocode}
@@ -17965,25 +18288,25 @@ class="lateximagesource"{}} \LWR@orignewline
% \end{macrocode}
% Default to use the converted fixed length given:
% \begin{macrocode}
-\uselengthunit{PT}%
-\renewcommand*{\LWR@igheightstyle}{%
-height:\rndprintlength{\LWR@igheight} %
-}%
+ \uselengthunit{PT}%
+ \renewcommand*{\LWR@igheightstyle}{%
+ height:\rndprintlength{\LWR@igheight} %
+ }%
% \end{macrocode}
% If ex or em dimensions were given, use those instead:
% \begin{macrocode}
-\IfEndWith{#1}{ex}%
-{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes ex
-{}% not ex
-\IfEndWith{#1}{em}%
-{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes em
-{}% not em
-\IfEndWith{#1}{\%}%
-{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes percent
-{}% not percent
-\IfEndWith{#1}{px}%
-{\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes px
-{}% not px
+ \IfEndWith{#1}{ex}%
+ {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes ex
+ {}% not ex
+ \IfEndWith{#1}{em}%
+ {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes em
+ {}% not em
+ \IfEndWith{#1}{\%}%
+ {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes percent
+ {}% not percent
+ \IfEndWith{#1}{px}%
+ {\renewcommand*{\LWR@igheightstyle}{height:#1}}% yes px
+ {}% not px
}{}% end of length > 0pt
}
% \end{macrocode}
@@ -18080,6 +18403,11 @@ height:\rndprintlength{\LWR@igheight} %
\boolfalse{LWR@infloatrow}
% \end{macrocode}
+% \cs{LWR@opacity} may be set by the \pkg{transparent} package.
+% For \HTML\ it is only used for \cs{includegraphics}.
+% \begin{macrocode}
+\def\LWR@opacity{1}
+% \end{macrocode}
% \begin{macrocode}
@@ -18115,14 +18443,15 @@ height:\rndprintlength{\LWR@igheight} %
% Temporarily compute |\linewidth|, |\textwidth|, |\textheight| arguments with a 6x9 inch size
% until the next |\endgroup|.
% \begin{macrocode}
-\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
-\ifbool{LWR@infloatrow}%
-{}
-{% not in a minipage or a floatrow:
-\setlength{\linewidth}{6in}%
-\setlength{\textwidth}{6in}%
-\setlength{\textheight}{9in}%
-}%
+\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}%
+{%
+ \ifbool{LWR@infloatrow}%
+ {}
+ {% not in a minipage or a floatrow:
+ \setlength{\linewidth}{6in}%
+ \setlength{\textwidth}{6in}%
+ \setlength{\textheight}{9in}%
+ }%
}{}%
% \end{macrocode}
% See if can find the image by adding an extension:
@@ -18206,12 +18535,12 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% Only include a style tag if a width, height, angle, or scale was given:
% \begin{macrocode}
\ifthenelse{
- \NOT\equal{\LWR@igwidthstyle}{} \OR
- \NOT\equal{\LWR@igheightstyle}{} \OR
- \NOT\equal{\LWR@igorigin}{} \OR
- \NOT\equal{\LWR@igangle}{} \OR
- \NOT\equal{\LWR@igxscale}{1} \OR
- \NOT\equal{\LWR@igyscale}{1}
+ \NOT\equal{\LWR@igwidthstyle}{} \OR
+ \NOT\equal{\LWR@igheightstyle}{} \OR
+ \NOT\equal{\LWR@igorigin}{} \OR
+ \NOT\equal{\LWR@igangle}{} \OR
+ \NOT\equal{\LWR@igxscale}{1} \OR
+ \NOT\equal{\LWR@igyscale}{1}
}%
{\LWR@origtilde{} style="%
\ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}%
@@ -18231,6 +18560,11 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
{\LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale}%
\LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale}%
\LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}}{}%
+%
+\ifthenelse{\NOT\equal{\LWR@opacity}{1}}%
+{opacity:\LWR@opacity;}%
+{}%
+%
" \LWR@orignewline}{}%
% \end{macrocode}
% Set the class:
@@ -18461,6 +18795,236 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \end{macrocode}
+% \section{Xcolor defaults}
+%
+% The following are used when \pkg{xcolor} is not loaded:
+
+% \subsection{Defaults without \protect\pkg{xcolor}}
+% \label{sec:xcolordefaults}
+%
+% \codeall
+%
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+
+% The following is used if \pkg{xcolor} is not loaded, and is
+% replaced when \pkg{lwarp-xcolor} is loaded.
+%
+% If \pkg{xcolor} is not loaded, there is no \pkg{xcolor} formatting to restore:
+% \begin{macrocode}
+\newcommand*{\LWR@restoreorigxcolor}{}
+\newcommand*{\LWR@restoremoreorigxcolor}{}
+% \end{macrocode}
+
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+% \subsection{\protect\pkg{xcolor} print-mode additions}
+% \label{sec:xcolorpatches}
+%
+% 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}.
+% They are defined \cs{AtBeginDocument} so that the \pkg{xcolor} originals
+% may first be saved for reuse.
+%
+% The framed versions are modified to allow a background color of |none|, in which
+% case only the frame is drawn, allowing the background page color to show.
+%
+% \codeall
+% \begin{macrocode}
+\begin{warpall}
+% \end{macrocode}
+%
+%
+% \textcolor{red}{After \pkg{xparse} may have been loaded \dots}
+% \begin{macrocode}
+\AtBeginDocument{
+% \end{macrocode}
+% \textcolor{red}{\dots\ and \emph{only} if \pkg{xcolor} was loaded:}
+% \begin{macrocode}
+\@ifpackageloaded{xcolor}{
+\LWR@traceinfo{patching xcolor}
+% \end{macrocode}
+%
+% \begin{macro}{\colorboxBlock}
+% \cs{colorboxBlock} is the same as \cs{colorbox}:
+% \begin{macrocode}
+\LetLtxMacro\colorboxBlock\colorbox
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% In \HTML\ mode, the following is done when \pkg{xcolor} is loaded.
+% Following is the print-mode action:
+% \begin{macrocode}
+\warpprintonly{
+\LetLtxMacro\LWRprint@colorboxBlock\colorbox
+\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
+\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
+}
+% \end{macrocode}
+
+% \begin{macro}{\fcolorbox}
+% \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text}
+%
+% In print mode, \cs{fcolorbox} is modified to accept a background color of |none|.
+%
+% (\cs{fcolorbox} is particular about its optional arguments, thus the
+% elaborate combinations of \cs{ifthenelse}.)
+% \begin{macrocode}
+\newsavebox{\LWR@colorminipagebox}
+
+\DeclareDocumentCommand{\LWRprint@fcolorbox}{o m o m +m}{%
+\LWR@traceinfo{LWRprint@fcolorbox #2 #4}%
+% \end{macrocode}
+% Pre-load the contents into an LR box so that they can
+% be used inside a \cs{fcolorbox}:
+% \begin{macrocode}
+\begin{lrbox}{\LWR@colorminipagebox}%
+#5%
+\end{lrbox}%
+% \end{macrocode}
+% Sort out the various optional arguments and the background color of |none|.
+% In each case, the LRbox is placed inside a \cs{fcolorbox}.
+% \begin{macrocode}
+\ifthenelse{\equal{#4}{none}}%
+{% #4 none
+ \LWR@traceinfo{background is none}%
+ {% scope the \colorlet
+ \colorlet{LWR@currentcolor}{.}%
+ \color{#2}%
+ \fbox{%
+ \color{LWR@currentcolor}%
+ \usebox{\LWR@colorminipagebox}%
+ }% fbox
+ }% colorlet
+}% #4 none
+{% #4 not none
+\LWR@traceinfo{background not none}%
+\IfValueTF{#1}%
+{%
+ \IfValueTF{#3}%
+ {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+}%
+{% no value #1
+ \IfValueTF{#3}%
+ {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+}% no value #1
+}% #4 not none
+\LWR@traceinfo{LWRprint@fcolorbox done}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fcolorboxBlock}
+% \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text}
+%
+% In print mode, \cs{fcolorboxBlock} is the same as \cs{fcolorbox}.
+% \begin{macrocode}
+\LetLtxMacro\LWRprint@fcolorboxBlock\LWRprint@fcolorbox
+% \end{macrocode}
+% \end{macro}
+
+% \begin{environment}{fcolorminipage}
+% \oarg{1:framemodel} \marg{2:framecolor} \oarg{3:boxmodel} \marg{4:boxcolor}
+% \oarg{5:align} \oarg{6:height} \oarg{7:inner-align} \marg{8:width}
+%
+% In print mode, becomes a \cs{fcolorbox} containing a \env{minipage}:
+% \begin{macrocode}
+\NewDocumentEnvironment{LWRprint@fcolorminipage}{o m o m O{c} O{} o m}
+{%
+\LWR@traceinfo{*** fcolorminipage: #2 #4 #8}%
+% \end{macrocode}
+% Pre-load the contents into an LR box so that they can
+% be used inside a \cs{fcolorbox}:
+% \begin{macrocode}
+\begin{lrbox}{\LWR@colorminipagebox}%
+% \end{macrocode}
+% If inner alignment is not given, use the outer alignment instead:
+% \begin{macrocode}
+\IfValueTF{#7}%
+{\begin{minipage}[#5][#6][#7]{#8}}%
+{\begin{minipage}[#5][#6][#5]{#8}}%
+}%
+{%
+\end{minipage}%
+\end{lrbox}%
+\LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}%
+% \end{macrocode}
+% Sort out the various optional arguments and the background color of |none|.
+% In each case, the LRbox is placed inside a \cs{fcolorbox}.
+% \begin{macrocode}
+\ifthenelse{\equal{#4}{none}}%
+{% #4 none
+ {% scope the \colorlet
+ \colorlet{LWR@currentcolor}{.}%
+ \color{#2}%
+ \fbox{%
+ \color{LWR@currentcolor}%
+ \usebox{\LWR@colorminipagebox}%
+ }% fbox
+ }% colorlet
+}% #4 none
+{% #4 not none
+ \IfValueTF{#1}%
+ {%
+ \IfValueTF{#3}%
+ {\LWRorigprint@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWRorigprint@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ }%
+ {% no value #1
+ \IfValueTF{#3}%
+ {\LWRorigprint@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWRorigprint@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ }% no value #1
+}% #4 not none
+\LWR@traceinfo{*** finished end fcolorminipage}%
+}
+% \end{macrocode}
+% \end{environment}
+
+% \begin{macro}{\LWR@restoremoreorigxcolor}
+% Used to activate print-mode additions for \pkg{xcolor}.
+% In print mode, this is used immediately following.
+% In \HTML\ mode, this is used inside a \env{lateximage}.
+% \begin{macrocode}
+\renewcommand*{\LWR@restoremoreorigxcolor}{%
+\LWR@traceinfo{LWR@restoremoreorigxcolorformatting}%
+\LetLtxMacro\colorboxBlock\LWRprint@colorboxBlock%
+\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
+\LetLtxMacro\fcolorboxBlock\LWRprint@fcolorboxBlock%
+\LetLtxMacro\fcolorminipage\LWRprint@fcolorminipage%
+\LetLtxMacro\endfcolorminipage\endLWRprint@fcolorminipage%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% If print mode, immediately activate the print-mode enhancements for \pkg{xcolor}:
+% \begin{macrocode}
+\warpprintonly{\LWR@restoremoreorigxcolor}
+
+\LWR@traceinfo{xcolor patches done}
+}{}% xcolor
+}% AtBeginDocument
+% \end{macrocode}
+%
+% \begin{macrocode}
+\end{warpall}
+% \end{macrocode}
+
+
+
+
+
+
% \section{Cleveref}
% \label{sec:cleveref}
@@ -18667,12 +19231,13 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
%
%
% \subsection{Footnote handling}
-% \label{sec:footnotesminipage}
%
% Also see \cref{sec:footnotes} for other forms of footnotes.
-%
+% Minipage footnotes are gathered in \cref{sec:footnotesminipage},
+% and then placed into the document in \cref{sec:footnotesminipageplaced}.
%
% \subsection{Minipage handling}
+% \label{sec:footnotesminipageplaced}
%
% \begin{macro}{\LWR@endminipage}
% Used to close a minipage.
@@ -18685,10 +19250,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\ifvoid\@mpfootins\else
\vskip\skip\@mpfootins
\normalcolor
- \LWR@htmldivclass{mpfootnotes}
- \LWR@origmedskip
+ \LWR@htmldivclass{mpfootnotes}
+ \LWR@origmedskip
\unvbox\@mpfootins
- \LWR@htmldivclassend{mpfootnotes}
+ \LWR@htmldivclassend{mpfootnotes}
\fi
\@minipagefalse
\color@endgroup
@@ -18788,10 +19353,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\uselengthunit{in}%
\setlength{\LWR@minipagewidth}{#4}%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
-\addtolength{\LWR@minipagewidth}{3em}% room for frames
-\setlength{\linewidth}{6in}%
-\setlength{\textwidth}{6in}%
-\setlength{\textheight}{9in}%
+ \addtolength{\LWR@minipagewidth}{3em}% room for frames
+ \setlength{\linewidth}{6in}%
+ \setlength{\textwidth}{6in}%
+ \setlength{\textheight}{9in}%
}{}%
\LWR@traceinfo{computed width is \rndprintlength{\LWR@minipagewidth}}
\addtocounter{LWR@minipagedepth}{1}%
@@ -18809,13 +19374,13 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\LWR@traceinfo{minipage: creating div class}%
\LWR@orignewpage%
\LWR@htmltag{div class="minipage" style="%
-\ifthenelse{\equal{#1}{t}}{vertical-align: bottom ; }{}%
-\ifthenelse{\equal{#1}{c}}{vertical-align: middle ; }{}%
-\ifthenelse{\equal{#1}{b}}{vertical-align: top ; }{}%
-\ifthenelse{\equal{#3}{t}}{justify-content: flex-start ; }{}%
-\ifthenelse{\equal{#3}{c}}{justify-content: center ; }{}%
-\ifthenelse{\equal{#3}{b}}{justify-content: flex-end ; }{}%
-\ifthenelse{\equal{#3}{s}}{justify-content: space-between ; }{}%
+\ifthenelse{\equal{#1}{t}}{vertical-align:bottom ; }{}%
+\ifthenelse{\equal{#1}{c}}{vertical-align:middle ; }{}%
+\ifthenelse{\equal{#1}{b}}{vertical-align:top ; }{}%
+\ifthenelse{\equal{#3}{t}}{justify-content:flex-start ; }{}%
+\ifthenelse{\equal{#3}{c}}{justify-content:center ; }{}%
+\ifthenelse{\equal{#3}{b}}{justify-content:flex-end ; }{}%
+\ifthenelse{\equal{#3}{s}}{justify-content:space-between ; }{}%
% \end{macrocode}
% Print the width and optional height styles:
% \begin{macrocode}
@@ -18824,9 +19389,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
\ifbool{LWR@minipagefullwidth}%
{\boolfalse{LWR@minipagefullwidth}}%
{%
-\ifthenelse{\lengthtest{#4}=\linewidth}%
-{}%
-{width:\rndprintlength{\LWR@minipagewidth} ; }%
+ \ifthenelse{\lengthtest{#4}=\linewidth}%
+ {}%
+ {width:\rndprintlength{\LWR@minipagewidth} ; }%
}%
\LWR@traceinfo{minipage: about to print the height}%
\IfValueTF{#2}{height:\rndprintlength{\LWR@minipageheight} ; }{}%
@@ -18879,6 +19444,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
%
% \subsection{Parbox, makebox, framebox, fbox, raisebox}
%
+% \codehtml
%
% \begin{macro}{\parbox} \oarg{pos} \oarg{height} \oarg{inner-pos} \marg{width} \marg{text}
%
@@ -18897,46 +19463,132 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
%
% \begin{macro}{\makebox} \parg(posn) \oarg{width} \oarg{pos} \marg{text}
%
-% Width and positions are ignored.
-%
% \changes{v0.34}{2017/07/31}{Fix: Handles paren arg.}
+% \changes{v0.36}{2017/08/15}{Fix: Handles width and horiz position.}
% \begin{macrocode}
\LetLtxMacro\LWR@origmakebox\makebox
\RenewDocumentCommand{\makebox}{d() o o m}{%
-\mbox{#4}
+% \end{macrocode}
+% Check for the optional width:
+% \begin{macrocode}
+\IfValueTF{#2}%
+{%
+% \end{macrocode}
+% Check for the horizontal text alignment.
+% For |s|tretched, the best \HTML\ can do is \attribute{justified} alignment.
+% \begin{macrocode}
+ {% scope
+ \def\LWR@align{center}%
+ \ifstrequal{#3}{l}{\def\LWR@align{left}}{}%
+ \ifstrequal{#3}{r}{\def\LWR@align{right}}{}%
+ \ifstrequal{#3}{s}{\def\LWR@align{justify}}{}%
+% \end{macrocode}
+% To print the \attribute{width} argument:
+% \begin{macrocode}
+ \setlength{\LWR@tempwidth}{#2}%
+% \end{macrocode}
+% \attribute{inline-block} allows \attribute{width} and
+% \attribute{text-alignment} to be used in a \element{span}.
+% \begin{macrocode}
+ \uselengthunit{PT}%
+ \InlineClass[%
+ display:inline-block ; %
+ text-align:\LWR@align\ ; %
+ width:\rndprintlength{\LWR@tempwidth}%
+ ]%
+ {makebox}%
+% \end{macrocode}
+% Without a width argument, the text is simply used inline:
+% \begin{macrocode}
+ {\mbox{#4}}%
+ }% scope
+}%
+{\mbox{#4}}%
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\framebox} \oarg{width} \oarg{pos} \marg{text}
+% \changes{v0.36}{2017/08/15}{Fix: Handles width and horiz position.}
%
-% Width and position are ignored.
% \begin{macrocode}
\LetLtxMacro\LWR@origframebox\framebox
\RenewDocumentCommand{\framebox}{o o m}{%
-\fbox{#3}
+\fbox{\makebox[#1][#2]{#3}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\LWR@forceminwidth} \marg{legth}
+%
+% Sets \cs{LWR@tempwidth} to be at least 1pt.
+% \begin{macrocode}
+\newlength{\LWR@atleastonept}
+
+\newcommand*{\LWR@forceminwidth}[1]{%
+\setlength{\LWR@atleastonept}{#1}%
+\ifthenelse{%
+ \lengthtest{\LWR@atleastonept>0pt}\AND%
+ \lengthtest{\LWR@atleastonept<1pt}%
+}%
+{\setlength{\LWR@atleastonept}{1pt}}%
+{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+% \begin{macro}{\LWR@blackborderpadding}
+% Prints the \HTML attributes for a black border and padding.
+%
+% \cs{LWR@forceminwidth} must be used first in order to set the border width.
+%
+% \begin{macrocode}
+\newcommand*{\LWR@blackborderpadding}{%
+\uselengthunit{PT}%
+border:\rndprintlength{\LWR@atleastonept} solid black ; %
+padding:\rndprintlength{\fboxsep}%
}
% \end{macrocode}
% \end{macro}
%
%
+%
% \begin{macro}{\fbox} \marg{text}
%
% Creates a framed inline span enclosing the text.
+%
+% \changes{v0.36}{2017/08/10}{Fix: Uses \cs{fboxrule} and \cs{fboxsep}.}
+%
+% Remember the print-mode version:
% \begin{macrocode}
-\let\LWR@origfbox\fbox
-
-\renewcommand{\fbox}[1]{%
-\LWR@htmltagc{span class="framebox"}%
-\begin{LWR@nestspan}%
-#1
-\LWR@htmltagc{/span}%
-\end{LWR@nestspan}%
+\let\LWRprint@fbox\fbox
+% \end{macrocode}
+%
+% Create a new \HTML\ version, but don't use it until after \pkg{xcolor}
+% may have loaded:
+% \begin{macrocode}
+\newcommand{\LWRhtml@fbox}[1]{%
+\LWR@traceinfo{HTML fbox}
+\LWR@forceminwidth{\fboxrule}%
+\InlineClass[%
+\LWR@blackborderpadding%
+]{fbox}{#1}
}
% \end{macrocode}
+% \pkg{xcolor} \cs{let}s things to \cs{fbox} when it is loaded,
+% and this must remain even for \HTML\ output while in a \env{lateximage},
+% so \cs{fbox} is not modified until \cs{AtBeginDocument}:
+% \begin{macrocode}
+\AtBeginDocument{\let\fbox\LWRhtml@fbox}
+% \end{macrocode}
% \end{macro}
%
@@ -18949,7 +19601,10 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
%
% \begin{macrocode}
\newcommand{\fboxBlock}[1]{%
-\begin{BlockClass}{framed}
+\LWR@forceminwidth{\fboxrule}%
+\begin{BlockClass}[%
+\LWR@blackborderpadding%
+]{fboxBlock}
#1
\end{BlockClass}
}
@@ -18967,10 +19622,21 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \begin{macrocode}
\NewDocumentEnvironment{fminipage}{O{t} o O{t} m}
{%
-\setlength{\LWR@tempwidth}{#4}
-\begin{BlockClass}[width:\rndprintlength{\LWR@tempwidth};]{framed}%
+\LWR@traceinfo{fminipage #1 #2 #3 #4}%
+\LWR@forceminwidth{\fboxrule}%
+\setlength{\LWR@tempwidth}{#4}%
+\IfValueTF{#2}{\setlength{\LWR@tempheight}{#2}}{}%
+\begin{BlockClass}[%
+\LWR@blackborderpadding ; %
+\uselengthunit{PT}%
+\IfValueTF{#2}{height:\rndprintlength{\LWR@tempheight} ; }{}%
+width:\rndprintlength{\LWR@tempwidth}%
+]{fminipage}%
+}
+{%
+\end{BlockClass}%
+\LWR@traceinfo{fminipage done}%
}
-{\end{BlockClass}}
% \end{macrocode}
% \end{environment}
%
@@ -18995,27 +19661,64 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \begin{macrocode}
\begin{warpall}
% \end{macrocode}
-
-% \begin{environment}{LWR@fminipageprint} \oarg{align} \oarg{height} \oarg{align} \marg{width}
+%
+%
+%
+% \env{LWRprint@fminipage} is defined inside \env{warpall}.
+% For print output, it is \cs{let} to \env{fminipage}.
+% For \HTML\ output, the \HTML\ version of \env{fminipage} is used instead,
+% but the print version is still available for use inside a \env{lateximage}.
+%
+%
+% \begin{environment}{LWRprint@fminipage}
+% \oarg{1:align} \oarg{2:height} \oarg{3:inner-align} \marg{4:width}
%
% Creates a frame around its contents.
% \begin{macrocode}
\newsavebox{\LWR@fminipagebox}
-\NewDocumentEnvironment{LWR@fminipageprint}{O{t} o O{t} m}
+\NewDocumentEnvironment{LWRprint@fminipage}{O{t} o O{t} m}
{%
+% \end{macrocode}
+% An outer minipage will be used for vertical alignment.
+% An inner minipage will be framed with \cs{fbox}.
+%
+% If the optional inner alignment is not given, use the outer instead:
+% \begin{macrocode}
+\IfValueTF{#3}%
+{\def\LWR@thisalign{#3}}
+{\def\LWR@thisalign{#1}}%
+% \end{macrocode}
+% Form the outer minipage depending on whether a height was given.
+% Make the outer minipage larger to compensate for the frame.
+% \begin{macrocode}
\IfValueTF{#2}%
-{\minipage[#1][#2][#3]{#4}}%
-{\minipage[#3]{#4}}%
+{\minipage[#1][#2+2\fboxsep+2\fboxrule][\LWR@thisalign]{#4+2\fboxsep+2\fboxrule}}%
+{\minipage[#1]{#4+2\fboxsep+2\fboxrule}}%
+% \end{macrocode}
+% Capture the contents of the environment:
+% \begin{macrocode}
\begin{lrbox}{\LWR@fminipagebox}%
+% \end{macrocode}
+% Nest the contents inside an inner minipage of the desired size:
+% \begin{macrocode}
\IfValueTF{#2}%
-{\minipage[#1][#2][#3]{\linewidth-2\fboxsep-2\fboxrule}}%
-{\minipage[#3]{\linewidth-2\fboxsep-2\fboxrule}}%
+{\minipage[#1][#2][\LWR@thisalign]{#4}}%
+{\minipage[#1]{#4}}%
}
{%
+% \end{macrocode}
+% Close the inner minipage and the LR box with the contents:
+% \begin{macrocode}
\endminipage%
\end{lrbox}%
+% \end{macrocode}
+% Create a frame around the contents of the environment:
+% \begin{macrocode}
\fbox{\usebox{\LWR@fminipagebox}}%
+% \end{macrocode}
+% The entire thing is placed inside the outer minipage:
+% \begin{macrocode}
\endminipage%
}
% \end{macrocode}
@@ -19032,7 +19735,11 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \begin{macrocode}
\begin{warpprint}
% \end{macrocode}
-
+%
+%
+% For print output, the following are \cs{let} to become active.
+%
+%
% \begin{macro}{\fboxBlock} \marg{text}
%
% Creates a framed \HTML\ \element{div} around the text.
@@ -19046,8 +19753,8 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
%
% Creates a frame around its contents.
% \begin{macrocode}
-\LetLtxMacro{\fminipage}{\LWR@fminipageprint}
-\LetLtxMacro{\endfminipage}{\endLWR@fminipageprint}
+\LetLtxMacro{\fminipage}{\LWRprint@fminipage}
+\LetLtxMacro{\endfminipage}{\endLWRprint@fminipage}
% \end{macrocode}
% \end{environment}
@@ -19169,32 +19876,24 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \begin{macrocode}
-\DeclareRobustCommand{\LWR@HTMLrmfamily}[1]{}
-\DeclareRobustCommand{\LWR@HTMLsffamily}[1]{}
-\DeclareRobustCommand{\LWR@HTMLttfamily}[1]{}
-\DeclareRobustCommand{\LWR@HTMLbfseries}[1]{}
-\DeclareRobustCommand{\LWR@HTMLmdseries}[1]{}
-\DeclareRobustCommand{\LWR@HTMLupshape}[1]{}
-\DeclareRobustCommand{\LWR@HTMLslshape}[1]{}
-\DeclareRobustCommand{\LWR@HTMLscshape}[1]{}
-\DeclareRobustCommand{\LWR@HTMLitshape}[1]{}
-\DeclareRobustCommand{\LWR@HTMLem}[1]{}
-\DeclareRobustCommand{\LWR@nullrmfamily}[1]{}
-\DeclareRobustCommand{\LWR@nullsffamily}[1]{}
-\DeclareRobustCommand{\LWR@nullttfamily}[1]{}
-\DeclareRobustCommand{\LWR@nullbfseries}[1]{}
-\DeclareRobustCommand{\LWR@nullmdseries}[1]{}
-\DeclareRobustCommand{\LWR@nullupshape}[1]{}
-\DeclareRobustCommand{\LWR@nullslshape}[1]{}
-\DeclareRobustCommand{\LWR@nullscshape}[1]{}
-\DeclareRobustCommand{\LWR@nullitshape}[1]{}
+\DeclareRobustCommand{\LWR@nullrmfamily}{}
+\DeclareRobustCommand{\LWR@nullsffamily}{}
+\DeclareRobustCommand{\LWR@nullttfamily}{}
+\DeclareRobustCommand{\LWR@nullbfseries}{}
+\DeclareRobustCommand{\LWR@nullmdseries}{}
+\DeclareRobustCommand{\LWR@nullupshape}{}
+\DeclareRobustCommand{\LWR@nullslshape}{}
+\DeclareRobustCommand{\LWR@nullscshape}{}
+\DeclareRobustCommand{\LWR@nullitshape}{}
\DeclareRobustCommand{\LWR@nullem}[1]{}
+\DeclareRobustCommand{\LWR@nullnormalfont}{}
% \end{macrocode}
% \begin{macro}{\LWR@nullfonts} Removes formatting during filename operations.
% \changes{v0.34}{2017/08/05}{Improved font control.}
+% \changes{v0.36}{2017/08/15}{Fix: Filenames while using MathJax.}
% \begin{macrocode}
\newcommand*{\LWR@nullfonts}{%
\LetLtxMacro{\emph}{\LWR@nullemph}%
@@ -19228,12 +19927,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \begin{macrocode}
\renewcommand*{\&}{and}%
\renewcommand{\textsuperscript}[1]{##1}%
-% \renewcommand{\textsuperscript}[1]{##1}
\renewcommand{\textsubscript}[1]{##1}%
-% \renewcommand{\textsubscript}[1]{##1}
\RenewDocumentCommand{\LWR@htmlspanclass}{o m +m}{##3}%
\DeclareExpandableDocumentCommand{\InlineClass}{o m +m}{##3}%
-% \DeclareExpandableDocumentCommand{\InlineClass}{o m +m}{##3}%
}
% \end{macrocode}
% \end{macro}
@@ -19287,7 +19983,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\scshape}
+% \begin{macro}{\normalfont}
% \begin{macrocode}
\renewcommand*{\normalfont}{}
% \end{macrocode}
@@ -19404,7 +20100,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% ^^A \renewcommand*{\,}{\HTMLunicode{2009}} % HTML thin wrappable space
% ^^A \renewcommand*{\,}{\HTMLentity{nbsp}} % regular-width non-breakable space
% \begin{macrocode}
+
\renewcommand*{~}{\HTMLentity{nbsp}}
+
\renewcommand*{\textellipsis}{\HTMLunicode{2026}}
% \end{macrocode}
% Direct-formatting font sizes are ignored:
@@ -19503,10 +20201,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% Placed just before \cs{hspace}, \cs{quad}, or \cs{qquad}'s \HTML\ output.
% \begin{macrocode}
\newcommand*{\LWR@minipagestartpars}{%
-\ifbool{LWR@minipagethispar}%
-{%
-\LWR@startpars%
-}{}%
+\ifbool{LWR@minipagethispar}{\LWR@startpars}{}%
}
% \end{macrocode}
% \end{macro}
@@ -19515,10 +20210,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% Placed just after \cs{hspace}, \cs{quad}, or \cs{qquad}'s \HTML\ output.
% \begin{macrocode}
\newcommand*{\LWR@minipagestoppars}{%
-\ifbool{LWR@minipagethispar}%
-{%
-\LWR@stoppars%
-}{}%
+\ifbool{LWR@minipagethispar}{\LWR@stoppars}{}%
}
% \end{macrocode}
% \end{macro}
@@ -19593,30 +20285,30 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline
% If had a minipage this paragraph, try to inline the
% white space without generating paragraph tags:
% \begin{macrocode}
-\LWR@minipagestoppars%
+ \LWR@minipagestoppars%
% \end{macrocode}
% Support the \HTML\ thin wrappable space:
% \begin{macrocode}
-\ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}}
-{%
-\HTMLunicode{2009}% thin breakable space
-}%
+ \ifthenelse{\dimtest{\LWR@tempwidth}{=}{.16667em}}
+ {%
+ \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;"%
+ }%
+ \LWR@htmltagc{/span}%
+ }%
% \end{macrocode}
% If had a minipage this paragraph, try to inline the
% white space without generating paragraph tags:
% \begin{macrocode}
-\LWR@minipagestartpars%
-}%
+ \LWR@minipagestartpars%
+}% width not 0
}
% \end{macrocode}
% \end{macro}
@@ -19690,11 +20382,22 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"%
\RenewDocumentCommand{\enlargethispage}{s m}{}
% \end{macrocode}
% \end{macro}
-
-
-
-
-
+%
+%
+%
+% \begin{macro}{\LWR@currenttextcolor}
+% The color to use for text and \cs{rule}, defaulting to black:
+%
+% \changes{v0.36}{2017/08/16}{Fix for \cs{rule} when \pkg{xcolor} not loaded.}
+%
+% \begin{macrocode}
+\newcommand*{\LWR@currenttextcolor}{black}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
% \begin{macro}{\LWR@rule} \oarg{raise} \marg{width} \marg{height}
%
% Handles special minipage \& horizontal space interactions.
@@ -19719,40 +20422,44 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"%
% If it's non-zero width, set a minimal thickness so that it
% more reliably shows in the browser:
% \begin{macrocode}
-\ifthenelse{\lengthtest{\LWR@tempwidth>0pt}\AND%
-\lengthtest{\LWR@tempwidth<1pt}}%
-{\setlength{\LWR@tempwidth}{1pt}}{}%
+ \ifthenelse{%
+ \lengthtest{\LWR@tempwidth>0pt}\AND%
+ \lengthtest{\LWR@tempwidth<1pt}%
+ }%
+ {\setlength{\LWR@tempwidth}{1pt}}{}%
% \end{macrocode}
% Likewise with height:
% \begin{macrocode}
-\setlength{\LWR@tempheight}{#3}%
-\ifthenelse{\lengthtest{\LWR@tempheight>0pt}\AND%
-\lengthtest{\LWR@tempheight<1pt}}%
-{\setlength{\LWR@tempheight}{1pt}}{}%
+ \setlength{\LWR@tempheight}{#3}%
+ \ifthenelse{%
+ \lengthtest{\LWR@tempheight>0pt}\AND%
+ \lengthtest{\LWR@tempheight<1pt}%
+ }%
+ {\setlength{\LWR@tempheight}{1pt}}{}%
% \end{macrocode}
% If had a minipage this paragraph, try to inline the
% rule without generating paragraph tags:
% \begin{macrocode}
-\LWR@minipagestoppars%
+ \LWR@minipagestoppars%
% \end{macrocode}
% Print the span with the converted width and height.
% The width and height are NOT rounded, since a height of
% less than 1pt is quite common in \LaTeX\ code.
% \begin{macrocode}
-\uselengthunit{PT}%
-\LWR@htmltagc{%
-span
-style=" %
+ \uselengthunit{PT}%
+ \LWR@htmltagc{%
+ span
+ style="%
% \end{macrocode}
% The background color is used to draw the filled rule.
% The color may be changed by \cs{textcolor}.
% \begin{macrocode}
-background:\LWR@currenttextcolor; %
+ background:\LWR@currenttextcolor; %
% \end{macrocode}
% The width and height are printed, converted to PT:
% \begin{macrocode}
-width:\printlength{\LWR@tempwidth}; %
-height:\printlength{\LWR@tempheight}; %
+ width:\printlength{\LWR@tempwidth}; %
+ height:\printlength{\LWR@tempheight}; %
% \end{macrocode}
% The raise height is converted to a \CSS\ transform.
% The |*2| raise multiplier is to approximately match \HTML\ output's X height.
@@ -19762,29 +20469,29 @@ height:\printlength{\LWR@tempheight}; %
% limits the allowable syntax. To do:\ A superior method would compute a
% ratio of \LaTeX\ ex height, then print that to \HTML\ with an ex unit.
% \begin{macrocode}
-\IfValueTF{#1}%
-{%
-\setlength{\LWR@tempraise}{0pt-#1}%
-\setlength{\LWR@tempraise}{\LWR@tempraise*2}%
-\LWR@orignewline%
--ms-transform: translate(0pt,\printlength{\LWR@tempraise}); %
-\LWR@orignewline%
--webkit-transform: translate(0pt,\printlength{\LWR@tempraise}); %
-\LWR@orignewline%
-transform: translate(0pt,\printlength{\LWR@tempraise}); %
-\LWR@orignewline%
-}{}%
+ \IfValueTF{#1}%
+ {%
+ \setlength{\LWR@tempraise}{0pt-#1}%
+ \setlength{\LWR@tempraise}{\LWR@tempraise*2}%
+ \LWR@orignewline%
+ -ms-transform: translate(0pt,\printlength{\LWR@tempraise}); %
+ \LWR@orignewline%
+ -webkit-transform: translate(0pt,\printlength{\LWR@tempraise}); %
+ \LWR@orignewline%
+ transform: translate(0pt,\printlength{\LWR@tempraise}); %
+ \LWR@orignewline%
+ }{}%
% \end{macrocode}
% Display inline-block to place the span inline with the text:
% \begin{macrocode}
-display:inline-block;"%
-}%
-\LWR@htmltagc{/span}%
+ display:inline-block;"%
+ }%
+ \LWR@htmltagc{/span}%
% \end{macrocode}
% If had a minipage this paragraph, try to inline the
% white space without generating paragraph tags:
% \begin{macrocode}
-\LWR@minipagestartpars%
+ \LWR@minipagestartpars%
}% non-zero width
}
% \end{macrocode}
@@ -20111,7 +20818,7 @@ display:inline-block;"%
\put@bsintoc%
\begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
{\par\end{@bstr@ctlist}\vfil\null%\endtitlepage
- }
+ }
\else
\renewenvironment{abstract}{%
\if@bsrunin
@@ -20319,10 +21026,10 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\@ifundefined{th@#1}{%
\PackageWarning{amsthm}{Unknown theoremstyle `#1'}%
\thm@style{plain}%
- \renewcommand{\LWR@newtheoremstyle}{plain}% new
+ \renewcommand{\LWR@newtheoremstyle}{plain}% new
}{%
\thm@style{#1}%
- \renewcommand{\LWR@newtheoremstyle}{#1}% new
+ \renewcommand{\LWR@newtheoremstyle}{#1}% new
}%
}
% \end{macrocode}
@@ -20342,7 +21049,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\else % numbered theorem, need to check for optional arg
\def\@tempa{\@oparg{\@ynthm{#2}}[]}%
\fi
- \AtBeginEnvironment{#2}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#2}}}% new
+ \AtBeginEnvironment{#2}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#2}}}% new
}%
\@tempa
}
@@ -20373,7 +21080,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\LWR@forcenewpage% new
\BlockClass{amsthmbody\LWR@thisthmstyle}% new
\deferred@thm@head{
- \the\thm@headfont \thm@indent
+ \the\thm@headfont \thm@indent
\@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% new
\@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% new
\@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% new
@@ -20404,7 +21111,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\renewenvironment{proof}[1][\proofname]{\par
\LWR@forcenewpage% new
- \BlockClass{amsthmproof}% new
+ \BlockClass{amsthmproof}% new
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
@@ -20925,7 +21632,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% }
}
-\def\@makeenmark{\hbox{\textsuperscript{\normalfont\theenmark}}}
+\def\@makeenmark{\hbox{\LWR@htmlspan{sup}{\normalfont\theenmark}}}
\def\makeenmark{\@makeenmark}
% \end{macrocode}
%
@@ -21405,7 +22112,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
% \begin{macrocode}
\let\LWRFB@UseVerbatim\UseVerbatim
\renewcommand*{\UseVerbatim}[1]{%
-\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-\baselineskip}%%
+\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-.5\baselineskip}%%
\LWRFB@UseVerbatim{#1}%
\LWR@afterendverbatim%
}
@@ -21413,13 +22120,13 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"%
\let\LWRFB@LUseVerbatim\LUseVerbatim
\renewcommand*{\LUseVerbatim}[1]{%
-\LWR@atbeginverbatim{LVerbatim}\unskip\LWR@origvspace*{-\baselineskip}%%
+\LWR@atbeginverbatim{LVerbatim}%\unskip\LWR@origvspace*{-\baselineskip}%%
\LWRFB@LUseVerbatim{#1}%
\LWR@afterendverbatim%
}
\def\@BUseVerbatim[#1]#2{%
-\LWR@atbeginverbatim{BVerbatim}\unskip\LWR@origvspace*{-\baselineskip}%%
+\LWR@atbeginverbatim{BVerbatim}\unskip\LWR@origvspace*{-.5\baselineskip}%%
\LWRFB@UseVerbatim{#2}%
\LWR@afterendverbatim%
}
@@ -21714,26 +22421,26 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\ifnum#1=\z@
% \setbox\z@\hbox{\strut\enspace\FV@LabelBegin\enspace\strut}%
\ifx\FV@LabelPositionTopLine\relax
- \else
- \LWR@FVfindbordercolor
+ \else
+ \LWR@FVfindbordercolor
\LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
- \LWR@origtextrm{\FV@LabelBegin}% \textrm preserves emdash
- \LWR@htmltagc{/div}
- \fi
+ \LWR@origtextrm{\FV@LabelBegin}% \textrm preserves emdash
+ \LWR@htmltagc{/div}
+ \fi
\else
% \setbox\z@\hbox{\strut\enspace\FV@LabelEnd\enspace\strut}%
\ifx\FV@LabelPositionBottomLine\relax
- \else
- \LWR@FVfindbordercolor
+ \else
+ \LWR@FVfindbordercolor
\LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
- \LWR@origtextrm{\FV@LabelEnd}
- \LWR@htmltagc{/div}
- \fi
+ \LWR@origtextrm{\FV@LabelEnd}
+ \LWR@htmltagc{/div}
+ \fi
\fi
\fi
\hss
- }
+ }
}
% \end{macrocode}
%
@@ -21745,13 +22452,13 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \kern\leftmargin
\hbox to \VerbatimHTMLWidth {%
\ifcsvoid{FV@LeftListNumber}{}{\kern 2.5em}%
- \FV@LeftListNumber%
+ \FV@LeftListNumber%
% \FV@LeftListFrame
\FancyVerbFormatLine{#1}%
\hss%
% \FV@RightListFrame
\FV@RightListNumber%
- }%
+ }%
\hss% required to avoid underfull hboxes
}
}
@@ -22068,30 +22775,30 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \end{macrocode}
% For \pkg{subcaption}:
% \begin{macrocode}
-\ifbool{LWR@insubfloatrow}%
-{% subcaption in a subfloatrow
+ \ifbool{LWR@insubfloatrow}%
+ {% subcaption in a subfloatrow
% \end{macrocode}
% \env{subfigure} and \env{subtable} environments take width as an argument.
% \begin{macrocode}
-\IfValueTF{#3}%
-{\@nameuse{sub#2}{#3}}%
-{\@nameuse{sub#2}{\linewidth}}%
-}% subcaption in a subfloatrow
-{% subcaption not in subfloatrow
+ \IfValueTF{#3}%
+ {\@nameuse{sub#2}{#3}}%
+ {\@nameuse{sub#2}{\linewidth}}%
+ }% subcaption in a subfloatrow
+ {% subcaption not in subfloatrow
% \end{macrocode}
% \env{figure} and \env{table} environments do not take a width argument.
% \begin{macrocode}
-\@nameuse{#2}%
-}% subcaption not in subfloatrow
-#6
+ \@nameuse{#2}%
+ }% subcaption not in subfloatrow
+ #6
-#7
+ #7
% \end{macrocode}
% End the environments:
% \begin{macrocode}
-\ifbool{LWR@insubfloatrow}%
-{\@nameuse{endsub#2}}%
-{\@nameuse{end#2}}%
+ \ifbool{LWR@insubfloatrow}%
+ {\@nameuse{endsub#2}}%
+ {\@nameuse{end#2}}%
}% subcaption
{% assume subfig
% \end{macrocode}
@@ -22107,10 +22814,10 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% the caption and label, not the caption itself. Thus, \cs{caption}
% is temporarily disabled to return its own argument without braces.
% \begin{macrocode}
-\begingroup
-\let\caption\@firstofone
-\subfloat[#6]{#7}
-\endgroup
+ \begingroup
+ \let\caption\@firstofone
+ \subfloat[#6]{#7}
+ \endgroup
}% subfig in a subfloatrow
{% subfig package, but not a subfig
% \end{macrocode}
@@ -22255,16 +22962,16 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \begin{macrocode}
\ifthenelse{\equal{\LWR@frowkeywithin}{}}
{
-\LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\
- \LWR@frowkeyfileext}%
-\newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}
+ \LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\
+ \LWR@frowkeyfileext}%
+ \newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}
}%
{%
-\LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\
- \LWR@frowkeyfileext\ \LWR@frowkeywithin}%
-\newfloat{#1}{\LWR@frowkeyplacement}%
-{\LWR@frowkeyfileext}[\LWR@frowkeywithin]%
-\LWR@traceinfo{finished newfloat #1}
+ \LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\
+ \LWR@frowkeyfileext\ \LWR@frowkeywithin}%
+ \newfloat{#1}{\LWR@frowkeyplacement}%
+ {\LWR@frowkeyfileext}[\LWR@frowkeywithin]%
+ \LWR@traceinfo{finished newfloat #1}
}%
% \end{macrocode}
% Rename the float if a name was given:
@@ -22548,6 +23255,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% \pkg{footnote} is used with minor patches.
%
% \changes{v0.26}{2017/03/26}{\pkg{footnote}: Added.}
+% \changes{v0.36}{2017/08/15}{\pkg{footnote}: Extra \protect\HTML\ source space after paragraphs.}
%
% \codehtml
% \begin{macrocode}
@@ -22563,7 +23271,10 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
}
% \let\fn@endnote\color@endgroup% *** conflicts with lwarp
-\newcommand*{\fn@endnote}{\LWR@htmltagc{/\LWR@tagregularparagraph}}
+\newcommand*{\fn@endnote}{%
+\LWR@htmltagc{/\LWR@tagregularparagraph}%
+\LWR@orignewline%
+}
% \end{macrocode}
%
% Removed print-version formatting:
@@ -22579,7 +23290,8 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% Removed print-version formatting, added closing paragraph tag:
% \begin{macrocode}
\def\fn@endfntext{%
- \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@orignewline%
\fn@postfntext%
\egroup%
\begingroup%
@@ -22695,7 +23407,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\renewenvironment{leftbar}{%
\LWR@forcenewpage
- \BlockClass{framedleftbar}
+ \BlockClass{framedleftbar}
\def\FrameCommand{}%
\MakeFramed {}
}%
@@ -22736,18 +23448,18 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\LWR@forcenewpage
\begin{BlockClass}[border: 3px solid \#\LWR@tempcolor]{framed}%
\ifthenelse{\isempty{#1}}{}{% not empty
-\begin{BlockClass}[background: \#\LWR@tempcolor]{framedtitle}%
-\textcolor{TFTitleColor}{\textbf{#1}}%
-\end{BlockClass}
+ \begin{BlockClass}[background: \#\LWR@tempcolor]{framedtitle}%
+ \textcolor{TFTitleColor}{\textbf{#1}}%
+ \end{BlockClass}
}% not empty
#7
\ifthenelse{\isempty{#2}}{}{% not empty
-\convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
-\begin{BlockClass}[background: \#\LWR@tempcolor]{framedtitle}%
-\textcolor{TFTitleColor}{\textbf{#2}}%
-\end{BlockClass}
+ \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
+ \begin{BlockClass}[background: \#\LWR@tempcolor]{framedtitle}%
+ \textcolor{TFTitleColor}{\textbf{#2}}%
+ \end{BlockClass}
}% not empty
\end{BlockClass}
}
@@ -23109,7 +23821,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
% ^^A \begin{macro}{\autoref} * \marg{label}
%
-% For \HTML, \cs{cleverref} is used instead.
+% For \HTML, \cs{cleveref} is used instead.
%
% \begin{macrocode}
\NewDocumentCommand{\autoref}{s m}{%
@@ -23121,7 +23833,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
%
% ^^A \begin{macro}{\autopageref} \marg{label}
%
-% For \HTML, \cs{cleverref} is used instead.
+% For \HTML, \cs{cleveref} is used instead.
%
% \begin{macrocode}
\NewDocumentCommand{\autopageref}{s m}{%
@@ -24470,11 +25182,11 @@ border-radius: \LWR@mdfprintlength{roundcorner} ; \LWR@orignewline
% Convert and print the shadow:
% \begin{macrocode}
\ifbool{mdf@shadow}{%
-box-shadow:
-\LWR@mdfprintlength{shadowsize}
-\LWR@mdfprintlength{shadowsize}
-\LWR@mdfprintlength{shadowsize}
-\LWR@mdfprintcolor{shadowcolor} ;
+ box-shadow:
+ \LWR@mdfprintlength{shadowsize}
+ \LWR@mdfprintlength{shadowsize}
+ \LWR@mdfprintlength{shadowsize}
+ \LWR@mdfprintcolor{shadowcolor} ;
}
{box-shadow: none ;}
\LWR@orignewline
@@ -24483,11 +25195,12 @@ box-shadow:
"}
% \LWR@htmldivclass{\LWR@mdthisenv}
% \end{macrocode}
-% \env{mdframed} environment may not work with the modified \cs{hspace} and \cs{rule},
+% \env{mdframed} environment may not work with the \HTML\ versions of the following,
% so restore them to their originals while inside \env{mdframed}:
% \begin{macrocode}
\LetLtxMacro{\hspace}{\LWR@orighspace}%
\LetLtxMacro\rule\LWR@origrule%
+\LetLtxMacro\makebox\LWR@origmakebox%
}
% \end{macrocode}
% ^^A \end{macro}
@@ -24545,22 +25258,22 @@ background:
% Convert and print the title rule:
% \begin{macrocode}
\ifbool{mdf@frametitlerule}{%
-border-bottom:
-\LWR@mdfprintlength{frametitlerulewidth}
-solid
-\LWR@mdfprintcolor{frametitlerulecolor}
-; \LWR@orignewline
+ border-bottom:
+ \LWR@mdfprintlength{frametitlerulewidth}
+ solid
+ \LWR@mdfprintcolor{frametitlerulecolor}
+ ; \LWR@orignewline
}{}%
% \end{macrocode}
% The title's top border radius is adjusted for the line width:
% \begin{macrocode}
border-radius:
\setlength{\LWR@titleroundcorner}
- {\maxof{\mdf@roundcorner@length-\mdf@linewidth@length}{0pt}}
- \rndprintlength{\LWR@titleroundcorner}
- \rndprintlength{\LWR@titleroundcorner}
- 0pt 0pt
- \LWR@orignewline
+ {\maxof{\mdf@roundcorner@length-\mdf@linewidth@length}{0pt}}
+ \rndprintlength{\LWR@titleroundcorner}
+ \rndprintlength{\LWR@titleroundcorner}
+ 0pt 0pt
+ \LWR@orignewline
% \end{macrocode}
% Finish the custom style and the opening span tag:
% \begin{macrocode}
@@ -24615,21 +25328,21 @@ background:
% Convert and print the above line:
% \begin{macrocode}
\ifbool{mdf@#1titleaboveline}{%
-border-top:
-\LWR@mdfprintlength{#1titleabovelinewidth}
-solid
-\LWR@mdfprintcolor{#1titleabovelinecolor}
-; \LWR@orignewline
+ border-top:
+ \LWR@mdfprintlength{#1titleabovelinewidth}
+ solid
+ \LWR@mdfprintcolor{#1titleabovelinecolor}
+ ; \LWR@orignewline
}{}%
% \end{macrocode}
% Convert and print the below line:
% \begin{macrocode}
\ifbool{mdf@#1titlebelowline}{%
-border-bottom:
-\LWR@mdfprintlength{#1titlebelowlinewidth}
-solid
-\LWR@mdfprintcolor{#1titlebelowlinecolor}
-; \LWR@orignewline
+ border-bottom:
+ \LWR@mdfprintlength{#1titlebelowlinewidth}
+ solid
+ \LWR@mdfprintcolor{#1titlebelowlinecolor}
+ ; \LWR@orignewline
}{}%
% \end{macrocode}
% Finish the custom style and the opening span tag:
@@ -24810,8 +25523,8 @@ solid
\begin{mdframed}[#1,frametitle={\strut#4\@temptitle}]}%
{\end{mdframed}}%
}%
- \BeforeBeginEnvironment{#2}{\renewcommand*{\LWR@mdthisenv}{md#2}}% new
- \BeforeBeginEnvironment{#2*}{\renewcommand*{\LWR@mdthisenv}{md#2}}% new
+ \BeforeBeginEnvironment{#2}{\renewcommand*{\LWR@mdthisenv}{md#2}}% new
+ \BeforeBeginEnvironment{#2*}{\renewcommand*{\LWR@mdthisenv}{md#2}}% new
}%
}
% \end{macrocode}
@@ -25464,11 +26177,11 @@ solid
{Unknown theoremstyle `#1'. Using `plain'}%
\theorem@style{plain}
\renewcommand{\LWR@newtheoremstyle}{plain}% new
- }%
+ }%
{
- \theorem@style{#1}
+ \theorem@style{#1}
\renewcommand{\LWR@newtheoremstyle}{#1}% new
- }
+ }
}
% \end{macrocode}
@@ -25488,7 +26201,7 @@ solid
\expandafter\gdef\csname mkheader@#1\endcsname
{\csname setparms@#1\endcsname
\@thm{#1}{#1}{#2}
- }%
+ }%
\global\@namedef{end#1}{\@endtheorem}
\AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% new
\fi
@@ -25504,7 +26217,7 @@ solid
\expandafter\gdef\csname mkheader@#1\endcsname
{\csname setparms@#1\endcsname
\@thm{#1}{#1}{#2}
- }%
+ }%
\global\@namedef{end#1}{\@endtheorem}
\AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% new
\fi
@@ -25525,7 +26238,7 @@ solid
\expandafter\gdef\csname mkheader@#1\endcsname
{\csname setparms@#1\endcsname
\@thm{#1}{#2}{#3}
- }%
+ }%
\global\@namedef{end#1}{\@endtheorem}
\AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% new
\fi}
@@ -25576,139 +26289,139 @@ solid
\renewtheoremstyle{plain}%
{\item[\hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
+ \InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
{\item[\hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
+ \InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
\renewtheoremstyle{break}%
{\item[
% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderbreak}{##1\ ##2\theorem@separator}\newline
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderbreak}{##1\ ##2\theorem@separator}\newline
% }\hbox{\strut}}}
- ]}%
+ ]}%
{\item[
% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderbreak}{##1\ ##2\ (##3)\theorem@separator}\newline
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderbreak}{##1\ ##2\ (##3)\theorem@separator}\newline
% }\hbox{\strut}}}
- ]}
+ ]}
\renewtheoremstyle{change}%
{\item[\hskip\labelsep
- \theorem@headerfont
- \InlineClass{theoremheaderchange}{##2\ ##1\theorem@separator}]}%
+ \theorem@headerfont
+ \InlineClass{theoremheaderchange}{##2\ ##1\theorem@separator}]}%
{\item[\hskip\labelsep
- \theorem@headerfont
- \InlineClass{theoremheaderchange}{##2\ ##1\ (##3)\theorem@separator}]}
+ \theorem@headerfont
+ \InlineClass{theoremheaderchange}{##2\ ##1\ (##3)\theorem@separator}]}
\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}}}
- ]}
+ ]}
\renewtheoremstyle{margin}%
{\item[\hskip\labelsep\theorem@headerfont
- \InlineClass{theoremheadermargin}{##2 \qquad ##1\theorem@separator}
- ]}%
+ \InlineClass{theoremheadermargin}{##2 \qquad ##1\theorem@separator}
+ ]}%
{\item[\hskip\labelsep\theorem@headerfont
- \InlineClass{theoremheadermargin}{##2 \qquad ##1\ (##3)\theorem@separator}
- ]}
+ \InlineClass{theoremheadermargin}{##2 \qquad ##1\ (##3)\theorem@separator}
+ ]}
\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}%
{\item[\theorem@headerfont\hskip\labelsep
- \InlineClass{theoremheaderplain}{##1\theorem@separator}]}%
+ \InlineClass{theoremheaderplain}{##1\theorem@separator}]}%
{\item[\theorem@headerfont\hskip \labelsep
- \InlineClass{theoremheaderplain}{##1\ (##3)\theorem@separator}]}
+ \InlineClass{theoremheaderplain}{##1\ (##3)\theorem@separator}]}
\renewtheoremstyle{nonumberbreak}%
{\item[
% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderbreak}{##1\theorem@separator}\newline
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderbreak}{##1\theorem@separator}\newline
% }\hbox{\strut}}}
- ]}%
+ ]}%
{\item[
% \rlap{\vbox{\hbox{
- \hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderbreak}{##1\ (##3)\theorem@separator}\newline
+ \hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderbreak}{##1\ (##3)\theorem@separator}\newline
% }\hbox{\strut}}}
- ]}
+ ]}
\renewtheoremstyle{empty}%
{\item[]}%
{\item[\theorem@headerfont \hskip\labelsep\relax
- \InlineClass{theoremheaderplain}{##3}]}
+ \InlineClass{theoremheaderplain}{##3}]}
\renewtheoremstyle{emptybreak}%
{\item[]}%
{\item[\theorem@headerfont \hskip\labelsep\relax
- \InlineClass{theoremheaderplain}{##3}] \ \newline}
+ \InlineClass{theoremheaderplain}{##3}] \ \newline}
% \end{macrocode}
%
% The following manually adjust the \CSS\ for the standard configuration
% objects which are not a purely plain style:
% \begin{macrocode}
-\ifbool{LWR@ntheoremamsthm}{}{
+\ifbool{LWR@ntheoremamsthm}{}{%
% upright text via CSS
-\newtheoremstyle{plainupright}%
- {\item[\hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
- {\item[\hskip\labelsep \theorem@headerfont
- \InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
+ \newtheoremstyle{plainupright}%
+ {\item[\hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderplain}{##1\ ##2\theorem@separator}]}%
+ {\item[\hskip\labelsep \theorem@headerfont
+ \InlineClass{theoremheaderplain}{##1\ ##2\ (##3)\theorem@separator}]}
% upright text and small caps header via CSS
-\newtheoremstyle{nonumberplainuprightsc}%
- {\item[\theorem@headerfont\hskip\labelsep
- \InlineClass{theoremheadersc}{##1\theorem@separator}]}%
- {\item[\theorem@headerfont\hskip \labelsep
- \InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]}
+ \newtheoremstyle{nonumberplainuprightsc}%
+ {\item[\theorem@headerfont\hskip\labelsep
+ \InlineClass{theoremheadersc}{##1\theorem@separator}]}%
+ {\item[\theorem@headerfont\hskip \labelsep
+ \InlineClass{theoremheadersc}{##1\ (##3)\theorem@separator}]}
% \end{macrocode}
%
% The following standard configuration is renewed using the new \CSS:
% \begin{macrocode}
-\theoremstyle{plainupright}
-\theorembodyfont{\upshape}
-\theoremsymbol{\HTMLunicode{25A1}}% UTF-8 white box
-\renewtheorem{Example}{Example}
-\renewtheorem{example}{Example}
-\renewtheorem{Beispiel}{Beispiel}
-\renewtheorem{beispiel}{Beispiel}
-\renewtheorem{Bemerkung}{Bemerkung}
-\renewtheorem{bemerkung}{Bemerkung}
-\renewtheorem{Anmerkung}{Anmerkung}
-\renewtheorem{anmerkung}{Anmerkung}
-\renewtheorem{Remark}{Remark}
-\renewtheorem{remark}{Remark}
-\renewtheorem{Definition}{Definition}
-\renewtheorem{definition}{Definition}
-
-\theoremstyle{nonumberplainuprightsc}
-\theoremsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
-\renewtheorem{Proof}{Proof}
-\renewtheorem{proof}{Proof}
-\renewtheorem{Beweis}{Beweis}
-\renewtheorem{beweis}{Beweis}
-\qedsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
-
-\theoremsymbol{}
+ \theoremstyle{plainupright}
+ \theorembodyfont{\upshape}
+ \theoremsymbol{\HTMLunicode{25A1}}% UTF-8 white box
+ \renewtheorem{Example}{Example}
+ \renewtheorem{example}{Example}
+ \renewtheorem{Beispiel}{Beispiel}
+ \renewtheorem{beispiel}{Beispiel}
+ \renewtheorem{Bemerkung}{Bemerkung}
+ \renewtheorem{bemerkung}{Bemerkung}
+ \renewtheorem{Anmerkung}{Anmerkung}
+ \renewtheorem{anmerkung}{Anmerkung}
+ \renewtheorem{Remark}{Remark}
+ \renewtheorem{remark}{Remark}
+ \renewtheorem{Definition}{Definition}
+ \renewtheorem{definition}{Definition}
+
+ \theoremstyle{nonumberplainuprightsc}
+ \theoremsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
+ \renewtheorem{Proof}{Proof}
+ \renewtheorem{proof}{Proof}
+ \renewtheorem{Beweis}{Beweis}
+ \renewtheorem{beweis}{Beweis}
+ \qedsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
+
+ \theoremsymbol{}
}% not amsthm
% \end{macrocode}
%
@@ -25721,141 +26434,141 @@ solid
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyplain}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderplain}{##1\ ##2.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyplain}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderplain}{##1\ ##2\ (##3).}
- ]}}
+ ]}}
\gdef\th@nonumberplain{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyplain}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderplain}{##1.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyplain}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyplain}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderplain}{##1\ (##3).}
- ]}}
+ ]}}
\gdef\th@definition{%
\def\theorem@headerfont{\normalfont\bfseries}\normalfont%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodydefinition}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderdefinition}{##1\ ##2.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodydefinition}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderdefinition}{##1\ ##2\ (##3).}
- ]}}
+ ]}}
\gdef\th@nonumberdefinition{%
\def\theorem@headerfont{\normalfont\bfseries}\normalfont%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodydefinition}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderdefinition}{##1.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodydefinition}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodydefinition}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderdefinition}{##1\ (##3).}
- ]}}
+ ]}}
\gdef\th@remark{%
\def\theorem@headerfont{\itshape}\normalfont%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyremark}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderremark}{##1\ ##2.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyremark}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderremark}{##1\ ##2\ (##3).}
- ]}}
+ ]}}
\gdef\th@nonumberremark{%
\def\theorem@headerfont{\itshape}\normalfont%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyremark}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderremark}{##1.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyremark}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyremark}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderremark}{##1\ (##3).}
- ]}}
+ ]}}
\gdef\th@proof{%
\def\theorem@headerfont{\normalfont\bfseries}\itshape%
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyproof}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyproof}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderproof}{##1.}
- ]}%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembodyroof}% new
- \LWR@inctheorem% new
+ \BlockClass{theorembodyroof}% new
+ \LWR@inctheorem% new
\item[\hskip\labelsep
% \theorem@headerfont
\InlineClass{theoremheaderproof}{##1\ (##3).}
- ]}}
+ ]}}
\newcounter{proof}%
\if@thmmarks
- \newcounter{currproofctr}%
- \newcounter{endproofctr}%
+ \newcounter{currproofctr}%
+ \newcounter{endproofctr}%
\fi
\gdef\proofSymbol{\openbox}
@@ -25863,11 +26576,11 @@ solid
\newcommand{\proofname}{Proof}
\newenvironment{proof}[1][\proofname]{
- \th@proof
- \def\theorem@headerfont{\itshape}%
- \normalfont
- \theoremsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
- \@thm{proof}{proof}{#1}
+ \th@proof
+ \def\theorem@headerfont{\itshape}%
+ \normalfont
+ \theoremsymbol{\HTMLunicode{220E}}% UTF-8 end-of-proof
+ \@thm{proof}{proof}{#1}
}%
{\@endtheorem}
@@ -25879,10 +26592,10 @@ solid
\let\LWR@origendtheorem\@endtheorem
\renewcommand{\@endtheorem}{%
\ifbool{LWR@ntheoremmarks}{%
-\ifsetendmark%
-\InlineClass{theoremendmark}{\csname\InTheoType Symbol\endcsname}%
-\setendmarkfalse%
-\fi%
+ \ifsetendmark%
+ \InlineClass{theoremendmark}{\csname\InTheoType Symbol\endcsname}%
+ \setendmarkfalse%
+ \fi%
}{}%
\LWR@origendtheorem%
\ifbool{LWR@ntheoremmarks}{\global\setendmarktrue}{}%
@@ -26321,11 +27034,11 @@ solid
\RenewDocumentCommand{\newfloat}{m m m o}{%
\IfValueTF{#4}
{
-\DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}
+ \DeclareFloatingEnvironment[fileext=#3,within=#4]{#1}
}
{
-\DeclareFloatingEnvironment[fileext=#3]{#1}
-\DeclareFloatingEnvironment[fileext=#3]{sideways#1}
+ \DeclareFloatingEnvironment[fileext=#3]{#1}
+ \DeclareFloatingEnvironment[fileext=#3]{sideways#1}
}
\csletcs{sideways#1}{#1}
\csletcs{endsideways#1}{end#1}
@@ -26640,7 +27353,7 @@ solid
% \begin{macrocode}
\RenewDocumentCommand \sidecaption {s o o m}
{
- \LWR@stoppars
+ \LWR@stoppars
\captionsetup{style=sidecaption}
\IfBooleanTF{#1}
{ % starred
@@ -26656,7 +27369,7 @@ solid
{\marginnote{\caption[\@sidenotes@sidecaption@tof]{#4}}}
{\marginnote{\caption[\@sidenotes@sidecaption@tof]{#4}}[#3]}
}
- \LWR@startpars
+ \LWR@startpars
}
% \end{macrocode}
%
@@ -26863,7 +27576,7 @@ solid
\sf@bottom=\sf@nearskip
\fi
\leavevmode
- \setbox\@tempboxa \hbox{#4}%
+ \setbox\@tempboxa \hbox{#4}%
\@tempdima=\wd\@tempboxa
\@ifundefined{FBsc@max}{}%
{\global\advance\Xhsize-\wd\@tempboxa
@@ -26890,25 +27603,25 @@ solid
\vskip\sf@captopadj
\fi\egroup
\hrule width0pt height0pt depth0pt
- \LWR@startpars% new
+ \LWR@startpars% new
% \box\@tempboxa
- #4
- \LWR@stoppars% new
+ #4
+ \LWR@stoppars% new
}{%
- \LWR@startpars% new
+ \LWR@startpars% new
\@ifundefined{FBsc@max}%
{
% \box\@tempboxa
- #4
- }%
+ #4
+ }%
{\ifx\FBsuboheight\relax
% \box\@tempboxa
- #4
+ #4
\else
% \vbox to \FBsuboheight{\FBafil\box\@tempboxa\FBbfil}%
- #4
+ #4
\fi}%
- \LWR@stoppars% new
+ \LWR@stoppars% new
\egroup
\ifx \@empty#3\relax \else
\vskip\sf@capskip
@@ -26964,18 +27677,18 @@ solid
% }%
\@ifundefined{FBsc@max}%
% {\box0}%
- {
+ {
% \parbox[t]{\the\@tempdima}{%
\LWR@traceinfo{sfsubcap B1}% new
- \LWR@htmlblocktag{figcaption}% new
- \caption@make
- {\@nameuse{sub\@captype name}}%
- {\@nameuse{thesub\@captype}}%
- {#3}
- \LWR@htmlblocktag{/figcaption}% new
+ \LWR@htmlblocktag{figcaption}% new
+ \caption@make
+ {\@nameuse{sub\@captype name}}%
+ {\@nameuse{thesub\@captype}}%
+ {#3}
+ \LWR@htmlblocktag{/figcaption}% new
\LWR@traceinfo{sfsubcap B2}% new
% }%
- }%
+ }%
{\dimen@\ht0%
\advance\dimen@\dp0%
\ifdim\dimen@>\FBsc@max
@@ -26985,11 +27698,11 @@ solid
\ifx\FBsubcheight\relax
\def\next{
% \parbox[t]{\the\@tempdima}
- }%
+ }%
\else
\def\next{
% \parbox[t][\FBsubcheight][t]{\the\@tempdima}
- }%
+ }%
\fi
\vbox{%
% \hb@xt@\the\@tempdima{%
@@ -27006,8 +27719,8 @@ solid
% \hss
% }
- }
- }%
+ }
+ }%
\egroup
\LWR@startpars% new
}
@@ -27047,7 +27760,7 @@ solid
{}%
\nobreak\hskip\z@skip % enable hyphenation
\caption@tfmt{#2}
- \LWR@ensuredoingapar% new
+ \LWR@ensuredoingapar% new
\caption@ifstrut
{\ifhmode\@finalstrut\strutbox\fi}%
{}%
@@ -27362,10 +28075,10 @@ solid
}}
\gdef\@ynthm#1#2{%
- \expandafter\@ifdefinable\csname #1\endcsname
+ \expandafter\@ifdefinable\csname #1\endcsname
{
- \csedef{LWR@thmstyle#1}{\LWR@newtheoremstyle}% new
- \@definecounter{#1}%
+ \csedef{LWR@thmstyle#1}{\LWR@newtheoremstyle}% new
+ \@definecounter{#1}%
\expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}%
\def\@tempa{\global\@namedef{#1}}\expandafter \@tempa
\expandafter{\csname th@\the \theorem@style \expandafter
@@ -27380,15 +28093,15 @@ solid
\else
\expandafter\@ifdefinable\csname #1\endcsname
{
- \csedef{LWR@thmstyle#1}{\LWR@newtheoremstyle}% new
- \expandafter \xdef \csname the#1\endcsname
+ \csedef{LWR@thmstyle#1}{\LWR@newtheoremstyle}% new
+ \expandafter \xdef \csname the#1\endcsname
{\expandafter \noexpand \csname the#2\endcsname}%
\def\@tempa{\global\@namedef{#1}}\expandafter \@tempa
\expandafter{\csname th@\the \theorem@style \expandafter
\endcsname \the\theorem@bodyfont \@thm{#2}{#3}}%
\global \expandafter \let \csname end#1\endcsname \@endtheorem
\AtBeginEnvironment{#1}{\edef\LWR@thisthmstyle{\csuse{LWR@thmstyle#1}}}% new
- }%
+ }%
\fi}
% \end{macrocode}
%
@@ -27407,93 +28120,93 @@ solid
\gdef\th@plain{%\normalfont\itshape
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
\item[\hskip\labelsep
- \InlineClass{theoremheader}{##1\ ##2}
- ]}%
+ \InlineClass{theoremheader}{##1\ ##2}
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
\item[\hskip\labelsep
- \InlineClass{theoremheader}{##1\ ##2\ (##3)}
- ]}
+ \InlineClass{theoremheader}{##1\ ##2\ (##3)}
+ ]}
}
\gdef\th@break{%\normalfont\slshape
\def\@begintheorem##1##2{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip \labelsep
- \InlineClass{theoremheader}{##1\ ##2}\newline%
- ]}%
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip \labelsep
+ \InlineClass{theoremheader}{##1\ ##2}\newline%
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
\item[\hskip \labelsep
- \InlineClass{theoremheader}{##1\ ##2\ (##3)}\newline
- ]}
+ \InlineClass{theoremheader}{##1\ ##2\ (##3)}\newline
+ ]}
}
\gdef\th@marginbreak{%\normalfont\slshape
\def\@begintheorem##1##2{
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep %
- \InlineClass{theoremheader}{##2 \qquad ##1}\newline
- ]}%
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep %
+ \InlineClass{theoremheader}{##2 \qquad ##1}\newline
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep %
- \InlineClass{theoremheader}{##2 \qquad ##1\ %
- (##3)}\newline
- ]}
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep %
+ \InlineClass{theoremheader}{##2 \qquad ##1\ %
+ (##3)}\newline
+ ]}
}
\gdef\th@changebreak{%\normalfont\slshape
\def\@begintheorem##1##2{
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{##2\ ##1}\newline
- ]}%
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep
+ \InlineClass{theoremheader}{##2\ ##1}\newline
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{ ##2\ ##1\ %
- (##3)}\newline
- ]}
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep
+ \InlineClass{theoremheader}{ ##2\ ##1\ %
+ (##3)}\newline
+ ]}
}
\gdef\th@change{%\normalfont\slshape
\def\@begintheorem##1##2{
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{##2\ ##1}
- ]}%
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep
+ \InlineClass{theoremheader}{##2\ ##1}
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{##2\ ##1\ (##3)}
- ]}
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep
+ \InlineClass{theoremheader}{##2\ ##1\ (##3)}
+ ]}
}
\gdef\th@margin{%\normalfont\slshape
\def\@begintheorem##1##2{
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{##2 \qquad ##1}
- ]}%
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep
+ \InlineClass{theoremheader}{##2 \qquad ##1}
+ ]}%
\def\@opargbegintheorem##1##2##3{%
\LWR@forcenewpage% new
- \BlockClass{theorembody\LWR@thisthmstyle}% new
- \item[\hskip\labelsep
- \InlineClass{theoremheader}{##2 \qquad ##1\ (##3)}
- ]}
+ \BlockClass{theorembody\LWR@thisthmstyle}% new
+ \item[\hskip\labelsep
+ \InlineClass{theoremheader}{##2 \qquad ##1\ (##3)}
+ ]}
}
% \end{macrocode}
%
@@ -27574,7 +28287,7 @@ solid
% ^^A \end{environment}
% ^^A \begin{macro}{\tnote}
% \begin{macrocode}
-\newcommand{\tnote}[1]{\textsuperscript{#1}}
+\newcommand{\tnote}[1]{\LWR@htmlspan{sup}{#1}}
% \end{macrocode}
% ^^A \end{macro}
@@ -28553,6 +29266,52 @@ solid
% \clearpage
%
% \iffalse
+%<*transparent>
+% \fi
+%
+% \part{lwarp-transparent.sty}
+%
+% \section{Transparent}
+%
+% \credits{Heiko Oberdiek}
+%
+% \DescribePackage{transparent} Emulated.
+% \cs{texttransparent} works for inline objects.
+% \cs{transparent} only works for \cs{includegraphics}.
+%
+% Note that \pkg{transparent} does not work with \XeLaTeX.\watchout[Not \XeLaTeX!]
+%
+% \changes{v0.36}{2017/08/09}{\pkg{transparent}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-transparent}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{transparent}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\transparent}[1]{\edef\LWR@opacity{#1}}
+
+\newcommand*{\texttransparent}[2]{%
+\begingroup%
+\transparent{#1}%
+\InlineClass[opacity: #1]{transparent}{#2}%
+\endgroup%
+}
+% \end{macrocode}
+%
+% \iffalse
+%</transparent>
+% \fi
+%
+%
+%
+%
+%
+% \clearpage
+%
+% \iffalse
%<*trivfloat>
% \fi
@@ -28767,6 +29526,34 @@ solid
%
%
%
+% \clearpage
+%
+% \iffalse
+%<*upref>
+% \fi
+%
+% \part{lwarp-upref.sty}
+%
+% \section{Upref}
+%
+% \DescribePackage{upref} Ignored.
+%
+% \changes{v0.36}{2017/08/09}{\pkg{upref}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-upref}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{upref}
+% \end{macrocode}
+%
+%
+% \iffalse
+%</upref>
+% \fi
+%
+%
+%
%
% \clearpage
%
@@ -28933,15 +29720,14 @@ solid
% \begin{macrocode}
-
\newcommand*{\LWR@wrapposition}{}
\newcommand*{\LWR@subwrapfigure}[2]{%
\LWR@maybeincthisfloat%
\renewcommand*{\LWR@wrapposition}{}%
\ifthenelse{%
-\equal{#1}{r}\OR\equal{#1}{R}\OR%
-\equal{#1}{o}\OR\equal{#1}{O}%
+ \equal{#1}{r}\OR\equal{#1}{R}\OR%
+ \equal{#1}{o}\OR\equal{#1}{O}%
}%
{\renewcommand*{\LWR@wrapposition}{float:right}}%
{\renewcommand*{\LWR@wrapposition}{float:left}}%
@@ -28953,7 +29739,7 @@ solid
\LWR@htmltag{div class="marginblock" id="autofloat-\arabic{LWR@thisfloat}"
style="width:\rndprintlength{\LWR@wrapwidth} ; %
\LWR@wrapposition"%
-}
+}%
\LWR@startpars
}
@@ -28963,7 +29749,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\LWR@subwrapfigure{#2}{#4}%
\captionsetup{type=figure}%
}
-{
+{%
\LWR@htmldivclassend{div}
}
@@ -28973,7 +29759,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\LWR@subwrapfigure{#2}{#4}%
\captionsetup{type=table}%
}
-{
+{%
\LWR@htmldivclassend{div}
}
@@ -28983,7 +29769,7 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
\LWR@subwrapfigure{#3}{#5}%
\captionsetup{type=#1}%
}
-{
+{%
\LWR@htmldivclassend{div}
}
@@ -29005,160 +29791,477 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
% \part{lwarp-xcolor.sty}
% \section{Xcolor}
+% \label{sec:xcolor}
%
% \DescribePackage{xcolor}
% \pkg{xcolor} is supported by lwarp.
%
% \limitsxcolor
-
-% \codehtml
%
+% \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{Xcolor definitions: location and timing}
+%
+% The \pkg{lwarp} core and its \pkg{lwarp-xcolor} package are tightly integrated
+% to allow comparable results for print, \HTML\,
+% and print inside an \HTML\ \env{lateximage}.
+% This requires a number of definitions and redefintions depending on whether
+% each of \pkg{xcolor} and \env{lateximage} is being used, and whether print
+% or \HTML\ is being generated.
+% Some of these actions are one-time when \pkg{xcolor} is loaded, and others
+% are temporary as \env{lateximage} is used.
+%
+% \begin{description}
+% \item [When \pkg{lwarp} is loaded in print or HTML mode:]
+% \cs{LWR@restoreorigxcolor} and \cs{LWR@restoremoreorigxcolor} are defined as null.
+% \Cref{sec:xcolordefaults}
+% \item [When \pkg{xcolor} is loaded in print mode:] \
+% No special actions are taken at the time that \pkg{xcolor} is loaded in
+% print mode, but see \cs{AtBeginDocument} below.
+% \item [When \pkg{lwarp-xcolor} is loaded in HTML mode:] \
+% \pkg{xcolor}'s original definitions are saved for later restoration.
+% \cs{LWR@restoreorigxcolor} is defined to restore these definitions
+% for use inside a \env{lateximage}.
+% New \HTML-mode definitions are created for \cs{textcolor}, \cs{pagecolor},
+% \cs{nopagecolor}, \cs{colorbox}, \cs{colorboxBlock}, \cs{fcolorbox},
+% \cs{fcolorboxBlock}, and \env{fcolorminipage}.
+% \item [\cs{AtBeginDocument} in print or HTML mode:]
+% See \Cref{sec:xcolorpatches}.
+% If \pkg{xcolor} has been loaded, the print-mode \cs{fcolorbox} is modified
+% to accept a background color of |none|, and additional definitions are created
+% for \pkg{lwarp}'s new macros print-mode macros \cs{colorboxBlock},
+% \cs{fcolorboxBlock}, and \env{fcolorminipage}. The \HTML\ versions of these
+% macros will already have been created by \pkg{lwarp-xcolor} if it has been loaded.
+% For use inside an \HTML\ \env{lateximage}, \cs{LWR@restoremoreorigxcolor}
+% is defined to temporarily set these functions to their print-mode versions.
+% \item [In a \env{lateximage} in HTML mode:] \
+% \cs{LWR@restoreorigxcolor} and \\ \cs{LWR@restoremoreorigxcolor} are used to
+% temporarily restore the print-mode definitions of \pkg{xcolor}'s functions.
+% See \cs{LWR@restoreorigformatting} on page \pageref{sec:restoreorigformatting}.
+% \end{description}
+%
+% \begin{description}
+%
+% \item [\cs{color}:] \
+% \begin{description}
+% \item [Print:] Used as-is.
+% \item [HTML:] Ignored by |pdftotext|, and will not appear.
+% \item [HTML \env{lateximage}:] Colors will appear in a \env{lateximage}.
+% \end{description}
+%
+% \item [\cs{textcolor}:] \
+% \begin{description}
+% \item [Print:] Used as-is.
+% \item [HTML:] Redefined by \pkg{lwarp-xcolor}, page \pageref{sec:textcolor}.
+% \item [HTML \env{lateximage}:] Remembers and reuses the print version.
+% \end{description}
+%
+% \item [\cs{pagecolor}:] \
+% \begin{description}
+% \item [Print:] Used as-is.
+% \item [HTML:] Ignored.
+% \item [HTML \env{lateximage}:] Colors will be picked up in a \env{lateximage}.
+% \end{description}
+%
+% \item [\cs{nopagecolor}:] \
+% \begin{description}
+% \item [Print:] Used as-is.
+% \item [HTML:] Ignored.
+% \item [HTML \env{lateximage}:] Colors will be picked up in a \env{lateximage}.
+% \end{description}
+%
+% \item [\cs{colorbox}:] \
+% \begin{description}
+% \item [Print:] Used as-is.
+% \item [HTML:] Redefined by \pkg{lwarp-xcolor}, page \pageref{sec:colorbox}.
+% \item [HTML \env{lateximage}:] Remembers and reuses the print version.
+% \end{description}
+%
+% \item [\cs{colorboxBlock}:] \
+% \begin{description}
+% \item [Print:] Becomes \cs{colorbox}.
+% \item [HTML:] Newly defined by \pkg{lwarp-xcolor} to use a \element{div},
+% page \pageref{sec:colorboxBlock}.
+% \item [HTML \env{lateximage}:] Remembers and reuses the print version \cs{colorbox}.
+% \end{description}
+%
+% \item [\cs{fcolorbox}:] \
+% \begin{description}
+% \item [Print:] Modified to allow a background of |none|. \newline
+% \cs{LWRprint@fcolorbox} at \cref{sec:xcolorpatches}
+% \item [HTML:] Redefined by \pkg{lwarp-xcolor}, page \pageref{sec:fcolorbox}.
+% \item [HTML \env{lateximage}:] Remembers and reuses the print version.
+% \end{description}
+%
+% \item [\cs{fcolorboxBlock}:] \
+% \begin{description}
+% \item [Print:] Becomes \cs{fcolorbox}. \Cref{sec:xcolorpatches}
+% \item [HTML:] Newly defined by \pkg{lwarp-xcolor} to use a \element{div},
+% page \pageref{sec:fcolorboxBlock}.
+% \item [HTML \env{lateximage}:] Remembers and reuses the print version \cs{fcolorbox}.
+% \end{description}
+%
+% \item [\env{fcolorminipage}:] \
+% \begin{description}
+% \item [Print:] Newly defined in the \pkg{lwarp} core. \newline
+% \env{LWRprint@fcolorminipage} at \cref{sec:xcolorpatches}
+% \item [HTML:] Newly defined by \pkg{lwarp-xcolor}, page \pageref{sec:fcolorminipage}.
+% \item [HTML \env{lateximage}:] Uses the print version.
+% \end{description}
+%
+% \item [\cs{boxframe}:] \
+% \begin{description}
+% \item [Print:] Used as-is.
+% \item [HTML:] Redefined by \pkg{lwarp-xcolor}, page \pageref{sec:boxframe}.
+% \item [HTML \env{lateximage}:] Remembers and reuses the print version.
+% \end{description}
+%
+% \end{description}
+%
+%
+% \subsection{Code}
+%
+% \codehtml
% \begin{macrocode}
\LWR@ProvidesPackagePass{xcolor}
% \end{macrocode}
-
-% ^^A \begin{macro}{\LWR@tempcolor} The color converted to \HTML\ colorspace.
% \begin{macrocode}
-\newcommand*{\LWR@tempcolor}{}
+\begin{warpHTML}
% \end{macrocode}
-% ^^A \end{macro}
-% ^^A \begin{macro}{\LWR@currenttextcolor} The color to use for text and \cs{rule},
-% defaulting to black.
+% Remember the following print-mode actions to be restored
+% when inside a \env{lateximage} environment:
% \begin{macrocode}
-\newcommand*{\LWR@currenttextcolor}{black}
+\LetLtxMacro\LWRprint@textcolor\textcolor
+\LetLtxMacro\LWRprint@pagecolor\pagecolor
+\LetLtxMacro\LWRprint@nopagecolor\nopagecolor
+\LetLtxMacro\LWRprint@colorbox\colorbox
+\LetLtxMacro\LWRprint@colorboxBlock\colorbox
+\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
+\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
+\LetLtxMacro\LWRorigprint@boxframe\boxframe
% \end{macrocode}
-% ^^A \end{macro}
-
-
-
-% ^^A \begin{macro}{\LWR@colorstyle}
-% \cs{LWR@colorstyle} \marg{1: styletext} \marg{2: model}
-% \marg{3: color} \marg{4: spancontents}
%
-% \changes{v0.19}{2016/06/01}{Supports colored \cs{rule}.}
%
-% Creates a styled span with a color converted to \HTML\ hex colorspace.
-% Uses |LWR@spandepth| to prevent paragraph tags inside the span.
-% If used for \cs{textcolor}, with a styletext of |color:|, then the new color is
-% copied into \\ \cs{LWR@currenttextcolor} for possible re-use in \cs{rule}.
+% Inside a \env{lateximage} the following gets restored to their print-mode actions:
+% \margintag{\cs{LWR@restoreorigxcolor}}
% \begin{macrocode}
-\NewDocumentCommand{\LWR@colorstyle}{m m m m}{%
-% \end{macrocode}
-% Use the \pkg{xcolor} package to convert to an \HTML\ color space:
-% \begin{macrocode}
-\convertcolorspec{#2}{#3}{HTML}\LWR@tempcolor%
+\renewcommand*{\LWR@restoreorigxcolor}{%
+\LWR@traceinfo{LWR@restoreorigxcolorformatting}%
+\LetLtxMacro\textcolor\LWRprint@textcolor%
+\LetLtxMacro\pagecolor\LWRprint@pagecolor%
+\LetLtxMacro\nopagecolor\LWRprint@nopagecolor%
+\LetLtxMacro\colorbox\LWRprint@colorbox%
+\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
+\LetLtxMacro\boxframe\LWRorigprint@boxframe%
+}
% \end{macrocode}
-% If is a \cs{textcolor}, save a copy of this color for use by \cs{rule}:
+%
+%
+% The color converted to \HTML\ colorspace.
+% \margintag{\cs{LWR@tempcolor}}
% \begin{macrocode}
-\ifthenelse{\equal{#1}{color:}}%
-{\renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}}{}%
+\newcommand*{\LWR@tempcolor}{}
+\newcommand*{\LWR@tempcolortwo}{}
% \end{macrocode}
-% Create the \HTML\ \element{span} with the styled color:
+% ^^A \end{macro}
+%
+%
+%
+%
+% \marg{1: styletext} \marg{2: model} \marg{3: color}
+% \margintag{\cs{LWR@colorstyle}}
+%
+% \changes{v0.19}{2016/06/01}{Supports colored \cs{rule}.}
+% \changes{v0.36}{2017/08/11}{\pkg{xcolor}: Refactored \cs{LWR@colorstyle}.}
+%
+% For a color style, prints the color converted to \HTML\ colors.
+%
% \begin{macrocode}
-\LWR@htmltagc{span style="#1\#\LWR@tempcolor"{}}%
-\begin{LWR@nestspan}%
+\NewDocumentCommand{\LWR@colorstyle}{m m}{%
+\begingroup%
+\LWR@FBcancel%
% \end{macrocode}
-% Prevent additional paragraph tags inside this span:
+% Use the \pkg{xcolor} package to convert to an \HTML\ color space:
% \begin{macrocode}
+\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
% \end{macrocode}
-% Print the contents then close the span:
+% Print the converted color:
% \begin{macrocode}
-#4%
-\LWR@htmltagc{/span}%
-\end{LWR@nestspan}%
+\#\LWR@tempcolor%
+\endgroup%
+}
% \end{macrocode}
-% For paragraph-tag handling:
+%
+%
+% \begin{macro}{\LWR@borderpadding} \marg{colorstyle} \marg{color}
+% Prints the \HTML attributes for a black border and padding.
+%
+% \cs{LWR@forceminwidth} must be used first in order to set the border width.
+%
% \begin{macrocode}
-\LWR@ensuredoingapar%
+\newcommand*{\LWR@borderpadding}[2]{%
+\uselengthunit{PT}%
+border:\rndprintlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; %
+padding:\rndprintlength{\fboxsep}%
}
% \end{macrocode}
-% ^^A \end{macro}
-
-
-% ^^A \DescribeMacro{\color}
+% \end{macro}
+%
+%
+%
+%
+% \DescribeMacro{\color}
% \cs{color} appears in the \LaTeX{} \PDF\ output,
% but is ignored by |pdftotext| and thus is ignored in the \HTML\ file.
% Text styling by local group is not yet supported.
-
+%
+%
+%
% Each of the following macros is given a temporary name, and is |\let| to the final
% name once the \HTML\ conversion starts.
-
-% ^^A \begin{macro}{\textcolor}
-% \cs{textcolor}
+%
+% \label{sec:textcolor}
+% \begin{macro}{\textcolor}
% \oarg{model} \marg{color} \marg{text}
-% is converted into an \HTML\ hex color span.
+%
+% Converted into an \HTML\ hex color span.
% \begin{macrocode}
-\NewDocumentCommand{\LWR@textcolor}{O{named} m m}{%
+\RenewDocumentCommand{\textcolor}{O{named} m m}{%
\begingroup%
-\LWR@colorstyle{color:}{#1}{#2}{#3}%
+\LWR@FBcancel%
+\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
+\InlineClass[color:\LWR@colorstyle{#1}{#2}]{textcolor}{%
+\renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}%
+#3%
+}%
\endgroup%
}
% \end{macrocode}
-% ^^A \end{macro}
+% \end{macro}
-% ^^A \begin{macro}{\pagecolor}
-% \cs{pagecolor}
+% \begin{macro}{\pagecolor}
% \oarg{model} \marg{color}
-% is ignored. Use |\CSSFilename| instead.
+%
+% Ignored. Use |\CSSFilename| instead.
% \begin{macrocode}
-\newcommand*{\LWR@pagecolor}[2][named]{}
+\renewcommand*{\pagecolor}[2][named]{}
% \end{macrocode}
-% ^^A \end{macro}
+% \end{macro}
-% ^^A \begin{macro}{\colorbox}
-% \cs{colorbox}
+% \begin{macro}{\nopagecolor}
+% Ignored.
+% \begin{macrocode}
+\let\nopagecolor\relax
+% \end{macrocode}
+% \end{macro}
+
+
+% \label{sec:colorbox}
+% \begin{macro}{\colorbox}
% \oarg{model} \marg{color} \marg{text}
-% is converted into an \HTML\ hex background color span.
+%
+% Converted into an \HTML\ hex background color \element{span}.
%
% \begin{macrocode}
-\NewDocumentCommand{\LWR@colorbox}{O{named} m m}{%
+\RenewDocumentCommand{\colorbox}{O{named} m +m}{%
\begingroup%
-\LWR@colorstyle{background:}{#1}{#2}{#3}%
+\LWR@FBcancel%
+\uselengthunit{PT}%
+\InlineClass[%
+background:\LWR@colorstyle{#1}{#2} ; %
+padding:\rndprintlength{\fboxsep}%
+]{colorbox}{#3}%
\endgroup%
}
% \end{macrocode}
-% ^^A \end{macro}
+% \end{macro}
-% ^^A \begin{macro}{\fcolorbox}
-% \cs{fcolorbox}
-% \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text}
-% is converted into a framed \HTML\ hex background color span.
+% \label{sec:colorboxBlock}
+% \begin{macro}{\colorboxBlock} \oarg{model} \marg{color} \marg{text}
%
-% A background color of "none" creates a colored frame without a background color.
+% Converted into an \HTML\ hex background color \element{div}.
%
% \begin{macrocode}
-\NewDocumentCommand{\LWR@fcolorbox}{O{named} m O{named} m m}{%
+\NewDocumentCommand{\colorboxBlock}{O{named} m +m}{%
\begingroup%
-\ifthenelse{\equal{#4}{none}}{% no background color
-\LWR@colorstyle{border:1px solid }{#1}{#2}{#5}%
-}{% yes background color
-\LWR@colorstyle{border:1px solid }{#1}{#2}%
-{\LWR@colorstyle{background:}{#3}{#4}{#5}}%
+\LWR@FBcancel%
+\uselengthunit{PT}%
+\begin{BlockClass}[%
+background:\LWR@colorstyle{#1}{#2} ; %
+padding:\rndprintlength{\fboxsep}%
+]{colorboxBlock}
+#3
+\end{BlockClass}%
+\endgroup%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \label{sec:fcolorbox}
+% \begin{macro}{\fcolorbox}
+% \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text}
+%
+% Converted into a framed \HTML\ hex background color span.
+%
+% A background color of |none| creates a colored frame without a background color.
+%
+% \begin{macrocode}
+\RenewDocumentCommand{\fcolorbox}{O{named} m O{named} m +m}{%
+\LWR@traceinfo{HTML fcolorbox #2 #4}%
+\begingroup%
+\LWR@FBcancel%
+\uselengthunit{PT}%
+\LWR@forceminwidth{\fboxrule}%
+\ifthenelse{\equal{#4}{none}}%
+{% no background color
+ \InlineClass[%
+ \LWR@borderpadding{#1}{#2}%
+ ]{fcolorbox}{#5}%
+}%
+{% yes background color
+ \InlineClass[%
+ \LWR@borderpadding{#1}{#2} ; %
+ background:\LWR@colorstyle{#3}{#4}%
+ ]{fcolorbox}{#5}%
}%
\endgroup%
}
% \end{macrocode}
-% ^^A \end{macro}
+% \end{macro}
+
+% \label{sec:fcolorboxBlock}
+% \begin{macro}{\fcolorboxBlock}
+% \oarg{framemodel} \marg{framecolor} \oarg{boxmodel} \marg{boxcolor} \marg{text}
+%
+% Converted into a framed \HTML\ hex background color span.
+%
+% A background color of |none| creates a colored frame without a background color.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\fcolorboxBlock}{O{named} m O{named} m +m}{%
+\LWR@traceinfo{HTML fcolorboxBlock #2 #4}%
+\begingroup%
+\LWR@FBcancel%
+\uselengthunit{PT}%
+\LWR@forceminwidth{\fboxrule}%
+\ifthenelse{\equal{#4}{none}}%
+{% no background color
+ \begin{BlockClass}[%
+ \LWR@borderpadding{#1}{#2}%
+ ]{fcolorboxBlock}
+ #5
+ \end{BlockClass}%
+}%
+{% yes background color
+ \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
+ \begin{BlockClass}[%
+ background:\#\LWR@tempcolortwo; %
+ \LWR@borderpadding{#1}{#2}%
+ ]{fcolorboxBlock}
+ #5
+ \end{BlockClass}%
+}%
+\endgroup%
+\LWR@traceinfo{HTML fcolorboxBlock done}%
+}
+% \end{macrocode}
+% \end{macro}
-% Redirect to new definitions:
+% \label{sec:fcolorminipage}
+% \begin{environment}{fcolorminipage}
+% \oarg{1:framemodel} \marg{2:framecolor} \oarg{3:boxmodel} \marg{4:boxcolor}
+% \oarg{5:align} \oarg{6:height} \oarg{7:inner-align} \marg{8:width}
+%
+% Creates a framed \HTML\ \element{div} around its contents.
+%
+% A print-output version is defined in the \pkg{lwarp} core: \cref{sec:xcolorpatches}
+%
+% \changes{v0.34}{2017/07/31}{Added.}
+%
+% \marg{framemodel} \marg{framecolor} \marg{background tag} \marg{height}
+% \margintag{\cs{LWR@subfcolorminipage}}
+% \begin{macrocode}
+\NewDocumentCommand{\LWR@subfcolorminipage}{m m m m}{%
+\begin{BlockClass}[%
+#3%
+\LWR@borderpadding{#1}{#2} ; %
+\IfValueTF{#4}{height:\rndprintlength{\LWR@tempheight} ; }{}%
+width:\rndprintlength{\LWR@tempwidth}%
+]{fcolorminipage}%
+}
+% \end{macrocode}
+%
+% \oarg{1:framestyle} \marg{2:framecolor} \oarg{3:bkgcolorstyle} \marg{4:bkgcolor}
+% \margintag{\env{fcolorminipage}}
+% \oarg{5:align} \oarg{6:height} \oarg{7:inneralign} \marg{8:width}
+% \begin{macrocode}
+\NewDocumentEnvironment{fcolorminipage}{O{named} m O{named} m O{c} o o m}
+{%
+\LWR@FBcancel%
+\setlength{\LWR@tempwidth}{#8}%
+\IfValueTF{#6}{\setlength{\LWR@tempheight}{#6}}{}%
+\uselengthunit{PT}%
+\LWR@forceminwidth{\fboxrule}%
+\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
+\ifthenelse{\equal{#4}{none}}%
+{\LWR@subfcolorminipage{#1}{#2}{}{#6}}%
+{%
+ \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
+ \LWR@subfcolorminipage{#1}{#2}{background:\#\LWR@tempcolortwo\ ; }{#6}%
+}%
+}
+{\end{BlockClass}}
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+% \label{sec:boxframe}
+% \begin{macro}{\boxframe} \marg{width} \marg{height} \marg{depth}
+%
+% The depth is added to the height, but the box is not decended below
+% by the depth. \cs{textcolor} is honored.
% \begin{macrocode}
-\let\textcolor\LWR@textcolor
-\let\pagecolor\LWR@pagecolor
-\LetLtxMacro\colorbox\LWR@colorbox
-\LetLtxMacro\fcolorbox\LWR@fcolorbox
+\renewcommand*{\boxframe}[3]{%
+{%
+\setlength{\LWR@tempwidth}{#1}%
+\setlength{\LWR@tempheight}{#2}%
+\addtolength{\LWR@tempheight}{#3}%
+\uselengthunit{PT}%
+\LWR@forceminwidth{\fboxrule}%
+\InlineClass[%
+display:inline-block ; %
+border:\rndprintlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; %
+width:\rndprintlength{\LWR@tempwidth} ; %
+height:\rndprintlength{\LWR@tempheight}%
+]{boxframe}{}%
+}%
+}
% \end{macrocode}
+% \end{macro}
%
%
+% \begin{macrocode}
+\end{warpHTML}
+% \end{macrocode}
+%
% \iffalse
%</xcolor>
% \fi
%
%
%
+%
+%
% \clearpage
%
% \iffalse
@@ -29209,14 +30312,14 @@ style="width:\rndprintlength{\LWR@wrapwidth} ; %
% \end{macrocode}
-% ^^A \begin{macro}{\xfracHTMLfontsize}
+% \begin{macro}{\xfracHTMLfontsize}
% \changes{v0.19}{2016/06/06}{Added.}
% \index{font>size --- xfrac}
% User-redefinable macro which controls the font size of the fraction.
% \begin{macrocode}
\newcommand*{\xfracHTMLfontsize}{.6em}
% \end{macrocode}
-% ^^A \end{macro}
+% \end{macro}
% \begin{macrocode}
\end{warpall}
diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
index e9e1d37a2ed..2dba3766b93 100644
--- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins
+++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins
@@ -143,8 +143,10 @@ version 2005/12/01 or later.
\file{lwarp-titletoc.sty}{\from{lwarp.dtx}{titletoc}}
\file{lwarp-titling.sty}{\from{lwarp.dtx}{titling}}
\file{lwarp-tocloft.sty}{\from{lwarp.dtx}{tocloft}}
+\file{lwarp-transparent.sty}{\from{lwarp.dtx}{transparent}}
\file{lwarp-trivfloat.sty}{\from{lwarp.dtx}{trivfloat}}
\file{lwarp-ulem.sty}{\from{lwarp.dtx}{ulem}}
+\file{lwarp-upref.sty}{\from{lwarp.dtx}{upref}}
\file{lwarp-verse.sty}{\from{lwarp.dtx}{verse}}
\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}}
\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}}