[Tex/LaTex] Cross-Reference with custom text

cross-referencing

Is there a way to make a cross reference to a label of a header with custom text? That is, its text should differ from the Header text, or its number or page (not like the predefined formats in Lyx). Something like the the hyperlinks or bookmarks in MS word, and in such a way that I can write the different text for each cross-reference individually. I'm not looking to define a new format for the references.

For example, if the header text is "State and Path functions", I want to make a cross reference to it with the text "state function".

Best Answer

With the package hyperref you can use the optional argument of \hyperref to reference a \label with arbitrary text:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{Hello World}
\label{sec:hello}
Reference to \hyperref[sec:hello]{this section}.
\end{document}

Result