blob: 61ff27c5cb32704af947135fe5763bfeda4625ca [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 Zhu9410a272020-08-03 01:11:47 -04008cell_spec(
9 x,
10 format,
11 bold = FALSE,
12 italic = FALSE,
13 monospace = FALSE,
14 underline = FALSE,
15 strikeout = FALSE,
16 color = NULL,
17 background = NULL,
18 align = NULL,
19 font_size = NULL,
20 angle = NULL,
21 tooltip = NULL,
22 popover = NULL,
23 link = NULL,
24 extra_css = NULL,
25 escape = TRUE,
26 background_as_tile = TRUE,
27 latex_background_in_cell = TRUE
28)
Hao Zhuce5ee412017-10-23 01:14:38 -040029
Hao Zhu9410a272020-08-03 01:11:47 -040030text_spec(
31 x,
32 format,
33 bold = FALSE,
34 italic = FALSE,
35 monospace = FALSE,
36 underline = FALSE,
37 strikeout = FALSE,
38 color = NULL,
39 background = NULL,
40 align = NULL,
41 font_size = NULL,
42 angle = NULL,
43 tooltip = NULL,
44 popover = NULL,
45 link = NULL,
46 extra_css = NULL,
47 escape = TRUE,
48 background_as_tile = TRUE,
49 latex_background_in_cell = FALSE
50)
Hao Zhubacd2f32017-10-11 14:06:36 -040051}
52\arguments{
53\item{x}{Things to be formated. It could be a vector of numbers or strings.}
54
55\item{format}{Either "html" or "latex". It can also be set through
56\code{option(knitr.table.format)}, same as \code{knitr::kable()}.}
57
Hao Zhuce5ee412017-10-23 01:14:38 -040058\item{bold}{T/F for font bold.}
Hao Zhubacd2f32017-10-11 14:06:36 -040059
Hao Zhuce5ee412017-10-23 01:14:38 -040060\item{italic}{T/F for font italic.}
Hao Zhubacd2f32017-10-11 14:06:36 -040061
Hao Zhuce5ee412017-10-23 01:14:38 -040062\item{monospace}{T/F for font monospaced (verbatim)}
Hao Zhubacd2f32017-10-11 14:06:36 -040063
Hao Zhu53454f02018-01-14 16:29:10 -050064\item{underline}{A T/F value to control whether the text of the selected row
65need to be underlined}
66
67\item{strikeout}{A T/F value to control whether the text of the selected row
68need to be stricked out.}
69
Hao Zhuce5ee412017-10-23 01:14:38 -040070\item{color}{A character string for text color. Here please pay
Hao Zhubacd2f32017-10-11 14:06:36 -040071attention to the differences in color codes between HTML and LaTeX.}
72
Hao Zhuce5ee412017-10-23 01:14:38 -040073\item{background}{A character string for background color. Here please
74pay attention to the differences in color codes between HTML and LaTeX. Also
75note that in HTML, background defined in cell_spec won't cover the whole
76cell.}
Hao Zhubacd2f32017-10-11 14:06:36 -040077
Hao Zhuce5ee412017-10-23 01:14:38 -040078\item{align}{A character string for cell alignment. For HTML, possible
79values could be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify},
80\code{initial} and \code{inherit} while for LaTeX, you can only choose
81from \code{l}, \code{c} & \code{r}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040082
Hao Zhu6f362bb2017-10-23 23:21:38 -040083\item{font_size}{A numeric input for font size. For HTML, you can also use
Hao Zhu8b32b192017-10-24 14:51:48 -040084options including \code{xx-small}, \code{x-small}, \code{small}, \code{medium}, \code{large},
85\code{x-large}, \code{xx-large}, \code{smaller}, \code{larger}, \code{initial} and \code{inherit}.}
Hao Zhubacd2f32017-10-11 14:06:36 -040086
Hao Zhu9ce317e2017-10-12 18:19:55 -040087\item{angle}{0-360, degree that the text will rotate. Can be a vector.}
88
Hao Zhu064990d2017-10-17 18:08:42 -040089\item{tooltip}{A vector of strings to be displayed as tooltip.
Hao Zhu6f362bb2017-10-23 23:21:38 -040090Obviously, this feature is only available in HTML. Read the package
91vignette to see how to use bootstrap tooltip css to improve the loading
92speed and look.}
93
94\item{popover}{Similar with tooltip but can hold more contents. The best way
95to build a popover is through \code{spec_popover()}. If you only provide a text
96string, it will be used as content. Note that You have to enable this
97bootstrap module manually. Read the package vignette to see how.}
98
99\item{link}{A vector of strings for url links. Can be used together with
100tooltip and popover.}
101
Hao Zhub1de9672018-01-08 16:29:24 -0500102\item{extra_css}{Extra css text to be passed into the cell}
103
Hao Zhu6f362bb2017-10-23 23:21:38 -0400104\item{escape}{T/F value showing whether special characters should be escaped.}
Hao Zhu457acb42017-10-14 17:37:02 -0400105
106\item{background_as_tile}{T/F value indicating if you want to have round
Hao Zhuce5ee412017-10-23 01:14:38 -0400107cornered tile as background in HTML.}
108
109\item{latex_background_in_cell}{T/F value. It only takes effect in LaTeX
110when \code{background} provided, Default value is \code{TRUE}. If it's \code{TRUE}, the
111background only works in a table cell. If it's \code{FALSE}, it works outside of a
112table environment.}
Hao Zhubacd2f32017-10-11 14:06:36 -0400113}
114\description{
115Specify Cell format before it gets into kable
116}