# Superscript in enumerate/paralist labels

When setting a label type like \begin{inparaenum}[a)] in paralist it will treat a,1,i as a special character and increment it accordingly as long as it isn't in a {} group. I want the labels to be superscript upright a,b,c like:

a first thing b second thing c and another thing

I can't use enumitem (I know it can do this). If you try it in enumerate or paralist packages (or enumitems with oldenum) you have the problem that \textsuperscript etc. put the a in braces and so it isn't incremented, and using mathmode like $^a$ works (in italic), but then trying to use \text or \mathrm has the same problem.

How can I make paralist use superscript upright labels?

Here are two failed attempts, and one example that works, but using the forbidden enumitems.

\documentclass{article}

\usepackage{paralist}
\usepackage[inline]{enumitem}

\begin{document}
\medskip{}

\begin{inparaenum}[a)]
\item one
\item two
\item three
\end{inparaenum}
\medskip{}

\begin{inparaenum}[$^a$]
\item one
\item two
\item three
\end{inparaenum}
\medskip{}

\begin{enumerate*}[label=\textsuperscript{\alph*}]
\item one
\item two
\item three
\end{enumerate*}
\end{document}


which gives:

Here it is:

\documentclass{article}
\usepackage{paralist}

\begin{document}

\begin{inparaenum}[\expandafter\textsuperscript a ]
\item First item,
\item Second item.
\end{inparaenum}
\bigskip

\begin{asparaenum}[\expandafter\textsuperscript a ]
\item First item
\item Second item
\end{asparaenum}

\begin{enumerate}[\expandafter\textsuperscript a ]
\item First item
\item Second item
\end{enumerate}

\end{document}


• Perfect. I don't know how I'd ever find an answer like this without reading the whole TeX books, or asking here. – Sean D Sep 2 '17 at 0:30
• I didn't read the whole TeX books, but I happen to have met problems solved with \expandafter, so I tried, just in case… and it worked. – Bernard Sep 2 '17 at 0:35

If there no such thing in paralist, why don't you define your's?

\documentclass{article}

\usepackage{paralist}

\makeatletter
\def\inparaenumsup{%
\ifnum\@enumdepth>\thr@@
\@toodeep
\else
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\fi
\@ifnextchar[{\@enumlabel@{\@inparaenum@sup}[}{\@inparaenum@sup}}
\def\@inparaenum@sup{%
\usecounter{\@enumctr}%
\def\@itemlabel{\csname label\@enumctr\endcsname}%
\let\@item\pl@item
\def\makelabel##1{\textsuperscript{##1}}%
\ignorespaces}
\makeatother

\pagenumbering{gobble}

\begin{document}

The superscript version (bare):

\begin{inparaenumsup}[a]
\item first thing
\item second thing
\item and another thing
\end{inparaenumsup}

The superscript version (with parenthesis):

\begin{inparaenumsup}[(a)]
\item first thing
\item second thing
\item and another thing
\end{inparaenumsup}

And the original version is untouched:
\begin{inparaenum}[a]
\item first thing
\item second thing
\item and another thing
\end{inparaenum}

\end{document}


How It Works?

We are creating a new type of list called inparaenumsup by hacking into the internals of paralist.

Actully, we touch the definition of \makelabel and change it from \def\makelabel##1{##1} to \def\makelabel##1{\textsuperscript{##1}}