
MWE:
\documentclass{amsart}
\newtheorem{theorem}{Theorem}
\begin{document}
\section{SecTmp}
\subsection{SubsecTmp}
\subsubsection{SubsubsecTmp}
\begin{theorem}
\end{theorem}
Here, \(H_n^i(X)\)
\end{document}
でコンパイルするとtex4ebook
、結果では の各シンボルが\(H_n^i(X)\)
1 行に展開されます。なぜそうなるのか、また修正方法を教えてください。
答え1
この問題は、TeX4ht の定理処理のバグが原因です。定理の終了後、段落の処理が混乱しているようです。通常、段落は「Here」という単語の前で開始する必要があります。しかし、この場合、数式内に複数の段落が挿入され、この式の一部が複数の行に分割されます。
TeX4ht ソースでは修正しました。それまでの間、次の.cfg
ファイルを使用できます。
\Preamble{xhtml}
% \Configure{()}{\PicMath$}{$\EndPicMath}
\Configure{newtheorem}
{\ifvmode\IgnorePar\fi\EndP
\HCode{<div class="newtheorem">}\par\noindent\HCode{<span class="head">}}
{\HCode{</span>}}
{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}\par\indent\ShowPar}
\let\MathPar\empty
\Configure{PicDisplay}
{\edef\MathPar{\ifvmode par-\fi}\IgnorePar\endgraf\EndP
\HCode{<div class="\MathPar math-display" \csname a:LRdir\endcsname >}}
{\HCode{</div>}\par\ShowPar} {} {class="\MathPar math-display" }
\Css{div.par-math-display, div.math-display{margin-left: auto; margin-right: auto;text-align:center;}}
\begin{document}
\EndPreamble
結果は次のとおりです。