blob: 08c0e5420e563a05d221604dfec031f9ed9aa80b [file] [log] [blame]
Hao Zhue10cfd32017-02-21 16:41:14 -05001% Generated by roxygen2: do not edit by hand
Hao Zhuc1f38412017-02-23 12:13:48 -05002% Please edit documentation in R/kable_styling.R
3\name{kable_styling}
4\alias{kable_styling}
Hao Zhue10cfd32017-02-21 16:41:14 -05005\title{HTML table attributes}
6\usage{
Hao Zhua3fc0c42017-02-27 12:04:59 -05007kable_styling(kable_input, bootstrap_options = "basic",
8 latex_options = "basic", full_width = NULL, position = c("center",
9 "left", "right", "float_left", "float_right"), font_size = NULL)
Hao Zhue10cfd32017-02-21 16:41:14 -050010}
11\arguments{
Hao Zhuf7994dd2017-02-27 16:58:42 -050012\item{kable_input}{Output of `knitr::kable()` with `format` specified}
13
14\item{bootstrap_options}{A character vector for bootstrap table options.
15Please see package documentation site or visit the w3schools'
16\href{https://www.w3schools.com/bootstrap/bootstrap_tables.asp}{Bootstrap Page}
17for more information. Possible options include `basic`, `striped`,
18`bordered`, `hover`, `condensed` and `responsive`.}
19
20\item{latex_options}{A character vector for LaTeX table options. Please see
21package documentation site for more information. Possible options include
22`basic`, `striped`, `hold_position`, `scale_down`. `striped` will add
23alternative row colors to the table. It will imports `LaTeX` package `xcolor`
24if enabled. `hold_position` will "hold" the floating table to the exact
25position. It is useful when the `LaTeX` table is contained in a `table`
26environment after you specified captions in `kable()`. It will force the
27table to stay in the position where it was created in the document.
28`scale_down` is useful for super wide table. It will automatically adjust
29the table to page width.}
Hao Zhue10cfd32017-02-21 16:41:14 -050030
Hao Zhu26234122017-02-22 15:34:33 -050031\item{full_width}{A `TRUE` or `FALSE` variable controlling whether the HTML
Hao Zhuf7994dd2017-02-27 16:58:42 -050032table should have 100\% width. Since HTML and pdf have different flavors on
33the preferable format for `full_width`. If not specified, a HTML table will
34have full width by default but this option will be set to `FALSE` for a
35LaTeX table}
Hao Zhu94956582017-02-21 18:18:29 -050036
Hao Zhuf7994dd2017-02-27 16:58:42 -050037\item{position}{A character string determining how to position the table
38on a page. Possible values include `left`, `center`, `right`, `float_left`
39and `float_right`. Please see the package doc site for demonstrations. For
40a `LaTeX` table, if `float_*` is selected, `LaTeX` package `wrapfig` will be
41imported.}
Hao Zhu94956582017-02-21 18:18:29 -050042
43\item{font_size}{A numeric input for table font size}
Hao Zhue10cfd32017-02-21 16:41:14 -050044}
45\description{
Hao Zhu26234122017-02-22 15:34:33 -050046This function provides a cleaner approach to modify the style
47of HTML tables other than using the `table.attr` option in `knitr::kable()`.
48Currenly, it assumes the HTML document has boot
Hao Zhue10cfd32017-02-21 16:41:14 -050049}