TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a document divided into \part \chapter \section and \subsection. I have 3 parts and in each part I reset all the counters.

I want that, when I do a crossref to something that is in the 1st part, chapter 3 and section 5, that LaTeX prints something like I-3.5, but I don't want that in the tableofcontents part that LaTeX prints the part number. For example, what I want is:

Part I

chapter 1 section 1.1 section 1.2

chapter 2


chapter I-1 section I-1.1 section I-1.2

chapter I-2

The command that I've tried


does exactly what I've said

Can anyone help me?

share|improve this question

The macro \p@<counter> is added as prefix for references, thus the following should do the trick:



\ref{sec:firstfirstfirst} and \ref{sec:firstfirstsecond}
\part{First part}
\chapter{First chapter in first part}
\section{First section in first chapter in first part}
\part{Second part}
\chapter{First chapter in second part}
\section{First section in first chapter in second part}
share|improve this answer
Thank you very much – Rui Martins Oct 9 '12 at 16:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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