Counter factory.
counter.Rd
Define a counter with cnt <- counter("type")
. Add cross-referenced label
in your document with cnt$set("ref")
. Refer to "ref" with cnt$get("ref")
.
Arguments
- label
character. Default prefix for the counter.
- open
character. Opening bracket such as "(" or "["
- close
character. Closing bracket such as ")" or "]"
- sep
character. Separator between label and counter.
- link
logical. If TRUE, get() method returns a counter surrounded by a tag, linked to the referenced id.