ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt: Page numbering in words for spanish
@ 2012-11-21  9:08 Acidrums4
  2012-11-21 10:26 ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Acidrums4 @ 2012-11-21  9:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-11-23 23:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21  9:08 ConTeXt: Page numbering in words for spanish Acidrums4
2012-11-21 10:26 ` Hans Hagen
2012-11-21 11:25   ` Sietse Brouwer
2012-11-21 11:52     ` Hans Hagen
2012-11-21 12:28       ` Sietse Brouwer
2012-11-21 21:05     ` Acidrums4
2012-11-21 23:47       ` Sietse Brouwer
2012-11-22  0:03         ` Acidrums4
2012-11-22 10:55           ` Mojca Miklavec
2012-11-22 12:11             ` Sietse Brouwer
2012-11-23 20:50             ` Marcin Borkowski
2012-11-23 22:46               ` Hans Hagen
2012-11-23 23:09                 ` Alan BRASLAU
2012-11-22 10:04         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).