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 am trying to use the titlesec and xcolor packages together (well, actually, the tufte-book class is, but that's another story.)

Here is a minimal LaTeX file that illustrates my problem:

\part{A Tale of Two Cities}

The 5th argument of \titleformat is supposed to add the section heading as an argument to the last command, so it should end up with \MakeTextUppercase{A Tale of Two Cities}. But running LaTeX on this file produces the following output:

! Argument of \MakeTextUppercase has an extra }.
Runaway argument?
! Paragraph ended before \MakeTextUppercase was complete.

However, if I remove \textcolor{darkgray} then everything works as expected. Also, if I insert \\ between \textcolor{darkgray} and \MakeTextUppercase, then everything also works as expected. But not if I put \\ before \textcolor{darkgray}.

Can anyone explain what is going on here?

share|improve this question
up vote 3 down vote accepted

\textcolor requires two arguments and with your code the first is darkgray and the second is \MakeTextUppercase, which is wrong.

However, the title is typeset in a group, so


will do (and probably you want to apply the coloring also to \thepart).

share|improve this answer
Excellent. My fault for assuming I knew what \textcolor does... – ptomato Sep 3 '12 at 11:35

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.