blob: cabcb12619860ea4559262943736836117e7b9f1 [file] [log] [blame]
Hao Zhucdd7f922018-01-08 11:39:40 -05001% 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{
7footnote(kable_input, general = NULL, number = NULL, alphabet = NULL,
8 symbol = NULL, footnote_order = c("general", "number", "alphabet",
Hao Zhue0782ab2018-01-09 13:24:13 -05009 "symbol"), footnote_as_chunk = FALSE, escape = TRUE,
Hao Zhueaef4312018-01-10 17:05:23 -050010 threeparttable = FALSE, general_title = "Note: ", number_title = "",
Hao Zhu6107f372018-05-21 00:23:26 -040011 alphabet_title = "", symbol_title = "", title_format = "italic")
Hao Zhue0782ab2018-01-09 13:24:13 -050012}
13\arguments{
14\item{kable_input}{HTML or LaTeX table generated by \code{knitr::kable}}
15
16\item{general}{Text for general footnote comments. Footnotes in this section
17won't be labeled with any notations}
18
19\item{number}{A vector of footnote texts. Footnotes here will be numbered.
20There is no upper cap for the number of footnotes here}
21
22\item{alphabet}{A vector of footnote texts, Footnotes here will be labeled
23with abc. The vector here should not have more than 26 elements.}
24
25\item{symbol}{A vector of footnote texts, Footnotes here will be labeled
26with special symbols. The vector here should not have more than 20 elements.}
27
28\item{footnote_order}{The order of how to arrange \code{general}, \code{number},
29\code{alphabet} and \code{symbol}.}
30
31\item{footnote_as_chunk}{T/F value. Default is FALSE. It controls whether
32the footnotes should be printed in a chunk (without line break).}
33
34\item{escape}{T/F value. It controls whether the contents and titles should
35be escaped against HTML or LaTeX. Default is TRUE.}
36
Hao Zhueaef4312018-01-10 17:05:23 -050037\item{threeparttable}{T/F value for whether to use LaTeX package
38threeparttable. Threeparttable will force the width of caption and
39footnotes be the width of the original table. It's useful when you have
40long paragraph of footnotes.}
41
Hao Zhue0782ab2018-01-09 13:24:13 -050042\item{general_title}{Section header for general footnotes. Default is
43"Note: ".}
44
45\item{number_title}{Section header for number footnotes. Default is "".}
46
47\item{alphabet_title}{Section header for alphabet footnotes. Default is "".}
48
49\item{symbol_title}{Section header for symbol footnotes. Default is "".}
Hao Zhu6107f372018-05-21 00:23:26 -040050
51\item{title_format}{Choose from "italic"(default), "bold" and "underline".
52Multiple options are possible.}
Hao Zhucdd7f922018-01-08 11:39:40 -050053}
54\description{
Hao Zhue0782ab2018-01-09 13:24:13 -050055\code{footnote} provides a more flexible way to add footnote. You
56can add mutiple sets of footnote using differeny notation system. It is
57also possible to specify footnote section header one by one and print
58footnotes as a chunk of texts.
Hao Zhucdd7f922018-01-08 11:39:40 -050059}
Hao Zhu593f57e2018-01-09 13:30:01 -050060\examples{
Hao Zhub1e2e3d2018-01-09 13:31:42 -050061dt <- mtcars[1:5, 1:5]
Hao Zhu593f57e2018-01-09 13:30:01 -050062footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))
63
64}