我很难弄清楚我的代码/工作流程的问题出在哪里。我之前发过这个问题这里,但随后同样的问题又出现了。当我在 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{*}
before\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
。