blob: dc10432f49571431c2d56c876b91fe132df9b00d [file] [log] [blame]
Hao Zhubff01912017-05-23 18:05:00 -04001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/column_spec.R
3\name{column_spec}
4\alias{column_spec}
5\title{Specify the look of the selected column}
6\usage{
Hao Zhu78e61222017-05-24 20:53:35 -04007column_spec(kable_input, column, width = NULL, bold = FALSE,
Hao Zhuec7ab922017-08-19 22:56:44 -04008 italic = FALSE, monospace = FALSE, color = NULL, background = NULL,
Hao Zhu322de082017-09-11 19:25:29 -04009 border_left = FALSE, border_right = FALSE, ...)
Hao Zhubff01912017-05-23 18:05:00 -040010}
11\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040012\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubff01912017-05-23 18:05:00 -040013
Hao Zhu322de082017-09-11 19:25:29 -040014\item{column}{A numeric value or vector indicating which column(s) to be selected.}
Hao Zhubff01912017-05-23 18:05:00 -040015
16\item{width}{A character string telling HTML & LaTeX how wide the column
17needs to be, e.g. "10cm", "3in" or "30em".}
18
19\item{bold}{A T/F value to control whether the text of the selected column
20need to be bolded.}
21
22\item{italic}{A T/F value to control whether the text of the selected column
23need to be emphasized.}
Hao Zhu8f202992017-07-15 02:20:18 -040024
25\item{monospace}{A T/F value to control whether the text of the selected column
26need to be monospaced (verbatim)}
Hao Zhuec7ab922017-08-19 22:56:44 -040027
Hao Zhu53e240f2017-09-04 20:04:29 -040028\item{color}{A character string for column text color. Here please pay
29attention to the differences in color codes between HTML and LaTeX.}
Hao Zhuec7ab922017-08-19 22:56:44 -040030
Hao Zhu53e240f2017-09-04 20:04:29 -040031\item{background}{A character string for column background color. Here please
32pay attention to the differences in color codes between HTML and LaTeX.}
33
34\item{border_left}{A logical variable indicating whether there should be a
35border line on the left of the selected column. In HTML, you can also pass
36in a character string for the CSS of the border line}
37
38\item{border_right}{A logical variable indicating whether there should be a
39border line on the right of the selected column. In HTML, you can also pass
40in a character string for the CSS of the border line}
Hao Zhubff01912017-05-23 18:05:00 -040041}
42\description{
43This function allows users to select a column and then specify
44its look. Right now it supports the following three properties: column width,
45bold text and italic text.
46}
Hao Zhu78e61222017-05-24 20:53:35 -040047\examples{
48x <- knitr::kable(head(mtcars), "html")
49column_spec(x, 1, width = "20em", bold = TRUE, italic = TRUE)
50
51}