Closed varkor closed 1 year ago
Thank you for the opinion. I am not sure what would be the expected behaviour here - so far, I made sure that nfold
matches /tikz/double
as closely as possible. What is your opinion on a second key, like scaling nfold=5
?
Since Rightarrow
increases the width of the arrow over an ordinary arrow, I'd expect nfold=n
to increase the width of the arrow too (especially because for high n
, the arrows look very crowded without increasing the distance). But from a usability perspective, having an option to enable scaling would be fine too – it still means the user doesn't have to manually calculate the appropriate distance
themselves. So whichever option you feel is more appropriate :)
I have added a key /tikz/scaling nfold
in the current pre-relase:
\begin{tikzcd}
a \ar[r, Mapsto, bend left, scaling nfold=3] &
b \ar[d, Rightarrow, nfold, "\alpha", "\beta"’] \\
c \ar[r, Mapsfrom, scaling nfold=4, "\gamma" near end] &
d
\end{tikzcd}
Feel free to test this pre-release.
Making this scaling behaviour global for the key /pgf/nfold
would be quite messy and require lots of changes to the rendering pipeline which likely would not be stable. Furthermore, giving different scaling behaviour to the keys /tikz/nfold
and /pgf/nfold
would be quite unexpected to me. However, I am open to suggestions for better names for either of these keys.
I finally got around to testing this, and it works perfectly. Thanks for the addition!
At the moment,
double distance
is the default regardless of thenfold=n
parameter. In practice, it usually makes the most sense to scale the arrows so that the distance between the lines is constant. It would be nice ifnfold
would automatically setdouble distance
proportionally to the number of lines.