# From Capitals to Small Capitals

If I have a font in which lookups exist c2sc as built-in, there is a command to make small caps capital letters without incurring complicated codes like this: Convert all-caps words to small caps I mean something like \textsc{...}, but with uppercase?

• What do you mean exactly with textsc but with upper case? Do you want to convert to smallcaps? Or to normal caps? Something else? To make it a bit more concrete: can you provide a small document that illustrates what you want, with a screenshot of the current output and a description or mock-up screenshot of how you want the output to look? – Marijn May 22 at 21:11
• Or do you just mean something like \textsc{\MakeLowercase{YOURTEXT}}? – Marijn May 22 at 21:14
• Most caps/smcaps fonts have both styles. Not tested: try \MakeUppercase{Xxxx...} to use the "real" uppercase. – barbara beeton May 22 at 21:15
• Some OpenType fonts support this as a font feature, Capitals to Small Caps, which is available in fontspec. – Davislor May 22 at 21:21
• I mean to write something like \textsc{TEXT} and obtain <TEXT> in small caps. My font has real smcp and two lookups: smcp (lowercase to small caps), which works with \textsc: and c2sc (capitals to smallcaps) – user41063 May 22 at 21:29

You can write your own declarations and commands for c2sc and for putting everything in small caps:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}
%%% make uppercase letters small caps:
% declaration
% command
\DeclareTextFontCommand{\textcsc}{\csc}

%%% make all letters small caps:
% declaration
% command
\DeclareTextFontCommand{\textasc}{\asc}
\begin{document}
{\csc This declaration gives UPPERCASE SMALL CAPS.}

\textcsc{This command gives UPPERCASE SMALL CAPS.}

{\asc Now lower- and UPPERCASE letters are all small caps.}

This is \textasc{a TEST.} This is \textasc{only a TEST.}
\end{document}


In most cases, there’s no advantage to doing this. But with EB Garamond and some commercial fonts, text in \textsc{...} copies as lowercase, while text set with c2sc copies as uppercase.

• thank you. In any case \def is a Tex primitive, \newrobustcmd not and makes some contols before its execution. Here they are more or less the same – user41063 May 25 at 15:40