silcrow: Print a section symbol

Description Usage Arguments Value Examples

Description

Print a section symbol

Usage

1
silcrow(section_number = "", nbsp = section_number != "")

Arguments

section_number

Numeric or character value to print after the symbol. Can also be a vector of such values.

nbsp

Logical. Include a non-breaking space between the symbol and the section number? Defaults to TRUE if there is a section number.

Value

Character (UTF-8): A silcrow and, if indicated, a section number.

For multiple sections, two silcrows are traditionally used. Accordingly, the function returns two silcrows if section_number includes an en-dash, a comma, or (not recommended) a hyphen, or if section_number is a vector of length greater than one. In that last scenario, sections will be separated by commas and spaces.

Examples

1
2
3
4
5
6
7
8
silcrow()
silcrow(8.1)
silcrow("8.1.1")
silcrow("8.1.1", nbsp = FALSE)
silcrow(en("8.1", "8.2"))
silcrow("8.1 - 8.2") # hyphen not recommended; use en-dash for ranges
silcrow("8.1, 8.7")
silcrow(c("8.1", "8.7"))

BenjaminWolfe/typewritr documentation built on Nov. 23, 2019, 11:18 a.m.