| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/format.R |
| 3 |
\name{html_format} |
| 4 |
\alias{html_format} |
| 5 |
\alias{latex_format} |
| 6 |
\title{Output formats in YAML metadata} |
| 7 |
\usage{ |
| 8 |
html_format(options = NULL, meta = NULL, template = NULL, keep_md = FALSE) |
| 9 |
|
| 10 |
latex_format( |
| 11 |
options = NULL, |
| 12 |
meta = NULL, |
| 13 |
template = NULL, |
| 14 |
keep_md = FALSE, |
| 15 |
keep_tex = FALSE, |
| 16 |
latex_engine = "xelatex", |
| 17 |
citation_package = "natbib" |
| 18 |
) |
| 19 |
} |
| 20 |
\arguments{ |
| 21 |
\item{meta, options}{Arguments to be passed to \code{\link[=mark]{mark()}}.} |
| 22 |
|
| 23 |
\item{template}{A template file path.} |
| 24 |
|
| 25 |
\item{keep_md, keep_tex}{Whether to keep the intermediate \file{.md} and |
| 26 |
\file{.tex} files generated from \file{.Rmd}.} |
| 27 |
|
| 28 |
\item{latex_engine}{The LaTeX engine to compile \file{.tex} to \file{.pdf}.} |
| 29 |
|
| 30 |
\item{citation_package}{The LaTeX package for processing citations. Possible |
| 31 |
values are \code{none}, \code{natbib}, and \code{biblatex}.} |
| 32 |
} |
| 33 |
\description{ |
| 34 |
These functions exist only for historical reasons, and should never be called |
| 35 |
directly. They can be used to configure output formats in YAML, but you are |
| 36 |
recommended to use the file format names instead of these function names. |
| 37 |
} |
| 38 |
\details{ |
| 39 |
To configure output formats in the YAML metadata of the Markdown document, |
| 40 |
simply use the output format names such as \code{html} or \code{latex} in the \code{output} |
| 41 |
field in YAML, e.g., |
| 42 |
|
| 43 |
\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{--- |
| 44 |
output: |
| 45 |
html: |
| 46 |
options: |
| 47 |
toc: true |
| 48 |
keep_md: true |
| 49 |
latex: |
| 50 |
latex_engine: pdflatex |
| 51 |
--- |
| 52 |
}\if{html}{\out{</div>}} |
| 53 |
|
| 54 |
You can also use \code{litedown::html_format} instead of \code{html} (or |
| 55 |
\code{litedown::latex_format} instead of \code{latex}) if you like. |
| 56 |
} |
| 57 |
\note{ |
| 58 |
If you want to use the \code{Knit} button in RStudio, you must add a |
| 59 |
top-level field \code{knit: litedown:::knit} to the YAML metadata. See |
| 60 |
\url{https://yihui.org/litedown/#sec:knit-button} for more information. |
| 61 |
} |