beamer add tag
Arne (imported from SE)
Example: 

    \documentclass{beamer}
    
    \begin{document}
    
    \lecture{lecture 1}{week 1}
    \begin{frame}
    \end{frame}
    
    \begin{frame}
    see Lecture \ref{week 1}
    \end{frame}
    
    \end{document}

This yields 

![Rvuae.png](/image?hash=3a0da33e9d5cdf385c6fac65a101bb358be95b1f669a78e74bb039ee4d9bbca8)

yet it would be nice to have something like "see Lecture 'lecture 1'", so printing the title of the lecture with label "week 1".

Any ideas how to implement this? Ideally, this should be compatible with cross-referencing and `\includeonlylecture` as explained at [TeXSE](https://tex.stackexchange.com/questions/210287/reference-to-equation-from-other-lecture-in-class-beamer)

**Icing on the cake** would be the following: having a macro `\lectureref{label}`, where label is a `\label{}-label` on a frame within the scope of a `\lecture{}-lecture`.

  [1]: https://i.stack.imgur.com/Rvuae.png
Top Answer
samcarter
One can add the ability to `\nameref` a beamer lecture with this little trick:

```
\documentclass{beamer}

\makeatletter
\AtBeginLecture{
  \phantomsection
  \protected@edef\@currentlabelname{\beamer@lecturename}
  \label{\beamer@currentlecturelabel}
}
\makeatother

\begin{document}

\lecture{lecture 1}{weeka}

\begin{frame}
see Lecture \nameref{weeka}
\end{frame}

\end{document}
```

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.