asciidoctor / asciimath

Asciimath parser
MIT License
24 stars 16 forks source link

Fix behaviour of ubrace, obrace with superscript, subscript #68

Closed opoudjis closed 2 years ago

opoudjis commented 2 years ago

Issue raised in https://github.com/metanorma/metanorma/issues/235:

In Asciimath, ubrace followed by a subscript, and obrace followed by a superscript, is meant to render the subscript/superscript text under and over the expression, like with say lim. So:

ubrace(((0.5, 0, 0.5),(0, 0.5, 0.5),(0, 0, 1)))_("Adjustment to texture space")

should render as

Στιγμιότυπο 2022-01-18, 22 57 20

as you can verify at http://asciimath.org

The current behaviour of the gem, which looks like the following, is incorrect:

I've kludged some behaviour in markup.rb to enable that, adding :underover => true to :underbrace and :overbrace, and doing an ad hoc if branch to process it. I defer to you about how to do it properly.