A wrapper for pretty_captioner with sensible defaults for captioning supplementary tables

pretty_suptabref(label = NULL, caption = NULL,
  prefix = "Supplementary Table", sec_prefix = "S", auto_space = TRUE,
  levels = 1, type = NULL, infix = ".", display = "full",
  inline = FALSE, reinit = FALSE, ...)



Character string containing a unique object name.


Character string containing the object caption.


Character string containing text to go before object number. The default is Figure.


Character string containing text to between prefix and object number. The default is to add nothing.


Logical indicating whether or not a space should automatically be added following the prefix. Space is added by default.


Logical or number indicating whether or not you want hierarchical numbering, and if so, how many levels. Hierarchical numbering is turned off by default.


Vector with same length as levels indicating whether figure numbering should be numeric (n), lowercase character (c), or uppercase character (C). If unspecified, captioner will revert to all numeric values.


Character string containing text to go between figure numbers if hierarchical numbering is on. Default is .


Character string (logical) indicating what display mode you would like: full (or f) displays all information, cite (or c) displays just the prefix and number, and num (or n) displays just the number.


Logical indicating whether the function should display the prefix uncapitalised/capitalised.


Logical indicating whether to reinitialise the underlying captioner function.


Pass additional arguements to the intialised captioner function


A character string containing the table/figure number, and optionally the caption.


As a wrapper for the captioner function pretty_captioner intialises a captioner function in the global enviroment. This is then used by pretty_captioner to return a character string containing the prefix, sec_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 object to be cited will be moved to the beginning of the list, becoming object 1. Changing captioner parameters (prefix, sec_prefix, auto_space, levels, type, and infix) requires the captioner function to be reinitialised by setting reinit to TRUE. The captioner function can also be initialised without reference to an object by not supplying a label or caption argument. For more details see captioner.

See also

prettypublisher has a group of related functions which use various defaults: pretty_captioner, pretty_figref, pretty_supfigref, pretty_tabref, and pretty_suptabref.


## Generate a simple reference pretty_suptabref('1' , 'Example', reinit = TRUE)
#> Initialising captioning function: suptabref
#> [1] "Supplementary Table S1: Example"
## cite in text pretty_suptabref('1')
#> [1] "Supplementary Table S1"
## Drop captilisation for use in line pretty_suptabref('1', inline = TRUE)
#> [1] "supplementary table S1"
## Add another table caption pretty_suptabref('2' , 'Example 2')
#> [1] "Supplementary Table S2: Example 2"