-
Notifications
You must be signed in to change notification settings - Fork 9
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
mel needs beautify #16
Comments
Thanks. Admittedly this has been a longstanding pain issue and I do not have an answer. Boldness and tightness: sorry, this is rooted in Typst's layout strategy and could not be solved cleanly at the package level. Especially, I think the boldness is caused by some issue deep inside the compiler's Height of vertical bar: the package uses a hack to calculate the height, and it is not reliable as you saw from the example. Maybe I could use quadratic interpolation to calculate an adjustment factor based on the element height [1], but that's unreliable, too. There's an issue created at Typst (typst/typst#240), and I very much look forward to a native solution to get rid of the hack. I urge you to raise the Typst contributor's awareness so they could prioritize :) [1] In the meantime, I'll find some time and do it in this package. |
…ution for braket etc. Not satisfactory, until Typst resolves typst/typst#240 This interim solution can handle $ mel(u,M,v) mel(u,vec(U,V),v), mel(vec(U,V),M,v) $ but not something like $ mel(u,vec(U,V,W),v) mel(vec(U,V,W),M,v) $ Motivated by #16
Update: I have a draft to make the Typst compiler handle this natively: https://github.com/Leedehai/typst/pull/1/files |
Upgraded After typst/packages#277 is merged as well, |
This code snippet
$ mel(phi_n^0, sqrt((2 hbar) / (m omega))(a^dagger + a), phi_n^0) $
gives
in which the vertical bar is too bold and slightly higher than my braket. Besides, the space between alphabet and bar is too tight.
The text was updated successfully, but these errors were encountered: