grid.lualatex: Render LaTeX in R with LuaTeX engine

View source: R/luatex.R

grid.lualatexR Documentation

Render LaTeX in R with LuaTeX engine

Description

Render LaTeX code in R graphics using LuaTeX engine.

Usage

lualatexGrob(tex, ...,
             preamble=luaPreamble(),
             postamble=getOption("dvir.postamble"),
             engine=lualatexEngine)
grid.lualatex(...)
luaPreamble(font="Times")

Arguments

tex

A character value containing LaTeX code.

preamble,postamble

LaTeX code that is placed around tex before processing.

engine

The TeX engine that is used for processing the LaTeX code.

...

Arguments passed to latexGrob.

font

The default font.

Details

This function takes LaTeX code as input, processes the LaTeX code to produce a DVI file, reads the DVI file, and renders the result using grid.

The default preamble does some setup appropriate to a standard LuaTeX document. The luaPreamble function can be used create variations on that.

The default engine is the lualatexEngine, which runs lualatex to generate DVI.

Value

A "DVIgrob" object.

Author(s)

Paul Murrell

See Also

readDVI, grid.dvi

Examples

## Not run: 

grid.latex("$x - \\mu$")

## End(Not run)

pmur002/dvir documentation built on Sept. 2, 2022, 3:03 p.m.