korsbo / Latexify.jl

Convert julia objects to LaTeX equations, arrays or other environments.
MIT License
562 stars 59 forks source link

scientific notation #231

Open qwertyjl opened 2 years ago

qwertyjl commented 2 years ago

In my opinion latexify(3e-14) should display $3.0 \cdot 10^{-14}$, not $3.0e-14$

gustaphe commented 2 years ago

Agreed.

There is fmt=FancyFormatter(), but I also think this should be the default.

baggepinnen commented 1 year ago

One more +1 here, this is actually not only a formatting issue, but a correctness issue since the rendered latex in this case

julia> latexify("1e-7 - e")
L"$1.0e-7 - e$"

equal to -7, according to the latex rendered below $1.0e-7 - e$

korsbo commented 1 year ago

Ok, agreed. This should be the default.