Is there a way to attach a label to a string and then refer to that string with a reference?
For example,
\labelText{This is a text that is also a tag}{label:text}
and then refer to this string with \ref{label:text} where the string will serve as a tag itself.
Why I need it? I am writing a pseudo code and using a command go to #line number but the line number might change if I insert extra line in the code.
With referencing this will be avoided.


\ref{label:text}the text "This is a text that is also a tag" should appear, I assume? – Oct 04 '15 at 14:04\hypertarget{label}{target caption}and\hyperlink{label}{link caption}fromhyperrefpackage http://texdoc.net/texmf-dist/doc/latex/hyperref/manual.html#x1-140004 – touhami Oct 04 '15 at 15:15