ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Acidrums4 <acidrums4@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: ConTeXt: Page numbering in words for spanish
Date: Wed, 21 Nov 2012 04:08:34 -0500	[thread overview]
Message-ID: <1410329.t7YnaHOuHa@localhost> (raw)

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	other threads:[~2012-11-21  9:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  9:08 Acidrums4 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410329.t7YnaHOuHa@localhost \
    --to=acidrums4@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).