Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to write the headings in \scshape family with the first character of each word in uppercase.

How can I do this?

share|improve this question
    
Welcome to TeX.sx! Please register on this site, otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Feb 21 '12 at 15:21

3 Answers 3

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}

enter image description here

share|improve this answer

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}
share|improve this answer

@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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.