Sectioning – Using Roman Numerals for Sections and Subsections

numberingroman numeralssectioning

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.

Best Answer

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