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
parent 70d90781c8
commit 8fd1df9d33
2 changed files with 26 additions and 0 deletions

View File

@@ -19,4 +19,18 @@
font-family: 'Open Sans'; font-family: 'Open Sans';
} }
</style>}} </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 \EndPreamble

View File

@@ -47,5 +47,17 @@
} }
\ConfigureToc{loc}{\HCode{<span class="lofToc">}}{\ }{}{\HCode{</span><br />}} \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} \begin{document}
\EndPreamble \EndPreamble