1

How do i format the heading of the section such that first letter is bigger size capital letter and following letters as smaller sized capital letters in the same word ?

sashank
  • 125
  • \section{\textsc{Section Title}} – Sean Allred Apr 10 '13 at 08:40
  • to change it in the general see http://tex.stackexchange.com/questions/1455/how-to-set-the-font-for-a-section-title-and-chapter-etc – Sean Allred Apr 10 '13 at 08:41
  • How big a difference would you like between the first letter and the rest? – Niel de Beaudrap Apr 10 '13 at 08:56
  • 1
  • I marked it as a duplicate. If the answers to the other question would not help, or your question is really different, let us know by a comment. Feel free to edit your question. – Stefan Kottwitz Apr 10 '13 at 09:08
  • The question in the link is a more generic question on formatting chapter headings or sections , mine is specific question on big and small capital letters in the same word of the title , please dont duplicate it – sashank Apr 10 '13 at 10:12
  • 1
    It's better to have a general question with general answers, so many users can be helped. Try the suggestions there (titlesec etc.) It's not a personal help forum ("how can I make the third letter in a word yellow in subsections in mythesis.cls") but a know-how site ("how can I change colors in headings"). Please follow the links in the answer of the other question, read the package manual there, which has the solution. Note, \textsc or \scshape is the font shape you need. You may look at the [tag:small-caps] tag. – Stefan Kottwitz Apr 10 '13 at 11:07

1 Answers1

2

You can use titlesec for this, but need a helper command for the sizing, and need to place this command at the end of the "before code" section of \titleformat.

Sample output

\RequirePackage{fix-cm}
\documentclass{article}

\usepackage{titlesec}
\usepackage{textcase,relsize}

\def\myFBRSC#1{{\larger[3]{\MakeTextUppercase{#1}}}\scshape }
\DeclareRobustCommand{\FirstBigRestSmallCaps}[1]{\myFBRSC #1}

\titleformat{\section}%
{\normalfont\Large}{\thesection}{1em}{\FirstBigRestSmallCaps}

\begin{document}

\section{Test Section}

Some text.

\section{lower case section}

\end{document}

I have used relsize to do the size changing, with the addition of fix-cm to make larger fonts available. The command \MakeTextUppercase is from textcase, but LaTeX's ordinary \MakeUppercase may be good enough for your purposes. For the above code to work, the section heading should not start with a non-text token, such as a math character.

Andrew Swann
  • 95,762