2

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:

\newcommand{\chapref}[1]{\def\thechapter{\roman{chapter}}\ref{#1}}

(this changed the counter format globally)

or

\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?

2
  • @firstshot: What is the problem with your solution? Please help use helping you. 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
5

The command

\def\thechapter{\roman{chapter}}

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:

\def\theequation{\arabic{chapter}.\arabic{equation}}
2
  • @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. Jul 1 '11 at 9:19

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.