TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 would like to refer to a chapter (roman numbering) partly with arabic numerals (e.g. as part of equation numbers) and partly with roman numerals (e.g. when refering directly to the chapter) ...

I've tried sth like:


(this changed the counter format globally)


\newcommand{\chapref}[1]{\uppercase\expandafter{\romannumeral \ref{#1}}}

(in may case: compiled without warning but no effect..)

but this didn't work out ... any ideas?

share|improve this question

migrated from stackoverflow.com Jun 30 '11 at 16:51

This question came from our site for professional and enthusiast programmers.

@firstshot: What is the problem with your solution? Please help use helping you. – Paŭlo Ebermann Jun 30 '11 at 15:14
Don't redefine \thechapter if what you really want to do is change how \theequation looks: this will lead to other changes you don't want. Since it's \theequation you want to look differently, redefine that. – Seamus Jun 30 '11 at 16:57

The command


switches the default chapter numbering to roman numerals. You should do this once, at the start. To use arabic numbers in the equation numbers, define these, too:

share|improve this answer
@Paŭlo Ebermann and Seamus: Thanks a lot - actually I primarly wanted to use the arabic style and only occasionally the roman style - hence I was thinking the wrong way :) Your solution works perfectly fine! Ok, u probably know it - but maybe not everyone else out there ... so I used: 1. \def\thechapter{\Roman{chapter}} 2. \def\thesection{\arabic{chapter}.\arabic{section}} 3. \def\thesubsection{\arabic{chapter}.\arabic{section}.\arabic{subsection}} 4. \def\theequation{\arabic{chapter}.\arabic{equation}} 5. \def\thetheorem{\arabic{chapter}.\arabic{theorem}} Thanks for the help! cheers! – firstshot Jul 1 '11 at 8:35
@firstshot: Welcome to TeX.sx! Please mark this answer as the solution by clicking the tick-mark on the left side. This marks the question as solved automatically. Please do not edit the title for this. Also posts in this section are for solutions only, so I converted your post, which is mostly a thank-you post, to a comment. You are very welcome to post your final solutions as own answers if required. However, in this simple case I would say the comment is sufficient. – Martin Scharrer Jul 1 '11 at 9:19

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.