Hello there and thanks for finally let me into this mailing list!

So I tried to hack the macro given in the ConTeXt wiki 
(http://wiki.contextgarden.net/Page_numbering_in_words) to write pagenumbering 
in words in spanish, my native language. Things were great until I had to 
reach the 100th page. ConTeXt claims when compiling, but I don't know how to 
fix the macro so it can write hundred-numbers.

'Cien' is 100 for spanish. 'Ciento uno' for 101, 'ciento dos' for 102 and so 
(You can see a more detailed example in 
http://spanish.about.com/cs/forbeginners/a/cardinalnum_beg.htm). So basically 
I need to prepend the word 'cien' for each word number from 1 to 99 to write 
the one-hundreds, 'doscientos' for the two-hundreds... Here is my dirty hacked 
version of the macro (you may save it as 'numstr.tex' for compiling), and a 
minimal example as follows:

\input numstr
\defineconversion[numstring][\numstr]
\setupuserpagenumber[numberconversion=numstring]
\starttext
\dorecurse{100}{\recurselevel\page}
\stoptext

I'm such a noob with TeX and I cannot figure out how to do this, and I need 
this for this friday!. However, Aditya in the TeX section of StackExchange 
(http://tex.stackexchange.com/questions/82722/context-page-numbering-in-words-
for-spanish#comment178155_82722) told me that I could do this witk Lua 
(editing the file core-con.lua, as seen in 
http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/core-con.lua
), 'cause I'm using MkIV for doing this. But I don't know anything about Lua 
(seems pretty easy, but I don't know how to test the code Aditya gave me) and 
If I knew how to do that, I don't know how to make it work in my document... 
All I could do is translate the 'words' array to spanish, but I couldn't do 
more... Could you guys give me a hand on this? Thank you so much!
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to