TeXView
Supports Offload
TeXView[expr_String]
TeXView[expr_]renders expr as LaTeX expression to the screen. Use TeXForm arbitrary expression to LaTeX string.
For example:
TeXView[1/2 // TeXForm]or directly using LaTeX:
TeXView["\\frac{1}{2}"]It works on slides, markdown and in a normal Wolfram output cells. You can embed it too:
Plot[x, {x,0,1}, Epilog->{
Inset[TeXView[TeXForm[y==x], ImageSize->Medium], {0.5`,0.5`}]
}]TeXForm is a blocking function, avoid using it inside Button-like, Manipulate, timers, async functions. Use non-blocking variant TexFormAsync.
Options
ImageSize
Predefines the container size for the expression
Aligment or AlignmentPoint
Sets the aligment of the content inside the contaner defined by ImageSize. Possible values:
Center{Center, Center}{Left, Top}{Right, Top}- ...
Live updates
It supports Offload method. The expressions can be rerendered of the underlying data changes:
str = TeXForm[Integrate[f[x], x]];
TeXView[str//Offload]then
str = TeXForm[Integrate[f[x] x, x]];or using a buttom:
Button["Generate", Then[TeXFormAsync[Series[Sin[x] Cos[x], {x, 0, RandomInteger[{1, 30}]}]], (str = #1)&]]