4

I'm using the class beamer to prepare lectures. I want to make a reference to a formula given in last week's lecture, but I get only question marks.

Example input:

\documentclass[handout]{beamer}

\includeonlylecture{week 2}

\begin{document}

\lecture{lecture 1}{week 1}
\begin{frame}
  \begin{equation}
    \label{eq:test}
      1=1
  \end{equation}
\end{frame}

\lecture{lecture 2}{week 2}
\begin{frame}
  \begin{equation}
    \label{eq:test2}
      2=2
  \end{equation}
equation(\ref{eq:test}) and (\ref{eq:test2})
\end{frame}

\end{document}

equation number 1 is correctly counted when calculating the number for the second equation, but I did not manage to get acces to \ref{eq:test}.

Any hints?

thanks

Martin

1
  • 1
    I don't see anything obvious. Your best workaround for the moment might be to combine \lecture with \include and use \includeonly instead of \includeonlylecture. – Ulrich Schwarz Nov 9 '14 at 11:57
1

Assuming you compiled the slides from week one with the jobname "test", you could do

\RequirePackage{xr-hyper}
\documentclass[handout]{beamer}

\externaldocument{test}
\includeonlylecture{week 2}

\begin{document}

\lecture{lecture 1}{week 1}
\begin{frame}
  \begin{equation}
    \label{eq:test}
      1=1
  \end{equation}
\end{frame}

\lecture{lecture 2}{week 2}
\begin{frame}
  \begin{equation}
    \label{eq:test2}
      2=2
  \end{equation}
equation (\ref{eq:test}) and (\ref{eq:test2})
\end{frame}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.