Chinese numeral conversion
Hi Hans, I modified the part of Chinese numeral conversion in core-con.lua script. The attachment is the patch. After many tests as the following I think the patch is right even though it looks dirty. %%%% \definefont[song][name:adobesongstdlight]\song \starttext \startluacode local function test (cs) j = 1 for i = 1, 9 do tex.print (j .. ': ' .. '\\chinesenumerals{' .. j .. '}\\par') j = j * 10 + 1 end tex.print ('\\blank') end test ('\\chinesenumerals') test ('\\chinesecapnumerals') test ('\\chineseallnumerals') \stopluacode This is test for chinese zero: \startluacode j = 1 for i = 1, 9 do tex.print (j .. ': ' .. '\\chinesenumerals{' .. j .. '}\\par') if i % 2 == 0 then j = j * 10 else j = j * 10 + 1 end end \stopluacode \stoptext The pdf in attachments is output result. -- Best regards, Li Yanrui
2009/12/23 Yanrui Li
Hi Hans,
I modified the part of Chinese numeral conversion in core-con.lua script. The attachment is the patch. After many tests as the following I think the patch is right even though it looks dirty.
%%%% \definefont[song][name:adobesongstdlight]\song \starttext
\startluacode local function test (cs) j = 1 for i = 1, 9 do tex.print (j .. ': ' .. '\\chinesenumerals{' .. j .. '}\\par') j = j * 10 + 1 end tex.print ('\\blank') end
sorry, this function should be: local function test (cs) j = 1 for i = 1, 9 do tex.print (j .. ': ' .. cs .. '{' .. j .. '}\\par') j = j * 10 + 1 end tex.print ('\\blank') end -- Best regards, Li Yanrui
2009/12/23 Yanrui Li
2009/12/23 Yanrui Li
Hi Hans,
I modified the part of Chinese numeral conversion in core-con.lua script. The attachment is the patch. After many tests as the following I think the patch is right even though it looks dirty.
sorry, this function should be:
sorry again. I just discovered it is wrong with the numbers biger than 100000. Now I made a new patch and new output result. -- Best regards, Li Yanrui
participants (1)
-
Yanrui Li