3

Following e.g., this link https://tex.stackexchange.com/a/58377/114622 I found out and tested in other presentations \title[what comes on subsequent slides]{what is the title on the title slide}

However, in a template this is not happening. It will always show the title in {} on following pages.

How can I add this []-title feature back to the template?

The template in question:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% unix Beamer Style
% 2018-09-06
% 

\RequirePackage{calc}
\RequirePackage{etoolbox}

\mode<presentation>

\newdimen\beamer@uxBorderHeight
\newdimen\beamer@uxTitleHeight
\newdimen\beamer@uxFooterHeight
\newdimen\beamer@uxOverlap

\beamer@uxOverlap=0.2pt
\beamer@uxBorderHeight=0.015\paperheight
\beamer@uxTitleHeight=0.185\paperheight
%DEFAULT: 
%\beamer@uxTitleHeight=0.125\paperheight
\beamer@uxFooterHeight=0.032\paperheight

\definecolor{uxRed}{HTML}{E6002E}
\definecolor{uxGrey}{RGB}{217,217,217}

\ProcessOptionsBeamer

\setbeamercolor{normal text}{fg=black}
\setbeamercolor{alerted text}{fg=uxRed}
\setbeamercolor{itemize item}{fg=uxRed}
\setbeamercolor{itemize subitem}{fg=uxRed}
\setbeamercolor{example text}{fg=black}
\setbeamercolor{structure}{fg=black}
\setbeamercolor{date in title page}{fg=black}

% set fonts
\RequirePackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}

\usefonttheme[onlymath]{serif}
\RequirePackage{iftex}
\ifPDFTeX
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\fi



\setbeamerfont*{structure}{series=\bfseries}
\setbeamerfont*{title}{size*={18}{22}}
\setbeamercolor*{title}{bg=uxRed}
\setbeamerfont*{subtitle}{size*={18}{22}}
\setbeamerfont*{author}{size*={10}{12},series=\bfseries}
\setbeamerfont*{institute}{size*={10}{12}}
\setbeamerfont*{frametitle}{size*={18}{22}}
\setbeamercolor*{frametitle}{fg=uxRed}
\setbeamerfont*{framesubtitle}{size*={18}{22}}
\setbeamercolor*{framesubtitle}{fg=black}
\setbeamerfont*{date}{size*={8}{10}}
\setbeamerfont*{headline}{size*={8}{10}}
\beamertemplatenavigationsymbolsempty

\defbeamertemplate*{title page}{unix}{%
  % list trick from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=chngmargonfly
  \begin{list}{}{
  \setlength{\listparindent}{\parindent}%
  \setlength{\itemindent}{\parindent}%
  \setlength{\parsep}{\parskip}%
  \setlength{\leftmargin}{0pt}%
  \setlength{\rightmargin}{0pt}}
  \item[]
  \vspace*{\stretch{2}}
  {\usebeamerfont*{title}\color{uxRed}\inserttitle\par} % no idea why usebeamercolor{title} does not work here
  {\usebeamerfont*{subtitle}\insertsubtitle\par}
  \vspace{\stretch{1}}
  {\usebeamerfont{author}\insertauthor\par}
  {\usebeamerfont{date}\insertdate\par}
  \vspace*{\stretch{2}}
  \end{list}
%  \end{minipage}
}

\defbeamertemplate*{background canvas}{unix}{%
\begin{minipage}[t]{\paperwidth+10pt}
   \setlength{\baselineskip}{0pt}
   \setlength{\lineskip}{-\beamer@uxOverlap}
   \setlength{\parskip}{0pt}
   \ifnumgreater{\c@framenumber}{1}{
    \raisebox{-\height-2\beamer@uxBorderHeight}[0pt][0pt]{\hspace*{0.86\paperwidth}\includegraphics[width=0.125\paperwidth]{uxlogo.pdf}}
   }{}
   
      \ifnumgreater{\c@framenumber}{2}{
        \ifdefempty{\insertframesubtitle}{
          \rule{0pt}{6ex+\beamer@uxTitleHeight}\\
          \color{white}\rule{\paperwidth}{\paperheight-\beamer@uxTitleHeight-\beamer@uxFooterHeight-6ex}
        }{
          \rule{0pt}{6ex+2\beamer@uxTitleHeight}\\          
          \color{white}\rule{\paperwidth}{\paperheight-2\beamer@uxTitleHeight-\beamer@uxFooterHeight-6ex}   
        }
   }{}
   

  \end{minipage}
}

\defbeamertemplate*{headline}{unix}{% 
    \ifnumgreater{\c@framenumber}{2}{
      \vspace{3.5ex}
      \hspace{4.5ex}\inserttitle
    }{}
}

\defbeamertemplate*{frametitle}{unix}{
\begin{minipage}[b]{\textwidth}
\vspace{0.5ex}
\raggedright
\vspace{3.5ex}
{\insertframetitle\par}
{\usebeamerfont{framesubtitle}\usebeamercolor*{framesubtitle}\insertframesubtitle}
\end{minipage}
}


% set bullets

\defbeamertemplate*{itemize item}{unix}{$\bullet$}
\defbeamertemplate*{itemize subitem}{unix}{$\bullet$}
\setbeamersize{text margin left=4ex}
\setbeamersize{text margin right=4ex}

\AtBeginDocument{
  \begin{frame}
    \vspace*{\stretch{1}}
    \begin{center}
  

    \end{center}

    \vspace*{\stretch{1}}
  \end{frame}
}

\mode<all>
0

1 Answer 1

4

Your template uses \inserttitle in the headline. If you want it to insert the short title, you can use \insertshorttitle instead (if no short title is given, this will automatically fall back to the full title).

Please note that setting the headline conditionally with \ifnumgreater{\c@framenumber}{2}{}{} is a spectacularly bad idea, because beamer calculates the frame geometry at the start of the document and thus assumes a wrong height of the headline. A bit less bad would be to test if the framenumber is 1, but ideally you'll remove this test completely and instead either use the plain frame option for the first frame or use a special headline e.g. for the title page using the same trick as in https://topanswers.xyz/tex?q=1004#a1198 .

\documentclass{beamer}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% unix Beamer Style
% 2018-09-06
% 

\RequirePackage{calc}
\RequirePackage{etoolbox}

\mode<presentation>

\newdimen\beamer@uxBorderHeight
\newdimen\beamer@uxTitleHeight
\newdimen\beamer@uxFooterHeight
\newdimen\beamer@uxOverlap

\beamer@uxOverlap=0.2pt
\beamer@uxBorderHeight=0.015\paperheight
\beamer@uxTitleHeight=0.185\paperheight
%DEFAULT: 
%\beamer@uxTitleHeight=0.125\paperheight
\beamer@uxFooterHeight=0.032\paperheight

\definecolor{uxRed}{HTML}{E6002E}
\definecolor{uxGrey}{RGB}{217,217,217}

\ProcessOptionsBeamer

\setbeamercolor{normal text}{fg=black}
\setbeamercolor{alerted text}{fg=uxRed}
\setbeamercolor{itemize item}{fg=uxRed}
\setbeamercolor{itemize subitem}{fg=uxRed}
\setbeamercolor{example text}{fg=black}
\setbeamercolor{structure}{fg=black}
\setbeamercolor{date in title page}{fg=black}

% set fonts
\RequirePackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault}

\usefonttheme[onlymath]{serif}
\RequirePackage{iftex}
\ifPDFTeX
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\fi



\setbeamerfont*{structure}{series=\bfseries}
\setbeamerfont*{title}{size*={18}{22}}
\setbeamercolor*{title}{bg=uxRed}
\setbeamerfont*{subtitle}{size*={18}{22}}
\setbeamerfont*{author}{size*={10}{12},series=\bfseries}
\setbeamerfont*{institute}{size*={10}{12}}
\setbeamerfont*{frametitle}{size*={18}{22}}
\setbeamercolor*{frametitle}{fg=uxRed}
\setbeamerfont*{framesubtitle}{size*={18}{22}}
\setbeamercolor*{framesubtitle}{fg=black}
\setbeamerfont*{date}{size*={8}{10}}
\setbeamerfont*{headline}{size*={8}{10}}
\beamertemplatenavigationsymbolsempty

\defbeamertemplate*{title page}{unix}{%
  % list trick from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=chngmargonfly
  \begin{list}{}{
  \setlength{\listparindent}{\parindent}%
  \setlength{\itemindent}{\parindent}%
  \setlength{\parsep}{\parskip}%
  \setlength{\leftmargin}{0pt}%
  \setlength{\rightmargin}{0pt}}
  \item[]
  \vspace*{\stretch{2}}
  {\usebeamerfont*{title}\color{uxRed}\inserttitle\par} % no idea why usebeamercolor{title} does not work here
  {\usebeamerfont*{subtitle}\insertsubtitle\par}
  \vspace{\stretch{1}}
  {\usebeamerfont{author}\insertauthor\par}
  {\usebeamerfont{date}\insertdate\par}
  \vspace*{\stretch{2}}
  \end{list}
%  \end{minipage}
}

\defbeamertemplate*{background canvas}{unix}{%
\begin{minipage}[t]{\paperwidth+10pt}
   \setlength{\baselineskip}{0pt}
   \setlength{\lineskip}{-\beamer@uxOverlap}
   \setlength{\parskip}{0pt}
   \ifnumgreater{\c@framenumber}{1}{
    \raisebox{-\height-2\beamer@uxBorderHeight}[0pt][0pt]{\hspace*{0.86\paperwidth}\includegraphics[width=0.125\paperwidth]{example-image-duck}}
   }{}
   
      \ifnumgreater{\c@framenumber}{2}{
        \ifdefempty{\insertframesubtitle}{
          \rule{0pt}{6ex+\beamer@uxTitleHeight}\\
          \color{white}\rule{\paperwidth}{\paperheight-\beamer@uxTitleHeight-\beamer@uxFooterHeight-6ex}
        }{
          \rule{0pt}{6ex+2\beamer@uxTitleHeight}\\          
          \color{white}\rule{\paperwidth}{\paperheight-2\beamer@uxTitleHeight-\beamer@uxFooterHeight-6ex}   
        }
   }{}
   

  \end{minipage}
}

\defbeamertemplate*{headline}{unix}{% 
%    \ifnumequal{\c@framenumber}{1}{}{
      \vspace{3.5ex}
      \hspace{4.5ex}\insertshorttitle
%    }
}

\defbeamertemplate*{frametitle}{unix}{
\begin{minipage}[b]{\textwidth}
\vspace{0.5ex}
\raggedright
\vspace{3.5ex}
{\insertframetitle\par}
{\usebeamerfont{framesubtitle}\usebeamercolor*{framesubtitle}\insertframesubtitle}
\end{minipage}
}


% set bullets

\defbeamertemplate*{itemize item}{unix}{$\bullet$}
\defbeamertemplate*{itemize subitem}{unix}{$\bullet$}
\setbeamersize{text margin left=4ex}
\setbeamersize{text margin right=4ex}

\AtBeginDocument{
  \begin{frame}[plain]
    \vspace*{\stretch{1}}
    \begin{center}
  

    \end{center}

    \vspace*{\stretch{1}}
  \end{frame}
}

\mode<all>

\makeatother

\title[short]{title}

\begin{document}

    
\begin{frame}
\frametitle{ftitle}
    abc
\end{frame} 
    
\end{document}
4
  • Thanks, that insertshorttitle worked like a charm! Maybe the ifnumgreater thing will also solve my problem that I always have an empty page at the start. I will try it =) Sep 7 at 15:24
  • 1
    @canIchangethis The empty page at the start is caused by the code in \AtBeginDocument{...} -- no idea what the purpose of this empty frame was ... Sep 7 at 15:26
  • Thanks, all fixed now =) Sep 8 at 7:51
  • 1
    @canIchangethis You're welcome! Sep 8 at 8:13

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.