76

I want to know how can I achieve this effect in LaTeX:

enter image description here

Basically it looks like this: {F}IRST {L}ETTER, where the letters in the braces are a little bigger than the other ones but they all the letters are uppercase.

Any suggestions?

doncherry
  • 54,637
aljndrrr
  • 1,041

2 Answers2

107

You are most likely referring to small caps:

\textsc{First Letter}

or

{\scshape First Letter}
Werner
  • 603,163
  • What about trying to make first letter in uppercase smaller than the remaining uppercase letters? That is, the inverse of textsc? Looks trivial, though just asking if there is any. – SolidMark Jun 24 '21 at 15:06
  • @Werner Is there a way with another font and bold? I think this doesn't look that good to me and I need bold characters. Thank you very much in advance! :) – thunermay Feb 27 '24 at 07:04
  • @SolidMark: \textsc{fIRST lETTER} – Werner Feb 27 '24 at 17:07
  • @thunermay: Add \usepackage{graphicx} to your preamble and then you can use something like this: {\bfseries F\scalebox{0.8}{IRST} L\scalebox{0.8}{ETTER}} – Werner Feb 27 '24 at 17:12
3

One can adapt expl3 code that egreg published in TUGBoat recently (TUGboat, Volume 39 (2018), No. 1, pg.55). Like Werner's solution using small caps, this solution assumes that the leading letters are entered as capitals. However, you can choose the size (and by extension other attributes)

\documentclass[11pt]{article}
\usepackage{xparse}
\usepackage{expl3}

\ExplSyntaxOn
\NewDocumentCommand{\biglittlecap}{m}
{
\sheljohn_biglittecap:nn { #1 }
}
\tl_new:N \l__sheljohn_biglittecap_input_tl
\cs_new_protected:Npn \sheljohn_biglittecap:nn #1
{
% store the string in a variable   
\tl_set:Nn \l__sheljohn_biglittecap_input_tl { #1 }
\regex_replace_all:nnN
% search a capital letter (or more)
{ ([A-Z]+ | \cC.\{?[A-Z]+\}?) }
% replace the match with \huge{match}
{ \cB\{\c{huge}\1\cE\} }   % <=== could use large, Large (or some other command...)
\l__sheljohn_biglittecap_input_tl
\tl_use:N \MakeUppercase{\l__sheljohn_biglittecap_input_tl}
}
\ExplSyntaxOff

\begin{document}

\biglittlecap{\`Once \r{U}pon a Time}

\end{document}

enter image description here

John
  • 2,400