varkor / quiver

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

Support tikzcd's column/row sep #98

Closed iLambda closed 2 years ago

iLambda commented 3 years ago

When writing diagrams with verbose labels, they tend to get overflow and nearly hide the arrows. image

To fix this, in latex, I add [column sep=small/normal/huge/large, row sep=small/normal/huge/large], which produces a more readable output. image

In order to ensure reproducibility (coauthor editing the diagram on q.uiver and then forgetting to put the annotations back), it would be nice to have a way to specify it in q.uiver so that the preview can be easier to make, and read.

varkor commented 3 years ago

I've been meaning to get around to adding this, because I hit the same problems. I'll try to get to it soon.

enjoysmath commented 3 years ago

@varkor note, if you have an editable list of labels for the nodes, then one way of coding it is so that no label is the "center label", so you could have the node highlight when you hover over it for moving, and the labels can move around and bound to a smaller grid which may or may not be visible. So that the dimensions of your large grid never really change, and you don't have any longer the bugs it is causing such as this one. By editable list of labels I mean multiple labels per arrow but in addition per node. See comment in other thread about that feature: #92

Perhaps if their is only one label, then the node moves along with its label by default.

varkor commented 3 years ago

Yes, I think there's some room for experimentation here. I was wondering whether having the label length affect the grid size would work well. It does seem a more natural solution than fixed column size like tikz-cd. I'd have to play around with it to see, though.

varkor commented 2 years ago

Since I haven't had time to experiment with more flexible column/row spacing behaviour, I've implemented some sliders on the export screen that allow you to change the separation manually. This won't be reflected in the quiver diagram, but will add the column sep and row sep tikz-cd options. At the moment, column and row spacing is not saved in the diagram itself, but hopefully this is still useful for the time being.

image

Let me know if this doesn't address your use case.

This has been added in https://github.com/varkor/quiver/commit/d2c8c1dcc44fcfc398bfe03138cf90e870fbab20 and will be available in the next version of quiver, which I hope to release soon. You can test it on https://q.uiver.app/dev/.