Text Formattingspecial formatting in section headings

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

special formatting in section headings

Post by dmuthu_cse »

Hello friends,

I am struggling with formatting a section with lowercase letters in it. I like to have some special commands so that i can make the decision of case of the words.

As given below i have use \uppercase in section definition. so that the section headings will be in uppercase. But in special case like mine, kVAh should be "kVAh" and not "KVAH"

So please help me in this regard.

Regards,
Muthu.

Code: Select all

\documentclass{book}
\usepackage[raggedright]{titlesec}

\titleformat{\section}{\large \fontfamily{phv} \bfseries\uppercase}{\thesection}{1em}{\raggedbottom}

\begin{document}

\section{kVAh Meter for Restricted Range of Power Factor}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

special formatting in section headings

Post by gmedina »

Hi, Muthu

you could use the \MakeLowercase command:

Code: Select all

\section{\MakeLowercase{k}VA\MakeLowercase{h} Meter for Restricted Range of Power Factor}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Re: special formatting in section headings

Post by dmuthu_cse »

Hello gmedina,

thanks for your quick solution.. it is working fine..

Regards,
Muthu
Post Reply