Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the \( \[ formula syntax. #9

Closed
4 tasks done
xl0 opened this issue Sep 15, 2024 · 2 comments
Closed
4 tasks done

Support the \( \[ formula syntax. #9

xl0 opened this issue Sep 15, 2024 · 2 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@xl0
Copy link

xl0 commented Sep 15, 2024

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: remarkjs/remark-math#39

Solution

  • Parse the \( \[ syntax as expected.
  • Add an Option to enable it.

Alternatives

Do nothing

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 15, 2024
@wooorm
Copy link
Member

wooorm commented Sep 16, 2024

Same answer as remarkjs/remark-math#39 (comment).

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. remarkjs/remark-math#39 (comment).
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?

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Sep 16, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants