# How do I get a chapter \ref in counting numbers when the ToC uses Roman numerals?

My university's formatting requirements for theses require Roman numerals for chapters in the table of contents (e.g. "Chapter II ..... Lions"), but for references to chapters within the text, counting numbers are preferred (e.g. "Chapter 2 is about lions.").

When I use the \ref command to generate chapter references (e.g. "Chapter \ref{chap:lions} is about lions"), I get Roman numerals instead of counting numbers (e.g. "Chapter II is about lions."). How do I get counting number instead?

-
What \documentclass are you using? Is it a specific class from your university? Please provide a link to this. Otherwise, are you restricted in terms of the packages you're allowed to use? –  Werner Nov 5 '12 at 16:54
What numbers (Roman or arabic) should the actual chapter heading use? What about a running header? –  lockstep Nov 5 '12 at 16:55
The document class is a report: \documentclass[reqno,12pt,oneside]{report}, and here's a link to the actual style files I'm using: aoss.engin.umich.edu/pages/current/dissertation-template –  Abe Nov 5 '12 at 17:07
The chapter heading itself is roman, and there is no running header. –  Abe Nov 5 '12 at 17:09

The following example redefines \thechapter to contain both the \arabic and \Roman form of the chapter number:

\ArabicRomanChapter{<arabic number>}{<Roman number>}


Macro \ArabicRomanChapter is defined to ignore the first argument, thus that the \Roman number is printed in the chapter heading and the table of contents.

In case of references, macro \p@chapter is added in front of the chapter number. Usually this macro is empty, but in this case it removes the \ArabicRomanChapter and the argument <Roman number> to keep the argument <arabic number> for the references.

\documentclass{report}

\makeatletter
\protected\def\ArabicRomanChapter#1#2{#2}%
\renewcommand*{\thechapter}{%
\ArabicRomanChapter{\arabic{chapter}}{\Roman{chapter}}%
}
\renewcommand*{\p@chapter}{%
\expandafter\expandafter\expandafter
\@p@chapter
}
\newcommand*{\@p@chapter}[3]{#2}%
\makeatother

\begin{document}
\tableofcontents
\chapter{My chapter}
\label{chap:my}
See chapter \ref{chap:my}.
\end{document}


I have not given an example for \sections, because I do not know, how their numbers should be formatted.

-
When I read the question I thought for a short moment, that this wouldn't be possible (at least doing so doesn't make any sense to me). And then there's a solution in less than ten lines of code... fascinating. –  Benedikt Bauer Nov 5 '12 at 20:11