LaTeXpackage | R Documentation |
Define and register a LaTeX package for authoring, typesetting, and rendering LaTeX documents.
LaTeXpackage(name,
preamble=NULL,
prefix=NULL,
suffix=NULL,
special=NULL,
init=NULL,
final=NULL)
registerPackage(package)
name |
Character name for the package. |
preamble , prefix , suffix |
Character preamble, prefix, and suffix for authoring LaTeX documents. |
special |
Function for handling DVI specials during rendering. |
init , final |
Functions to initialise package before rendering and finalise after rendering. |
package |
A |
For simple cases, all that is required is a package name
and a preamble that just contains a \usepackage
command.
See the example below.
More complex cases may involve adding a prefix
and
a suffix
that, for example, begins and ends a 'LaTeX'
environment.
Advanced cases may involve writing functions init
,
special
, and final
, which are called to handle DVI
specials. The predefined
support for 'TikZ' is a particularly complicated example.
LaTeXpackage()
returns a "LaTeXpackage"
object.
Paul Murrell
LaTeXpackage("times", "\\usepackage{times}")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.