From 938ef8c2b6e780614b672331a704d9049d0edad8 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 2 Feb 2012 01:06:07 +0100 Subject: first chapter of manual --- tex/context/third/cyrillicnumbers/cyrillicnumbers.lua | 15 ++++++++++++++- tex/context/third/cyrillicnumbers/t-cyrillicnumbers.mkiv | 9 +++------ 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'tex/context') diff --git a/tex/context/third/cyrillicnumbers/cyrillicnumbers.lua b/tex/context/third/cyrillicnumbers/cyrillicnumbers.lua index f8f745b..cec98c7 100644 --- a/tex/context/third/cyrillicnumbers/cyrillicnumbers.lua +++ b/tex/context/third/cyrillicnumbers/cyrillicnumbers.lua @@ -214,7 +214,20 @@ local titlofuncs = { result[#result+1] = stop_titlo return result end, - no = function (x) return x end, + no = function (list) + local result = { } + for i=#list, 1, -1 do + local char, digit, before, after = list[i][1], list[i][2], list[i][3], list[i][4] + if before then + result[#result+1] = before + end + result[#result+1] = char + if after then + result[#result+1] = after + end + end + return result + end, } --[[ldx-- diff --git a/tex/context/third/cyrillicnumbers/t-cyrillicnumbers.mkiv b/tex/context/third/cyrillicnumbers/t-cyrillicnumbers.mkiv index 8321dac..c13b00d 100644 --- a/tex/context/third/cyrillicnumbers/t-cyrillicnumbers.mkiv +++ b/tex/context/third/cyrillicnumbers/t-cyrillicnumbers.mkiv @@ -383,12 +383,8 @@ } \def\dodo_cyrnum[#1]{% - % \iffirstargument - % \doifassignmentelse{#1}{\setupcyrnum[\currentcyrnum][#1]}\relax - \setupcyrnum[\currentcyrnum][#1]% - % \else - % \setupcyrnum - % \fi + \begingroup% + \setupcyrnum[\currentcyrnum][#1]% \cyrnumparameter{command}\begingroup% \dododo_cyrnum% } @@ -396,6 +392,7 @@ \def\dododo_cyrnum#1{% \ctxcommand{cyrillicnumerals(\number#1)}% \endgroup% + \endgroup% } %D \macros -- cgit v1.2.3