Function Repository Resource:

LaTeXPreview

Source Notebook

Render LaTeX as an image

Contributed by: Aster Gal

ResourceFunction["LaTeXPreview"][tex]

renders the string tex as an image.

Details and Options

ResourceFunction["LaTeXPreview"] uses a third-party API, so a network connection is required.
The following option values are supported for the option "API":
"Codecogs"https://latex.codecogs.com
"LaTeX2PNG"https://latex2png.com

Examples

Basic Examples (1) 

Show a string as an image:

In[1]:=
tex = "\\Gamma_{\\epsilon}(x)=\\left[1-e^{-2 \\pi \\epsilon}\\right]^{1-x} \\prod_{n=0}^{\\infty} \\frac{1-\\exp (-2 \\pi \\epsilon(n+1))}{1-\\exp (-2 \\pi \\epsilon(x+n))}";
In[2]:=
ResourceFunction["LaTeXPreview"][tex]
Out[2]=

Options (2) 

API (1) 

Get rendering results from a different place:

In[3]:=
ResourceFunction["LaTeXPreview"][tex, "API" -> "LaTeX2PNG"]
Out[3]=

ImageResolution (1) 

Get HD rendering from LaTeX2PNG:

In[4]:=
ResourceFunction["LaTeXPreview"][tex, "API" -> "LaTeX2PNG", ImageResolution -> 300]
Out[4]=

Publisher

Aster Ctor (MoeNet)

Version History

  • 1.0.0 – 02 October 2019

Author Notes

Todo:

https://quicklatex.com/

License Information