Closed opoudjis closed 2 years ago
@opoudjis do you happen to know how you would write this in latex? At the moment the same incorrect output is produced there so I would like to update that renderer as well.
It could be written in Latex like this:
\underbrace{
\pmatrix{
0.5 & 0 & 0.5 \cr
0 & 0.5 & 0.5 \cr
0 & 0 & 1
}
}_{\text{Adjustment to texture space}}
... Update?
I don't have any mental space to work on this project at the moment I'm afraid. This is 100% volunteer work and I'm the only developer at the moment.
Well, I did the PR that addressed the MathML component; would you be ok if I added to the PR the LaTeX component?
If you have the time, yes that would be much appreciated. I haven't merged the PR yet because I would prefer to maintain feature parity across the backends.
Target is:
\underbrace {
\begin{pmatrix}
0 & 1\\
1 & 0
\end{pmatrix} }_{\text{Hello}}
Latex generated is:
{\underbrace{\left ( \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right )}}_{\text{Adjustment to texture space}}
It needs to generate:
\underbrace{\left ( \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right )}_{\text{Adjustment to texture space}}
@pepijnve I've added the needed LaTeX update. I've ended up hardcoding underbrace and overbrace processing, because you have a less rich symbol table by default for LaTeX processing than for MathML processing.
... Update? The PR should be good to go.
I finally got round to integrating your fix. Sorry for the delay.
No problem, thank you!
Issue raised in https://github.com/metanorma/metanorma/issues/235:
In Asciimath,
ubrace
followed by a subscript, andobrace
followed by a superscript, is meant to render the subscript/superscript text under and over the expression, like with saylim
. So:ubrace(((0.5, 0, 0.5),(0, 0.5, 0.5),(0, 0, 1)))_("Adjustment to texture space")
should render as
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 PR #68 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.