Possible Duplicate:
Changing the section title style for an article document type
I'm trying to undeline the title of a set of subsections in my document. In order to achieve it, I have defined a new environment that encapsulates the format of this subsection.
My problem is that I can not achieve to underline the text of the title of the subsection.
I don't want to use the package sectsty because if I do this I have conflicts with other definitions done using the titlesec package.
\newenvironment{UnderlineSubSection}{
\titleformat{\subsection}
{\normalfont\sffamily\bfseries\color{cyan}}
{\thesection}{1em}{}
}{}

ulempackage and add\ulineto the last argument (i.e the one after{1em}) of\titleformat. – cgnieder Aug 22 '12 at 13:36