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.



\chapter{My chapter}
See chapter \ref{chap:my}.

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

|improve this answer|||||
  • 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

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.