diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
commit | 0d01365d53c456d246da0ca1f0b3cd9868f02b35 (patch) | |
tree | 01a655c8028e17cfb371456b299c1848fe08c05b /Master/texmf-dist/tex/context/base/syst-con.lua | |
parent | 44f3714442da07fdfc36a7f2a8dcd5d4294c5d26 (diff) |
ConTeXt release 2008.05.21
git-svn-id: svn://tug.org/texlive/trunk@8691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-con.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/syst-con.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-con.lua b/Master/texmf-dist/tex/context/base/syst-con.lua new file mode 100644 index 00000000000..519808e175d --- /dev/null +++ b/Master/texmf-dist/tex/context/base/syst-con.lua @@ -0,0 +1,35 @@ +if not modules then modules = { } end modules ['syst-con'] = { + version = 1.001, + comment = "companion to syst-con.tex", + 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]]-- + +do + local char, flush, format = unicode.utf8.char, tex.sprint, string.format + + function converters.hexstringtonumber(n) flush(tonumber(n,16)) end + function converters.octstringtonumber(n) flush(tonumber(n, 8)) end + function converters.rawcharacter (n) flush(char(0x110000+n)) end + + function converters.lchexnumber (n) flush(format("%x" ,n)) end + function converters.uchexnumber (n) flush(format("%X" ,n)) end + function converters.lchexnumbers (n) flush(format("%02x",n)) end + function converters.uchexnumbers (n) flush(format("%02X",n)) end + function converters.octnumber (n) flush(format("%03o",n)) end + + function converters.lchexnumber (n) flush(("%x" ):format(n)) end + function converters.uchexnumber (n) flush(("%X" ):format(n)) end + function converters.lchexnumbers (n) flush(("%02x"):format(n)) end + function converters.uchexnumbers (n) flush(("%02X"):format(n)) end + function converters.octnumber (n) flush(("%03o"):format(n)) end + +end |