38

I want to have my sections numbered using Roman numerals. However, I can only get the section number to be a Roman numeral, not the subsection. Here is some code:

\renewcommand{\thesection}{\Roman{section}} 
\renewcommand{\thesubsection}{\Roman{subsection}}

This will print, e.g. I. , whereas it should be I.I. Commenting out the second line gives the result I.1, which is not demanded.

Ingo
  • 20,035

3 Answers3

49

You need to append the section number to the subsection number using:

\documentclass{article}
\renewcommand{\thesection}{\Roman{section}} 
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
\begin{document}
\section{First section}
\subsection{First subsection}
\subsection{Second subsection}
\section{Second section}
\subsection{First subsection}
\subsection{Second subsection}
\end{document}

Section and subsection numbering

Werner
  • 603,163
17
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
egreg
  • 1,121,712
6

I was looking for the 3rd tier (subsubsection) but couldn't find it anywhere. I managed to figure it out though. So, for anyone who's in the same spot as i was, here is the subsubsection version:

\renewcommand{\thesubsubsection}{\thesection.\thesubsection.\Roman{subsubsection}}
dustin
  • 18,617
  • 23
  • 99
  • 204
  • 10
    You will get the section number twice, if \thesubsection is defined as in the answers (\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}). Then \renewcommand{\thesubsubsection}{\thesubsection.\Roman{subsubsection}} will do the trick. – Heiko Oberdiek Aug 16 '13 at 06:42
  • @HeikoOberdiek good observation, the original answer is incorrect without your comment. – Konrad Feb 06 '22 at 13:51