When I include the repeat_header
option (kable_styling
) from kableExtra, I lose my footnote. I see in the help files that kable_styling
"can get a bit tricky." Is that what I'm experiencing or is there something I'm missing? In the code below, I get no footnote. If I remove the kable_styling, I get the foonote. In my real situation, I have a long table, but best as I can tell, kable_styling is the culprit.
I just updated kableExtra with the github version today (9/18/17)
Thanks!
---
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"))
```
The new footnote function has more possibilities:
instead of
add_footnote(c("This is my footnote"))
you could write now e.g.footnote(general = "This is my footnote")