In this MWE of a flowchart, it doesn't compile when \chainin command is used and I need to understand the following:
align=centerdoesn't center the content of the node, for example,(m-2-1).- How can I break the line inside any of the matrix nodes since using
\\makes the compilation run for a long time? - How can I join between
(m-3-1)and(m-1-2)in such a way that the join goes to the right until the midway, then vertically to the left of(m-1-2)then right? - When using
\chainincommand, I got an error:Undefined control sequence. \chainindespite loadingchainslibrary.
I already drew this flowchart without chains, but I need to know if it is possible with it or not.
\RequirePackage{luatex85}
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,chains, positioning,matrix,shapes}
\begin{document}
\begin{tikzpicture}[
every node/.style={draw,rectangle,align=center},
every join/.style=latex,
join
]
\matrix (m) [matrix of nodes,column sep=5mm,row sep=5mm]{
{1\\new line} & 4\\
2 & 5\\
3 & 6\\
};
{ [start chain]
\chainin (m-1-1);
\chainin (m-2-1);
\chainin (m-3-1);
\chainin (m-1-2);
\chainin (m-2-2);
\chainin (m-3-2);
}
\end{tikzpicture}
\end{document}

text widthfor matrix nodes, see https://tex.stackexchange.com/a/112726/586 – Torbjørn T. May 06 '17 at 17:39\chainincommand as I said in my question body, and I need to understand why it fails. – Diaa May 06 '17 at 17:41text width, and then the text is centered in the nodes. – Torbjørn T. May 06 '17 at 17:42text widthfixed my first two issues. – Diaa May 06 '17 at 17:44\\didn't work at all withouttext width.) Anyways, I'm nochainsexpert, but I think perhaps there has to be something on the chain already for\chaininto work. Someone else will probably be able to answer though. – Torbjørn T. May 06 '17 at 17:48:). Thanks for your help. – Diaa May 06 '17 at 17:49