blob: 90a5b802bc53fce384ac224db7b68de7dac640ec [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{
Hao Zhu9410a272020-08-03 01:11:47 -04007footnote(
8 kable_input,
9 general = NULL,
10 number = NULL,
11 alphabet = NULL,
12 symbol = NULL,
13 footnote_order = c("general", "number", "alphabet", "symbol"),
14 footnote_as_chunk = FALSE,
15 escape = TRUE,
16 threeparttable = FALSE,
17 fixed_small_size = FALSE,
18 general_title = "Note: ",
19 number_title = "",
20 alphabet_title = "",
21 symbol_title = "",
22 title_format = "italic",
23 symbol_manual = NULL
24)
Hao Zhue0782ab2018-01-09 13:24:13 -050025}
26\arguments{
27\item{kable_input}{HTML or LaTeX table generated by \code{knitr::kable}}
28
29\item{general}{Text for general footnote comments. Footnotes in this section
30won't be labeled with any notations}
31
32\item{number}{A vector of footnote texts. Footnotes here will be numbered.
33There is no upper cap for the number of footnotes here}
34
35\item{alphabet}{A vector of footnote texts, Footnotes here will be labeled
36with abc. The vector here should not have more than 26 elements.}
37
38\item{symbol}{A vector of footnote texts, Footnotes here will be labeled
39with special symbols. The vector here should not have more than 20 elements.}
40
41\item{footnote_order}{The order of how to arrange \code{general}, \code{number},
42\code{alphabet} and \code{symbol}.}
43
44\item{footnote_as_chunk}{T/F value. Default is FALSE. It controls whether
45the footnotes should be printed in a chunk (without line break).}
46
47\item{escape}{T/F value. It controls whether the contents and titles should
48be escaped against HTML or LaTeX. Default is TRUE.}
49
Hao Zhueaef4312018-01-10 17:05:23 -050050\item{threeparttable}{T/F value for whether to use LaTeX package
51threeparttable. Threeparttable will force the width of caption and
52footnotes be the width of the original table. It's useful when you have
53long paragraph of footnotes.}
54
Hao Zhu72917f92019-03-15 18:41:42 -040055\item{fixed_small_size}{T/F When you want to keep the footnote small after
56specifying large font size with the kable_styling() (e.g. ideal font for headers
57and table content with small font in footnotes).}
58
Hao Zhue0782ab2018-01-09 13:24:13 -050059\item{general_title}{Section header for general footnotes. Default is
60"Note: ".}
61
62\item{number_title}{Section header for number footnotes. Default is "".}
63
64\item{alphabet_title}{Section header for alphabet footnotes. Default is "".}
65
66\item{symbol_title}{Section header for symbol footnotes. Default is "".}
Hao Zhu6107f372018-05-21 00:23:26 -040067
68\item{title_format}{Choose from "italic"(default), "bold" and "underline".
69Multiple options are possible.}
Hao Zhu149faed2018-10-23 16:36:22 -040070
71\item{symbol_manual}{User can manually supply a vector of either html or
Hao Zhu9410a272020-08-03 01:11:47 -040072latex symbols. For example, \code{symbol_manual = c('*', '\\\\\\\\dag', '\\\\\\\\ddag')}.`}
Hao Zhucdd7f922018-01-08 11:39:40 -050073}
74\description{
Hao Zhue0782ab2018-01-09 13:24:13 -050075\code{footnote} provides a more flexible way to add footnote. You
76can add mutiple sets of footnote using differeny notation system. It is
77also possible to specify footnote section header one by one and print
78footnotes as a chunk of texts.
Hao Zhucdd7f922018-01-08 11:39:40 -050079}
Hao Zhu593f57e2018-01-09 13:30:01 -050080\examples{
Hao Zhub1e2e3d2018-01-09 13:31:42 -050081dt <- mtcars[1:5, 1:5]
Hao Zhu593f57e2018-01-09 13:30:01 -050082footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))
83
84}