The text inside the nodes is not streched to the right side of the node by using \hfill
.
Could it be the reason that it doesn't work with font=\tiny
? But I need the text that small and I would like that the explanation text is at the right side inside the node and the short term like Frg 1
is on the left side inside the node.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,shadows,arrows,backgrounds,fit,matrix}
\begin{document}
\begin{figure} [H]
\begin{tikzpicture}
[font=\tiny,
pfeil/.style ={draw,->,shorten <=0pt,>=stealth', thick, -latex',shorten >=0pt},
stext/.style ={draw,solid, fill=gray!10, text width=25em,minimum height=1em, drop shadow, rounded corners},
snr/.style ={drop shadow,fill=gray!10,draw,solid,circle,minimum width=4mm,inner sep=0pt},
every matrix/.style ={matrix of nodes, row sep=1mm, column sep=3mm,fill=gray!40,draw=black,dashed,rounded corners,inner sep=2mm}]
\newcommand{\beschr}[1]{\hfill\textit{#1}};
\matrix (einlegen)
{
\node (e11) {}; & \node (e12) [snr] {1.}; & \node (e13) [stext] {Frg 1\beschr{Freigabe Einfahrt Bauteil}}; \\
\node (e21) {}; & \node (e22) [snr] {2.}; & \node (e23) [stext] {MZ 11 V\beschr{Sauger ein}}; \\
\node (e31) {}; & \node (e32) [snr] {3.}; & \node (e33) [stext] {Frg 2\beschr{Freigabe Ausfahrt Bauteil}}; \\
};
\node [fit=(e11)(e31),label={[rotate=90,xshift=1mm]center:\textbf\tiny{Einlegen}}] {};
\matrix (arbeitsstellung) [below=.3cm of einlegen]
{
\node (a11) {}; & \node (a12) [snr] {4.}; & \node (a13) [stext] {MZ 12 V\beschr{Spanner Innenblech vorw\"arts}}; \\
\node (a21) {}; & \node (a22) [snr] {5.}; & \node (a23) [stext] {M1 \& M2 V\beschr{B\"ugel M1 \& M2 vorw\"arts}}; \\
\node (a31) {}; & \node (a32) [snr] {6.}; & \node (a33) [stext] {M3 \& M6 V\beschr{B\"ugel M3 \& M6 vorw\"arts}}; \\
\node (a41) {}; & \node (a42) [snr] {7.}; & \node (a43) [stext] {M4 \& M5 V\beschr{B\"ugel M4 \& M5 vorw\"arts}}; \\
\node (a51) {}; & \node (a52) [snr] {8.}; & \node (a53) [stext] {MZ 13 V\beschr{Klemmeinheit l\"osen}}; \\
\node (a61) {}; & \node (a62) [snr] {9.}; & \node (a63) [stext] {MZ 14 V\beschr{Niederhalteraufnahme vorw\"arts}}; \\
\node (a71) {}; & \node (a72) [snr] {10.};& \node (a73) [stext] {MZ 15-19 V\beschr{Niederhalteraufnahmen vorw\"arts}}; \\
\node (a81) {}; & \node (a82) [snr] {11.};& \node (a83) [stext] {MZ 21-22 V\beschr{Niederhalterzustellungen vorw\"arts}}; \\
\node (a91) {}; & \node (a92) [snr] {12.};& \node (a93) [stext] {MZ 23-24 V\beschr{Niederhalterzustellungen vorw\"arts}}; \\
\node (a101) {}; & \node (a102) [snr] {13.};& \node (a103) [stext] {MZ 20 V\beschr{Sperrventil vorw\"arts}}; \\
};
\node [fit=(a11)(a101),label={[rotate=90]center:\textbf\tiny{Falze in Arbeitsstellung}}] {};
\begin{scope} [every path/.style=pfeil]
\path (e33) -- (a13);
\end{scope}
\end{tikzpicture}
\end{figure}
matrix of nodes
, you just need to includenode text
in every position. Instead of\node (a22) [snr] {5.};
just5.
. With this syntax, every node is namedmatrix name-row-column
. If you need to change any option can use|[options list]| node text
...column 1/.style={nodes={anchor=base}}, column 2/.style={nodes={snr}},column 3/.style={nodes={stext}}},nodes in empty cells
toevery matrix
style. With this syntax,einlegen
matrix could be written with\matrix (einlegen) { & 1. & {Frg 1\beschr{Freigabe Einfahrt Bauteil}}\ & 2. & {MZ 11 V\beschr{Sauger ein}}\\ & 3. &{Frg 2\beschr{Freigabe Ausfahrt Bauteil}}\\};
labels
, regular nodes are OK. You don't needfit
to place them because you can use any matrix internal node to place it, something like\node [rotate=90,] at ([ xshift=1mm]einlegen-2-1) {\textbf\tiny{Einlegen}};
could be enough.