EVOLUTION-MANAGER
Edit File: HighlightWeaveLatex.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: Sweave driver performing syntax highlighting</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 HighlightWeaveLatex {highlight}"><tr><td>HighlightWeaveLatex {highlight}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Sweave driver performing syntax highlighting</h2> <h3>Description</h3> <p>Sweave driver using the highlight latex renderer to perform syntax highlighting of input R code in sweave chunks. </p> <h3>Usage</h3> <pre> HighlightWeaveLatex( boxes = FALSE, bg = rgb(0.95, 0.95, 0.95, maxColorValue = 1), border = "black", highlight.options = list(boxes = boxes, bg = bg, border = border) ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>boxes</code></td> <td> <p>if <code>TRUE</code>, code blocks are wrapped in boxes.</p> </td></tr> <tr valign="top"><td><code>bg</code></td> <td> <p>background color for code boxes.</p> </td></tr> <tr valign="top"><td><code>border</code></td> <td> <p>color to use for the border of code boxes.</p> </td></tr> <tr valign="top"><td><code>highlight.options</code></td> <td> <p>Can be used instead of the other arguments to set the <code>boxes</code>, <code>bg</code> and <code>border</code> settings.</p> </td></tr> </table> <h3>Details</h3> <p>This sweave driver is very similar to standard driver that is included in <span class="samp">utils</span>. The difference is that input R code and verbatim output is rendered using <code>highlight</code> enabling syntax highlighting of R code. </p> <p>Instead of using <span class="samp">Sinput</span> and <span class="samp">Soutput</span> commands, this driver uses <span class="samp">Hinput</span> and <span class="samp">Houtput</span> and defines these commands at the very beginning of the document, letting the user the option to overwrite them as necessary. </p> <p>Latex boxes defined by the latex renderer (<code><a href="renderer_latex.html">renderer_latex</a></code>) and style definitions needed are also written at the beginning of the document. </p> <p>Because highlight does not use verbatim environments, the user of this driver can freely redefine the <span class="samp">Hinput</span>, <span class="samp">Houtput</span> and <span class="samp">Hchunk</span> environments to achieve greater control of the output latex document than with the standard driver. </p> <h3>Value</h3> <p>A sweave driver, suitable for the <span class="samp">driver</span> argument of <code><a href="../../utils/html/Sweave.html">Sweave</a></code> </p> <h3>Examples</h3> <pre> ## Not run: # using the driver on the grid vignette require( grid ) v <- vignette( "grid", package = "grid" )$file file.copy( v, "grid.Snw" ) Sweave( "grid.Snw", driver= HighlightWeaveLatex() ) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>highlight</em> version 0.5.1 <a href="00Index.html">Index</a>]</div> </body></html>