TeX capacity exceeded, sorry [input stack size=10000].
<to be read again>
我有一个书籍类文档,其中添加了数千页额外的页面。我仔细检查了日志文件,但找不到问题所在。问题似乎不在 main.tex 文件中,因为当我编辑\include
某些文件时,它们编译时没有问题。因此,我认为问题出在某些我想要包含的文件中。但是,我无法确定问题的具体原因。我想要包含的每个文件都有相同的布局,但显然有些不对劲。我尝试注释掉部分内容,但没有成功。以下是错误的摘录。
Underfull \vbox (badness 7186) has occurred while \output is active [81] [82]) [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] **This continues until pg. 10,042.**
这是 main.tex 文件的内容,如果有帮助的话。但是,正如我提到的,这在某些文件上可以完美运行,但在其他文件上则不行。
\documentclass[12pt]{book}
\usepackage[paperwidth=6in, paperheight=9in, margin=1in]{geometry}
\usepackage{dblfnote}
\usepackage{lettrine}
\usepackage[para]{footmisc}
\usepackage{ragged2e}
\usepackage{fontspec}
\usepackage{ifthen}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\usepackage{extramarks}
\setmainlanguage{syriac}
\setmainfont[BoldFont={DejaVu Serif Bold}]{Serto Antioch Bible}
% Make Counters for Chapters and Verses
\newcommand{\currbook}{}
\newcounter{mychapter}
\newcounter{bibver}
\setcounter{mychapter}{0}
\setcounter{bibver}{0}
% Make Bible Chapter and Verses
\newcommand{\mychaptermark}{}
\newcommand{\bibvermark}{}
\newcommand{\mychapter}[1]{%
\stepcounter{mychapter}% Increment the mychapter counter
\renewcommand{\mychaptermark}{#1}%
%\chaptermark{#1 : \bibvermark}% Include the verse number in the chaptermark
\markboth{#1}{#1}
{\centering{#1}}% Center the chapter title
}
\newcommand{\bibver}[1]{%
\stepcounter{bibver}% Increment the bibver counter
\extramarks{#1}{#1}% Set both left and right marks to #1
\textsuperscript{\textbf{#1 }}~%
}
% Make Book Title in English and Syriac
\newcommand{\englishtitle}[1]{\centering\LR{#1}}
\newcommand{\syriactitle}[1]{\centering{#1}}
% Footnotes
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{\oldfootnote{~#1}}
\newcommand{\mymarks}{%
\ifthenelse{\equal{\leftmark}{\rightmark}}
{\leftmark} % if equal
{\leftmark--\rightmark}} % if not equal
% Set the headheight and potentially adjust topmargin
\setlength{\headheight}{14.5pt} % Adjust this value as needed
\addtolength{\topmargin}{-2.5pt} % Adjust this value as needed
% Customize header using fancyhdr
\pagestyle{fancy}
\fancyhead{} % Clear previous header settings
\fancyhead[CO]{\englishtitle}
\fancyhead[CE]{ܐܓܪܬܐ ܕܝܘܚܢܢ ܫܠܝܚܐ}
\fancyhead[RO,LE]{\leftmark:\lastleftxmark –– \rightmark:\firstrightxmark} % Right on odd pages, Left on even pages
\begin{document}
% \include{04_Gospel of Matthew.tex}
%\include{05_Gospel of Mark.tex}
% \include{20_Titus.tex}
% \include{1John.tex}
\end{document}
在日志文件的末尾,有以下错误:
TeX capacity exceeded, sorry [input stack size=10000].
<to be read again>
\use_i:nnnn
l.69 \include{04_Gospel of Matthew.tex}
但是,我的文件中没有该代码\use_i:nnnn
。所以,我不知道它指的是什么。
答案1
你有类似的东西
\documentclass{article}
\begin{document}
\def\par{\vskip0pt}
x\vskip
\end{document}
这使得终端输出
! TeX capacity exceeded, sorry [input stack size=10000].
<to be read again>
\vskip
l.7 x\vskip
! ==> Fatal error occurred, no output PDF file produced!
请注意,<to be read again>
消息显示要读取哪个标记(\vskip
此处),但您尚未显示完整消息或显示产生错误的任何代码。
答案2
问题是两个脚注包之间存在冲突。我不确定为什么这些包在某些情况下可以正常交互,但在其他情况下却不行。在注释掉随机部分并编译文档,然后费力地重新编译后,我决定注释掉脚注包。果然,这解决了问题。
现在,我的序言不包括\usepackage{dblfnote}
。因此,虽然该包在某些情况下可以一起使用\usepackage{footmisc}
(显然?),但最好不要一起使用它们,以避免出现任何神秘的错误消息和数千个不必要的页面。
\documentclass[12pt]{book}
\usepackage[paperwidth=6in, paperheight=9in, margin=1in]{geometry}
\usepackage{lettrine}
\usepackage[para]{footmisc}
\usepackage{ragged2e}
\usepackage{fontspec}
\usepackage{ifthen}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\usepackage{extramarks}
\setmainlanguage{syriac}
\setmainfont[BoldFont={DejaVu Serif Bold}]{Serto Antioch Bible}
% Make Counters for Chapters and Verses
\newcommand{\currbook}{}
\newcounter{mychapter}
\newcounter{bibver}
\setcounter{mychapter}{0}
\setcounter{bibver}{0}
% Make Bible Chapter and Verses
\newcommand{\mychaptermark}{}
\newcommand{\bibvermark}{}
\newcommand{\mychapter}[1]{%
\stepcounter{mychapter}% Increment the mychapter counter
\renewcommand{\mychaptermark}{#1}%
%\chaptermark{#1 : \bibvermark}% Include the verse number in the chaptermark
\markboth{#1}{#1}
{\centering{#1}}% Center the chapter title
}
\newcommand{\bibver}[1]{%
\stepcounter{bibver}% Increment the bibver counter
\extramarks{#1}{#1}% Set both left and right marks to #1
\textsuperscript{\textbf{#1 }}~%
}
% Make Book Title in English and Syriac
\newcommand{\englishtitle}[1]{\centering\LR{#1}}
\newcommand{\syriactitle}[1]{\centering{#1}}
% Footnotes
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{\oldfootnote{~#1}}
\newcommand{\mymarks}{%
\ifthenelse{\equal{\leftmark}{\rightmark}}
{\leftmark} % if equal
{\leftmark--\rightmark}} % if not equal
% Set the headheight and potentially adjust topmargin
\setlength{\headheight}{14.5pt} % Adjust this value as needed
\addtolength{\topmargin}{-2.5pt} % Adjust this value as needed
% Customize header using fancyhdr
\pagestyle{fancy}
\fancyhead{} % Clear previous header settings
\fancyhead[CO]{\englishtitle}
\fancyhead[CE]{ܐܓܪܬܐ ܕܝܘܚܢܢ ܫܠܝܚܐ}
\fancyhead[RO,LE]{\leftmark:\lastleftxmark –– \rightmark:\firstrightxmark} % Right on odd pages, Left on even pages
\begin{document}
% \include{04_Gospel of Matthew.tex}
%\include{05_Gospel of Mark.tex}
% \include{20_Titus.tex}
% \include{1John.tex}
\end{document}