* Added kable_paper style for a NYT like table
* Let column_spec take conditional formats
* Added html_font option for kable_styling
diff --git a/man/column_spec.Rd b/man/column_spec.Rd
index 698c688..aeff8ec 100644
--- a/man/column_spec.Rd
+++ b/man/column_spec.Rd
@@ -22,7 +22,11 @@
extra_css = NULL,
include_thead = FALSE,
latex_column_spec = NULL,
- latex_valign = "p"
+ latex_valign = "p",
+ link = NULL,
+ new_tab = TRUE,
+ tooltip = NULL,
+ popover = NULL
)
}
\arguments{
@@ -33,25 +37,25 @@
\item{width}{A character string telling HTML & LaTeX how wide the column
needs to be, e.g. "10cm", "3in" or "30em".}
-\item{bold}{A T/F value to control whether the text of the selected column
-need to be bolded.}
+\item{bold}{T/F value or vector to control whether the text of the selected
+column need to be bolded.}
-\item{italic}{A T/F value to control whether the text of the selected column
-need to be emphasized.}
+\item{italic}{T/F value or vector to control whether the text of the
+selected column need to be emphasized.}
-\item{monospace}{A T/F value to control whether the text of the selected column
-need to be monospaced (verbatim)}
+\item{monospace}{T/F value or vector 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{underline}{T/F value or vector 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{strikeout}{T/F value or vector to control whether the text of the
+selected row need to be striked out.}
-\item{color}{A character string for column text color. Here please pay
-attention to the differences in color codes between HTML and LaTeX.}
+\item{color}{A character string or vector for column text color. Here please
+pay attention to the differences in color codes between HTML and LaTeX.}
-\item{background}{A character string for column background color. Here please
+\item{background}{A character string or vector for column background color. Here please
pay attention to the differences in color codes between HTML and LaTeX.}
\item{border_left}{A logical variable indicating whether there should be a
@@ -70,8 +74,8 @@
\item{width_max}{Only for HTML table. \code{width_max} defines the maximum width
of table columns.}
-\item{extra_css}{Extra css text to be passed into the cells of the row. Note
-that it's not for the whole column but to each individual cells}
+\item{extra_css}{A vector of extra css text to be passed into the cells of
+the column.}
\item{include_thead}{T/F. A HTML only feature to contoll whether the
header row will be manipulated. Default is \code{FALSE}.}
@@ -81,6 +85,20 @@
\item{latex_valign}{vertical alignment. Only works when you specified column
width. Choose among \code{p}, \code{m}, \code{b}.}
+
+\item{link}{A vector of strings for url links.}
+
+\item{new_tab}{T/F for whether to open up the new link in new tab}
+
+\item{tooltip}{A vector of strings to be displayed as tooltip.
+Obviously, this feature is only available in HTML. Read the package
+vignette to see how to use bootstrap tooltip css to improve the loading
+speed and look.}
+
+\item{popover}{Similar with tooltip but can hold more contents. The best way
+to build a popover is through \code{spec_popover()}. If you only provide a text
+string, it will be used as content. Note that You have to enable this
+bootstrap module manually. Read the package vignette to see how.}
}
\description{
This function allows users to select a column and then specify
diff --git a/man/kable_classic.Rd b/man/kable_classic.Rd
index 4250603..787d44e 100644
--- a/man/kable_classic.Rd
+++ b/man/kable_classic.Rd
@@ -6,17 +6,50 @@
\alias{kable_minimal}
\alias{kable_material}
\alias{kable_material_dark}
+\alias{kable_paper}
\title{Alternative HTML themes}
\usage{
-kable_classic(kable_input, lightable_options = "basic", ...)
+kable_classic(
+ kable_input,
+ lightable_options = "basic",
+ html_font = "\\"Arial Narrow\\", \\"Source Sans Pro\\", sans-serif",
+ ...
+)
-kable_classic_2(kable_input, lightable_options = "basic", ...)
+kable_classic_2(
+ kable_input,
+ lightable_options = "basic",
+ html_font = "\\"Arial Narrow\\", \\"Source Sans Pro\\", sans-serif",
+ ...
+)
-kable_minimal(kable_input, lightable_options = "basic", ...)
+kable_minimal(
+ kable_input,
+ lightable_options = "basic",
+ html_font = "calibri, cambria, \\"Source Sans Pro\\", sans-serif",
+ ...
+)
-kable_material(kable_input, lightable_options = "basic", ...)
+kable_material(
+ kable_input,
+ lightable_options = "basic",
+ html_font = "\\"Source Sans Pro\\", helvetica, sans-serif",
+ ...
+)
-kable_material_dark(kable_input, lightable_options = "basic", ...)
+kable_material_dark(
+ kable_input,
+ lightable_options = "basic",
+ html_font = "\\"Source Sans Pro\\", helvetica, sans-serif",
+ ...
+)
+
+kable_paper(
+ kable_input,
+ lightable_options = "basic",
+ html_font = "\\"Arial Narrow\\", arial, helvetica, sans-serif",
+ ...
+)
}
\arguments{
\item{kable_input}{A HTML kable object.}
diff --git a/man/kable_styling.Rd b/man/kable_styling.Rd
index 4aedfaa..d95b4b8 100644
--- a/man/kable_styling.Rd
+++ b/man/kable_styling.Rd
@@ -21,7 +21,8 @@
protect_latex = TRUE,
table.envir = "table",
fixed_thead = FALSE,
- htmltable_class = NULL
+ htmltable_class = NULL,
+ html_font = NULL
)
}
\arguments{
@@ -101,6 +102,9 @@
\code{lightable-classic-2}, \code{lightable-material}, \code{lightable-striped} and
\code{lightable-hover}. If you have your customized style sheet loaded which
defines your own table class, you can also load it here.}
+
+\item{html_font}{A string for HTML css font. For example,
+\code{html_font = '"Arial Narrow", arial, helvetica, sans-serif'}.}
}
\description{
This function provides a cleaner approach to modify the style