TeX 용량이 초과되었으며 tex4ht로 장 이름에 장식을 사용하여 구문 분석 오류가 발생했습니다.

TeX 용량이 초과되었으며 tex4ht로 장 이름에 장식을 사용하여 구문 분석 오류가 발생했습니다.

2014년 첫 번째 htlatex 이슈이자 첫날에도 :)

이 줄을 추가했습니다

\chapter*{\centering \begin{normalsize}my chapter title\end{normalsize}}

pdflatex에서는 잘 작동하지만 htlatex에서는

 ! TeX capacity exceeded, sorry [input stack size=5000].

을 제거했을 때 \centeringhtlatex에서 이 오류가 발생했습니다.

(./foo2.aux) [1] [2] [1] [2] [3] [1] [2]
! Argument of \im:g has an extra }.
<inserted text> 
                \par 
l.12 ...begin{normalsize}Abstract\end{normalsize}}

그래서 문제가 무엇인지 잘 모르겠습니다. 기본적으로 책 스타일로 Abstract 같은 페이지를 만들고 싶었는데 위와 같은 내용을 발견했습니다.여기서 해결책이는 pdflatex와 정말 잘 작동하지만 어떤 이유로 htlatex가 \chapter항목 내부에서 이러한 명령을 구문 분석하는 데 문제가 있습니다. \chapter{....}인수 내부의 Latex 명령이 마음에 들지 않는 것 같습니다 . 그들을 보호해야 할 수도 있나요? 깨지기 쉬운 문제? 하지만 pdflatex는 그것들을 잘 처리합니까?

htlatex를 사용하여 페이지 중간에 제목을 넣을 수 있는 해결 방법이 있나요?

MWE:

\documentclass[12pt]{book}%
\usepackage{lipsum}
\begin{document}
\frontmatter

\title{htlatex issue 010114}
\author{me}
\maketitle 

\chapter*{\centering \begin{normalsize}my chapter title\end{normalsize}} %crash
%\chapter*{\begin{normalsize}Abstract\end{normalsize}} %parse error
%\chapter*{Abstract}  %only this work
\noindent 
\lipsum[75]
\clearpage

\tableofcontents

\mainmatter

\chapter{one}
  \section{one}
    \lipsum[75]

\end{document}

컴파일 명령:

>htlatex foo2.tex 
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.

.....
(/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./foo2.aux) [1] [2] [1] [2] [3] [1] [2]
! TeX capacity exceeded, sorry [input stack size=5000].
\centering ->\let \\
                    \@centercr \rightskip \@flushglue \leftskip \@flushglue ...
l.10 ...rmalsize}my chapter title\end{normalsize}}
                                                   %crash
Output written on foo2.dvi (7 pages, 13108 bytes).
Transcript written on foo2.log.

문제가 발생한 위치를 보여주는 로그 파일의 일부 텍스트:

LaTeX Font Info:    ... okay on input line 3.
--- file foo2.css ---
 [1

] [2

] [1] [2

] [3]
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <14.4> on input line 8.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 8.
 [1] [2]
! TeX capacity exceeded, sorry [input stack size=5000].
\centering ->\let \\
                    \@centercr \rightskip \@flushglue \leftskip \@flushglue ...
l.10 ...rmalsize}my chapter title\end{normalsize}}
                                                   %crash
If you really absolutely need more capacity,

Linux mint에서 TexLive 2013을 사용합니다.

제목을 중앙에 맞추려면 htlatex에서 작동합니다.

\begin{center}
  \chapter*{Abstract}  %only this work
\end{center}

따라서 위의 솔루션을 사용하여 원하는 것을 수행할 수 있습니다. 하지만 이 질문은 문제가 있기 때문에 여기에 남겨 두겠습니다.

답변1

내가 말했듯이다른 질문, 섹션화 명령의 매개변수로 아무 것도 넣을 수 없습니다. 를 만들기 위해 처리되기 때문입니다 TOC. 따라서 일반 LaTeX에서는 작동하지만 tex4ht에서는 작동하지 않습니다. 따라서 개념적 관점에서 볼 때 해결 방법은 초기 시도보다 훨씬 낫습니다. 명령을 오용하는 것보다 인쇄 \chapter라는 문제를 해결하기 위해 다른 방법을 사용하는 것이 더 낫다고 생각합니다 abstract. 문서 본문에 noindent넣어야 하는 필요성도 해결할 수 있는 새로운 환경은 어떻습니까 ?clearpage

\documentclass[12pt]{book}%
\usepackage{lipsum}
\def\abstracttitle{Abstract}
\newenvironment{abstract}{\begin{center}\abstracttitle\end{center}\par\noindent}{\clearpage}
\begin{document}
\frontmatter

\title{htlatex issue 010114}
\author{me}
\maketitle 

\begin{abstract}
\lipsum[75]
\end{abstract}

\tableofcontents

\mainmatter

\chapter{one}
  \section{one}
    \lipsum[75]

\end{document}

새 환경을 정의했습니다. abstract제목 텍스트는 매크로에 저장되므로 \abstracttitle필요한 경우 재정의할 수 있습니다. 이 솔루션은 다음과 같이 즉시 사용할 수 있습니다 tex4ht.

여기에 이미지 설명을 입력하세요

관련 정보