summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/luatexja.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua22
1 files changed, 20 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index 370141a85e7..2cf00758fcf 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
@@ -230,8 +230,8 @@ end
do
luatexja.binary_pars = {
jacharrange = function(c, t)
- if type(c)~='number' or c<0 or c>31*ltjc.ATTR_RANGE then
- -- 0 はエラーにしない(隠し)
+ if type(c)~='number' or c<-1 or c>31*ltjc.ATTR_RANGE then
+ -- 0, -1 はエラーにしない(隠し)
ltjb.package_error('luatexja',
'invalid character range number (' .. tostring(c) .. ')',
'A character range number should be in the range 1..'
@@ -344,6 +344,24 @@ function luatexja.ext_cleanup()
end
+-- lastnodechar
+do
+ local id_glyph = node.id('glyph')
+ function luatexja.pltx_composite_last_node_char()
+ local n = tex.nest[tex.nest.ptr].tail
+ local r = '-1'
+ if n then
+ if n.id==id_glyph then
+ while n.componetns and n.subtype and n.subtype%4 >= 2 do
+ n = node.tail(n)
+ end
+ r = tostring(n.char)
+ end
+ end
+ tex.sprint(r)
+ end
+end
+
-- debug
do