Description Usage Arguments Details Value Examples
Creates a function to create numbered captions for figures, tables or other objects
1 2 3 |
prefix |
Character string containing text to go before object number. The default is Figure. |
suffix |
Character string containing text to go after object number and before caption. The default is ": ". |
auto_space |
Logical indicating whether a single space should automatically be added after the prefix and suffx. Default is TRUE. |
style |
Optional character string indicating md style to use. Possible options: bold b, italic i, or bold+italic bi. |
style_prefix |
Logical specifying whether the style should be applied to the prefix only (TRUE) or the entire caption. The default is FALSE. |
levels |
Logical or number indicating whether or not you want hierarchical numbering, and if so, how many levels. Hierarchical numbering is turned off by default. |
type |
Vector with same length as |
infix |
Character string containing text to go between figure numbers if hierarchical numbering is on. Default is . |
before |
Logical indicating whether to display the caption before or after the figure. Applies only to automatic caption display (e.g. with a hook). |
knitr_op |
A named list containing any other chunk options desired. |
css_class |
Assign a css class to the caption. Places the caption into a span html element with a class. |
Captioner generates a function with the following parameters
name
: Character string containing a unique object name
caption
: The object caption
display
: Character string (or logical) indicating what display mode you would like:
full or f is the default and shows the entire caption with prefix and number
cite or c displays just the prefix and number, without the caption
num or n displays just the number
level
: Optional numeric used to bump up the numbering if you have hierarchical numbering. See also bump
.
cite
: Deprecated. Please use display
.
num
: Deprecated. Please use display
.
And returns a character string containing the prefix and object number with or without a caption. The initial numbering is determined based on the order of caption creation. However, this order is modified based on the citations you use. The first figure to be cited will be moved to the beginning of the list, becoming Figure 1.
A captioner function.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.