[Tex/LaTex] How to disable the linking for figures in LyX

cross-referencinghyperreflyx

I am currently writing a document in LyX and I'm using hyperref to have links in the ToC, citations etc. The problem is that I added a figure (with float) and when I make a cross-reference in the text, the reference itself becomes a link that leads to the page that contains the actual figure. For example:

------Sample Graphic-------

Figure 1.1: Example of a graphic

And in the text that follows:

As we can see in figure 1.1 there is...

Now if I hover the mouse over 1.1 there is a link pointing to the location of the actual figure. Is there any way to disable the links for figures? Perhaps using "hypersetup" or a renewcommand…?

Best Answer

You could use the starred form \ref* to suppress the link. If you want to suppress all links for cross-references in your document, you could write

\makeatletter
\let\ref\@refstar
\makeatother

after \begin{document}. With LyX that means, insert it as ERT at the beginning of your document.

Note, this definition wouldn't work this way in the preamble because hyperref makes changes after the preamble. So, it might be done with \AtBeginDocument{...} after loading hyperref but I guess the simple solution may be sufficient.