TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I encountered the following problem with the beamerarticle package. If I use commands like \textit{} I get the following error massage:

./test.tex:7: Argument of \@sect has an extra }.
<inserted text> 
            \par Runaway argument?
{\normalfont \Large \bfseries }{\beamer@sortzeroread {\beamerx@\textit \ETC.
./test.tex:7: Paragraph ended before \@sect was complete.
<to be read again> 
l.7 \section{Test \textit{test} test}

l.7 \section{Test \textit{test} test}


Here is a minimal example:

\section{Test \textit{test} test}

Without the package or without the \textit{} the example works. Furthermore, if I use an optional argument in the section, it works as well, but if it contains any formatting commands. That is,

\section[\textit{test}]{Test \textit{test} test}

works, while

\section[test]{Test \textit{test} test}


Any ideas what is going on here or how to solve it?

share|improve this question
This is a fragile command in a moving argument you need \protect\textit – David Carlisle Apr 18 '12 at 12:47
@DavidCarlisle \textit is supposed to be robust: \show\textit produces \protect \textit  . But beamerarticle changes it into \beamer@sortzero{\beamerx@\textit}. :( – egreg Apr 18 '12 at 12:51
Closely related question: error with bold font in section title with beamer. – diabonas Apr 18 '12 at 17:05

While the \textit command is normally robust and doesn't need protection in moving arguments (which are the arguments to \section and siblings, \caption and some others), with the beamerarticle package it is not robust any more.

So the answer is, with that package

\section{Test \protect\textit{test} test}

or, if you use the command in the optional argument,

\section[Test \protect\textit{test}]{Test \textit{test} test}

(the moving argument is the mandatory one, if the optional argument is missing, otherwise the optional argument).

Also the other font changing commands are not robust any more.

Note: I'm inclined to consider this a bug of beamerarticle (or beamer in general), as it's not mentioned in the user manual, while LaTeX user guides tell that \textit is OK in moving arguments.

share|improve this answer
Thanks a lot! That helped. – Daniel Apr 18 '12 at 19:04

Your Answer


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.