astoff / tikz-cd

Commutative diagrams with TikZ
44 stars 3 forks source link

Rightarrow interacts badly with other styles #1

Closed varkor closed 4 years ago

varkor commented 5 years ago
\begin{tikzcd}
    {\bullet} & {\bullet}
    \arrow[Rightarrow, "", from=1-1, to=1-2, harpoon]
\end{tikzcd}

Produces: image I expect something like the following: image

Similarly for hook: image As opposed to: image

And tail: image As opposed to: image

astoff commented 5 years ago

As to freely combining double arrows with other tips, this is not something tikz does automatically, and I am not sure it is a good idea to add some complicated logic to tikz-cd to do this. So it seems better to just add a few extra dedicated styles for double arrows in common usage.

Are the combinations you showed above standard notation in some field? Unicode doesn't have any of these. The only relevant variations of \Rightarrow I can find are \Leftrightarrow (⇔), \Mapsto (⤇), and \rightimply (⥰).

PS: The last example can be obtained with \arrow[r, equal, {Implies[reversed]}-Implies]

varkor commented 5 years ago

As to freely combining double arrows with other tips, this is not something tikz does automatically, and I am not sure it is a good idea to add some complicated logic to tikz-cd to do this.

Ah, I see. Yes, it's probably not worth going to the extra effort to support these if it's significantly more awkward to do so in tikz.

Are the combinations you showed above standard notation in some field?

I don't think I've come across them in practice (though I'm not very familiar with higher categorical notation, which is where I'd expect these to come up if anywhere). I noticed these because I'm writing a tool to edit commutative diagrams, which exports to tikz-cd, and saw that some of the results with Rightarrow were broken. I thought it would be worth reporting in case this was simply an oversight that could be fixed without too much effort.

(Some combinations already work well, such as maps to with Rightarrow.)

PS: The last example can be obtained with \arrow[r, equal, {Implies[reversed]}-Implies]

Ah, that's helpful, thank you!


Anyway, feel free to close this issue. I agree that these are rather niche variations and simply having some record of this edge case is sufficient without any concrete use-cases. Thanks!