Fix the chemical equation.

All credits due to @michal-h21
https://github.com/michal-h21/tex4ebook/issues/137
This commit is contained in:
Cedric
2025-01-20 20:47:59 +00:00
committed by cedounet
parent e0b99edff6
commit 263eb74afe
2 changed files with 26 additions and 0 deletions

View File

@@ -19,4 +19,18 @@
font-family: 'Open Sans';
}
</style>}}
% Deal with chemical equations in a single svg
\ExplSyntaxOn
\def\standaloneenv#1{}
\pend:def\schemestart{\Picture+{}}
\append:def\CF_schemestop{\EndPicture}
\ExplSyntaxOff
\makeatletter
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture+[\csname a:Picture-alt\endcsname]{}%
}
\makeatother
\EndPreamble

View File

@@ -47,5 +47,17 @@
}
\ConfigureToc{loc}{\HCode{<span class="lofToc">}}{\ }{}{\HCode{</span><br />}}
\ExplSyntaxOn
\def\standaloneenv#1{}
\pend:def\schemestart{\Picture+{}}
\append:def\CF_schemestop{\EndPicture}
\ExplSyntaxOff
\makeatletter
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture+[\csname a:Picture-alt\endcsname]{}%
}
\makeatother
\begin{document}
\EndPreamble