Hao Zhu | cdd7f92 | 2018-01-08 11:39:40 -0500 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/footnote.R |
| 3 | \name{footnote} |
| 4 | \alias{footnote} |
| 5 | \title{Add footnote (new)} |
| 6 | \usage{ |
| 7 | footnote(kable_input, general = NULL, number = NULL, alphabet = NULL, |
| 8 | symbol = NULL, footnote_order = c("general", "number", "alphabet", |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 9 | "symbol"), footnote_as_chunk = FALSE, escape = TRUE, |
Hao Zhu | 76f0eb6 | 2018-09-15 12:38:33 -0400 | [diff] [blame^] | 10 | threeparttable = FALSE, general_title = "Note: ", |
| 11 | number_title = "", alphabet_title = "", symbol_title = "", |
| 12 | title_format = "italic") |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 13 | } |
| 14 | \arguments{ |
| 15 | \item{kable_input}{HTML or LaTeX table generated by \code{knitr::kable}} |
| 16 | |
| 17 | \item{general}{Text for general footnote comments. Footnotes in this section |
| 18 | won't be labeled with any notations} |
| 19 | |
| 20 | \item{number}{A vector of footnote texts. Footnotes here will be numbered. |
| 21 | There is no upper cap for the number of footnotes here} |
| 22 | |
| 23 | \item{alphabet}{A vector of footnote texts, Footnotes here will be labeled |
| 24 | with abc. The vector here should not have more than 26 elements.} |
| 25 | |
| 26 | \item{symbol}{A vector of footnote texts, Footnotes here will be labeled |
| 27 | with special symbols. The vector here should not have more than 20 elements.} |
| 28 | |
| 29 | \item{footnote_order}{The order of how to arrange \code{general}, \code{number}, |
| 30 | \code{alphabet} and \code{symbol}.} |
| 31 | |
| 32 | \item{footnote_as_chunk}{T/F value. Default is FALSE. It controls whether |
| 33 | the footnotes should be printed in a chunk (without line break).} |
| 34 | |
| 35 | \item{escape}{T/F value. It controls whether the contents and titles should |
| 36 | be escaped against HTML or LaTeX. Default is TRUE.} |
| 37 | |
Hao Zhu | eaef431 | 2018-01-10 17:05:23 -0500 | [diff] [blame] | 38 | \item{threeparttable}{T/F value for whether to use LaTeX package |
| 39 | threeparttable. Threeparttable will force the width of caption and |
| 40 | footnotes be the width of the original table. It's useful when you have |
| 41 | long paragraph of footnotes.} |
| 42 | |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 43 | \item{general_title}{Section header for general footnotes. Default is |
| 44 | "Note: ".} |
| 45 | |
| 46 | \item{number_title}{Section header for number footnotes. Default is "".} |
| 47 | |
| 48 | \item{alphabet_title}{Section header for alphabet footnotes. Default is "".} |
| 49 | |
| 50 | \item{symbol_title}{Section header for symbol footnotes. Default is "".} |
Hao Zhu | 6107f37 | 2018-05-21 00:23:26 -0400 | [diff] [blame] | 51 | |
| 52 | \item{title_format}{Choose from "italic"(default), "bold" and "underline". |
| 53 | Multiple options are possible.} |
Hao Zhu | cdd7f92 | 2018-01-08 11:39:40 -0500 | [diff] [blame] | 54 | } |
| 55 | \description{ |
Hao Zhu | e0782ab | 2018-01-09 13:24:13 -0500 | [diff] [blame] | 56 | \code{footnote} provides a more flexible way to add footnote. You |
| 57 | can add mutiple sets of footnote using differeny notation system. It is |
| 58 | also possible to specify footnote section header one by one and print |
| 59 | footnotes as a chunk of texts. |
Hao Zhu | cdd7f92 | 2018-01-08 11:39:40 -0500 | [diff] [blame] | 60 | } |
Hao Zhu | 593f57e | 2018-01-09 13:30:01 -0500 | [diff] [blame] | 61 | \examples{ |
Hao Zhu | b1e2e3d | 2018-01-09 13:31:42 -0500 | [diff] [blame] | 62 | dt <- mtcars[1:5, 1:5] |
Hao Zhu | 593f57e | 2018-01-09 13:30:01 -0500 | [diff] [blame] | 63 | footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b")) |
| 64 | |
| 65 | } |