6

Using the titling package for a beamer class document results in an error even for the simplest possible setup (see example below). I did not find any documentation that would rule out using titling in a beamer class document. My question thus is:

  • Can you help me getting the titling package to work?

  • If not, are there good alternatives to make commands like \thetitle, \theauthor, \thedate available in a beamer document?

Description: The following MWE

\documentclass[10pt]{beamer}
\usepackage{titling} % 
% 
\title{Some title}
\author{A.N. Author}
\date{Some Day}
% 
\begin{document}
\frame{\titlepage}  
\end{document}

results in an error

! Undefined control sequence.

l.35 \if@titlepage

While the same code compiles fine when the titling package is not loaded. It also runs fine with the titling package when using the article class.

I am using pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) and compile in TeXStudio.

2
  • 3
    don't use this package with beamer. Beamer has its own commands and templates here. See e.g. 10.1 Adding a Title Page in the documentation, which points to \insertauthor etc. Commented Aug 7, 2019 at 9:44
  • 1
    Thanks Ulrike Fischer! Your answer is indeed what I looked for. Would you post it as an answer such that I can accept it? Commented Aug 8, 2019 at 13:12

1 Answer 1

2

You don't need the titlingpackage here, since title, authoretc. can be used by default.

\documentclass[10pt]{beamer}
% 
\title{Some title}
\subtitle{Some subtitle}
\author{A.N. Author}
\date{Some Day}
% 
\begin{document}
\frame{\titlepage}  
\end{document}

enter image description here

1
  • 3
    Sorry, but you do not answer the question. I indicated clearly that I would like to use the commands \theauthor, \thetitle, ... from the titling package. I am editing above to highlight this part of the question as code as should have done from the beginning. Commented Aug 8, 2019 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .