rdoc_text_formats: Rdoc text formatting

Description Usage Arguments Details

Description

Set Rd text format defaults to be supplied to options(rdoc.text_formats = rdoc_text_formats())

Usage

1
2
3
4
5
6
7
rdoc_text_formats(r_logo = crayon::combine_styles("bold", "blue"),
  pkg = function(x) paste0("{", x, "}"),
  inline_code = prettycode::default_style(), italic = crayon::italic,
  bold = crayon::bold, table = list(float = "center", border_style =
  "single", align = "left"), email = crayon::underline,
  url = crayon::underline, href = crayon::underline,
  link = function(x) x)

Arguments

r_logo

R symbol

pkg

pkg references

inline_code

inline code, options to pass to the style argument of prettycode::highlight as a list of functions.

italic

italic font

bold

bold font

table

tabular, options to pass to cli::boxx as a list.

email

email formats

url

url references

href

href

link

links

Details

The input will generally be a function, unless otherwise indicated above. Functions must take and return a character vector. If set as NULL, the relevant text will be displayed using the defaults of tools::Rd2txt or the calling function it is passed to. Note that href and link formatting refer to the source reference which will otherwise be excluded by tools::Rd2txt.


rdoc documentation built on May 16, 2019, 5:05 p.m.