LaTeX 无法正确编译
我正在使用 TeXshop、Natbib、Hyperef 和两列布局,并且收到以下消息:
\pdfendlink 最终以不同的方式结束 嵌套级别高于 \pdfstartlink
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi
阻止 LaTeX 编译。该文档在“onecolumn”时编译没有问题,只有在“twocolumn”时才会出现问题。
我在网上搜索了解决方案,但大多数都是几年前的,并且确定问题是由“长参考”引起的。
我已经缩小了来源范围问题的关键是出现在两列宽的表格之后的部分。接下来的部分没有任何引用,但是当我包含它时,它会停止编译。我没有在此处包含代码来复制我需要包含整个文档的问题;仅当存在一定间距时才会发生。
另一个参考,表明这是一个不起眼的错误。我无法应用他们的建议,因为我找不到问题参考。我已经,只是塞进了很多空格,它确实可以编译,但这并不是工作文档的真正解决方案。
I'm using TeXshop, Natbib, Hyperef and two-column layout, and I am getting the following message:
\pdfendlink ended up in different
nesting level than \pdfstartlink\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
\fi \fi
which prevents LaTeX from compiling. This document compiles without problem when it is 'onecolumn', the problem only starts when it is 'twocolumn'.
I've searched online for solutions, but most of them are from a few years ago, and identify the problem as being caused by a 'long reference'.
I've narrowed down the source of the problem to be a section that occurs after a table that is two columns wide. The section that follows does not have any references, but when I include it, it stops compiling. I have not included code here as to replicate the problem I need to include my entire document; it only occurs when there is a certain spacing.
Another reference, suggesting that is an obscure bug. I cannot apply their suggestion as I cannot locate the problem reference. I have, just shoved in a lot of spaces and it does compile, however this not really a solution for a working document.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这里有同样的问题,它不知从何而来。有趣的是,如果我注释掉 hyperref 包它就可以工作。
Having the same problem here and it popped-up from nowhere. Interestingly if I comment out the hyperref package it works.
我认为导致此错误的一个常见原因是引用被分成两页。对此的一个简单测试是在文档顶部添加一些 \vspace 以强制不同的分页符。这种情况在我身上发生过几次,我的最终解决方案通常涉及重写文本,以确保有问题的引用不会跨越分页符。
I believe a common cause for this error is a citation that is split across two pages. An easy test for this is to add some \vspace at the top of your document to force different page breaks. This has happened to me a few times, and my final solution typically involves rewriting the text to ensure that the offending citation does not cross the page break.
复制您的 LaTeX 源代码并开始从中提取内容,直到获得仍然导致此错误的最小可能示例。
如果仅此一点就揭示了问题,请将其发布在这里作为答案。
如果没有,请将其附加到问题中。
Make a copy of your LaTeX source and start ripping the content out of it until you have the smallest possible example that still causes this error.
If that alone reveals the problem, post it here as an answer.
If it doesn't, append it to the question.
努力理解解决方案。 LaTeX 是一个非常技术性的东西,就像编程一样,如果你想使用它,你必须接受这样一个事实:你将不得不用你的大脑来思考解决方案。
错误本身非常具有描述性。
/begin{}
和/end{}
语句的嵌套级别是否都正确排列?您使用的所有宏都正确使用吗?查看您正在使用的软件包的文档。就像编程一样,当您不确定发生了什么时,请使用您可以使用的最简单的代码重新创建错误。如果它本身还没有告诉您错误(它经常这样做!),那么将最简单的代码与您的问题一起发布,以便我们至少有一些小机会提供帮助。遗憾的是,由于 LaTeX 的复杂性,诸如软件包版本之类的内容也可能与故障排除过程非常相关。
Work on understanding the solutions. LaTeX is a very technical thing, like programming, and if you want to use it you have to accept the fact that you're going to be stuck using your brain to think through solutions.
The error itself is pretty descriptive. Are your levels of nesting for your
/begin{}
and/end{}
statements all lined up properly? All the macros that you're using are being used correctly? Review the documentation for the packages that you're using.Like programming, when you're not sure what's going on, recreate the error with the simplest possible code that you can use. If that on its own does not already tell you the error (it frequently does!), then post that simplest possible code with your question so that we at least have some small chance to help. Sadly, due to the complexity of LaTeX, things like package versions may also be quite relevant to the troubleshooting process.