3

Given the following:

\lecture{Shortname}{Longname}{Label}

\begin(frame}
  \titlepage
\end{frame}

How does beamer infer to insert the first argument of \lecture to be the title used in \titlepage?

I've searched my texlive installation (texlive-beamer-svn36461.3.36-24.fc24.1.noarch) but couldn't find where or how \beamer@shortlecturename is turned into \inserttitle?

What I would like to accomplish is that Longname is used in \titlpage instead of Shortname.

Update:

Turns out \lecture is not the culprit here. An MWE of what I'm actually doing looks like this:

\documentclass{beamer}

\newcommand{\titlestring}{Title}

\title{\titlestring}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\renewcommand{\titlestring}{Topic}

\lecture[\titlestring]{\titlestring, YYYY-MM-DD}{Label}

\begin{frame}
  \titlepage
\end{frame}

\end{document}

What I still don't get is why \titlpage picks up the changed \titlestring.

regnirpsj
  • 195
  • 1
    I can't seem to replicate your current setup. Not only are you using incorrect notation - \lecture[<short>]{<long>}{<label>} - but the default beamer theme doesn't include <shortname> as part of the \titlepage. – Werner Oct 14 '16 at 20:48
  • @Werner, you're right. I've added an MWE to the original question. – regnirpsj Oct 14 '16 at 21:26

1 Answers1

1

\titlepage picks up the changed \titlestring because you changed \titlestring; it's as simple as that. If you wish \titlepage to instead use \titlestring, YYYY-MM-DD, you can update \inserttitle manually using

\renewcommand{\inserttitle}{\titlestring, YYYY-MM-DD}

Here is a complete minimal example showing the redefinition of \title.

enter image description here

\documentclass{beamer}

\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764
\newcommand{\titlestring}{Title}

\title{\strut\titlestring}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\renewcommand{\titlestring}{Topic}

\lecture[\titlestring]{\titlestring, YYYY-MM-DD}{Label}

\title{\strut\titlestring, YYYY-MM-DD}

\begin{frame}
  \titlepage
\end{frame}

\end{document}

The \struts adde to the \title ensure a consistent baseline and avoids jumping between the frames/pages (may be specific to your example, as it won't be noticeable if the \titlepages are consecutive.

Werner
  • 603,163