# \subsubsection command and xcolor package

I am using xcolor package to draw some colored tables. But I am having trouble with the \subsubsection command. When I block comment the colored tables and xcolor package, it works. When I do not use any subsubsection, it works. But when I use both at the same time, I get the errors below. Any one knows the solution? Thank you.

! Missing number, treated as zero.

}

1.545 \subsubsection{Improved Bounds} I

n this part,

! Color stack action is missing.

}

1.545 \subsubsection{Improved Bounds} I

n this part,

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Caramdir Jun 30 '12 at 16:20
I would guess that you have added color commands to the section title in such a way that they also appeared in the page and corrupted the color stack. But without an example hard to guess and impossible to suggest a fix. –  David Carlisle Jun 30 '12 at 16:42

The OP posted a minimal working example on LaTeX-Community.org. It turned out, that he used the fbe_tez package, which uses \underbar in its definition of the \@sectmacro.

The line I refer to is

\edef\@svsec{\underbar{\csname the#1\endcsname.\hskip 0.5em}}


As soon as the macro is patched such that it uses \underline instead, the error is gone.

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@sect}{\underbar}{\underline}{}{}
\makeatother


\underbar is actually defined using \underline but at the base line. From latex.ltx:

\def\underbar#1{\underline{\sbox\tw@{#1}\dp\tw@\z@\box\tw@}}


The error would go away as well if \edef would be replaced by \def.

The whole thread regarding this topic: \subsubsection command and xcolor.

-
I have suffered from this style file in my MSc thesis too. Thanks a bunch for fixing one of many issues! –  percusse Jun 30 '12 at 17:54