Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: community: general

Topic: quiver: a modern commutative diagram editor


view this post on Zulip Nathanael Arkor (Nov 25 2020 at 16:20):

Hi everyone,
I've been working on a new editor for commutative and pasting diagrams. It's called quiver and you can find it here: https://q.uiver.app/
image.png

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 16:21):

I want to make typesetting commutative diagrams as easy as drawing them by hand: once you've created a diagram, you can export to LaTeX or take a screenshot to share (on Zulip, for instance). I've spent a lot of time making the interface intuitive and quick to use, so hopefully you should be able to pick it up quickly — but if you have any questions, let me know. I'm also very happy to receive feedback, feature requests, bug reports, etc.

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 16:21):

Finally, there's a blog post that shows off some of the features (including higher dimensional cells, flexible grid, macro support, and more). The editor is open source on GitHub.

view this post on Zulip Jules Hedges (Nov 25 2020 at 16:28):

By the way: The link to the app from the blog post 404s (but the one you posted here works)

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 16:32):

Thanks, it should be fixed imminently!

view this post on Zulip Eduardo Ochs (Nov 25 2020 at 16:36):

Do you also accept requests like "can you help me to port your implementation of XXX to this other program for diagrams?" I am the author of this - http://angg.twu.net/dednat6.html - and I am not fluent in Tikz at all, and because of that the Tikz backend of dednat6 only supports a few kinds of arrows and modifiers at the moment... I think that with a little bit of help I can make it output Tikz code similar to yours...

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 16:42):

I'd be happy to chat privately about that with you. Let me note also that the editor is open source (you can see the code for exporting to tikz-cd here).

view this post on Zulip Matteo Capucci (he/him) (Nov 25 2020 at 16:46):

Man that app is really awesome. Thanks a lot for creating it!

view this post on Zulip Jules Hedges (Nov 25 2020 at 16:48):

Out of curiosity, how long have you been working on this? How long does it take to make something this shiny?

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 16:54):

I started working on it at the start of December 2018. The basic functionality has been there for a long time, but certain features (e.g. curved arrows) took much more time and I wanted to wait till they were completed before I advertised it.

view this post on Zulip Jason Erbele (Nov 25 2020 at 17:18):

Is there a recommended browser for quiver?
In Safari I get a blank page, aside from the quiver logo linking to GitHub. Seems to run OK in Firefox... until I try clicking on the Export to LaTeX button. No sign of any LaTeX code, and adding new objects/arrows seems to be frozen. I can get the shareable link and continue working from there, though.

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 17:22):

@Jason Erbele: thanks, those bugs slipped through at the last moment. It should work in all three of those browsers. I'll work on a fix now.

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 17:28):

It should be working in both Safari and Firefox now (you may need to empty your cache). Thank you for catching it (that was my nightmare :sweat_smile:)!

view this post on Zulip Morgan Rogers (he/him) (Nov 25 2020 at 17:52):

That was a very quick fix, no wonder you got this cool app working in less than two years :grinning_face_with_smiling_eyes:

view this post on Zulip Jason Erbele (Nov 25 2020 at 18:26):

Works perfectly in both Safari and Firefox now. :tada:

view this post on Zulip Shea Levy (Nov 25 2020 at 18:29):

Woah, this looks awesome! @Nathanael Arkor haven't looked through the details yet, maybe this is there, but is there a way to export the diagrams as structured data that could be consumed by some other program besides for rendering? E.g. could be cool to use this to generate proofs

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 18:31):

There isn't currently, but the editor uses a custom data-structure internally, and it would be easy to either expose that, or add another export format.

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 18:32):

I think it would be very cool to facilitate interactive theorem proving or similar :)

view this post on Zulip Ralph Sarkis (Nov 25 2020 at 19:10):

Amazing website Nathanael!

I will definitely use quiver over my previously preferred editor starting today. :grinning: I'd love to be able to parse older diagrams I have drawn in tikzcd to make small adjustments on quiver. I have posted this issue in case you prefer this way to make feature request.

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 19:13):

Thanks! I agree that would be nice to support too. I'd like to see what the most popular features that are missing from quiver are, so I can figure out how to prioritise the next steps, so that's helpful!

view this post on Zulip Fabrizio Genovese (Nov 25 2020 at 19:58):

This is really nice and polished. Kudos!

view this post on Zulip Ivan Di Liberti (Nov 25 2020 at 20:26):

This is so brilliant that I am speechless. Thanks, Nathaniel.

view this post on Zulip Henry Story (Nov 25 2020 at 21:30):

Should it be called Globulars, as it has arrows between arrows ;-)

view this post on Zulip Nathanael Arkor (Nov 25 2020 at 21:47):

That could be a tad confusing, as there's already a web-based higher-dimensional string diagram editor called Globular :)

view this post on Zulip Notification Bot (Nov 30 2020 at 10:47):

This topic was moved by Matteo Capucci to #practice: software > quiver: a modern commutative diagram editor

view this post on Zulip Notification Bot (Nov 30 2020 at 13:49):

This topic was moved here from #practice: software > quiver: a modern commutative diagram editor by Matteo Capucci

view this post on Zulip Marko A. Rodriguez (Nov 30 2020 at 19:55):

Very nice application. I've been using https://tikzcd.yichuanshen.de/ for a year or so now. Features I like about tikzcd are:

  1. The diagram code is base64 encoded in the URL. Thus, your "file" is a URL. (I see you do the same -- great)

  2. No extra required LaTeX packages beyond tikzcd.

I wish quiver/tikzcd supported SVG exporting. What I have to do is take the LaTeX code snippet, cut and paste it into LaTeXiT (https://www.chachatelier.fr/latexit/), then render to SVG and save. Be nice if I could get LaTeXiT out of the workflow via an [export] button in quiver.

In conclusion, congrats on creating something good.

Screen-Shot-2020-11-30-at-12.51.49-PM.png

view this post on Zulip Nathanael Arkor (Nov 30 2020 at 20:18):

quiver.sty currently contains the packages that quiver diagrams require to render in LaTeX (e.g. tikz-cd and some tikz libraries), as well as a TikZ style for fixed-height curves, though it will soon also contain some extra arrowhead styles for improving the appearance of some arrowheads in combination with 2-cells.

view this post on Zulip Nathanael Arkor (Nov 30 2020 at 20:19):

Previously, it would export entirely self-contained diagrams, but this meant that each diagram had to be a lot larger on average, and there was some duplication. This way the individual diagrams can be much smaller. Personally, I don't find including a single .sty file to be much of an inconvenience.

view this post on Zulip Nathanael Arkor (Nov 30 2020 at 20:20):

The reason SVG export is not currently supported is because KaTeX, the LaTeX renderer used by quiver (and, incidentally, by Zulip), does not support SVG export. There is no problem, technically speaking, exporting the diagrams without the labels as SVG. KaTeX are working on supporting SVG export eventually, but I do not think it is a high priority for them.

view this post on Zulip Nathanael Arkor (Nov 30 2020 at 20:21):

If someone fancies hacking on KaTeX to speed up the process… :smile:

view this post on Zulip Nathanael Arkor (Nov 30 2020 at 20:26):

Also, regarding 2, the same is true of quiver: you just need the quiver LaTeX package and nothing else :)

view this post on Zulip Matteo Capucci (he/him) (Mar 18 2021 at 08:59):

@Nathanael Arkor is there a way to draw an == arrow?

view this post on Zulip Jason Erbele (Mar 18 2021 at 10:44):

It's doable. Set the arrow level to 2, and make the arrowheads empty on both sides.

view this post on Zulip Matteo Capucci (he/him) (Mar 18 2021 at 11:14):

ah! great!

view this post on Zulip Ralph Sarkis (Apr 12 2021 at 19:38):

I am writing here and not in a Github issue because it is not really a feature request (I don't see myself using it in the near future), more an idea that still needs some mulling over but that could probably be nicely implemented within quiver. I have found most written diagram chasing proofs to be a big hassle to read because a single big diagram is drawn and you must visualize which parts are drawn at each step of the proof. My idea to solve this would be to have a diagram for each step and indicators in the text to see which diagrams the reader should look at. Obviously, this demands more work from the writer because they have to edit a diagram for each step. Thus, I was thinking that within quiver, there could be a way to put every part of the diagram (objects and arrows) into groups and then quiver generates a diagram for each group displaying only the parts within that group. This way, one could draw the whole diagram on quiver, select the parts of the diagram that should be displayed at step 1,2,etc. and quiver generates a diagram for step 1,2,etc. automatically.

A better way (imo) to display this would be to have a slideshow instead of many diagrams and inside the text, there are indicators to tell you when to move to the next step. This would be very hard to implement on a pdf I guess, but that could be done as an extension of the embedding capabilities quiver already has in webpages.

view this post on Zulip Jules Hedges (Apr 12 2021 at 20:30):

Once you start thinking there's an endless number of fun ideas for improving presentation, where one of the big barriers is the limitations of the pdf format itself. Another possibility is to have the diagram all in one go, but mousing over each cell of the diagram reveals a section of popup text explaining why it commutes, with links to the needed assumptions

view this post on Zulip Jules Hedges (Apr 12 2021 at 20:31):

Animating a diagram to be revealed parts at a time can be done with TikZ + beamer, although it would be a bunch of effort

view this post on Zulip John Baez (Apr 12 2021 at 20:34):

It's really important that diagrams show up a bit at a time as one is explaining them. There's a nice way to do this called a blackboard.

view this post on Zulip John Baez (Apr 12 2021 at 20:35):

Getting high-tech tools to work almost as smoothly as talking while writing on a blackboard is a big challenge, but worthwhile because of course the high-tech route has certain advantages.

view this post on Zulip Conor McBride (Apr 12 2021 at 20:48):

I've been doing a bit of thinking about how to expose the quantifier alternation in explaining what proposition is represented by a diagram. I.e., what's the game? My rule of thumb is to label phases starting from 0, with even phases being demonic and odd phases being angelic. The key insight is that you need only bother labelling a thing which arrives strictly later in the dialogue than its boundary.

view this post on Zulip Mike Shulman (Apr 13 2021 at 00:07):

John Baez said:

Getting high-tech tools to work almost as smoothly as talking while writing on a blackboard is a big challenge, but worthwhile because of course the high-tech route has certain advantages.

I've found that a wacom tablet is just about as smooth as a blackboard for me.

view this post on Zulip John Baez (Apr 13 2021 at 00:07):

Yeah, you're good at that. My tablet usage still sucks.

view this post on Zulip John Baez (Apr 13 2021 at 00:08):

I just can't write smoothly as I can on a board.

view this post on Zulip Mike Shulman (Apr 13 2021 at 00:09):

Are you using a tablet that's also a screen, so you can see what you're writing directly under your pen? I wouldn't give that up for the world, although I know people who claim to be fully satisfied with the kind of tablet where you have to write on a black plastic board and only see what you're writing on a separate screen.

view this post on Zulip John Baez (Apr 13 2021 at 00:10):

No, I'm not using that - maybe that's the problem, writing while looking somewhere else.

view this post on Zulip Mike Shulman (Apr 13 2021 at 02:16):

Jules Hedges said:

Animating a diagram to be revealed parts at a time can be done with TikZ + beamer, although it would be a bunch of effort

I've done it, and I don't think it's that bad. It could be even easier with built-in quiver support.

view this post on Zulip Eduardo Ochs (Apr 13 2021 at 02:28):

I've tried to use "animated" (in the Beamer sense) diagrams and I didn't like them much. Here is one of my favorite low-tech solutions - I guess that it is similar to what @Conor McBride uses. Here is how Freyd states that a category has all equalizers:
freyd1.png
and here is how to write that as a single diagram:
freyd2.png

view this post on Zulip Jason Erbele (Apr 13 2021 at 14:15):

Selecting a bunch of things to duplicate would make it easier to make piece-by-piece diagrams in the style of Freyd. I haven't played around enough with quiver to find that option.

view this post on Zulip Fawzi Hreiki (Apr 13 2021 at 14:35):

Unfortunately, I don't think you can copy-paste in quiver

view this post on Zulip Nathanael Arkor (Apr 13 2021 at 14:46):

I think perhaps a more intuitive UI would be having layers for the commutative diagram, equipped with an order. That way, you wouldn't have to update each duplicated component each time you wanted to edit something. Then quiver could export the diagrams with the right Beamer commands to reveal the diagram in the correct order.

view this post on Zulip Nathanael Arkor (Apr 13 2021 at 14:46):

(Having copy-and-paste would be a useful feature independently.)

view this post on Zulip Mike Shulman (Apr 13 2021 at 17:24):

Although sometimes one also wants to remove something from the diagram in a later slide.

view this post on Zulip Jason Erbele (Apr 13 2021 at 18:28):

For removing elements from a diagram in a later slide, I think an intuitive UI would allow editing frame by frame, where each existing frame is independent of the others (or can be edited independently of the others, at least), but adding a new frame would include everything from either the last frame or the currently selected frame (and would either insert at the end or immediately after the current frame – ideally frames could be shuffled, too).

view this post on Zulip Jason Erbele (Apr 13 2021 at 18:37):

In my fantasy (I have no idea how much it would complicate the backend...), re-inserting a deleted element in a subsequent frame would allow that element to still be updated across all frames where it appears.

view this post on Zulip Nathanael Arkor (Apr 14 2021 at 10:28):

Yes, per-frame visibility would likely be the best way to go.

view this post on Zulip Alexander Gietelink Oldenziel (Jun 14 2021 at 21:06):

Conor McBride said:

I've been doing a bit of thinking about how to expose the quantifier alternation in explaining what proposition is represented by a diagram. I.e., what's the game? My rule of thumb is to label phases starting from 0, with even phases being demonic and odd phases being angelic. The key insight is that you need only bother labelling a thing which arrives strictly later in the dialogue than its boundary.

I'm missing a bit of context but demonic/angelic sounds to me like positive/negative connectives.
If we think of a proposition as a dialogue or debate then positive means the burden of proof is on the proponent, while if it is negative the burden of proof lies on the opponent. Does this make any sense?

view this post on Zulip Eigil Rischel (Jun 22 2021 at 09:18):

Yes, I think this is roughly what is meant by demonic/angelic. So when you're explaining a statement like f,gh:\forall f,g \exists h : \dots, the choice of f,gf,g is "demonic", because it's made by the opponent, while the choice of hh is angelic, because it's made by the proponent.

view this post on Zulip Jules Hedges (Jun 22 2021 at 10:27):

Yeah, the idea is that a formula is true iff the Player wins against the Opponent, if Player is an angel who magically choses the best strategy to make the formula true, and Opponent is a demo who magically choses the best strategy to make the formula false. Which is a slightly more memorably way of thinking about "there exists a P-strategy such that for all O-strategies..."

view this post on Zulip Kale Evans (Aug 06 2021 at 18:02):

@Nathanael Arkor The tool is super intuitive. It was immediately obvious how to use it. Great stuff.
Does the save feature work yet? When I attempt to save a diagram, it appears nothing happens. And I didn't have to sign in to use the tool

view this post on Zulip Nathanael Arkor (Aug 06 2021 at 18:03):

The save button updates the URL to be a permanent link to the current diagram. So you can copy and paste that URL somewhere else to have it saved.

view this post on Zulip Tom Hirschowitz (Feb 18 2022 at 15:10):

I've recently started to use quiver quite intensively, not only for typesetting diagrams, but for making them commute, i.e., for actually doing proofs. I find it very efficient, because it's much easier to get back in time and try other branches, etc, than on paper.

So huge thanks to @Nathanael Arkor for this great tool!

However, my library of diagrams is starting to grow huge and messy.
Has anyone else run into this problem? How did you solve it?

Similar question: I don't understand enough of quiver's internals to manipulate the diagrams I've saved. So, for instance, how could I version-control them as I do with latex files?

(Maybe I should mention that I often work offline, so cloned the source from github, and normally launch firefox index.html for each new diagram.)

view this post on Zulip Nathanael Arkor (Feb 23 2022 at 17:56):

I don't know whether this really answers your question, but I generally include each diagram inline in the LaTeX file (rather than as separate files). It's rare that I need to reuse the same diagram exactly, so this seems to make the most sense to avoid a proliferation of files. The diagrams themselves are then version-controlled just like the rest of the LaTeX document.

view this post on Zulip Tom Hirschowitz (Feb 28 2022 at 16:01):

Thanks for your answer, @Nathanael Arkor! Your strategy makes sense for someone like you, who often gets things right on a first try. But I always need to get back and edit old diagrams. So for the moment I:

But this is quite error-prone (I don't get only diagrams wrong). And also, the url is only valid on one computer.

E.g., how hard would it be to parse tikzcd code produced by quiver itself?

view this post on Zulip Nathanael Arkor (Feb 28 2022 at 16:07):

If you have created a diagram in quiver, you can always modify it later if you keep the URL. The URL will be of the form: PATH_TO_QUIVER?q=CODE. If you're working locally, then PATH_TO_QUIVER will be something like C:/Applications/quiver/index.html. If you move to a different computer (where quiver is located at a different path), you can change the PATH_TO_QUIVER part without changing the CODE part and modify your diagram there.

view this post on Zulip Nathanael Arkor (Feb 28 2022 at 16:08):

The CODE contains the entire diagram. It is not being saved locally: it is being saved in the CODE itself.

view this post on Zulip Nathanael Arkor (Feb 28 2022 at 16:09):

E.g., how hard would it be to parse tikzcd code produced by quiver itself?

Not so hard, but unfortunately I don't have the time to work on this at the moment :(

view this post on Zulip Nathanael Arkor (Feb 28 2022 at 16:10):

Though it's less important if you're only editing diagrams quiver created.

view this post on Zulip Tom Hirschowitz (Mar 01 2022 at 07:57):

Oh, nice, that's a start. Thanks!

view this post on Zulip Mateo Carmona (Mar 15 2022 at 21:46):

Many thanks for this incredible resource.

I would like to know if it is possible to draw an arrow from a \bullet to itself. Something like a loop (sorry if this is evident).

view this post on Zulip Nathanael Arkor (Mar 16 2022 at 12:10):

Unfortunately, it is not yet possible to draw loops. There has been some progress on the feature, but I've been too busy to work on it recently.

view this post on Zulip Mateo Carmona (Mar 16 2022 at 14:27):

Thanks, I understand

view this post on Zulip Nathanael Arkor (Apr 13 2024 at 13:35):

I haven't previously been mentioning the updates to quiver in this thread, since they have mostly been smaller quality-of-life improvements. However, in the latest update, quiver now supports looped arrows (e.g. endomorphisms), which has been the most requested feature since the initial release. So, if the lack of support for loops had been holding you back from trying quiver before, now might be a good time to try it out :)
https://q.uiver.app/
loop.mp4

view this post on Zulip Nathaniel Virgo (Aug 16 2024 at 06:01):

Is there a guide to using the keyboard shortcuts for Quiver? I feel like there's an intended workflow but I haven't been able to figure it out, e.g. how to use the tab key and how to create nodes and arrows with labels on both without using the mouse.

view this post on Zulip Nathanael Arkor (Aug 16 2024 at 22:42):

I should write a tutorial on navigating with the keyboard in quiver. I'm away at the moment, but once I get back, I'll try to put one together.

view this post on Zulip Matteo Capucci (he/him) (Aug 22 2024 at 07:25):

'show hints' has been quite instructive for me

view this post on Zulip Matteo Capucci (he/him) (Aug 22 2024 at 07:26):

though I realized Italian keyboard layout, where ; is shift+,, invalidates most of the keybindings