2

I am using \cref to refer to different figures in the appendix:

\cref{figure1,figure2,...}

Now I want to create a \pageref{} to it, but I don't know how I can achieve this with multiple pages? So that the first and the last page is given?

  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Doesn't \cpageref do the job? – jub0bs Aug 20 '13 at 15:37
  • @Jubobs How to apply this? – user35428 Aug 20 '13 at 15:44
  • @Jubobs I think that to get only first and last pages of a range it is \cpagerefrange which you need to use – Ludovic C. Aug 20 '13 at 15:47
7

Let say you have three figures respectively on pages 1, 2 and 3. The use of the command

\cpageref{figure1,figure2,figure3}

will yield

pages 1, 2 and 3

However the use of the command

\cpagerefrange{figure1}{figure3}

will yield

pages 1 to 3

NOTE: These two commands are part of the cleveref package.

  • Thanks! But why does \pageref{} give me just the number and not the word "page"? – user35428 Aug 20 '13 at 16:15
  • 1
    Because \pageref{} is not coming from the cleveref package. It is the same thing with the \ref{} which gives only some numbers while \cref{} adds some prefix. – Ludovic C. Aug 20 '13 at 16:20
  • Actually, cleveref also automatically compresses page references by default. So \cpageref{figure1,figure2,figure3} in your example will yield "pages 1 to~3". – Toby Cubitt Nov 21 '13 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.