Closed jamiemlaw closed 7 months ago
Found a workaround:
parser.parse('([{:[a],[b]:}])');
which produces
'\left ( \left [ \left . \begin{matrix} a \\ b \end{matrix} \right . \right ] \right )'
I've had this issue in my inbox for exactly a year, and today I came up with a solution! The root of the problem was that my parser works in a completely different order to the original AsciiMathML, so I couldn't just copy their logic for spotting matrices. I realised that you want to identify a matrix as deep into nested brackets as possible, so I added a part to the grammar to look for a matrix wrapped in extra brackets before just looking for a matrix, allowing it to consume the outer brackets first.
Thank you so much for taking the time to have a look at this; hope it wasn't too taxing. I've tested it out and it look to be working well. Keep up the awesome work. :-)
I'm using asciimath2tex@1.4.0. There seems to be something funky going on if I wrap a matrix in parentheses. I noticed this when trying to mark up a matrix determinant with the following input:
Expected output:
Actual output:
It seems that the minimal test case that fails is
Expected output:
Actual output: