TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 using the titlesec package but the numbering of section and subsections disappeared. I need to retrieve it. my code is


I need to achive the following specs: Main headings: Arial, Size 12, Bold, Uppercase, Center Justified.

Sub-headings: Arial, Size 12, Bold, Title case, Left Justified.

share|improve this question
Add \thesection in the second mandatory argument. Similarly, add \thesubsection in the the corresponding command. Your specifications don't say anything about changing colors, and yet you have a change to blue? – Gonzalo Medina Apr 21 '13 at 4:41
A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – Micha Apr 21 '13 at 4:53
Thank you very much for this help, Really I do not need the blue line but it was just for test. If I want to achieve the given specs what should I do? – user16558 Apr 21 '13 at 6:01

You should use \thesection and \thesubsection in the appropriate places; also \MakeUppercase should go in the last argument for \section.

\usepackage{tgtermes,tgheros} % use your preferred ones for the fonts
\usepackage{lipsum} % this is just to produce some text




\section{A section title}


\subsection{A subsection title}



enter image description here

share|improve this answer

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.