arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.26k stars 260 forks source link

[Feature Request] Add an option to tell MathLive to parse the content as LaTeX and not as Math when defaultMode is set to text. #2420

Open DegrangeM opened 6 days ago

DegrangeM commented 6 days ago

Hi.

Currently, we can set the defaultMode to text, however if we want to provide a default value inside the HTML tag, we can't do:

    <math-field default-mode="text">La fonction $f$ est croissante</math-field>

We need to do:

    <math-field default-mode="text">\text{La fonction } f \text{ est croissante}</math-field>

Which is a little annoying. It would be nice to be able to write in "LaTex" and not in mathmode when the defaultmode is set to Text.

Thanks.