# How to capitalize section title in body document but not on table of contens

How do I capitalize section title in body document but not in table of contents. I use

\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\bfseries}}


to make it bold. But how do I capitalize it? If I use

\section{\uppercase{Latar Belakang}}


the section title will be uppercase on both of body document and section title in table of contents. Any help is appreciated.

• Welcome to TeX.SX. What document class are you using? Why don't you use package titlesec? – Johannes_B Mar 20 at 6:16
• Easy solution is to use \section[title]{Title}, albeit this requires more typing. Try \MakeLowercase (standard LaTeX, also textcase). – John Kormylo Mar 20 at 15:42

Temporarily disable \uppercase for the toc production.

\documentclass{article}
\begin{document}
{\renewcommand\uppercase[1]{#1}
\tableofcontents
}
\section{\uppercase{Latar Belakang}}
\end{document}


It is easier to remove capitals then add them (correctly) to a title.

BTW, you really don't want to modify \section or \@startsection if you can avoid it.

\documentclass{article}
\newcommand{\mysection}[1]% #1 = title (capitalized)
{\section[\MakeLowercase{#1}]{#1}}
\begin{document}
\tableofcontents

\mysection{Title}
\end{document}