docr.txt: Text formatting helpers for RD documentation

Description Usage Arguments Examples

View source: R/docr_txt.R

Description

docr.txt

Usage

1
2
docr.txt(type = c("italics", "strong", "code", "preformatted", "url", "href",
  "email"), ...)

Arguments

...

The text body

format

The formatting variable for the text object; one of:

italics

emphasises text in italics

strong

creates bold text

code

formats inline code

preformatted

format ext as-is, useful for multi-line code

url

a url or web reference

href

url with custom link

email

an email address

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Created a line of body text with formatting
my_text <- paste0(collapse=" ",
             c('A function which allows passing',
               docr.txt('italics','external'),
               'arguments in the form of',
               docr.txt('code','alist')))

> docr.wrap(my_text)
# #'  A function which allows passing \\emph{external} arguments
# #'   in the form of \\code{alist}

CarlBoneri/roxydoc2 documentation built on Nov. 6, 2019, 8:01 a.m.