Fix #88
diff --git a/R/add_footnote.R b/R/add_footnote.R
index 6bc04d7..eaee90c 100644
--- a/R/add_footnote.R
+++ b/R/add_footnote.R
@@ -204,8 +204,8 @@
}
}
}
- export <- gsub("\\\\end\\{tabular\\}",
- paste0(footer, "\\\\end{tabular}"),
+ export <- gsub(table_info$end_tabular,
+ paste0(footer, "\\\\end{", table_info$tabular, "}"),
export)
}
}
diff --git a/R/footnote.R b/R/footnote.R
index 92ad36a..96af153 100644
--- a/R/footnote.R
+++ b/R/footnote.R
@@ -149,4 +149,6 @@
table_info <- magic_mirror(kable_input)
+
+
}
diff --git a/tests/visual_tests/footnote_html.Rmd b/tests/visual_tests/footnote_html.Rmd
index 2f6e558..35d502b 100644
--- a/tests/visual_tests/footnote_html.Rmd
+++ b/tests/visual_tests/footnote_html.Rmd
@@ -10,9 +10,25 @@
library(kableExtra)
mtcars[1:5, 1:5] %>%
- kable("html", caption = paste0("test", footnote_marker_symbol(1))) %>%
+ kable("html", caption = paste0("test", footnote_marker_alphabet(1))) %>%
kable_styling() %>%
- footnote("ccc", c("number 1; ", "number 2. "), c("a 1; ", "a 2."), c("s 1; ", "s 2."),
- number_title = "special: ", alphabet_title = "abc: ",
- footnote_as_chunk = T)
+ footnote(general = "ccc",
+ number = c("number 1; ", "number 2. "),
+ alphabet = c("a 1; ", "a 2."),
+ symbol = c("s 1; ", "s 2."))
+```
+
+```{r}
+mtcars[1:5, 1:5] %>%
+ kable("html", caption = paste0("test", footnote_marker_alphabet(1))) %>%
+ kable_styling() %>%
+ footnote(general = "ccc",
+ number = c("number 1; ", "number 2. "),
+ alphabet = c("a 1; ", "a 2."),
+ symbol = c("s 1; ", "s 2."),
+ general_title = "",
+ number_title = "special: ",
+ alphabet_title = "abc: ",
+ symbol_title = "triangle: ",
+ footnote_as_chunk = T)
```