From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79384 Path: news.gmane.org!not-for-mail From: Acidrums4 Newsgroups: gmane.comp.tex.context Subject: ConTeXt: Page numbering in words for spanish Date: Wed, 21 Nov 2012 04:08:34 -0500 Message-ID: <1410329.t7YnaHOuHa@localhost> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1353489098 14082 80.91.229.3 (21 Nov 2012 09:11:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2012 09:11:38 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 21 10:11:47 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tb6LT-0006Yt-F9 for gctc-ntg-context-518@m.gmane.org; Wed, 21 Nov 2012 10:11:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9BEEE10305; Wed, 21 Nov 2012 10:11:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fuLFcv3np64E; Wed, 21 Nov 2012 10:11:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1B7C5102CB; Wed, 21 Nov 2012 10:11:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8F51D102CB for ; Wed, 21 Nov 2012 10:11:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CuRXTlYqLMUb for ; Wed, 21 Nov 2012 10:11:27 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 54121102C9 for ; Wed, 21 Nov 2012 10:11:27 +0100 (CET) Original-Received: from mail-yh0-f41.google.com (mail-yh0-f41.google.com [209.85.213.41]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qAL9BPG9030189 for ; Wed, 21 Nov 2012 10:11:25 +0100 Original-Received: by mail-yh0-f41.google.com with SMTP id 47so1321965yhr.14 for ; Wed, 21 Nov 2012 01:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding:content-type; bh=z8lNP5OYcXEoYYVTHqzCA7dttPo3ehZRgWtSP4i4yI8=; b=l/N8Dopo+C4y5Ggp7/6HRkmG4JFSE06TJdOFgWprxnorBxAEv64AEL//7hsCRZMW0F foD0Hl5BnvnOkvQkisp6GXztAFy4Cmp6rdCx5tXQhbgulCjsYk9e8cXlOWTzAIGCTZjD 0dc0FtQ0fqTt3i1LOUIgTERl4M1MkywL5C1z3SMnyNqb/QbJcCjEf1i/UEoFaZ+HWL8I /HhDbkFjGKYzIVnc6r0EzmQIjEb5COLiuF0gOtUBuemA6X1AULsGmaPMGX1Q5zwnsddC SOC7vtygkNxaIV7PZPjh8GJyeOdJaJPMQ5cospFILFH84vP0wtYigKQ0PrC5dpnBfljI RPNQ== Original-Received: by 10.236.140.10 with SMTP id d10mr18007133yhj.112.1353489084656; Wed, 21 Nov 2012 01:11:24 -0800 (PST) Original-Received: from localhost.localnet ([186.31.15.179]) by mx.google.com with ESMTPS id p17sm13813920anh.12.2012.11.21.01.11.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 01:11:23 -0800 (PST) User-Agent: KMail/4.9.3 (Linux/3.6.6-gentoo; KDE/4.9.3; i686; ; ) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.213.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06Iq9bp3W - 2ccf42e01ea6 - 20121121 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:79384 Archived-At: 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 ___________________________________________________________________________________