![Como vincular palavras com inteligência?](https://rvso.com/image/391720/Como%20vincular%20palavras%20com%20intelig%C3%AAncia%3F.png)
É possível vincular uma palavra ao significado no final do arquivo com cleveref
?
Aqui está um MWE do meu 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}
Gostaria que o nome chita na frase fosse um link para o significado no final do documento e quando liguei \cref{cheetah}
mostrasse apenas o nome chita e não um número.
Responder1
Há boas e más notícias. A má notícia é que você não pode usar \label
e \cref
para atingir seu objetivo de referência cruzada. Isso ocorre porque, dada a sua configuração, o LaTeX não pode se associar de forma significativa \label
a uma variável de contador incrementada recentemente.
Mas também há boas notícias! Você pode atingir totalmente seu objetivo de composição usando as macros \hyperlink
e \hypertarget
do hyperref
pacote. Ambos \hyperlink
e \hypertarget
são macros que aceitam dois argumentos. O primeiro deve ser o mesmo – cheetah_def
no exemplo abaixo. O segundo é de formato livre -- cheetah
e \textbf{Cheetah}
, respectivamente, no exemplo abaixo.
\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}