Publications

Framing Writing as Code Generation: An Agentic LaTeX IDE for Scientific Manuscript Composition

Abstract

While manuscript preparation has traditionally been viewed as distinct from code development, both scholarly writing and software engineering involve translating ideas with relatively prespecified structures and norms into formal specifications. In this paper, we argue that narrative scholarly writing—particularly scientific manuscript generation—should be reframed as a form of code generation. By arguing that LATEX is fundamentally a programming language rather than merely a document formatting tool, we demonstrate how AI-assisted generation can produce high-quality manuscripts, figures, references, and methodological descriptions from specifications. We present the design and capabilities of the GRAIL platform, a specialized agentic LATEX editor that enables this code generation paradigm. Preliminary evaluation on a deployed system demonstrates significant adoption, processing 13,910 requests from 332 unique users, with 119 users (35.8% of the user base) making more than 10 requests and accumulated engagement of 921.5 hours across 2,603 sessions. This work positions manuscript preparation as the final critical stage in the autonomous science pipeline, where research outputs are automatically documented and disseminated. We show how this perspective opens new possibilities for integration with code analysis, figure generation, and reference management systems.

Date
2026
Authors
Zhisheng Tang, Mayank Kejriwal