我是靠谱客的博主 激昂曲奇,最近开发中收集的这篇文章主要介绍解决latex图片浮动体过多的报错:Output loop---100 consecutive dead cycles和Too many unprocessed floatsReference,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

第一篇博客。

我在做一个数电笔记的整理,大概就是从老师的PPT上大量截图,然后把它们拼在一起。所以我的文档中基本全是figure浮动体,而没有文字。

当我插入大概第六十个浮动体的时候,latax终于报错了(高能预警):

行 358: Output loop---100 consecutive dead cycles. ^^Iend{figure}
行 369: Too many unprocessed floats. ^^Ibegin{figure}[htbp]
行 369: Undefined control sequence. ^^Ibegin{figure}[htbp]
行 369: Missing number, treated as zero. ^^Ibegin{figure}[htbp]
行 372: Undefined control sequence. ^^Iend{figure}
行 372: Missing number, treated as zero. ^^Iend{figure}
行 372: Undefined control sequence. ^^Iend{figure}
行 372: Argument of @xnext has an extra }. ^^Iend{figure}
行 372: Paragraph ended before @xnext was complete. ^^Iend{figure}
行 372: Extra else. ^^Iend{figure}
行 372: You can't use `vadjust' in vertical mode. ^^Iend{figure}
行 372: Argument of @xnext has an extra }. ^^Iend{figure}
行 372: Paragraph ended before @xnext was complete. ^^Iend{figure}
行 374: Too many unprocessed floats. ^^Ibegin{figure}[htbp]
行 374: Undefined control sequence. ^^Ibegin{figure}[htbp]
行 374: Missing number, treated as zero. ^^Ibegin{figure}[htbp]
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Missing = inserted for ifnum. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: This may be a LaTeX bug. ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Illegal unit of measure (pt inserted). ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Illegal unit of measure (pt inserted). ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 378: Illegal unit of measure (pt inserted). ^^Iend{figure}
行 378: Undefined control sequence. ^^Iend{figure}
行 378: Missing number, treated as zero. ^^Iend{figure}
行 380: Too many unprocessed floats. ^^Ibegin{figure}[htbp]
行 380: Undefined control sequence. ^^Ibegin{figure}[htbp]
行 380: Missing number, treated as zero. ^^Ibegin{figure}[htbp]
行 383: Undefined control sequence. ^^Iend{figure}
行 383: Missing number, treated as zero. ^^Iend{figure}
行 383: Undefined control sequence. ^^Iend{figure}
行 383: Argument of @xnext has an extra }. ^^Iend{figure}
行 383: Paragraph ended before @xnext was complete. ^^Iend{figure}
行 383: Extra else. ^^Iend{figure}
行 383: You can't use `vadjust' in vertical mode. ^^Iend{figure}
行 383: Argument of @xnext has an extra }. ^^Iend{figure}
行 383: Paragraph ended before @xnext was complete. ^^Iend{figure}
行 388: Float(s) lost. end{document}
行 78: Underfull hbox (badness 10000) in paragraph

经验告诉我,无论有多少报错,先按顺序解决最好。因为突如其来的大量报错,可能解决了第一个或前几个,后面就没有问题了。

于是我上网搜索,看见有个老哥跟我遇到了类似的问题,只不过他是插入了一堆脚注。有人给出了这样的建议:

Each DeclareFixedFootnote adds an clearpage to AtEndDocument and I get the same error if I add simply 100 clearpage commands in a row to a document.
You can enlarge the number before tex complains with e.g.
maxdeadcycles=1000

于是我在导言区加了一行maxdeadcycles=1000,第一个循环100次的问题解决了(我猜我怎么也用不了1k个浮动体)。

然后我又去搜那个过多未被处理的浮动体,看见有个老哥给出如下建议:

If all else fails, try using the clearpage command. This forces all unprocessed floats to be processed immediately, and start a new page. This may result in the page ending prematurely…

于是我又在第六十多个浮动体前,加了一行clearpage,再编译,成功!

这个老哥还提到

This may result in the page ending prematurely, if you wish to avoid this, you can use the afterpage package, and use the command:
afterpage{clearpage}

这是防止一页提前结束的方法。

Reference

  1. 解决Output loop—100 consecutive dead cycles.
  2. 解决Too many unprocessed floats.

最后

以上就是激昂曲奇为你收集整理的解决latex图片浮动体过多的报错:Output loop---100 consecutive dead cycles和Too many unprocessed floatsReference的全部内容,希望文章能够帮你解决解决latex图片浮动体过多的报错:Output loop---100 consecutive dead cycles和Too many unprocessed floatsReference所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(42)

评论列表共有 0 条评论

立即
投稿
返回
顶部