| 1 |
%% |
| 2 |
%% This is file `lwarp-mhchem.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `mhchem') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
|
| 19 |
\LWR@ProvidesPackagePass{mhchem}[2024/01/29] |
| 20 |
|
| 21 |
\LetLtxMacro\LWR@mhchem@origce\ce |
| 22 |
|
| 23 |
\newcommand{\LWR@mhchem@HTML@ce}[1]{% |
| 24 |
\LWR@findcurrenttextcolor% sets \LWR@tempcolor |
| 25 |
\edef\LWR@mhchemalt{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}}% |
| 26 |
\ifbool{LWR@xfakebold}% |
| 27 |
{\def\LWR@tempone{Y}}% |
| 28 |
{\def\LWR@tempone{N}}% |
| 29 |
\begin{lateximage}% |
| 30 |
*% hash |
| 31 |
[% alt |
| 32 |
\textbackslash{}% |
| 33 |
ce% |
| 34 |
\{\LWR@mhchemalt\}% |
| 35 |
]% |
| 36 |
*% no open close tags in alt |
| 37 |
?% do not detokenize alt |
| 38 |
[% add'l alt |
| 39 |
FM\LWR@f@family% |
| 40 |
SR\LWR@f@series% |
| 41 |
SH\LWR@f@shape% |
| 42 |
SHC\LWR@f@shapecaps% |
| 43 |
CL\LWR@tempcolor% |
| 44 |
FB\LWR@tempone% xfakebold |
| 45 |
]% |
| 46 |
\LWR@setcurrentfont% |
| 47 |
\LWR@mhchem@origce{#1}% |
| 48 |
\end{lateximage}% |
| 49 |
\endgroup% |
| 50 |
\addtocounter{LWR@mhchem@cedepth}{-1}% |
| 51 |
} |
| 52 |
|
| 53 |
\newcounter{LWR@mhchem@cedepth} |
| 54 |
\setcounter{LWR@mhchem@cedepth}{0} |
| 55 |
|
| 56 |
\renewcommand{\ce}{% |
| 57 |
\begingroup% |
| 58 |
\ifnumequal{\value{LWR@mhchem@cedepth}}{0}{% |
| 59 |
\catcode`\$=3% math shift |
| 60 |
}{}% |
| 61 |
\addtocounter{LWR@mhchem@cedepth}{1}% |
| 62 |
\LWR@mhchem@HTML@ce% |
| 63 |
} |
| 64 |
|
| 65 |
\LetLtxMacro\LWR@mhchem@origcesplit\cesplit |
| 66 |
|
| 67 |
\newcommand*{\LWR@mhchem@HTML@cesplit}[2] |
| 68 |
{% |
| 69 |
\LWR@findcurrenttextcolor% sets \LWR@tempcolor |
| 70 |
\ifbool{LWR@xfakebold}% |
| 71 |
{\def\LWR@tempone{Y}}% |
| 72 |
{\def\LWR@tempone{N}}% |
| 73 |
\begin{lateximage}% |
| 74 |
*% hash |
| 75 |
[% alt |
| 76 |
\textbackslash{}% |
| 77 |
cesplit% |
| 78 |
\{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% |
| 79 |
]% |
| 80 |
*% no open/close tags in alt |
| 81 |
?% no detokenize alt |
| 82 |
[% add'l alt |
| 83 |
FM\LWR@f@family% |
| 84 |
SR\LWR@f@series% |
| 85 |
SH\LWR@f@shape% |
| 86 |
SHC\LWR@f@shapecaps% |
| 87 |
CL\LWR@tempcolor% |
| 88 |
FB\LWR@tempone% xfakebold |
| 89 |
]% |
| 90 |
\LWR@setcurrentfont% |
| 91 |
\LWR@mhchem@origcesplit{#1}{#2}% |
| 92 |
\end{lateximage}% |
| 93 |
\endgroup% |
| 94 |
} |
| 95 |
|
| 96 |
\newcounter{LWR@mhchem@cesplitdepth} |
| 97 |
\setcounter{LWR@mhchem@cesplitdepth}{0} |
| 98 |
|
| 99 |
\renewcommand{\cesplit}{% |
| 100 |
\begingroup% |
| 101 |
\ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{% |
| 102 |
\catcode`\$=3% math shift |
| 103 |
}{}% |
| 104 |
\addtocounter{LWR@mhchem@cesplitdepth}{1}% |
| 105 |
\LWR@mhchem@HTML@cesplit% |
| 106 |
} |
| 107 |
|
| 108 |
\appto\LWR@restoreorigformatting{% |
| 109 |
\LetLtxMacro\ce\LWR@mhchem@origce% |
| 110 |
\LetLtxMacro\cesplit\LWR@mhchem@origcesplit% |
| 111 |
} |
| 112 |
|
| 113 |
\begin{warpMathJax} |
| 114 |
\CustomizeMathJax{\require{mhchem}} |
| 115 |
\end{warpMathJax} |
| 116 |
|
| 117 |
|
| 118 |
\endinput |
| 119 |
%% |
| 120 |
%% End of file `lwarp-mhchem.sty'. |