# \#latexstrings

**URL:** https://discourse.julialang.org/tag/latexstrings/923.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Add newline to LaTeXString equation](https://discourse.julialang.org/t/add-newline-to-latexstring-equation/95104)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 10\
**Last updated:** [March 9, 2026, 2:07pm UTC](https://discourse.julialang.org/t/add-newline-to-latexstring-equation/95104 "2026-03-09T14:07:35Z")

</div>

Hello, I have a LaTeXString which is too long to fit in one page-width. How can I add a line break to the equation so that it fits? I tried to add a \\\\ in the middle, but that didn’t change the rendering at all. julia\> …

---

## [How to display a LateXString in pluto?](https://discourse.julialang.org/t/how-to-display-a-latexstring-in-pluto/135230)

<div class="topic-metadata">

**Author:** [@Jean\_Michel](https://discourse.julialang.org/u/Jean_Michel)\
**Replies:** 2\
**Last updated:** [January 23, 2026, 10:05pm UTC](https://discourse.julialang.org/t/how-to-display-a-latexstring-in-pluto/135230 "2026-01-23T22:05:53Z")

</div>

I have my type of objects Mvp (for “multivariate polynomials”) and I have overloaded latexstring for them. For example, for a certain polynomial p I have at the repl: julia\> latexstring(p) L"$x^3+3x^2y+3xy^2+y^3$" If i…

---

## [Using straight font with Makie and LaTeXStrings](https://discourse.julialang.org/t/using-straight-font-with-makie-and-latexstrings/132832)

<div class="topic-metadata">

**Author:** [@tduretz](https://discourse.julialang.org/u/tduretz)\
**Replies:** 11\
**Last updated:** [October 4, 2025, 9:09pm UTC](https://discourse.julialang.org/t/using-straight-font-with-makie-and-latexstrings/132832 "2025-10-04T21:09:32Z")

</div>

Hi everyone, I am currently having issues because I’m being asked to produce a figure in which all greek characters should appear in straight fonts. I have tried many ways (using \\upmu instead of \\mu, using unicode dire…

---

## [Latex fonts on axis and labels in Makie](https://discourse.julialang.org/t/latex-fonts-on-axis-and-labels-in-makie/131887)

<div class="topic-metadata">

**Author:** [@tduretz](https://discourse.julialang.org/u/tduretz)\
**Replies:** 7\
**Last updated:** [August 27, 2025, 3:33pm UTC](https://discourse.julialang.org/t/latex-fonts-on-axis-and-labels-in-makie/131887 "2025-08-27T15:33:09Z")

</div>

I would like to use LaTeX fonts for every text of a Makie figure. It’s easy to apply them to labels as LaTeXStrings can be used. For other texts, in particular axis tick labels, it a bit less trivial. I was once told …

---

## [LaTeXParseError when trying to make plot title using LaTeXStrings](https://discourse.julialang.org/t/latexparseerror-when-trying-to-make-plot-title-using-latexstrings/130565)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 3\
**Last updated:** [July 8, 2025, 8:36pm UTC](https://discourse.julialang.org/t/latexparseerror-when-trying-to-make-plot-title-using-latexstrings/130565 "2025-07-08T20:36:52Z")

</div>

I’m trying to create a LaTeXString title for a Makie plot that uses string interpolation, but I’m getting some weird behavior. Some of the LaTeXStrings that I’ve tried have worked, but others have not, and give me an err…

---

## [How to use amssymb in Plots.jl with LaTeXStrings?](https://discourse.julialang.org/t/how-to-use-amssymb-in-plots-jl-with-latexstrings/126728)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 0\
**Last updated:** [March 9, 2025, 12:14pm UTC](https://discourse.julialang.org/t/how-to-use-amssymb-in-plots-jl-with-latexstrings/126728 "2025-03-09T12:14:28Z")

</div>

How to use amssymb commands in L"..."-labels of plots? Using, for example, \\mathbb returns the following error: ! Undefined control sequence. \\pgfplots@already@computed@legend@node ...\\mathbb …

---

## [Makie mathcal boldface](https://discourse.julialang.org/t/makie-mathcal-boldface/123233)

<div class="topic-metadata">

**Author:** [@clm](https://discourse.julialang.org/u/clm)\
**Replies:** 1\
**Last updated:** [November 29, 2024, 7:04am UTC](https://discourse.julialang.org/t/makie-mathcal-boldface/123233 "2024-11-29T07:04:32Z")

</div>

Hi all, I’m having an issue using calligraphic fonts using LaTeXStrings.jl within Makie. A previous question noted that the default calligraphic fonts didn’t align between LaTeXStrings and their tex file – and this prob…

---

## [\[Makie\] \\widehat and \\widetilde in xlabel](https://discourse.julialang.org/t/makie-widehat-and-widetilde-in-xlabel/117277)

<div class="topic-metadata">

**Author:** [@Jeonghun\_Lee](https://discourse.julialang.org/u/Jeonghun_Lee)\
**Replies:** 2\
**Last updated:** [July 22, 2024, 3:26am UTC](https://discourse.julialang.org/t/makie-widehat-and-widetilde-in-xlabel/117277 "2024-07-22T03:26:24Z")

</div>

Here’s my code. using CairoMakie using LaTeXStrings fig = Figure() ax = Axis(fig\[1,1\], xlabel=L"\\widehat{EE}") fig I got the following error message. { "name": "MathTeXEngine.TeXParseError", "message": "TeXParseE…

---

## [Handcalcs.jl - For more readable calculations](https://discourse.julialang.org/t/handcalcs-jl-for-more-readable-calculations/109891)

<div class="topic-metadata">

**Author:** [@co1emi11er](https://discourse.julialang.org/u/co1emi11er)\
**Replies:** 27\
**Last updated:** [July 4, 2024, 4:23pm UTC](https://discourse.julialang.org/t/handcalcs-jl-for-more-readable-calculations/109891 "2024-07-04T16:23:34Z")

</div>

Hello Julia community! I am excited to announce my first registered package Handcalcs.jl! This package is inspired by the handcalcs.py package in python. It is designed to be used in either jupyter or pluto. It will re…

---

## [Latex matrix in Makie](https://discourse.julialang.org/t/latex-matrix-in-makie/115608)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 3\
**Last updated:** [June 14, 2024, 2:05pm UTC](https://discourse.julialang.org/t/latex-matrix-in-makie/115608 "2024-06-14T14:05:14Z")

</div>

Hi, I’m trying to show a matrix in Makie, via text!. Latex in general works well, but when I try to plot the matrix text!(ax, pos; text=L"\\begin{pmatrix} 1 & 2 \\\\ 3 & 4\\end{pmatrix}") I receive an error ERROR: LoadEr…

---

## [\[Makie\] Displaying LaTeX fraction in xticks](https://discourse.julialang.org/t/makie-displaying-latex-fraction-in-xticks/114166)

<div class="topic-metadata">

**Author:** [@Jeonghun\_Lee](https://discourse.julialang.org/u/Jeonghun_Lee)\
**Replies:** 2\
**Last updated:** [May 12, 2024, 2:37pm UTC](https://discourse.julialang.org/t/makie-displaying-latex-fraction-in-xticks/114166 "2024-05-12T14:37:09Z")

</div>

I’m having trouble dealing with xticks. using CairoMakie using LaTeXStrings fig = Figure() ax = Axis(fig\[1,1\], xticks = (-pi:pi/2:pi, \[L"-\\pi", L"-\\pi/2", L"0", L"\\pi/2", L"\\pi"\])) xlims!(ax, -pi, pi) fig This code…

---

## [How to use amsmath/mathtools in Plots.jl?](https://discourse.julialang.org/t/how-to-use-amsmath-mathtools-in-plots-jl/111542)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [March 13, 2024, 9:12am UTC](https://discourse.julialang.org/t/how-to-use-amsmath-mathtools-in-plots-jl/111542 "2024-03-13T09:12:33Z")

</div>

How can I use amsmath or mathtools commands in Plots.jl? Neither GR + LaTeXStrings.jl nor PGFPlotsX.jl recognize commands like \\lVert A \\rVert

---

## [PlutoPlotly: save a plot with LaTeX strings](https://discourse.julialang.org/t/plutoplotly-save-a-plot-with-latex-strings/110163)

<div class="topic-metadata">

**Author:** [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Replies:** 3\
**Last updated:** [February 14, 2024, 1:03pm UTC](https://discourse.julialang.org/t/plutoplotly-save-a-plot-with-latex-strings/110163 "2024-02-14T13:03:29Z")

</div>

Hi, I can produce a plot in Pluto with some LaTeX ingredients using PlutoPlotly and LaTexStrings (which is not possible to achieve to the best of my knowledge using PlotlyJS). The plot is perfectly rendered in the noteb…

---

## [LaTeX strings do not vertically align in Plots](https://discourse.julialang.org/t/latex-strings-do-not-vertically-align-in-plots/109304)

<div class="topic-metadata">

**Author:** [@ysfoo](https://discourse.julialang.org/u/ysfoo)\
**Replies:** 11\
**Last updated:** [January 29, 2024, 7:59am UTC](https://discourse.julialang.org/t/latex-strings-do-not-vertically-align-in-plots/109304 "2024-01-29T07:59:39Z")

</div>

I’ve noticed that strings containing LaTeX do not vertically align when their contents differ: using Plots using LaTeXStrings plot( \[1 2 3\], \[1 2 3\], label=\[L"text $g$" L"text $x$" "text"\], legendcolumn=-1, ) resul…

---

## [MathTeX font does not match pdfLaTeX font](https://discourse.julialang.org/t/mathtex-font-does-not-match-pdflatex-font/107670)

<div class="topic-metadata">

**Author:** [@dchang10](https://discourse.julialang.org/u/dchang10)\
**Replies:** 3\
**Last updated:** [December 17, 2023, 3:13pm UTC](https://discourse.julialang.org/t/mathtex-font-does-not-match-pdflatex-font/107670 "2023-12-17T15:13:47Z")

</div>

I’m using LaTeXstrings in GLMakie to render math. It seems like the mathcal font in LaTeXstrings is different from the typical font used for mathcal pdfLaTeX. Here’s an example of a render with LaTeXStrings: L"$\\mathcal…

---

## [Annotate outside of plot](https://discourse.julialang.org/t/annotate-outside-of-plot/101696)

<div class="topic-metadata">

**Author:** [@James\_Fernandez](https://discourse.julialang.org/u/James_Fernandez)\
**Replies:** 4\
**Last updated:** [July 19, 2023, 10:53pm UTC](https://discourse.julialang.org/t/annotate-outside-of-plot/101696 "2023-07-19T22:53:01Z")

</div>

Hello to all, I would like to make some latex annotations in julia’s Plots with gr backend outside of the plot area. I have this example: using Plots, LaTeXStrings gr() a = 3 x = collect(0:0.01:10) y = sin.(a\*x) pl…

---

## [Latexstring + sprintf](https://discourse.julialang.org/t/latexstring-sprintf/99596)

<div class="topic-metadata">

**Author:** [@volkerkarle](https://discourse.julialang.org/u/volkerkarle)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 8:32am UTC](https://discourse.julialang.org/t/latexstring-sprintf/99596 "2023-05-31T08:32:52Z")

</div>

Hello! For plotting I’m often using something similar to latexstring(@sprintf("a=%.3f \\\\beta, b=%.3f \\\\alpha",π, 1-π)) and I was wondering if somebody is using a better option or has an idea which 1) has something lik…

---

## [PlotlyJS + LaTeXStrings error](https://discourse.julialang.org/t/plotlyjs-latexstrings-error/97054)

<div class="topic-metadata">

**Author:** [@rgouveiamendes](https://discourse.julialang.org/u/rgouveiamendes)\
**Replies:** 9\
**Last updated:** [April 6, 2023, 2:01pm UTC](https://discourse.julialang.org/t/plotlyjs-latexstrings-error/97054 "2023-04-06T14:01:50Z")

</div>

Hi everyone, I am having trouble producing a plot using PlotlyJS and LaTeXStrings. Here it is a simplified version of the code: using DataFrames, PlotlyJS, LaTeXStrings df = DataFrame( country = \[repeat(\["Portuga…

---

## [How to make xylabel LaTeXString with ternary operator?](https://discourse.julialang.org/t/how-to-make-xylabel-latexstring-with-ternary-operator/93626)

<div class="topic-metadata">

**Author:** [@YH\_Ko](https://discourse.julialang.org/u/YH_Ko)\
**Replies:** 2\
**Last updated:** [January 27, 2023, 1:12pm UTC](https://discourse.julialang.org/t/how-to-make-xylabel-latexstring-with-ternary-operator/93626 "2023-01-27T13:12:09Z")

</div>

I’m trying to visualize contour over heatmap example of Makie from following reference. Here, I want to change xlabel and ylabel to LaTexString style. \[original code\] axs = \[Axis(fig\[1, j\], aspect=1, xlabel=“x”, yl…

---

## [L strings not working in Makie](https://discourse.julialang.org/t/l-strings-not-working-in-makie/87366)

<div class="topic-metadata">

**Author:** [@Thomas\_Mikaelsen](https://discourse.julialang.org/u/Thomas_Mikaelsen)\
**Replies:** 6\
**Last updated:** [September 18, 2022, 2:05pm UTC](https://discourse.julialang.org/t/l-strings-not-working-in-makie/87366 "2022-09-18T14:05:59Z")

</div>

Hello. First post on this forum so I apologize if I fall short of the conventions. I can’t get L strings to work with Makie on Jupyter Notebook. I just installed Makie, CairoMakie and MakieTeX. I couldn’t get my own exa…

---

## [Latex docstring for functions](https://discourse.julialang.org/t/latex-docstring-for-functions/87191)

<div class="topic-metadata">

**Author:** [@Rex\_Wang](https://discourse.julialang.org/u/Rex_Wang)\
**Replies:** 4\
**Last updated:** [September 17, 2022, 6:22am UTC](https://discourse.julialang.org/t/latex-docstring-for-functions/87191 "2022-09-17T06:22:07Z")

</div>

I’m trying to use latex strings for function documentation. It works fine following the instruction here: LaTeX Syntax @doc raw""" balabala... \`\`some equations\`\` """ myfun(x) = x However, the tex string become inval…

---

## [How to use textrm with LaTeXStrings and the pyplot backend](https://discourse.julialang.org/t/how-to-use-textrm-with-latexstrings-and-the-pyplot-backend/82303)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [June 6, 2022, 1:44pm UTC](https://discourse.julialang.org/t/how-to-use-textrm-with-latexstrings-and-the-pyplot-backend/82303 "2022-06-06T13:44:04Z")

</div>

Hi all, I am trying to use a combination of math and text symbols with LaTeXStrings and the pyplot backend of Plots.jl. Unfortunately, textrm does not work for some reason. Is there anything special I need to do, or is …

---

## [Latex strings not working with makie](https://discourse.julialang.org/t/latex-strings-not-working-with-makie/82156)

<div class="topic-metadata">

**Author:** [@moataz-sabry](https://discourse.julialang.org/u/moataz-sabry)\
**Replies:** 6\
**Last updated:** [June 3, 2022, 4:16pm UTC](https://discourse.julialang.org/t/latex-strings-not-working-with-makie/82156 "2022-06-03T16:16:52Z")

</div>

I’m trying to plot some graphs using CairoMakie.jl that contains latex strings. But it doesn’t work as intended. it renders the same string but with a $ before and after. Here is an example from Makie documentation. Any …

---

## [Latex Strings in Makie Axis Ticks](https://discourse.julialang.org/t/latex-strings-in-makie-axis-ticks/80729)

<div class="topic-metadata">

**Author:** [@Whyborn](https://discourse.julialang.org/u/Whyborn)\
**Replies:** 2\
**Last updated:** [May 9, 2022, 3:20pm UTC](https://discourse.julialang.org/t/latex-strings-in-makie-axis-ticks/80729 "2022-05-09T15:20:55Z")

</div>

Hi, I have been having some issues with generating my desired tick labels in Makie. I would like to use LaTeX style formatting (for example \\rho\_{B}). Unfortunately, Makie does not seem to accept LatexStrings for the ax…

---

## [LaTeX z-label in 3D Makie plot](https://discourse.julialang.org/t/latex-z-label-in-3d-makie-plot/80369)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 4\
**Last updated:** [May 2, 2022, 4:26pm UTC](https://discourse.julialang.org/t/latex-z-label-in-3d-makie-plot/80369 "2022-05-02T16:26:57Z")

</div>

I want to make a 3D surface plot in Makie, and I need the z-axis label to be formatted with \\LaTeX. Whenever I add such a label, all the content in the plot disappears. For example, the following plot works without addin…

---

## [Specific fractions w/ LaTeXStrings](https://discourse.julialang.org/t/specific-fractions-w-latexstrings/77355)

<div class="topic-metadata">

**Author:** [@met-j](https://discourse.julialang.org/u/met-j)\
**Replies:** 6\
**Last updated:** [March 3, 2022, 8:32pm UTC](https://discourse.julialang.org/t/specific-fractions-w-latexstrings/77355 "2022-03-03T20:32:57Z")

</div>

I am not fully satisfied with the text I can produce with LaTeXStrings. Some (/many) commands only produce a question mark. Which LaTeX commands are available? Is it possible to load LaTeX packages? LaTeX has support…

---

## [Fraction bar is not visible in Makie plot with text! and annotations! methods](https://discourse.julialang.org/t/fraction-bar-is-not-visible-in-makie-plot-with-text-and-annotations-methods/75938)

<div class="topic-metadata">

**Author:** [@fnoessler](https://discourse.julialang.org/u/fnoessler)\
**Replies:** 0\
**Last updated:** [February 7, 2022, 9:16am UTC](https://discourse.julialang.org/t/fraction-bar-is-not-visible-in-makie-plot-with-text-and-annotations-methods/75938 "2022-02-07T09:16:49Z")

</div>

Hello, I tried to insert an equation with the text! and annotations! methods in Makie. Unfortunately, the fraction bar is not visible for me. However, the fraction bar is visible in the Axis title, xlabel, ylabel and th…

---

## [Plots: string interpolation in labels?](https://discourse.julialang.org/t/plots-string-interpolation-in-labels/10799)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [January 18, 2022, 3:22pm UTC](https://discourse.julialang.org/t/plots-string-interpolation-in-labels/10799 "2022-01-18T15:22:35Z")

</div>

I’m solving a differential equation several times where I vary a parameter, say Kp = linspace(1,5,5). The result is a vector of vectors (time series), say vec is a vector (1D array) of vectors (time series). I then want…
