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

texmath converts $\ddot{q}$ to $q^(̈)$ from LaTeX to Typst #231

Closed
Kreijstal opened this issue Nov 20, 2023 · 3 comments
Closed

texmath converts $\ddot{q}$ to $q^(̈)$ from LaTeX to Typst #231

Kreijstal opened this issue Nov 20, 2023 · 3 comments

Comments

@Kreijstal
Copy link

Your notation doesn't render that well, it renders the parenthesis with the double dots.
However the correct move in this should be $dot.double(q)$
\dddot is also dot.triple
and \ddddot is dot.quad

@jgm
Copy link
Owner

jgm commented Nov 20, 2023

\ddot{q} parses as

[ EOver False (EIdentifier "q") (ESymbol Accent "\776") ]

The problem is that dot.double is \168 (scraped from the typst documentation on symbols).

776 = Combining Diaeresis
168 = Diaeresis

You'll note we don't have trouble with \dddot, just \ddot, and this is why.

In typst-symbols, dot.triple is

8411 - combining three dots above

In my opinion, it would make sense for dot.double and dot.triple both to be mapped to characters with similar unicode properties -- hence 776.

cc @laurmaedje

In the mean time, though, we can probably just add some code to treat 776 as 168 for purpose of typst symbol lookup.

@jgm jgm closed this as completed in 305231a Nov 20, 2023
@jgm
Copy link
Owner

jgm commented Nov 20, 2023

I've fixed this with the workaround. @laurmaedje I'm really not sure about the character mapping issue -- you probably know more than I do about this -- but I thought I'd raise the issue.

@laurmaedje
Copy link

If I recall correctly, we did it this way because we generally wanted the non-combining character as the default for the symbol (e.g. tilde is a normal tilde, not a combining one and diaresis/dot.double is the same), but the triple dot only exists in combining form. I'm not 100% sure though.

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

3 participants