| 1 |
%% |
| 2 |
%% This is file `lwarp-chemfig.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `chemfig') |
| 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{chemfig}[2021/02/28] |
| 20 |
|
| 21 |
\catcode`\_=11 |
| 22 |
|
| 23 |
\IfPackageAtLeastTF{chemfig}{2020/03/05} |
| 24 |
{ |
| 25 |
\xpretocmd\charge{\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?}% |
| 26 |
{}{\LWR@patcherror{chemfig}{charge}} |
| 27 |
\xpretocmd\Charge{\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?}% |
| 28 |
{}{\LWR@patcherror{chemfig}{Charge}} |
| 29 |
\xapptocmd\charge_c{\end{lateximage}} |
| 30 |
{}{\LWR@patcherror{chemfig}{charge_c}} |
| 31 |
}{} |
| 32 |
|
| 33 |
\IfPackageAtLeastTF{chemfig}{2019/04/18}% |
| 34 |
{% 2019/04/18 or newer |
| 35 |
\xpretocmd{\CF_chemfiga} |
| 36 |
{\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?}% |
| 37 |
{}{\LWR@patcherror{chemfig}{CF_chemfiga}} |
| 38 |
|
| 39 |
\VerifyCommand[lwarp][chemfig]{\CF_chemfigb}{7B199210755F37B1BCD036567614BA34} |
| 40 |
|
| 41 |
\xpatchcmd{\CF_chemfigb} |
| 42 |
{\let\CF_flipstate\CF_zero} |
| 43 |
{\end{lateximage}\let\CF_flipstate\CF_zero} |
| 44 |
{}{\LWR@patcherror{chemfig}{CF_chemfigb}} |
| 45 |
|
| 46 |
\GlobalLetLtxMacro\LWR@chemfig@origCF_lewisc\CF_lewisc |
| 47 |
\gdef\CF_lewisc#1,#2\_nil{% |
| 48 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText?]% |
| 49 |
\LWR@chemfig@origCF_lewisc#1,#2\_nil |
| 50 |
\end{lateximage} |
| 51 |
} |
| 52 |
|
| 53 |
\gpreto{\schemestart}{% |
| 54 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?% |
| 55 |
} |
| 56 |
\gappto{\CF_schemestop}{\end{lateximage}} |
| 57 |
|
| 58 |
}% 2019/04/18 or newer |
| 59 |
{% older than 2019/04/18 |
| 60 |
|
| 61 |
\LetLtxMacro\LWR@chemfig@origchemfig\chemfig |
| 62 |
|
| 63 |
\DeclareDocumentCommand\chemfig{s O{} O{} m}{% |
| 64 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?% |
| 65 |
\IfBooleanTF{#1}{% |
| 66 |
\LWR@chemfig@origchemfig*[#2][#3]{#4}% |
| 67 |
}{% |
| 68 |
\LWR@chemfig@origchemfig[#2][#3]{#4}% |
| 69 |
} |
| 70 |
\end{lateximage}% |
| 71 |
} |
| 72 |
|
| 73 |
\LetLtxMacro\LWR@chemfig@origCF@lewis@b\CF@lewis@b |
| 74 |
|
| 75 |
\def\CF@lewis@b#1#2{% |
| 76 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?% |
| 77 |
\LWR@chemfig@origCF@lewis@b{#1}{#2}% |
| 78 |
\end{lateximage}% |
| 79 |
} |
| 80 |
|
| 81 |
\preto{\schemestart}{% |
| 82 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?% |
| 83 |
} |
| 84 |
\appto{\CF@schemestop}{\end{lateximage}} |
| 85 |
|
| 86 |
}% older than 2019/04/18 |
| 87 |
|
| 88 |
\catcode`\_=8% |
| 89 |
|
| 90 |
\LetLtxMacro\LWR@chemfig@origchemleft\chemleft |
| 91 |
|
| 92 |
\def\chemleft#1#2\chemright#3{% |
| 93 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?% |
| 94 |
\LWR@chemfig@origchemleft#1#2\chemright#3% |
| 95 |
\end{lateximage}% |
| 96 |
} |
| 97 |
|
| 98 |
\LetLtxMacro\LWR@chemfig@origchemup\chemup |
| 99 |
|
| 100 |
\def\chemup#1#2\chemdown#3{% |
| 101 |
\begin{lateximage}[-chemfig-~\PackageDiagramAltText]?% |
| 102 |
\LWR@chemfig@origchemup#1#2\chemdown#3% |
| 103 |
\end{lateximage}% |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
\endinput |
| 108 |
%% |
| 109 |
%% End of file `lwarp-chemfig.sty'. |