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.
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
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.
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.
By the way: The link to the app from the blog post 404s (but the one you posted here works)
Thanks, it should be fixed imminently!
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...
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).
Man that app is really awesome. Thanks a lot for creating it!
Out of curiosity, how long have you been working on this? How long does it take to make something this shiny?
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.
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.
@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.
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:)!
That was a very quick fix, no wonder you got this cool app working in less than two years :grinning_face_with_smiling_eyes:
Works perfectly in both Safari and Firefox now. :tada:
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
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.
I think it would be very cool to facilitate interactive theorem proving or similar :)
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.
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!
This is really nice and polished. Kudos!
This is so brilliant that I am speechless. Thanks, Nathaniel.
Should it be called Globulars, as it has arrows between arrows ;-)
That could be a tad confusing, as there's already a web-based higher-dimensional string diagram editor called Globular :)
This topic was moved by Matteo Capucci to #practice: software > quiver: a modern commutative diagram editor
This topic was moved here from #practice: software > quiver: a modern commutative diagram editor by Matteo Capucci
Very nice application. I've been using https://tikzcd.yichuanshen.de/ for a year or so now. Features I like about tikzcd are:
The diagram code is base64 encoded in the URL. Thus, your "file" is a URL. (I see you do the same -- great)
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
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.
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.
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.
If someone fancies hacking on KaTeX to speed up the process… :smile:
Also, regarding 2, the same is true of quiver: you just need the quiver
LaTeX package and nothing else :)
@Nathanael Arkor is there a way to draw an arrow?
It's doable. Set the arrow level to 2, and make the arrowheads empty on both sides.
ah! great!
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.
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
Animating a diagram to be revealed parts at a time can be done with TikZ + beamer, although it would be a bunch of effort
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.
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 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.
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.
Yeah, you're good at that. My tablet usage still sucks.
I just can't write smoothly as I can on a board.
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.
No, I'm not using that - maybe that's the problem, writing while looking somewhere else.
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.
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
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.
Unfortunately, I don't think you can copy-paste in quiver
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.
(Having copy-and-paste would be a useful feature independently.)
Although sometimes one also wants to remove something from the diagram in a later slide.
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).
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.
Yes, per-frame visibility would likely be the best way to go.
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?
Yes, I think this is roughly what is meant by demonic/angelic. So when you're explaining a statement like , the choice of is "demonic", because it's made by the opponent, while the choice of is angelic, because it's made by the proponent.
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..."
@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
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.
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.)
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.
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:
firefox index.html
to start a new diagram (because I want to be able to work offline),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?
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.
The CODE
contains the entire diagram. It is not being saved locally: it is being saved in the CODE
itself.
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 :(
Though it's less important if you're only editing diagrams quiver created.
Oh, nice, that's a start. Thanks!
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).
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.
Thanks, I understand
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
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.
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.
'show hints' has been quite instructive for me
though I realized Italian keyboard layout, where ;
is shift+,
, invalidates most of the keybindings