# How to replace italic small caps with upright small caps (using fontspec)?

I use XeLaTeX with fontspec and the EBGaramond font, and I would like to get rid of the italic small caps: when writing for example \emph{Lorem \textsc{ipsum} dolor}, I would like to get something like:

Here is my preamble (I also loaded ebgaramond-maths because otherwise there was some trouble with italics and maths) :

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[a4paper, 12pt]{article}

\usepackage{fontspec}
\setmainfont{EB Garamond}
\setmonofont{CMU Typewriter Text}
\renewcommand{\phi}{\varphi}
\usepackage[cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage{polyglossia}
\setmainlanguage{french}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathrsfs}

(...)


Remove the trick fontspec does for respecting \itshape when \scshape is executed.

\documentclass[a4paper, 12pt]{article}

\usepackage{amsmath}
\usepackage{fontspec}
\usepackage[cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage{polyglossia}
\usepackage{mathrsfs}

\setmainfont{EB Garamond}
\setmonofont{CMU Typewriter Text}
\setmainlanguage{french}

\makeatletter % avoid the adjustment for making \scshape to merge \itshape
\DeclareRobustCommand{\scshape}{%
\not@math@alphabet\scshape\relax\fontshape\scdefault\selectfont
}
\makeatother

\renewcommand{\phi}{\varphi}

\begin{document}

\emph{Lorem \textsc{ipsum} dolor}

$\sin(\phi+\psi)=\sin\phi\cos\psi+\cos\phi\sin\psi$

\end{document}


• Thanks, it works! I knew it was something like this after reading the documentation, but hadn't managed to write it. – sparusaurata Jul 17 '16 at 16:13

Well now, if I wanted something quite as ugly as this (and I accept my taste is probably different from yours), here's how I'd do it. The secret sauce you're looking for is, I think \textup (for "upright"):

\documentclass[12pt]{article}
\usepackage{ebgaramond}
\newcommand{\textscup}[1]{\textsc{\textup{#1}}}
\begin{document}

\emph{Lorem \textsc{ipsum} dolor}

\emph{Lorem \textscup{ipsum} dolor}

\end{document}

• Yes, I know, it's quite ugly, but I only use small caps for surnames (according to French typography rules) and it looked even worse with italics... Thanks for the answer! – sparusaurata Jul 17 '16 at 16:10