2

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:

image

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}

(...)
2

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}

enter image description here

  • 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
2

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}
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.