0

I am just getting started with LateX, but i got an due date tomorrow. When i compile my LateX file i get this error: ! LaTeX Error: \caption outside float. You can find my code below.

\begin{tikzpicture}[>=DIN]
\draw[->] [thick] (1, 2) -- (2,0);
\draw[->] (0, 0.8) -- (1.6,0.8);
\draw[->] [thick] (1, -2) -- (2,0);
\draw[->] [thick] (3, -2) -- (4,0);
\draw[->] [thick] (3, 2) -- (4,0);
\draw[->] [thick] (5, 2) -- (6,0);
\draw[->] [thick] (5, -2) -- (6,0);
\draw[->] [very thick] (0, 0) -- (7,0);
\node[right] at (7,0) {Problem};
\node[above] at (1,2) {Haupteinflussgröße};
\node[left] at (0, 0.8) {Nebeneinflussgröße};
\end{tikzpicture}
\caption{ishikawa}
\label{Ishikawa}
\end{center}
Phil
  • 13

1 Answers1

3

Try the following structure. It seems like you forgot to surround the tikz with a figure (a float). Btw, [...] is a placeholder for code.

[...]

\usepackage{float} % for [H]

[...]

\begin{figure}[H] \centering \begin{tikzpicture} [...] \end{tikzpicture} \caption{caption} \label{label} \end{figure}