# Superscript not working in footnotes in tex4ht output

When I use \textsuperscript in footnotes (in memoir class, compiled with xetex), tex4ht fails to make the text in question superscript, even though it does so successfully in the main body text.

I suspect this might be related to the same configurations which Michal Hoftich (@michal.h21) used to fix the behavior of superscript in the main body text a year ago.

Is there a way to make the superscript work in the footnotes too?

MWE:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt,article,oldfontcommands]{memoir}

\begin{document}

%%%%%%%%%%%%%%%%%%%%
%%%    My text goes here:    %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%

Superscript works in the text: 23\textsuperscript{r}.

But not in the footnote.\footnote{23\textsuperscript{r}.}

%%%%%%%%%%%%%%%%%%%%
%%%    My text ends here:    %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%

\end{document}


Current result:

• TeX.SE isn't a good place for posting bug reports. Have you tried contacting the maintainer of tex4ht directly with the concerns expressed in your five postings? – Mico Feb 9 at 7:55
• Thanks @Mico, I will post a link to this question on the tex4ht mailing list. – Alex Roberts Feb 9 at 14:58

The issue is that configuration for footnotes disables superscript with \let\@textsuperscript\hbox. It needs to be disabled in the footnote mark, spurious elements would be generated otherwise. After the footnote mark had been printed, it is no longer necessary. I've modified tex4ht sources in order to keep this only in the footnote mark. Because TL 2018 is frozen, the change will be available only in the TL 2019 pre-test. The changed ooffice.4ht file can be downloaded here.