tableunpack = table.unpack
------------------------------------------------------------------------
--- naming:
--- ext_... : called from \directlua{}
--- int_... : called from other Lua codes, but not from \directlua{}
--- (other) : only called from this file
-function luatexja.load_module(name)
- require('ltj-' .. name.. '.lua')
-end
-function luatexja.load_lua(fn)
+local function load_lua(fn)
local found = kpse.find_file(fn, 'tex')
if not found then
tex.error("LuaTeX-ja error: File `" .. fn .. "' not found")
dofile(found)
end
end
+luatexja.load_lua = load_lua
+function luatexja.load_module(name)
+ require('ltj-' .. name.. '.lua')
+end
do
local setfield = node.direct.setfield
load_module('setwidth'); local ltjw = luatexja.setwidth
load_module('jfmglue'); local ltjj = luatexja.jfmglue -- +1 glue +1 gs +1 attr_list
load_module('math'); local ltjm = luatexja.math
-load_module('tangle'); local ltjb = luatexja.base
+load_module('base'); local ltjb = luatexja.base
local attr_jchar_class = luatexbase.attributes['ltj@charclass']
local base = prefix .. string.format('%X', get_attr_icflag(p))
.. ' ' .. pt .. ' ' .. tostring(p.subtype) .. ' '
if pt == 'glyph' then
- s = base .. ' ' .. utf.char(p.char) .. ' '
- .. tostring(p.font)
- .. ' (' .. print_scaled(p.height) .. '+'
+ s = base .. ' ' ..
+ (p.char>=0xF0000 and string.format('(U+%X)', p.char) or utf.char(p.char)) .. ' '
+ .. tostring(p.font) .. ' (' .. print_scaled(p.height) .. '+'
.. print_scaled(p.depth) .. ')x' .. print_scaled(p.width)
if p.xoffset~=0 or p.yoffset~=0 then
s = s .. ' off: (' .. print_scaled(p.xoffset)