\NeedsTeXFormat{LaTeX2e}
\def\superiorsVersion{1.04}
\def\superiorsDate{2014/01/18}
\ProvidesPackage{superiors}[\superiorsDate\space-\space\superiorsVersion
 superiors (License LPPL) Michael Sharpe]
\RequirePackage{xkeyval}

\def\supstfm{ntxsups}
\newdimen\superiors@scale
\def\superiors@raised{\z@}
\def\superiors@spaced{\z@}
\def\superiors@scaledval{1.0}
\def\superiors@supscale{1.0}
\define@key{superiors}{scaled}[1.0]{\def\superiors@scaledval{#1}}
\define@key{superiors}{supscaled}[1.0]{\def\superiors@supscale{#1}}
\define@key{superiors}{raised}[\z@]{\def\superiors@raised{#1}}
\define@key{superiors}{supstfm}[ntxsups]{\def\supstfm{#1}}
\define@key{superiors}{supspaced}[\z@]{\def\superiors@spaced{#1}}
\DeclareOption*{%
  \begingroup
  \edef\x{\endgroup
    \noexpand\setkeys{superiors}{\CurrentOption}}%
  \x}

\ProcessOptions*

\setlength{\superiors@scale}{\superiors@scaledval\p@}
\superiors@scale=\superiors@supscale\superiors@scale %
\def\superiors@scaled{s*[\strip@pt\superiors@scale]}
\let\superiors@makefnmark\@makefnmark

\DeclareFontFamily{U}{zsups}{}%
  \DeclareFontShape{U}{zsups}{m}{n}{%
    <-> \superiors@scaled \supstfm
}{}
\DeclareRobustCommand{\sustyle}{%
  \not@math@alphabet\sustyle\relax
  \usefont{U}{zsups}{m}{n}}

\def\textsu#1{\raisebox{\superiors@raised}{\hbox{{\sustyle#1}}}}

%\def\@makefnmark{\hbox{\textsu{\hspace*{\superiors@spaced}\@thefnmark}}}
\def\f@@tn@te{footnote}
\def\@makefnmark{%
    \ifx\@mpfn\f@@tn@te% we're not in a minipage
        \hbox{\sustyle\hspace*{.04em}\@thefnmark\hspace*{.03em}}%
    \else% minipage---use original def
        \superiors@makefnmark%
    \fi%
}

\endinput