0

如何在输入行 453 上通过 281.56999pt 修复 Float 对于页面而言太大?

这是一个示例 rmarkdown 文件:

---
output:
  pdf_document:
    latex_engine: xelatex
---

```{r, results='asis'}
library(flextable)
data <- mtcars[1:50,1:8]
ft <- flextable(data)
autofit(ft)

>LaTeX Warning: Float too large for page by 281.56999pt on input line 453.
4

2 回答 2

1

看来我还没有完全解释我的意思。生成的表格的末尾部分flextable::flextable()未显示在 pdf 文件的下一页上。KableExtra::kable()这是使用和生成的表的另一个示例FlexTable::flextable()

---

output:
  pdf_document:
    latex_engine: xelatex
---

```{r, results='asis'}
knitr::kable(iris[1:80,])
flextable::flextable(iris[1:80,])
于 2020-12-11T15:08:47.973 回答
0

使用set_table_properties(ft, layout = "autofit")将让乳胶做列大小:

---
output:
  pdf_document:
    latex_engine: xelatex
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r}
library(flextable)
data <- mtcars[1:50,1:8]
ft <- flextable(data)
set_table_properties(ft, layout = "autofit")
```
于 2020-12-11T14:33:04.287 回答