[Tex/LaTex] Section’s heading in small caps

formattingsectioningsmall-caps

I am using TeXmaker and I am trying to format the section's title. I tried something I had found on the internet but it was clashing with another package. How can I set all section's heading to be written in small caps ?

This is the preamble of my document

\documentclass[11pt,a4paper,twoside,twocolumn]{article}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{units}
\usepackage{multicol}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage[authoryear]{natbib}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{lmodern}
\usepackage{tabularx}
\usepackage{caption} 
\captionsetup[table]{skip=10pt}
\setlength{\bibsep}{0pt}
\setlength{\columnsep}{30pt}

\renewcommand{\section}{\smallcaps}

\addto\captionsfrench{\renewcommand{\tablename}{\textsc{Tableau}}}

\bibliographystyle{test}

Best Answer

I recommend using the KOMA replacement to article as it's far more flexible and it makes it much easier to change that kind of thing.

Edit: I've removed lmodern and made the section heading centered and bold.

\documentclass{scrartcl}

%\usepackage{lmodern}
\usepackage[T1]{fontenc}

%\addtokomafont{section}{\mdseries\rmfamily\scshape}
\addtokomafont{section}{\rmfamily\centering\scshape}

\begin{document}

\section{Sample Section}

\end{document}
Related Question