summaryrefslogtreecommitdiff
path: root/tex/context/base/core-con.lua
diff options
context:
space:
mode:
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