[Tex/LaTex] Lowercase small caps in section/subsection/…

koma-scriptsectioningsmall-caps

I'm interested in setting the titles of section and more in lowercase small caps. And I don't know how to automatically achieve this.

\documentclass{scrartcl}
\setkomafont{sectioning}{\scshape}
\usepackage{hyperref}
\begin{document}
    \section{Hello}
    \section{hello}
    \subsection{helloHello}
\end{document}

But if I write everything in lowercase, then the \tableofcontents doesn't look good unless I use small caps there too. I know about \MakeLowercase{} but this needs an argument.

By the way, as I noted, I just want to show them in lowercase small caps in the document, not in the table of contents, ….

Any ideas?

PS: I don't know if this is necessary, but I'm using the MinionPro package.

EDIT: after some research, apart from what is answered here, in classicthesis.sty you can look at other different (or semi-different) method.

Best Answer

At his homepage, Markus Kohm, the author of KOMA-script, has code for majuscle in section headings.

I have slightly adapted the code from Versalien in \section und \subsection?)

\documentclass[11pt]{scrartcl}

\usepackage[UKenglish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{MinionPro}
\renewcommand{\scdefault}{ssc} % MinionPro's spaced small caps as standard

\makeatletter
\newcommand*{\Section}{}
\let\Section\section
\renewcommand*{\section}{%
  \@ifstar {\star@section}{\@dblarg\nonstar@section}%
}
\newcommand*{\star@section}[1]{%
  \Section*{\MakeLowercase{#1}}%
}
\newcommand*{\nonstar@section}[2][]{%
  \Section[{#1}]{\MakeLowercase{#2}}%
}
\let\Subsection\subsection
\renewcommand*{\subsection}{%
  \@ifstar {\star@subsection}{\@dblarg\nonstar@subsection}%
}
\newcommand*{\star@subsection}[1]{%
  \Subsection*{\MakeLowercase{#1}}%
}
\newcommand*{\nonstar@subsection}[2][]{%
  \Subsection[{#1}]{\MakeLowercase{#2}}%
}

\setkomafont{disposition}{\normalcolor\scshape}

\usepackage{hyperref}

\begin{document}
\tableofcontents
\section{Heading level 1}
\subsection{Heading level 2}

\end{document}

This solution works with starred sections. And it is easy to add more formatting by using the normal:

\setkomafont{level}{command}
\addtokomafont{level}{command}

I will also suggest that you use the package textcase to make the case changes more fool proof:

\usepackage[overload]{textcase}