参考文献的章节标题和实际引用在 LaTeX 中被压缩在一起

发布于 2024-07-12 03:53:44 字数 552 浏览 10 评论 0原文

这一定是一个常见问题,因为我在许多已发表的论文中看到它,但谷歌搜索似乎相当棘手。 您可以像这样插入参考书目

\bibliographystyle{plain}
\bibliography{foo}

,一切都会按预期工作,除了有时(我不知道是什么情况导致这种情况 - 对我来说这似乎是随机的)部分标题(例如“7.参考文献”)和实际参考的开始。 章节标题和第一个引用看起来都挤在一起。 这并不是完全令人震惊,但在我看来,这无疑是排版中的一个缺陷。

我已经忍受它很多年了,但一定有人注意到了这一点,并且有足够的强迫症来追踪它并找出导致它的原因以及如何纠正它。

我认为这是记录解决方案的好地方。 如果您能想出办法使其更容易被谷歌搜索,请告诉我。

添加:这是一个展示该问题的示例文档:http://yootles.com/outbox/squish/。 (另请参阅下面我的解决方法。)

This must be a common problem because I see it in many published papers but it seems to be quite tricky to google for. You can insert a bibliography like so

\bibliographystyle{plain}
\bibliography{foo}

and everything works as expected except there is sometimes (I have no idea what circumstances cause this -- it seems random to me) no space between the section heading (e.g., "7. References") and the start of the actual references. The section heading and first citation appear all squished together. It's not utterly egregious but seems to me to be unambiguously a flaw in the typesetting.

I've been putting up with it for years but someone somewhere must have noticed this and been obsessive-compulsive enough to track it down and figure out what causes it and how to correct it.

I thought this would be a good place to record the solution. Let me know if you can think of ways to make this more googlable.

ADDED: Here is an example document exhibiting the problem: http://yootles.com/outbox/squish/.
(See also my workaround below.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

御守 2024-07-19 03:53:44

不确定这是否是原因,但如果可以通过删除该空间来适合页面上的参考书目,您可以尝试使用 \enlagethispage{someamount}

Not sure if that's the cause, but in case the bibliography can be fit on the page by removing that space you could try to use \enlagethispage{someamount}

望她远 2024-07-19 03:53:44

事实证明,如果 LaTeX 试图避免文档溢出到额外的页面,它有时会删除参考文献部分标题和实际参考文献开头之间的空格。

因此,一种解决方法是延长或缩短文档,这样它就不会溢出到另一页。

一个相关的解决方法(感谢 bluebrother 的回答)是明确告诉 LaTeX 允许引用开头的页面有一点额外的垂直空间(稍微吃掉底部边距)。 这可以在“\bibliographystyle{plain}”之前使用以下命令来完成:

\enlargethispage{\baselineskip}

另一种似乎有效的解决方法:

  1. 更改为 \bibliographystyle{amsalpha}
  2. 重新编译
  3. 更改回 \bibliographystyle{plain}
  4. 重新编译
  5. (不要再次重新编译,否则会重新压缩它。)

It turns out that LaTeX will sometimes remove the space between the References section header and the start of the actual references if it is trying to avoid having the document spill over to an extra page.

So one workaround is to either lengthen or shorten the document so it's not on the brink of spilling over to an additional page.

A related workaround (thanks to bluebrother's answer) is to explicitly tell LaTeX to allow the page with the start of the references a little extra vertical space (eating into the bottom margin slightly). That can be done with the following command right before the "\bibliographystyle{plain}":

\enlargethispage{\baselineskip}

Another workaround that seems to work:

  1. Change to \bibliographystyle{amsalpha}
  2. Recompile
  3. Change back to \bibliographystyle{plain}
  4. Recompile
  5. (Don't recompile again or it will re-squish it.)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文