FR version is available. Content is displayed in original English for accuracy.
I built an open-source WYSIWYG TikZ editor (available for web and desktop) that allows you to edit your TikZ source code visually by dragging and resizing elements. It simultaneously shows the source code and the rendered figure, and lets you edit either one while the two views stay in sync. I’m not aware of any other editors that are simultaneously source editors and WYSIWYG (even for editing SVG or HTML), and I’m quite pleased with how well the combination works.
The way the app is implemented is by parsing the TikZ code, and at all times keeping track of the exact source location of each object. Thereby, when a user drags an element to a new position, the app can override just the numbers in the coordinate without changing anything else in the code (such as line breaks or indentation).
This approach essentially required reimplementing a large fraction of TikZ, which is the kind of task that no human would ever want to do. I think building software that doesn’t exist yet because it would be impossibly tedious to code up is one of the great new possibilities thanks to coding agents, and it’s worth brainstorming for other examples. (This app was built almost entirely by Codex.)
Implementing the app came with lots of fun side quests, including building converters from SVG / pptx / ipe to TikZ, re-implementing the LaTeX hyphenation and line-breaking algorithm to support multi-line nodes, and making a color picker that uses the red!20!black color mixing notation used in LaTeX papers.

Discussion (50 Comments)Read Original on HackerNews
However, the generated TikZ code is not good in my opinion. Everything uses absolute coordinates, which in TikZ is seldom needed.
Just to start, if I place a single node I get absolute coordinates for it. Why? If you just write `\node {Hello};`, TikZ will put that at the center of the bounding box. No need to tell it's at `(0.5,2.91)` like it's happening in my test. Then features such as "align bottom" for a selection of multiple nodes should are manipulating the absolute coordinates instead of using TikZ's alignment features (anchors etc.).
I understand generating such code is more difficult. Maybe it can be something to point at for the next version, who knows...
Elsewhere in this discussion, we talked about positioning like "right of", and some good suggestions were made (https://news.ycombinator.com/item?id=48647683).
I know people like it, but I hate writing TikZ manually, to the point that I've mostly moved most of my technical-ish drawings to draw.io/diagrams.net, and then just export to a PNG. I feel like it's inelegant, but it works well enough and it's easy to make something that looks ok. Generally I'm all for text-defined stuff.
I have moved some of my stuff to Mermaid when I know my stuff is going to live in Markdown but I've not tried to get that working in TeX.
That said, I would like to use TikZ just because it's kind of the idiomatic way of doing diagrams in LaTeX, so a WYSIWYG might be useful.
One suggestion, I would like the arrows to be able to "attach" to the boxes, as in the arrow endpoints can move when you move the boxes. That's how draw.io does it.
https://ctan.org/pkg/circuitikz?lang=en
https://github.com/circuitikz/circuitikz
Some years ago I wired it up with `asciidoctor-diagram` so we could have simple circuits in our Asciidoc maintenance manuals. The techs loved the hell out of it, and we could collaborate on the things in a git versioned ecosystem vs whatever fresh hell the PDM/ERP had for us.
A very nice complement to the already awesome WireViz (https://github.com/wireviz/WireViz)
https://www.lyx.org/
How hard would it be to support cetz? I'm not touching LaTeX if I can avoid it, but I'm using Typst all the time.
There is a full wysiwyg (vibe-coded) presentation software based on typst available which partially implements exactly that:
https://codeberg.org/presenst/presenst
But, I've taken my papers to Typst. Could you have the agent do the same thing for Cetz, the TikZ equivalent for Typst?
I'm looking to write a paper on a recent project, but most of the places I've seen to submit has asked for TeX. I greatly prefer Typst because of the ridiculously fast compilation times but I haven't used it for anything outside of school assignments do to that restriction.
[1]: https://ctan.org/pkg/pgfplots?lang=en
I was quite proud of the hours of work I had put in to configure it just so, with the 3d look and all.
What I loved about Xfig was that one could use latex and latex fonts in the diagrams.
The world thanks you.
I'm not an AI evangelist, but this kind of thing is such a welcome boon. More itches can be scratched!
> TikZ’s name is intended to warn people that TikZ is not a program that you can use to draw graphics with your mouse or tablet. Rather, it is more like a “graphics language”.
While making the app I was worried that I was going against the TikZ philosophy. Maybe I should have named it "TikZ ist doch ein Zeichenprogramm" (TideZ)..
At some point the people who seethe with hate for AI, and claim it's all hallucinations and illegitimate hype, are going to have to admit they were wrong. Projects like this are the proof staring them right in the face, if they care to look.
(Not on HN but I do still see some folks who last tested LLMs before Nov ‘25, those folks might still be mostly out of touch.)