EVOLUTION-MANAGER
Edit File: pdf_document.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Convert to a PDF/LaTeX document</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for pdf_document {rmarkdown}"><tr><td>pdf_document {rmarkdown}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert to a PDF/LaTeX document</h2> <h3>Description</h3> <p>Formats for converting from R Markdown to a PDF or LaTeX document. </p> <h3>Usage</h3> <pre> pdf_document( toc = FALSE, toc_depth = 2, number_sections = FALSE, fig_width = 6.5, fig_height = 4.5, fig_crop = TRUE, fig_caption = TRUE, dev = "pdf", df_print = "default", highlight = "default", template = "default", keep_tex = FALSE, keep_md = FALSE, latex_engine = "pdflatex", citation_package = c("default", "natbib", "biblatex"), includes = NULL, md_extensions = NULL, output_extensions = NULL, pandoc_args = NULL, extra_dependencies = NULL ) latex_document(...) latex_fragment(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>toc</code></td> <td> <p><code>TRUE</code> to include a table of contents in the output</p> </td></tr> <tr valign="top"><td><code>toc_depth</code></td> <td> <p>Depth of headers to include in table of contents</p> </td></tr> <tr valign="top"><td><code>number_sections</code></td> <td> <p><code>TRUE</code> to number section headings</p> </td></tr> <tr valign="top"><td><code>fig_width</code></td> <td> <p>Default width (in inches) for figures</p> </td></tr> <tr valign="top"><td><code>fig_height</code></td> <td> <p>Default height (in inches) for figures</p> </td></tr> <tr valign="top"><td><code>fig_crop</code></td> <td> <p><code>TRUE</code> to automatically apply the <code>pdfcrop</code> utility (if available) to pdf figures</p> </td></tr> <tr valign="top"><td><code>fig_caption</code></td> <td> <p><code>TRUE</code> to render figures with captions</p> </td></tr> <tr valign="top"><td><code>dev</code></td> <td> <p>Graphics device to use for figure output (defaults to pdf)</p> </td></tr> <tr valign="top"><td><code>df_print</code></td> <td> <p>Method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". The "default" method uses a corresponding S3 method of <code>print</code>, typically <code>print.data.frame</code>. The "kable" method uses the <code><a href="../../knitr/html/kable.html">knitr::kable</a></code> function. The "tibble" method uses the <span class="pkg">tibble</span> package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the <code>df_print</code> behavior entirely by setting the option <code>rmarkdown.df_print</code> to <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>highlight</code></td> <td> <p>Syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", and "haddock". Pass <code>NULL</code> to prevent syntax highlighting.</p> </td></tr> <tr valign="top"><td><code>template</code></td> <td> <p>Pandoc template to use for rendering. Pass "default" to use the rmarkdown package default template; pass <code>NULL</code> to use pandoc's built-in template; pass a path to use a custom template that you've created. See the documentation on <a href="http://pandoc.org/README.html">pandoc online documentation</a> for details on creating custom templates.</p> </td></tr> <tr valign="top"><td><code>keep_tex</code></td> <td> <p>Keep the intermediate tex file used in the conversion to PDF</p> </td></tr> <tr valign="top"><td><code>keep_md</code></td> <td> <p>Keep the markdown file generated by knitting.</p> </td></tr> <tr valign="top"><td><code>latex_engine</code></td> <td> <p>LaTeX engine for producing PDF output. Options are "pdflatex", "lualatex", and "xelatex".</p> </td></tr> <tr valign="top"><td><code>citation_package</code></td> <td> <p>The LaTeX package to process citations, <code>natbib</code> or <code>biblatex</code>. Use <code>default</code> if neither package is to be used, which means citations will be processed via the command <code>pandoc-citeproc</code>.</p> </td></tr> <tr valign="top"><td><code>includes</code></td> <td> <p>Named list of additional content to include within the document (typically created using the <code><a href="includes.html">includes</a></code> function).</p> </td></tr> <tr valign="top"><td><code>md_extensions</code></td> <td> <p>Markdown extensions to be added or removed from the default definition or R Markdown. See the <code><a href="rmarkdown_format.html">rmarkdown_format</a></code> for additional details.</p> </td></tr> <tr valign="top"><td><code>output_extensions</code></td> <td> <p>Pandoc extensions to be added or removed from the output format, e.g., <code>"-smart"</code> means the output format will be <code>latex-smart</code>.</p> </td></tr> <tr valign="top"><td><code>pandoc_args</code></td> <td> <p>Additional command line options to pass to pandoc</p> </td></tr> <tr valign="top"><td><code>extra_dependencies</code></td> <td> <p>A LaTeX dependency <code>latex_dependency()</code>, a list of LaTeX dependencies, a character vector of LaTeX package names (e.g. <code>c("framed", "hyperref")</code>), or a named list of LaTeX package options with the names being package names (e.g. <code>list(hyperef = c("unicode=true", "breaklinks=true"), lmodern = NULL)</code>). It can be used to add custom LaTeX packages to the .tex header.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Arguments passed to <code>pdf_document()</code>.</p> </td></tr> </table> <h3>Details</h3> <p>See the <a href="https://rmarkdown.rstudio.com/pdf_document_format.html">online documentation</a> for additional details on using the <code>pdf_document</code> format. </p> <p>Creating PDF output from R Markdown requires that LaTeX be installed. </p> <p>R Markdown documents can have optional metadata that is used to generate a document header that includes the title, author, and date. For more details see the documentation on R Markdown <a href="rmd_metadata.html">metadata</a>. </p> <p>R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the <a href="https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html">Bibliographies and Citations</a> article in the online documentation. </p> <p>Many aspects of the LaTeX template used to create PDF documents can be customized using metadata. For example: </p> <table summary="Rd table"> <tr> <td style="text-align: left;"> <code>---</code> </td> </tr> <tr> <td style="text-align: left;"> <code>title: "Crop Analysis Q3 2013"</code> </td> </tr> <tr> <td style="text-align: left;"> <code>fontsize: 11pt</code> </td> </tr> <tr> <td style="text-align: left;"> <code>geometry: margin=1in</code> </td> </tr> <tr> <td style="text-align: left;"> <code>---</code> </td> </tr> </table> <p>Available metadata variables include: </p> <dl> <dt><code>lang</code></dt><dd><p>Document language code (e.g. "es", "fr", "pt-BR")</p> </dd> <dt><code>fontsize</code></dt><dd><p>Font size (e.g. 10pt, 11pt, 12pt)</p> </dd> <dt><code>documentclass</code></dt><dd><p>LaTeX document class (e.g. article)</p> </dd> <dt><code>classoption</code></dt><dd><p>Option for <code>documentclass</code> (e.g. oneside); may be repeated</p> </dd> <dt><code>geometry</code></dt><dd><p>Options for geometry class (e.g. margin=1in); may be repeated</p> </dd> <dt><code>mainfont, sansfont, monofont, mathfont</code></dt><dd><p>Document fonts (works only with xelatex and lualatex, see the <code>latex_engine</code> option)</p> </dd> <dt><code>linkcolor, urlcolor, citecolor</code></dt><dd><p>Color for internal, external, and citation links (red, green, magenta, cyan, blue, black)</p> </dd> <dt><code>linestretch</code></dt><dd><p>Options for line spacing (e.g. 1, 1.5, 3)</p> </dd> </dl> <h3>Value</h3> <p>R Markdown output format to pass to <code><a href="render.html">render</a></code> </p> <h3>Examples</h3> <pre> ## Not run: library(rmarkdown) # simple invocation render("input.Rmd", pdf_document()) # specify an option for latex engine render("input.Rmd", pdf_document(latex_engine = "lualatex")) # add a table of contents and pass an option to pandoc render("input.Rmd", pdf_document(toc = TRUE, "--listings")) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>rmarkdown</em> version 2.3 <a href="00Index.html">Index</a>]</div> </body></html>