0

cleveref package works well in my beamer frames, but when it comes to note pages. The tags work well and cleveref can refer to items outside the note page, but not to items inside it

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

\usecolortheme{wolverine}
\useoutertheme[]{split}
\useinnertheme{inmargin}

\setbeameroption{show notes}

\setbeamersize{description width=0mm}                       
\renewcommand{\encodingdefault}{T1}

\usepackage{cleveref}
\crefformat{equation}{Eq. (#1)}

\begin{document}

\begin{frame}{}

    \begin{block}{Derivation of Equivalent Impedance}

        \begin{description}[<+->]
            \item[Item 1] Item 1
            \item[Item 2] Item 2
                \note<.>{\begin{equation}e = m c^{2}\label{eq}\end{equation}\cref{eq} is what we want.}
            \item[Item 3] Item 3
                \begin{equation}e = m c^{2}\label{eqx}\end{equation}\cref{eqx} is what we want.
        \end{description}

    \end{block}\end{frame}

\end{document}
  • 2
    Can you make an example that is a bit more minimal? – user36296 Mar 19 at 21:42
  • It is shorter now – Al-Motasem Aldaoudeyeh Mar 19 at 21:52
  • 1
    I bet you could reduce the example to less than 20 lines and still reproduce the problem – user36296 Mar 19 at 21:55
  • 1
    Apparently, labels inside a \note don't find their way in the .aux file. It's not a problem specific with cleveref: also the standard \ref (without loading cleveref) has the same issue. – egreg Mar 19 at 22:19
  • Is there a way to fix it or does this require reimplementation of some low level cleveref or LaTeX macros? – Al-Motasem Aldaoudeyeh Mar 19 at 22:23
1

As a workaround you could place the note outside of the frame:

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

\usecolortheme{wolverine}
\useoutertheme[]{split}
\useinnertheme{inmargin}

\setbeameroption{show notes}

\setbeamersize{description width=0mm}                       
%\renewcommand{\encodingdefault}{T1}

\usepackage{cleveref}
\crefformat{equation}{Eq. (#1)}

\begin{document}

\begin{frame}<-2>[label=foo]

    \begin{block}{Derivation of Equivalent Impedance}

        \begin{description}[<+->]
            \item[Item 1] Item 1
            \item[Item 2] Item 2
            \item[Item 3] Item 3
                \begin{equation}e = m c^{2}\label{eqx}\end{equation}\cref{eqx} is what we want.
        \end{description}

    \end{block}\end{frame}

 \note{\begin{equation}e = m c^{2}\label{eq}\end{equation}\cref{eq} is what we want.}

 \againframe<3->{foo}    

\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.