I am trying to add more labels to an equation. I want to refer to the text in the equation and to the equation separately. The code has to fit the following preamble (I have a solution that has some problem with hypertexnames=false in the hyperref package and with the autonum package)
\documentclass[reqno,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[italian,english]{babel}
\usepackage[colorlinks, citecolor=citegreen,%
linkcolor=refred,urlcolor=blue, unicode,psdextra,hypertexnames=false]{hyperref}
\usepackage{cleveref}
\usepackage{autonum}
\begin{document}
\section{prova}
\begin{equation}
\label{eq:label}
f(x)=a\qquad \text{\labeltext{This text}{text:label}}
\end{equation}
\cref{text:label}
\end{document}
I would like to print "This text" when \cref{text:label} is invoked. I tried writing on the .aux file using \newlabel, but I can not use it with the above packages and options.
\newcommand{\mytext}{This text}and then call on\mytextwherever you want it to appear. – barbara beeton Jul 26 '23 at 17:47\crefdoes. – Luca Benatti Jul 26 '23 at 19:23\@currentlabelmight be more portable. – John Kormylo Jul 26 '23 at 21:31