Print a paragraph symbol

pilcrow(paragraph_number = "", nbsp = paragraph_number != "")

Arguments

paragraph_number

Numeric or character value to print after the symbol.

nbsp

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

Value

Character (UTF-8): A pilcrow and, if indicated, a paragraph number.

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

Examples

pilcrow()
#> [1] "¶"
pilcrow(8)
#> [1] "¶ 8"
pilcrow("8")
#> [1] "¶ 8"
pilcrow("8", nbsp = FALSE)
#> [1] "¶8"
pilcrow(en("8", "9"))
#> [1] "¶ 8–9"
pilcrow("8 - 9") # hyphen not recommended; use en-dash for ranges
#> [1] "¶¶ 8 - 9"
pilcrow("8, 22")
#> [1] "¶¶ 8, 22"
pilcrow(c("8", "22"))
#> [1] "¶¶ 8, 22"