[tex4ht] converting all displaymath to images with make4ht

Benjamin Berg berg.benjamin at gmail.com
Fri Feb 5 17:10:14 CET 2021


> Display math is converted to pictures by default, without need to use
> pic-{something}. For example the following example converts to picture
> with make4ht without any options:
>
> \documentclass{article}
> \begin{document}
> \[ \sum\displaylimits_{i=1}^{3} \sum\displaylimits_{j =1}^{3}
p\left(F_{i} , E_{j}\right) = 1 \]
> \end{document}
>
> It is possible that you use some package that changes the default
> behavior. Could you please post a full MWE?

Strange. My MWE was almost identical to yours except mine used the awsmath
package, because I'm working with an author who uses the align and align*
environments heavily.

When I strip out \usepackage{awsmath}, the equation renders as one image.
When using amsmath, only the part in parentheses is converted to an image.

Thanks for your help. The amsmath package must be the problem here.

On Fri, Feb 5, 2021 at 10:16 AM Michal Hoftich <michal.h21 at gmail.com> wrote:

> Hi Benjamin,
>
>
> >I'm trying to make an ePub (v2) out of a LaTeX manuscript, so I've been
> >using make4ht to convert to HTML and save all math as images. (MathML
> >doesn't work in ePub v2.)
> >
>
> You can also try tex4ebook. It converts to ePub directly. It is based on
> make4ht, but it also saves some metadata and TOC.
>
> >I found the pic-* options for creating images at http://cvr.cc/?p=504
> but I
> >can't find one that works for all displaymath. make4ht only converts some
> >of the math to images and leaves some as text.
> >
> >Sample equation:
> >
> >\[ \sum\displaylimits_{i=1}^{3} \sum\displaylimits_{j =1}^{3} p\left(F_{i}
> >, E_{j}\right) = 1 \] For this equation, make4ht only converts the parts
> >inside the parentheses into images, and the rest remains as text. But if I
> >put the same equation in an align* and use make4ht "pic-align" then the
> >entire equation is rendered as one image. I've tried every pic- option
> >listed at http://cvr.cc/?p=504 but none of them will render the entire
> >bracketed equation as one image. Am I missing something? Do I just need to
> >redo the equations to use a different math environment?
>
> Display math is converted to pictures by default, without need to use
> pic-{something}. For example the following example converts to picture
> with make4ht without any options:
>
>
> \documentclass{article}
> \begin{document}
> \[ \sum\displaylimits_{i=1}^{3} \sum\displaylimits_{j =1}^{3} p\left(F_{i}
> , E_{j}\right) = 1 \]
> \end{document}
>
> It is possible that you use some package that changes the default
> behavior. Could you please post a full MWE?
>
> Best regards,
> Michal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20210205/1831fd41/attachment.html>


More information about the tex4ht mailing list.