[Tex/LaTex] Command \textsuperscript unavailable in encoding TU

hyperrefluatexpdfx

Consider the following MWE using pdfx v1.5.8:

\documentclass{article}
\usepackage[a-2b]{pdfx}
\begin{document}
Text\textsuperscript{Text}
\end{document}

Since updating my MiKTeX packages today, I get

Command \textsuperscript unavailable in encoding TU.

when using LuaTeX, Version 1.0.4 (MiKTeX 2.9.6300 64-bit) and

Command \textsuperscript unavailable in encoding OT1.

when using pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6300 64-bit). Additionally, the warning

Wrong driver `hpdftex.def';(hyperref) pdfTeX is running in PDF mode.

appears as described in LuaLaTeX and PDFX result in hyperref warning. Before updating the packages, this example worked perfectly. Do you have any ideas how to fix this?

Best Answer

This has been discussed last year in the chat http://chat.stackexchange.com/transcript/message/31191393#31191393.

pdfx make \textsuperscript encoding dependant but doesn't setup a suitable default. Something like this should work:

\documentclass{article}
\let\tmpa\textsuperscript
\DeclareTextCommandDefault{\textsuperscript}{\tmpa}

\usepackage{pdfx}

\begin{document}

Text\textsuperscript{Text} 
\end{document}
Related Question