Live data from Hacker News

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

tikz.dev

81–88 of 88 posts

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

#82

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.

A converter would be fantastic, too. I experimented with having a few LLMs try to translate TikZ to Cetz and none of them were great.

The best thing I have found so far is tylax (https://github.com/scipenai/tylax), which I think is a parser with rules, not a statistical model.

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

#83

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. [1]: https://ctan.org/pkg/pgfplots?lang=en

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!).

I don't think generating pgfplots graphics counts as a derived work, as long as you are not distributing parts of the pgfplots source code. Otherwise every document that uses pgfplots would automatically be GPL-3.0-or-later, which is probably not what the author intended.

Source: I have a tiny bit of copyright on pgfplots, https://github.com/pgf-tikz/pgfplots/commits?author=hmenke

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

#84
post #71
post #32

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.

My thought exactly when I saw the post. xfig should still work, right? I remember that it could only export to .fig and .eps files, not latex or any other plot format.

When linked with transfig their is a whole lot of file format it supports. Most distributions will package them together.

https://linux.die.net/man/1/transfig

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

#85
post #48

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…

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 \begin{tikzpicture} \draw (0,2) rectangle (1,1); \draw (1.5,2) rectangle (2.5,1); \end{tikzpicture} suddenly were to get a new randomly named \coordinate and relative coordinate notation. On the other hand, if you start out w…

A follow-up comment: when dragging, you could perhaps offer a 'sticky' mode (toggle/enable with Shift/Alt/Ctrl key?) that locks nodes to TikZ's default alignment features, and display a tooltip with the anchor position in question. Contrary to most drawing apps, this could be the default mode, and the toggle key could switch to absolute, freeform positioning.

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

#88
post #83

Earlier quoted context omitted.

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!).

I don't think generating pgfplots graphics counts as a derived work, as long as you are not distributing parts of the pgfplots source code. Otherwise every document that uses pgfplots would automatically be GPL-3.0-or-later, which is probably not what the author intended. Source: I have a tiny bit of copyright on pgfplots, https://github.com/pgf-tikz/pgfplots/commits?author=hmenke

Hi Henri, thanks for all your work on pgf, and congrats on the recent push on CI etc. The reason I think that GPL-3 would bite is that adding support would require more or less translating the pgfplots source to javascript, so that the app can parse and then correctly render the code, and that would definitely be a derived work. But I think the add-on route should be okay.
Post reply on HN