Lua filters stored in a source package in the inst/rmarkdown/lua
directory will be installed to the rmarkdown/lua
directory in the
package path. This function finds the full paths of the Lua filters in the
installed packages.
pkg_file_lua(filters = NULL, package = "rmarkdown")
A character vector of absolute file paths for the Lua filter from the
package. The returned paths have been processed by
pandoc_path_arg()
, so they are ready to be used by Pandoc.
# list all Lua filters stored in the rmarkdown package
pkg_file_lua()
#> [1] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/anchor-sections.lua"
#> [2] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/codefolding.lua"
#> [3] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/latex-div.lua"
#> [4] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/number-sections.lua"
#> [5] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/pagebreak.lua"
#> [6] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/shared.lua"
#> [7] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/table-classes.lua"
# get a specific filter
pkg_file_lua(c("pagebreak.lua", "latex_div.lua"))
#> [1] "/home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/pagebreak.lua"