summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-18 22:07:21 +0000
committerKarl Berry <karl@freefriends.org>2016-06-18 22:07:21 +0000
commitd86d22e6f60a5ac70e824193345eaa0e344614e1 (patch)
tree65481d18fd1548f6d8f87534884be77332e344d9 /Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
parentaf496ee64508a29d6b74bae6034e7f6dc36842d0 (diff)
luatexja (18jun16)
git-svn-id: svn://tug.org/texlive/trunk@41489 c570f23f-e606-0410-a88d-b1316a301751
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