I have tried several approaches to solve my problem but unfortunately none successful yet. I can not find documentation mentioning how to solve this particular case. My problem is that I am using a subfigure in beamer and I am trying to create multiple \ref points before the \label appear in the same figure. When compiling the .tex document only one reference point appears and the rest are appearing as ??. Is there any possible solution to my problem?
EDIT: The code I'm using
\documentclass[xcolor=pdftex,dvipsnames,table]{beamer}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{caption}
\usepackage{subcaption}
\mode<presentation>
\setbeamertemplate{caption}[numbered]
\begin{document}
\begin{frame}
\begin{columns}[t]
\begin{column}[T]{5cm}
\begin{itemize}
\item<+-| alert@+> 1~\autoref{1}
\item<+-| alert@+> 2~\autoref{2} etc
\end{itemize}
\end{column}
\begin{column}[T]{5cm}
\begin{figure}
\only<1>{\begin{subfigure}[b]{1.0\linewidth}
\caption{sub caption 1}
\label{1}
\includegraphics[width=7.0cm,height=5cm]{fig 1}
\end{subfigure} }
\only<2>{\begin{subfigure}[b]{1.0\linewidth}
\caption{sub caption 2}
\label{2}
\includegraphics[width=5.5cm,height=5cm]{fig 2}
\end{subfigure} }
\caption{main}
\protect\label{3}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\end{document}
– Thanos Oct 09 '13 at 23:06\begin{frame} \begin{columns}[t] \begin{column}[T]{5cm} \begin{itemize} \item<+-| alert@+> 1~\autoref{1} \item<+-| alert@+> 2~\autoref{2} etc \end{itemize} \end{column} \begin{column}[T]{5cm} \begin{figure} \only<1>{\begin{subfigure}[b]{1.0\linewidth} \caption{c} \label{1} \includegraphics[width=7.0cm,height=5cm]{fig 1} \end{subfigure} } \only<2>{\begin{subfigure}[b]{1.0\linewidth} \caption{caption 2} \label{2} \includegraphics[width=5.5cm,height=5cm]{fig 2} \end{subfigure} } etc \caption{main} \protect\label{3} \end{figure} \end{column} \end{columns} \end{frame}– Thanos Oct 09 '13 at 23:22\usepackage{hyperref} %\Url Links \usepackage{cleveref} \usepackage{caption} %caption for figures \usepackage{subcaption} %subfigures
Again thank you in advance for your time and effort replying to my question.
– Thanos Oct 09 '13 at 23:26\labeland the rest are ignored.@Herbert I did run the document twice...but the problem is that it only reads only one
– Thanos Oct 10 '13 at 09:05\label, the first one, the rest are ignored.\documentclassand up to\end{document}with the necessary packages to replicate the problem. You can use the edit button under the question to add the details. – percusse Oct 10 '13 at 09:521athe second produces??. Thank you again for your time and effort. – Thanos Oct 10 '13 at 10:16subfigure: I'll take a look at thebeamercode and see if I can understand this a bit more – Joseph Wright Oct 11 '13 at 09:03subfigurecan only see one reference point and miss the rest, you think is a problem withbeamer? I appreciate that you spend some time with my problem. – Thanos Oct 12 '13 at 19:20