Description Usage Arguments Value Examples

Convert LaTeX to a png file

1 2 3 4 5 6 7 8 9 10 |

`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 pdfcrop. |

The filename of the png or a list if `calcM = TRUE`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
## 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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.