| ▲ | Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX(tikz.dev) | ||||||||||||||||
| 225 points by DominikPeters 4 hours ago | 40 comments | |||||||||||||||||
Hi all! TikZ is a widely-used LaTeX package for drawing figures in papers. It uses commands like \draw[->] (0,0) -- (1,2); to draw lines, shapes, text, etc. Academics usually code up their figures by hand, so there is lots of twiddling around with the coordinates and recompiling until things look nice. I guess it’s a bit like SVG, but it’s more code than markup, for example it has loops with \foreach. 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. | |||||||||||||||||
| ▲ | lopsotronic 19 minutes ago | parent | next [-] | ||||||||||||||||
Ah, I love CircuitiTikZ. Only way to do simple text-based circuit diagrams. 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) | |||||||||||||||||
| ▲ | otto-riz 3 minutes ago | parent | prev | next [-] | ||||||||||||||||
> the kind of task that no human would ever want to do I'm not an AI evangelist, but this kind of thing is such a welcome boon. More itches can be scratched! | |||||||||||||||||
| ▲ | j2kun 3 hours ago | parent | prev | next [-] | ||||||||||||||||
Neat! I also enjoyed https://q.uiver.app/ by https://github.com/varkor which is a bit more specialized. | |||||||||||||||||
| |||||||||||||||||
| ▲ | mcswell an hour ago | parent | prev | next [-] | ||||||||||||||||
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? | |||||||||||||||||
| |||||||||||||||||
| ▲ | master-lincoln 3 hours ago | parent | prev | next [-] | ||||||||||||||||
As a student I really wanted something like this. Thanks for making it open source. My theoretical computer science prof happened to be Till Tantau the inventor of TikZ. An awesome communicator too. | |||||||||||||||||
| |||||||||||||||||
| ▲ | sorenjan 3 hours ago | parent | prev | next [-] | ||||||||||||||||
Looks really nice. You might consider adding some presets to make it easier to get started, like some common neural net architectures and other use cases for TikZ. | |||||||||||||||||
| |||||||||||||||||
| ▲ | __mharrison__ 3 hours ago | parent | prev | next [-] | ||||||||||||||||
This is very cool, but I'm going to say the inevitable... 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. | |||||||||||||||||
| ▲ | srean an hour ago | parent | prev | next [-] | ||||||||||||||||
Is their anyone here old enough to remember Xfig ? I was quite proud of the hours of work I had put in to configure it just so, with the 3d look and all. | |||||||||||||||||
| |||||||||||||||||
| ▲ | meghanto 31 minutes ago | parent | prev | next [-] | ||||||||||||||||
Are you open to people repurposing this app as a plugin to larger apps like obsidian? | |||||||||||||||||
| |||||||||||||||||
| ▲ | GL26 3 hours ago | parent | prev | next [-] | ||||||||||||||||
All STEM students and researches from the world thank you | |||||||||||||||||
| ▲ | delta_p_delta_x 3 hours ago | parent | prev | next [-] | ||||||||||||||||
This is superb. Will you consider adding support for pgfplots[1]? When I was a student I was long considering writing a native application for real-time TikZing. | |||||||||||||||||
| |||||||||||||||||
| ▲ | whatever1 3 hours ago | parent | prev | next [-] | ||||||||||||||||
OMG! Psychiatrists are going to lose all of their graduate customers! The world thanks you. | |||||||||||||||||
| ▲ | adityamwagh 3 hours ago | parent | prev | next [-] | ||||||||||||||||
Hey! I've always wanted something like this! Thanks for building this! | |||||||||||||||||
| ▲ | cckolon an hour ago | parent | prev | next [-] | ||||||||||||||||
This is so cool. I would have loved this in college. | |||||||||||||||||
| ▲ | djmips an hour ago | parent | prev | next [-] | ||||||||||||||||
"TikZ ist kein Zeichenprogramm" (German for "TikZ is not a drawing program"). :-) | |||||||||||||||||
| |||||||||||||||||
| ▲ | dvorka 2 hours ago | parent | prev | next [-] | ||||||||||||||||
I needed exactly this for years excellent work! | |||||||||||||||||
| ▲ | Littice 3 hours ago | parent | prev | next [-] | ||||||||||||||||
The killer feature for me is not drawing TikZ visually, but being able to touch old TikZ without turning the source into generated-looking soup. | |||||||||||||||||
| |||||||||||||||||
| ▲ | emil-lp 3 hours ago | parent | prev | next [-] | ||||||||||||||||
Here's what I would need: the ability to position five nodes in a circular fashion, so that they are evenly spaced. | |||||||||||||||||
| |||||||||||||||||
| ▲ | dima-quant 3 hours ago | parent | prev | next [-] | ||||||||||||||||
This is great, nice concept! Good use of coding agents. Now I can make diagrams much faster. | |||||||||||||||||
| ▲ | hosteur 3 hours ago | parent | prev | next [-] | ||||||||||||||||
Wow. I would have loved something like this when I was studying in University. | |||||||||||||||||
| ▲ | quantummagic 3 hours ago | parent | prev | next [-] | ||||||||||||||||
Great job! Thank you for making it open source. 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. | |||||||||||||||||
| |||||||||||||||||
| ▲ | cubefox an hour ago | parent | prev | next [-] | ||||||||||||||||
That's cool. I guess it doesn't support TikZ' relative positioning (left of etc) because WYSIWYG features like drag-and-drop require absolute positioning? | |||||||||||||||||
| |||||||||||||||||
| ▲ | david_2107 3 hours ago | parent | prev | next [-] | ||||||||||||||||
That's awesome! Long overdue. | |||||||||||||||||
| ▲ | k33n 3 hours ago | parent | prev [-] | ||||||||||||||||
Wow, this is really, really great. Congratulations on an excellent offering and piece of tech! | |||||||||||||||||