\documentclass{article}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{polski}
\begin{document}
\begin{figure}
.
\caption{A figure}
\label{fff}
\end{figure}
\lipsum[1]
Rysunek~\ref{fff} jest zabawny, bo na rysunku~\ref{fff} nic nie ma.
\end{document}
In this sample, a clickable link is added to output PDF for 1
and 1
. I want to be able to change them to Rysunek 1
and rysunku 1
. I want to be able to put any other text + number of the figure into a hyperlink.
The word rysunek
can't be set in preamble as a default because there is a declension in Polish.
The same question goes for tables, listings, equations, pages (pageref
) etc (basically any reference).
HTML equivalent of my MWE:
Rysunek <href="fff">1</a> jest zabawny, bo na rysunku <a href="fff">1</a> nic nie ma.
I want it to be:
<href="fff">Rysunek 1</a> jest zabawny, bo na <a href="fff">rysunku 1</a> nic nie ma.
Best Answer
The explanation of
\labelcref
in the documentation ofcleveref
is not very clear, but it seems to produce only the label, without any attached string.A possibility would be to say
so that the output of
would be what you're expecting. I'm afraid you have to set
\crefformat
in a similar way for all the reference types you're going to use.