Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 1 | % 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 Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 5 | \alias{text_spec} |
| 6 | \title{Specify Cell/Text format} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 7 | \usage{ |
| 8 | cell_spec(x, format, bold = F, italic = F, monospace = F, color = NULL, |
Hao Zhu | 9ce317e | 2017-10-12 18:19:55 -0400 | [diff] [blame] | 9 | background = NULL, align = NULL, font_size = NULL, angle = NULL, |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 10 | tooltip = NULL, background_as_tile = TRUE, |
| 11 | latex_background_in_cell = TRUE) |
| 12 | |
| 13 | text_spec(x, format, bold = F, italic = F, monospace = F, color = NULL, |
| 14 | background = NULL, align = NULL, font_size = NULL, angle = NULL, |
| 15 | tooltip = NULL, background_as_tile = TRUE, |
| 16 | latex_background_in_cell = FALSE) |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 17 | } |
| 18 | \arguments{ |
| 19 | \item{x}{Things to be formated. It could be a vector of numbers or strings.} |
| 20 | |
| 21 | \item{format}{Either "html" or "latex". It can also be set through |
| 22 | \code{option(knitr.table.format)}, same as \code{knitr::kable()}.} |
| 23 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 24 | \item{bold}{T/F for font bold.} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 25 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 26 | \item{italic}{T/F for font italic.} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 27 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 28 | \item{monospace}{T/F for font monospaced (verbatim)} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 29 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 30 | \item{color}{A character string for text color. Here please pay |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 31 | attention to the differences in color codes between HTML and LaTeX.} |
| 32 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 33 | \item{background}{A character string for background color. Here please |
| 34 | pay attention to the differences in color codes between HTML and LaTeX. Also |
| 35 | note that in HTML, background defined in cell_spec won't cover the whole |
| 36 | cell.} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 37 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 38 | \item{align}{A character string for cell alignment. For HTML, possible |
| 39 | values could be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify}, |
| 40 | \code{initial} and \code{inherit} while for LaTeX, you can only choose |
| 41 | from \code{l}, \code{c} & \code{r}.} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 42 | |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 43 | \item{font_size}{j} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 44 | |
Hao Zhu | 9ce317e | 2017-10-12 18:19:55 -0400 | [diff] [blame] | 45 | \item{angle}{0-360, degree that the text will rotate. Can be a vector.} |
| 46 | |
Hao Zhu | 064990d | 2017-10-17 18:08:42 -0400 | [diff] [blame] | 47 | \item{tooltip}{A vector of strings to be displayed as tooltip. |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 48 | Obviously, this feature is only available in HTML.} |
Hao Zhu | 457acb4 | 2017-10-14 17:37:02 -0400 | [diff] [blame] | 49 | |
| 50 | \item{background_as_tile}{T/F value indicating if you want to have round |
Hao Zhu | ce5ee41 | 2017-10-23 01:14:38 -0400 | [diff] [blame^] | 51 | cornered tile as background in HTML.} |
| 52 | |
| 53 | \item{latex_background_in_cell}{T/F value. It only takes effect in LaTeX |
| 54 | when \code{background} provided, Default value is \code{TRUE}. If it's \code{TRUE}, the |
| 55 | background only works in a table cell. If it's \code{FALSE}, it works outside of a |
| 56 | table environment.} |
Hao Zhu | bacd2f3 | 2017-10-11 14:06:36 -0400 | [diff] [blame] | 57 | } |
| 58 | \description{ |
| 59 | Specify Cell format before it gets into kable |
| 60 | } |