-
-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
also try the chunk option tbl.cap when tab.cap is NULL (quarto-dev/qu…
- Loading branch information
Showing
2 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: knitr | ||
Type: Package | ||
Title: A General-Purpose Package for Dynamic Report Generation in R | ||
Version: 1.45.3 | ||
Version: 1.45.4 | ||
Authors@R: c( | ||
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")), | ||
person("Abhraneel", "Sarma", role = "ctb"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,9 @@ kable = function( | |
if (!missing(align) && length(align) == 1L && !grepl('[^lcr]', align)) | ||
align = strsplit(align, '')[[1]] | ||
|
||
# Quarto uses the option name tbl-cap instead of tab-cap | ||
if (missing(caption) && is.null(caption)) caption = opts_current$get('tbl.cap') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yihui
Author
Owner
|
||
|
||
if (inherits(x, 'list')) { | ||
format = kable_format_latex(format) | ||
res = lapply( | ||
|
I don't think we normalize
tbl-cap
totbl.cap
so here this option is never set in quarto context.but I am not sure knitr should do anything with
tbl-cap
option as it will handle it no matter what knitr is doing.This will produce a caption
So I believe this commit could be revert if we consider
tbl-cap
is only quarto context.Unless we want to support
tbl-cap
as an alias in knitr too. In that case we need to add to known options so that it is normalize. Or check fortbl-cap
here.We could also just map
tbl-cap
totab-cap
in the normalization among aliases as we do forfig-format