Take the 2-minute tour ×
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.

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.

share|improve this question
add comment

3 Answers 3

up vote 13 down vote accepted

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

share|improve this answer
add comment
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
share|improve this answer
    
@karlkoeller Grazie! –  egreg Jun 16 '13 at 15:30
add comment

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}}
share|improve this answer
3  
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 6:42
add comment

Your Answer

 
discard

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.