diff --git a/book/tex4ebook.cfg b/book/tex4ebook.cfg index dffea80..35066f6 100644 --- a/book/tex4ebook.cfg +++ b/book/tex4ebook.cfg @@ -19,4 +19,18 @@ font-family: 'Open Sans'; } }} + +% 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 diff --git a/book/website.cfg b/book/website.cfg index f236b6e..b87e680 100644 --- a/book/website.cfg +++ b/book/website.cfg @@ -47,5 +47,17 @@ } \ConfigureToc{loc}{\HCode{}}{\ }{}{\HCode{
}} +\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