Format section's title with \renewcommand

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:

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.

1 Answer

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}


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