# superscripts with xelatex? (footnotes, natbib)

This example illustrates some conflict between xelatex and natbib- and footnote-generated superscripts. The semi-colon between distinct citations is not typeset as a superscript, nor is the dagger. The asterisk, however, looks fine to me. Any suggestion on how to make these auto-generated superscripts look more normal?

Update Mostly fixed, see second screenshot below.

Update 2 Fully fixed! Alter the MWE below with this code:

\DefineFNsymbols*{safestar}{{$*$}{\textdagger}{\textdaggerdbl}{\textsection}
{\textparagraph}{\textbardbl}{$**$}{\textdagger\textdagger}
{\textdaggerdbl\textdaggerdbl}{\textsection\textsection}
{\textparagraph\textparagraph}{\textbardbl\textbardbl}}
\setfnsymbol{safestar}


This comes c/o Achim Blumensath on the MinionPro mailing list, together with docs for the footmisc package.

\documentclass[article, a4paper, 12pt, oneside]{memoir}

\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra} % c/o @wasteofspace, this is the "offending" line
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Linux Libertine O}

\usepackage[super]{natbib}
\usepackage[perpage,symbol]{footmisc}

\let\sc\scshape
\let\bf\bfseries
\let\it\itfamily

\setlrmarginsandblock{23mm}{23mm}{*}
\setulmarginsandblock{23mm}{198mm}{*}
\checkandfixthelayout

\begin{document}

\bibliographystyle{plainnat}
\setcitestyle{nature}
\thispagestyle{empty}

This is a nice\footnote{(That is to say, minimal.)}
example.\cite{lenat1976artificial,lenat1984and} Unfortunately, it has
some problems.\footnote{From an aesthetic point of view.}

\bibliography{corneli}{}

\end{document}


But if we don't load xltxtra, then we get this other slightly problematic result:

I guess I can live with the small and over-elevated asterisk. It looks less bad when it follows a period.

-
as a triangulation point, does the realscripts package help, or make things worse? fwiw, i can't see any reason that this should happen in footmisc, but your compilation output looks dire on this screen (and my home latex doesn't have xelatex to experiment with...) –  wasteofspace Oct 12 '12 at 18:39
@wasteofspace: That points to a (partial) solution. "The [realscripts] package holds functions that were once parts of the xltxtra package, which now loads realscripts by default." If I comment out xltxtra above, things are better. The only problem is that now the asterisk is tiny, and too far up! –  Joe Corneli Oct 12 '12 at 19:36

I understand that the problem is fixed. Nevertheless let me try to explain what this “conflict” is about.

The problem is not xltxtra per se but the fact the it redefines \textsuperscript to use actual superior glyphs. Quoting the manual:

2.1 \textsuperscript and \textsubscript

These two macros have been redefined to take advantage, if possible, of actual superior or inferior glyphs in the main document font. This is very important for high-quality typesetting

The standard definition of \textsuperscript essentially uses ^{} to create the superscript. Now, when using \textsuperscript with xltxtra (or superiors directly) and the font doesn't have the character as superior glyph it is replaced with the normal one:

\documentclass{article}
\usepackage{fontspec}

\begin{document}
\setmainfont{Minion Pro}
foo%
\textsuperscript{123,456 * \textdagger}% vs standard

\setmainfont{Linux Libertine O}
foo%