当我包含来自 kableExtra 的repeat_header
选项 ( kable_styling
) 时,我失去了脚注。我在帮助文件中看到kable_styling
“可能有点棘手”。这是我正在经历的还是我错过了什么?在下面的代码中,我没有得到脚注。如果我删除 kable_styling,我会得到脚注。在我的真实情况下,我有一张长桌,但据我所知,kable_styling 是罪魁祸首。
我今天(2017 年 9 月 18 日)刚刚用 github 版本更新了 kableExtra
谢谢!
---
title: "Untitled"
output:
pdf_document:
latex_engine: xelatex
---
```{r setup, include=FALSE}
library(knitr)
library(kableExtra)
```
```{r cars,results='asis'}
kable(mtcars,format='latex',booktabs=TRUE,col.names=c("mpg","cyl[note]","disp","hp","drat","wt","qsec","vs","am","gear","carb"),
longtable=T,caption="This is my table caption") %>%
add_footnote(c("This is my footnote")) %>%
kable_styling(latex_options = c("repeat_header"))
```