[Tex/LaTex] Label a word or sentence


Is it possible to refer to a word in a sentence?

Example: Hi, I love\label{Word: Love} learning so I ask a lot of questions.

I would like to refer to the word "love" in the above sentence. For instance:

"I `ref{Word: Love}` you" would then read "I love you" but with "love" being clickable etc.

Is this possible?

(I know there are some related question here, but they are too complicated and different from the present one. I believe I have a simple and to the point question. )

Best Answer

You have somehow to mark the word you want to refer to:




Some text just to see where the link will point to

Hi, I \setword{l\'ove}{Word:Love} learning so I ask a lot of questions.


"I \ref{Word:Love} you"


Note the usage of the accent in order to show that it works even with special characters.

enter image description here

Related Question