3

I have tried to make my sections appear as "Section I : My section's title" or "Section I My section's title" with the \renewcommand\thesection... command but in the table of contents the word "Section" is not appearing at the right place. It looks like this:

enter image description here

This is my MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathptmx}
\usepackage{amssymb}
\usepackage[left=1cm,right=1cm,top=1.5cm,bottom=1.5cm]{geometry}
\title{my title}
\renewcommand\thesection{Section \ \Roman {section}}
\begin{document}
\maketitle
\tableofcontents
\pagebreak
\section{my section}
\end{document}

Thank you in advance for you help.

3

If you want to do it only in the table of contents you can use the tocloft package. If you want to have the word "Section" also in the text you can use the titlesec package.

\documentclass[12pt,a4paper]{report}

\usepackage{tocloft}
\renewcommand{\cftsecpresnum}{Section }
\renewcommand{\cftsecnumwidth}{6em}
\renewcommand{\thesection}{\Roman{section}}

\usepackage{titlesec}
\titleformat{\section}{\large\bfseries}{}{0pt}{Section \thesection\quad}

\title{my title}

\begin{document}
\maketitle
\tableofcontents
\pagebreak
\chapter{First chapter}
\section{my section}
\subsection{my section}
\subsection{my section}
\section{another section}
\chapter{Second chapter}
\section{my section}
\end{document}

enter image description here

enter image description here

  • \section* gets broken this way, and gives Section 0 blah blah blah – malaverdiere Sep 24 '14 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.