Closed whatl3y closed 3 years ago
Why are \cdot
and \times
implemented like the \frac
macro? They're infix operators. The simplest way to implement them would be to replace their tokens with a TIMES
token in the lexer.
What's the use case here?
Apologies, I read through the code to get a better understanding and made an incorrect assumption I should use the localFunctions pattern to add support for these instead of the lexer (since they're infix ops as you mention). I made the changes you mention, updated my tests and all are passing.
The use case is to support MathQuill syntax, which here is an example on their doc website.
Any chance you merge this?
Any chance you merge this?
Merged and published version 2.2.0
Fixes the
times
problem mentioned in #1, but could probably as you mention add a thorough test suite for LaTeX commands in the future. For my use case I at least need support forcdot
andtimes
. All other iterations I've tried for my needs work otherwise though.