Can I use TikZ's own tools to make a line break in the matrix cells or do I have to use a tabular-environment or a \parbox?
MWE (doesn't work, I included the faulty code)
\documentclass[
11pt
]{scrartcl}
\usepackage{
tikz,
relsize,
tgheros
}
\usetikzlibrary{
calc,trees,shadows,positioning,arrows,chains,
decorations.pathreplacing,
decorations.pathmorphing,
decorations.shapes,
decorations.text,
shapes,
shapes.geometric,
shapes.symbols,
matrix,
patterns,
intersections,
fit
}
\pgfdeclarelayer{background layer}
\pgfdeclarelayer{foreground layer}
\pgfsetlayers{background layer,main,foreground layer}
\tikzset{
>=latex,
line/.style={draw, thick, ->},
phase/.style={
text height=1.5ex,
text depth=0ex,
align=left,
anchor=center,
% text width=6cm,
font=\sffamily\bfseries\small,
rectangle,
minimum height=1.0cm,
draw=black,
very thick,
fill=black!40
}
}
\begin{document}
\begin{center}
\begin{tikzpicture}[font=\sffamily\small,node distance=0.5cm]
\matrix (m) [
matrix of nodes,
nodes in empty cells,
row sep=6mm,
column sep=3mm,
inner sep=7pt
] {
%
|[phase]| This should include\\a line break\\
|[phase], align=center| Here should be a line\\break as well.
};
\end{tikzpicture}
\end{center}
\end{document}

text width, adjust theminimum heightand use{This should include a \\ line break}– Apr 02 '14 at 08:50|...|syntax hence I thought of the duplicate since that makes the question independent from matrix nodes. – percusse Apr 02 '14 at 09:32|...|enables on to write text in nodes like this in matrices, but not in usual TikZ graphics. – henry Apr 02 '14 at 09:41