新增錯誤 tex 容量超出日誌文件

新增錯誤 tex 容量超出日誌文件

我很難找出我的程式碼/工作流程的問題出在哪裡。我之前發布過這個問題這裡,但同樣的問題又回來了。當我在 tex 中運行它時,出現超出輸入限制的錯誤。確切的日誌貼如下:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9.6210 64-bit) (preloaded format=pdflatex 2017.1.26)  26 JAN 2017 20:45
entering extended mode
**./master.tex
(master.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size11.clo"
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.9\tex\latex\apacite\apacite.sty"
Package: apacite 2013/07/21 v6.03 APA citation
\c@BibCnt=\count87
\bibleftmargin=\skip43
\bibindent=\skip44
\bibparsep=\skip45
\bibitemsep=\skip46
\biblabelsep=\skip47
)
No file master.aux.
\openout1 = `master.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
\c@maskedRefs=\count88
("C:\Program Files\MiKTeX 2.9\tex\latex\apacite\english.apc"
File: english.apc 2013/07/21 v6.03 apacite language file
LaTeX Info: Redefining \BPBI on input line 129.
LaTeX Info: Redefining \BHBI on input line 130.
)
! TeX capacity exceeded, sorry [input stack size=5000].
\AtBeginDocument #1->#1

l.5 \begin{document}

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.


Here is how much of TeX's memory you used:
 641 strings out of 493333
 7639 string characters out of 3139188
 74825 words of memory out of 3000000
 4254 multiletter control sequences out of 15000+200000
 3940 words of font info for 15 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 5000i,0n,4998p,136b,36s stack positions out of 5000i,500n,10000p,200000b,50000s
!  ==> Fatal error occurred, no output PDF file produced!

我之前發布過這個問題並以為我解決了它,但我又遇到了同樣的問題。

我嘗試執行的乳膠程式碼如下:

\documentclass[11pt,twoside]{article}
\usepackage{apacite}
\nocite{*}

\begin{document}


% title page. Edit as needed for future publications. 
\title{Research Proposal}
\author{Teererai Marange \\
Department of Computer Science \\
University of Auckland\\
\texttt{[email protected]}}
\date{January 26, 2017}
\maketitle
% end title page. 


% abstract goes here
\newpage
\begin{abstract}
Abstract goes here 
\end{abstract}
\newpage


% table of contents 
\tableofcontents
\newpage


%begin introduction 
\section {Introduction}
Lorem Ipsum Doremifaso 

%\cite{Nedakeyword} use to cite 



%references our biliography. This must go whereever we use our bibtex references

\bibliography{references}
\bibliographystyle{apacite}


\end{document}

我用來建立參考書目的 bib 檔案如下:

@misc{wikipedia1,
  title = "Scripting language",
  author = "Wikipedia",
  url = {http://en.wikipedia.org/wiki/Scripting_language},
  year = 2014,
}

答案1

你會得到錯誤

\documentclass[11pt,twoside]{article}
\usepackage{apacite}

\nocite{*}
\begin{document}



\end{document}

移動不引用可以避免它

\documentclass[11pt,twoside]{article}
\usepackage{apacite}


\begin{document}
\nocite{*}




\end{document}

答案2

使用標準設置,\nocite{*}之前\begin{document}會引發錯誤。樣式apacite進行了修改,\nocite以便使其在序言中也可用(這並非不合理),但它使用了錯誤的測試。

\nocite事實上,測試的程式碼是否\document已經變得等同於\@onlypreamble,這意味著文件已經開始,在這種情況下它完成了正常的工作;否則它會發出問題\AtBeginDocument{\nocite{...}}(參數與 的一個相同。但是,當執行\nocite的標記時,尚未等於。這意味著將執行,這...無限循環,因為在那一刻被定義為簡單提出其論點。\AtBeginDocument\document\@preamble\nocite{*}\AtBeginDocument{\nocite{*}}\AtBeginDocument

程式碼的修復可以是\AtBeginDocument僅在\AtBeginDocument尚未等於 時才執行\@firstofone

\begin{filecontents*}{\jobname.bib}
@misc{wikipedia1,
  title = "Scripting language",
  author = "Wikipedia",
  url = {http://en.wikipedia.org/wiki/Scripting_language},
  year = 2014,
}
\end{filecontents*}

\documentclass[11pt,twoside]{article}
\usepackage{apacite}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\nocite}
  {\AtBeginDocument{\nocite{#1}}}
  {\ifx\AtBeginDocument\@firstofone\else\AtBeginDocument{\nocite{#1}}\fi}
  {}{}
\makeatother

\nocite{*}

\begin{document}

% title page. Edit as needed for future publications. 
\title{Research Proposal}
\author{Teererai Marange \\
Department of Computer Science \\
University of Auckland\\
\texttt{[email protected]}}
\date{January 26, 2017}
\maketitle
% end title page. 

% abstract goes here
\newpage
\begin{abstract}
Abstract goes here 
\end{abstract}
\newpage


% table of contents 
\tableofcontents
\newpage


%begin introduction 
\section {Introduction}
Lorem Ipsum Doremifaso 

%\cite{Nedakeyword} use to cite 



%references our biliography. This must go whereever we use our bibtex references

\bibliography{\jobname}
\bibliographystyle{apacite}


\end{document}

當然,\nocite{*}之後移動就更簡單了\begin{document}。但是,這可能會在 的程式碼中修復apacite

multibbl請注意,如果加載此補丁將不起作用。為此,它會複雜得多,因為 的重新定義\nocite是在開始文件中完成的。

我向 的維護者提交了錯誤報告apacite.sty

相關內容