summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty9
1 files changed, 6 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
index 16017fe39ef..6312ab8d43a 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-chemformula.sty
@@ -31,7 +31,7 @@
\LWR@subsingledollar*{% lwarp
\textbackslash{}ch\{\LWR@HTMLsanitize{#2}\}% alt text
}{%
- \LWR@HTMLsanitize{#1}% add'l hashing
+ \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% add'l hashing
}%
{%
\chemformula_ch:nn {#1} {#2}% original
@@ -46,7 +46,7 @@
\LWR@subsingledollar*{% lwarp
\textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}%
}{%
- \LWR@HTMLsanitize{#1}%
+ \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
}{% original
\group_begin:
\tl_if_blank:nF {#2}
@@ -86,7 +86,10 @@
{
\begingroup%
\boolfalse{mathjax}%
- \LWR@subsingledollar*{\textbackslash{}chlewis\{#2\}\{#3\}}{#1}{
+ \LWR@subsingledollar*{\textbackslash{}chlewis\{#2\}\{#3\}}%
+ {
+ \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ }{
\chemformula_lewis:nnn {#1} {#2} {#3}
}
\endgroup%