Description
LaTeXStrings.jl is a small Julia package that makes it easier to type LaTeX equations in string literals. Normally you have to escape every backslash and dollar sign in a Julia string, but this package gives you the L string macro, so you can write L followed by quotes around the equation and skip most of the escaping. The macro also adds the dollar signs for you if you leave them out. The package defines a LaTeXString type, which is a subtype of String, so it behaves like a string for indexing and conversion. In IJulia notebooks it displays as LaTeX. The README includes an FAQ that makes clear the package does not render LaTeX itself. Plotting software, notebooks and tools such as Pluto are responsible for rendering, for example with MathJax or MathTeXEngine.jl, and LaTeXStrings only provides the text. You install it with Pkg.add in Julia and load it with using. The package was written by Steven G. Johnson, and the source is public on GitHub under the JuliaStrings organization. It suits Julia users who write equations in plots, notebooks and documents.…
Highlights
- L string macro for LaTeX literals
- LaTeXString type that displays as LaTeX
- No escaping of backslashes or dollar signs
- Works with Julia notebooks
Ratings & Reviews
No ratings yet
Be the first to rate LaTeXStrings.jl.
People also visit
LaTeXStrings.jl FAQ
What is LaTeXStrings.jl?
A Julia package that makes it easier to write LaTeX equations in string literals.
Does it render LaTeX?
No. The README says it only provides the LaTeX text. Notebooks, plotting packages and tools like Pluto do the rendering.
How do I install it?
Run Pkg.add("LaTeXStrings") in Julia, then load the package with using LaTeXStrings.
How do I write an equation?
Use the L string macro, for example L"1 + \alpha^2", or the triple-quoted form for multi-line strings.
What are the best LaTeXStrings.jl alternatives?
Popular alternatives to LaTeXStrings.jl include LatexInNotebooklm, Upmath.me and LaTeX-OCR. See all LaTeXStrings.jl alternatives



