Take the 2-minute tour ×
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.

I tried to change the page number into Romannumeral with

    \setuppagenumbering[conversion=romannumerals]

but it did nothing. I had to use a macro to achieve that:

    \def\RomanNumeral#1{\uppercase\expandafter{\romannumeral#1}}
    \setuppagnumbering[command=\RomanNumeral]

But it is wrong, it seems that ConTeXt inserts some characters just after \romannumeral.

The first example is given in Page 88 of the manual.

share|improve this question
1  
The TeX syntax is wrong, you must remove a pair of braces: \uppercase\expandafter{\romannumeral#1} –  egreg Mar 25 '13 at 12:44
1  
Related: How to switch page numbers to/from Roman numerals –  Marco Mar 25 '13 at 12:56
    
@egreg: I am wrong! I think I should do the exercise 7.8 and 7.9 again. –  Timothy Li Mar 25 '13 at 13:39
    
"This is admittedly tricky; the \expandafter expands the token after the {, not the token after the group." DEK. –  egreg Mar 25 '13 at 13:42
    
@egreg:Yeah, in fact I like plain TeX and have read the TeXbook from cover to cover, expecting the second pass:). Sometime plain TeX will take a long time, so I have to use ConTeXt now. –  Timothy Li Mar 25 '13 at 14:26

1 Answer 1

up vote 6 down vote accepted

To get roman page numbering in lowercase use

\setupuserpagenumber [numberconversion=romannumerals]

for upper case replace it with a capital letter:

\setupuserpagenumber [numberconversion=Romannumerals]
                                       ^

More information and examples on the wiki: Page Numbering

share|improve this answer
    
Does this produce uppercase Roman numerals? –  egreg Mar 25 '13 at 12:50
    
I asked because this seemed to be the OP's main question. –  egreg Mar 25 '13 at 12:58
    
@Marco: Thanks, it works. I think the ConTeXt manual should be updated. It is too old to contain the new \setupuserpagenumber. –  Timothy Li Mar 25 '13 at 14:30
    
Also, if you need a custom conversion macro, declare it via \defineconversion first. Then you can just hook it into any numberconversion parameter you wish -- there’s no reason to resort the command key for this. –  phg Mar 25 '13 at 18:11

Your Answer

 
discard

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.