Closed edborden closed 8 years ago
@gjtorikian Any thoughts on this? I'm just curious how big of a hurdle this is..
I just got back from a vacation, I'll try to look at it soon. I would like this lib to support as much legit maths as possible.
I'm having the same issue using the command line tool. Here is an example:
printf "a < 5" | ./mtex2MML --inline
<math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><semantics><mrow><mi>a</mi><merror><mtext>Unknown character</mtext></merror><mn>5</mn></mrow><annotation encoding='application/x-tex'>a < 5</annotation></semantics></math>
Note the “Unknown character” in the output. Am I doing something wrong?
This is on OS X El Capitan in case it makes a difference.
Thanks for creating this tool!
Thanks for the quick update! My example above now works, but if I remove the whitespace then it still fails:
printf "a<5" | ./mtex2MML --inline
Yes, I'm afraid that's intentional for now.
Part of mtex2MML's goal is to leave tags alone as it processes text. There's a test to check for this:
Inline: $\sin(x)$
Block: $$\sin(x)$$
Markup: $$<em>\sin(x)</em>$$
Unfortunately I had to force the lexer to expect whitespace on either side of >
/ <
to allow HTML markup to passthrough unignored. It's not ideal but I felt it better to support these characters first than to not allow them at all.
I see. Would it be futile to create a feature request for making this behavior optional?
Not futile at all!
\textgreater
,\textless
aren't on the supported list, and don't work\>
produces just a blank space for me, although it is on the support list<
,>
,\<
all produce "Unknown character", and are not on the listThere seem to be many more obscure symbols involving inequalities on the list that do work, but none of them are just the vanilla < >... Am I missing something?