AI assistant can't print Formula using LaTex.

Use MathJax Delimiters

Use MathJax delimiters like $ for inline equations and $$ for display equations. For example:

  • Inline equation: $\frac{24}{18 - x}$
  • Display equation: 2418−x18−x24​

This will ensure the equations are properly formatted and rendered by MathJax.

Provide Specific Prompts

Include clear instructions in your prompt about using MathJax delimiters for equations. For example:"Please use LaTeX formatting for all mathematical equations. Enclose inline equations with single dollar signs ($) and display equations with double dollar signs ().Forexample,theequation).Forexample,theequation\frac{24}{18 - x}$$ should be written as $\frac{24}{18 - x}$."Providing these specific instructions can help GPT-4 understand your formatting preferences.

Postprocess the Output

If GPT-4 still outputs equations in raw LaTeX format, you can postprocess the response to convert the delimiters. For example, in Python:

0
1 comment
Official comment
Dear customer,
Please be aware that the AppCode community forum was deprecated and closed for comments on March 31, 2020.
To see further details please follow this link: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360007631480-The-AppCode-Community-Forum-Is-Deprecated
Thank you for your understanding.
JetBrains

Please sign in to leave a comment.