summaryrefslogtreecommitdiff
path: root/tex/context/base/core-con.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-02-02 13:03:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-02-02 13:03:00 +0100
commitd463f115bfa8cbbf51ec921861fac46d0893ef06 (patch)
tree7270f49d0a99fe9053b3c72363cef35cf918c66d /tex/context/base/core-con.lua
parent0667359a3ffe041c89f14a0e6a713bb9dd5acb43 (diff)
downloadcontext-d463f115bfa8cbbf51ec921861fac46d0893ef06.tar.gz
beta 2011.02.02 13:03
Diffstat (limited to 'tex/context/base/core-con.lua')
-rw-r--r--tex/context/base/core-con.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/tex/context/base/core-con.lua b/tex/context/base/core-con.lua
index f6dfad9c9..80e019c1d 100644
--- a/tex/context/base/core-con.lua
+++ b/tex/context/base/core-con.lua
@@ -542,11 +542,17 @@ local function convert(method,n) -- todo: language
else
local lowermethod = lower(method)
local linguistic = counters[lowermethod]
- local sequence = sequences[method]
if linguistic then
return do_alphabetic(n,linguistic,lowermethod == method and lowercharacter or uppercharacter,false)
- elseif sequence then
- return do_alphabetic(n,sequence,false,true)
+ end
+ local sequence = sequences[method]
+ if sequence then
+ local max = #sequence
+ if n > max then
+ return sequence[(n-1) % max + 1]
+ else
+ return sequence[n]
+ end
else
return n
end