leo-colisson / zx-calculus

A package to typeset ZX calculus directly in LaTeX.
13 stars 1 forks source link

Improve documentation: explain that hybrid arraws `\ar[to=bla]` are easier to use on large diagrams #2

Closed tobiasBora closed 8 months ago

tobiasBora commented 1 year ago

In my experience, while local arrows like \ar[dr] are practical for small diagrams, they turn out to be less practical to use when rewriting big graphs, since whenever a node is moved, all arrows pointing to it need to be changed. This is even less practical on arrows spanning multiples lines or columns as it is easy to forget to count one element. While it is also possible to specify both from and to, in my experience, what works best is to put the arrow where it is supposed to start (this way from is automatically detected), and use to to specify where it is supposed to end, using a (that is a shortcut for alias also adding some debugging style to display the name of the node), like in:

\begin{ZX}
  \zxX{} \ar[to=bar] & \zxZ[a=bar]{}
\end{ZX}

It would be nice to add a note on that in the documentation.