1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pandoc.R
\name{pandoc.list.return}
\alias{pandoc.list.return}
\alias{pandoc.list}
\title{Create a list}
\usage{
pandoc.list.return(elements, style = c("bullet", "ordered", "roman"),
loose = FALSE, add.line.breaks = TRUE, add.end.of.list = TRUE,
indent.level = 0, missing = panderOptions("missing"), ...)
}
\arguments{
\item{elements}{character vector of strings}
\item{style}{the required style of the list}
\item{loose}{adding a newline between elements}
\item{add.line.breaks}{adding a leading and trailing newline before/after the list}
\item{add.end.of.list}{adding a separator comment after the list}
\item{indent.level}{the level of indent}
\item{missing}{string to replace missing values}
\item{...}{extra arguments passed by from parent call, disregarded}
}
\value{
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}.
}
\description{
Creates a Pandoc's markdown format list from provided character vector/list.
}
\examples{
## basic lists
pandoc.list(letters[1:5])
pandoc.list(letters[1:5])
pandoc.list(letters[1:5], 'ordered')
pandoc.list(letters[1:5], 'roman')
pandoc.list(letters[1:5], loose = TRUE)
## nested lists
l <- list("First list element",
rep.int('sub element', 5),
"Second element",
list('F', 'B', 'I', c('phone', 'pad', 'talics')))
pandoc.list(l)
pandoc.list(l, loose = TRUE)
pandoc.list(l, 'roman')
## complex nested lists
pandoc.list(list('one', as.list(2)))
pandoc.list(list('one', list('two')))
pandoc.list(list('one', list(2:3)))
}
\references{
John MacFarlane (2012): _Pandoc User's Guide_. \url{http://johnmacfarlane.net/pandoc/README.html}
}
|