diff --git a/R/kbl.R b/R/kbl.R index 4e961e0..404c995 100644 --- a/R/kbl.R +++ b/R/kbl.R @@ -10,6 +10,13 @@ #' `knitr` version 1.45. If you are using an older #' or newer version, some of the default values may be different. #' +#' @note In `knitr::kable()`, the `escape` parameter does not affect the text +#' in the `caption` argument, and `kbl()` inherits this +#' behavior. This means that special characters +#' in the caption (such as "%" for LaTeX output) +#' need to be escaped by the user, e.g. +#' written as `"\\%"`. +#' #' @param table.attr A character string for addition HTML table attributes. #' This is convenient if you simply want to add a few HTML classes or styles. #' For example, you can put 'class="table" style="color: red"'. diff --git a/man/kbl.Rd b/man/kbl.Rd index 4c4800a..ed4319c 100644 --- a/man/kbl.Rd +++ b/man/kbl.Rd @@ -144,4 +144,11 @@ solve the auto format setting in a better way. The current set of arguments were written for \code{knitr} version 1.45. If you are using an older or newer version, some of the default values may be different. + +In \code{knitr::kable()}, the \code{escape} parameter does not affect the text +in the \code{caption} argument, and \code{kbl()} inherits this +behavior. This means that special characters +in the caption (such as "\%" for LaTeX output) +need to be escaped by the user, e.g. +written as \code{"\\\\\%"}. }