blob: f8d09af6edf8865c72f1003c63d41107f1f5fe86 [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,
Hao Zhu76f0eb62018-09-15 12:38:33 -04009 underline = FALSE, strikeout = FALSE, color = NULL,
10 background = NULL, align = NULL, font_size = NULL, angle = NULL,
11 tooltip = NULL, popover = NULL, link = NULL, extra_css = NULL,
12 escape = TRUE, background_as_tile = TRUE,
13 latex_background_in_cell = TRUE)
Hao Zhuce5ee412017-10-23 01:14:38 -040014
Hao Zhu6f362bb2017-10-23 23:21:38 -040015text_spec(x, format, bold = FALSE, italic = FALSE, monospace = FALSE,
Hao Zhu76f0eb62018-09-15 12:38:33 -040016 underline = FALSE, strikeout = FALSE, color = NULL,
17 background = NULL, align = NULL, font_size = NULL, angle = NULL,
18 tooltip = NULL, popover = NULL, link = NULL, extra_css = NULL,
19 escape = TRUE, background_as_tile = TRUE,
20 latex_background_in_cell = FALSE)
Hao Zhubacd2f32017-10-11 14:06:36 -040021}
22\arguments{
23\item{x}{Things to be formated. It could be a vector of numbers or strings.}
24
25\item{format}{Either "html" or "latex". It can also be set through
26\code{option(knitr.table.format)}, same as \code{knitr::kable()}.}
27
Hao Zhuce5ee412017-10-23 01:14:38 -040028\item{bold}{T/F for font bold.}
Hao Zhubacd2f32017-10-11 14:06:36 -040029
Hao Zhuce5ee412017-10-23 01:14:38 -040030\item{italic}{T/F for font italic.}
Hao Zhubacd2f32017-10-11 14:06:36 -040031
Hao Zhuce5ee412017-10-23 01:14:38 -040032\item{monospace}{T/F for font monospaced (verbatim)}
Hao Zhubacd2f32017-10-11 14:06:36 -040033
Hao Zhu53454f02018-01-14 16:29:10 -050034\item{underline}{A T/F value to control whether the text of the selected row
35need to be underlined}
36
37\item{strikeout}{A T/F value to control whether the text of the selected row
38need to be stricked out.}
39
Hao Zhuce5ee412017-10-23 01:14:38 -040040\item{color}{A character string for text color. Here please pay
Hao Zhubacd2f32017-10-11 14:06:36 -040041attention to the differences in color codes between HTML and LaTeX.}
42
Hao Zhuce5ee412017-10-23 01:14:38 -040043\item{background}{A character string for background color. Here please
44pay attention to the differences in color codes between HTML and LaTeX. Also
45note that in HTML, background defined in cell_spec won't cover the whole
46cell.}
Hao Zhubacd2f32017-10-11 14:06:36 -040047
Hao Zhuce5ee412017-10-23 01:14:38 -040048\item{align}{A character string for cell alignment. For HTML, possible
49values could be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify},
50\code{initial} and \code{inherit} while for LaTeX, you can only choose
51from \code{l}, \code{c} & \code{r}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040052
Hao Zhu6f362bb2017-10-23 23:21:38 -040053\item{font_size}{A numeric input for font size. For HTML, you can also use
Hao Zhu8b32b192017-10-24 14:51:48 -040054options including \code{xx-small}, \code{x-small}, \code{small}, \code{medium}, \code{large},
55\code{x-large}, \code{xx-large}, \code{smaller}, \code{larger}, \code{initial} and \code{inherit}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040056
Hao Zhu9ce317e2017-10-12 18:19:55 -040057\item{angle}{0-360, degree that the text will rotate. Can be a vector.}
58
Hao Zhu064990d2017-10-17 18:08:42 -040059\item{tooltip}{A vector of strings to be displayed as tooltip.
Hao Zhu6f362bb2017-10-23 23:21:38 -040060Obviously, this feature is only available in HTML. Read the package
61vignette to see how to use bootstrap tooltip css to improve the loading
62speed and look.}
63
64\item{popover}{Similar with tooltip but can hold more contents. The best way
65to build a popover is through \code{spec_popover()}. If you only provide a text
66string, it will be used as content. Note that You have to enable this
67bootstrap module manually. Read the package vignette to see how.}
68
69\item{link}{A vector of strings for url links. Can be used together with
70tooltip and popover.}
71
Hao Zhub1de9672018-01-08 16:29:24 -050072\item{extra_css}{Extra css text to be passed into the cell}
73
Hao Zhu6f362bb2017-10-23 23:21:38 -040074\item{escape}{T/F value showing whether special characters should be escaped.}
Hao Zhu457acb42017-10-14 17:37:02 -040075
76\item{background_as_tile}{T/F value indicating if you want to have round
Hao Zhuce5ee412017-10-23 01:14:38 -040077cornered tile as background in HTML.}
78
79\item{latex_background_in_cell}{T/F value. It only takes effect in LaTeX
80when \code{background} provided, Default value is \code{TRUE}. If it's \code{TRUE}, the
81background only works in a table cell. If it's \code{FALSE}, it works outside of a
82table environment.}
Hao Zhubacd2f32017-10-11 14:06:36 -040083}
84\description{
85Specify Cell format before it gets into kable
86}