4

The realscripts package does not seem to have any impact in TeXLive 2017 (MacTeX) when compiling with XeLaTeX. I updated my TeX distribution yesterday, and I notice that my footnote marks are no longer real superscripts. I have tested with Linux Libertine O. The document compiles fine otherwise. Any help will be appreciated.

A MWE:

\documentclass{article}
\usepackage{fontspec,realscripts}
\setmainfont{Linux Libertine O}

\begin{document}
A\textsuperscript{1234567890}Z A\textsuperscript*{1234567890}Z
A\realsuperscript{1234567890}Z \\
Some text.\footnote{A footnote.}
\end{document}
  • I can confirm: it uses real superscripts with TL 2015, but not with TL 2016 and 2017. This for XeLaTeX, as with LuaLaTeX (TL 2017) it works fine. – egreg Jun 8 '17 at 12:03
  • Yes. It seems to compile fine with LuaLaTeX but not with XeLaTeX. – user10050 Jun 8 '17 at 12:11
5

The code for \realsuperscript reads

\DeclareDocumentCommand \realsuperscript {m} {
  \fontspec_if_fontspec_font:TF
  {
    \fontspec_if_opentype:TF
    { \fontspec_if_feature:nTF {+sups}
      { {\addfontfeature{VerticalPosition=Superior}#1} }
      { \fakesuperscript{#1} }
    }
    { \fontspec_if_aat_feature:nnTF {10} {1}
      { {\addfontfeature{VerticalPosition=Superior}#1} }
      { \fakesuperscript{#1} }
    }
  }
  { \fakesuperscript{#1} }
}

However, with TL 2016 and later, the test

\fontspec_if_feature:nTF {+sups}

returns false with XeLaTeX and true with LuaLaTeX.

Temporary workaround:

\documentclass{article}
\usepackage{fontspec,realscripts}
\setmainfont{Linux Libertine O}

\ExplSyntaxOn
\DeclareDocumentCommand \realsuperscript {m} {
  \fontspec_if_fontspec_font:TF
  {
    \fontspec_if_opentype:TF
    { \fontspec_if_feature:nTF {sups}
      { {\addfontfeature{VerticalPosition=Superior}#1} }
      { \fakesuperscript{#1} }
    }
    { \fontspec_if_aat_feature:nnTF {10} {1}
      { {\addfontfeature{VerticalPosition=Superior}#1} }
      { \fakesuperscript{#1} }
    }
  }
  { \fakesuperscript{#1} }
}
\ExplSyntaxOff

\begin{document}

A\textsuperscript{1234567890}Z A\textsuperscript*{1234567890}Z
A\realsuperscript{1234567890}Z \\
Some text.\footnote{A footnote.}
\end{document}

enter image description here

Issue filed at https://github.com/wspr/fontspec/issues/293

  • Thanks. This workaround works, though I now have lot of extra code in my preamble. Any idea how this can be reported to the realscripts package maintainer? – user10050 Jun 8 '17 at 12:33
  • @user10050 I filed an issue report at the github repository – egreg Jun 8 '17 at 15:32

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.