varkor / quiver

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

Decoding nodes from numbers #14

Closed vikraman closed 4 years ago

vikraman commented 4 years ago

In the exported LaTeX, the nodes are encoded using numbers. Quite often, I want to edit the exported LaTeX to tweak the diagram, rather than editing in quiver. Currently, it is a bit difficult to decode the text node from the vertex numbers. Would it be possible to do either of these two options?

varkor commented 4 years ago

I'm not opposed to this, but I would definitely rather focus on improving quiver to the point where editing the generated code directly is unnecessary.

varkor commented 4 years ago

Since https://github.com/varkor/quiver/issues/26, edges are now output on their own line. I think this makes the problem described in this issue less severe, because you can clearly read the name on each arrow. For example:

% https://varkor.github.io/quiver/?q=WzAsNCxbMCwwLCJcXGJ1bGxldCJdLFsyLDAsIlxcYnVsbGV0Il0sWzAsMSwiXFxidWxsZXQiXSxbMiwxLCJcXGJ1bGxldCJdLFswLDFdLFsyLDNdLFs0LDVdXQ==
\[\begin{tikzcd}
    {\bullet} && {\bullet} \\
    {\bullet} && {\bullet}
    \arrow[""{name=0}, from=1-1, to=1-3]
    \arrow[""{name=1}, from=2-1, to=2-3]
    \arrow[Rightarrow, from=0, to=1, shorten <=2mm, shorten >=2mm]
\end{tikzcd}\]

Does this help? It has a similar effect to including the mapping as comments in the source code.

vikraman commented 4 years ago

Oh yes, this is very helpful.

varkor commented 4 years ago

I shall close as solving the original problem, but feel free to reopen if you think this isn't sufficient.