0

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.

Luca Benatti
  • 415
  • 2
  • 8
  • 1
    If what you want to print is the literal "This text", you can just define \newcommand{\mytext}{This text} and then call on \mytext wherever you want it to appear. – barbara beeton Jul 26 '23 at 17:47
  • I also want the hyperlink like the classic \cref does. – Luca Benatti Jul 26 '23 at 19:23
  • 1
    See https://tex.stackexchange.com/questions/236626/refer-to-the-name-of-an-equation-while-a-list-of-equations-is-generated-using although a solution using \@currentlabel might be more portable. – John Kormylo Jul 26 '23 at 21:31

0 Answers0