Live data from Hacker News

Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

tikz.dev

61–70 of 88 posts

Re: Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

#61
post #17

Here's what I would need: the ability to position five nodes in a circular fashion, so that they are evenly spaced.

Intriguing thought. Of course by writing code it can be done \foreach \i in {1,...,5} { \node[circle, draw] (n\i) at ({90 - 72*(\i-1)}:1cm) {$\i$}; } but I'm not sure how to expose that as a UI in a nice way (maybe: if something uses polar coordinates and the user holds shift, then during drag the radius stays fixed, and I nudge towards even angular spacing + multiples of 15 degrees?)

A simpler way to do this would be for the user to create and place some temporary virtual "grids". For example, the user might create a virtual triangle of a certain size. Or in the case of this request, a circle with n points. Note that these are virtual and temporary items never created in the underlying tikz code (though you may implement them with hidden tikz code).

Then the user can do one of two things. (1) Select an item and place it on the grid, and the item gets replicated on all the grid points. (2) Pick and place different items on each of the grid points.

Re: Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

#63
post #57

This is cool! 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…

Attachment works for (text) nodes because they have anchors - you should see green attachment dots when drawing new lines or moving existing lines. When using draw.io I’d suggest exporting to PDF instead of PNG so you keep it as vector graphics.

> When using draw.io I’d suggest exporting to PDF instead of PNG so you keep it as vector graphics.

I had trouble getting that working (admittedly years ago) and as long as you have a high enough resolution people can't really tell a difference between it and SVG, though obviously it will make the filesize bigger.

Just tried the text nodes and indeed the arrows work. I guess I would also suggest doing the same for regular shapes.

Re: Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

#65
post #38

I'm running Linux Mint (xfce version), and I installed the .deb version (TikZ.Editor_0.4.0_amd64.deb). It's very odd...for example, when I open it or do File/New, many (but not all) of the grid cells are rectangles, not squares. Am I doing something wrong, like installing the wrong version? Or maybe misinterpreting what the faint grey lines are?

Yeah that's odd, the grid should be square. Is the web version looking correct in the browser? Feel free to paste some screenshots into https://github.com/DominikPeters/tikz-editor/issues and I can look into it.

I think the web version looks correct, although the grid lines are so faint there that it's hard to tell. I'll paste some screenshots to that link--thanks for the work!

Re: Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

#66
Wow, awesome project! I gave a look a bit at the code (before realizing this was made with coding agents as said below on the website) and this seems really well made.

Still, I would really like to know how you approached this from an architecture perspective. I'm also curious to how much coding agents structured the code like so by themselves or if you had to steer them heavily (I've just tried a bit gemini flash from antigravity cli so I'm a bit behind on this).

Also how did you approach the rendering correspondence with actual tikz code? Do you have some tests that like render the tikz using latex and your js pipeline and compare the result for differences?

Re: Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

#68
post #66

Wow, awesome project! I gave a look a bit at the code (before realizing this was made with coding agents as said below on the website) and this seems really well made. Still, I would really like to know how you approached this from an architecture perspective. I'm also curious to how much coding agents structured the code like so by themselves or if you had to steer them heavily (I've just tried a bit gemini flash fr…

The first part I implemented was the basic parser -> SVG renderer (restricted to the simplest TikZ constructs) and then put in a basic drag-and-drop interface to validate whether the architecture was promising. Code structure was decided pretty much entirely by Codex -- it asks my opinion with multiple choice questions during plan mode, which I like. I tend to alternate between feature expansion and code quality passes (e.g. making sure no files are too big, folder structure makes sense, test coverage is good, etc).

Indeed I have scripts for compiling a given tikz figure using latex (in particular dvisvgm so I get an SVG instead of a PDF) as well as my js-based renderer. I apply that script to various corpuses, mostly particular pages from the tikz manual (see https://tikz.dev), but there are also a few books about TikZ that have downloadable zips of all the examples they use. I then inspect the correspondence between the two renderers by eye and give Codex a list of which figures are wrong and why, and it then goes and fixes the underlying issues.

You'd think that finding discrepancies between the renderers could be done automatically, but it hasn't worked well in my experience. The models are multimodal but still kinda blind; they think two pictures are the same even if they are very much not the same. But once you tell them whats wrong, they're then pretty good at iterating until it is fixed. (One could also try to do a pixel diff of rasterized images, but that's super noisy, and text rendering isn't going to be pixel perfect anyway.)

Re: Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

#69
If people are curious, I've worked on this project since February 2026, relatively consistently. In that time, through Codex, I've used around 700M tokens for this project (not counting cache reads), which at API rates would have cost $15k (but I actually paid only around $500 in ChatGPT subscription fees).
Post reply on HN