Debian Codegraph @

man/pandoc_args.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/pandoc.R
3 \name{pandoc_args}
4 \alias{pandoc_args}
5 \alias{pandoc_variable_arg}
6 \alias{pandoc_metadata_arg}
7 \alias{pandoc_metadata_file_arg}
8 \alias{pandoc_include_args}
9 \alias{pandoc_highlight_args}
10 \alias{pandoc_latex_engine_args}
11 \alias{pandoc_toc_args}
12 \alias{pandoc_citeproc_args}
13 \alias{pandoc_lua_filter_args}
14 \title{Functions for generating pandoc command line arguments}
15 \usage{
16 pandoc_variable_arg(name, value)
17
18 pandoc_metadata_arg(name, value)
19
20 pandoc_metadata_file_arg(file)
21
22 pandoc_include_args(in_header = NULL, before_body = NULL, after_body = NULL)
23
24 pandoc_highlight_args(highlight, default = "tango")
25
26 pandoc_latex_engine_args(latex_engine)
27
28 pandoc_toc_args(toc, toc_depth = 3)
29
30 pandoc_citeproc_args()
31
32 pandoc_lua_filter_args(lua_files)
33 }
34 \arguments{
35 \item{name}{Name of template variable to set.}
36
37 \item{value}{Value of template variable (defaults to \code{true} if missing).}
38
39 \item{file}{string. Path to a file}
40
41 \item{in_header}{One or more files with content to be included in the
42 header of the document.}
43
44 \item{before_body}{One or more files with content to be included before
45 the document body.}
46
47 \item{after_body}{One or more files with content to be included after the
48 document body.}
49
50 \item{highlight}{The name of a pandoc syntax highlighting theme.}
51
52 \item{default}{The highlighting theme to use if "default"
53 is specified.}
54
55 \item{latex_engine}{LaTeX engine for producing PDF output. Options are
56 "pdflatex", "lualatex", "xelatex", and "tectonic".}
57
58 \item{toc}{\code{TRUE} to include a table of contents in the output.}
59
60 \item{toc_depth}{Depth of headers to include in table of contents.}
61
62 \item{lua_files}{Character vector of file paths to Lua filter files. Paths
63 will be transformed by \code{\link{pandoc_path_arg}}.}
64 }
65 \value{
66 A character vector with pandoc command line arguments.
67 }
68 \description{
69 Functions that assist in creating various types of pandoc command line
70 arguments (e.g. for templates, table of contents, highlighting, and content
71 includes).
72 }
73 \details{
74 Non-absolute paths for resources referenced from the
75 \code{in_header}, \code{before_body}, and \code{after_body}
76 parameters are resolved relative to the directory of the input document.
77 }
78 \section{About Pandoc citeproc}{
79
80 For Pandoc version before 2.11, a pandoc filter \samp{pandoc-citeproc} is
81 used. Since Pandoc 2.11, the feature is built-in and activated using
82 \samp{--citeproc} flag. \samp{pandoc_citeproc_arg} will return the correct
83 switches depending on the Pandoc version in use.
84 }
85
86 \examples{
87 \dontrun{
88 library(rmarkdown)
89
90 pandoc_include_args(before_body = "header.htm")
91 pandoc_include_args(before_body = "header.tex")
92
93 pandoc_highlight_args("kate")
94
95 pandoc_latex_engine_args("pdflatex")
96
97 pandoc_toc_args(toc = TRUE, toc_depth = 2)
98 }
99 }