I prefer the cases
environment of amsmath
. Furthermore, it is advisable to add the word "if" to the conditions:
\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{equation}
a_{i,j} =
\begin{cases}
a_{i,j}+1 & \text{if $b_{i}=1$ and $c_{j}=0$}\\
a_{i,j}-1 & \text{if $b_{i}=0$ and $c_{j}=1$}\\
a_{i,j} & \text{if $b_{i}=0$}
\end{cases}
\end{equation}
\end{document}
![enter image description here](https://i.stack.imgur.com/ZPAwO.png)
Well, this one was a little strange but I think I know what is happening. Let me take a brief detour: Consider the following construction
\draw (0,0) -- (1,1) node (a) {A};.
What we expect from this piece of code is to put a node after the main path is created. Notice that the node has no idea of the nature of the path. Even if we use [pos=0.xx]
it just looks for the last available path so there is no organic connection between the node placement and the path creation.
It turns out that edge
is a to
operation added in a similar manner without any relation whatsoever to the main path constructed before that. Another example (zoomed in)
\begin{tikzpicture}
\path[->,
draw,
line width=1mm % To make the arrowhead bigger
] (0,0);
\end{tikzpicture}
![enter image description here](https://i.stack.imgur.com/0kOWg.png)
So, an arrowhead with a path of zero length. Same happens with the edge if we dissect one of your paths
\path [line] (leftrow1.two north) % This is the main path as the example above
edge[out=90, in=90] node {}(tripletoprow); % This is added afterwards without the
% line option in place creating the
% illusion that the path is having
% a disconnected arrowhead
so shorten makes things even worse because it's shortening a zero length path taking the arrowhead even further. Once we get the problem right, then, it's easy to fix the problem via shifting the line
option to the edge
;
\documentclass[preview,tikz,border=3mm]{standalone}
\usetikzlibrary{shapes, arrows}
\tikzset{line/.style={draw, latex'-},
seq/.style={rectangle split, rectangle split horizontal, rectangle split parts=#1, draw}
}
\begin{document}
\begin{tikzpicture}
\node [seq=3] (leftrow1) at (0cm, 4cm){};
\node [seq=3] (tripletoprow) at (4cm, 4cm){};
\path (leftrow1.two north) edge[out=90, in=90,line] (tripletoprow);
\end{tikzpicture}
\end{document}
![enter image description here](https://i.stack.imgur.com/W40XK.png)
Also see the manual for the \tikztonodes
operation to avoid the extra node{}
before the target point.
Best Answer
One option using a
matrix
; anarray
could also be used, but withmatrix
you don't have to specify the number and format of columns:As has been noted, the vertical space around the arrows seems a little uneven: there's more space above the arrows than below them, so one can easily fix it:
Just for the record, the
array
version: