App: .tex files show no syntax highlighting in the file viewer, although the CLI already ships a LaTeX grammar

Open 💬 0 comments Opened Aug 25, 2026 by tofunori

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.

View original on GitHub ↗