yishn / tikzcd-editor

A simple visual editor for creating commutative diagrams.
https://tikzcd.yichuanshen.de/
MIT License
1.86k stars 100 forks source link

Double-struck arrows? #6

Closed Kile-Asmussen closed 4 years ago

Kile-Asmussen commented 6 years ago

It would be pretty cool with the ability to make arrows between arrows (for natural transformations, etc.)

Double-struck arrows too (which could double as equals-signs without an arrowhead.)

yishn commented 6 years ago

Do you have some working example tikzcd code for diagrams with arrows between arrows? I fear these diagrams might be too complicated. Double struck arrows would be cool.

yishn commented 6 years ago

tikz-cd only supports double struck arrows with a limited combination of arrow heads and tails. I'm not sure how we should handle these.

Kile-Asmussen commented 6 years ago

Maybe make a selection of 'special arrows' for double-struck and equals? Otherwise, one can define one's own arrow styles with relative ease in tikz.

\begin{tikzcd}
C \arrow[r, bend right=49, ""{name=a1}] \arrow[r, bend left=49, ""{name=a2}] & D
\arrow[from=a1,to=a2, double]
\end{tikzcd}

I do believe the above will do it. Just gensym some names for the arrows and use from=X, to=Y.

yishn commented 6 years ago

Currently, the logic behind tikzcd-editor only allows arrows between grid cells. Everything depends on that, the drawing algorithm, the code generator, the app state. Implementing arrow between arrows is out of scope of this project since it requires rewriting everything from scratch. That said, I'll keep this issue open for double-struck arrows.