EVOLUTION-MANAGER
Edit File: knit2pdf.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 Rnw or Rrst files to PDF</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 knit2pdf {knitr}"><tr><td>knit2pdf {knitr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert Rnw or Rrst files to PDF</h2> <h3>Description</h3> <p>Knit the input Rnw or Rrst document, and compile to PDF using <code>tinytex::<a href="../../tinytex/html/latexmk.html">latexmk</a>()</code> or <code><a href="rst2pdf.html">rst2pdf</a>()</code>. </p> <h3>Usage</h3> <pre> knit2pdf( input, output = NULL, compiler = NULL, envir = parent.frame(), quiet = FALSE, ... ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>input</code></td> <td> <p>Path to the input file.</p> </td></tr> <tr valign="top"><td><code>output</code></td> <td> <p>Path to the output file for <code>knit()</code>. If <code>NULL</code>, this function will try to guess a default, which will be under the current working directory.</p> </td></tr> <tr valign="top"><td><code>compiler</code></td> <td> <p>A character string giving the LaTeX engine used to compile the tex document to PDF. For an Rrst file, setting <code>compiler</code> to <code>'rst2pdf'</code> will use <code><a href="rst2pdf.html">rst2pdf</a></code> to compile the rst file to PDF using the ReportLab open-source library.</p> </td></tr> <tr valign="top"><td><code>envir</code></td> <td> <p>Environment in which code chunks are to be evaluated, for example, <code><a href="../../base/html/sys.parent.html">parent.frame</a>()</code>, <code><a href="../../base/html/environment.html">new.env</a>()</code>, or <code><a href="../../base/html/environment.html">globalenv</a>()</code>).</p> </td></tr> <tr valign="top"><td><code>quiet</code></td> <td> <p>Boolean; suppress the progress bar and messages?</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Options to be passed to <code>tinytex::<a href="../../tinytex/html/latexmk.html">latexmk</a>()</code> or <code><a href="rst2pdf.html">rst2pdf</a>()</code>.</p> </td></tr> </table> <h3>Value</h3> <p>The filename of the PDF file. </p> <h3>Note</h3> <p>The <code>output</code> argument specifies the output filename to be passed to the PDF compiler (e.g. a tex document) instead of the PDF filename. </p> <h3>Author(s)</h3> <p>Ramnath Vaidyanathan, Alex Zvoleff and Yihui Xie </p> <h3>Examples</h3> <pre> #' compile with xelatex ## knit2pdf(..., compiler = 'xelatex') #' compile a reST file with rst2pdf ## knit2pdf(..., compiler = 'rst2pdf') </pre> <hr /><div style="text-align: center;">[Package <em>knitr</em> version 1.29 <a href="00Index.html">Index</a>]</div> </body></html>