App: .tex files show no syntax highlighting in the file viewer, although the CLI already ships a LaTeX grammar
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
App (macOS desktop, ChatGPT.app 26.818.61809, Darwin 25.5.0 arm64)
What feature would you like to see?
Opening a .tex file in the App's file viewer renders the whole buffer as
unstyled monochrome text. Commands (\textit, \section), math delimiters,
braces, comments (%) and environments all get the same color as body prose,
so nothing separates markup from content. Python, Rust and the other common
languages highlight correctly in the same viewer, so this reads as a missing
grammar rather than a viewer-wide limitation.
Requested behavior: highlight .tex (and ideally .sty, .cls, .bib) in the
App's file viewer the way other languages already are.
Worth noting: the CLI does not have this gap. codex-rs/tui/src/render/highlight.rs
initializes its syntax set from two_face::syntax::extra_newlines, and two-face's
extended set lists LaTeX, LaTeX Log and BibTeX among its ~250 grammars. So a
LaTeX grammar already exists inside the Codex tree; the App viewer just does not
reach it. That makes this a specific instance of #32616 (language parity for code
rendering between the App and the CLI), scoped to a single format.
Additional information
Use case: a graduate thesis written in LaTeX. Nearly every source file in the
repository is .tex, so the App's file viewer is effectively unhighlighted for
the entire project, while the same repository's .py analysis scripts render
fine. Reviewing a Codex-proposed edit to a paragraph means reading a wall of
uniform text and hunting for the backslashes by eye.
LaTeX is not a niche case for academic and scientific users: it is the default
authoring format across mathematics, physics, computer science and most of the
earth sciences, and those users are exactly the ones handing Codex long-form
documents to edit.
Related but distinct: the open LaTeX issues (#36233, #39171, #30447, #18906,
#23654) all concern rendering LaTeX math inside markdown output. This request
is about coloring .tex source, which is a different code path.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with codex-rs/tui/src/render/highlight.rs to see how the CLI loads two-face grammars, then trace the App file viewer's syntax-highlighting setup. Confirm how grammar selection is based on file extensions and add the App mapping for LaTeX-related files. Done means .tex files visibly distinguish LaTeX markup, math delimiters, comments and environments in the viewer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, rust
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100