Rd2txt_options {tools}R Documentation

Set Formatting Options for Text Help

Description

This function sets various options for displaying text help.

Usage

Rd2txt_options(...)

Arguments

...

A list containing named options, or options passed as individual named arguments. See below for currently defined ones.

Details

This function persistently sets various formatting options for the Rd2txt function which is used in displaying text format help. Currently defined options (defaults) are:

width (80)

The width of the output page.

minIndent (10)

The minimum indent to use in a list.

extraIndent (4)

The extra indent to use in each level of nested lists.

sectionIndent (5)

The indent level for a section.

sectionExtra (2)

The extra indentation for each nested section level.

itemBullet ("* ", but "\u2022 " in UTF-8 locales)

The symbol to use as a bullet in ⁠\itemize⁠ lists.

enumFormat (function(n) sprintf("%d. ", n))

A function to format item numbers in ⁠\enumerate⁠ lists.

descStyle ("linebreak")

How to separate the item label from the body in ⁠\describe⁠ lists. The alternative "colon" inserts a colon if the label does not already end with one. Use NULL for a simple space (as in R < 4.6.0).

showURLs (FALSE)

Whether to show URLs when expanding ⁠\href⁠ tags.

code_quote (TRUE)

Whether to render ⁠\code⁠ and similar with single quotes.

underline_titles (TRUE)

Whether to render section titles with underlines (via backspacing).

Value

If called with no arguments, returns all option settings in a list. Otherwise, it changes the named settings and invisibly returns their previous values.

Author(s)

Duncan Murdoch and the R Core Team

See Also

Rd2txt

Examples

saveOpts <- Rd2txt_options()
saveOpts
Rd2txt_options(minIndent = 4)
Rd2txt_options()[["minIndent"]]
Rd2txt_options(saveOpts)
stopifnot(identical(Rd2txt_options(), saveOpts))

[Package tools version 4.6.0 Index]