Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pandoc.verbatim.return

Add verbatim


Description

Pandoc's markdown verbatim format (e.g. `FOO`) is added to character string.

Usage

pandoc.verbatim.return(x, style = c("inline", "indent", "delim"),
  attrs = "")

Arguments

x

character vector

style

show code inline or in a separate (indented or delimited) block

attrs

(optionally) pass ID, classes and any attribute to the delimited block

Value

By default this function outputs (see: cat) the result. If you would want to catch the result instead, then call the function ending in .return.

References

John MacFarlane (2012): _Pandoc User's Guide_. http://johnmacfarlane.net/pandoc/README.html

See Also

Examples

# different styles/formats
pandoc.verbatim('FOO')

src <- c('FOO', 'indent', 'BAR' )
pandoc.verbatim(src)
pandoc.verbatim.return(src)
pandoc.verbatim(c('FOOO\nBAR  ', ' I do R'), 'indent')
pandoc.verbatim(c('FOOO\nBAR  ', ' I do R'), 'delim')

# add highlighting and HTML/LaTeX ID and classes (even custom attribute)
pandoc.verbatim(c('cat("FOO")', 'mean(bar)'), 'delim', '.R #MyCode custom_var="10"')

pander

An R 'Pandoc' Writer

v0.6.3
AGPL-3 | file LICENSE
Authors
Gergely Daróczi [aut, cre] (<https://orcid.org/0000-0003-3149-8537>), Roman Tsegelskyi [aut]
Initial release
2018-11-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.