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

The following code does not compile if any % is removed. It reports run away argument.

    \begin{center} %\em
        This is center
    \begin{quote} %\em
        This is quote
    \begin{itemize} %\em
        \item This is itemize
    \begin{tabular}{c} %\em
        This is tabular

My question is whether it is possible to fix it so that \em of ulem (as an underlining \em) works everywhere \em of LaTeX works.

share|improve this question
\em with ulem wants to be terminated by }. – egreg Aug 29 '14 at 9:24
up vote 7 down vote accepted

The definition of \em with ulem becomes


This is an interesting trick for essentially turning

{\em something}



A consequence of this is that \em needs to see an explicit closing brace and cannot be “free”.

Underlining cannot be done like a font change that respects any grouping mechanism, so the answer to your question is: no, you can't.

share|improve this answer
Thanks. So the next problem: why not make underlining a font feature so that we will have \ulshape and \textul? It is cheaper to draw a line than to tune, for example, the italic version, right? – Symbol 1 Aug 29 '14 at 9:41
@Symbol1 One would need a special underlined font for this. But underlining a whole paragraph is something a typographer would do only under physical threat. – egreg Aug 29 '14 at 9:43
You owe me a coffee and a new keyboard. But I'm still chuckling. – Steven B. Segletes Aug 29 '14 at 9:56
@StevenB.Segletes Sorry for your keyboard. ;-) – egreg Aug 29 '14 at 10:07

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.