I've tried it now a little. The UI looks very cool, and generally the project is cool so congrats!
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...
Thanks, this is good feedback. I think the difficulty lies not so much in code generation, but determining what a user would expect. If I click the "align bottom" button, I would be surprised if
suddenly were to get a new randomly named \coordinate and relative coordinate notation. On the other hand, if you start out with "nice" code, the app will in many cases refuse to let you drag things since it doesn't know (and in many cases can't know) what the drag should mean (do you change the named coordinate or change the offset to the coordinate etc).
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.
Oh man, good on you identifying a product that needs to exist. I've used a few TikZ editors (both online and desktop) and none of them are just amazing.
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 don't use Typst myself and am not familiar with Cetz. From the docs it looks like it's in early stages of development, so it doesn't feel like the right time to do this to me (or at least should be a separate, perhaps forked, app). But certainly it would make sense to develop bidirectional converters that could in particular be used at file open and file save in this app.
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.
Schleswig-Holsteiners are everywhere :) Till Tantau also started the beamer package for making LaTeX presentations. Both beamer and tikz are very important contributions to science communication.
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.
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.
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.
I think pgfplots should in principle be possible. I've postponed it thus far because pgfplots is GPL licensed, while the editor is MIT licensed, so I would need to distribute pgfplots support as a separate add-on. But in due course, putting in add-on infrastructure could make sense, because it would also allow adding support for stuff like tikzcd and CircuiTikZ (or tikzpingus!).
Generally yes! It is permissively licensed. I originally considered writing this app as a VS Code extension (because most app ideas that include a source editor are more simply done as an extension) but then decided that I wanted to have more control over the source view.
Perfect! I've been working on a general purpose Swiss army knife for technical note taking/ knowledge management/ sharing. This could very well be an add-on missing piece for heavier latex rendering and editing. Thank you!
Exactly, I wanted to avoid that. In contrast, if you open an SVG in (for example) Inkscape and make a minimal change and save, the resulting file has little to do with the original.
> 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)..
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?)
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.
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?
It does support editing it if relative positioning is used in the code, i.e. if you drag the object it will continue being relatively positioned. But if you add new elements with the various tools, they will be absolutely positioned (not sure what would be a good UI for switching an element to relative positioning) unless you edit the source. You can try with
\begin{tikzpicture}
\node[draw] (A) at (0,0) {A};
\node[draw, right of=A] (B) {B};
\end{tikzpicture}
> not sure what would be a good UI for switching an element to relative positioning
1. Right-click on an existing object, offer drop-down context menu.
2. Menu item `Position relative to...`.
3. The cursor now selects _other_ objects in the field.
a. If there is no other object, then offer to create a new label-less node with (x,y); default to the origin.
b. Once an object is selected, then offer `right of`, `left of`, `north of`, `south of`, `southeast of`, etc as a drop-down menu, and a field for radial displacement.
i. As a stretch goal, offer a `Custom position...` button to specify an (x, y) displacement, or a polar angle and radial displacement. These three options (fixed offsets, Cartesian, polar) could also be tabs in the resultant menu from (b) above.