3

Possible Duplicate:
superscripts with xelatex? (footnotes, natbib)

i want to use \supercite with biblatex. It works fine, unless I switch to LinuxLibertine. The font messes up the 'superscripted' comma and - line.

Btw: I use XeLaTeX.

Picture: enter image description here

Minimal Example:

\documentclass{article}

\usepackage[style=numeric-comp]{biblatex}

\usepackage{fontspec,xunicode}
\usepackage{xltxtra}


% ACTIVATE TO SEE EFFECT
\setmainfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Mapping=tex-text]{Linux Biolinum O}



\usepackage{filecontents}

\begin{filecontents}{test.bib}
@book{kastenholz,
      author = {Author, A.},
               year = {2001},
                      title = {Alpha},
}
@book{companion,
      author = {Buthor, B.},
               year = {2002},
                      title = {Bravo},
}
@article{augustine,
         author = {Cuthor, C.},
                  year = {2003},
                         title = {Charlie},
}
\end{filecontents}

\addbibresource{test.bib}

\let\cite=\supercite
\begin{document}

Note the comma \cite{augustine,companion} and the underline \cite{augustine,companion,kastenholz}.

\printbibliography
\end{document}    
bioslime
  • 1,153
  • 2
    This is the same problem as in superscripts with xelatex? (footnotes, natbib) and it is due to xltxtra's redefinition of \textsuperscript – cgnieder Nov 23 '12 at 17:31
  • 2
    Don't use xltxtra. Or at least read its document to understand the source of the problem (2.1 \textsuperscript and \textsubscript). – Ulrike Fischer Nov 23 '12 at 17:33
  • Ah, thanks that solves it. I still had it loaded as it was included in some xetex tutorial. I guess i just skip it then. – bioslime Nov 23 '12 at 17:50
  • Compiling your MWE, I don't get the wrong superscript symbols: http://i.stack.imgur.com/aE8aP.png. Do you have all the latest updates for libertine? I just updated mine (MiKTeX 2.9) today. – doncherry Nov 23 '12 at 18:08
  • @doncherry that's curious... I have version 5.3.0 of the fonts installed (which I believe to be the current release) and don't see a superior comma or endash when I compile the code... – cgnieder Nov 23 '12 at 18:27
  • @doncherry Taking a closer look at the image you posted you don't seem to use superiors at all (which are the source of the problem) – cgnieder Nov 23 '12 at 18:30
  • @cgnieder You're right .. that's probably because for some reason, type 1 fonts were used instead of some OpenType format (Requested font "Linux Libertine O" at 10.0pt -> C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/libertine/LinLibertine O.pfb. That actually explains why I've always had trouble using OpenType features when using \setmainfont{Linux Libertine O} .. I instead used \usepackage{libertineotf}. I'll look into this a little more and perhaps turn it into a question. – doncherry Nov 23 '12 at 18:37
  • @bioslime That means: Ignore my first comment :) (Using libertineotf, I get the same problem that you have.) – doncherry Nov 23 '12 at 18:38
  • So this is answered, right? – mafp Dec 21 '12 at 23:29

2 Answers2

1

As others have commented: this is an issue with the redefinition of \textsuperscript. For a complete explanation see this answer.

In short: xltxtra redefines \textsuperscript to make use of superscript provided by the OpenType font. This can lead to undesired behaviour.

The easiest solution is not to load the xltxtra package. But if you really need xltxtra you can use the following:

\let\textsuperscriptoriginal\textsuperscript % Save original command
\usepackage{xltxtra}                         % Load package
\let\textsuperscript\textsuperscriptoriginal % Restore original command
Silke
  • 10,511
  • 1
    BTW: I asked the Libertine developers if they could add a superior comma and they responded positively. – cgnieder Dec 24 '12 at 15:01
  • 10 years down the line, the absence of either a superior comma or period in the Libertine font makes all the rest of the great superior numbers and letters completely useless. I wonder why they have not acted on this yet. – Aubrey Blumsohn Nov 02 '22 at 18:30
0

I cannot see it with:

\documentclass{article}
\usepackage[style=numeric-comp]{biblatex}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Mapping=tex-text]{Linux Biolinum O}
... 

all other packages are installed by fontspecitself.