Wenn ich versuche, auf Abbildungen zu verweisen, z. B. „siehe Abbildung~\ref{lattice1}“, lautet die Ausgabe „Abbildung ??“. Habe ich es falsch beschriftet?

Wenn ich versuche, auf Abbildungen zu verweisen, z. B. „siehe Abbildung~\ref{lattice1}“, lautet die Ausgabe „Abbildung ??“. Habe ich es falsch beschriftet?
\documentclass{article}
 \begin{document}

\begin{figure} %

\begin{subfigure}[b]{0.30\textwidth}
\centering

\begin{tikzpicture}[
  decoration={
    markings,
    mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}
  }
]
\path[postaction={decorate}] (0,4) to (4,4);
\path[postaction={decorate}] (0,3) to (4,3);
\path[postaction={decorate}] (0,2) to (4,2);
\path[postaction={decorate}] (0,1) to (4,1);
\path[postaction={decorate}] (0,0) to (4,0);
\draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);
\draw [dashed] (0, 1.5) -- (4,1.5);
\draw [dashed] (0, 2.5) -- (4,2.5);
\end{tikzpicture} 
\label{lattice1}
\caption{A lattice of sources. Equation~(\ref{G01}) is the field generated by the central row.}
\end{subfigure} %
\begin{subfigure}[b]{0.30\textwidth}
\centering
\begin{tikzpicture}[
  decoration={
    markings,
    mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}
  }
]
\path[postaction={decorate}] (0,4) to (4,4);
\path[postaction={decorate}] (0,3) to (4,3);
\path[postaction={decorate}] (0,2) to (4,2);
\path[postaction={decorate}] (0,1) to (4,1);
\path[postaction={decorate}] (0,0) to (4,0);
\draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);
\draw [dashed] (1.25,0) -- (1.25,4);
\draw [dashed] (2.25,0) -- (2.25,4);
\end{tikzpicture}
\label{lattice2}
\caption{A lattice of sources. Equation~(\ref{F0}) is the field generated by the central column.}
\end{subfigure} %
\begin{subfigure}[b]{0.30\textwidth}
\centering
\begin{tikzpicture}[
  decoration={
    markings,
    mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}
  }
]
\path[postaction={decorate}] (0,4) to (4,4);
\path[postaction={decorate}] (0,3) to (4,3);
\path[postaction={decorate}] (0,2) to (4,2);
\path[postaction={decorate}] (0,1) to (4,1);
\path[postaction={decorate}] (0,0) to (4,0);
\draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);
\draw [dashed] (1.25,0) -- (1.25,4);
\draw [dashed] (2.25,0) -- (2.25,4);
\draw [dashed] (0, 1.5) -- (4,1.5);
\draw [dashed] (0, 2.5) -- (4,2.5);
\end{tikzpicture} 
\label{lattice3}
\caption{A lattice of sources. Equation~(\ref{G0}) is the field generated close to the central source.}
\end{subfigure} %
\label{lattice}

\end{figure}

\end{document}

Antwort1

Sie müssen Ihr Dokument zweimal zusammenstellen.

Beim ersten Mal werden Sie einige Dateien erstellen. Sie geben an, wo Sie Beschriftungen, Abschnitte usw. haben.

Beim zweiten Mal erscheint die Referenz

verwandte Informationen