Add extra customization options to add_header_above
diff --git a/man/add_header_above.Rd b/man/add_header_above.Rd
index 0c54c36..452479b 100644
--- a/man/add_header_above.Rd
+++ b/man/add_header_above.Rd
@@ -4,8 +4,10 @@
\alias{add_header_above}
\title{Add a header row on top of current header}
\usage{
-add_header_above(kable_input, header = NULL, bold = FALSE, italic = FALSE,
- monospace = FALSE, align = "c", escape = TRUE, line = TRUE)
+add_header_above(kable_input, header = NULL, bold = FALSE,
+ italic = FALSE, monospace = FALSE, underline = FALSE,
+ strikeout = FALSE, align = "c", color = NULL, background = NULL,
+ font_size = NULL, angle = NULL, escape = TRUE, line = TRUE)
}
\arguments{
\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
@@ -23,10 +25,30 @@
\item{monospace}{A T/F value to control whether the text of the selected column
need to be monospaced (verbatim)}
+\item{underline}{A T/F value to control whether the text of the selected row
+need to be underlined}
+
+\item{strikeout}{A T/F value to control whether the text of the selected row
+need to be stricked out.}
+
\item{align}{A character string for cell alignment. For HTML, possible values could
be \code{l}, \code{c}, \code{r} plus \code{left}, \code{center}, \code{right}, \code{justify}, \code{initial} and \code{inherit}
while for LaTeX, you can only choose from \code{l}, \code{c} & \code{r}.}
+\item{color}{A character string/vector for text color. Here please pay
+attention to the differences in color codes between HTML and LaTeX.}
+
+\item{background}{A character string/vector for background color. Here please
+pay attention to the differences in color codes between HTML and LaTeX. Also
+note that in HTML, background defined in cell_spec won't cover the whole
+cell.}
+
+\item{font_size}{A numeric input/vector for font size. For HTML, you can also use
+options including \code{xx-small}, \code{x-small}, \code{small}, \code{medium}, \code{large},
+\code{x-large}, \code{xx-large}, \code{smaller}, \code{larger}, \code{initial} and \code{inherit}.}
+
+\item{angle}{0-360, degree that the text will rotate.}
+
\item{escape}{A T/F value showing whether special characters should be
escaped.}
diff --git a/man/cell_spec.Rd b/man/cell_spec.Rd
index 1138e21..f8d09af 100644
--- a/man/cell_spec.Rd
+++ b/man/cell_spec.Rd
@@ -6,16 +6,18 @@
\title{Specify Cell/Text format}
\usage{
cell_spec(x, format, bold = FALSE, italic = FALSE, monospace = FALSE,
- underline = FALSE, strikeout = FALSE, color = NULL, background = NULL,
- align = NULL, font_size = NULL, angle = NULL, tooltip = NULL,
- popover = NULL, link = NULL, extra_css = NULL, escape = TRUE,
- background_as_tile = TRUE, latex_background_in_cell = TRUE)
+ underline = FALSE, strikeout = FALSE, color = NULL,
+ background = NULL, align = NULL, font_size = NULL, angle = NULL,
+ tooltip = NULL, popover = NULL, link = NULL, extra_css = NULL,
+ escape = TRUE, background_as_tile = TRUE,
+ latex_background_in_cell = TRUE)
text_spec(x, format, bold = FALSE, italic = FALSE, monospace = FALSE,
- underline = FALSE, strikeout = FALSE, color = NULL, background = NULL,
- align = NULL, font_size = NULL, angle = NULL, tooltip = NULL,
- popover = NULL, link = NULL, extra_css = NULL, escape = TRUE,
- background_as_tile = TRUE, latex_background_in_cell = FALSE)
+ underline = FALSE, strikeout = FALSE, color = NULL,
+ background = NULL, align = NULL, font_size = NULL, angle = NULL,
+ tooltip = NULL, popover = NULL, link = NULL, extra_css = NULL,
+ escape = TRUE, background_as_tile = TRUE,
+ latex_background_in_cell = FALSE)
}
\arguments{
\item{x}{Things to be formated. It could be a vector of numbers or strings.}
diff --git a/man/footnote.Rd b/man/footnote.Rd
index cabcb12..0f9e9aa 100644
--- a/man/footnote.Rd
+++ b/man/footnote.Rd
@@ -7,8 +7,9 @@
footnote(kable_input, general = NULL, number = NULL, alphabet = NULL,
symbol = NULL, footnote_order = c("general", "number", "alphabet",
"symbol"), footnote_as_chunk = FALSE, escape = TRUE,
- threeparttable = FALSE, general_title = "Note: ", number_title = "",
- alphabet_title = "", symbol_title = "", title_format = "italic")
+ threeparttable = FALSE, general_title = "Note: ",
+ number_title = "", alphabet_title = "", symbol_title = "",
+ title_format = "italic")
}
\arguments{
\item{kable_input}{HTML or LaTeX table generated by \code{knitr::kable}}
diff --git a/man/group_rows.Rd b/man/group_rows.Rd
index a9ada7e..3bf01cd 100644
--- a/man/group_rows.Rd
+++ b/man/group_rows.Rd
@@ -6,10 +6,10 @@
\usage{
group_rows(kable_input, group_label = NULL, start_row = NULL,
end_row = NULL, index = NULL,
- label_row_css = "border-bottom: 1px solid;", latex_gap_space = "0.3em",
- escape = TRUE, latex_align = "l", colnum = NULL, bold = T,
- italic = F, hline_before = F, hline_after = F,
- extra_latex_after = NULL)
+ label_row_css = "border-bottom: 1px solid;",
+ latex_gap_space = "0.3em", escape = TRUE, latex_align = "l",
+ colnum = NULL, bold = T, italic = F, hline_before = F,
+ hline_after = F, extra_latex_after = NULL)
}
\arguments{
\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
diff --git a/man/reexports.Rd b/man/reexports.Rd
index 1473b2c..87b7db4 100644
--- a/man/reexports.Rd
+++ b/man/reexports.Rd
@@ -4,7 +4,6 @@
\name{reexports}
\alias{reexports}
\alias{\%>\%}
-\alias{reexports}
\alias{kable}
\title{Objects exported from other packages}
\keyword{internal}
diff --git a/man/row_spec.Rd b/man/row_spec.Rd
index f803a7b..c65aede 100644
--- a/man/row_spec.Rd
+++ b/man/row_spec.Rd
@@ -5,9 +5,10 @@
\title{Specify the look of the selected row}
\usage{
row_spec(kable_input, row, bold = FALSE, italic = FALSE,
- monospace = FALSE, underline = FALSE, strikeout = FALSE, color = NULL,
- background = NULL, align = NULL, font_size = NULL, angle = NULL,
- extra_css = NULL, hline_after = FALSE, extra_latex_after = NULL)
+ monospace = FALSE, underline = FALSE, strikeout = FALSE,
+ color = NULL, background = NULL, align = NULL, font_size = NULL,
+ angle = NULL, extra_css = NULL, hline_after = FALSE,
+ extra_latex_after = NULL)
}
\arguments{
\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
diff --git a/man/xtable2kable.Rd b/man/xtable2kable.Rd
new file mode 100644
index 0000000..faf3281
--- /dev/null
+++ b/man/xtable2kable.Rd
@@ -0,0 +1,35 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/xtable2kable.R
+\name{xtable2kable}
+\alias{xtable2kable}
+\title{Convert xtable to a kable object}
+\usage{
+xtable2kable(x, ...)
+}
+\arguments{
+\item{x}{an xtable object}
+
+\item{...}{options for print.xtable}
+}
+\description{
+This function allow users to turn an xtable object into a kable
+so they can use most of kableExtra's functions with their xtable code without
+making too many changes. Note that although I tested many cases and it seems
+to work, this function may not be functional in some other cases. I'm not
+a regular xtable user and can only provide very limited support for this
+function.
+
+You should use this table in the same way as \code{print.xtable}. All the options
+you provided to this function will be sent to \code{print.xtable}. Instead of
+printing out the result, this function will return the LaTeX or HTML as
+text and a kable object.
+}
+\examples{
+\dontrun{
+library(xtable)
+xtable(mtcars) \%>\%
+ xtable2kable(booktabs = TRUE) \%>\%
+ kable_styling(latex_options = "striped")
+}
+
+}