Hao Zhu | 8dd65a9 | 2018-01-05 20:40:27 -0500 | [diff] [blame] | 1 | --- |
| 2 | title: "add_footnote_adv" |
| 3 | author: "Hao" |
| 4 | date: "1/5/2018" |
Hao Zhu | 19c4fa5 | 2018-01-09 12:01:14 -0500 | [diff] [blame] | 5 | output: pdf_document |
Hao Zhu | 8dd65a9 | 2018-01-05 20:40:27 -0500 | [diff] [blame] | 6 | --- |
| 7 | |
| 8 | ```{r} |
| 9 | library(knitr) |
| 10 | library(kableExtra) |
| 11 | |
Hao Zhu | d57ba6d | 2018-01-09 14:17:02 -0500 | [diff] [blame^] | 12 | dt <- mtcars[, 1:2] |
Hao Zhu | 19c4fa5 | 2018-01-09 12:01:14 -0500 | [diff] [blame] | 13 | colnames(dt)[1] <- paste0("mpg", footnote_marker_alphabet(2, "latex")) |
Hao Zhu | d57ba6d | 2018-01-09 14:17:02 -0500 | [diff] [blame^] | 14 | ``` |
Hao Zhu | 19c4fa5 | 2018-01-09 12:01:14 -0500 | [diff] [blame] | 15 | |
Hao Zhu | d57ba6d | 2018-01-09 14:17:02 -0500 | [diff] [blame^] | 16 | |
| 17 | ```{r} |
Hao Zhu | 19c4fa5 | 2018-01-09 12:01:14 -0500 | [diff] [blame] | 18 | dt %>% |
| 19 | kable("latex", caption = paste0("test", footnote_marker_symbol(1, "latex")), |
Hao Zhu | d57ba6d | 2018-01-09 14:17:02 -0500 | [diff] [blame^] | 20 | booktabs = T, escape = F, longtable = T) %>% |
Hao Zhu | 19c4fa5 | 2018-01-09 12:01:14 -0500 | [diff] [blame] | 21 | footnote(NULL, c("number 1; ", "number 2. "), c("a 1; ", "a 2."), c("s 1; ", "s 2."), |
| 22 | number_title = "special: ", alphabet_title = "abc: ", |
| 23 | footnote_as_chunk = T) |
Hao Zhu | 8dd65a9 | 2018-01-05 20:40:27 -0500 | [diff] [blame] | 24 | ``` |