
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
이 문제는 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
결과는 다음과 같습니다.