![¿Cómo vincular palabras con Cleveref?](https://rvso.com/image/391720/%C2%BFC%C3%B3mo%20vincular%20palabras%20con%20Cleveref%3F.png)
¿Es posible vincular una palabra al significado al final del archivo con cleveref
?
Aquí hay un MWE de mi código:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
Today I ran like a \label{cheetah}cheetah and it was amazing to feel the wind.
\pagebreak
\cref{cheetah}: is a large cat of the subfamily Felinae that occurs in North, Southern and East Africa, and a few localities in Iran. It inhabits a variety of mostly arid habitats like dry forests, scrub forests, and savannahs.
\end{document}
Desearía que el nombre cheetah en la oración pudiera ser un enlace al significado al final del documento y cuando \cref{cheetah}
lo llamé solo mostrara el nombre cheetah y no un número.
Respuesta1
Hay buenas y malas noticias. La mala noticia es que no puede utilizar \label
y \cref
para lograr su objetivo de referencias cruzadas. Esto se debe a que, dada su configuración, LaTeX no puede asociarse de manera significativa \label
con una variable de contador incrementada recientemente.
¡Pero también hay buenas noticias! Puede lograr plenamente su objetivo de composición tipográfica utilizando las macros \hyperlink
y \hypertarget
del hyperref
paquete. Ambos \hyperlink
y \hypertarget
son macros que toman dos argumentos. El primero debe ser el mismo, cheetah_def
en el ejemplo siguiente. El segundo es de formato libre cheetah
y \textbf{Cheetah}
, respectivamente, en el siguiente ejemplo.
\documentclass{article}
\usepackage{hyperref}
\begin{document}
Today I ran like a \hyperlink{cheetah_def}{cheetah} and
it was amazing to feel the wind.
\pagebreak
\noindent
\hypertarget{cheetah_def}{\textbf{Cheetah}}: A large cat
of the subfamily Felinae that occurs in North, Southern
and East Africa, and a few localities in Iran. It inhabits
a variety of mostly arid habitats such as dry forests,
scrub forests, and savannahs.
\end{document}