michal-h21 / make4ht

Build system for tex4ht
132 stars 15 forks source link

Producing corrupt `idv`, impossible to convert to `svg` #51

Open Iey4iej3 opened 2 years ago

Iey4iej3 commented 2 years ago

MWE:

\documentclass{amsart}

\theoremstyle{remark}\newtheorem*{remark}{Remark}

\begin{document}

\begin{remark}
This notion is stable under localization. Indeed, let $U$ be a affinoid open subspace of $X$. As localization preserves compact objects (see Theorem~\ref{compact_descent}), we may use the canonical map \[\mathrm{R}\underline{\mathrm{Hom}}_{(\mathcal{A},\mathcal{M})}(P,\mathcal{A}) \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U)\rightarrow \mathrm{R}\underline{\mathrm{Hom}}_{(\mathcal{A}_U,\mathcal{M}_U)}(P \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U),\mathcal{A}_U),\]
to construct the required mapping $\mathcal{A}_U\rightarrow (P \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U))^{\vee}\overset{L}{\underset{(\mathcal{A}_U,\mathcal{M}_U)}{\otimes}}(Q \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U))$.
\end{remark}

\end{document}

compiled with make4ht -f html5+dvisvgm_hashes foo.tex "svg", or without dvisvgm_hashes. Neither works. However, there is no issue to produce png images.

michal-h21 commented 2 years ago

This is indeed strange issue. When I change

$\mathcal{A}_U\rightarrow (P \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U))^{\vee}\overset{L}{\underset{(\mathcal{A}_U,\mathcal{M}_U)}{\otimes}}(Q \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U))$

to

\(\mathcal{A}_U\rightarrow (P \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U))^{\vee}\overset{L}{\underset{(\mathcal{A}_U,\mathcal{M}_U)}{\otimes}}(Q \underset{(\mathcal{A},\mathcal{M})}{\overset{L}{\otimes}} (\mathcal{A}_U,\mathcal{M}_U))\) (which will convert the whole inline math content to one picture, instead of mixture of text and images), it compiles correctly. The math expression also works outside of theorem.

I honestly don't know how to fix it. You may try to use the pic-m option which forces image mode for all inline math, but this could look bad due to the wrong vertical alignment of these images. So it is better to require pictures just for selected content, using \(... \)