What variant of Codex are you using?
CLI
What feature would you like to see?
Proposal: render LaTeX in the Codex TUI
Background
LaTeX rendering has been requested previously. I recently shared a prototype on twitter, which was positively received, and @fcoury invited me to contribute it.
I cannot open a PR as it is restricted to collaborators, however my implementation can be found here:
https://github.com/haskallcurry/codex/tree/feat/kitty-latex-ratex
Implementation
The implementation:
- recognizes explicitly delimited display and inline math while excluding Markdown code;
- renders it in-process using RaTeX, a Rust implementation of KaTeX-style mathematical layout;
- displays the resulting images using the Kitty graphics protocol, similar to the existing
/pets feature;
- does not require an external TeX installation or renderer process.
Using KaTeX directly would require an HTML/CSS layout and rasterization engine.
Known limitations
- Inline images must fit terminal-cell geometry, and their baseline alignment varies somewhat between terminal implementations. Inline math is therefore rendered in Unicode whenever possible.
- Native terminal selection copies the Kitty Unicode-placeholder cells rather than the original LaTeX source.
Additional information
No response
What variant of Codex are you using?
CLI
What feature would you like to see?
Proposal: render LaTeX in the Codex TUI
Background
LaTeX rendering has been requested previously. I recently shared a prototype on twitter, which was positively received, and @fcoury invited me to contribute it.
I cannot open a PR as it is restricted to collaborators, however my implementation can be found here:
https://github.com/haskallcurry/codex/tree/feat/kitty-latex-ratex
Implementation
The implementation:
/petsfeature;Using KaTeX directly would require an HTML/CSS layout and rasterization engine.
Known limitations
Additional information
No response