EDIT: Much shorter problem definition

Having defined a title by


how can I later add something to the title? The simple assumption

\title[\insertshorttitle]{\inserttitle plus x}

obviously does not work due to recursion. I managed to get a version working using \expandafter with only the full title:

\expandafter\title\expandafter{\inserttitle plus x}

But so far I haven't found out how to also include the short title in this. Also, adding something before \inserttile does not seem to work either, only after inserttitle.

Original Question:

In our group, we are required to use a given beamer class for presentations. Unfortunately. the vertical placement of the title is bad for titles that use two lines. As we cannot modify the beamer class itself, we use a slightly dirty hack to move the title into an appropriate position with a vspace.

I would like to automate this hack and make it transparent to the other users. So far, I have come up with the following solution that can be included at the beginning of a presentation (as a package for example):


Basically the following happens:

At the beginning of the beamer presentation, the macro \ITI@computeheight is expanded and computes an offset height \ITI@titleheight. I have left out the details of the macro as they are not important. Then, \title is redefined, basically only a \vspace command is added to the previous title.

My current problem is that with the redefinition of the title, the short title gets lost. And I have no clue how to correctly use \expandafter or other commands to make it work.

The following code works when using a predefined short title (1 in this case):


But when actually using \insertshorttitle, Latex gets into an infinite loop as it wants to expand the new short title over and over again:


The title is stored in \inserttitle, whereas the shorttitle is saved in \beamer@shorttitle. Thus to redefine these two entities you can directly redefine those commands:

Sample output




\def\inserttitle{New title}
\def\beamer@shorttitle{New short title}


Short title is: \insertshorttitle


If you wish to use the old title definitions in the new ones you can either use \xdef:

\xdef\inserttitle{New title \inserttitle}

or you can save the old title in another macro and use that

\def\inserttitle{New title \oldtitle}
| improve this answer | |
  • Thank you for the answer. But in my case this would not work as the new title is a concatenation of the old title and something else, e.g. \def\inserttitle{new prefix \inserttitle}, And this will cause and infinite recursion in latex. – shiin Sep 26 '13 at 6:48
  • Methods to do this now added to answer. – Andrew Swann Sep 26 '13 at 13:54
  • Thanks for these methods. I didn't know abotu \xdef. – shiin Sep 26 '13 at 15:21

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.