[XeTeX] Super/subscript
Bruno Voisin
bvoisin at mac.com
Mon May 28 10:59:36 CEST 2007
Le 28 mai 07 à 08:20, Will Robertson a écrit :
> LaTeX already provides \textsuperscript, and \textsubscript if you
> load the fixltx2e package. If you also also load the xltxtra package,
> you probably want to use \textsuperscript*{...} instead if there are
> sups characters in the font you're using but not many.
Hi Will,
I think there's a problem with the way xltxtra.sty modifies
\textsuperscript (and similar for other commands, maybe).
Take the following example:
\documentclass[12pt]{article}
\usepackage{fontspec,xunicode}
%\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setromanfont{Verdana}
\begin{document}
Superscript example: 1\textsuperscript{st} and 2\textsuperscript{nd}
attempts.
\end{document}
Without the xltxtra package loaded, the example typesets fine (at
least on Macs, on which Verdana is I think pre-installed). With the
xltxtra package loaded, the console log contains error messages such as:
Package fontspec Warning: AAT feature
'VerticalPosition=Superior' (10,1) not av
ailable in font '"Verdana/AAT" at 12.0pt' on input line 9.
and the superscripts are no longer superscripts in the PDF output.
You can fix that by using \textsuperscript* instead of
\textsuperscript, but I think that shouldn't be: once you've done
that change, you input text would no longer typeset in standard LaTeX.
I don't think that's how things should work. Backward compatibility
should always be aimed at. It would be better that xltxtra first
tests whether VerticalPosition=Superior is available, and if so
reimplement the definition of \textsuperscript to use it, and if not
leave \textsuperscript unchanged; or, similar to what many package do
(think for example of all the options of the lucidabr package),
provide options allowing the user to activate or disactivate
selectively specific functions of the xltxtra package.
If none of the above is possible, then I think it should be
\textsuperscript that retains the behaviour of the original
\textsuperscript, and \textsuperscript* that offers a modified version.
Bruno
More information about the XeTeX
mailing list