shell_gpt icon indicating copy to clipboard operation
shell_gpt copied to clipboard

Feature request: math formatting

Open Gattocrucco opened this issue 2 years ago • 2 comments

GPT4 is trained to output latex formulae enclosed as \(...\) if inline, or \[...\] if displayed. Currently, sgpt removes the backslashes as markdown processing, and prints the latex code as is.

It would be nice if there was an option to format the math instead. sgpt is written in Python, so I guess a way could be to use the unicode terminal formatting engine of sympy.

Gattocrucco avatar Feb 19 '24 22:02 Gattocrucco

We use bat to render markdown in our shell warper. It can also be configured for bat to use the "latex" language renderer. You may want to try it: chatgpt.sh -cc --markdown='bat --paging never --style plain --language tex'. Cheers!

mountaineerbr avatar Feb 20 '24 17:02 mountaineerbr

Big +1 to this, having something like 'latex2unicode' ran for Latex blocks would be super helpful.

ldelossa avatar Jun 04 '24 15:06 ldelossa