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 need to build a table of contents in latex, where the chapters are as roman numerals, sections are arabic numbers, and the subsections are letters. I also need it to only go up to the subsection level.

It should look like this:

I. CHAPTER
II. CHAPTER
   1. Section
   2. Section
      (a) Subsection
      (b) Subsection

I use the following command to generate the table of contents but It does it with another format.

\tableofcontents

How do I achieve this with latex?

Ted.

share|improve this question
    
Do the chapters, sections, etc have the numbering scheme you've illustrated, or something else? For example, are your chapters actually CHAPTER 1, CHAPTER 2, etc, and you want them to look differently in the toc? –  cmhughes Dec 4 '11 at 23:31
add comment

1 Answer

You can redefine the commands \thechapter, \thesection, \thesubsection which control the representation of the counters for chapters, sections, and subsections. The tocloft package can be then used to add the dots:

\documentclass{book}
\usepackage{tocloft}

\renewcommand\cftchapaftersnum{.}
\renewcommand\cftsecaftersnum{.}

\renewcommand\thechapter{\Roman{chapter}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{(\alph{subsection})}

\begin{document}

\tableofcontents

\chapter{Test Chapter One}
\section{Test Section One}
\section{Test Section One}
\subsection{Test Subsection A}
\subsection{Test Subsection B}

\end{document}

enter image description here

Some other adjustments might be necessary, to prevent the chapter number from overlapping the title, and perhaps reducing the space between the section number and their titles; those adjustments can be something like:

\renewcommand\cftchapnumwidth{2.8em}
\renewcommand\cftsecnumwidth{2em}
\renewcommand\cftsecindent{3em}
\renewcommand\cftsubsecindent{5em}
share|improve this answer
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.