So I've used the wonderful tool "tikz-cd editor": https://tikzcd.yichuanshen.de/ I am also using Overleaf for what it's worth.
\arrow[rr, "\digamma"]
versus
\arrow[r, "\digamma"]
I'm guessing what this does is "right | right" instructions, rather than "right" a single time as we might expect from the latter.
My document appears as follows:
If so, given:
\begin{tikzcd} \rho_i \arrow[rr, "\mathcal{F}"] & & \mu_i \arrow[rr,
"\digamma"] & & S_i \arrow[rr, "\mathscr{F}"] & & \mathfrak{R}
\end{tikzcd}
$$\\ \\ \\ \\ \\ \mathfrak{A}$$
Also, how does [swap] command work for "swapping" the side of the arrow which text appears on (left hand side of the direction of the arrow is the default position for arrow labels to be placed).
I would like to have \mathfrak{A}
be directly below the arrow labelled by \mathscr{F}
.
I find myself facing a nasty mess if I change any of these "rr
" to "r
".
Is this because there are "& &
" also used, and the "rr" requires "&&
"?
Does "rr
" do anything special here, or does it default to behaving like "r
" in the absence of "r
" paired with "&
"? (e.g. unless an arrow of length 1 is defined in the same diagram, arrows of length 2 will be scaled down to length 1).
Just another example of the code outputted by the tool:
\begin{tikzcd} A \arrow[dd, tail] \arrow[rddd, bend left=49] \arrow[r,
dashed] & B \arrow[rr] \arrow[rrd, bend left] \arrow[rddd, bend
left=49] & & A:B \arrow[d] \\
& & & B^A \\ A' \arrow[rd]
\arrow[rrru, bend left] &
& & \\
& {P[A||B]} \arrow[r, dashed] &
{Q[A|A']} \arrow[ruu, bend right] & \end{tikzcd}
Is the general gist that the "&
" tells TikZ-cd where to put a blank area for the arrows to zoom through, and any mismatch will cause chaos?
From my perspective, the layout of the above code doesn't really resemble a matrix/2d array very clearly at all.
Does anyone have guidance for interpreting and deciphering the markup for these diagrams/diagram instructions, or is this obfuscation largely dependant upon the particular tool (and how machines may write it versus how humans would tend to)?
There are plenty of other TikZ GUI tools, and I will eventually migrate (and learn to draw manually), though for now I'm in a bit of a pinch.
Also, I've noticed there's a fair few questions of the format "What exactly does [SOMETHING] and [OTHERTHING] do?". I could ask this in a metaTeXSX post but I'm guessing this is a fine format for asking?
Would it be better if I split this into two questions, one about "rr
" vs "r
", and one about [swap]
: labeling under and above the arrows of length "rr
"?
&
separates cells on each row of the grid.\arrow
want to draw an arrow from the cell it is placed in to another cell. The most convenient way to specify this is relative to where we are now. Sorr
means make an arrow from the current cell to the cell two steps to the right.dl
means arrow to the cell that is one cell down and one cell to the left.tikz-cd
uses a TikZmatrix of nodes
and the&
have the same role as in any other matrix or table: it separates cells, as @daleif says.swap
just swaps the position of the label, if it was original on one side of the arrow,swap
will move it to the other.