blob: 2e758b0d170486afe9e3bb0d0fac54aa2368dd88 [file] [log] [blame]
Hao Zhubacd2f32017-10-11 14:06:36 -04001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/cell_spec.R
3\name{cell_spec}
4\alias{cell_spec}
Hao Zhuce5ee412017-10-23 01:14:38 -04005\alias{text_spec}
6\title{Specify Cell/Text format}
Hao Zhubacd2f32017-10-11 14:06:36 -04007\usage{
Hao Zhu6f362bb2017-10-23 23:21:38 -04008cell_spec(x, format, bold = FALSE, italic = FALSE, monospace = FALSE,
9 color = NULL, background = NULL, align = NULL, font_size = NULL,
10 angle = NULL, tooltip = NULL, popover = NULL, link = NULL,
11 escape = TRUE, background_as_tile = TRUE,
Hao Zhuce5ee412017-10-23 01:14:38 -040012 latex_background_in_cell = TRUE)
13
Hao Zhu6f362bb2017-10-23 23:21:38 -040014text_spec(x, format, bold = FALSE, italic = FALSE, monospace = FALSE,
15 color = NULL, background = NULL, align = NULL, font_size = NULL,
16 angle = NULL, tooltip = NULL, popover = NULL, link = NULL,
17 escape = TRUE, background_as_tile = TRUE,
Hao Zhuce5ee412017-10-23 01:14:38 -040018 latex_background_in_cell = FALSE)
Hao Zhubacd2f32017-10-11 14:06:36 -040019}
20\arguments{
21\item{x}{Things to be formated. It could be a vector of numbers or strings.}
22
23\item{format}{Either "html" or "latex". It can also be set through
24\code{option(knitr.table.format)}, same as \code{knitr::kable()}.}
25
Hao Zhuce5ee412017-10-23 01:14:38 -040026\item{bold}{T/F for font bold.}
Hao Zhubacd2f32017-10-11 14:06:36 -040027
Hao Zhuce5ee412017-10-23 01:14:38 -040028\item{italic}{T/F for font italic.}
Hao Zhubacd2f32017-10-11 14:06:36 -040029
Hao Zhuce5ee412017-10-23 01:14:38 -040030\item{monospace}{T/F for font monospaced (verbatim)}
Hao Zhubacd2f32017-10-11 14:06:36 -040031
Hao Zhuce5ee412017-10-23 01:14:38 -040032\item{color}{A character string for text color. Here please pay
Hao Zhubacd2f32017-10-11 14:06:36 -040033attention to the differences in color codes between HTML and LaTeX.}
34
Hao Zhuce5ee412017-10-23 01:14:38 -040035\item{background}{A character string for background color. Here please
36pay attention to the differences in color codes between HTML and LaTeX. Also
37note that in HTML, background defined in cell_spec won't cover the whole
38cell.}
Hao Zhubacd2f32017-10-11 14:06:36 -040039
Hao Zhuce5ee412017-10-23 01:14:38 -040040\item{align}{A character string for cell alignment. For HTML, possible
41values could be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify},
42\code{initial} and \code{inherit} while for LaTeX, you can only choose
43from \code{l}, \code{c} & \code{r}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040044
Hao Zhu6f362bb2017-10-23 23:21:38 -040045\item{font_size}{A numeric input for font size. For HTML, you can also use
46options}
Hao Zhubacd2f32017-10-11 14:06:36 -040047
Hao Zhu9ce317e2017-10-12 18:19:55 -040048\item{angle}{0-360, degree that the text will rotate. Can be a vector.}
49
Hao Zhu064990d2017-10-17 18:08:42 -040050\item{tooltip}{A vector of strings to be displayed as tooltip.
Hao Zhu6f362bb2017-10-23 23:21:38 -040051Obviously, this feature is only available in HTML. Read the package
52vignette to see how to use bootstrap tooltip css to improve the loading
53speed and look.}
54
55\item{popover}{Similar with tooltip but can hold more contents. The best way
56to build a popover is through \code{spec_popover()}. If you only provide a text
57string, it will be used as content. Note that You have to enable this
58bootstrap module manually. Read the package vignette to see how.}
59
60\item{link}{A vector of strings for url links. Can be used together with
61tooltip and popover.}
62
63\item{escape}{T/F value showing whether special characters should be escaped.}
Hao Zhu457acb42017-10-14 17:37:02 -040064
65\item{background_as_tile}{T/F value indicating if you want to have round
Hao Zhuce5ee412017-10-23 01:14:38 -040066cornered tile as background in HTML.}
67
68\item{latex_background_in_cell}{T/F value. It only takes effect in LaTeX
69when \code{background} provided, Default value is \code{TRUE}. If it's \code{TRUE}, the
70background only works in a table cell. If it's \code{FALSE}, it works outside of a
71table environment.}
Hao Zhubacd2f32017-10-11 14:06:36 -040072}
73\description{
74Specify Cell format before it gets into kable
75}