Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to underline a text in julia using Latex String? #71

Closed
sivabkumar opened this issue May 21, 2024 · 1 comment
Closed

How to underline a text in julia using Latex String? #71

sivabkumar opened this issue May 21, 2024 · 1 comment

Comments

@sivabkumar
Copy link

using Plots

using LaTeXStrings
x = [1,2,3,4,5]
y = x .^2
plot(x,y,label = L"\underline{x}")

This code will give an error

but instead of \underline if I am using \overline work.

That is

plot(x,y,label = L"\overline{x}")

But I need \underline.

Please solve my problem.

Thanks in advance

@stevengj
Copy link
Member

There is nothing that LaTeXStrings can do about this — it doesn't do any rendering, it just sends the \underline{x} to the plot backend. So your are limited by whatever math formatting is supported by the math display of your plot backend.

If you are using the PyPlot/Matplotlib backend, see this stackoverflow question and matplotlib/matplotlib#14235

If you are using Makie, then it uses https://github.com/Kolaru/MathTeXEngine.jl to render latex equations, see Kolaru/MathTeXEngine.jl#121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants