[Tex/LaTex] Remove section number from Table of Contents

numberingsectioningtable of contents

How can I remove section numbers from the Table of Contents?
My document class is article:

\documentclass[a4paper]{article}
\begin {document}
\tableofcontents
\section{one}
test text number one
\section{two}
test text number two
\end{document}

enter image description here

Best Answer

You can easily do that with the titlesec/titlestoc package. It has commands that allow for a different formatting of numbered and unnumbered sections (if you want to add unnumbered sections) in the table of contents:

\documentclass[a4paper]{article}
\usepackage{titletoc}

\begin {document}
\titlecontents{section}[0em]
{\vskip 0.5ex}%
{\scshape}% numbered sections formatting
{\itshape}% unnumbered sections formatting
{}%

\tableofcontents

\section{A First Section}
Test text number one. 

\section{Another Section}
Test text number two. 

\section*{An Unnumbered Section}
Test text number three. 
\addcontentsline{toc}{section}{An Unnumbered Section}
\end{document} 

enter image description here