texToPng | R Documentation |
Convert LaTeX to a png file
texToPng(
tex,
width = NULL,
height = NULL,
dpi = 72,
viewPng = FALSE,
fontsize = 12,
calcM = FALSE,
crop = FALSE
)
tex |
TeX string. Remember to escape backslash with \. |
width |
Width of the png. |
height |
Height of the png ( |
dpi |
Dpi of the png. Not used if |
viewPng |
View the result in the plots window. |
fontsize |
Front size used in the LaTeX document. |
calcM |
Estimate 1 em in pixels in the resulting png. |
crop |
Call command line program |
The filename of the png or a list if calcM = TRUE
.
## Not run:
tex <- "$\\mathbb{R}_{\\geqq}$"
texToPng(tex, viewPng = TRUE)
texToPng(tex, fontsize = 20, viewPng = TRUE)
texToPng(tex, height = 50, fontsize = 10, viewPng = TRUE)
texToPng(tex, height = 50, fontsize = 50, viewPng = TRUE)
tex <- "MMM"
texToPng(tex, dpi=72, calcM = TRUE)
texToPng(tex, width = 100, calcM = TRUE)
f <- texToPng(tex, dpi=300)
pngSize(f)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.