Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to build a beamer theme from scratch.
I have read the beameruserguide and I have created files for a inner/outer/font/color-theme, but I still have some difficulties understanding how to create templates, so I'm asking help with this simple title frame customization as an example of how it's done.

By default \maketitle will result in

enter image description here

I simply want to change this and make it result in enter image description here

side-note:

I still want to declare

\title{the title}  
\author{the author}  
\date{\today} 

for usage in later frames.

share|improve this question
    
Does it means that you need something like \supertitle{supertitle}? –  Claudio Fiandrino Jul 29 '12 at 10:12
add comment

1 Answer

up vote 3 down vote accepted

Here is a possible implementation: it can actually work with every standard theme, but if the theme you developed puts the title in a box you may wonder to get a different effect.

\documentclass{beamer}

\setbeamerfont{supertitle}{size=\LARGE,parent=structure}    

\makeatletter
\def\supertitle#1{\gdef\@supertitle{#1}}%
\setbeamertemplate{title page}
{
  \vbox{}
  \vfill
  \begin{centering}
  \begin{beamercolorbox}[sep=8pt,center]{title}
      \usebeamerfont{supertitle}\@supertitle
   \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{title}
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.25em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%     
    \end{beamercolorbox}%
    \vskip1em\par
    \begin{beamercolorbox}[sep=8pt,center]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}\vskip0.5em
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
  \end{centering}
  \vfill
}
\makeatother

\supertitle{supertitle}
\title{the title}
\author{the author}
\institute{My institute}
\date{\today} 

\begin{document}

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

\begin{frame}{Title of first frame}
text
\end{frame}

\end{document}

This gives:

enter image description here

The problem I said before is due to the fact that I made use of the title color definition for the beamercolorbox containing the supertitle.

By means of \setbeamerfont it is possible to characterize which are the features of the new template supertitle; once given the definition, that should be applied inside the titlepage template immediately before the supertitle insertion to set it with the desired characteristics.

You probably noticed that all elements of the titlepage have this setting. For simplicity, I did not defined a color template for the supertitle, but I re-used the definition given by the title. Indeed, for each template in the titlepage, there is also a color template definition, that could be given with \setbeamercolor. If you want you can define yours by means of:

\setbeamercolor{supertitle}{...}

After that, you should change the previous definition into:

\begin{beamercolorbox}[sep=8pt,center]{supertitle}
  \usebeamerfont{supertitle}\@supertitle
\end{beamercolorbox}

For what concern the \inserttitlegraphic, it is the command that allows to insert (as the name suggests) the logo just in the titlepage. In your presentation you should use the command:

\titlegraphic{...}
share|improve this answer
    
Wait, I am confused. Where does this code go and why is there still an author, institute and date on the titleframe? –  Edward Stumperd Jul 29 '12 at 10:33
    
The part between \makeatletter and \makeatother should be put in your innertheme, while \setbeamerfont{supertitle}{size=\LARGE,parent=structure} in the fonttheme. I left the other components since you did not say that they should have been removed. –  Claudio Fiandrino Jul 29 '12 at 10:35
    
Can you please elaborate a bit more on what the following commands do: '\usebeamerfont{supertitle}\@supertitle' & '{titlegraphic}\inserttitlegraphic\par}' –  Edward Stumperd Jul 29 '12 at 15:59
1  
See my updated answer. :) –  Claudio Fiandrino Jul 29 '12 at 16:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.