| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/pandoc.R |
| 3 |
\name{pandoc.verbatim.return} |
| 4 |
\alias{pandoc.verbatim.return} |
| 5 |
\alias{pandoc.verbatim} |
| 6 |
\title{Add verbatim} |
| 7 |
\usage{ |
| 8 |
pandoc.verbatim.return(x, style = c("inline", "indent", "delim"), attrs = "") |
| 9 |
} |
| 10 |
\arguments{ |
| 11 |
\item{x}{character vector} |
| 12 |
|
| 13 |
\item{style}{show code \code{inline} or in a separate (\code{indent}ed or \code{delim}ited) block} |
| 14 |
|
| 15 |
\item{attrs}{(optionally) pass ID, classes and any attribute to the \code{delimited} block} |
| 16 |
} |
| 17 |
\value{ |
| 18 |
By default this function outputs (see: \code{cat}) the result. If you would want to catch the result instead, then call the function ending in \code{.return}. |
| 19 |
} |
| 20 |
\description{ |
| 21 |
Pandoc's markdown verbatim format (e.g. \code{`FOO`}) is added to character string. |
| 22 |
} |
| 23 |
\examples{ |
| 24 |
# different styles/formats |
| 25 |
pandoc.verbatim('FOO') |
| 26 |
|
| 27 |
src <- c('FOO', 'indent', 'BAR' ) |
| 28 |
pandoc.verbatim(src) |
| 29 |
pandoc.verbatim.return(src) |
| 30 |
pandoc.verbatim(c('FOOO\nBAR ', ' I do R'), 'indent') |
| 31 |
pandoc.verbatim(c('FOOO\nBAR ', ' I do R'), 'delim') |
| 32 |
|
| 33 |
# add highlighting and HTML/LaTeX ID and classes (even custom attribute) |
| 34 |
pandoc.verbatim(c('cat("FOO")', 'mean(bar)'), 'delim', '.R #MyCode custom_var="10"') |
| 35 |
} |
| 36 |
\references{ |
| 37 |
John MacFarlane (2012): _Pandoc User's Guide_. \url{https://johnmacfarlane.net/pandoc/README.html} |
| 38 |
} |
| 39 |
\seealso{ |
| 40 |
\code{\link{pandoc.emphasis}} \code{\link{pandoc.strikeout}} \code{\link{pandoc.strong}} |
| 41 |
} |