micromark / micromark-extension-math

micromark extension to support math (`$C_L$`)
https://unifiedjs.com
MIT License
12 stars 6 forks source link

Support the \( \[ formula syntax. #9

Closed xl0 closed 5 days ago

xl0 commented 6 days ago

Initial checklist

Problem

New OpenAI models such as gpt-4o and o1 will output formulas for rendering with the \( \[ syntax by default:

User: What is the formula for the volume of a sphere? Assistant:

The formula for the volume of a sphere is given by:

\[ V = \frac{4}{3} \pi r^3 \]

where \( V \) is the volume and \( r \) is the radius of the sphere.

It would be great to be able to parse this variant with micromark without having to resort to .replace().

Related: https://github.com/remarkjs/remark-math/issues/39

Solution

Alternatives

Do nothing

wooorm commented 5 days ago

Same answer as https://github.com/remarkjs/remark-math/issues/39#issuecomment-612572069.

The main alternative to adding every flavor that every tool comes up with in one package, is to have different packages for different things. We’ve mentioned this several times, see e.g. https://github.com/remarkjs/remark-math/issues/39#issuecomment-612572749. I don’t have to do all the work. People can do things too?

You can also ask llms to do things, such as follow a particular style, in their output?

github-actions[bot] commented 5 days ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.