16

According to a relevant comment, one should be able to specify both weights and shapes for each family. Why can I (seemingly) not have small caps with \sffamily?

Minimal example:

\documentclass{article}

\begin{document}
\sffamily\scshape Test
\end{document}

produces the following output:

enter image description here

8
  • 3
    Neither Computer Modern Sans nor Latin Modern Sans have a small caps font.
    – egreg
    Commented Jun 11, 2013 at 13:47
  • 4
    A font with the specifics must exist. If not LaTeX will fall back to a substitute. You can get sans serif small caps e.g with libertine. Commented Jun 11, 2013 at 13:48
  • [meta:] how is the big second example relevant to your question? I think the first one illustrates your problem just fine, maybe in combination with an image. (been thinking about editing it out, but I thought I'd bring it up first)
    – Nils L
    Commented Jun 11, 2013 at 13:56
  • 1
    This works with certain font families, e.g. palatino Commented Jun 11, 2013 at 20:32
  • 1
    @egreg Please make an answer here :-)
    – Joseph Wright
    Commented Aug 12, 2013 at 13:47

3 Answers 3

13

Imitation of small caps by reducing the uppercase letters can, in some rare cases, give a result slightly above the atrocious level. With Computer Modern Sans Serif such an attempt is doomed to horrible failure, because the heavy strokes are a distinctive feature of the font and you'd be mixing very different strokes between capitals and small capitals. I suggest using spaced all capitals (you get them easily with microtype).

This is an example with Computer Modern, European Modern and Latin Modern.

\documentclass{article}
\usepackage[T1,OT1]{fontenc}
\newcommand{\hsc}[1]{{\footnotesize\MakeUppercase{#1}}}
\begin{document}
\sffamily
T\hsc{his} \hsc{is} F\hsc{ake} S\hsc{mall} C\hsc{aps}

\fontencoding{T1}
T\hsc{his} \hsc{is} F\hsc{ake} S\hsc{mall} C\hsc{aps}

\fontfamily{lmss}
T\hsc{his} \hsc{is} F\hsc{ake} S\hsc{mall} C\hsc{aps}
\end{document}

enter image description here

Apart from the missing kerns, the contrast between the F and the A is too visible and horrible.

3
  • Horrible indeed; is there a way to convince microtype to take care of this? Commented Aug 12, 2013 at 14:40
  • @SeanAllred Sorry, if the font doesn't support small caps, there's not much to do.
    – egreg
    Commented Aug 12, 2013 at 17:38
  • Fair enough :-) Commented Aug 12, 2013 at 17:41
6

There is a version of computer modern with small caps in the sansmathfonts package. You can use it follows:

\documentclass{article}
\usepackage[notmath]{sansmathfonts}
\begin{document}
\sffamily
\textsc{Is This Better Than Fake Small Caps?}
\end{document}
1
  • Fine. but works only with pdfTeX, not with LuaTeX nor XeTeX.
    – Covich
    Commented Dec 27, 2018 at 14:10
1

With LuaTeX or XeTeX and fontspec this works out of the box (maybe the font has to support it, but at least with Libertinus):

\documentclass[convert,varwidth]{standalone}
\usepackage{fontspec}

\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}

\begin{document}
Normal Text \\
{\sffamily sffamily Text} \\
{\scshape scshape Text} \\
{\sffamily\scshape sffamily scshape Text} \\
\end{document}

This yields

document output

You must log in to answer this question.

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