[Tex/LaTex] Author name does not print on Beamer titlepage

authorbeamertitles

I am making a Beamer presentation, and for some reason the author name does not show on the titlepage. I have searched the forum and found many related threads, but none of them seem to have a problem as simple as this one. Here is my preamble, (I would make it more minimal, but as often is the case, I don't know what information might be relevant, what packages might interfere, etc.)

Any ideas?

\documentclass{beamer}
\usefonttheme[onlymath]{serif}
\usetheme{CambridgeUS}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{tipa}
    \usepackage{eurosym}
\usepackage{wasysym}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{graphics}
\usepackage{linguex}
\usepackage{cgloss4e}
\usepackage{authblk}
\usepackage{csquotes}
\usepackage{xspace}
\usepackage{color}
\usepackage{xyling}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{phonetic}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[backend=biber, style=authoryear-comp]{biblatex}
 \let\eachwordone\itshape
\addbibresource{ref2.bib}

% \strikeout{text}: prints a struck-out version of #1
\newlength{\howlong}
\newcommand{\strikeout}[1]{
 \settowidth{\howlong}{#1}%
 #1\unitlength0.5ex%
 \begin{picture}(0,0)
 \put(0,1){\line(-1,0){\howlong\divide\unitlength}}
 \end{picture}%
}

\setbeamertemplate{headline}{%
\leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette quaternary}%
    \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
    \end{beamercolorbox}%
  }
}

\setbeamertemplate{footline}
{%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
        leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
        \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
        \hfill%
        \leavevmode{\usebeamerfont{title in head/foot}\insertshorttitle}%
        \hfill%
        {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
}

\setbeamercovered{transparent=30}
\beamertemplateballitem

\title{XXX}
\subtitle{YYY}
\author{Batman}
\institute{ZZZ}
\date{\today}

\newcommand{\textunderscript}[1]{$_{\text{#1}}$}

\begin{document}

\frame{\titlepage}

....

\end{document}

Best Answer

It seems that authoblk package you load is clashing with what you want to achieve.

I found the clash trying to create an MWE from your code, i.e. commenting out all the packages one by one and compiling to see which ones are needed to run the code.

For example, beamer loads the graphics package automatically, so it's not needed.

\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\setbeamertemplate{headline}{%
\leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette quaternary}%
    \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
    \end{beamercolorbox}%
  }
}

\setbeamertemplate{footline}
{%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
        leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
        \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
        \hfill%
        \leavevmode{\usebeamerfont{title in head/foot}\insertshorttitle}%
        \hfill%
        {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
}

\setbeamercovered{transparent=30}
\beamertemplateballitem

\title{XXX}
\subtitle{YYY}
\author{Batman}
\institute{ZZZ}
\date{\today}

\begin{document}

\frame{\titlepage}

\end{document}