# New command to bold within small caps

I'd like to have a command to write a word in all small caps of equal size (no initial large capital letter), with a specified central portion in bold.

\mkboldcaps{Aver}{ag}{e}


would produce the output AVER AG E (no spaces)

So far, I have the following command, which makes a word into all small caps of the small size:

\newcommand{\smallcaps}[1]{\textsc{\MakeLowercase{#1}}}


The trouble comes when I try to combine these. In the following command,

\newcommand{\makeboldcaps}[3]{\smallcaps{#1}{\textbf{#2}}\smallcaps{#3}}


the middle portion is successfully made bold, but it is not in small caps. Adding a \textsc to the central portion messes up the rest of the command. Any suggestions?

• Welcome to TeX.SX! Very few font families have boldface small caps. – egreg Apr 20 '14 at 21:08
• Thanks for the welcome! So this means that there's no real way to accomplish the above in the way I suggested right? I'll have to locate a font family that actually has boldface small caps. – pomegranate Apr 20 '14 at 21:18
• If you want the standard Computer Modern fonts (actually a clone thereof), then \usepackage[T1]{fontenc} will suffice. – egreg Apr 20 '14 at 21:30
• – Werner Apr 21 '14 at 2:45

You have to ensure that the font family used has boldface small caps. The standard Computer Modern font family hasn't them, but the European Modern fonts do.

\documentclass{article}
\usepackage[T1]{fontenc}

\newcommand{\mkboldcaps}[3]{%
{% keep the font change local
\scshape\MakeLowercase{#1}\textbf{\MakeLowercase{#2}}\MakeLowercase{#3}%
}%
}

\begin{document}
\mkboldcaps{Aver}{ag}{e}
\end{document}


Note that you need that your TeX distribution includes the CMSuper font package, or you'll get the fonts in bitmap form.

• Why the repetition? Why not \scshape\MakeLowercase{#1\textbf{#2}#3} ? – pst Apr 21 '14 at 7:23
• @pst Why not? I prefer \textbf{\MakeLowercase{...}} that makes clearer what's wanted. But it's just a matter of preferences. – egreg Apr 21 '14 at 8:50
• OK! For me it's less clear when it seems like there are three texts that should be lowercases, but that is obviously not universal then. – pst Apr 21 '14 at 10:36