# Why can't I combine superscript and small caps in my beamer presentation?

I'm having trouble combining superscript and small caps for an individual word in my Beamer presentation. I haven't found any answers on the topic. Here is a MWE:

\documentclass[17pt,t,compress]{beamer}
\usepackage{graphicx}

\usepackage[english,russian]{babel}
\usepackage{fontspec,xltxtra,xunicode}
\setsansfont{brill.ttf}

\setmainfont[
BoldFont=brillb.ttf,
ItalicFont=brilli.ttf,
BoldItalicFont=brillbi.ttf
]{brill.ttf}

\input{pre}
\begin{document}
\begin{frame}
\textsuperscript{\textsc{why only small caps?}} this is confusing. \\
\textsc{\textsuperscript{why only small caps?}} this is confusing too.
\textsuperscript{why only small caps?} superscript alone seems to work well.
\end{frame}
\end{document}


• Remove xltxtra and xunicode – egreg Nov 13 '17 at 14:27
• @egreg Would you like to write an answer? – samcarter_is_at_topanswers.xyz Nov 16 '17 at 10:58
• @samcarter Added – egreg Nov 16 '17 at 11:11

The problem is similar to Bad superscript with authblk / xltxtra and the culprit is xltxtra that loads realscripts which in the case of Brill breaks superscripts, because the font doesn't feature the necessary glyphs.

Just remove xltxtra and also xunicode that's no longer needed with recent versions of fontspec.1 Just load fontspec:

\documentclass[17pt,t,compress]{beamer}
\usepackage{graphicx}

\usepackage[english,russian]{babel}
\usepackage{fontspec}

\setsansfont{Brill} % or with your call, I have it in my system fonts

\begin{document}
\begin{frame}
\textsuperscript{\textsc{why only small caps?}} this is confusing. \\
\textsc{\textsuperscript{why only small caps?}} this is confusing too.
\textsuperscript{why only small caps?} superscript alone seems to work well.
\end{frame}
\end{document}


1 The story is long. At the beginning there was fontspec, then xunicode was released for adding support for characters to be input with commands and xltxtra was introduced for easing the loading of both packages; later versions of fontspec did load xunicode, so xltxtra was no longer needed. With more recent releases of fontspec, xunicode should not be loaded. Unfortunately, several templates still load xltxtra, which is wrong.