I am pretty new in this forum. It's my first post. So I hope I don't break any rules or so.
My Question is: I have an equation, which contains already a pics, because I wanted to mark some stuff in my equation. Now I want to underbrace some parts of my equation but I can't put the brace on the right spot, even if I change the coordinates. The code for the equation is given below.
Thank You for your help!
\documentclass{scrreprt}
\usepackage{amsmath,bm}
\usepackage{tikz}
\usetikzlibrary{arrows,matrix,positioning,decorations.pathreplacing}
\begin{document}
\begin{equation}
\bm{Bu}=
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)},vertex/.style={anchor=base,
circle,fill=black!25,minimum size=18pt,inner sep=2pt}]
\matrix [matrix of math nodes,left delimiter={[},right delimiter={]}] (m)
{
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
\times & \times & \times & \times \\
\times & \times & \times & \times \\
\times & \times & \times & \times \\
\times & \times & \times & \times \\
};
\draw[color=red] (m-1-3.north west) -- (m-1-3.north east) -- (m-8-3.south east) -- (m-8-3.south west) -- (m-1-3.north west);
\end{tikzpicture}
\begin{tikzpicture}[baseline={([yshift=-.5ex]current bounding box.center)},vertex/.style={anchor=base,
circle,fill=black!25,minimum size=18pt,inner sep=2pt}]
\matrix [matrix of math nodes,left delimiter=(,right delimiter=)] (m)
{
0 \\
0 \\
\times \\
0 \\
};
\draw[color=red] (m-3-1.north west) -- (m-3-1.north east) -- (m-3-1.south east) -- (m-3-1.south west) -- (m-3-1.north west);
\end{tikzpicture}
\begin{tikzpicture}
\draw [thick, black,decorate,decoration={brace,amplitude=10pt,mirror},xshift=0.4pt,yshift=-0.4pt](0,10) -- (10,10) node[black,midway,yshift=-0.6cm] {\footnotesize $Form aus der\\Literatur$};
\end{tikzpicture}
=
\underbrace{
\begin{pmatrix}
0 \\ 0 \\ 0 \\ 0 \\ \times \\ \times \\ \times \\ \times
\end{pmatrix}
\times}_{\substack{\text{Ausgabe aus} \\ \text{Simpack}}}
\label{eq:problem-state}
\end{equation}
\end{document}