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'm writing a thesis and sections are required to have roman numerals in both the toc and the document itself. The pertinent document code looks like this:

\usepackage[indentfirst]{titlesec} %To allow for formatting section titles
\usepackage{ragged2e} %To allow for indentation with the raggedright command


\section{First Section}
\section{Second Section}
\subsection*{First Subsection}

This code gives me titles formatted according to my specifications, but the \renewcommand\thesection{\Roman{section}.} code only seems to affect the toc, not the actual section titles. As you can see, I have the command both on its own and with the \titleformat command, but neither one produces results. How can I get the number to show up in the actual section title?

share|improve this question

According to the manual of titlesec the command \titleformat* takes two arguments the section type/level and the format of the section. For the label you have to use \titleformat{command}[shape]{format}{label}{sep}{before code}[after code].

So you have to use something like the following

  {\thesection. }

to achieve the desired outcome.

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.