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

AsciiMath: Text below underbraces (ubrace) get shifted #235

Closed
manuelfuenmayor opened this issue Jan 16, 2022 · 8 comments
Closed

AsciiMath: Text below underbraces (ubrace) get shifted #235

manuelfuenmayor opened this issue Jan 16, 2022 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@manuelfuenmayor
Copy link

manuelfuenmayor commented Jan 16, 2022

Text below underbraces gets shifted to right.

Example:

M = ubrace(((0.5, 0, 0.5),(0, 0.5, 0.5),(0, 0, 1)))_("Adjustment to texture space") cdot ubrace(((2f//w, 0, 0, 0),(0, 2f//h, 0, 0),(0, 0, 1, 0)))_("Perspective projection") cdot ubrace(((r_x, r_y, r_z,0),(u_x, u_y, u_z, 0),(d_x, d_y, d_z, 0),(0, 0, 0, 1)))_("Camera orientation") cdot ubrace(((1, 0, 0, -P_x),(0, 1, 0, -P_y),(0, 0, 1, -P_z),(0, 0, 0, 1)))_("Camera location")

Generated with Metanorma:
issue2_generated

Original AsciiMath:
issue2_original

@manuelfuenmayor manuelfuenmayor added the bug Something isn't working label Jan 16, 2022
@manuelfuenmayor manuelfuenmayor changed the title Unexpected AsciiMath rendering in underbraces (ubrace) AsciiMath: Text below underbraces (ubrace) get shifted Jan 16, 2022
@manuelfuenmayor
Copy link
Author

DOC output:
issue2_generated_doc

@ronaldtse
Copy link
Contributor

I can confirm that AsciiMath.JS has the same behavior. However I don't know if the asciimath gem does this or not.
Screenshot 2022-01-17 at 1 12 19 AM

@opoudjis
Copy link
Contributor

ubrace(X, Y) is being rendered by the AsciiMath gem as <msub>X Y</msub>, instead of <munder>X Y</munder>.

That appears to be an oversight in AsciiMath gem: superscript and subscript with obrace and ubrace in AsciiMath are underscript nor subscript and overscript not subscript; just as with lim_blah.

@opoudjis
Copy link
Contributor

Doing PR to asciimath gem

@opoudjis
Copy link
Contributor

I have posted our kludge solution to riboseinc/asciimath, but hopefully the PR will be integrated into asciimath proper.

@opoudjis
Copy link
Contributor

opoudjis commented Mar 7, 2022

I will also implement the LaTeX version of this, Pepijn is too busy.

@opoudjis
Copy link
Contributor

Implemented, waiting now on Pepijn.

@opoudjis
Copy link
Contributor

Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants