varkor / quiver

A modern commutative diagram editor for the web.
https://q.uiver.app
MIT License
2.4k stars 80 forks source link

multiple labels per arrow #92

Open lcnr opened 3 years ago

lcnr commented 3 years ago

Thank you for this app, it's really helpful for me :sparkling_heart:

Trying to copy an existing diagram in quiver, I want to be able to add a label both above and below an arrow which is not yet possible in quiver itself afaik: Screenshot from 2021-05-03 16-10-27

I am currently manually adding the lower label afterwards, which is not too much of a hassle.

varkor commented 3 years ago

I would definitely like to support this (in fact, there's even an old branch where I started implementing this feature, though it's very out-of-date now: https://github.com/varkor/quiver/tree/multiple-labels). I think the biggest question is what the most intuitive interface would be. Possibly there could be radio buttons for each edge label in the side panel, and the input bar at the bottom would always correspond to the selected button.

This feature should be straightforward to implement, but I don't have time to get to it in the near future. It'll be on the list for version 1.3.0 of quiver, though.

enjoysmath commented 3 years ago

I second this idea. How else would you do X \xrightarrow{\sim} Y together with its name label?

enjoysmath commented 3 years ago

But if arrows can have mutlple lablels, you might as well make nodes as well. I would say you have a main label which is always present but can be blank, and a deletable / extendable list of up to 8 labels. One for each top, left, right, bottom, and the in-betweens of those. It's kind of interesting that if a CD has a vertex with degree of more than 16, then the diagram defeats the purpose of the CD as a mnemonic for learning a diagram chasing concept. The diagram is simply too convoluted. So the class of CD graphs (that are drawn for humans) is a lot more computatationally tamable than graphs with unrestricted vertex degree.

To make this even more visually workable, I would perhaps limit the edge labels to 4 and also the node labels. With extra node labels you can do stuff like "x \in X` but on the top & bottom of the node as well as the sides.

You shouldn't have to fake the multiple labels if you need them. It's a very needed feature, imho.

varkor commented 3 years ago

I second this idea. How else would you do X \xrightarrow{\sim} Y together with its name label?

At the moment, you can achieve this by drawing two identical arrows, but I agree it's not ideal.

But if arrows can have mutlple lablels, you might as well make nodes as well.

I don't think I've ever seen a situation where you would want a vertex to have multiple labels. Have you got an example?

enjoysmath commented 3 years ago

@varkor In answer to your question about an example for multi-labels on vertices:

Quiver Link

Pictured you see the first part of a diagram chase in a category of A-modules. It's more natural to have b \in be in a label on its own and the main label be B. And you then can place b \in on any side of the B.

Also, just doing this for arrows is asymmetrical design-wise. If people see mutli-labels on edges, they will automatically expect multi-labels on vertices.