roniemartinez / latex2mathml

Pure Python library for LaTeX to MathML conversion
MIT License
183 stars 25 forks source link

Proposal: hide unknown \commands #256

Open StevenClontz opened 2 years ago

StevenClontz commented 2 years ago

(please close with my apologies if this has been addressed since version 3.61.0)

The cause of https://github.com/TeamBasedInquiryLearning/checkit-tbil-la/issues/46 is that it uses software that relies on this package, and https://github.com/roniemartinez/latex2mathml/blob/master/latex2mathml/commands.py#L23 seems to indicate that \middle is unsupported as of the current version 3.64.0.

I don't know how difficult supporting \middle is, but would it make sense to hide unknown commands rather than output them as text? In the case of decorative commands like this, things might look "good enough", but maybe this is worse for a command intended to output something on its own.

roniemartinez commented 2 years ago

@StevenClontz \middle is now added in https://github.com/roniemartinez/latex2mathml/releases/tag/3.65.0

As for hiding unknown commands, I personally think this is not a good idea as this is an easy way to hide bugs.

I can add an ENV flag for muting, for example. What do you think?

StevenClontz commented 2 years ago

That makes sense to me.