Str: Text (String)

View source: R/pandocfilters.R

StrR Documentation

Text (String)

Description

Constructs an inline object of type "Str".

Usage

Str(x)

Arguments

x

a character string

Details

To minimize the amount of unnecessary typing, pandoc filters automatically converts character strings to pandoc objects of type "Str" if needed. Furthermore, if a single inline object is provided where a list of inline objects is needed pandocfilters automatically converts this inline object into a list of inline objects. For example, the canonical way to emphasize the character string "some text" would be Emph(list(Str("some text"))) since single inline objects are automatically transformed to lists of inline objects, this is equivalent to Emph(Str("some text")). Since a character string is automatically transformed to an inline object, this is is equivalent to Emph("some string"). In short, whenever a list of inline objects is needed one can also use a single inline object or a character string.

Examples

Str("SomeString")

pandocfilters documentation built on Aug. 12, 2022, 1:05 a.m.