8

I use small caps with \textsc{} a lot, but cannot find a way to get it set in italics. This is primarily a problem inside environments such as theorems, where the theorem text is set in italics, so that \textsc{} gives upright small caps. I always load the fixltx2e (no longer necessary?) package after reading it enables italic small caps, but that does not seem to be the case. I get slanted small caps with slantsc, but since slanted looks rather unappealing for normal text, that does not solve much. Loading different combinations of the packages fixlte2e, fontenc with T1, and lmodern produces different results, none of which are what I want. I have the same problem with Palatino (using \usepackage[sc]{mathpazo}), except Palatino prints upright lowercase for slanted small caps. I get the warning "Font shape 'T1/lmr/m/scit' undefined(Font) using 'T1/lmr/m/n' instead", which I guess means small-caps-italic font is not available. Is there an easy fix, or is this where one needs other Latex flavors? (I use pdflatex in TeXLive on a Mac.)

Sorry if this is a duplicate -- I could not find the answer anywhere.

MWE:

\documentclass{article}
\usepackage{fixltx2e}
\usepackage[T1]{fontenc}
\usepackage{slantsc}
\usepackage{lmodern}
%\usepackage[sc]{mathpazo}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\begin{document}

\textsl{\textsc{gnu}'s not Unix} (\verb|\textsl{}|)   \par 
{\slshape gnu}'s not Unix        (\verb|{\slshape }|) \par 
\textit{\textsc{gnu}'s not Unix} (\verb|\textit{}|)   \par
\emph{\textsc{gnu}'s not Unix}   (\verb|\emph{}|)

\verb|\textsc{}| inside \verb|amsthm| theorem:
\begin{theorem}
  \textsc{gnu}'s not Unix.
\end{theorem}

\end{document}

MWE ouput

Sean Allred
  • 27,421
Tor
  • 336

1 Answers1

9

The font definition file for Latin Modern doesn't define a scit shape, but you can add it, telling LaTeX to substitute scsl for it.

You may want to use fontaxes instead of slantsc.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{slantsc}
\usepackage{lmodern}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\AtBeginDocument{%
  \DeclareFontShape{T1}{lmr}{m}{scit}{<->ssub*lmr/m/scsl}{}%
}


\begin{document}

\textsl{\textsc{gnu}'s not Unix} (\verb|\textsl{}|)   \par
{\slshape gnu}'s not Unix        (\verb|{\slshape }|) \par
\textit{\textsc{gnu}'s not Unix} (\verb|\textit{}|)   \par
\emph{\textsc{gnu}'s not Unix}   (\verb|\emph{}|)

\verb|\textsc{}| inside \verb|amsthm| theorem:
\begin{theorem}
  \textsc{gnu}'s not Unix.
\end{theorem}

\end{document}

enter image description here

In order to have Palatino, load mathpazo for math and tgpagella for text:

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

\usepackage{fontaxes}

\usepackage{mathpazo}
\usepackage{tgpagella}

\newtheorem{theorem}{Theorem}

\begin{document}

\textsl{\textsc{gnu}'s not Unix} (\verb|\textsl{}|)   \par
\textit{\textsc{gnu}'s not Unix} (\verb|\textit{}|)   \par
\emph{\textsc{gnu}'s not Unix}   (\verb|\emph{}|)

\verb|\textsc{}| inside \verb|amsthm| theorem:

\begin{theorem}
\textsc{gnu}'s not Unix and math is right
\[
\int_{-\infty}^{\infty} \exp(-x^{2})\,dx=\sqrt{\pi}
\]
\end{theorem}

\end{document}

enter image description here

You get very much alike output with

\usepackage{newpxtext,newpxmath}

Take your pick.

egreg
  • 1,121,712