I use clrscode package and when I put at the same page this second caption of figure
Code: Select all
\begin{figure}[ht]
\begin{codebox}
\Procname{$\proc{Dijkstra}(G,w,s)$}
\li $\proc{Initialize-Single-Source}(G,s)$
\li $S \gets \emptyset $
\li $Q \gets V[G]$
\li \While $Q\neq \emptyset$
\li \Do $u \gets \proc{Extract-Min}(Q)$
\li $S \gets S \cup \{u\}$
\li \For każdy wierzchołek $v\in Adj[u]$
\li \Do $\proc{Relax}(u,v,w)$
\End
\End
\end{codebox}
\caption{Algorytm Dijkstry\label{Dijkstra} \cite{Cormen}}
\end{figure}
\begin{figure}[ht]
\caption{A picture of a tucan.\label{ISS}}
\begin{codebox}
\Procname{$\proc{Initialize-Single-Source}(G,s)$}
\li \For każdy wierzchołek $v\in V[G]$
\li \Do $d[v] \gets \infty$
\li $\pi [v] \gets NIL$
\End
\li $d[s] \gets 0$
\end{codebox}
\end{figure}
Code: Select all
pdfTex warning (ext4): destination with the same identifier (name{figure.0.3}) has been already used, duplicate ignored
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi