1

Please help \autoref{claim} gives weird references in LNCS template

% This is samplepaper.tex, a sample chapter demonstrating the
% LLNCS macro package for Springer Computer Science proceedings;
% Version 2.20 of 2017/10/04
%
\documentclass[runningheads]{llncs}
%
\usepackage{graphicx}
\usepackage{hyperref}
% Used for displaying a sample figure. If possible, figure files should
% be included in EPS format.
%
% If you use the hyperref package, please uncomment the following line
% to display URLs in blue roman font according to Springer's eBook style:
% \renewcommand\UrlFont{\color{blue}\rmfamily}
\newcommand{\claimautorefname}{claim}
\begin{document}
%
\title{Contribution Title\thanks{Supported by organization x.}}
%
%\titlerunning{Abbreviated paper title}
% If the paper title is too long for the running head, you can set
% an abbreviated paper title here
%
\author{First Author\inst{1}\orcidID{0000-1111-2222-3333} }
%
\authorrunning{F. Author et al.}
% First names are abbreviated in the running head.
% If there are more than two authors, 'et al.' is used.
%
\institute{Princeton University, Princeton NJ 08544, USA \and
Springer Heidelberg, Tiergartenstr. 17, 69121 Heidelberg, Germany
\email{[email protected]}\\
\url{http://www.springer.com/gp/computer-science/lncs} \and
ABC Institute, Rupert-Karls-University Heidelberg, Heidelberg, Germany\\
\email{\{abc,lncs\}@uni-heidelberg.de}}
%
\maketitle              % typeset the header of the contribution
%
\begin{abstract}
The abstract should briefly summarize the contents of the paper in
15--250 words.

\keywords{First keyword  \and Second keyword \and Another keyword.}
\end{abstract}
%
%
%
\section{First Section}

\begin{claim}\label{add}
    adsfsadf
\end{claim}

\autoref{add}

\end{document}

https://www.overleaf.com/read/pqqhkmtvvwdc#45950a

2
  • @AlanMunn It complies without error it has a warning Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `\unskip' on input line 39. see here overleaf.com/read/pqqhkmtvvwdc#45950a
    – Hao S
    Commented Nov 7, 2023 at 3:23
  • There's nothing weird going on. Moreover, your issue is not specific to \autoref -- it arises with \ref as well. The LaTeX \label/\ref (or \autoref) mechanism assumes that the object that is to be cross-referenced is numbered. Unfortunately, this is not the case for the claim environment. Hence, LaTeX has no choice but to associate the argument of \label with the most-recently-incremented counter variable; in your test document, this happens to be the section counter. Let me ask: In your opinion, how should a cross-reference to an unnumbered object look like?
    – Mico
    Commented Nov 7, 2023 at 6:39

0

You must log in to answer this question.

Browse other questions tagged .