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

Unnecessary @u_str characters #19

Open
syroezhkin opened this issue Jan 25, 2025 · 1 comment
Open

Unnecessary @u_str characters #19

syroezhkin opened this issue Jan 25, 2025 · 1 comment

Comments

@syroezhkin
Copy link

The issue

If you use regular numbers in combination with Unitful inside an expression, then unnecessary @u_str characters appear in Pluto:

Image

How to reproduce

using Unitful, Latexify, UnitfulLatexify;

begin
    a = 2u"m"
    @latexdefine c = sqrt(a^2 + 5u"m"^2)
end
@gustaphe
Copy link
Owner

You need to evaluate 5u"m" before latexifying:
@latexify sqrt(a^2 + $(5u"m")^2).

I agree this is a bit inconvenient, but it's a result of how macros work.

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