| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/util.R |
| 3 |
\name{pkg_file_lua} |
| 4 |
\alias{pkg_file_lua} |
| 5 |
\title{Get the full paths of Lua filters in an R package} |
| 6 |
\usage{ |
| 7 |
pkg_file_lua(filters = NULL, package = "rmarkdown") |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{filters}{A character vector of filenames for Lua filters to be |
| 11 |
retrieved in \file{rmarkdown/lua} folder of the package. By default |
| 12 |
(\code{NULL}), if none is provided, it returns all filters in that folder.} |
| 13 |
|
| 14 |
\item{package}{The name of the package in which to look for the filters.} |
| 15 |
} |
| 16 |
\value{ |
| 17 |
A character vector of absolute file paths for the Lua filter from the |
| 18 |
package. The returned paths have been processed by |
| 19 |
\code{\link{pandoc_path_arg}()}, so they are ready to be used by Pandoc. |
| 20 |
} |
| 21 |
\description{ |
| 22 |
Lua filters stored in a source package in the \file{inst/rmarkdown/lua} |
| 23 |
directory will be installed to the \file{rmarkdown/lua} directory in the |
| 24 |
package path. This function finds the full paths of the Lua filters in the |
| 25 |
installed packages. |
| 26 |
} |
| 27 |
\examples{ |
| 28 |
# list all Lua filters stored in the rmarkdown package |
| 29 |
pkg_file_lua() |
| 30 |
# get a specific filter |
| 31 |
pkg_file_lua(c("pagebreak.lua", "latex_div.lua")) |
| 32 |
} |