kableExtra
kableExtra copied to clipboard
Use \note command from threeparttablex in footnote
It seems that kableExtra
does not make use of the \note
command despite having made the switch to threeparttablex
. Would it make sense to replace its current implementation of the footnote
function
\begin{tablenotes}
\item \textit{Note: }
\item Lorem ipsum...
\end{tablenotes}
to
\begin{tablenotes}
\note Lorem ipsum...
\end{tablenotes}
? (Personally, I am also quite fond of how the footnotes are aligned in plain-vanilla threeparttablex
:
I tried making the above replacement manually in the .tex file before the conversion to PDF but I get an error that the \note
command is not recognized.
A minimal example of the current implementation is the following (I'm using kableExtra
version 1.3.4):
---
title: "kableExtra"
output:
pdf_document:
keep_tex: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(kableExtra)
```
```{r}
mtcars %>%
select(1:4) %>%
head(5) %>%
kbl(caption = "My Table",
format = "latex",
booktabs = TRUE) %>%
footnote(lorem::ipsum(1),
threeparttable = TRUE)
```