From: Acidrums4 <acidrums4@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ConTeXt: Page numbering in words for spanish
Date: Wed, 21 Nov 2012 16:05:07 -0500 [thread overview]
Message-ID: <1793278.fUTKdMQn8X@localhost> (raw)
In-Reply-To: <CAF=dkzzbxuiv65W=GnVBXRUORiCtqsmw+qyHwO3_r+5rw3Vdrw@mail.gmail.com>
I Sietse, I tried the procedure you described without success. I'm using
ConTeXt 2011 (I know, it's not the latest and etc, but I got to work with this
version because compatibility with my work and I have some troubles with
projects). I pasted the code you wrote at the end of core-con.lua and ran
'context --make cont-en'. But I got the following:
=== Begining of the output ===
<+ /usr/share/texmf-dist/tex/context/base/core-con.lua>
! LuaTeX error /usr/share/texmf-dist/tex/context/base/core-con.lua:924:
attempt to index global 'verbose' (a nil value)
stack traceback:
/usr/share/texmf-dist/tex/context/base/core-con.lua:924: in main chunk
/usr/share/texmf-dist/tex/context/base/luat-cod.lua:42: in function
'registercode'
<main ctx instance>:1: in main chunk.
system > tex > error on line 16 in file /usr/share/texmf-
dist/tex/context/base/context.mkiv: LuaTeX error ...
6 %D author=Hans Hagen,
7 %D date=\currentdate,
8 %D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
9 %C
10 %C This module is part of the \CONTEXT\ macro||package and is
11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12 %C details.
13
14 \catcode`\{=1 \catcode`\}=2 \catcode`\#=6
15
16 >> %D From the next string (which is set by the script that assembles the
17 %D distribution) later on we will calculate a number that can be used
18 %D by use modules to identify the feature level. Starting with version
19 %D 2004.8.30 the low level interface is english. Watch out and adapt
20 %D your styles an modules.
21
22 \edef\contextformat {\jobname}
23 \edef\contextversion{2011.05.18 18:04}
24
25 %D For those who want to use this:
26
\registerctxluafile ...ua.registercode("#1","#2")}
l.16 \registerctxluafile{core-con}{1.001}
?
=== End of the output ===
Any clue about this? Thanks!
PD.: Here is the correct translation of the 'words' array (and as a gift for
your effort on this, a translation for 'days' and 'months' arrays):
local words = {
[0] = "cero",
[1] = "uno",
[2] = "dos",
[3] = "tres",
[4] = "cuatro",
[5] = "cinco",
[6] = "seis",
[7] = "siete",
[8] = "ocho",
[9] = "nueve",
[10] = "diez",
[11] = "once",
[12] = "doce",
[13] = "trece",
[14] = "catorce",
[15] = "quince",
[16] = "sixteen",
[17] = "seventeen",
[18] = "eighteen",
[19] = "nineteen",
[20] = "veinte",
[30] = "treinta",
[40] = "cuarenta",
[50] = "cincuenta",
[60] = "sesenta",
[70] = "setenta",
[80] = "ochenta",
[90] = "noventa",
[100] = "cien",
[1000] = "mil",
[1000^2] = "millón",
[1000^3] = "mil millones",
[1000^4] = "billón",
}
local days = { -- not variables.sunday
"domingo",
"lunes",
"martes",
"miércoles",
"jueves",
"viernes",
"sábado",
}
local months = { -- not variables.januari
"enero",
"febrero",
"marzo",
"abril",
"mayo",
"junio",
"julio",
"agosto",
"septiembre",
"octubre",
"noviembre",
"diciembre",
}
On Mié 21 Nov 2012 12:25:03 pm Sietse Brouwer escribió:
> I worked up the code below,
> put it in core-con.lua,
> and recompiled ConTeXt with `context --make cont-en`.
> It gives the following output. Does it look correct?
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-11-21 21:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 9:08 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 [this message]
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=1793278.fUTKdMQn8X@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).