||
! Dimension too large. \LT@max@sel #1#2->{\ifdim #2=\wd \tw@ #1\else \number \c@LT@chunks \fi }{\th... l.518 \end{longtabu} I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can. Here is how much of TeX's memory you used: 21898 strings out of 475847 440248 string characters out of 5773439 953357 words of memory out of 5000000 44482 multiletter control sequences out of 15000+600000 567196 words of font info for 112 fonts, out of 8000000 for 9000 14 hyphenation exceptions out of 8191 93i,9n,114p,396b,937s stack positions out of 10000i,1000n,20000p,200000b,200000s Output written on test.pdf (8 pages).
我在Rmarkdown中Tinytex使用Ctex模板Knit导出PDF的时候,报错! Dimension too large. 并且导出了残缺的PDF。
根据报错进行debug,发现原因是在Rmarkdown代码中使用了如下代码:
pt <- knitr::kable(results,digits = 3,booktabs=TRUE, caption = '分组正态性检验P值,P>0.05表示符合正态分布') %>% kableExtra::kable_styling(bootstrap_options = "bordered",full_width = T,position = 'center',row_label_position = 'c')直接将full_width = FALSE即解决了该问题。
可以看到我使用了full_width = TRUE参数,就是这个参数导致了latex处理不了太大的表格。通过查询kableExtra::kable_styling的参考文档,对full_width进行了如下说明:
If not specified, a HTML table will have full width by default but this option will be set to FALSE for a LaTeX table默认都是讲latex表格设定full_width=FALSE的。破案了爽
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-3-31 10:06
Powered by ScienceNet.cn
Copyright © 2007-2025 中国科学报社