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

Unary Minus looks too wide, math superscript too high #61

Open
jonas-schulze opened this issue May 2, 2022 · 2 comments
Open

Unary Minus looks too wide, math superscript too high #61

jonas-schulze opened this issue May 2, 2022 · 2 comments
Labels
layout The positioning of glyphs needs improvement parser The parser needs to be fixed

Comments

@jonas-schulze
Copy link

jonas-schulze commented May 2, 2022

I don't know whether this is the right place to report this.
When manually typesetting the exponents in Makie (to circumvent MakieOrg/Makie.jl#1296),
the spacing between the minus sign and the number inside the exponent looks too wide. It looks more like the spacing for a binary minus, see the tex code for comparison.

Furthermore, the baseline of the exponent looks too high compared to tex.

\documentclass{standalone}

\begin{document}

\begin{tabular}{rlr}
  unary: & $10^{-16}$,& $-16$ \\
  binary: & $10^{{}-16}$,& ${}-16$
\end{tabular}

\end{document}

main.pdf

using CairoMakie
using CairoMakie.Makie: LaTeXString

fig = Figure(font="cmu")
ax = Axis(
  fig[1,1];
  ytickformat = ts -> [LaTeXString("\$ $(round(t/1e-16, digits=3)) \\times 10^{-16} \$") for t in ts],
)
lines!(ax, 1:10, rand(10) .* 1e-16)

save("fig.pdf", fig)

fig.pdf

Edit: I have no idea why the images are not rendered.

@Kolaru Kolaru added parser The parser needs to be fixed layout The positioning of glyphs needs improvement labels Aug 2, 2022
@RaulDurand
Copy link

Any update on this? I got the same problem rendering negative numbers. Is there a workaround?

@Kolaru
Copy link
Owner

Kolaru commented Oct 22, 2023

This is a bit tricky, because currently - is always parsed the same. I would need to add a specific case for that in the parser (i.e. - when preceded by a character that is not a delimiter), and I don't quite have the time for a deep dive in the parser right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
layout The positioning of glyphs needs improvement parser The parser needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants