2

I would like to auto-capitalize the first phrase (could be more than one word, specified by user in some way) in a paragraph and make the first letter of each word of the capitalized phrase bigger than other (capital) letters, something like the following image. What command should I use? Thank you.

enter image description here

2
  • 1
    You may use \textsc{...} for that. And please add a minimal working example (MWE) of your current setup.
    – epR8GaYuh
    Feb 12, 2020 at 7:12
  • @epR8GaYuh: Yes, it works! Thank you so much! It is used in a regular article setup like those starting latex examples in any tutorials, nothing special, so I will not show the MWE version of my latex document. Would you like to promote your comments to an answer? I will accept it. Thank you again for your help. Feb 12, 2020 at 7:21

2 Answers 2

3

This type of typesetting the text is called "small caps" and can be achieved by the \textsc{Text} command.

A simple test document including some dummy text:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{lipsum}


\begin{document}

\lipsum[1]

\textsc{Capitalization Second.} \lipsum[2]

\paragraph{\textsc{Capitalization Second.}} \lipsum[3]

\end{document}

Besides the regular command usage, I added a version where this is applied to a paragraph heading. Please note that in this case, a font supporting bold small caps is needed - therefore I use the T1 option.

Edit: If you need to use small cap \paragraphs a lot, you may create an own macro for it:

\newcommand{\paragraphsc}[1]{\paragraph{\scshape #1}}

Example output

4

As you have not said how big the first capital letter should be, maybe you are interested also in dropped capitals? If so, the package lettrine is for this:

mwe

\documentclass{article}
\usepackage{lettrine}
\usepackage{lipsum, parskip,libertine}
\def\dolorsit{ % dummy text
dolor sit amet, consecteuter adisciplining elit.
\lipsum[1][2-15]}

\begin{document}
\lettrine[lines=1,loversize=-.4]{L}{ore ipsum}\dolorsit 
\lettrine{L}{ore ipsum}\dolorsit
\lettrine[lines=5,slope=7pt,nindent=-4pt,findent=-10pt]{L}{ore ipsum}\dolorsit
\end{document}
1
  • Just out of curiosity, what is such capitalization at the beginning of a paragraph or chapter (typically in a book) called (in the printing world)? Oct 15, 2020 at 23:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .