summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-03-25 21:28:55 +0000
committerKarl Berry <karl@freefriends.org>2018-03-25 21:28:55 +0000
commit67a0d74b3ba80ada1c0ae1e1b3fc523bd0136699 (patch)
tree8c0f3bd63b4f10cbc26da1e5e8fe305286e8aa63 /Master/texmf-dist/tex/latex
parentb0d484d66da70017e2f7617211629a579a3b6056 (diff)
lwarp (24mar18)
git-svn-id: svn://tug.org/texlive/trunk@47115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty62
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty177
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemgreek.sty37
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty867
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemnum.sty60
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty12
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf-base.sty24
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty39
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty19
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-grid.sty22
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hyphenat.sty18
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty13
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ltxgrid.sty26
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty72
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty12
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-relsize.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty4
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty23
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty3
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty36
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-zwpagelayout.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty734
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp_baseline_marker.pngbin0 -> 89 bytes
42 files changed, 2021 insertions, 314 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
index 54b19682371..81096981262 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
@@ -22,7 +22,7 @@
\LWR@traceinfo{Patching alltt.}
\AtBeginEnvironment{alltt}{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{alltt}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{alltt}%
}
\AfterEndEnvironment{alltt}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim}
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty
index 08487f6a543..09dd18bc59a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty
@@ -19,7 +19,7 @@
\let\LWR@origfirsthline\firsthline
\let\LWR@origlasthline\lasthline
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\let\firsthline\LWR@origfirsthline%
\let\lasthline\LWR@origlasthline%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
index 25c0dafd1a8..eef21647d17 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-axodraw2.sty
@@ -18,7 +18,7 @@
\LWR@ProvidesPackagePass{axodraw2}
-\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[axopicture]}
+\BeforeBeginEnvironment{axopicture}{\begin{lateximage}[(axopicture)]}
\AfterEndEnvironment{axopicture}{\end{lateximage}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty
index 3d23100b395..6d78508d3fc 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigdelim.sty
@@ -29,7 +29,7 @@
\renewcommand{\LWR@multirowborder}{left}%
\multirow{#2}{#3}{\InlineClass{rdelim}{#1} #4}%
}
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\LetLtxMacro{\ldelim}{\LWR@origldelim}%
\LetLtxMacro{\rdelim}{\LWR@origrdelim}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty
index 286ef67ec1f..3cdb6db97af 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bigstrut.sty
@@ -20,7 +20,7 @@
\renewcommand\bigstrut[1][x]{}
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\LetLtxMacro{\bigstrut}{\LWR@origbigstrut}%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
index fdd88117053..6691dbb0b2c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-bytefield.sty
@@ -18,7 +18,7 @@
\LWR@ProvidesPackagePass{bytefield}
-\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[bytefield]}
+\BeforeBeginEnvironment{bytefield}{\begin{lateximage}[(bytefield)]}
\AfterEndEnvironment{bytefield}{\end{lateximage}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty
index dbc8dd6aeaa..78b451b13b9 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-cancel.sty
@@ -21,7 +21,7 @@
\LetLtxMacro\LWR@origbcancel\bcancel
\LetLtxMacro\LWR@origxcancel\xcancel
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\LetLtxMacro\cancel\LWR@origcancel%
\LetLtxMacro\bcancel\LWR@origbcancel%
\LetLtxMacro\xcancel\LWR@origxcancel%
@@ -30,7 +30,7 @@
\newcommand{\LWR@cancelcolor}[5]{%
\ifcsempty{#2}%
{\LWR@HTMLtextstyle{#5}{#3}{#1}}%
-{\LWR@htmlspanclass[#5;#4:\#\LWR@tempcolor]{#3}{#1}}%
+{\LWR@htmlspanclass[#5;#4:\LWR@origpound\LWR@tempcolor]{#3}{#1}}%
}
\DeclareRobustCommand{\cancel}[1]{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
new file mode 100644
index 00000000000..4676f010e2c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemfig.sty
@@ -0,0 +1,62 @@
+%%
+%% This is file `lwarp-chemfig.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `chemfig')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{chemfig}
+
+\LetLtxMacro\LWR@chemfig@origchemfig\chemfig
+
+\DeclareDocumentCommand\chemfig{s O{} O{} m}{%
+ \begin{lateximage}[(chemfig)]%
+ \IfBooleanTF{#1}{%
+ \LWR@chemfig@origchemfig*[#2][#3]{#4}%
+ }{%
+ \LWR@chemfig@origchemfig[#2][#3]{#4}%
+ }
+ \end{lateximage}%
+}
+
+\LetLtxMacro\LWR@chemfig@origCF@lewis@b\CF@lewis@b
+
+\def\CF@lewis@b#1#2{%
+\begin{lateximage}[(chemfig)]%
+\LWR@chemfig@origCF@lewis@b{#1}{#2}%
+\end{lateximage}%
+}
+
+\preto{\schemestart}{\begin{lateximage}[(chemfig)]}
+\appto{\CF@schemestop}{\end{lateximage}}
+
+\LetLtxMacro\LWR@chemfig@origchemleft\chemleft
+
+\def\chemleft#1#2\chemright#3{%
+\begin{lateximage}[(chemfig)]%
+\LWR@chemfig@origchemleft#1#2\chemright#3%
+\end{lateximage}%
+}
+
+\LetLtxMacro\LWR@chemfig@origchemup\chemup
+
+\def\chemup#1#2\chemdown#3{%
+\begin{lateximage}[(chemfig)]%
+\LWR@chemfig@origchemup#1#2\chemdown#3%
+\end{lateximage}%
+}
+
+\endinput
+%%
+%% End of file `lwarp-chemfig.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
new file mode 100644
index 00000000000..16017fe39ef
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
@@ -0,0 +1,177 @@
+%%
+%% This is file `lwarp-chemformula.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `chemformula')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{chemformula}[2017/03/23]
+
+\ExplSyntaxOn
+\RenewDocumentCommand \ch { O{}m }
+ {%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp
+ {
+ \chemformula_ch:nn {#1} {#2}% original
+ }
+ {
+ \begingroup%
+ \boolfalse{mathjax}%
+ \LWR@subsingledollar*{% lwarp
+ \textbackslash{}ch\{\LWR@HTMLsanitize{#2}\}% alt text
+ }{%
+ \LWR@HTMLsanitize{#1}% add'l hashing
+ }%
+ {%
+ \chemformula_ch:nn {#1} {#2}% original
+ }%
+ \endgroup%
+ }
+ }
+\cs_gset_protected:Npn \chemformula_chcpd:nn #1#2
+ {
+ \begingroup%
+ \boolfalse{mathjax}%
+ \LWR@subsingledollar*{% lwarp
+ \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}%
+ }{%
+ \LWR@HTMLsanitize{#1}%
+ }{% original
+ \group_begin:
+ \tl_if_blank:nF {#2}
+ {
+ \keys_set:nn {chemformula} {#1}
+ \__chemformula_save_catcodes:
+ \__chemformula_sanitize:Nn
+ \l__chemformula_chemformula_tmpa_tl
+ {#2}
+ \__chemformula_input_compound_no_check:NV
+ \l__chemformula_compound_tl
+ \l__chemformula_chemformula_tmpa_tl
+ \__chemformula_prepare_output:N \l__chemformula_compound_tl
+ \chemformula_write:V \l__chemformula_compound_tl
+ }
+ \group_end:
+ }
+ \endgroup
+ }
+\RenewDocumentCommand \charrow { mO{}O{} }
+{
+ \begin{lateximage}[(charrow)]
+ \group_begin:
+ \__chemformula_draw_arrow:nnn {#1} {#2} {#3}
+ \group_end:
+ \end{lateximage}
+}
+\RenewDocumentCommand \chname { R(){}R(){} }
+ {
+ \begin{lateximage}*[%
+ \textbackslash{}chname(\LWR@HTMLsanitize{#1})(\LWR@HTMLsanitize{#2})
+ ]%
+ \chemformula_chwritebelow:nn {#1} {#2}
+ \end{lateximage}
+ }
+\RenewDocumentCommand \chlewis { O{}mm }
+ {
+ \begingroup%
+ \boolfalse{mathjax}%
+ \LWR@subsingledollar*{\textbackslash{}chlewis\{#2\}\{#3\}}{#1}{
+ \chemformula_lewis:nnn {#1} {#2} {#3}
+ }
+ \endgroup%
+ }
+\bool_new:N \l__chemformula_first_last_LWRdollar_bool
+\cs_gset_protected:Npn \__chemformula_input_escape_math:n #1
+ {
+ \__chemformula_first_last_math:n {#1}
+ \bool_if:NT \l__chemformula_first_last_dollar_bool
+ {
+ \bool_set_true:N \l__chemformula_first_last_math_bool
+ \__chemformula_read_escape_dollar:w #1 \q_nil
+ }
+ \bool_if:NT \l__chemformula_first_last_mathbraces_bool
+ {
+ \bool_set_true:N \l__chemformula_first_last_math_bool
+ \__chemformula_read_escape_mathbraces:w #1 \q_nil
+ }
+ \bool_if:NT \l__chemformula_first_last_LWRdollar_bool% lwarp
+ {
+ \bool_set_true:N \l__chemformula_first_last_math_bool% lwarp
+ \__chemformula_read_escape_LWRdollar:w #1 \q_nil% lwarp
+ }
+ }
+\begingroup
+\catcode`\$=\active
+
+\cs_new_protected:Npn \__chemformula_read_escape_LWRdollar:w $#1$ \q_nil
+{
+ \__chemformula_read_escape_math:n {#1}
+}
+
+\endgroup
+\cs_new_protected:Npn \__chemformula_bool_cs_set_if_first_last:NnNN #1#2#3#4
+ {
+ \int_zero:N \l__chemformula_tmpa_int
+ \int_zero:N \l__chemformula_tmpb_int
+ \int_set:Nn \l__chemformula_tmpa_int { \tl_count:n {#2} }
+ \tl_map_inline:nn {#2}
+ {
+ \int_incr:N \l__chemformula_tmpb_int
+ \int_compare:nT { \l__chemformula_tmpb_int = 1 }
+ {
+ \ifdefstrequal{##1}{#3}% lwarp
+ {
+ \bool_set_true:N #1
+ }% lwarp
+ {}
+ }
+ \int_compare:nT { \l__chemformula_tmpb_int = \l__chemformula_tmpa_int }
+ {
+ \ifdefstrequal{##1}{#4}
+ {}
+ {
+ \bool_set_false:N #1
+ }
+ }
+ }
+ }
+\cs_gset_protected:Npn \__chemformula_first_last_math:n #1
+ {
+ \bool_set_false:N \l__chemformula_first_last_math_bool
+ \bool_set_false:N \l__chemformula_first_last_dollar_bool
+ \bool_set_false:N \l__chemformula_first_last_LWRdollar_bool% lwarp
+ \bool_set_false:N \l__chemformula_first_last_mathbraces_bool
+ \__chemformula_bool_set_if_first_last:Nnnn
+ \l__chemformula_first_last_dollar_bool
+ {#1}
+ { $ } { $ }
+ \bool_if:NF \l__chemformula_first_last_dollar_bool
+ {
+ \__chemformula_bool_set_if_first_last:Nnnn
+ \l__chemformula_first_last_mathbraces_bool
+ {#1}
+ { \( } { \) }
+ \bool_if:NF \l__chemformula_first_last_mathbraces_bool% lwarp
+ {
+ \__chemformula_bool_cs_set_if_first_last:NnNN
+ \l__chemformula_first_last_LWRdollar_bool
+ {#1}
+ { \LWR@newsingledollar } { \LWR@newsingledollar }
+ }% lwarp
+ }
+ }
+\ExplSyntaxOff
+\endinput
+%%
+%% End of file `lwarp-chemformula.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemgreek.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemgreek.sty
new file mode 100644
index 00000000000..881fe65a8d4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemgreek.sty
@@ -0,0 +1,37 @@
+%%
+%% This is file `lwarp-chemgreek.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `chemgreek')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{chemgreek}[2016/02/10]
+
+\ExplSyntaxOn
+
+\cs_undefine:N \chemgreek_text:n
+
+\cs_new_protected:Npn \chemgreek_text:n #1
+ { { \text {#1} } }
+
+\appto\LWR@restoreorigformatting{%
+\cs_set_protected:Npn \chemgreek_text:n #1%
+ { \ensuremath { \text {#1} } }%
+}
+
+\ExplSyntaxOff
+
+\endinput
+%%
+%% End of file `lwarp-chemgreek.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
new file mode 100644
index 00000000000..257eb3d0469
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemmacros.sty
@@ -0,0 +1,867 @@
+%%
+%% This is file `lwarp-chemmacros.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `chemmacros')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{chemmacros}
+\ExplSyntaxOn
+
+\newcommand{\@ifchemmacrosmoduleloaded}[1]{%
+\@ifl@aded{\c__chemmacros_module_extension_tl}{\c__chemmacros_module_prefix_tl.#1}%
+}
+
+\ExplSyntaxOff
+\DeclareDocumentEnvironment{polymerdelims}{}
+{\begin{lateximage}[(polymer)]}
+{\end{lateximage}}
+
+\DeclareDocumentEnvironment{redoxreaction}{m m}
+{\begin{lateximage}[(redox~reaction)]}
+{\end{lateximage}}
+\ExplSyntaxOn
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{acid-base}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~acid-base}
+
+\cs_gset_protected:Npn \chemmacros_p:n #1
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{
+ \textbackslash{}p\{\LWR@HTMLsanitize{#1}\}
+ }{
+ chemmacrosp\LWR@HTMLsanitize{#1}
+ }{
+ \group_begin:
+ \mbox
+ {
+ \chemmacros_p_style:n {p}
+ \ensuremath {#1}
+ }
+ \group_end:
+ }
+ \endgroup
+ }
+
+\RenewDocumentCommand \pH {} {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}pH}{chemmacros}{
+ \chemmacros_p:n { \chemmacros_chemformula:n {H} }
+ }
+ \endgroup
+}
+
+\RenewDocumentCommand \pOH {} {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}pOH}{chemmacros}{
+ \chemmacros_p:n { \chemmacros_chemformula:n {OH} }
+ }
+ \endgroup
+}
+
+\RenewDocumentCommand \pKa {O{}}
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}pKa{[}#1{]}}{chemmacros #1}{
+ \chemmacros_p:n
+ {
+ \Ka \ifblank {#1} {}
+ { {} \c_math_subscript_token { \chemmacros_bold:n {#1} } }
+ }
+ }
+ \endgroup
+ }
+
+\RenewDocumentCommand \pKb {O{}}
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}pKb{[}#1{]}}{chemmacros #1}{
+ \chemmacros_p:n
+ {
+ \Kb \ifblank {#1} {}
+ { {} \c_math_subscript_token { \chemmacros_bold:n {#1} } }
+ }
+ }
+ \endgroup
+ }
+
+\LetLtxMacro\LWR@chemmacros@origKa\Ka
+\renewcommand*{\Ka}{%
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}Ka}{chemmacros}{%
+ \LWR@chemmacros@origKa%
+ }%
+ \endgroup
+}
+
+\LetLtxMacro\LWR@chemmacros@origKb\Kb
+\renewcommand*{\Kb}{%
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}Kb}{chemmacros}{%
+ \LWR@chemmacros@origKb%
+ }%
+ \endgroup
+}
+
+\LetLtxMacro\LWR@chemmacros@origKw\Kw
+\renewcommand*{\Kw}{%
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}Kw}{chemmacros}{
+ \LWR@chemmacros@origKw
+ }
+ \endgroup
+}
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{charges}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~charges}
+
+\cs_gset_protected:Npn \fplus {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}fplus}{chemmacros}
+ { \LWR@origensuredmath{\chemformula_fplus:} }
+ \endgroup
+}
+\cs_gset_protected:Npn \fminus {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}fminus}{chemmacros}
+ { \LWR@origensuredmath{\chemformula_fminus:} }
+ \endgroup
+}
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{nomenclature}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~nomenclature}
+
+\cs_gset_protected:Npn \chemmacros_charge:n #1
+ {
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}
+ {\chemmacros_chemformula:n { {}^{#1} }}
+ {
+ \ifmmode
+ {\chemmacros_chemformula:n { {}^{#1} }}
+ \else
+ { \textsuperscript{\ensuremath{#1}} }
+ \fi
+ }
+ }
+
+\LetLtxMacro\LWR@chemmacros@origchemprime\chemprime
+
+\protected\def\chemprime { \HTMLunicode{2032} }
+
+\appto\LWR@restoreorigformatting{%
+\LetLtxMacro\chemprime\LWR@chemmacros@origchemprime%
+}
+\ChemCompatibilityFrom{5.8}
+\cs_gset_protected:Npn \__chemmacros_cip:n #1
+ {
+ \tl_set:Nn \l__chemmacros_tmpa_tl {#1}
+ \int_step_inline:nnnn {0} {1} {9}
+ {
+ \tl_replace_all:Nnn \l__chemmacros_tmpa_tl
+ {##1}
+ { { \l__chemmacros_cip_number_tl ##1} }
+ }
+ {
+ \l__chemmacros_cip_inner_tl
+ \LWR@textcurrentcolor{\LWR@textcurrentfont{% lwarp
+ \l__chemmacros_tmpa_tl
+ }}% lwarp
+ }
+ }
+\EndChemCompatibility
+\RenewDocumentCommand \Sconf { O{S} } {
+\begin{lateximage}[\textbackslash{}Sconf{[}#1{]}]
+ \chemmacros_sconf:n {#1}
+\end{lateximage}
+}
+
+\RenewDocumentCommand \Rconf { O{R} } {
+\begin{lateximage}[\textbackslash{}Rconf{[}#1{]}]
+ \chemmacros_rconf:n {#1}
+\end{lateximage}
+}
+\cs_gset_protected:Npn \chemmacros_hapto:n #1
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}hapto\{#1\}}{chemmacros}{
+ \chemmacros_coordination_symbol:nnnn
+ { \l__chemmacros_coord_use_hyphen_bool }
+ {
+ \chemmacros_if_compatibility:nnTF {>} {5.7}
+ { \c_true_bool }
+ { \c_false_bool }
+ }
+ { \chemeta }
+ {#1}
+ }
+ \endgroup
+ }
+
+\cs_gset_protected:Npn \chemmacros_dento:n #1
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}dento\{#1\}}{chemmacros}{
+ \chemmacros_coordination_symbol:nnnn
+ { \l__chemmacros_coord_use_hyphen_bool }
+ {
+ \chemmacros_if_compatibility:nnTF {>} {5.7}
+ { \c_true_bool }
+ { \c_false_bool }
+ }
+ { \chemkappa }
+ {#1}
+ }
+ \endgroup
+ }
+
+\cs_gset_protected:Npn \chemmacros_bridge:n #1
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \LWR@subsingledollar*{\textbackslash{}bridge\{#1\}}{chemmacros}{
+ \chemmacros_coordination_symbol:nnnn
+ { \l__chemmacros_coord_use_hyphen_bool }
+ { \l__chemmacros_bridge_super_bool }
+ { \chemmu }
+ {#1}
+ }
+ \endgroup
+ }
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{particles}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~particles}
+
+\cs_gset_protected:Npn \chemmacros_declare_nucleophile:Nn #1#2
+ {
+ \cs_set_protected:cpn {__chemmacros_ \chemmacros_remove_backslash:N #1:}
+ {
+ \bool_if:NTF \l__chemmacros_nucleophile_elpair_bool
+ {
+ \chemmacros_elpair:n { #2 }
+ \chemmacros_if_compatibility:nnT {>=} {5.3}
+ { \skip_horizontal:N \l__chemmacros_nucleophile_dim }
+ \chemmacros_chemformula:n { {}^{-} }
+ }
+ { \chemmacros_chemformula:n { #2^{-} } }
+ }
+ \DeclareDocumentCommand #1 {o}
+ {%
+ \begin{lateximage}%
+ \group_begin:%
+ \IfNoValueF {##1}%
+ { \chemmacros_set_keys:nn {particles} {##1} }%
+ \use:c {__chemmacros_ \chemmacros_remove_backslash:N #1:}%
+ \group_end:%
+ \end{lateximage}%
+ }
+ }
+
+\RenewChemNucleophile \Nuc {Nu}
+\RenewChemNucleophile \ba {ba}
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{phases}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~phases}
+
+\cs_undefine:N \chemmacros_phase:n
+\cs_new_protected:Npn \chemmacros_phase:n #1
+ {
+ \chemmacros_leave_vmode:
+ \bool_if:NTF \l__chemmacros_phases_sub_bool
+ {
+ \ifnumequal{\value{LWR@lateximagedepth}}{0}
+ {
+ \textsubscript{ (#1) }
+ }
+ {
+ \chemformula_subscript:n { (#1) }
+ }
+ }
+ {
+ \skip_horizontal:N \l__chemmacros_phases_space_dim
+ \chemmacros_text:n { (#1) }
+ }
+ }
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{mechanisms}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~mechanisms}
+
+\chemmacros_define_keys:nn {textmechanisms}
+ {
+ type .choice: ,
+ type / .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{N}
+ }
+ { }
+ } ,
+ type / 1 .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{N}
+ 1
+ }
+ { }
+ } ,
+ type / 2 .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{N}
+ 2
+ }
+ { }
+ } ,
+ type / se .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{E}
+ }
+ { }
+ } ,
+ type / 1e .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{E}
+ 1
+ }
+ { }
+ } ,
+ type / 2e .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{E}
+ 2
+ }
+ { }
+ } ,
+ type / ar .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { S }
+ {
+ \textsubscript{E}
+ }
+ { Ar - }
+ } ,
+ type / e .code:n =
+ { \__chemmacros_set_mechanisms:nnn { E } { } { } } ,
+ type / e1 .code:n =
+ { \__chemmacros_set_mechanisms:nnn { E } { 1 } { } } ,
+ type / e2 .code:n =
+ { \__chemmacros_set_mechanisms:nnn { E } { 2 } { } } ,
+ type / cb .code:n =
+ {
+ \__chemmacros_set_mechanisms:nnn { E }
+ {
+ 1
+ \textsubscript{cb}
+ }
+ { }
+ } ,
+ type .default:n =
+ }
+
+\cs_gset_protected:Npn \chemmacros_mechanisms:n #1
+ {
+ \tl_if_blank:nTF {#1}
+ { \chemmacros_set_keys:nn {textmechanisms} { type } }
+ { \chemmacros_set_keys:nn {textmechanisms} { type = #1 } }
+ \mbox
+ {
+ \tl_use:N \l__chemmacros_mechanisms_ar_tl
+ \tl_use:N \l__chemmacros_mechanisms_type_tl
+ \tl_use:N \l__chemmacros_mechanisms_mol_tl
+ }
+ }
+
+\appto\LWR@restoreorigformatting{%
+\cs_set_protected:Npn \chemmacros_mechanisms:n #1%
+ {%
+ \tl_if_blank:nTF {#1}%
+ { \chemmacros_set_keys:nn {mechanisms} { type } }%
+ { \chemmacros_set_keys:nn {mechanisms} { type = #1 } }%
+ \mbox%
+ {%
+ \tl_use:N \l__chemmacros_mechanisms_ar_tl%
+ \tl_use:N \l__chemmacros_mechanisms_type_tl%
+ \tl_use:N \l__chemmacros_mechanisms_mol_tl%
+ }%
+ }%
+}
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{newman}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~newman}
+
+\RenewDocumentCommand \newman {od()m}%
+ {
+ \IfValueTF{#2}
+ {\begin{lateximage}[\textbackslash{}newman(#2)\{#3\}]}
+ {\begin{lateximage}[\textbackslash{}newman\{#3\}]}
+ \group_begin:
+ \IfNoValueF {#1} { \chemmacros_set_keys:nn {newman} {#1} }
+ \IfNoValueTF {#2}
+ { \chemmacros_newman:nn { } {#3} }
+ { \chemmacros_newman:nn {#2} {#3} }
+ \group_end:
+ \end{lateximage}
+ }%
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{orbital}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~orbital}
+
+\RenewDocumentCommand \orbital {om}
+ {
+ \IfValueTF{#1}
+ {
+ \begin{lateximage}[%
+ \textbackslash{}orbital{[}\LWR@HTMLsanitize{#1}{]}\{#2\}%
+ ][][margin-left: 1em ; margin-right: 1em]
+ }
+ {
+ \begin{lateximage}[%
+ \textbackslash{}orbital\{#2\}%
+ ][][margin-left: 1em ; margin-right: 1em]
+ }
+ \group_begin:
+ \chemmacros_set_keys:nn {orbital/type} {#2}
+ \IfNoValueTF {#1}
+ { \chemmacros_orbital:n { } }
+ { \chemmacros_orbital:n {#1} }
+ \group_end:
+ \end{lateximage}
+ }
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{reactions}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~orbital}
+
+\cs_gset_protected:Npn \chemmacros_declare_reaction_env:nnnn #1#2#3#4
+ {
+ \exp_args:Nnx \DeclareDocumentEnvironment {#1} { O{} \prg_replicate:nn {#3+0} {m} }
+ {
+ \boolfalse{mathjax}% lwarp
+ \chemmacros_add_reaction_description:n {##1}
+ \__chemmacros_begin_reaction:
+ \chemmacros_reaction_read:nnw {#2} {#4}
+ }
+ {
+ \__chemmacros_end_reaction:
+ }
+ }
+\cs_generate_variant:Nn \chemmacros_declare_reaction_env:nnnn {nnnV}
+
+\RenewChemReaction {reaction} {equation}
+\RenewChemReaction {reaction*} {equation*}
+\RenewChemReaction {reactions} {align}
+\RenewChemReaction {reactions*} {align*}
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{redox}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~redox}
+
+\NewDocumentCommand \LWR@chemmacros@ox { s m >{\SplitArgument{1}{,}}m }
+ {
+ \IfBooleanTF {#1}
+ { \chemmacros_ox:nnnn {#1} {#2} #3 }
+ { \chemmacros_ox:nnnn { } {#2} #3 }
+ }
+
+\RenewDocumentCommand \ox { s O{} m }
+ {
+ \begingroup
+ \boolfalse{mathjax}
+ \IfBooleanTF {#1}
+ {
+ \LWR@subsingledollar*{% yes hash
+ \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt
+ }{%
+ star \LWR@HTMLsanitize{#2}% addl' hashing with star
+ }{%
+ \LWR@chemmacros@ox* {#2} {#3}% contents
+ }%
+ }
+ {
+ \LWR@subsingledollar*{% yes hash
+ \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt
+ }{%
+ \LWR@HTMLsanitize{#2}% addl' hashing without star
+ }{%
+ \LWR@chemmacros@ox {#2} {#3}% contents
+ }%
+ }
+ \endgroup
+ }
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{scheme}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~scheme}
+
+\ifdefstring{\schemename}{los}{
+\SetupFloatingEnvironment{scheme}{
+name = \chemmacros_translate:n {scheme-name}
+}
+}{}
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{spectroscopy}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~spectroscopy}
+
+\ChemCompatibilityTo{5.8}
+\cs_gset_protected:Npn \__chemmacros_nmr_base:nn #1#2
+ {
+ \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
+ {
+ \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { \{ }
+ \tl_put_right:Nn \g__chemmacros_nmr_element_coupled_tl { \} }
+ }
+ \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl {#2}
+ \textsuperscript{#1}
+ \bool_if:NTF \l__chemmacros_nmr_parse_bool
+ { \chemformula_ch:nV {} \g__chemmacros_nmr_element_coupled_tl }
+ { \chemmacros_chemformula:V \g__chemmacros_nmr_element_coupled_tl }
+ \tl_use:N \l__chemmacros_nmr_element_method_connector_tl
+ \tl_use:N \l__chemmacros_nmr_method_tl
+ }
+\EndChemCompatibility
+\ChemCompatibilityFrom{5.8}
+\cs_gset_protected:Npn \__chemmacros_nmr_base:nn #1#2
+ {
+ \group_begin:
+ \tl_use:N \l__chemmacros_nmr_base_format_tl
+ \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
+ {
+ \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl { \{ }
+ \tl_put_right:Nn \g__chemmacros_nmr_element_coupled_tl { \} }
+ }
+ \tl_put_left:Nn \g__chemmacros_nmr_element_coupled_tl {#2}
+ \textsuperscript{#1}
+ \tl_if_blank:VF \g__chemmacros_nmr_element_coupled_tl
+ {
+ \bool_if:NTF \l__chemmacros_nmr_parse_bool
+ { \chemformula_ch:nV {} \g__chemmacros_nmr_element_coupled_tl }
+ { \chemmacros_chemformula:V \g__chemmacros_nmr_element_coupled_tl }
+ }
+ \tl_use:N \l__chemmacros_nmr_element_method_connector_tl
+ \tl_use:N \l__chemmacros_nmr_method_tl
+ \group_end:
+ }
+\EndChemCompatibility
+
+\cs_gset_protected:Npn \chemmacros_nmr_position:n #1
+ {
+ \chemmacros_chemformula:x
+ {
+ \exp_not:V \g__chemmacros_nmr_element_tl
+ \bool_if:NF \l__chemmacros_nmr_position_side_bool
+ {
+ \tl_if_eq:NnTF \l__chemmacros_nmr_position_tl {^}% lwarp
+ { \textsuperscript{\exp_not:n { {#1} }} }% lwarp
+ { \textsubscript{\exp_not:n { {#1} }} }% lwarp
+ }
+ }
+ \bool_if:NT \l__chemmacros_nmr_position_side_bool
+ {
+ \tl_use:N \l__chemmacros_nmr_position_tl
+ \__chemmacros_nmr_position:n {#1}
+ }
+ }
+
+\cs_gset_protected:Npn \__chemmacros_nmr_coupling:w (#1;#2)
+ {
+ \tl_set:Nn \l__chemmacros_nmr_coupling_bonds_tl
+ {
+ \l__chemmacros_nmr_coupling_bonds_pre_tl
+ #1
+ \l__chemmacros_nmr_coupling_bonds_post_tl
+ }
+ \bool_if:NTF \l__chemmacros_nmr_coupling_nuclei_sub_bool
+ {
+ \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
+ {
+ \textsubscript% lwarp
+ {
+ \l__chemmacros_nmr_coupling_nuclei_pre_tl
+ \chemmacros_chemformula:n {#2}
+ \l__chemmacros_nmr_coupling_nuclei_post_tl
+ }
+ }
+ }
+ {
+ \tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
+ {
+ \l__chemmacros_nmr_coupling_nuclei_pre_tl
+ \chemmacros_chemformula:n {#2}
+ \l__chemmacros_nmr_coupling_nuclei_post_tl
+ }
+ }
+ \__chemmacros_nmr_coupling_aux_i:w
+ }
+
+\AfterEndPreamble{% After \AtBeginDocument
+\cs_gset_protected:Npn \chemmacros_nmr:nnnn #1#2#3#4
+ {
+ \bool_if:NT \l__chemmacros_nmr_list_bool { \item \scan_stop: }
+ \group_begin:
+ \chemmacros_leave_vmode:
+ \bool_set_false:N \l__chemmacros_nmr_frequency_bool
+ \bool_set_false:N \l__chemmacros_nmr_solvent_bool
+ \tl_if_empty:nF {#3}
+ { \bool_set_true:N \l__chemmacros_nmr_frequency_bool }
+ \tl_if_empty:nF {#4}
+ { \bool_set_true:N \l__chemmacros_nmr_solvent_bool }
+ \bool_if:nT
+ {
+ \l__chemmacros_nmr_frequency_bool
+ ||
+ \l__chemmacros_nmr_solvent_bool
+ }
+ { \bool_set_true:N \l__chemmacros_nmr_delimiters_bool }
+ \bool_if:nT
+ {
+ \l__chemmacros_nmr_frequency_bool
+ &&
+ \l__chemmacros_nmr_solvent_bool
+ }
+ { \bool_set_true:N \l__chemmacros_nmr_comma_bool }
+ \tl_if_empty:nTF {#2}
+ {
+ \__chemmacros_nmr_nucleus:VV
+ \l__chemmacros_nmr_isotope_default_tl
+ \l__chemmacros_nmr_element_default_tl
+ }
+ { \__chemmacros_nmr_nucleus:w #2 \q_stop }
+ \mode_if_math:TF
+ {
+ \text
+ {
+ \group_begin:
+ \tl_use:N \l__chemmacros_nmr_format_tl
+\LWR@textcurrentcolor{\LWR@textcurrentfont{% lwarp
+ \__chemmacros_nmr_base:VV
+ \g__chemmacros_nmr_isotope_tl
+ \g__chemmacros_nmr_element_tl
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ { ~ ( }
+ \bool_if:NT \l__chemmacros_nmr_frequency_bool
+ { \__chemmacros_nmr_frequency:n {#3} }
+ \bool_if:NT \l__chemmacros_nmr_comma_bool
+ { , ~ }
+ \bool_if:NT \l__chemmacros_nmr_solvent_bool
+ { \chemmacros_chemformula:n {#4} }
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ { ) }
+ \tl_if_blank:nT {#1} {:~}
+}}% lwarp
+ \group_end:
+ }
+ \tl_if_blank:nT {#1}
+ {
+ \delta
+ \text { \l__chemmacros_nmr_delta_tl }
+ \bool_if:NT \l__chemmacros_nmr_use_equal_bool {=}
+ }
+ }
+ {
+ \group_begin:
+ \tl_use:N \l__chemmacros_nmr_format_tl
+\LWR@textcurrentcolor{\LWR@textcurrentfont{% lwarp
+ \__chemmacros_nmr_base:VV
+ \g__chemmacros_nmr_isotope_tl
+ \g__chemmacros_nmr_element_tl
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ {~(}
+ \bool_if:NT \l__chemmacros_nmr_frequency_bool
+ { \__chemmacros_nmr_frequency:n {#3} }
+ \bool_if:NT \l__chemmacros_nmr_comma_bool
+ {,~}
+ \bool_if:NT \l__chemmacros_nmr_solvent_bool
+ {
+ \bool_if:NTF \l__chemmacros_nmr_parse_bool
+ { \chemformula_ch:nn { } {#4} }
+ {#4}
+ }
+ \bool_if:NT \l__chemmacros_nmr_delimiters_bool
+ {)}
+}}% lwarp
+ \tl_if_blank:nT {#1} {:}
+ \group_end:
+ \tl_if_blank:nT {#1}
+ {
+ \tl_use:N \c_space_tl
+ \c_math_toggle_token
+ \delta
+ \c_math_toggle_token
+ \l__chemmacros_nmr_delta_tl
+ \bool_if:NT \l__chemmacros_nmr_use_equal_bool {~=}
+ }
+ }
+ \group_end:
+ }
+}% AfterEndPremble
+
+\RenewDocumentCommand \chemmacros_data:w { smo }
+ {
+ \bool_if:NT \l__chemmacros_nmr_list_bool { \item }
+ {
+ \tl_use:N \l__chemmacros_nmr_format_tl
+ \LWR@textcurrentcolor{\LWR@textcurrentfont{% lwarp
+ #2
+ \IfNoValueF {#3} { ~ ( #3 ) }
+ \IfBooleanT {#1} { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { : } }
+ }}% lwarp
+ }
+ \IfBooleanF {#1} { \bool_if:NT \l__chemmacros_nmr_use_equal_bool { ~ = } }
+ }
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\AtBeginDocument{
+\@ifchemmacrosmoduleloaded{thermodynamics}{
+\PackageInfo{lwarp}{Patching~chemmacros~module~thermodynamics}
+
+\cs_gset_protected:Npn \chemmacros_state:nn #1#2
+ {
+ \group_begin:
+ \boolfalse{mathjax}
+ \chemmacros_set_keys:nn {thermodynamics} {#1}
+ \LWR@subsingledollar*{% yes hashing
+ \textbackslash{}state\{\LWR@HTMLsanitize{#2}\}% alt
+ }{%
+ chemmacros_state% add'l hashing
+ #1% options
+ LSP \tl_use:N \l__chemmacros_state_sp_left_tl% super/subscripts
+ LSB \tl_use:N \l__chemmacros_state_sb_left_tl
+ RSP \tl_use:N \l__chemmacros_state_sp_right_tl
+ RSB \tl_use:N \l__chemmacros_state_sb_right_tl
+ }
+ {
+ \LWR@origensuredmath{
+ \chemmacros_text:V \l__chemmacros_state_pre_tl
+ \c_math_superscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sp_left_tl }
+ \tl_if_empty:NTF \l__chemmacros_state_sb_left_tl
+ {}
+ {
+ \c_math_subscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sb_left_tl }
+ }
+ #2
+ \c_math_superscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sp_right_tl }
+ \tl_if_empty:NTF \l__chemmacros_state_sb_right_tl
+ {}
+ {
+ \c_math_subscript_token
+ { \chemmacros_text:V \l__chemmacros_state_sb_right_tl }
+ }
+ \chemmacros_text:V \l__chemmacros_state_post_tl
+ }
+ }
+ \group_end:
+ }
+\cs_generate_variant:Nn \chemmacros_state:nn { nV }
+
+\cs_gset_protected:Npn \chemmacros_declare_state:Nn #1#2
+ {
+ \chemmacros_define_keys:xn
+ {thermodynamics/\chemmacros_remove_backslash:N #1}
+ {
+ pre .meta:nn = {chemmacros/thermodynamics} { pre = ##1 } ,
+ post .meta:nn = {chemmacros/thermodynamics} { post = ##1 } ,
+ superscript-left .meta:nn = {chemmacros/thermodynamics} { superscript-left = ##1 } ,
+ superscript-right .meta:nn = {chemmacros/thermodynamics} { superscript-right = ##1 } ,
+ superscript .meta:n = { superscript-right = ##1 } ,
+ subscript-left .meta:nn = {chemmacros/thermodynamics} { subscript-left = ##1 } ,
+ subscript-right .meta:nn = {chemmacros/thermodynamics} { subscript-right = ##1 } ,
+ subscript .meta:n = { subscript-left = ##1 } ,
+ subscript-pos .choices:nn =
+ { left , right }
+ { \tl_set_eq:NN \l__chemmacros_state_sb_pos_tl \l_keys_choice_tl } ,
+ symbol .tl_set:N = \l__chemmacros_state_symbol_tl ,
+ unit .tl_set:N = \l__chemmacros_state_unit_tl
+ }
+ \DeclareDocumentCommand #1 { sO{}D(){}m }
+ {
+ \group_begin:
+ \chemmacros_set_keys:xn
+ {thermodynamics/\chemmacros_remove_backslash:N #1}
+ {#2}
+ \tl_if_blank:nF {##3}
+ {
+ \chemmacros_set_keys:nx {thermodynamics}
+ { subscript-\l__chemmacros_state_sb_pos_tl = \exp_not:n {##3} }
+ }
+ \chemmacros_state:nV {##2} \l__chemmacros_state_symbol_tl
+ \chemmacros_set_keys_groups:nnn {thermodynamics} {variables} {##2}
+ \IfBooleanF {##1} { = ~ \SI {##4} { \l__chemmacros_state_unit_tl } }
+ \group_end:
+ }
+ }
+\RenewChemState \enthalpy { symbol = H , unit = \kilo\joule\per\mole }
+\RenewChemState \entropy { symbol = S , unit = \joule\per\kelvin\per\mole , pre = }
+\RenewChemState \gibbs { symbol = G , unit = \kilo\joule\per\mole }
+
+}{}% \@ifchemmacrosmoduleloaded
+}% AtBeginDocument
+\ExplSyntaxOff
+
+\endinput
+%%
+%% End of file `lwarp-chemmacros.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemnum.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemnum.sty
new file mode 100644
index 00000000000..2dc1d945060
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemnum.sty
@@ -0,0 +1,60 @@
+%%
+%% This is file `lwarp-chemnum.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `chemnum')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{chemnum}
+
+\ExplSyntaxOn
+
+\cs_undefine:N \chemnum_compound_write:n
+\cs_new_protected:Npn \chemnum_compound_write:n #1
+ {
+ \chemnum_get_compound_property:nn {#1} {pre-main-label-code}
+ \group_begin:
+ \bool_if:NTF \l__chemnum_compound_local_bool
+ { \l__chemnum_local_label_format_tl }
+ { \chemnum_get_compound_property:nn {#1} {label-format} }
+ {
+ \LWR@textcurrentfont{
+ \chemnum_get_compound_property:nn {#1} {counter-representation}
+ }
+ }
+ \group_end:
+ \chemnum_get_compound_property:nn {#1} {post-main-label-code}
+ }
+
+\cs_undefine:N \chemnum_subcompound_write:nn
+\cs_new_protected:Npn \chemnum_subcompound_write:nn #1#2
+ {
+ \group_begin:
+ \bool_if:NTF \l__chemnum_compound_local_bool
+ { \l__chemnum_local_label_format_tl }
+ { \chemnum_get_compound_property:nn {#1} {label-format} }
+ {
+ \LWR@textcurrentfont{
+ \chemnum_get_subcompound_property:nnn {#1} {#2}
+ {counter-representation}
+ }
+ }
+ \group_end:
+ }
+
+\ExplSyntaxOff
+
+\endinput
+%%
+%% End of file `lwarp-chemnum.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
index 1121155e039..984da43d311 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty
@@ -23,12 +23,12 @@
\LetLtxMacro\LWR@origarrayrulecolor\arrayrulecolor
\LetLtxMacro\LWR@origdoublerulesepcolor\doublerulesepcolor
-\appto{\LWR@restoreorigformatting}{%
-\LetLtxMacro\columncolor\LWR@origcolumncolor
-\LetLtxMacro\rowcolor\LWR@origrowcolor
-\LetLtxMacro\cellcolor\LWR@origcellcolor
-\LetLtxMacro\arrayrulecolor\LWR@origarrayrulecolor
-\LetLtxMacro\doublerulesepcolor\LWR@origdoublerulesepcolor
+\appto\LWR@restoreorigformatting{%
+\LetLtxMacro\columncolor\LWR@origcolumncolor%
+\LetLtxMacro\rowcolor\LWR@origrowcolor%
+\LetLtxMacro\cellcolor\LWR@origcellcolor%
+\LetLtxMacro\arrayrulecolor\LWR@origarrayrulecolor%
+\LetLtxMacro\doublerulesepcolor\LWR@origdoublerulesepcolor%
}
\RenewDocumentCommand{\LWR@HTMLcolumncolor}{O{named} m o o}{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty
index 82b71417bd3..1778ac8a7de 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-diagbox.sty
@@ -20,9 +20,9 @@
\LetLtxMacro\LWR@origdiagbox@double\diagbox@double
\LetLtxMacro\LWR@origdiagbox@triple\diagbox@triple
-\appto\LWR@restoreorigformatting{
-\LetLtxMacro\diagbox@double\LWR@origdiagbox@double
-\LetLtxMacro\diagbox@triple\LWR@origdiagbox@triple
+\appto\LWR@restoreorigformatting{%
+\LetLtxMacro\diagbox@double\LWR@origdiagbox@double%
+\LetLtxMacro\diagbox@triple\LWR@origdiagbox@triple%
}
\newcommand{\LWR@diagbox@AB}[4]{
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf-base.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf-base.sty
new file mode 100644
index 00000000000..2e32fac7440
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf-base.sty
@@ -0,0 +1,24 @@
+%%
+%% This is file `lwarp-epstopdf-base.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `epstopdf-base')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{epstopdf-base}[2016/05/15]
+\providecommand*{\epstopdfsetup}[1]{}
+\providecommand*{\epstopdfcall}[1]{}
+\providecommand*{\epstopdfDeclareGraphicsRule}[4]{}
+\endinput
+%%
+%% End of file `lwarp-epstopdf-base.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty
index bbb6875adf5..d25150f6484 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-epstopdf.sty
@@ -16,9 +16,9 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{epstopdf}
-\newcommand*{\epstopdfsetup}[1]{}
-\newcommand*{\epstopdfcall}[1]{}
-\newcommand*{\epstopdfDeclareGraphicsRule}[4]{}
+\providecommand*{\epstopdfsetup}[1]{}
+\providecommand*{\epstopdfcall}[1]{}
+\providecommand*{\epstopdfDeclareGraphicsRule}[4]{}
\endinput
%%
%% End of file `lwarp-epstopdf.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
index a16f15b61f8..36b250fd8b5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancybox.sty
@@ -55,18 +55,39 @@
\endLWR@figcaption%
}
\RenewDocumentEnvironment{Btrivlist}{m o}
-{\begin{BlockClass}{Btrivlist}\tabular{#1}}
-{\endtabular\end{BlockClass}}
+{%
+ \begin{BlockClass}{Btrivlist}%
+ \tabular{#1}%
+}
+{%
+ \endtabular%
+ \end{BlockClass}%
+}
\AtBeginEnvironment{LWR@nestspan}{%
\RenewDocumentEnvironment{Btrivlist}{m o}{}{}%
-\RenewDocumentCommand{\LWR@origitem}{d()}{\LWRFB@origitem}%
}
\let\LWRFB@origitemizeitem\LWR@itemizeitem
\let\LWRFB@origdescitem\LWR@descitem
-\LetLtxMacro{\LWRFB@origitem}{\LWR@origitem}
-\RenewDocumentCommand{\LWR@itemizeitem}{d()}{\LWRFB@origitemizeitem}
-\RenewDocumentCommand{\LWR@descitem}{d()}{\LWRFB@origdescitem}
+\RenewDocumentCommand{\LWR@itemizeitem}{d()o}{%
+ \IfValueTF{#2}{%
+ \LWRFB@origitemizeitem[#2]%
+ }{%
+ \LWRFB@origitemizeitem%
+ }%
+}
+
+\RenewDocumentCommand{\LWR@descitem}{d()o}{%
+ \IfValueTF{#2}{%
+ \LWRFB@origdescitem[#2]~%
+ }{%
+ \LWRFB@origdescitem%
+ }%
+}
+\RenewDocumentCommand{\LWR@nestspanitem}{d()}{%
+\if@newlist\else{\LWR@htmltagc{br /}}\fi%
+\LWR@origitem%
+}
\renewenvironment{Bitemize}[1][]{\begin{itemize}}{\end{itemize}}
\renewenvironment{Benumerate}[1][]{\begin{enumerate}}{\end{enumerate}}
\renewenvironment{Bdescription}[1][]{\begin{description}}{\end{description}}
@@ -85,7 +106,7 @@
\def\endLandscape{}
\let\LWRFB@UseVerbatim\UseVerbatim
\renewcommand*{\UseVerbatim}[1]{%
-\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-.5\baselineskip}%%
+\LWR@atbeginverbatim{3.5}{Verbatim}%
\LWRFB@UseVerbatim{#1}%
\LWR@afterendverbatim%
}
@@ -93,14 +114,14 @@
\let\LWRFB@LUseVerbatim\LUseVerbatim
\renewcommand*{\LUseVerbatim}[1]{%
-\LWR@atbeginverbatim{LVerbatim}%\unskip\LWR@origvspace*{-\baselineskip}%%
+\LWR@atbeginverbatim{3.5}{LVerbatim}%
\noindent%
\LWRFB@LUseVerbatim{#1}%
\LWR@afterendverbatim%
}
\def\@BUseVerbatim[#1]#2{%
-\LWR@atbeginverbatim{BVerbatim}\unskip\LWR@origvspace*{-.5\baselineskip}%%
+\LWR@atbeginverbatim{3.5}{BVerbatim}%
\LWRFB@UseVerbatim{#2}%
\LWR@afterendverbatim%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
index c30cb0951f5..ea8d9318c10 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
@@ -50,7 +50,7 @@
\renewcommand*{\FV@SingleFrameSep}{}
\def\FV@BUseVerbatim#1{%
- \LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
+ \LWR@atbeginverbatim[\LWR@FVstyle]{.5}{verbatim}%
\FV@BVerbatimBegin#1\FV@BVerbatimEnd%
\LWR@afterendverbatim%
}
@@ -58,7 +58,7 @@
\newcommand*{\LWR@FVstyle}{}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
-\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
+\LWR@atbeginverbatim[\LWR@FVstyle]{.5}{verbatim}%
}
\newcommand*{\LWR@fvendnone}{%
@@ -98,7 +98,8 @@
\newcommand*{\LWR@FVborderstyle}[1]{%
padding#1: \strip@pt\dimexpr \FV@FrameSep\relax\relax pt ; %
\LWR@FVfindbordercolor %
-border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor ; %
+border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt %
+solid \LWR@origpound\LWR@tempcolor ; %
}
\def\FV@Frame@none{%
@@ -167,7 +168,10 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\ifx\FV@LabelPositionTopLine\relax
\else
\LWR@FVfindbordercolor
- \LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
+ \LWR@htmltagc{%
+ div class="fancyvrblabel" % extra space
+ style="color: \LWR@origpound\LWR@tempcolor"%
+ }
\LWR@origtextrm{\FV@LabelBegin}% \textrm preserves emdash
\LWR@htmltagc{/div}
\fi
@@ -176,7 +180,10 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\else
\LWR@FVfindbordercolor
- \LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
+ \LWR@htmltagc{%
+ div class="fancyvrblabel" % extra space
+ style="color: \LWR@origpound\LWR@tempcolor"%
+ }
\LWR@origtextrm{\FV@LabelEnd}
\LWR@htmltagc{/div}
\fi
@@ -199,7 +206,7 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\AtBeginEnvironment{BVerbatim}
{%
\LWR@forcenewpage% instead of \preto
-\LWR@atbeginverbatim{bverbatim}%
+\LWR@atbeginverbatim{0}{bverbatim}%
}
\AfterEndEnvironment{BVerbatim}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty
index 77d65ddb393..b59c4209b1e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-framed.sty
@@ -35,14 +35,14 @@
\renewenvironment{shaded}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{shaded}%
+\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
\renewenvironment{shaded*}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{shaded}%
+\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
@@ -57,14 +57,14 @@
\renewenvironment{snugshade}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{snugframed}%
+\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
}
{\endBlockClass}
\renewenvironment{snugshade*}{%
\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\BlockClass[background: \#\LWR@tempcolor]{snugframed}%
+\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
}
{\endBlockClass}
@@ -78,9 +78,9 @@
\renewcommand{\CustomFBox}[7]{%
\convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
\LWR@forcenewpage
-\begin{BlockClass}[border: 3px solid \#\LWR@tempcolor]{framed}%
+\begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}%
\ifthenelse{\isempty{#1}}{}{% not empty
- \begin{BlockClass}[background: \#\LWR@tempcolor]{framedtitle}%
+ \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
\textcolor{TFTitleColor}{\textbf{#1}}%
\end{BlockClass}
}% not empty
@@ -89,7 +89,7 @@
\ifthenelse{\isempty{#2}}{}{% not empty
\convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
- \begin{BlockClass}[background: \#\LWR@tempcolor]{framedtitle}%
+ \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
\textcolor{TFTitleColor}{\textbf{#2}}%
\end{BlockClass}
}% not empty
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-grid.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-grid.sty
new file mode 100644
index 00000000000..f56d74bc608
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-grid.sty
@@ -0,0 +1,22 @@
+%%
+%% This is file `lwarp-grid.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `grid')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{grid}
+\newenvironment*{gridenv}{}{}
+\endinput
+%%
+%% End of file `lwarp-grid.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyphenat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyphenat.sty
index 3aff6284869..9e8a242d8d2 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyphenat.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyphenat.sty
@@ -37,15 +37,15 @@
\renewrobustcmd{\colonhyp}{:}
\renewrobustcmd{\hyp}{-}
-\appto\LWR@restoreorigformatting{
-\LetLtxMacro\textnhtt\LWRHYNAT@origtextnhtt
-\LetLtxMacro\nhttfamily\LWRHYNAT@orignhttfamily
-\LetLtxMacro\nohyphens\LWRHYNAT@orignohyphens
-\LetLtxMacro\bshyp\LWRHYNAT@origbshyp
-\LetLtxMacro\fshyp\LWRHYNAT@origfshyp
-\LetLtxMacro\dothyp\LWRHYNAT@origdothyp
-\LetLtxMacro\colonhyp\LWRHYNAT@origcolonhyp
-\LetLtxMacro\hyp\LWRHYNAT@orighyp
+\appto\LWR@restoreorigformatting{%
+\LetLtxMacro\textnhtt\LWRHYNAT@origtextnhtt%
+\LetLtxMacro\nhttfamily\LWRHYNAT@orignhttfamily%
+\LetLtxMacro\nohyphens\LWRHYNAT@orignohyphens%
+\LetLtxMacro\bshyp\LWRHYNAT@origbshyp%
+\LetLtxMacro\fshyp\LWRHYNAT@origfshyp%
+\LetLtxMacro\dothyp\LWRHYNAT@origdothyp%
+\LetLtxMacro\colonhyp\LWRHYNAT@origcolonhyp%
+\LetLtxMacro\hyp\LWRHYNAT@orighyp%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
index a9c4368c0be..2c9ddd47df3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
@@ -30,13 +30,22 @@
\renewcommand{\lst@Init}[1]{%
\LWR@traceinfo{lst@Init}%
\renewcommand*{\@captype}{lstlisting}%
-\LWR@origlst@Init{#1}%
+\let\lst@aboveskip\z@\let\lst@belowskip\z@%
+\gdef\lst@boxpos{t}%
+\let\lst@frame\@empty
+ \let\lst@frametshape\@empty
+ \let\lst@framershape\@empty
+ \let\lst@framebshape\@empty
+ \let\lst@framelshape\@empty
+\lstframe@\lst@frameround ffff\relax%
+\lst@multicols\@empty%
+\LWR@origlst@Init{#1}\relax%
\LWR@traceinfo{finished origlst@Init}%
\lst@ifdisplaystyle%
\LWR@traceinfo{About to create verbatim.}%
\let\lsthk@EveryPar\relax%
\LWR@forcenewpage
-\LWR@atbeginverbatim{programlisting}%
+\LWR@atbeginverbatim{2.5}{programlisting}%
\let\lsthk@EveryPar\LWR@origlsthkEveryPar%
\else%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ltxgrid.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ltxgrid.sty
new file mode 100644
index 00000000000..28059a5e799
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ltxgrid.sty
@@ -0,0 +1,26 @@
+%%
+%% This is file `lwarp-ltxgrid.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `ltxgrid')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+\LWR@ProvidesPackageDrop{ltxgrid}
+\newcommand*{\onecolumngrid}{}
+\newcommand*{\twocolumngrid}{}
+\newcommand*{\removestuff}{}
+\newcommand*{\addstuff}[2]{}
+\newcommand*{\replacestuff}[2]{}
+\endinput
+%%
+%% End of file `lwarp-ltxgrid.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
index 94b2a151a6d..bd872a94eec 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
@@ -93,7 +93,7 @@
}%
\DeclareDocumentCommand{\todonotes@textmark@highlight}{m}{%
-\InlineClass[background:\#B3FFB3]{highlight}{#1}%
+\InlineClass[background:\LWR@origpound{}B3FFB3]{highlight}{#1}%
}
\fi% \if@todonotes@disabled
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
index 6da3ac8e0b8..76801a34475 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mdframed.sty
@@ -43,7 +43,7 @@ endinnercode={\LWR@stoppars},
}
\newcommand*{\LWR@mdfprintcolor}[1]{%
\convertcolorspec{named}{\csuse{mdf@#1}}{HTML}\LWR@tempcolor%
-\#\LWR@tempcolor
+\LWR@origpound\LWR@tempcolor
}
\newcommand*{\LWR@mdfprintlength}[1]{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty
new file mode 100644
index 00000000000..6c8f0cec2e6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mhchem.sty
@@ -0,0 +1,72 @@
+%%
+%% This is file `lwarp-mhchem.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lwarp.dtx (with options: `mhchem')
+%% This is a generated file.
+%% Copyright 2016-2018 Brian Dunn
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+\LWR@ProvidesPackagePass{mhchem}
+
+\LetLtxMacro\LWR@mhchem@origce\ce
+
+\newcommand{\LWR@mhchem@HTML@ce}[1]{%
+\begin{lateximage}*[\textbackslash{}ce\{\LWR@HTMLsanitize{#1}\}]%
+\LWR@mhchem@origce{#1}%
+\end{lateximage}%
+\endgroup%
+\addtocounter{LWR@mhchem@cedepth}{-1}%
+}
+
+\newcounter{LWR@mhchem@cedepth}
+\setcounter{LWR@mhchem@cedepth}{0}
+
+\renewcommand{\ce}{%
+\begingroup%
+\ifnumequal{\value{LWR@mhchem@cedepth}}{0}{%
+ \catcode`\$=3% math shift
+}{}%
+\addtocounter{LWR@mhchem@cedepth}{1}%
+\LWR@mhchem@HTML@ce%
+}
+
+\LetLtxMacro\LWR@mhchem@origcesplit\cesplit
+
+\newcommand*{\LWR@mhchem@HTML@cesplit}[2]
+{%
+\begin{lateximage}*[\textbackslash{}cesplit\{\LWR@HTMLsanitize{#2}\}]%
+\LWR@mhchem@origcesplit{#1}{#2}%
+\end{lateximage}%
+\endgroup%
+}
+
+\newcounter{LWR@mhchem@cesplitdepth}
+\setcounter{LWR@mhchem@cesplitdepth}{0}
+
+\renewcommand{\cesplit}{%
+\begingroup%
+\ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{%
+ \catcode`\$=3% math shift
+}{}%
+\addtocounter{LWR@mhchem@cesplitdepth}{1}%
+\LWR@mhchem@HTML@cesplit%
+}
+
+\appto\LWR@restoreorigformatting{%
+\LetLtxMacro\ce\LWR@mhchem@origce%
+\LetLtxMacro\cesplit\LWR@mhchem@origcesplit%
+}
+
+\endinput
+%%
+%% End of file `lwarp-mhchem.sty'.
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
index f186e5dd31a..3c4019ca91c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-moreverb.sty
@@ -19,7 +19,7 @@
\LWR@ProvidesPackagePass{moreverb}
\BeforeBeginEnvironment{verbatimtab}{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{Verbatim}%
}
\AfterEndEnvironment{verbatimtab}{%
\LWR@afterendverbatim%
@@ -29,14 +29,14 @@
\renewcommand{\@verbatimtabinput}[2][]{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{Verbatim}%
\LWRMV@orig@verbatimtabinput[#1]{#2}%
\LWR@afterendverbatim%
}
\BeforeBeginEnvironment{listing}{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{programlisting}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{programlisting}%
}
\AfterEndEnvironment{listing}{%
@@ -45,7 +45,7 @@
\BeforeBeginEnvironment{listingcont}{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{programlisting}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{programlisting}%
}
\AfterEndEnvironment{listingcont}{%
@@ -57,7 +57,7 @@
\renewcommand{\@listinginput}[3][]{
\LWR@forcenewpage
-\LWR@atbeginverbatim{programlisting}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{programlisting}%
\LWRMV@@listinginput[#1]{#2}{#3}
\LWR@afterendverbatim%
}
@@ -65,7 +65,7 @@
\renewenvironment*{boxedverbatim}
{
\LWR@forcenewpage
-\LWR@atbeginverbatim{boxedverbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
+\LWR@atbeginverbatim{3.5}{boxedverbatim}%
\verbatim%
}
{
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
index 698a56e8ccd..f129aebb883 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
@@ -62,7 +62,7 @@ class="td%
\addtocounter{LWR@tablecolindex}{-1}%
\booltrue{LWR@skipatbang}%
}
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\LetLtxMacro\multirow\LWR@origmultirow%
\renewcommand{\multicolumnrow}{\LWR@origmulticolumnrow}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty
index 749b4614d61..d1f723d2e35 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-phfqit.sty
@@ -26,8 +26,8 @@
]{bitstring}{#1}%
}
-\appto{\LWR@restoreorigformatting}{
-\LetLtxMacro\bitstring\LWR@origbitstring
+\appto\LWR@restoreorigformatting{%
+\LetLtxMacro\bitstring\LWR@origbitstring%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-relsize.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-relsize.sty
index f246190304e..f4b6368b763 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-relsize.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-relsize.sty
@@ -25,7 +25,7 @@
\LetLtxMacro\LWR@origtextsmaller\textsmaller
\let\LWR@textscale\textscale
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\let\relsize\LWR@origrelsize%
\LetLtxMacro\larger\LWR@origlarger%
\LetLtxMacro\smaller\LWR@origsmaller%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
index cecc0eda7c9..6e7fd4b32a0 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty
@@ -97,7 +97,9 @@
\__siunitx_unit_output_pre_print:
\LWR@subsingledollar{% lwarp
\textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
- }{\__siunitx_print:nn { number } { #1 }}% lwarp
+ }{siunitx}{\__siunitx_print:nn { number } {
+ \LWR@origensuredmath{#1}
+ }}% lwarp
\__siunitx_unit_output_print:
}
\group_end:% lwarp
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty
index e67ae89cdd3..60801d79cea 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-soul.sty
@@ -36,7 +36,7 @@
{\LWR@HTMLtextstyle{#5}{#3}{#1}}%
{%
\convertcolorspec{named}{\csuse{#2}}{HTML}\LWR@tempcolor%
- \LWR@htmlspanclass[#5;#4:\#\LWR@tempcolor]{#3}{#1}%
+ \LWR@htmlspanclass[#5;#4:\LWR@origpound\LWR@tempcolor]{#3}{#1}%
}%
}
@@ -52,7 +52,7 @@
\newcommand{\hl}[1]{
\LWR@soulcolor{#1}{LWR@soulhlcolor}{highlight}{background-color}%
- {background:\#F8E800}
+ {background:\LWR@origpound{}F8E800}
}
\newcommand*{\soulaccent}[1]{}
\newcommand*{\soulregister}[2]{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty
index c421898bafd..91dbf0aad1e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty
@@ -107,7 +107,7 @@
\InlineClass[border: 1px solid \LWR@currenttextcolor]{textcircled}{#1}%
}
}% AtBeginDocument
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\let\textdegree\LWR@origtextdegree%
\let\textcelsius\LWR@origtextcelsius%
\let\textohm\LWR@origtextohm%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
index 728d49952ca..ce142a3f2b9 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tikz.sty
@@ -25,18 +25,21 @@
{\usetikzlibrary{babel}\booltrue{LWR@tikzbabel}}
{\boolfalse{LWR@tikzbabel}}
-\BeforeBeginEnvironment{tikzpicture}{%
-\begin{lateximage}%
-\ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0
-{}%
-{\catcode`\$=3}% dollar sign is math shift
+\LetLtxMacro\LWR@origtikzpicture\tikzpicture
+
+\renewcommand*{\tikzpicture}[1][]{%
+ \begin{lateximage}%
+ \ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0
+ {}%
+ {\catcode`\$=3}% dollar sign is math shift
+ \LWR@origtikzpicture[#1]%
}
-\AfterEndEnvironment{tikzpicture}{%
-\end{lateximage}%
-\ifbool{LWR@tikzbabel}% Test for Tikz version v3.0.0
-{}%
-{\catcode`\$=\active}%
+\LetLtxMacro\LWR@origendtikzpicture\endtikzpicture
+
+\renewcommand*{\endtikzpicture}{%
+ \LWR@origendtikzpicture%
+ \end{lateximage}%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
index 64e51ce6f48..e34b3820fd0 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-titling.sty
@@ -57,6 +57,11 @@
##1%
}% \@makefntext
}
+\renewcommand{\thanksfootmark}{%
+ \thanksscript{%
+ \thanksfootpre \tamark \thanksfootpost%
+ }%
+}
\renewcommand*{\maketitle}{%
\begin{titlepage}
\@bsmarkseries
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
index a76d19b9b3c..db18fe54081 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
@@ -27,8 +27,7 @@
\setlength{\leftmargini}{\HTMLleftmargini}
}{}
\LWR@forcenewpage
-\LWR@atbeginverbatim{verse}
-\unskip\LWR@origvspace{-\baselineskip}
+\LWR@atbeginverbatim{3.5}{verse}%
}
\AtEndEnvironment{verse}{
\LWR@afterendverbatim
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty
index e5461c13c06..a045a12d9b9 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-vwcol.sty
@@ -19,7 +19,7 @@
\newcommand*{\LWR@vwcol@addrule}[1]{%
\appto{\LWR@vwcolstyle}{%
#1: %
- \LWR@printlength{\vwcol@rule} solid \#\LWR@vwcol@rulecolor ; %
+ \LWR@printlength{\vwcol@rule} solid \LWR@origpound\LWR@vwcol@rulecolor ; %
}%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
index eabfabe7f1e..b5dafa63d0d 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
@@ -28,7 +28,7 @@
\LetLtxMacro\LWRorigprint@fcolorbox\fcolorbox
\LetLtxMacro\LWRorigprint@fcolorboxBlock\fcolorbox
\LetLtxMacro\LWRorigprint@boxframe\boxframe
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\LetLtxMacro\textcolor\LWRprint@textcolor%
\LetLtxMacro\pagecolor\LWRprint@pagecolor%
\LetLtxMacro\nopagecolor\LWRprint@nopagecolor%
@@ -36,9 +36,7 @@
\LetLtxMacro\fcolorbox\LWRprint@fcolorbox%
\LetLtxMacro\boxframe\LWRorigprint@boxframe%
}
-\newcommand*{\LWR@tempcolor}{}
-\newcommand*{\LWR@tempcolortwo}{}
-\newcommand*{\LWR@findcurrenttextcolor}{%
+\renewcommand*{\LWR@findcurrenttextcolor}{%
\protect\colorlet{LWR@current@color}{.}%
\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor%
}
@@ -47,14 +45,14 @@
\LWR@findcurrenttextcolor%
\ifdefstring{\LWR@tempcolor}{000000}%
{}%
-{color: \#\LWR@tempcolor ; }%
+{color: \LWR@origpound\LWR@tempcolor ; }%
}
-\newcommand*{\LWR@textcurrentcolor}[1]{%
+\DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{%
\begingroup%
\LWR@FBcancel%
\LWR@findcurrenttextcolor%
-\InlineClass[color:\#\LWR@tempcolor]{textcolor}{%
- \renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}%
+\InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{%
+ \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}%
#1%
}%
\endgroup%
@@ -63,7 +61,7 @@
\begingroup%
\LWR@FBcancel%
\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
-\#\LWR@tempcolor%
+\LWR@origpound\LWR@tempcolor%
\endgroup%
}
\NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{%
@@ -78,13 +76,25 @@
border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; %
padding:\LWR@printlength{\fboxsep}%
}
-\RenewDocumentCommand{\textcolor}{O{named} m m}{%
+\RenewDocumentCommand{\textcolor}{o m m}{%
\begingroup%
+\IfValueTF{#1}{%
+ \color[#1]{#2}%
+}{%
+ \color{#2}%
+}%
\LWR@FBcancel%
+\IfValueTF{#1}{%
\InlineClass[color:\LWR@colorstyle{#1}{#2}]{textcolor}{%
-\renewcommand*{\LWR@currenttextcolor}{\#\LWR@tempcolor}%
+\renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}%
+#3%
+}%
+}{%
+\InlineClass[color:\LWR@colorstyle{named}{#2}]{textcolor}{%
+\renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}%
#3%
}%
+}%
\endgroup%
}
@@ -150,7 +160,7 @@ padding:\LWR@printlength{\fboxsep}%
{% yes background color
\convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
\begin{BlockClass}[%
- background:\#\LWR@tempcolortwo\ ; %
+ background:\LWR@origpound\LWR@tempcolortwo\ ; %
\LWR@borderpadding{#1}{#2}%
]{fcolorboxBlock}
#5
@@ -179,7 +189,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
{\LWR@subfcolorminipage{#1}{#2}{}{#6}}%
{%
\convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
- \LWR@subfcolorminipage{#1}{#2}{background:\#\LWR@tempcolortwo\ ; }{#6}%
+ \LWR@subfcolorminipage{#1}{#2}{background:\LWR@origpound\LWR@tempcolortwo\ ; }{#6}%
}%
}
{\end{BlockClass}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
index 22f5657eba6..153ae8015f3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
@@ -20,14 +20,14 @@
\AtBeginDocument{
-\preto{\xy}{\begin{lateximage}[xy image]}
+\preto{\xy}{\begin{lateximage}[(xy)]}
\appto{\endxy}{\end{lateximage}}
\@ifundefined{xymatrix}{}{
\LetLtxMacro\LWR@origxymatrix\xymatrix
\renewcommand{\xymatrix}[1]{%
-\begin{lateximage}[xymatrix]
+\begin{lateximage}[(xymatrix)]
\LWR@origxymatrix{#1}
\end{lateximage}
}
@@ -37,7 +37,7 @@
\LetLtxMacro\LWR@origxygraph\xygraph
\renewcommand{\xygraph}[1]{%
-\begin{lateximage}[xygraph]
+\begin{lateximage}[(xygraph)]
\LWR@origxygraph{#1}
\end{lateximage}
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-zwpagelayout.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-zwpagelayout.sty
index 48da87ded96..f6b414d8ac4 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-zwpagelayout.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-zwpagelayout.sty
@@ -61,7 +61,7 @@
\def\UserRightMargin{1in}
\def\UserTopMargin{1in}
\def\UserBotMargin{1in}
-\def\thePageNumber{\#\,\arabic{page}}
+\def\thePageNumber{\LWR@origpound\,\arabic{page}}
\ifXeTeX
\def\ifcaseZWdriver{\ifcase2}
\else
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 753a687aab8..62fb3a6e8b5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2018/03/03 v0.50 Allows LaTeX to directly produce HTML5 output.]
+ [2018/03/24 v0.51 Allows LaTeX to directly produce HTML5 output.]
@@ -113,6 +113,7 @@
\newbool{warpingprint}
\newbool{warpingHTML}
\newbool{mathjax}
+\newbool{LWR@origmathjax}
\booltrue{warpingprint}%
\boolfalse{warpingHTML}%
\boolfalse{mathjax}%
@@ -131,10 +132,12 @@
\DeclareVoidOption{mathsvg}{%
\PackageInfo{lwarp}{Using option 'mathsvg'}
\boolfalse{mathjax}%
+\boolfalse{LWR@origmathjax}%
}
\DeclareVoidOption{mathjax}{%
\PackageInfo{lwarp}{Using option 'mathjax'}
\booltrue{mathjax}%
+\booltrue{LWR@origmathjax}%
}
\DeclareStringOption[\jobname]{BaseJobname}
@@ -276,6 +279,11 @@ For a possible alternative, see package(s) #2.}
\LWR@notmemoirloadafter{chngpage}
\LWR@loadafter{chappg}
\LWR@loadafter{chapterbib}
+\LWR@loadafter{chemfig}
+\LWR@loadafter{chemformula}
+\LWR@loadafter{chemgreek}
+\LWR@loadafter{chemmacros}
+\LWR@loadafter{chemnum}
\LWR@loadafter{cite}
\LWR@loadafter{color}
\LWR@loadafter{colortbl}
@@ -299,6 +307,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{enumitem}
\LWR@notmemoirloadafter{epigraph}
\LWR@loadafter{epstopdf}
+\LWR@loadafter{epstopdf-base}
\LWR@loadafter{eso-pic}
\LWR@loadafter{everypage}
\LWR@loadafter{everyshi}
@@ -334,6 +343,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{geometry}
\LWR@loadafter{glossaries}
\LWR@loadafter{grffile}
+\LWR@loadafter{grid}
\LWR@loadafter{hang}
\LWR@loadafter{hanging}
\LWR@loadafter{hypcap}
@@ -355,6 +365,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{longtable}
\LWR@loadafter{lscape}
\LWR@loadafter{ltcaption}
+\LWR@loadafter{ltxgrid}
\LWR@loadafter{ltxtable}
\LWR@loadafter{luacolor}
\LWR@loadafter{luatodonotes}
@@ -365,6 +376,7 @@ For a possible alternative, see package(s) #2.}
\LWR@loadafter{mdframed}
\LWR@loadafter{memhfixc}
\LWR@loadafter{metalogo}
+\LWR@loadafter{mhchem}
\LWR@loadafter{microtype}
\LWR@loadafter{midfloat}
\LWR@loadafter{midpage}
@@ -511,10 +523,6 @@ top=1in,bottom=1in,%
\RequirePackage{xparse}
-\@ifundefined{AfterPackage}%
-{
-\RequirePackage{afterpackage}
-}{}
\end{warpall}
@@ -898,7 +906,7 @@ top=1in,bottom=1in,%
\LetLtxMacro\LWR@origmbox\mbox
\LetLtxMacro\LWR@origmakebox\makebox
-
+\chardef\LWR@origpound=`\#
\let\LWR@origcomma\,
\let\LWR@origtilde~
\let\LWR@origenskip\enskip
@@ -1050,12 +1058,12 @@ top=1in,bottom=1in,%
\LetLtxMacro{\c}{\LWR@origc}%
\LetLtxMacro{\d}{\LWR@origd}%
\LetLtxMacro{\b}{\LWR@origb}%
-}
+}%
\else% XeLaTeX, LuaLaTeX:
\newcommand*{\LWR@restoreorigaccents}{%
\LetLtxMacro{\t}{\LWR@origt}%
-}
-\fi
+}%
+\fi%
}% AtBeginDocument
\end{warpHTML}
@@ -2085,7 +2093,9 @@ div.flushright{text-align:right;}
div.flushright table {margin-left:auto ; margin-right: 0em ;}
/* Fancybox */
-div.Btrivlist table tr td { padding: .2ex 0em ; }
+div.Btrivlist table tr td {
+ padding: .2ex 0em ;
+}
/* program listing callouts: */
span.callout {
@@ -2201,12 +2211,11 @@ a.linkhome { font-weight:bold ; font-size: 1em ;}
div.lateximagesource { padding: 0px ; margin: 0px ; display: none; }
img.lateximage{
- padding: 0px 0px 0px 0px ;
+ padding: 0pt ;
+ margin: 0pt ;
box-shadow: none ;
border: none ;
background: none ;
- margin: 0px 0px -.15ex 0px ;
- /* pdfcrop leaves a slight margin, adjust to baseline */
max-width: 100% ;
border-radius: 0ex ;
border: none ;
@@ -2934,11 +2943,11 @@ nav.botnavigation {
\begin{warpprint}
\begin{filecontents*}{lwarp_one_limage.txt}
@echo off
-pdfseparate -f %1 -l %1 %4_html.pdf lateximages\lateximagetemp-%%d.pdf"
-pdfcrop lateximages\lateximagetemp-%1.pdf lateximages\%3.pdf
-pdftocairo -svg lateximages\%3.pdf lateximages\%3.svg
+pdfseparate -f %1 -l %1 %4_html.pdf lateximages\lateximagetemp-%%d.pdf
+pdfcrop --hires lateximages\lateximagetemp-%1.pdf lateximages\%3.pdf
+pdftocairo -svg -noshrink lateximages\%3.pdf lateximages\%3.svg
del lateximages\%3.pdf
-del lateximages\lateximagetemp-%1.pdf"
+del lateximages\lateximagetemp-%1.pdf
exit
\end{filecontents*}
\end{warpprint}
@@ -3057,7 +3066,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.50"
+printversion = "v0.51"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3421,11 +3430,11 @@ cmdgroupopenname ..
"lateximages" .. dirslash .."lateximagetemp-%d" .. ".pdf" ..
seqname ..
-- Crop the image:
-"pdfcrop lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
+"pdfcrop --hires lateximages" .. dirslash .. "lateximagetemp-" .. lwimgpage .. ".pdf " ..
"lateximages" .. dirslash .. lwimgname .. ".pdf" ..
seqname ..
-- Convert the image to svg:
-"pdftocairo -svg lateximages" .. dirslash .. lwimgname .. ".pdf " ..
+"pdftocairo -svg -noshrink lateximages" .. dirslash .. lwimgname .. ".pdf " ..
"lateximages" .. dirslash .. lwimgname ..".svg" ..
seqname ..
-- Remove the temporary files:
@@ -3831,7 +3840,7 @@ end -- not --version
\LWR@origampersand#1;%
\endgroup
}
-\newcommand*{\HTMLunicode}[1]{\HTMLentity{\#x#1}}
+\newcommand*{\HTMLunicode}[1]{\HTMLentity{\LWR@origpound{}x#1}}
\renewrobustcmd*{\&}{\HTMLentity{amp}}
@@ -4042,7 +4051,7 @@ end -- not --version
\renewrobustcmd*{\FBthinspace}{%
\begingroup%
\LWR@FBcancel%
- \LWR@origampersand\#x202f;% \,
+ \LWR@origampersand\LWR@origpound{}x202f;% \,
\endgroup%
}%
\renewrobustcmd*{\FBguillspace}{%
@@ -4054,7 +4063,7 @@ end -- not --version
\DeclareDocumentCommand{\FBmedkern}{}{%
\begingroup%
\LWR@FBcancel%
- \LWR@origampersand\#x202f;% \,
+ \LWR@origampersand\LWR@origpound{}x202f;% \,
\endgroup%
}%
\DeclareDocumentCommand{\FBthickkern}{}{%
@@ -4133,7 +4142,7 @@ end -- not --version
}
\NewDocumentCommand{\LWR@htmlspanclass}{o m +m}{%
-\LWR@traceinfo{LWR@htmlspanclass #2}%
+\LWR@traceinfo{LWR@htmlspanclass |#1|#2|}%
\LWR@ensuredoingapar%
\LWR@subhtmlelementclass{span}[#1]{#2}%
\begin{LWR@nestspan}%
@@ -4187,7 +4196,7 @@ end -- not --version
\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} m}{%
-\LWR@traceinfo{LWR@subhtmlelementclass #1 #3}%
+\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!}%
\ifblank{#2}%
{\LWR@htmltag{#1 class="#3"}}% empty option
{\LWR@htmltag{#1 class="#3" style="#2"}}% non-empty option
@@ -4711,7 +4720,7 @@ end -- not --version
{\textless}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}%
{\textgreater}{-}[\LWR@thisnewfilename]
-\StrSubstitute{\LWR@thisnewfilename}{\#}{-}[\LWR@thisnewfilename]
+\StrSubstitute{\LWR@thisnewfilename}{\LWR@origpound}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\_}{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\ }{-}[\LWR@thisnewfilename]
\StrSubstitute{\LWR@thisnewfilename}{\%}{-}[\LWR@thisnewfilename]
@@ -4766,6 +4775,18 @@ end -- not --version
}%
}
+\newcommand{\LWR@nullifymathjaxensuremath}{%
+\ifbool{mathjax}{
+\LWR@stoppars
+\LWR@htmlcomment{Nullify \textbackslash{}ensuremath for MathJax:}
+
+\(
+\newcommand\ensuremath[1]{##1}
+\)
+\LWR@startpars
+}{}
+}
+
\newcommand*{\LWR@newhtmlfile}[1]{
\LWR@traceinfo{LWR@newhtmlfile}
@@ -4839,6 +4860,7 @@ end -- not --version
\LWR@stoppars
+\LWR@nullifymathjaxensuremath
\LWR@traceinfo{LWR@newhtmlfile: done}
}
@@ -5264,6 +5286,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\immediate\write\@mainaux{\catcode`\string$\active}%
\LetLtxMacro\LWR@syntaxhighlightone$% balance for editor syntax highlighting
\LWR@startpars
+\LWR@nullifymathjaxensuremath
\LWR@traceinfo{LWR@lwarpStart: done}
}
\catcode`\$=3% math shift until lwarp starts
@@ -5475,41 +5498,38 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\end{warpHTML}
\begin{warpall}
-\AfterPackage{titling}{
\newcommand*{\AddSubtitlePublished}{%
-
-\newcommand{\@published}{}
-
-\newcommand{\published}[1]{\gdef\@published{##1}}
-
-\renewcommand*{\maketitlehooka}{\printpublished}
-
-\newcommand*{\printpublished}{%
-\warpprintonly{\begin{center}\unskip}%
-\begin{BlockClass}{published}%
-\warpprintonly{\large\itshape}%
-\@published%
-\end{BlockClass}%
-\warpprintonly{\end{center}}%
-}
-
-\newcommand{\@subtitle}{}
-
-\newcommand{\subtitle}[1]{\gdef\@subtitle{##1}}
-
-\renewcommand*{\maketitlehookb}{\printsubtitle}
-
-\newcommand*{\printsubtitle}{%
-\warpprintonly{\begin{center}\unskip}%
-\begin{BlockClass}{subtitle}%
-\warpprintonly{\Large\itshape}%
-\@subtitle%
-\end{BlockClass}%
-\warpprintonly{\end{center}}%
-}
-
+\@ifpackageloaded{titling}{% yes titling package
+ \newcommand{\@published}{}%
+ \newcommand{\published}[1]{\gdef\@published{##1}}%
+ \renewcommand*{\maketitlehooka}{\printpublished}%
+ \newcommand*{\printpublished}{%
+ \warpprintonly{\begin{center}\unskip}%
+ \begin{BlockClass}{published}%
+ \warpprintonly{\large\itshape}%
+ \@published%
+ \end{BlockClass}%
+ \warpprintonly{\end{center}}%
+ }%
+ \newcommand{\@subtitle}{}%
+ \newcommand{\subtitle}[1]{\gdef\@subtitle{##1}}%
+ \renewcommand*{\maketitlehookb}{\printsubtitle}%
+ \newcommand*{\printsubtitle}{%
+ \warpprintonly{\begin{center}\unskip}%
+ \begin{BlockClass}{subtitle}%
+ \warpprintonly{\Large\itshape}%
+ \@subtitle%
+ \end{BlockClass}%
+ \warpprintonly{\end{center}}%
+ }%
+}% yes titling package
+{% no titling package
+ \newcommand{\published}[1]{}%
+ \newcommand*{\printpublished}{}%
+ \newcommand{\subtitle}{}%
+ \newcommand*{\printsubtitle}%
+}% no titling package
}% \AddSubtitlePublished
-}% AfterPackage
\end{warpall}
@@ -5588,14 +5608,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newbool{LWR@verbtags}
\booltrue{LWR@verbtags}
-\newcommand*{\LWR@atbeginverbatim}[2][]
+\newcommand*{\LWR@atbeginverbatim}[3][]
{%
\setlength{\parskip}{0ex}%
\LWR@stoppars%
\ifbool{LWR@verbtags}{%
- \LWR@htmltag{pre class="#2"
- \ifthenelse{\equal{#1}{}}{}{style="#1"}%
-}\LWR@orignewline% pre
+ \LWR@htmltag{pre class="#3"
+ \ifthenelse{\equal{#1}{}}{}{style="#1"}%
+ }%
+ \unskip\LWR@origvspace*{-#2\baselineskip}%
+ \LWR@orignewline% pre
}{}%
\begingroup%
\LWR@orignormalsize%
@@ -5618,7 +5640,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\renewcommand{\verbatim@input}[2]{%
\ifbool{LWR@verbtags}{\LWR@forcenewpage}{}%
-\LWR@atbeginverbatim{Verbatim}\unskip\LWR@origvspace*{-\baselineskip}%%
+\LWR@atbeginverbatim{3.5}{Verbatim}%
\LWRV@origverbatim@input{#1}{#2}%
\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
}
@@ -5627,7 +5649,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{Patching verbatim.}
\AtBeginEnvironment{verbatim}{%
\LWR@forcenewpage%
-\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-2\baselineskip}%
+\LWR@atbeginverbatim{.5}{verbatim}%
+\unskip\LWR@origvspace*{-1.5\baselineskip}%
}
\AfterEndEnvironment{verbatim}{%
\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
@@ -5638,7 +5661,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@traceinfo{Patching tabbing.}
\AtBeginEnvironment{tabbing}{%
\LWR@forcenewpage
-\LWR@atbeginverbatim{tabbing}\unskip\LWR@origvspace*{-\baselineskip}%
+\LWR@atbeginverbatim{3.5}{tabbing}%
}
\AfterEndEnvironment{tabbing}{%
\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim%
@@ -5710,7 +5733,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\refstepcounter\@listctr
\fi
\fi
- \makelabel{#1}%
+ \makelabel{#1} % extra space
\ignorespaces%
}
@@ -6288,7 +6311,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}{%
\LWR@htmltag{%
tr class="hline" %
- style="border-top: 1px solid \#\LWR@ruleHTMLcolor "%
+ style="border-top: 1px solid \LWR@origpound\LWR@ruleHTMLcolor "%
}%
}%
\LWR@orignewline%
@@ -6301,7 +6324,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}{%
\LWR@htmltag{%
tr class="tbrule" %
- style="border-top: 1px solid \#\LWR@ruleHTMLcolor "%
+ style="border-top: 1px solid \LWR@origpound\LWR@ruleHTMLcolor "%
}%
}%
\LWR@orignewline%
@@ -6529,14 +6552,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
border-top:\LWR@printlength{\LWR@atleastonept} solid %
\ifdefvoid{\LWR@ruleHTMLcolor}{%
\ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
- {\#A0A0A0}%
+ {\LWR@origpound{}A0A0A0}%
{% lightrule or heaver
\ifdimcomp{#1}{<}{\LWR@heavyrulewidth}%
- {\#808080}%
+ {\LWR@origpound{}808080}%
{black}%
}% lightrule or heavier
}{%
- \#\LWR@ruleHTMLcolor%
+ \LWR@origpound\LWR@ruleHTMLcolor%
}
}% custom width and/or color
}
@@ -6571,12 +6594,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifdefvoid{\LWR@xcolorrowHTMLcolor}{}%
{% xcolor row color
\LWR@tdaddstyle%
- background:\#\LWR@xcolorrowHTMLcolor%
+ background:\LWR@origpound\LWR@xcolorrowHTMLcolor%
}%
}%
{% explicit row color
\LWR@tdaddstyle%
- background:\#\LWR@rowHTMLcolor%
+ background:\LWR@origpound\LWR@rowHTMLcolor%
}%
}%
}
@@ -6589,7 +6612,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifdefvoid{\LWR@ruleHTMLcolor}{}%
{%
\LWR@tdaddstyle%
- border-top: 1px solid \#\LWR@ruleHTMLcolor%
+ border-top: 1px solid \LWR@origpound\LWR@ruleHTMLcolor%
}{}%
}{}%
}
@@ -6601,13 +6624,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
\ifdefstring{\LWR@tempone}{tvertbarl}{%
\LWR@tdaddstyle%
- border-left: 1px solid \#\LWR@vertruleHTMLcolor%
+ border-left: 1px solid \LWR@origpound\LWR@vertruleHTMLcolor%
}{}%
}{}%
\edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tablecolindex}}}%
\ifdefstring{\LWR@tempone}{tvertbarr}{%
\LWR@tdaddstyle%
- border-right: 1px solid \#\LWR@vertruleHTMLcolor%
+ border-right: 1px solid \LWR@origpound\LWR@vertruleHTMLcolor%
}{}%
}%
}
@@ -6616,7 +6639,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newcommand*{\LWR@subaddtabularcellcolor}[1]{%
\LWR@htmltag{div class="cellcolor" style="%
- background:\#{}#1 %
+ background:\LWR@origpound{}{}#1 %
" }%
\addtocounter{LWR@cellcolordepth}{1}%
}
@@ -6734,11 +6757,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\ifbool{LWR@tabularmutemods}{}{%
\ifbool{LWR@mcolvertbarl}{%
\LWR@tdaddstyle%
- border-left: 1px solid \#\LWR@vertruleHTMLcolor%
+ border-left: 1px solid \LWR@origpound\LWR@vertruleHTMLcolor%
}{}%
\ifbool{LWR@mcolvertbarr}{%
\LWR@tdaddstyle%
- border-right: 1px solid \#\LWR@vertruleHTMLcolor%
+ border-right: 1px solid \LWR@origpound\LWR@vertruleHTMLcolor%
}{}%
}%
}
@@ -7319,7 +7342,7 @@ rowspan="#2" %
\LWR@traceinfo{LWR@startref B}%
\LWR@origmbox{\LWR@htmlrefsectionfilename{#1}}%
\LWR@traceinfo{LWR@startref C}%
-\#%
+\LWR@origpound%
\LWR@traceinfo{LWR@startref D: !#1!}%
\ifthenelse{\equal{\LWR@lidref}{??}}%
{%
@@ -7492,10 +7515,15 @@ autopage-\theLWR@currentautosec%
\boolfalse{LWR@freezethisautoid}
\newcommand*{\LWR@newautoidanchor}{%
-\ifbool{LWR@freezethisautoid}{}{%
- \addtocounter{LWR@thisautoid}{1}%
- \LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
-}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+{}%
+{
+ \ifbool{LWR@freezethisautoid}{}{%
+ \addtocounter{LWR@thisautoid}{1}%
+ \LWR@htmltag{a id="\LWR@origmbox{autoid-\arabic{LWR@thisautoid}}"}%
+ \LWR@htmltag{/a}%
+ }%
+}
}
\newcommand*{\@captype}{}
@@ -7590,8 +7618,10 @@ autopage-\theLWR@currentautosec%
\renewcommand*{\addcontentsline}[3]{%
\ifstrequal{#1}{toc}{}{% not TOC
- \LWR@newautoidanchor%
- \ifthenelse{\equal{#1}{thm}}{\csdef{ext@#2}{thm}}{}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}
+ {\LWR@newautoidanchor}%
+ \ifcsvoid{ext@#2}{\csdef{ext@#2}{#1}}{}%
\addtocontents{\@nameuse{ext@#2}}{%
\protect\LWRsetnextfloat%
{\arabic{LWR@latestautopage}}%
@@ -7751,7 +7781,7 @@ autopage-\theLWR@currentautosec%
\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}{%
\LWR@startpars%
\LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{autopage-#4}\#\LWR@origmbox{autosec-#4}%
+ \LWR@htmlrefsectionfilename{autopage-#4}\LWR@origpound\LWR@origmbox{autosec-#4}%
}{#3}{toc#2}%
\LWR@stoppars%
}
@@ -7780,7 +7810,7 @@ autopage-\theLWR@currentautosec%
\LWR@startpars%
\LWR@subhyperrefclass{%
\LWR@htmlrefsectionfilename{autopage-\arabic{LWR@nextautopage}}%
- \#\LWR@origmbox{autoid-\arabic{LWR@nextautoid}}}%
+ \LWR@origpound\LWR@origmbox{autoid-\arabic{LWR@nextautoid}}}%
{#4}{toc#2}%
\LWR@stoppars%
}{}%
@@ -7942,9 +7972,9 @@ autopage-\theLWR@currentautosec%
\let\llap\LWR@origllap%
\let\rlap\LWR@origrlap%
\let\hfilneg\LWR@orighfilneg%
-\let\raggedright\LWR@origraggedright
-\let\raggedleft\LWR@origraggedleft
-\let\centering\LWR@origcentering
+\let\raggedright\LWR@origraggedright%
+\let\raggedleft\LWR@origraggedleft%
+\let\centering\LWR@origcentering%
\let\,\LWR@origcomma% disable HTML short unbreakable space
\let\textellipsis\LWR@origtextellipsis%
\let\textless\LWR@origtextless%
@@ -8015,8 +8045,6 @@ autopage-\theLWR@currentautosec%
\let\LaTeXe\LWR@origLaTeXe%
\renewcommand*{\Xe}{X\textsubscript{E}}%
\LetLtxMacro\@ensuredmath\LWR@origensuredmath%
-\csletcs{equation*}{LWR@origequationstar}%
-\csletcs{endequation*}{LWR@origendequationstar}%
\LWR@restoreorigaccents%
\LWR@restoreoriglists%
\LWR@FBcancel%
@@ -8024,105 +8052,113 @@ autopage-\theLWR@currentautosec%
\end{warpHTML}
\begin{warpHTML}
+\newcounter{LWR@externalfilecnt}
+
+\newbool{LWR@indisplaymathimage}
+
\let\LWR@origtextdollar\$
\renewcommand*{\$}{%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{\LWR@origtextdollar}%
-{\LWR@htmltagc{span}\LWR@origtextdollar\LWR@htmltagc{/span}}%
+{\HTMLentity{dollar}}%
}
-\newcounter{LWR@externalfilecnt}
-
-\LetLtxMacro\LWR@origdollar$
-\LetLtxMacro\LWR@secondorigdollar$% balance for editor syntax highlighting
-
-\LetLtxMacro\LWR@origopenparen\(
-\LetLtxMacro\LWR@origcloseparen\)
-\LetLtxMacro\LWR@origopenbracket\[
-\LetLtxMacro\LWR@origclosebracket\]
-
-\begingroup
-\catcode`\$=\active%
-\protected\gdef${\@ifnextchar$\LWR@doubledollar\LWR@singledollar}%
-
-\protected\gdef\LWR@doubledollar$#1$${
-\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
-{
-
- \textbackslash[%
- \LWR@HTMLsanitize{#1}%
- \textbackslash]
+\AtBeginDocument{
-}% mathjax
-{% not mathjax
+\@ifpackageloaded{graphicx}{
+ \newcommand*{\LWR@addbaselinemarker}{%
+ \LWR@origincludegraphics[%
+ width=10sp,height=10sp%
+ ]{lwarp_baseline_marker.png}%
+ }
+}{
+ \@ifpackageloaded{graphics}{
+ \newcommand*{\LWR@addbaselinemarker}{%
+ \LWR@origincludegraphics{lwarp_baseline_marker.png}%
+ }
+ }{
+ \newcommand*{\LWR@addbaselinemarker}{%
+ \hspace*{10sp}%
+ }
+ }
+}
- \begin{BlockClass}{displaymath}
- \begin{lateximage}%
- [%
- \textbackslash{[} % extra space
- \LWR@HTMLsanitize{#1} % extra space
- \textbackslash{]}%
- ]%
- \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
- \end{lateximage}%
- \end{BlockClass}
+}% AtBeginDocument
-}% not mathjax
-}%
\newlength{\LWR@singledollarwidth}
\newlength{\LWR@singledollarheight}
\newlength{\LWR@singledollardepth}
-\protected\gdef\LWR@subsingledollar#1#2{%
+\newsavebox{\LWR@singledollarbox}
+
+\NewDocumentCommand{\LWR@subsingledollar}{s m m m}{%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+{%
+ #4% contents
+}%
+{% not in a lateximage
\begingroup%
\ifboolexpr{%
(
bool{mathjax} or
( bool{FormatWP} and bool{WPMarkMath} )
) and
- ( not test { \ifstrequal {#1} {math image} } )
+ ( not test { \ifstrequal {#2} {(math image)} } )% from \ensuredmath
}%
{%
- {\textbackslash(\LWR@HTMLsanitize{#2}\textbackslash)}%
+ {\textbackslash(\LWR@HTMLsanitize{#4}\textbackslash)}%
}% mathjax
{% not mathjax
+ \begingroup%
\LWR@restoreorigformatting%
+ \RenewDocumentEnvironment{lateximage}{s o o o}{}{}% inside group
\LWR@orignormalsize%
- \global\setlength{\LWR@singledollardepth}{\depthof{%
- \LWR@origdollar#2\LWR@origdollar%
- }*\real{.8}}%
- \global\setlength{\LWR@singledollarwidth}{\widthof{%
- \LWR@origdollar#2\LWR@origdollar%
- }*\real{.8}}%
- \global\setlength{\LWR@singledollarheight}{\totalheightof{%
- \LWR@origdollar#2\LWR@origdollar%
- }*\real{.8}}%
- \LWR@origscriptsize%
- \ifdimgreater{\LWR@singledollarwidth}{\LWR@singledollarheight}{%
+ \csuse{LWR@orig\LWR@f@family family}%
+ \csuse{LWR@orig\LWR@f@series series}%
+ \csuse{LWR@orig\LWR@f@shape shape}%
+ \global\advance\c@LWR@lateximagedepth 1\relax%
+ \global\sbox{\LWR@singledollarbox}{#4}%
+ \global\sbox{\LWR@singledollarbox}{%
+ \usebox{\LWR@singledollarbox}%
+ \hspace*{-10sp}%
+ \raisebox{-\dp\LWR@singledollarbox}{%
+ \LWR@addbaselinemarker%
+ }%
+ }%
+ \global\advance\c@LWR@lateximagedepth -1\relax% Due to AmS \text macro.
+ \setlength{\LWR@singledollardepth}{.70\dp\LWR@singledollarbox}%
+ \global\LWR@singledollardepth=\LWR@singledollardepth%
+ \setlength{\LWR@singledollarwidth}{.70\wd\LWR@singledollarbox}%
+ \global\LWR@singledollarwidth=\LWR@singledollarwidth%
+ \setlength{\LWR@singledollarheight}{.70\ht\LWR@singledollarbox}%
+ \addtolength{\LWR@singledollarheight}{.70\dp\LWR@singledollarbox}%
+ \global\LWR@singledollarheight=\LWR@singledollarheight%
+ \endgroup%
+ \ifdimgreater{\LWR@singledollarwidth}{.7\LWR@singledollarheight}{%
\def\LWR@singledollarstyle{%
width:\LWR@convertto{em}{\the\LWR@singledollarwidth} em%
}%
}{%
\def\LWR@singledollarstyle{%
- height:\LWR@convertto{em}{\the\LWR@singledollarheight }em%
+ height:\LWR@convertto{em}{\the\LWR@singledollarheight} em%
}%
}%
- \ifdimless{\LWR@singledollarwidth}{.8em}%
+ \ifdimless{\LWR@singledollarwidth}{.2em}%
{%
\def\LWR@singledollarstyle{%
- height:\LWR@convertto{em}{\the\LWR@singledollarheight }em%
+ height:\LWR@convertto{em}{\the\LWR@singledollarheight} em%
}%
}%
{}%
- \ifdimless{\LWR@singledollarheight}{.3em}%
+ \ifdimless{\LWR@singledollarheight}{.2em}%
{%
\def\LWR@singledollarstyle{%
width:\LWR@convertto{em}{\the\LWR@singledollarwidth} em%
}%
}%
{}%
- \ifdimgreater{\LWR@singledollardepth}{0.01em}{%
+ \ifdimgreater{\LWR@singledollardepth}{0.05ex}{%
\def\LWR@singledollardepthstyle{%
\ ; % extra space
\LWR@origmbox{%
@@ -8132,27 +8168,93 @@ autopage-\theLWR@currentautosec%
}{%
\def\LWR@singledollardepthstyle{}%
}%
- \ifblank{#1}{%
- \begin{lateximage}*%
- [%
- \textbackslash( %
- \LWR@HTMLsanitize{#2} % extra space
- \textbackslash)%
+ \IfValueTF{#1}{%
+ \LWR@findcurrenttextcolor% sets \LWR@tempcolor
+ \begin{lateximage}*% use hashing
+ [#2]% alt
+ [% addl' hashing
+ #3%
+ FM\LWR@f@family%
+ SR\LWR@f@series%
+ SH\LWR@f@shape%
+ CL\LWR@tempcolor%
]%
- [\LWR@singledollarstyle \LWR@singledollardepthstyle]%
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
}{%
- \begin{lateximage}%
- [#1]%
- [\LWR@singledollarstyle \LWR@singledollardepthstyle]%
+ \begin{lateximage}% no hashing
+ [#2]% alt
+ []% no add'l hashing
+ [\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
}%
- \LWR@origdollar#2\LWR@origdollar%
+ \LWR@addbaselinemarker%
+ \hspace*{-10sp}%
+ \usebox{\LWR@singledollarbox}%
+ \hspace*{-10sp}%
+ \LWR@addbaselinemarker%
\end{lateximage}%
-}%
+}% not mathjax
\endgroup%
+}% not in a lateximage
}
+\LetLtxMacro\LWR@origdollar$
+\LetLtxMacro\LWR@secondorigdollar$% balance for editor syntax highlighting
+
+\LetLtxMacro\LWR@origopenparen\(
+\LetLtxMacro\LWR@origcloseparen\)
+\LetLtxMacro\LWR@origopenbracket\[
+\LetLtxMacro\LWR@origclosebracket\]
+
+\begingroup
+\catcode`\$=\active%
+\protected\gdef${\@ifnextchar$\LWR@doubledollar\LWR@singledollar}%
+
+\protected\gdef\LWR@newsingledollar{\@ifnextchar$\LWR@doubledollar\LWR@singledollar}%
+
+\protected\gdef\LWR@doubledollar$#1$${%
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+
+ \textbackslash[%
+ \LWR@HTMLsanitize{#1}%
+ \textbackslash]
+
+}% mathjax
+{% not mathjax
+ \begin{BlockClass}{displaymath}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}%
+ [%
+ \textbackslash{[} % extra space
+ \LWR@HTMLsanitize{#1} % extra space
+ \textbackslash{]}%
+ ]%
+ \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
+ \end{lateximage}%
+ \end{BlockClass}%
+}% not mathjax
+}%
\protected\gdef\LWR@singledollar#1${%
-\LWR@subsingledollar{}{#1}%
+\ifbool{mathjax}{%
+\LWR@subsingledollar*%
+ {% alt tag
+ \textbackslash( %
+ \LWR@HTMLsanitize{#1} % extra space
+ \textbackslash)%
+ }%
+ {singledollar}% add'l hashing
+ {#1}% contents
+}{% not mathjax
+\LWR@subsingledollar*%
+ {% alt tag
+ \textbackslash( %
+ \LWR@HTMLsanitize{#1} % extra space
+ \textbackslash)%
+ }%
+ {singledollar}% add'l hashing
+ {\LWR@origensuredmath{#1}}% contents
+}% not mathjax
}
\protected\gdef\(#1\){$#1$}
@@ -8160,16 +8262,27 @@ autopage-\theLWR@currentautosec%
\endgroup
+\LetLtxMacro\LWR@openbracketnormal\[
+\LetLtxMacro\LWR@closebracketnormal\]
+
\LetLtxMacro\LWR@origensuredmath\@ensuredmath
\renewcommand{\@ensuredmath}[1]{%
\ifbool{mathjax}{%
- \LWR@subsingledollar{math image}{\relax#1}%
+ \LWR@subsingledollar*{(math image)}{\LWR@HTMLsanitize{#1}}{\relax%
+ \LWR@origensuredmath{#1}%
+ }%
}{% SVG math
\ifmmode%
\LWR@origensuredmath{#1}%
\else%
- \LWR@subsingledollar{math image}{\relax#1}%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {\LWR@origensuredmath{#1}}%
+ {%
+ \LWR@subsingledollar*{(math image)}{\LWR@HTMLsanitize{#1}}{%
+ \LWR@origensuredmath{#1}%
+ }%
+ }%
\fi%
}%
}
@@ -8180,7 +8293,40 @@ autopage-\theLWR@currentautosec%
\let\enddisplaymath\relax
\NewEnviron{math}{\expandafter\(\BODY\)}
-\NewEnviron{displaymath}{\expandafter\[\BODY\]\@ignoretrue}
+\NewEnviron{LWR@displaymathnormal}{\expandafter\[\BODY\]\@ignoretrue}
+
+\LetLtxMacro\[\LWR@openbracketnormal%
+\LetLtxMacro\]\LWR@closebracketnormal%
+\LetLtxMacro\displaymath\LWR@displaymathnormal%
+\LetLtxMacro\enddisplaymath\endLWR@displaymathnormal%
+\newenvironment{LWR@displaymathother}
+{%
+ \begin{BlockClass}{displaymath}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}%
+ [(display math)]%
+ \LWR@origdollar\LWR@origdollar%
+}
+{%
+ \LWR@origdollar\LWR@origdollar%
+ \end{lateximage}%
+ \end{BlockClass}%
+}
+\newenvironment{LWR@equationother}
+{%
+ \begin{BlockClass}{displaymathnumbered}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}%
+ [(display math)]%
+ \LWR@origequation%
+}
+{%
+ \LWR@origendequation%
+ \end{lateximage}%
+ \end{BlockClass}%
+}
\newcounter{LWR@nextequation}
\newcommand*{\LWR@syncmathjax}{%
@@ -8240,6 +8386,8 @@ autopage-\theLWR@currentautosec%
}
{% not mathjax
\begin{BlockClass}{displaymathnumbered}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[%
(\LWR@equationtag) \textbackslash{begin\{equation\}} % extra space
\LWR@HTMLsanitizeexpand{\detokenize\expandafter{\BODY}} % extra space
@@ -8260,12 +8408,59 @@ autopage-\theLWR@currentautosec%
]
+\LetLtxMacro\LWR@equationnormal\equation
+\LetLtxMacro\LWR@endequationnormal\endequation
+
\csletcs{LWR@origequationstar}{equation*}
\csletcs{LWR@origendequationstar}{endequation*}
+
\renewenvironment*{equation*}
{\displaymath}
{\enddisplaymath}
+\csletcs{LWR@equationnormalstar}{equation*}
+\csletcs{LWR@endequationnormalstar}{endequation*}
+
+\LetLtxMacro\LWR@equationless\equation
+\LetLtxMacro\LWR@endequationless\endequation
+\csletcs{LWR@equationlessstar}{equation*}
+\csletcs{LWR@endequationlessstar}{endequation*}
+
+\newcommand*{\displaymathnormal}{%
+\ifbool{LWR@origmathjax}{\booltrue{mathjax}}{\boolfalse{mathjax}}%
+\LetLtxMacro\[\LWR@openbracketnormal%
+\LetLtxMacro\]\LWR@closebracketnormal%
+\LetLtxMacro\displaymath\LWR@displaymathnormal%
+\LetLtxMacro\enddisplaymath\endLWR@displaymathnormal%
+\LetLtxMacro\equation\LWR@equationnormal%
+\LetLtxMacro\endequation\LWR@endequationnormal%
+\csletcs{equation*}{LWR@equationnormalstar}%
+\csletcs{endequation*}{LWR@endequationnormalstar}%
+}
+
+\newcommand*{\displaymathother}{%
+\boolfalse{mathjax}%
+\LetLtxMacro\displaymath\LWR@displaymathother%
+\LetLtxMacro\enddisplaymath\endLWR@displaymathother%
+\LetLtxMacro\[\LWR@displaymathother%
+\LetLtxMacro\]\endLWR@displaymathother%
+\LetLtxMacro\equation\LWR@equationother%
+\LetLtxMacro\endequation\endLWR@equationother%
+\csletcs{equation*}{displaymath}%
+\csletcs{endequation*}{enddisplaymath}%
+}
+
+\end{warpHTML}
+
+\begin{warpprint}
+
+\newcommand*{\displaymathnormal}{}
+\newcommand*{\displaymathother}{}
+
+\end{warpprint}
+
+\begin{warpHTML}
+
\newbool{LWR@amsmultline}
\boolfalse{LWR@amsmultline}
@@ -8328,7 +8523,9 @@ autopage-\theLWR@currentautosec%
{% not mathjax
\ifbool{LWR@numbereqnarray}
{
- \begin{BlockClass}{displaymathnumbered}
+ \begin{BlockClass}{displaymathnumbered}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
\LWR@addmathjax{eqnarray}{\BODY}]
\LWR@origeqnarray
@@ -8339,6 +8536,8 @@ autopage-\theLWR@currentautosec%
}%
{% not LWR@numbereqnarray
\begin{BlockClass}{displaymath}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]
\LWR@origeqnarray
\BODY
@@ -8367,6 +8566,8 @@ autopage-\theLWR@currentautosec%
}
{
\begin{BlockClass}{displaymathnumbered}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbodynumbered{multline}]
}
}
@@ -8393,6 +8594,8 @@ autopage-\theLWR@currentautosec%
}
{
\begin{BlockClass}{displaymath}
+ \LWR@newautoidanchor
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbody{multline*}]
}
}
@@ -8419,7 +8622,9 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
- \begin{BlockClass}{displaymathnumbered}
+ \begin{BlockClass}{displaymathnumbered}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbodynumbered{gather}]
}
}
@@ -8445,6 +8650,8 @@ autopage-\theLWR@currentautosec%
}
{
\begin{BlockClass}{displaymath}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbody{gather*}]
}
}
@@ -8469,7 +8676,9 @@ autopage-\theLWR@currentautosec%
\LWR@beginhideamsmath
}
{
- \begin{BlockClass}{displaymathnumbered}
+ \begin{BlockClass}{displaymathnumbered}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbodynumbered{align}]
}
}
@@ -8495,6 +8704,8 @@ autopage-\theLWR@currentautosec%
}
{
\begin{BlockClass}{displaymath}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbody{align*}]
}
}
@@ -8520,6 +8731,8 @@ autopage-\theLWR@currentautosec%
}
{
\begin{BlockClass}{displaymathnumbered}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbodynumbered{flalign}]
}
}
@@ -8545,6 +8758,8 @@ autopage-\theLWR@currentautosec%
}
{
\begin{BlockClass}{displaymath}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
\begin{lateximage}[\LWR@amsmathbody{flalign*}]
}
}
@@ -8560,6 +8775,60 @@ autopage-\theLWR@currentautosec%
}
+\BeforeBeginEnvironment{alignat}{
+
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
+}
+{
+ \begin{BlockClass}{displaymathnumbered}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}[\LWR@amsmathbodynumbered{alignat}]
+}
+}
+
+\AfterEndEnvironment{alignat}{
+
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+ \LWR@endhideamsmath
+ \LWR@addmathjax{alignat}{\the\@envbody}
+}
+{\end{lateximage}\end{BlockClass}}
+
+}
+
+\BeforeBeginEnvironment{alignat*}{
+
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \LWR@beginhideamsmath
+}
+{
+ \begin{BlockClass}{displaymath}
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}[\LWR@amsmathbody{alignat*}]
+}
+}
+
+\AfterEndEnvironment{alignat*}{
+
+\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+{
+ \LWR@endhideamsmath
+ \LWR@addmathjax{alignat*}{\the\@envbody}
+}
+{\end{lateximage}\end{BlockClass}}
+
+}
+
\end{warpHTML}
\begin{warpHTML}
@@ -8583,43 +8852,36 @@ autopage-\theLWR@currentautosec%
\begin{warpHTML}
-\newcommand{\LWR@HTMLsanitize}[1]{%
+\newrobustcmd{\LWR@HTMLsanitize}[1]{%
\begingroup%
\LWR@FBcancel%
+\fullexpandarg%
\protect\StrSubstitute{\detokenize{#1}}%
-{\detokenize{&}}%
-{\detokenize{&amp;}}[\LWR@strresult]%
+{\detokenize{&}}{\detokenize{&amp;}}[\LWR@strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+{\detokenize{<}}{\detokenize{&lt;}}[\LWR@strresult]%
\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{<}}%
-{\detokenize{&lt;}}%
-[\LWR@strresult]%
+{\detokenize{>}}{\detokenize{&gt;}}[\LWR@strresult]%
\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{>}}%
-{\detokenize{&gt;}}%
-[\LWR@strresult]%
+{\detokenize{"}}{\detokenize{&quot;}}[\LWR@strresult]%
\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{##}}%
-{\#}%
-[\LWR@strresult]%
+{\detokenize{##}}{\LWR@origpound}[\LWR@strresult]%
\LWR@strresult%
\endgroup%
}
-\newcommand{\LWR@HTMLsanitizeexpand}[1]{%
+\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{%
\begingroup%
\LWR@FBcancel%
+\fullexpandarg%
\protect\StrSubstitute{\detokenize\expandafter{#1}}%
-{\detokenize{&}}%
-{\detokenize{&amp;}}%
-[\LWR@strresult]%
+{\detokenize{&}}{\detokenize{&amp;}}[\LWR@strresult]%
+\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+{\detokenize{<}}{\detokenize{&lt;}}[\LWR@strresult]%
\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{<}}%
-{\detokenize{&lt;}}%
-[\LWR@strresult]%
+{\detokenize{>}}{\detokenize{&gt;}}[\LWR@strresult]%
\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{>}}%
-{\detokenize{&gt;}}%
-[\LWR@strresult]%
+{\detokenize{"}}{\detokenize{&quot;}}[\LWR@strresult]%
\LWR@strresult%
\endgroup%
}
@@ -8695,14 +8957,16 @@ autopage-\theLWR@currentautosec%
\catcode`\$=\active%
-\NewDocumentEnvironment{lateximage}{s O{image} O{}}
+\NewDocumentEnvironment{lateximage}{s O{(image)} O{} O{}}
{%
\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{0}}%
+\LWR@traceinfo{lateximage: entering depth is \arabic{LWR@lateximagedepth}}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{%
- \addtocounter{LWR@lateximagedepth}{1}%
+ \global\advance\c@LWR@lateximagedepth 1\relax% Due to AmS \text macro.
}%
{% start of outer-most lateximage
+\LWR@traceinfo{lateximage: starting outer-most lateximage}%
\setcounter{LWR@startingequation}{\value{equation}}%
\addtocounter{LWR@startingequation}{1}%
\booltrue{LWR@isstartingequation}%
@@ -8716,13 +8980,15 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{lateximage: LWR@externalfilecnt is \arabic{LWR@externalfilecnt}}%
\setcounterpageref{LWR@LIpage}{LWRlateximage\arabic{LWR@lateximagenumber}}%
\LWR@traceinfo{lateximage: LWR@LIpage is \arabic{LWR@LIpage}}%
- \LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" %
+ \LWR@htmltag{span id="lateximage\arabic{LWR@lateximagenumber}" % extra space
class="lateximagesource"}%
\LWR@traceinfo{lateximage: about to write to lateximages.txt}%
\IfBooleanTF{#1}% starred
{% hash
- \LWR@traceinfo{lateximage: hash true}%
- \edef\LWR@hashedname{\LWR@mdfive{\detokenize\expandafter{#2}}}%
+ \LWR@traceinfo{lateximage: hash true, adding !#2!#3!}%
+ \edef\LWR@hashedname{%
+ \LWR@mdfive{\detokenize\expandafter{#2}-!-#3}%
+ }%
\LWR@traceinfo{lateximage: hash is \LWR@hashedname}%
\immediate\write\LWR@lateximagesfile{%
|\arabic{LWR@LIpage}|true|\LWR@hashedname|%
@@ -8736,7 +9002,7 @@ autopage-\theLWR@currentautosec%
}% no hash
\LWR@traceinfo{lateximage: about to create open comment}%
\LWR@htmlopencomment%
- \addtocounter{LWR@lateximagedepth}{1}%
+ \addtocounter{LWR@lateximagedepth}{1}%
\LWR@traceinfo{lateximage: about to create a new page}%
\LWR@orignewpage%
\LWR@traceinfo{lateximage: about to create minipage}%
@@ -8754,16 +9020,29 @@ autopage-\theLWR@currentautosec%
\catcode`\$=3% math shift
\LetLtxMacro\(\LWR@origopenparen%
\LetLtxMacro\)\LWR@origcloseparen%
- \LetLtxMacro\[\LWR@origopenbracket%
- \LetLtxMacro\]\LWR@origclosebracket%
+ \ifbool{LWR@indisplaymathimage}{}{% not in display math
+ \LetLtxMacro\[\LWR@origopenbracket%
+ \LetLtxMacro\]\LWR@origclosebracket%
+ \let\equation\LWR@origequation%
+ \let\endequation\LWR@origendequation%
+ \csletcs{equation*}{LWR@origequationstar}%
+ \csletcs{endequation*}{LWR@origendequationstar}%
+ }% not in display math
+ \LetLtxMacro\LWR@newsingledollar$%
+ \LetLtxMacro\LWR@newsingledollar$% syntax highlighting
}% end of outer-most lateximage
\LWR@traceinfo{lateximage: finished start of environment}%
}% end of \begin{lateximage}
{% start of \end{lateximage}
-\LWR@traceinfo{lateximage: starting end of environment}%
-\ifthenelse{\cnttest{\value{LWR@lateximagedepth}}{>}{1}}%
-{\addtocounter{LWR@lateximagedepth}{-1}}%
+\LWR@traceinfo{lateximage: starting end of lateximage}%
+\LWR@traceinfo{lateximage: internal depth was \arabic{LWR@lateximagedepth}}%
+\ifnumcomp{\value{LWR@lateximagedepth}}{>}{1}%
+{%
+ \LWR@traceinfo{lateximage: unnesting}%
+ \global\advance\c@LWR@lateximagedepth -1\relax%
+}%
{% end of outer-most lateximage
+\LWR@traceinfo{lateximage: ending outer-most lateximage}%
\LWR@origendminipage%
\LWR@orignewpage%
\LWR@origscriptsize%
@@ -8776,14 +9055,14 @@ autopage-\theLWR@currentautosec%
{%
lateximages\OSPathSymbol%
\LWR@origmbox{\LWR@hashedname}%
- }{svg}{#3}%
+ }{svg}{#4}%
}% hash
{% no hash
\LWR@subinlineimage[#2]{lateximage}%
{%
lateximages\OSPathSymbol%
\LWR@origmbox{lateximage-\theLWR@externalfilecnt}%
- }{svg}{#3}%
+ }{svg}{#4}%
}% no hash
\LWR@ensuredoingapar%
\LWR@htmltag{/span}%
@@ -8792,6 +9071,7 @@ autopage-\theLWR@currentautosec%
}{}%
\addtocounter{LWR@lateximagedepth}{-1}%
}% end of outer-most lateximage
+\LWR@traceinfo{lateximage: exiting depth is \arabic{LWR@lateximagedepth}}%
\LWR@traceinfo{lateximage: done}%
}%
\catcode`\$=3% math shift
@@ -8799,7 +9079,7 @@ autopage-\theLWR@currentautosec%
\begin{warpprint}
-\NewDocumentEnvironment{lateximage}{s o o}
+\NewDocumentEnvironment{lateximage}{s o o o}
{\begin{varwidth}[b]{\linewidth}}
{\end{varwidth}}
@@ -8867,14 +9147,14 @@ autopage-\theLWR@currentautosec%
\newrobustcmd{\LWR@siunitx@textdegree}{\HTMLentity{deg}}
\newrobustcmd{\LWR@siunitx@textprime}{\HTMLunicode{2032}}
\newrobustcmd{\LWR@siunitx@textdblprime}{\HTMLunicode{2033}}
-\newrobustcmd{\LWR@siunitx@textplanckbar}{\text{\HTMLunicode{0127}}}
+\newrobustcmd{\LWR@siunitx@textplanckbar}{\text{\textit{\HTMLunicode{0127}}}}
-\appto\LWR@restoreorigformatting{
-\renewrobustcmd{\LWR@siunitx@textcelsius}{\text{\ensuremath{^\circ}C}}
-\renewrobustcmd{\LWR@siunitx@textdegree}{\text{\ensuremath{^\circ}}}
-\renewrobustcmd{\LWR@siunitx@textprime}{\text{\ensuremath{^\prime}}}
-\renewrobustcmd{\LWR@siunitx@textdblprime}{\text{\ensuremath{^{\prime\prime}}}}
-\renewrobustcmd{\LWR@siunitx@textplanckbar}{\text{\ensuremath{\hbar}}}
+\appto\LWR@restoreorigformatting{%
+\renewrobustcmd{\LWR@siunitx@textcelsius}{\text{\ensuremath{^\circ}C}}%
+\renewrobustcmd{\LWR@siunitx@textdegree}{\text{\ensuremath{^\circ}}}%
+\renewrobustcmd{\LWR@siunitx@textprime}{\text{\ensuremath{^\prime}}}%
+\renewrobustcmd{\LWR@siunitx@textdblprime}{\text{\ensuremath{^{\prime\prime}}}}%
+\renewrobustcmd{\LWR@siunitx@textplanckbar}{\text{\ensuremath{\hbar}}}%
}
\PassOptionsToPackage{
@@ -8994,7 +9274,7 @@ autopage-\theLWR@currentautosec%
\LetLtxMacro\endfcolorminipage\endLWRprint@fcolorminipage%
}
-\appto{\LWR@restoreorigformatting}{%
+\appto\LWR@restoreorigformatting{%
\LWR@restoreorigprintxcolor%
}
\warpprintonly{\LWR@restoreorigprintxcolor}
@@ -9004,6 +9284,20 @@ autopage-\theLWR@currentautosec%
}% AtBeginDocument
\end{warpall}
+\begin{warpprint}
+
+\AtBeginDocument{
+\@ifpackageloaded{chemmacros}{
+\DeclareDocumentEnvironment{polymerdelims}{}
+ {}{}
+
+\DeclareDocumentEnvironment{redoxreaction}{m m}
+ {\rule{0pt}{#1}}{\rule[-#2]{0pt}{#2}}
+}{}% chemmacros
+}% AtBeginDocument
+
+\end{warpprint}
+
@@ -9480,7 +9774,7 @@ width:\LWR@printlength{\LWR@tempwidth}%
\DeclareRobustCommand{\LWR@HTMLtextstyle}[3]{##3}%
\def\(##1\){}%
\def\[##1\]{}%
-\renewcommand{\LWR@subsingledollar}[2]{}
+\RenewDocumentCommand{\LWR@subsingledollar}{s m m m}{}
}
@@ -9550,6 +9844,17 @@ width:\LWR@printlength{\LWR@tempwidth}%
{overline}{#1}%
}
+\newcommand*{\LWR@currenttextcolor}{black}
+\newcommand*{\LWR@tempcolor}{}
+\newcommand*{\LWR@tempcolortwo}{}
+\newcommand*{\LWR@findcurrenttextcolor}{%
+\renewcommand{\LWR@tempcolor}{black}%
+}
+\NewDocumentCommand{\LWR@textcurrentcolor}{m}{%
+ \renewcommand*{\LWR@currenttextcolor}{black}%
+ #1%
+}
+
\end{warpHTML}
@@ -9672,7 +9977,6 @@ width:\LWR@printlength{\LWR@tempwidth}%
\RenewDocumentCommand{\enlargethispage}{s m}{}
\renewcommand*{\clearpage}{}
\renewcommand*{\cleardoublepage}{}
-\newcommand*{\LWR@currenttextcolor}{black}
\NewDocumentCommand{\LWR@rule}{o m m}{%
\setlength{\LWR@tempwidth}{#2}%
\ifthenelse{\lengthtest{\LWR@tempwidth=0pt}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp_baseline_marker.png b/Master/texmf-dist/tex/latex/lwarp/lwarp_baseline_marker.png
new file mode 100644
index 00000000000..dcd8607cec4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp_baseline_marker.png
Binary files differ