diff options
author | Marius <mariausol@gmail.com> | 2010-07-04 15:32:09 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-07-04 15:32:09 +0300 |
commit | 85b7bc695629926641c7cb752fd478adfdf374f3 (patch) | |
tree | 80293f5aaa7b95a500a78392c39688d8ee7a32fc /tex/context/base/syst-con.lua | |
download | context-85b7bc695629926641c7cb752fd478adfdf374f3.tar.gz |
stable 2010-05-24 13:10
Diffstat (limited to 'tex/context/base/syst-con.lua')
-rw-r--r-- | tex/context/base/syst-con.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tex/context/base/syst-con.lua b/tex/context/base/syst-con.lua new file mode 100644 index 000000000..638f3c797 --- /dev/null +++ b/tex/context/base/syst-con.lua @@ -0,0 +1,25 @@ +if not modules then modules = { } end modules ['syst-con'] = { + version = 1.001, + comment = "companion to syst-con.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +converters = converters or { } + +--[[ldx-- +<p>For raw 8 bit characters, the offset is 0x110000 (bottom of plane 18) at +the top of <l n='luatex'/>'s char range but outside the unicode range.</p> +--ldx]]-- + +local char, texsprint, format = unicode.utf8.char, tex.sprint, string.format + +function converters.hexstringtonumber(n) texsprint(tonumber(n,16)) end +function converters.octstringtonumber(n) texsprint(tonumber(n, 8)) end +function converters.rawcharacter (n) texsprint(char(0x110000+n)) end +function converters.lchexnumber (n) texsprint(format("%x" ,n)) end +function converters.uchexnumber (n) texsprint(format("%X" ,n)) end +function converters.lchexnumbers (n) texsprint(format("%02x",n)) end +function converters.uchexnumbers (n) texsprint(format("%02X",n)) end +function converters.octnumber (n) texsprint(format("%03o",n)) end |