Agents In Use
What’s new todayLast update
160 use cases added today

How to use Codex to build a visual TikZ editor

An author built a web and desktop TikZ editor almost entirely with Codex. It synchronizes visual and source editing, preserves surrounding source formatting and includes format converters.

Source published news.ycombinator.comAgent: Codex
OUR ADAPTATION

Suggested prompt

Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.

Build a visual editor for [TikZ subset] that displays source and rendered output together. Track exact source locations so dragging changes only relevant coordinate values. Preserve surrounding formatting, support [required conversions], and implement [text layout and color notation requirements].

Evidence at a glance

Sourced account
Source poster / publisher
DominikPeters
Original account
Read the source ↗
Published
Source link checked
Reported result
The reported application supports synchronized source and visual TikZ editing on web and desktop, with targeted coordinate changes and additional conversion and layout features.
Human involvement
The post does not describe review or testing steps; the author presents the resulting open-source application and its behavior.

A linked account supports attribution. It does not mean we independently reproduced its result.

Report an issue with this caseOpen correction email

Opens your email app with the case link included. Nothing is sent automatically.

How the agent did it

  1. Built a TikZ parser that tracks exact source locations for objects.
  2. Connected visual dragging and resizing to targeted coordinate edits.
  3. Implemented converters from SVG, pptx and ipe into TikZ.

The author built an open-source TikZ editor, available for web and desktop, almost entirely with Codex. The application displays TikZ source beside its rendered figure and lets users edit either view while keeping both synchronized. Users can drag and resize elements instead of repeatedly adjusting coordinates by hand and recompiling.

The implementation parses TikZ code while retaining the exact source location of each object. When an element moves, the editor changes the coordinate numbers without rewriting unrelated formatting such as indentation or line breaks. The author described this as requiring a reimplementation of a large fraction of TikZ, rather than merely adding a visual surface to existing source.

The work also included converters from SVG, pptx and ipe into TikZ. Additional implementation covered LaTeX hyphenation and line breaking for multiline nodes, plus a color picker supporting LaTeX mixing notation such as red!20!black. The post describes the resulting application but does not provide the development prompts or review procedure.

Who it's for: Developers exploring coding-agent help with extensive format support and synchronized visual editing.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Hacker News · DominikPeters

Frequently asked questions

How does dragging preserve the surrounding TikZ source?

The editor tracks each object's exact source location and changes the coordinate numbers, leaving unrelated line breaks and indentation intact.

What additional features did the implementation include?

The author reported SVG, pptx and ipe converters, LaTeX hyphenation and line breaking for multiline nodes, and a color picker using LaTeX color-mixing notation.

More details

Remaining steps

  1. Implemented LaTeX text layout and a color-mixing picker.
  2. Made the open-source editor available for web and desktop.

About this account

The author attributes almost the entire application build to Codex, without describing individual prompting or execution sessions.

Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=48645437. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: DominikPeters on Hacker News

Source published

Added to Agents In Use

Source checked

Tools and topics

Codex · TikZ · LaTeX

TikZ · LaTeX · Visual editing · Open source

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.