michal-h21 / make4ht

Build system for tex4ht
137 stars 15 forks source link

TeX capacity exceeded when using amsmath split in equations #132

Closed alfredholmes closed 1 year ago

alfredholmes commented 1 year ago

The following file


\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{equation}
\begin{split}
f(x) = x \\
f(y) = z
\end{split}
\end{equation}
\end{document}

Doesn't compile with make4ht Tested with v0.3m on Linux.

$ make4ht test.tex 
[STATUS]  make4ht: Conversion started
[STATUS]  make4ht: Input file: test.tex
[WARNING] tocid: char-def module not found
[WARNING] tocid: cannot fix section id's
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename Line    Message
[ERROR]   htlatex: ?    7    TeX capacity exceeded, sorry [save size=200000].
[FATAL]   make4ht-lib: Fatal error. Command htlatex returned exit code 1
michal-h21 commented 1 year ago

Thanks for the report, I will fix that in TeX4ht sources. In the meantime, you can try this configuration file:

\Preamble{xhtml}
\makeatletter
\catcode`\:=11
\let\@begin:split\relax
\catcode`\:=12
\makeatother
\begin{document}
\EndPreamble
alfredholmes commented 1 year ago

Thanks for that, the configuration file fixes the problem

michal-h21 commented 1 year ago

Thanks for the confirmation. I've already updated TeX4ht sources, so the fix should be available in TeX Live soon.

alfredholmes commented 1 year ago

I've just realised that there is a small issue with the suggested configuration since the equation number appears in the png as well as in the html

michal-h21 commented 1 year ago

You are right, I haven't noticed that. The fix in TeX4ht sources produces the correct output, fortunately, so it should work correctly after the update.