In this version, enhancements have been made to allow formatting via knitr chunk options, CSS, and LaTeX.
The parameter suffix
allows you to specify a figure suffix. The default
value is :
. auto_space
now affects both the prefix and suffix.
Using style
and style_prefix
you can set markdown style formatting (bold,
italic, bold+italic), which applies either to the entire caption
(style_prefix = FALSE
) or to the prefix only (style_prefix = TRUE
).
Added a hook to automatically display figure captions using the chunk name
to find the caption. Other chunk options can be set inside the call to
captioner()
.
To use the hook, the name of your chunk must be identical to the name of the
caption that you want to display. Also, you must add the option cap = X
where X
is the name of your captioner()
function.
The new parameters before
and knitr_op
were also added to captioner()
.
before
allows you to determine whether to display the caption before
(before = TRUE
) or after (before = FALSE
) when using automatic caption
display. knitr_op
takes a named list containing any other chunk options that
you want to keep constant across all captioned chunks.
You can specify a CSS class to go with the caption and aid in formatting by
using the parameter css_class
when creating your captioner()
function.
Updated documentation in preparation for CRAN release
Fixed a bug in the code deprecation message
Maintains the deprecated parameters cite
and num
for backwards compatibility
Adds a display
parameter that allows captions to be defined without displaying them (#14). This replaces the parameters cite
and num
.
Added capability to display the figure number without any surrounding text using the parameter num
(#10).
Added the capability to do hierarchical numbering (e.g. Figure 1.1.1). (#8, #11)
Captioner's first unofficial release.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.