knitr 1.25
NEW FEATURES
-
Office outputs (e.g.,
rmarkdown::word_document
) supports the following chunk optionsout.width
,out.height
,out.extra
. Their behavior follows the behavior of Pandoc'slink_attributes
extention (thanks, @atusy, #1746). -
The chunk option
fig.process
can be specified by a function with theoptions
argument to read chunk options (thanks, @atusy, #1749). -
For
kable(format = 'latex')
, a single string consisting ofl
,c
, andr
for thealign
argument also works now, e.g.,knitr::kable(head(iris), 'latex', align = 'llcrr')
. Previously it has to be a character vector of individual letters.
MAJOR CHANGES
- Reverted #1519 (which intended to fix #1487): the
valign
argument ofkable(format = 'latex')
meant to control the vertical alignment of the innertabular
environment, instead of the floating position of the outertable
environment. A separate argument namedposition
has been added to control the floating position (e.g.,position = "!b"
).
MINOR CHANGES
- The returned value of
combine_words()
is wrapped inxfun::raw_string()
for pretty printing.
BUG FIXES
-
The
output
hook forrender_sweave()
failed to respect the chunk optionresults='asis'
(thanks, Achim Zeileis, https://stackoverflow.com/q/57571790/559676). -
Added the unit
px
to the chunk optionout.width
if its value is numeric (thanks, @chendaniely, #1761). -
The chunk option
dependson
did not work for non-R engines (thanks, @nielsrhansen, #1601).