blob: 063ca3c345dc6f832d4d58a1378566a0879db21e [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 Zhu72917f92019-03-15 18:41:42 -040010 threeparttable = FALSE, fixed_small_size = FALSE,
11 general_title = "Note: ", number_title = "", alphabet_title = "",
12 symbol_title = "", title_format = "italic", symbol_manual = NULL)
Hao Zhue0782ab2018-01-09 13:24:13 -050013}
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
18won't be labeled with any notations}
19
20\item{number}{A vector of footnote texts. Footnotes here will be numbered.
21There is no upper cap for the number of footnotes here}
22
23\item{alphabet}{A vector of footnote texts, Footnotes here will be labeled
24with 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
27with 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
33the 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
36be escaped against HTML or LaTeX. Default is TRUE.}
37
Hao Zhueaef4312018-01-10 17:05:23 -050038\item{threeparttable}{T/F value for whether to use LaTeX package
39threeparttable. Threeparttable will force the width of caption and
40footnotes be the width of the original table. It's useful when you have
41long paragraph of footnotes.}
42
Hao Zhu72917f92019-03-15 18:41:42 -040043\item{fixed_small_size}{T/F When you want to keep the footnote small after
44specifying large font size with the kable_styling() (e.g. ideal font for headers
45and table content with small font in footnotes).}
46
Hao Zhue0782ab2018-01-09 13:24:13 -050047\item{general_title}{Section header for general footnotes. Default is
48"Note: ".}
49
50\item{number_title}{Section header for number footnotes. Default is "".}
51
52\item{alphabet_title}{Section header for alphabet footnotes. Default is "".}
53
54\item{symbol_title}{Section header for symbol footnotes. Default is "".}
Hao Zhu6107f372018-05-21 00:23:26 -040055
56\item{title_format}{Choose from "italic"(default), "bold" and "underline".
57Multiple options are possible.}
Hao Zhu149faed2018-10-23 16:36:22 -040058
59\item{symbol_manual}{User can manually supply a vector of either html or
60latex symbols. For example, \code{symbol_manual = c('*', '\\\\dag', '\\\\ddag')}.`}
Hao Zhucdd7f922018-01-08 11:39:40 -050061}
62\description{
Hao Zhue0782ab2018-01-09 13:24:13 -050063\code{footnote} provides a more flexible way to add footnote. You
64can add mutiple sets of footnote using differeny notation system. It is
65also possible to specify footnote section header one by one and print
66footnotes as a chunk of texts.
Hao Zhucdd7f922018-01-08 11:39:40 -050067}
Hao Zhu593f57e2018-01-09 13:30:01 -050068\examples{
Hao Zhub1e2e3d2018-01-09 13:31:42 -050069dt <- mtcars[1:5, 1:5]
Hao Zhu593f57e2018-01-09 13:30:01 -050070footnote(knitr::kable(dt, "html"), alphabet = c("Note a", "Note b"))
71
72}