I've run into a problem where with using titlesec where my numberless sections are numbered. I took a look at a few other questions here, and the titlesec package help, where I saw the numberless option. However, with the suggestion that I noticed elsewhere here, i.e., to use \sectioning as the label it still produces a (wrong) number before the section name.

Can anyone give me a pointer here?

The present lines in my code read as:






% keep this as last usepackage%

\titleformat{\section}[hang]{\usefont{T1}{qhv}{b}{n}\selectfont}{}{0em}{\hspace{-0.4pt}\Large \thesection\hspace{0.6em}}

\titleformat{name=\section,numberless}[hang]{\usefont{T1}{qhv}{b}{n}\selectfont}{}{0em}{\hspace{-0.4pt}\Large \thesection\hspace{0.6em}}

And the endresult here is that all sections manage to change their font, size, and spacing, but that the ones that go by \section*{} are erroneously numbered.

I have my suspicion that I could do something by the optional titlesec commands, but I a not entirely confident in how they work.


  • 1
    You have \thesection also in the numberless part. – egreg Nov 23 '13 at 11:43

Remove \thesection the definition for numberless:


  {\hspace{-0.4pt}\Large \thesection\hspace{0.6em}}



\section*{Unnumbered section}

Some text

\section{Numbered section}


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.