I have defined the following
\providecommand*{\lstnumberautorefname}{line}
and within my text
\begin{lstlisting}
|\label{sdd_1}|<sqlCallStatistics>YES</sqlCallStatistics>
\end{lstlisting}
When I now use in my text
xxx. \autoref{sdd_1}
then I receive the following output :
xxxx. line 1
instead of (what I had expected)
xxxx. Line 1
Best Answer
\autoref
doesn't do automatic capitalization, as the following example illustrates:You could use the
cleveref
package to have\cref
(for lower case) and\Cref
(for upper case):Edit: As
MWin123
commented: By default\cref
turns only the number "1" into a hyperlink, while\autoref
makes the whole "line 1" a clickable link. Fortunately there's an optionnameinlink
for it, i.e., you can use\usepackage[nameinlink]{cleveref}