I want to write the headings in \scshape
family with the first character of each word in uppercase.
How can I do this?
I want to write the headings in \scshape
family with the first character of each word in uppercase.
How can I do this?
The new titlecaps
package can do this. It's so new, in fact, it doesn't show up yet in a CTAN search, but can nonetheless be found there at http://www.ctan.org/pkg/titlecaps
\documentclass{article}
\parindent 0em
\usepackage{titlecaps}
\begin{document}
\titlecap{\scshape this is a (test) of \LARGE titlecaps \normalsize on
\"uml\"auts}\normalfont
But if I don't like words like is of on and a being titled, I use
\verb|\Addlcwords| and try again:
\Addlcwords{is of on a}
\titlecap{\scshape this is a (test) of \LARGE titlecaps \normalsize on
\"uml\"auts}
\end{document}
You can change the font of all headings using sectsty. Many fonts (including Computer Modern) don't have bold small caps, so you have to specify normal weight:
\documentclass{article}
\usepackage{sectsty}
\allsectionsfont{\mdseries\scshape}
\begin{document}
\section{A Section Header}
\end{document}
It's best to capitalize the headers manually. But if you really need an automatic solution, try this:
\documentclass{article}
\usepackage{stringstrings}
\usepackage{sectsty}
\allsectionsfont{\mdseries\scshape}
\let\oldsection=\section
\def\section#1{\oldsection{\capitalizewords{#1}}}
\let\oldsubsection=\subsection
\def\subsection#1{\oldsubsection{\capitalizewords{#1}}}
% and so on
\begin{document}
\section{a section header}
\end{document}
@rdhs's first example can also be done with titlesec. It comes with the same caveat that bold small caps can not be used. In fact, adding \bfseries
in the <format>
section will clobber \scshape
.
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}{\scshape\Large}
{\thesection}{1em}{}
\begin{document}
\section{A Section Header}
\end{document}