Description Usage Arguments Details Value Examples
Creates a function to create numbered captions for figures, tables or other objects
1 2 |
prefix |
Character string containing text to go before object number. The default is Figure. |
auto_space |
Logical indicating whether or not a space should automatically be added following the prefix. Space is added by default. |
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 . |
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 |
[1] "Figure 1: This plot shows the distribution of flower colors"
[1] "Figure 1"
[1] "Figure 1: This plot shows the distribution of flower colors"
[1] "Table 1.1: Table of world populations sorted from greatest to least."
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.