I'm working on a document that needs to have a cross-reference section at the start of the style:

  1. Evidence 1 found in Paragraph 1.1, 1.2, 1.3
  2. Evidence 2 found in Paragraph 1.2, 2.3, 3.4


I have my document formatted well, and can refer to individual paragraphs exactly as I wish using \label and \ref.

However, I wish to be able to define a label multiple times so that when \ref is called it prints a list of all the labels - not just the last one (as is done currently).

I've looked at using index for this, but can't seem to get it to work in its simplist format, let alone with custom outputs.

Is there anyway to allow \label to be defined multiple times?

  • There is always a way:-) (the standard definition of \@newl@bel that makes that warning is only 7 lines, so you could just redefine it, but first why does not the intended use with multiple \ref to unique labels not work for you and do you need it to work with hyperref (so the references become linked) Mar 26, 2014 at 16:28
  • The intended use with multiple refs and unique labels isn't ideal due to the scale of the number of labels/references that would be required. Mar 26, 2014 at 16:32
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – Ruben
    Mar 26, 2014 at 16:36

2 Answers 2


enter image description here



\def\@testdef #1#2#3{}


good stuff in section(s) \ref{a}

bad stuff in section(s) \ref{b}


  • Thank you for your solution. It looks like it could do the job. I will have a look at this tomorrow and see if I can get to the bottom of how it works! Mar 26, 2014 at 17:19
  • @user1016815 hyperref? Mar 31, 2014 at 13:12

You don't necessarily have to allow multible labels. In addition to @DavidCarlisle cool low-level hack I provide this solution (essentially a custom cross-ref-macro called \eref{<evidence no>}{<label>}) that loops over a internal created list:


\renewcommand{\paragraph}{\refstepcounter{para} \svd@paragraph}

  \expandafter\listadd\csname evlist#1\endcsname{#2}%
  Evidence #1 found at paragraph
  \expandafter\dolistloop\csname evlist#1\endcsname}

\section{First Section}

(Note that you don't have use lines 6-9 if you don't use \paragraph in your document structure.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .