TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.42k stars 742 forks source link

Feature request: math formatting #486

Open Gattocrucco opened 7 months ago

Gattocrucco commented 7 months ago

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.

mountaineerbr commented 7 months ago

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!

ldelossa commented 4 months ago

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