summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-25 22:26:12 +0000
committerKarl Berry <karl@freefriends.org>2015-10-25 22:26:12 +0000
commitb21104f52f6a326c74adaf89be9b55745d4e65ba (patch)
tree34821dc6557935976efbcf643c48e7f1d869c3f3 /Master/texmf-dist/tex/luatex
parenta3456c69107a97f155fa0b80458580d3aced4175 (diff)
luatexja (25oct15)
git-svn-id: svn://tug.org/texlive/trunk@38705 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/jfm-prop.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua148
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/jfm-ujisv.lua148
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua9
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua344
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua100
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua44
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-unicode-ccfix.lua354
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty177
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua1
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty5
35 files changed, 846 insertions, 630 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
index 3a4b3caf6ac..691e53118ff 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
@@ -50,7 +50,6 @@
\cs_new:Nn \ltj_fontspec_define_option:nn {
\__fontspec_keys_define_code:nnn {fontspec} {#1} {#2}
}
-
\cs_new:Nn \ltj_fontspec_define_preparse_external:nn {
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {#1} {#2}
}
@@ -111,6 +110,13 @@
\ltj_fontspec_define_option:nn {CID} {
\__fontspec_update_featstr:n {cid=##1}
}
+ \ltj_fontspec_define_option:nn {Kanjiskip} {
+ \str_if_eq_x:nnTF {false} { \str_lower_case:n { ##1 } }{
+ \__fontspec_update_featstr:n {-ltjksp}
+ } {
+ \__fontspec_update_featstr:n {+ltjksp}
+ }
+ }
\ltj_fontspec_define_option:nn {JFM} {
\__fontspec_update_featstr:n {jfm=##1}
}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/jfm-prop.lua b/Master/texmf-dist/tex/luatex/luatexja/jfm-prop.lua
index af1c12e35fd..71dc1ae6940 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/jfm-prop.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/jfm-prop.lua
@@ -6,4 +6,4 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 'prop', height = 0.88, depth = 0.12, italic=0.0,
}
-} \ No newline at end of file
+}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua
index ced82f66463..a0d1675e127 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua
@@ -10,21 +10,19 @@
luatexja.jfont.define_jfm {
dir = 'yoko',
zw = 1.0, zh = 1.0,
- kanjiskip = {0.0, 0.25, 0},
- xkanjiskip = {0.25, 0.25, .125},
+ kanjiskip = { 0.0, 0.25, 0 },
+ xkanjiskip = { 0.25, 0.25, .125 },
[0] = {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- -- [index] = { width, stretch, shrink, [priority, [ratio]] }
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
}
},
@@ -37,16 +35,15 @@ luatexja.jfont.define_jfm {
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
-- 3 のみ四分,あとは0
- [0] = {0, 0, 0},
- [1] = {0, 0, 0},
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1 },
- [4] = {0, 0, 0},
- [5] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [0] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [1] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1, kanjiskip_stretch=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [5] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
}
},
@@ -59,16 +56,15 @@ luatexja.jfont.define_jfm {
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
-- 3 は四分, 2, 4, 9 は0, あとは0.5
- [0] = { 0.5 , 0.0, 0.5, 0, -1 },
- [1] = { 0.5 , 0.0, 0.5, 0, -1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [5] = { 0.5 , 0.0, 0.5, 0, -1 },
- [6] = { 0.5 , 0.0, 0.5, 0, -1 },
- [7] = { 0.5 , 0.0, 0.5, 0, -1 },
- [8] = { 0.5 , 0.0, 0.5, 0, -1 },
- [9] = {0, 0, 0},
+ [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1},
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [5] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [6] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [8] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
}
},
@@ -79,16 +75,15 @@ luatexja.jfont.define_jfm {
--end_stretch = 0.25,
glue = {
-- 3 のみ 0.5,あとは0.25
- [0] = { 0.25, 0.0, 0.25, 1, 1 },
- [1] = { 0.25, 0.0, 0.25, 1, 1 },
- [2] = { 0.25, 0.0, 0.25, 1, 1 },
- [3] = { 0.5 , 0.0, 0.5 , 1, 0 },
- [4] = { 0.25, 0.0, 0.25, 1, 1 },
- [5] = { 0.25, 0.0, 0.25, 1, 1 },
- [6] = { 0.25, 0.0, 0.25, 1, 1 },
- [7] = { 0.25, 0.0, 0.25, 1, 1 },
- [8] = { 0.25, 0.0, 0.25, 1, 1 },
- [9] = { 0.25, 0.0, 0.25, 1, 1 },
+ [0] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [1] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [2] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [3] = { 0.5 , 0.0, 0.5 , priority=1 },
+ [4] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [5] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [6] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [7] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [8] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
}
},
@@ -98,14 +93,13 @@ luatexja.jfont.define_jfm {
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
-- 3 は.75, 2, 4 は0, あとは0.5
- [0] = { 0.5 , 0.0, 0.5, 0, -1 },
- [1] = { 0.5 , 0.0, 0.5, 0, -1 },
- [3] = { 0.75, 0.0, 0.25, 1, -1/3 },
- [5] = { 0.5 , 0.0, 0.5, 0, -1 },
- [6] = { 0.5 , 0.0, 0.5, 0, -1 },
- [7] = { 0.5 , 0.0, 0.5, 0, -1 },
- [8] = { 0.5 , 0.0, 0.5, 0, -1 },
- [9] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, kanjiskip_stretch=1 },
+ [5] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [6] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [8] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
}
},
@@ -114,12 +108,11 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
},
kern = {
[5] = 0.0
@@ -131,15 +124,14 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [0] = { 0.5 , 0.0, 0.5, 0, 1 },
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.75, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = { 0.5 , 0.0, 0.5, 0, 1 },
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [0] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
},
kern = {
[5] = 0.0
@@ -171,14 +163,13 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
}
},
@@ -204,12 +195,11 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
},
kern = {
[8] = 0.0
@@ -220,7 +210,7 @@ luatexja.jfont.define_jfm {
[99] = { -- box末尾
chars = {'boxbdd', 'parbdd'},
glue = {
- [3] = { 0.25, 0.0, 0.25, 1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1 },
}
},
diff --git a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujisv.lua b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujisv.lua
index 179ad55faf4..6bf3075340b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujisv.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujisv.lua
@@ -10,21 +10,19 @@
luatexja.jfont.define_jfm {
dir = 'tate',
zw = 1.0, zh = 1.0,
- kanjiskip = {0.0, 0.25, 0},
- xkanjiskip = {0.25, 0.25, .125},
+ kanjiskip = { 0.0, 0.25, 0 },
+ xkanjiskip = { 0.25, 0.25, .125 },
[0] = {
align = 'middle', left = 0.00, down = 0.00,
width = 1.0, height = 0.50, depth = 0.50, italic=0.0,
glue = {
- -- [index] = { width, stretch, shrink, [priority, [ratio]] }
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
}
},
@@ -37,16 +35,15 @@ luatexja.jfont.define_jfm {
width = 0.5, height = 0.50, depth = 0.50, italic=0.0,
glue = {
-- 3 のみ四分,あとは0
- [0] = {0, 0, 0},
- [1] = {0, 0, 0},
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1 },
- [4] = {0, 0, 0},
- [5] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [0] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [1] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [2] = { 0, 0, 0, kanjiskip_stretch=1, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [5] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
}
},
@@ -59,16 +56,15 @@ luatexja.jfont.define_jfm {
width = 0.5, height = 0.50, depth = 0.50, italic=0.0,
glue = {
-- 3 は四分, 2, 4, 9 は0, あとは0.5
- [0] = { 0.5 , 0.0, 0.5, 0, -1 },
- [1] = { 0.5 , 0.0, 0.5, 0, -1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [5] = { 0.5 , 0.0, 0.5, 0, -1 },
- [6] = { 0.5 , 0.0, 0.5, 0, -1 },
- [7] = { 0.5 , 0.0, 0.5, 0, -1 },
- [8] = { 0.5 , 0.0, 0.5, 0, -1 },
- [9] = {0, 0, 0},
+ [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [5] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 },
+ [6] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 },
+ [7] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 },
+ [8] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 },
}
},
@@ -79,16 +75,15 @@ luatexja.jfont.define_jfm {
--end_stretch = 0.25,
glue = {
-- 3 のみ 0.5,あとは0.25
- [0] = { 0.25, 0.0, 0.25, 1, 1 },
- [1] = { 0.25, 0.0, 0.25, 1, 1 },
- [2] = { 0.25, 0.0, 0.25, 1, 1 },
- [3] = { 0.5 , 0.0, 0.25 , 1, 0 },
- [4] = { 0.25, 0.0, 0.25, 1, 1 },
- [5] = { 0.25, 0.0, 0.25, 1, 1 },
- [6] = { 0.25, 0.0, 0.25, 1, 1 },
- [7] = { 0.25, 0.0, 0.25, 1, 1 },
- [8] = { 0.25, 0.0, 0.25, 1, 1 },
- [9] = { 0.25, 0.0, 0.25, 1, 1 },
+ [0] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [1] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [2] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [3] = { 0.5 , 0.0, 0.25, priority=1 },
+ [4] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [5] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [6] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [7] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [8] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
}
},
@@ -98,14 +93,13 @@ luatexja.jfont.define_jfm {
width = 0.5, height = 0.50, depth = 0.50, italic=0.0,
glue = {
-- 3 は.75, 2, 4 は0, あとは0.5
- [0] = { 0.5 , 0.0, 0.5, 0, -1 },
- [1] = { 0.5 , 0.0, 0.5, 0, -1 },
- [3] = { 0.75, 0.0, 0.25, 1, -1/3 },
- [5] = { 0.5 , 0.0, 0.5, 0, -1 },
- [6] = { 0.5 , 0.0, 0.5, 0, -1 },
- [7] = { 0.5 , 0.0, 0.5, 0, -1 },
- [8] = { 0.5 , 0.0, 0.5, 0, -1 },
- [9] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, kanjiskip_stretch=1 },
+ [5] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [6] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
+ [8] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 },
}
},
@@ -114,12 +108,11 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.50, depth = 0.50, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
},
kern = {
[5] = 0.0
@@ -131,15 +124,14 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.50, depth = 0.50, italic=0.0,
glue = {
- [0] = { 1.0 , 0.0, 0.5, 0, 1 },
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.75, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = { 0.5 , 0.0, 0.5, 0, 1 },
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [0] = { 1.0 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
},
kern = {
[5] = 0.0
@@ -171,14 +163,13 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 0.5, height = 0.5, depth = 0.5, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [7] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [8] = { 0, 0, 0, kanjiskip_shrink=1 },
}
},
@@ -204,12 +195,11 @@ luatexja.jfont.define_jfm {
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.50, depth = 0.50, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1 },
- [2] = {0, 0, 0},
- [3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = {0, 0, 0},
- [6] = {0, 0, 0},
- [9] = {0, 0, 0},
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+ [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+ [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+ [6] = { 0, 0, 0, kanjiskip_shrink=1 },
},
kern = {
[8] = 0.0
@@ -219,7 +209,7 @@ luatexja.jfont.define_jfm {
[99] = { -- box末尾
chars = {'boxbdd', 'parbdd'},
glue = {
- [3] = { 0.25, 0.0, 0.25, 1 },
+ [3] = { 0.25, 0.0, 0.25, priority=1 },
}
},
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
index 1bceda3cce2..84f75b9509d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
@@ -107,6 +107,9 @@ local function get_total_stretched(p, line)
local total = 0
for q in node_traverse_id(id_glue, getlist(p)) do
local a, ic = get_stretched(q, go, gs), get_attr_icflag(q)
+ if ic == KANJI_SKIP_JFM then ic = KANJI_SKIP
+ elseif ic == XKANJI_SKIP_JFM then ic = XKANJI_SKIP
+ end
if type(res[ic]) == 'number' then
-- kanjiskip, xkanjiskip は段落内で spec を共有しているが,
-- それはここでは望ましくないので,各 glue ごとに異なる spec を使う.
@@ -124,8 +127,6 @@ local function get_total_stretched(p, line)
gs_used_line[qs] = line
end
end
- elseif ic == KANJI_SKIP_JFM then ic = KANJI_SKIP
- elseif ic == XKANJI_SKIP_JFM then ic = XKANJI_SKIP
end
res[ic], total = res[ic] + a, total + a
else
@@ -137,7 +138,9 @@ end
local function clear_stretch(p, ic, name)
for q in node_traverse_id(id_glue, getlist(p)) do
- if get_attr_icflag(q) == ic then
+ local f = get_attr_icflag(q)
+ if (f == ic) or ((ic ==KANJI_SKIP) and (f == KANJI_SKIP_JFM))
+ or ((ic ==XKANJI_SKIP) and (f == XKANJI_SKIP_JFM)) then
local qs = getfield(q, 'spec')
if getfield(qs, 'writable') then
setfield(qs, name..'_order', 0)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index 3a7101e827d..7c5ba8661aa 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -296,9 +296,13 @@ local function calc_np_pbox(lp, last)
Np.first = Np.first or lp; Np.id = id_pbox
set_attr(lp, attr_icflag, get_attr_icflag(lp));
while lp ~=last and (lpa>=PACKED) and (lpa<BOXBDD) do
- if getid(lp)==id_hlist or getid(lp)==id_vlist then
+ local lpi = getid(lp)
+ if lpi==id_hlist or lpi==id_vlist then
head, lp, nc = ltjd_make_dir_whatsit(head, lp, list_dir, 'jfm pbox')
Np.first = first and nc or Np.first
+ elseif (lpi==id_rule) and (lpa==PACKED) then
+ lp = node_next(lp)
+ nc, lp = lp, node_next(lp)
else
nc, lp = lp, node_next(lp)
end
@@ -319,9 +323,9 @@ local function calc_np_aux_glyph_common(lp)
Np.first= (Np.first or lp)
if getfield(lp, 'lang') == lang_ja then
Np.id = id_jglyph
- local m, cls = set_np_xspc_jachar(Np, lp)
+ local m, mc, cls = set_np_xspc_jachar(Np, lp)
local npi, npf
- lp, head, npi, npf = capsule_glyph(lp, m, cls, head, tex_dir, lp)
+ lp, head, npi, npf = capsule_glyph(lp, m, mc[cls], head, tex_dir)
Np.first = (Np.first~=Np.nuc) and Np.first or npf or npi
Np.nuc = npi
return true, check_next_ickern(lp);
@@ -567,6 +571,7 @@ do
c = c or c_glyph
local cls = slow_find_char_class(c, m, c_glyph)
Nx.met, Nx.class, Nx.char = m, cls, c;
+ local mc = m.char_type; Nx.char_type = mc
if cls~=0 then set_attr(x, attr_jchar_class, cls) end
if c~=c_glyph then set_attr(x, attr_jchar_code, c) end
Nx.pre = table_current_stack[PRE + c] or 0
@@ -574,12 +579,13 @@ do
Nx.xspc = table_current_stack[XSP + c] or 3
Nx.kcat = table_current_stack[KCAT + c] or 0
Nx.auto_kspc, Nx.auto_xspc = (has_attr(x, attr_autospc)==1), (has_attr(x, attr_autoxspc)==1)
- return m, cls
+ return m, mc, cls
end
function set_np_xspc_jachar_hbox(Nx, x)
local m = ltjf_font_metric_table[getfont(x)]
local c = has_attr(x, attr_jchar_code) or getchar(x)
Nx.met, Nx.char = m, c; Nx.class = has_attr(x, attr_jchar_class) or 0;
+ local mc = m.char_type; Nx.char_type = mc
Nx.pre = table_current_stack[PRE + c] or 0
Nx.post = table_current_stack[POST + c] or 0
Nx.xspc = table_current_stack[XSP + c] or 3
@@ -682,20 +688,20 @@ local function handle_penalty_suppress(post, pre, g)
end
-- 和文文字間の JFM glue を node 化
-local function new_jfm_glue(m, bc, ac)
+local function new_jfm_glue(mc, bc, ac)
-- bc, ac: char classes
- local g = m.char_type[bc][ac]
+ local g = mc[bc][ac]
if g then
if g[1] then
local f = node_new(id_glue)
- set_attr(f, attr_icflag, g[4])
+ set_attr(f, attr_icflag, g.priority)
setfield(f, 'spec', node_copy(g[2]))
- return f, g[3]
+ return f, g.ratio, g.kanjiskip_natural, g.kanjiskip_stretch, g.kanjiskip_shrink
else
- return node_copy(g[2]), g[3]
+ return node_copy(g[2]), g.ratio, false, false, false
end
end
- return nil, 0
+ return false, 0
end
-- Nq.last (kern w) .... (glue/kern g) Np.first
@@ -708,50 +714,6 @@ end
-------------------- 和文文字間空白量の決定
-local null_skip_table = {0, 0, 0}
--- get kanjiskip
-local get_kanjiskip
-local get_kanjiskip_normal, get_kanjiskip_jfm
-do
- local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP
- local KANJI_SKIP_JFM = luatexja.icflag_table.KANJI_SKIP_JFM
- get_kanjiskip_normal = function ()
- if Np.auto_kspc or Nq.auto_kspc then
- return node_copy(kanji_skip)
- else
- local g = node_copy(zero_glue)
- set_attr(g, attr_icflag, KANJI_SKIP)
- return g
- end
- end
-
- get_kanjiskip_jfm = function ()
- local g
- if Np.auto_kspc or Nq.auto_kspc then
- g = node_new(id_glue); --copy_attr(g, Nq.nuc)
- local gx = node_new(id_glue_spec);
- setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
- local pm, qm = Np.met, Nq.met
- local bk = qm.kanjiskip or null_skip_table
- if (pm.char_type==qm.char_type) and (qm.var==pm.var) then
- setfield(gx, 'width', bk[1])
- setfield(gx, 'stretch', bk[2])
- setfield(gx, 'shrink', bk[3])
- else
- local ak = pm.kanjiskip or null_skip_table
- setfield(gx, 'width', round(diffmet_rule(bk[1], ak[1])))
- setfield(gx, 'stretch', round(diffmet_rule(bk[2], ak[2])))
- setfield(gx, 'shrink', -round(diffmet_rule(-bk[3], -ak[3])))
- end
- setfield(g, 'spec', gx)
- else
- g = node_copy(zero_glue)
- end
- set_attr(g, attr_icflag, KANJI_SKIP_JFM)
- return g
- end
-end
-
local calc_ja_ja_aux
do
local bg_ag = 2*id_glue - id_glue
@@ -759,12 +721,13 @@ do
local bk_ag = 2*id_kern - id_glue
local bk_ak = 2*id_kern - id_kern
- calc_ja_ja_aux = function (gb,ga, db, da)
- local rbb, rab = 0.5*(1-db), 0.5*(1-da) -- 「前の文字」由来のグルーの割合
- local rba, raa = 0.5*(1+db), 0.5*(1+da) -- 「前の文字」由来のグルーの割合
+ local function blend_diffmet(b, a, rb, ra)
+ return round(diffmet_rule((1-rb)*b+rb*a, (1-ra)*b+ra*a))
+ end
+ calc_ja_ja_aux = function (gb, ga, db, da)
if diffmet_rule ~= math.two_pleft and diffmet_rule ~= math.two_pright
and diffmet_rule ~= math.two_paverage then
- rbb, rab, rba, raa = 1,0,0,1
+ db, da = 0, 1
end
if not gb then
if ga then
@@ -778,126 +741,234 @@ do
if k == bg_ag then
local bs, as = getfield(gb, 'spec'), getfield(ga, 'spec')
-- 両方とも glue.
- local bd, ad = getfield(bs, 'width'), getfield(as, 'width')
- setfield(bs, 'width', round(diffmet_rule(rbb*bd + rba*ad, rab*bd + raa*ad)))
- bd, ad = getfield(bs, 'stretch'), getfield(as, 'stretch')
- setfield(bs, 'stretch', round(diffmet_rule(rbb*bd + rba*ad, rab*bd + raa*ad)))
- bd, ad = getfield(bs, 'shrink'), getfield(as, 'shrink')
- setfield(bs, 'shrink', -round(diffmet_rule(-rbb*bd - rba*ad, -rab*bd - raa*ad)))
+ setfield(bs, 'width', blend_diffmet(
+ getfield(bs, 'width'), getfield(as, 'width'), db, da))
+ setfield(bs, 'stretch', blend_diffmet(
+ getfield(bs, 'stretch'), getfield(as, 'stretch'), db, da))
+ setfield(bs, 'shrink', -blend_diffmet(
+ -getfield(bs, 'shrink'), -getfield(as, 'shrink'), db, da))
node_free(ga)
return gb
elseif k == bk_ak then
-- 両方とも kern.
- local bd, ad = getfield(gb, 'kern'), getfield(ga, 'kern')
- setfield(gb, 'kern', round(diffmet_rule(rbb*bd + rba*ad, rab*bd + raa*ad)))
+ setfield(gb, 'kern', blend_diffmet(
+ getfield(gb, 'kern'), getfield(ga, 'kern'), db, da))
node_free(ga)
return gb
elseif k == bk_ag then
local as = getfield(ga, 'spec')
-- gb: kern, ga: glue
- local bd, ad = getfield(gb, 'kern'), getfield(as, 'width')
- setfield(as, 'width', round(diffmet_rule(rbb*bd + rba*ad, rab*bd + raa*ad)))
- ad = getfield(as, 'stretch')
- setfield(bs, 'stretch', round(diffmet_rule(rba*ad, raa*ad)))
- ad = getfield(as, 'shrink')
- setfield(bs, 'shrink', -round(diffmet_rule(-rba*ad, -raa*ad)))
+ setfield(as, 'width', blend_diffmet(
+ getfield(gb, 'kern'), getfield(as, 'width'), db, da))
+ setfield(as, 'stretch', blend_diffmet(
+ 0, getfield(as, 'stretch'), db, da))
+ setfield(as, 'shrink', -blend_diffmet(
+ 0, -getfield(as, 'shrink'), db, da))
node_free(gb)
- return ga
+ return ga, 0, 0, 0
else
local bs = getfield(gb, 'spec')
-- gb: glue, ga: kern
- local bd, ad = getfield(bs, 'width'), getfield(ga, 'kern')
- setfield(bs, 'width', round(diffmet_rule(rbb*bd + rba*ad, rab*bd + raa*ad)))
- bd = getfield(bs, 'stretch')
- setfield(bs, 'stretch', round(diffmet_rule(rbb*bd, rab*bd)))
- bd = getfield(bs, 'shrink')
- setfield(bs, 'shrink', -round(diffmet_rule(-rbb*bd, -rab*bd)))
+ setfield(bs, 'width', blend_diffmet(
+ getfield(bs, 'width'), getfield(ga, 'kern'), db, da))
+ setfield(bs, 'stretch', blend_diffmet(
+ getfield(bs, 'stretch'), 0, db, da))
+ setfield(bs, 'shrink', -blend_diffmet(
+ -getfield(bs, 'shrink'), 0, db, da))
node_free(ga)
return gb
end
end
end
-local function calc_ja_ja_glue()
- local qm, pm = Nq.met, Np.met
- if (qm.char_type==pm.char_type) and (qm.var==pm.var) then
- return new_jfm_glue(qm, Nq.class, Np.class)
- else
- local npn, nqn = Np.nuc, Nq.nuc
- local gb, db = new_jfm_glue(qm, Nq.class,
- slow_find_char_class(Np.char,
- qm, getchar(npn)))
- local ga, da = new_jfm_glue(pm,
- slow_find_char_class(Nq.char,
- pm, getchar(nqn)),
- Np.class)
- return calc_ja_ja_aux(gb, ga, db, da);
+local null_skip_table = {0, 0, 0}
+-- get kanjiskip
+local get_kanjiskip, kanjiskip_jfm_flag
+local calc_ja_ja_glue
+do
+ local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP
+ local KANJI_SKIP_JFM = luatexja.icflag_table.KANJI_SKIP_JFM
+
+ get_kanjiskip_low = function(flag, qm, bn, bp, bh)
+ if flag or (qm.with_kanjiskip and (bn or bp or bh)) then
+ if kanjiskip_jfm_flag then
+ local g = node_new(id_glue);
+ local gx = node_new(id_glue_spec);
+ setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
+ local bk = qm.kanjiskip or null_skip_table
+ setfield(gx, 'width', bn and (bn*bk[1]) or 0)
+ setfield(gx, 'stretch', bp and (bp*bk[2]) or 0)
+ setfield(gx, 'shrink', bh and (bh*bk[3]) or 0)
+ setfield(g, 'spec', gx)
+ set_attr(g, attr_icflag, KANJI_SKIP_JFM)
+ return g
+ elseif flag then
+ return node_copy(kanji_skip)
+ else
+ local g = node_new(id_glue);
+ local gx = node_new(id_glue_spec);
+ setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
+ local ks = getfield(kanji_skip, 'spec')
+ setfield(gx, 'width', bn and (bn*getfield(ks, 'width')) or 0)
+ setfield(gx, 'stretch', bp and (bp*getfield(ks, 'stretch')) or 0)
+ setfield(gx, 'shrink', bh and (bh*getfield(ks, 'shrink')) or 0)
+ setfield(g, 'spec', gx)
+ set_attr(g, attr_icflag, KANJI_SKIP_JFM)
+ return g
+ end
+ end
+ end
+
+ get_kanjiskip = function()
+ if Np.auto_kspc or Nq.auto_kspc then
+ local pm, qm = Np.met, Nq.met
+ if (pm.char_type==qm.char_type) and (qm.var==pm.var) then
+ return get_kanjiskip_low(true, qm, 1, 1, 1)
+ else
+ local gb = get_kanjiskip_low(true, qm, 1, 1, 1)
+ local ga = get_kanjiskip_low(true, pm, 1, 1, 1)
+ return calc_ja_ja_aux(gb, ga, 0, 1)
+ end
+ else
+ local g = node_copy(zero_glue)
+ set_attr(g, attr_icflag, kanjiskip_jfm_flag and KANJI_SKIP_JFM or KANJI_SKIP)
+ return g
+ end
+ end
+
+ calc_ja_ja_glue = function ()
+ local qm, pm = Nq.met, Np.met
+ local qmc, pmc = qm.char_type, pm.char_type
+ if (qmc==pmc) and (qm.var==pm.var) then
+ local g, _, kn, kp, kh = new_jfm_glue(qmc, Nq.class, Np.class)
+ return g, (Np.auto_kspc or Nq.auto_kspc) and get_kanjiskip_low(false, qm, kn, kp, kh)
+ else
+ local npn, nqn = Np.nuc, Nq.nuc
+ local gb, db, bn, bp, bh
+ = new_jfm_glue(qmc, Nq.class,
+ slow_find_char_class(Np.char,
+ qm, getchar(npn)))
+ local ga, da, an, ap, ah
+ = new_jfm_glue(pmc,
+ slow_find_char_class(Nq.char,
+ pm, getchar(nqn)),
+ Np.class)
+ local g = calc_ja_ja_aux(gb, ga, db, da)
+ local k
+ if (pmc==qmc) and (qm.var==pm.var) then
+ gb = get_kanjiskip_low(false, qm, bn, bp, bh)
+ ga = get_kanjiskip_low(false, pm, an, ap, ah)
+ k = calc_ja_ja_aux(gb, ga, db, da)
+ end
+ return g, k
+ end
end
end
-------------------- 和欧文間空白量の決定
-- get xkanjiskip
-local get_xkanjiskip
+local get_xkanjiskip, xkanjiskip_jfm_flag
local get_xkanjiskip_normal, get_xkanjiskip_jfm
do
local XKANJI_SKIP = luatexja.icflag_table.XKANJI_SKIP
local XKANJI_SKIP_JFM = luatexja.icflag_table.XKANJI_SKIP_JFM
- get_xkanjiskip_normal = function (Nn)
- if (Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc) then
- return node_copy(xkanji_skip)
- else
- local g = node_copy(zero_glue)
- set_attr(g, attr_icflag, XKANJI_SKIP)
- return g
+
+ get_xkanjiskip_low = function(flag, qm, bn, bp, bh)
+ if flag or (qm.with_kanjiskip and (bn or bp or bh)) then
+ if xkanjiskip_jfm_flag then
+ local g = node_new(id_glue);
+ local gx = node_new(id_glue_spec);
+ setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
+ local bk = qm.xkanjiskip or null_skip_table
+ setfield(gx, 'width', bn and bk[1] or 0)
+ setfield(gx, 'stretch', bp and bk[2] or 0)
+ setfield(gx, 'shrink', bh and bk[3] or 0)
+ setfield(g, 'spec', gx)
+ set_attr(g, attr_icflag, XKANJI_SKIP_JFM)
+ return g
+ elseif flag then
+ return node_copy(xkanji_skip)
+ else
+ local g = node_new(id_glue);
+ local gx = node_new(id_glue_spec);
+ setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
+ local ks = getfield(xkanji_skip, 'spec')
+ setfield(gx, 'width', bn and getfield(ks, 'width') or 0)
+ setfield(gx, 'stretch', bp and getfield(ks, 'stretch') or 0)
+ setfield(gx, 'shrink', bh and getfield(ks, 'shrink') or 0)
+ setfield(g, 'spec', gx)
+ set_attr(g, attr_icflag, XKANJI_SKIP_JFM)
+ return g
+ end
end
end
- get_xkanjiskip_jfm = function (Nn)
- local g
+
+ get_xkanjiskip = function(Nn)
if (Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc) then
- g = node_new(id_glue)
- local gx = node_new(id_glue_spec);
- setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
- local bk = Nn.met.xkanjiskip or null_skip_table
- setfield(gx, 'width', bk[1])
- setfield(gx, 'stretch', bk[2])
- setfield(gx, 'shrink', bk[3])
- setfield(g, 'spec', gx)
+ return get_xkanjiskip_low(true, Nn.met, 1, 1, 1)
else
- g = node_copy(zero_glue)
+ local g = node_copy(zero_glue)
+ set_attr(g, attr_icflag, xkanjiskip_jfm_flag and XKANJI_SKIP_JFM or XKANJI_SKIP)
+ return g
end
- set_attr(g, attr_icflag, XKANJI_SKIP_JFM)
- return g
end
end
-------------------- 隣接した「塊」間の処理
-local function get_OA_skip()
+local function get_OA_skip(is_kanji)
local pm = Np.met
- return new_jfm_glue(pm,
- fast_find_char_class((Nq.id == id_math and -1 or 'jcharbdd'), pm), Np.class)
+ local g, _, kn, kp, kh = new_jfm_glue(
+ pm.char_type,
+ fast_find_char_class((Nq.id == id_math and -1 or 'jcharbdd'), pm),
+ Np.class)
+ local k
+ if is_kanji==0 then
+ k = (Np.auto_kspc or Nq.auto_kspc) and get_kanjiskip_low(false, pm, kn, kp, kh)
+ elseif is_kanji==1 then
+ k = ((Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc))
+ and get_xkanjiskip_low(false, pm, kn, kp, kh)
+ end
+ return g, k
end
-local function get_OB_skip()
+local function get_OB_skip(is_kanji)
local qm = Nq.met
- return new_jfm_glue(qm, Nq.class,
- fast_find_char_class((Np.id == id_math and -1 or'jcharbdd'), qm))
+ local g, _, kn, kp, kh = new_jfm_glue(
+ qm.char_type, Nq.class,
+ fast_find_char_class((Np.id == id_math and -1 or'jcharbdd'), qm))
+ local k
+ if is_kanji==0 then
+ k = (Np.auto_kspc or Nq.auto_kspc) and get_kanjiskip_low(false, qm, kn, kp, kh)
+ elseif is_kanji==1 then
+ k = ((Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc))
+ and get_xkanjiskip_low(false, qm, kn, kp, kh)
+ end
+ return g, k
end
-- (anything) .. jachar
local function handle_np_jachar(mode)
local qid = Nq.id
if qid==id_jglyph or ((qid==id_pbox or qid==id_pbox_w) and Nq.met) then
- local g = non_ihb_flag and calc_ja_ja_glue() or get_kanjiskip() -- M->K
- handle_penalty_normal(Nq.post, Np.pre, g); real_insert(g)
+ local g, k
+ if non_ihb_flag then g, k = calc_ja_ja_glue() end -- M->K
+ if not g then g = get_kanjiskip() end
+ handle_penalty_normal(Nq.post, Np.pre, g);
+ real_insert(g); real_insert(k)
elseif Nq.met then -- qid==id_hlist
- local g = non_ihb_flag and get_OA_skip() or get_kanjiskip() -- O_A->K
- handle_penalty_normal(0, Np.pre, g); real_insert(g)
+ local g, k
+ if non_ihb_flag then g, k = get_OA_skip(0) end -- O_A->K
+ if not g then g = get_kanjiskip() end
+ handle_penalty_normal(0, Np.pre, g); real_insert(g); real_insert(k)
elseif Nq.pre then
- local g = non_ihb_flag and get_OA_skip() or get_xkanjiskip(Np) -- O_A->X
- handle_penalty_normal((qid==id_hlist and 0 or Nq.post), Np.pre, g); real_insert(g)
+ local g, k
+ if non_ihb_flag then g, k = get_OA_skip(1) end -- O_A->X
+ if not g then g = get_xkanjiskip(Np) end
+ handle_penalty_normal((qid==id_hlist and 0 or Nq.post), Np.pre, g);
+ real_insert(g); real_insert(k)
else
- local g = non_ihb_flag and get_OA_skip() -- O_A
+ local g = non_ihb_flag and (get_OA_skip()) -- O_A
if qid==id_glue then handle_penalty_normal(0, Np.pre, g)
elseif qid==id_kern then handle_penalty_suppress(0, Np.pre, g)
else handle_penalty_always(0, Np.pre, g)
@@ -913,10 +984,10 @@ end
-- jachar .. (anything)
local function handle_nq_jachar()
if Np.pre then
- local g = non_ihb_flag and get_OB_skip() or get_xkanjiskip(Nq) -- O_B->X
+ local g = non_ihb_flag and get_OB_skip(1) or get_xkanjiskip(Nq) -- O_B->X
handle_penalty_normal(Nq.post, (Np.id==id_hlist and 0 or Np.pre), g); real_insert(g)
else
- local g =non_ihb_flag and get_OB_skip() -- O_B
+ local g =non_ihb_flag and (get_OB_skip()) -- O_B
if Np.id==id_glue then handle_penalty_normal(Nq.post, 0, g)
elseif Np.id==id_kern then handle_penalty_suppress(Nq.post, 0, g)
else handle_penalty_always(Nq.post, 0, g)
@@ -929,7 +1000,7 @@ end
local function handle_np_ja_hlist()
local qid = Nq.id
if qid==id_jglyph or ((qid==id_pbox or Nq.id == id_pbox_w) and Nq.met) then
- local g = non_ihb_flag and get_OB_skip() or get_kanjiskip() -- O_B->K
+ local g = non_ihb_flag and get_OB_skip(0) or get_kanjiskip() -- O_B->K
handle_penalty_normal(Nq.post, 0, g); real_insert(g)
elseif Nq.met then -- Nq.id==id_hlist
local g = get_kanjiskip() -- K
@@ -987,7 +1058,7 @@ local function handle_list_tail(mode)
-- the current list is the contents of a hbox
local npi, pm = Np.id, Np.met
if npi == id_jglyph or (npi==id_pbox and pm) then
- local g = new_jfm_glue(pm, Np.class, fast_find_char_class('boxbdd', pm))
+ local g = new_jfm_glue(pm.char_type, Np.class, fast_find_char_class('boxbdd', pm))
if g then
set_attr(g, attr_icflag, BOXBDD)
head = insert_after(head, Np.last, g)
@@ -1001,7 +1072,7 @@ local function handle_list_head(par_indented)
local npi, pm = Np.id, Np.met
if npi == id_jglyph or (npi==id_pbox and pm) then
if non_ihb_flag then
- local g = new_jfm_glue(pm, fast_find_char_class(par_indented, pm), Np.class)
+ local g = new_jfm_glue(pm.char_type, fast_find_char_class(par_indented, pm), Np.class)
if g then
set_attr(g, attr_icflag, BOXBDD)
if getid(g)==id_glue and #Bp==0 then
@@ -1054,16 +1125,14 @@ do
kanji_skip = node_new(id_glue); set_attr(kanji_skip, attr_icflag, KANJI_SKIP)
local s = skip_table_to_spec(KSK)
setfield(kanji_skip, 'spec', s)
- get_kanjiskip = (getfield(s, 'width') == 1073741823)
- and get_kanjiskip_jfm or get_kanjiskip_normal
+ kanjiskip_jfm_flag = (getfield(s, 'width') == 1073741823)
end
do
xkanji_skip = node_new(id_glue); set_attr(xkanji_skip, attr_icflag, XKANJI_SKIP)
local s = skip_table_to_spec(XSK)
setfield(xkanji_skip, 'spec', s)
- get_xkanjiskip = (getfield(s, 'width') == 1073741823)
- and get_xkanjiskip_jfm or get_xkanjiskip_normal
+ xkanjiskip_jfm_flag = (getfield(s, 'width') == 1073741823)
end
if mode then
@@ -1088,7 +1157,8 @@ local ensure_tex_attr = ltjb.ensure_tex_attr
local function cleanup(mode, TEMP)
-- adjust attr_icflag for avoiding error
if tex.getattribute(attr_icflag)~=0 then ensure_tex_attr(attr_icflag, 0) end
- node_free(kanji_skip); node_free(xkanji_skip); node_free(TEMP)
+ node_free(kanji_skip);
+ node_free(xkanji_skip); node_free(TEMP)
if mode then
local h = node_next(head)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index 394e83b1148..3e4e0b1522c 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -48,10 +48,20 @@ font_metric_table={} -- [font number] -> jfm_name, jfm_var, size
luatexbase.create_callback("luatexja.load_jfm", "data", function (ft, jn) return ft end)
-local jfm_file_name, jfm_var
+local jfm_file_name, jfm_var, jfm_ksp
local defjfm_res
local jfm_dir, is_def_jfont, is_vert_enabled
+local function norm_val(a)
+ if (not a) or (a==0.) then
+ return nil
+ elseif a==true then
+ return 1
+ else
+ return a
+ end
+end
+
function define_jfm(t)
local real_char -- Does current character class have the 'real' character?
if t.dir~=jfm_dir then
@@ -64,16 +74,13 @@ function define_jfm(t)
if type(i) == 'number' then -- char_type
if not v.chars then
if i ~= 0 then defjfm_res= nil; return end
- real_char = true
else
- real_char = false
for j,w in pairs(v.chars) do
if type(w) == 'number' and w~=-1 then
- real_char = true;
elseif type(w) == 'string' and utf.len(w)==1 then
- real_char = true; w = utf.byte(w)
+ w = utf.byte(w)
elseif type(w) == 'string' and utf.len(w)==2 and utf.sub(w,2) == '*' then
- real_char = true; w = utf.byte(utf.sub(w,1,1))
+ w = utf.byte(utf.sub(w,1,1))
end
if not t.chars[w] then
t.chars[w] = i
@@ -81,44 +88,43 @@ function define_jfm(t)
defjfm_res= nil; return
end
end
- if type(v.align)~='string' then
- v.align = 'left' -- left
- end
- if real_char then
- if type(v.width)~='number' and v.width~='prop' then
- defjfm_res= nil; return
- else
- if v.width=='prop' and jfm_dir=='tate' then
- v.width = 1.0
- end
- if type(v.height)~='number' then
- v.height = 0.0
- end
- if type(v.depth)~='number' then
- v.depth = 0.0
- end
- if type(v.italic)~='number' then
- v.italic = 0.0
- end
- if type(v.left)~='number' then
- v.left = 0.0
- end
- if type(v.down)~='number' then
- v.down = 0.0
- end
- end
- end
v.chars = nil
end
+ if type(v.align)~='string' then
+ v.align = 'left' -- left
+ end
+ if type(v.width)~='number' then
+ v.width = (jfm_dir=='tate') and 1.0
+ end
+ if type(v.height)~='number' then
+ v.height = (jfm_dir=='tate') and 0.0
+ end
+ if type(v.depth)~='number' then
+ v.depth = (jfm_dir=='tate') and 0.0
+ end
+ if type(v.italic)~='number' then
+ v.italic = 0.0
+ end
+ if type(v.left)~='number' then
+ v.left = 0.0
+ end
+ if type(v.down)~='number' then
+ v.down = 0.0
+ end
v.kern = v.kern or {}; v.glue = v.glue or {}
- for j in pairs(v.glue) do
+ for j,x in pairs(v.glue) do
if v.kern[j] then defjfm_res= nil; return end
+ x.ratio, x[5] = (x.ratio or (x[5] and 0.5*(1+x[5]) or 0.5)), nil
+ x.priority, x[4] = (x.priority or x[4] or 0), nil
+ x.kanjiskip_natural = norm_val(x.kanjiskip_natural)
+ x.kanjiskip_stretch = norm_val(x.kanjiskip_stretch)
+ x.kanjiskip_shrink = norm_val(x.kanjiskip_shrink)
end
for j,x in pairs(v.kern) do
if type(x)=='number' then
- v.kern[j] = {x, 0}
+ v.kern[j] = {x, 0.5}
elseif type(x)=='table' then
- v.kern[j] = {x[1], x[2] or 0}
+ v.kern[j] = { x[1], ratio=x.ratio or (x[2] and 0.5*(1+x[2]) or 0.5) }
end
end
t.char_type[i] = v
@@ -147,7 +153,6 @@ do
return new
else return nil end
end
-
update_jfm_cache = function (j,sz)
if metrics[j].size_cache[sz] then return end
--local TEMP = node_new(id_kern)
@@ -161,7 +166,14 @@ do
if type(i) == 'number' then -- char_type
for k,w in pairs(v.glue) do
local h = node_new(id_glue_spec)
- v[k] = {true, h, (w[5] and w[5]/sz or 0), FROM_JFM + (w[4] and w[4]/sz or 0)}
+ v[k] = {
+ true, h,
+ ratio=w.ratio/sz,
+ priority=FROM_JFM + w.priority/sz,
+ kanjiskip_natural = w.kanjiskip_natural and w.kanjiskip_natural/sz,
+ kanjiskip_stretch = w.kanjiskip_stretch and w.kanjiskip_stretch/sz,
+ kanjiskip_shrink = w.kanjiskip_shrink and w.kanjiskip_shrink/sz,
+ }
setfield(h, 'width', w[1])
setfield(h, 'stretch', w[2])
setfield(h, 'shrink', w[3])
@@ -173,7 +185,7 @@ do
setfield(g, 'kern', w[1])
setfield(g, 'subtype', 1)
set_attr(g, attr_icflag, FROM_JFM)
- v[k] = {false, g, w[2]/sz}
+ v[k] = {false, g, ratio=w[2]/sz}
end
end
v.glue, v.kern = nil, nil
@@ -274,6 +286,7 @@ do
local ad = identifiers[fn].parameters
local sz = metrics[j].size_cache[f.size]
local fmtable = { jfm = j, size = f.size, var = jfm_var,
+ with_kanjiskip = jfm_ksp,
zw = sz.zw, zh = sz.zh,
ascent = ad.ascender,
descent = ad.descender,
@@ -312,7 +325,7 @@ do
-- extract jfm_file_name and jfm_var
-- normalize position of 'jfm=' and 'jfmvar=' keys
local function extract_metric(name)
- jfm_file_name = ''; jfm_var = ''
+ jfm_file_name = ''; jfm_var = ''; jfm_ksp = true
local tmp, index = name:sub(1, 5), 1
if tmp == 'file:' or tmp == 'name:' or tmp == 'psft:' then
index = 6
@@ -350,8 +363,11 @@ do
name = name .. 'jfmvar=' .. jfm_var
end
end
+ for x in string.gmatch (name, "[:;]([+%%-]?)ltjks") do
+ jfm_ksp = not (x=='-')
+ end
if jfm_dir == 'tate' then
- is_vert_enabled = (not name:match('-vert')) and (not name:match('-vrt2'))
+ is_vert_enabled = (not name:match('[:;]%-vert')) and (not name:match('[:;]%-vrt2'))
if not name:match('vert') and not name:match('vrt2') then
name = name .. ';vert;vrt2'
end
@@ -758,7 +774,7 @@ do
local bx = font_extra_basename[bname].vkerns
local lookuphash = id.resources.lookuphash
local desc = id.shared.rawdata.descriptions
- if bx then
+ if bx and lookuphash then
for i,v in pairs(bx) do
lookuphash[i] = lookuphash[i] or v
for j,w in pairs(v) do
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua
index 15813fc6440..3ea3d4c184c 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua
@@ -152,7 +152,7 @@ function (p, sty)
set_attr(r, attr_ykblshift, 0)
-- ltj-setwidth 内で実際の位置補正はおこなうので,補正量を退避
local met = ltjf_font_metric_table[f]
- r = capsule_glyph_math(r, met, ltjf_find_char_class(pc, met));
+ r = capsule_glyph_math(r, met, met.char_type[ltjf_find_char_class(pc, met)]);
setfield(q, 'head', r); node_free(p); p=q;
set_attr(r, attr_yablshift, k)
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
index 1d4da319e7d..acbe7543ee1 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
@@ -65,7 +65,7 @@ local ltjw = {} --export
luatexja.setwidth = ltjw
luatexbase.create_callback("luatexja.set_width", "data",
- function (fstable, fmtable, jchar_class)
+ function (fstable, fmtable, char_data)
return fstable
end)
local call_callback = luatexbase.call_callback
@@ -75,22 +75,24 @@ local fshift = { down = 0, left = 0}
local min, max = math.min, math.max
-- 和文文字の位置補正(横)
-local function capsule_glyph_yoko(p, met, class, head, dir)
- local char_data = met.char_type[class]
+local function capsule_glyph_yoko(p, met, char_data, head, dir)
if not char_data then return node_next(p), head, p end
- -- f*: whd specified in JFM
- local fwidth, pwidth = char_data.width, getfield(p, 'width')
- fwidth = (fwidth ~= 'prop') and fwidth or pwidth
fshift.down = char_data.down; fshift.left = char_data.left
- fshift = call_callback("luatexja.set_width", fshift, met, class)
- local fheight, fdepth = char_data.height, char_data.depth
+ fshift = call_callback("luatexja.set_width", fshift, met, char_data)
local kbl = has_attr(p, attr_ykblshift) or 0
--
+ -- f*: whd specified in JFM
+ local fwidth, pwidth = char_data.width, getfield(p, 'width')
+ fwidth = fwidth or pwidth
+ local fheight, pheight = char_data.height, getfield(p, 'height')
+ fheight = fheight or pheight
+ local fdepth, pdepth = char_data.depth,getfield(p, 'depth')
+ fdepth = fdepth or pdepth
if pwidth==fwidth then
-- 補正後glyph node は ht: p.height - kbl - down, dp: p.depth + min(0, kbl+down) を持つ
-- 設定されるべき寸法: ht: fheight - kbl, dp: fdepth + kbl
- local ht_diff = fheight + fshift.down - getfield(p, 'height')
- local dp_diff = fdepth + kbl - getfield(p, 'depth') - min(kbl + fshift.down, 0)
+ local ht_diff = fheight + fshift.down - pheight
+ local dp_diff = fdepth + kbl - pdepth - min(kbl + fshift.down, 0)
if ht_diff == 0 and dp_diff ==0 then -- offset only
set_attr(p, attr_icflag, PROCESSED)
setfield(p, 'xoffset', getfield(p, 'xoffset') - fshift.left)
@@ -104,7 +106,7 @@ local function capsule_glyph_yoko(p, met, class, head, dir)
setfield(box, 'depth', fdepth + kbl)
setfield(box, 'dir', dir)
set_attr(box, attr_icflag, PACKED)
- set_attr(p, attr_icflag, PACKED)
+ --set_attr(p, attr_icflag, PACKED)
head = p and node_insert_before(head, p, box)
or node_insert_after(head, node_tail(head), box)
return node_next(p), head, p, box
@@ -133,8 +135,7 @@ end
luatexja.setwidth.capsule_glyph_yoko = capsule_glyph_yoko
-- 和文文字の位置補正(縦)
-local function capsule_glyph_tate(p, met, class, head, dir)
- local char_data = met.char_type[class]
+local function capsule_glyph_tate(p, met, char_data, head, dir)
if not char_data then return node_next(p), head end
local ascent, descent = met.ascent, met.descent
local fwidth, pwidth = char_data.width
@@ -148,11 +149,11 @@ local function capsule_glyph_tate(p, met, class, head, dir)
pwidth = pwidth + (met.v_advance[pc] or 0)
ascent = met.v_origin[pc] and ascent - met.v_origin[pc] or ascent
end
- fwidth = (fwidth ~= 'prop') and fwidth or pwidth
+ fwidth = fwidth or pwidth
fshift.down = char_data.down; fshift.left = char_data.left
- fshift = call_callback("luatexja.set_width", fshift, met, class)
- local fheight, fdepth = char_data.height, char_data.depth
-
+ fshift = call_callback("luatexja.set_width", fshift, met, char_data)
+ local fheight = char_data.height or 0
+ local fdepth = char_data.depth or 0
local y_shift
= getfield(p, 'xoffset') + (has_attr(p,attr_tkblshift) or 0)
local q
@@ -186,16 +187,15 @@ local function capsule_glyph_tate(p, met, class, head, dir)
end
luatexja.setwidth.capsule_glyph_tate = capsule_glyph_tate
-local function capsule_glyph_math(p, met, class)
- local char_data = met.char_type[class]
+local function capsule_glyph_math(p, met, char_data)
if not char_data then return nil end
local fwidth, pwidth = char_data.width, getfield(p, 'width')
fwidth = (fwidth ~= 'prop') and fwidth or pwidth
fshift.down = char_data.down; fshift.left = char_data.left
- fshift = call_callback("luatexja.set_width", fshift, met, class)
+ fshift = call_callback("luatexja.set_width", fshift, met, char_data)
local fheight, fdepth = char_data.height, char_data.depth
- local y_shift, ca
- = - getfield(p, 'yoffset') + (has_attr(p,attr_ykblshift) or 0), char_data.align
+ local y_shift
+ = - getfield(p, 'yoffset') + (has_attr(p,attr_ykblshift) or 0)
setfield(p, 'yoffset', -fshift.down)
setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth) - fshift.left)
local box = node_new(id_hlist);
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-unicode-ccfix.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-unicode-ccfix.lua
index b071b226c55..430bb398555 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-unicode-ccfix.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-unicode-ccfix.lua
@@ -1,183 +1,181 @@
-- Do not edit this file!
--- Created from LineBreak.txt by ltj-unicode-ccfix_make.pl on 2015年 2月 12日 木曜日 13:36:49 JST.
+-- Created from LineBreak.txt by ltj-unicode-ccfix_make.pl on 2015年 10月 24日 土曜日 16:45:46 JST.
-- In case of errors, fix the Perl script instead.
-if tex.getcatcode(0x6F22)==12 then
- local tex_catcode = tex.setcatcode
- local function set_letter(b,e)
+local tex_catcode = tex.setcatcode
+local tex_getcc = tex.getcatcode
+local function set_letter(b,e)
+ if tex_getcc(b)~=11 then
for i=b,e do tex_catcode('global', i, 11) end
end
-
- set_letter(0x231A,0x231B)
- set_letter(0x23F0,0x23F3)
- set_letter(0x2600,0x2603)
- set_letter(0x2614,0x2615)
- set_letter(0x2618,0x2618)
- set_letter(0x261A,0x261F)
- set_letter(0x2639,0x263B)
- set_letter(0x2668,0x2668)
- set_letter(0x267F,0x267F)
- set_letter(0x26BD,0x26C8)
- set_letter(0x26CD,0x26CD)
- set_letter(0x26CF,0x26D1)
- set_letter(0x26D3,0x26D4)
- set_letter(0x26D8,0x26D9)
- set_letter(0x26DC,0x26DC)
- set_letter(0x26DF,0x26E1)
- set_letter(0x26EA,0x26EA)
- set_letter(0x26F1,0x26F5)
- set_letter(0x26F7,0x26FA)
- set_letter(0x26FD,0x26FF)
- set_letter(0x2700,0x2704)
- set_letter(0x2708,0x270D)
- set_letter(0x2E80,0x2E99)
- set_letter(0x2E9B,0x2EF3)
- set_letter(0x2F00,0x2FD5)
- set_letter(0x2FF0,0x2FFB)
- set_letter(0x3003,0x3003)
- set_letter(0x3004,0x3004)
- set_letter(0x3006,0x3006)
- set_letter(0x3007,0x3007)
- set_letter(0x3012,0x3013)
- set_letter(0x3020,0x3020)
- set_letter(0x3021,0x3029)
- set_letter(0x3030,0x3030)
- set_letter(0x3031,0x3034)
- set_letter(0x3036,0x3037)
- set_letter(0x3038,0x303A)
- set_letter(0x303D,0x303D)
- set_letter(0x303E,0x303F)
- set_letter(0x3042,0x3042)
- set_letter(0x3044,0x3044)
- set_letter(0x3046,0x3046)
- set_letter(0x3048,0x3048)
- set_letter(0x304A,0x3062)
- set_letter(0x3064,0x3082)
- set_letter(0x3084,0x3084)
- set_letter(0x3086,0x3086)
- set_letter(0x3088,0x308D)
- set_letter(0x308F,0x3094)
- set_letter(0x309F,0x309F)
- set_letter(0x30A2,0x30A2)
- set_letter(0x30A4,0x30A4)
- set_letter(0x30A6,0x30A6)
- set_letter(0x30A8,0x30A8)
- set_letter(0x30AA,0x30C2)
- set_letter(0x30C4,0x30E2)
- set_letter(0x30E4,0x30E4)
- set_letter(0x30E6,0x30E6)
- set_letter(0x30E8,0x30ED)
- set_letter(0x30EF,0x30F4)
- set_letter(0x30F7,0x30FA)
- set_letter(0x30FF,0x30FF)
- set_letter(0x3105,0x312D)
- set_letter(0x3131,0x318E)
- set_letter(0x3190,0x3191)
- set_letter(0x3192,0x3195)
- set_letter(0x3196,0x319F)
- set_letter(0x31A0,0x31BA)
- set_letter(0x31C0,0x31E3)
- set_letter(0x3200,0x321E)
- set_letter(0x3220,0x3229)
- set_letter(0x322A,0x3247)
- set_letter(0x3250,0x3250)
- set_letter(0x3251,0x325F)
- set_letter(0x3260,0x327F)
- set_letter(0x3280,0x3289)
- set_letter(0x328A,0x32B0)
- set_letter(0x32B1,0x32BF)
- set_letter(0x32C0,0x32FE)
- set_letter(0x3300,0x33FF)
- set_letter(0x3400,0x4DB5)
- set_letter(0x4DB6,0x4DBF)
- set_letter(0x4E00,0x9FCC)
- set_letter(0x9FCD,0x9FFF)
- set_letter(0xA000,0xA014)
- set_letter(0xA016,0xA48C)
- set_letter(0xA490,0xA4C6)
- set_letter(0xF900,0xFA6D)
- set_letter(0xFA6E,0xFA6F)
- set_letter(0xFA70,0xFAD9)
- set_letter(0xFADA,0xFAFF)
- set_letter(0xFE30,0xFE30)
- set_letter(0xFE31,0xFE32)
- set_letter(0xFE33,0xFE34)
- set_letter(0xFE45,0xFE46)
- set_letter(0xFE49,0xFE4C)
- set_letter(0xFE4D,0xFE4F)
- set_letter(0xFE51,0xFE51)
- set_letter(0xFE58,0xFE58)
- set_letter(0xFE5F,0xFE61)
- set_letter(0xFE62,0xFE62)
- set_letter(0xFE63,0xFE63)
- set_letter(0xFE64,0xFE66)
- set_letter(0xFE68,0xFE68)
- set_letter(0xFE6B,0xFE6B)
- set_letter(0xFF02,0xFF03)
- set_letter(0xFF06,0xFF07)
- set_letter(0xFF0A,0xFF0A)
- set_letter(0xFF0B,0xFF0B)
- set_letter(0xFF0D,0xFF0D)
- set_letter(0xFF0F,0xFF0F)
- set_letter(0xFF10,0xFF19)
- set_letter(0xFF1C,0xFF1E)
- set_letter(0xFF20,0xFF20)
- set_letter(0xFF21,0xFF3A)
- set_letter(0xFF3C,0xFF3C)
- set_letter(0xFF3E,0xFF3E)
- set_letter(0xFF3F,0xFF3F)
- set_letter(0xFF40,0xFF40)
- set_letter(0xFF41,0xFF5A)
- set_letter(0xFF5C,0xFF5C)
- set_letter(0xFF5E,0xFF5E)
- set_letter(0xFFE2,0xFFE2)
- set_letter(0xFFE3,0xFFE3)
- set_letter(0xFFE4,0xFFE4)
- set_letter(0x1B000,0x1B001)
- set_letter(0x1F000,0x1F02B)
- set_letter(0x1F030,0x1F093)
- set_letter(0x1F0A0,0x1F0AE)
- set_letter(0x1F0B1,0x1F0BF)
- set_letter(0x1F0C1,0x1F0CF)
- set_letter(0x1F0D1,0x1F0F5)
- set_letter(0x1F200,0x1F202)
- set_letter(0x1F210,0x1F23A)
- set_letter(0x1F240,0x1F248)
- set_letter(0x1F250,0x1F251)
- set_letter(0x1F300,0x1F32C)
- set_letter(0x1F330,0x1F37D)
- set_letter(0x1F380,0x1F39B)
- set_letter(0x1F39E,0x1F3B4)
- set_letter(0x1F3B7,0x1F3BB)
- set_letter(0x1F3BD,0x1F3CE)
- set_letter(0x1F3D4,0x1F3F7)
- set_letter(0x1F400,0x1F49F)
- set_letter(0x1F4A1,0x1F4A1)
- set_letter(0x1F4A3,0x1F4A3)
- set_letter(0x1F4A5,0x1F4AE)
- set_letter(0x1F4B0,0x1F4B0)
- set_letter(0x1F4B3,0x1F4FE)
- set_letter(0x1F507,0x1F516)
- set_letter(0x1F525,0x1F531)
- set_letter(0x1F54A,0x1F54A)
- set_letter(0x1F550,0x1F579)
- set_letter(0x1F57B,0x1F5A3)
- set_letter(0x1F5A5,0x1F5D3)
- set_letter(0x1F5DC,0x1F5F3)
- set_letter(0x1F5FA,0x1F5FF)
- set_letter(0x1F600,0x1F642)
- set_letter(0x1F645,0x1F64F)
- set_letter(0x1F680,0x1F6CF)
- set_letter(0x1F6E0,0x1F6EC)
- set_letter(0x1F6F0,0x1F6F3)
- set_letter(0x20000,0x2A6D6)
- set_letter(0x2A6D7,0x2A6FF)
- set_letter(0x2A700,0x2B734)
- set_letter(0x2B735,0x2B73F)
- set_letter(0x2B740,0x2B81D)
- set_letter(0x2B81E,0x2F7FF)
- set_letter(0x2F800,0x2FA1D)
- set_letter(0x2FA1E,0x2FFFD)
- set_letter(0x30000,0x3FFFD)
-
end
-
+set_letter(0x231A,0x231B)
+set_letter(0x23F0,0x23F3)
+set_letter(0x2600,0x2603)
+set_letter(0x2614,0x2615)
+set_letter(0x2618,0x2618)
+set_letter(0x261A,0x261F)
+set_letter(0x2639,0x263B)
+set_letter(0x2668,0x2668)
+set_letter(0x267F,0x267F)
+set_letter(0x26BD,0x26C8)
+set_letter(0x26CD,0x26CD)
+set_letter(0x26CF,0x26D1)
+set_letter(0x26D3,0x26D4)
+set_letter(0x26D8,0x26D9)
+set_letter(0x26DC,0x26DC)
+set_letter(0x26DF,0x26E1)
+set_letter(0x26EA,0x26EA)
+set_letter(0x26F1,0x26F5)
+set_letter(0x26F7,0x26FA)
+set_letter(0x26FD,0x26FF)
+set_letter(0x2700,0x2704)
+set_letter(0x2708,0x270D)
+set_letter(0x2E80,0x2E99)
+set_letter(0x2E9B,0x2EF3)
+set_letter(0x2F00,0x2FD5)
+set_letter(0x2FF0,0x2FFB)
+set_letter(0x3003,0x3003)
+set_letter(0x3004,0x3004)
+set_letter(0x3006,0x3006)
+set_letter(0x3007,0x3007)
+set_letter(0x3012,0x3013)
+set_letter(0x3020,0x3020)
+set_letter(0x3021,0x3029)
+set_letter(0x3030,0x3030)
+set_letter(0x3031,0x3034)
+set_letter(0x3036,0x3037)
+set_letter(0x3038,0x303A)
+set_letter(0x303D,0x303D)
+set_letter(0x303E,0x303F)
+set_letter(0x3042,0x3042)
+set_letter(0x3044,0x3044)
+set_letter(0x3046,0x3046)
+set_letter(0x3048,0x3048)
+set_letter(0x304A,0x3062)
+set_letter(0x3064,0x3082)
+set_letter(0x3084,0x3084)
+set_letter(0x3086,0x3086)
+set_letter(0x3088,0x308D)
+set_letter(0x308F,0x3094)
+set_letter(0x309F,0x309F)
+set_letter(0x30A2,0x30A2)
+set_letter(0x30A4,0x30A4)
+set_letter(0x30A6,0x30A6)
+set_letter(0x30A8,0x30A8)
+set_letter(0x30AA,0x30C2)
+set_letter(0x30C4,0x30E2)
+set_letter(0x30E4,0x30E4)
+set_letter(0x30E6,0x30E6)
+set_letter(0x30E8,0x30ED)
+set_letter(0x30EF,0x30F4)
+set_letter(0x30F7,0x30FA)
+set_letter(0x30FF,0x30FF)
+set_letter(0x3105,0x312D)
+set_letter(0x3131,0x318E)
+set_letter(0x3190,0x3191)
+set_letter(0x3192,0x3195)
+set_letter(0x3196,0x319F)
+set_letter(0x31A0,0x31BA)
+set_letter(0x31C0,0x31E3)
+set_letter(0x3200,0x321E)
+set_letter(0x3220,0x3229)
+set_letter(0x322A,0x3247)
+set_letter(0x3250,0x3250)
+set_letter(0x3251,0x325F)
+set_letter(0x3260,0x327F)
+set_letter(0x3280,0x3289)
+set_letter(0x328A,0x32B0)
+set_letter(0x32B1,0x32BF)
+set_letter(0x32C0,0x32FE)
+set_letter(0x3300,0x33FF)
+set_letter(0x3400,0x4DB5)
+set_letter(0x4DB6,0x4DBF)
+set_letter(0x4E00,0x9FD5)
+set_letter(0x9FD6,0x9FFF)
+set_letter(0xA000,0xA014)
+set_letter(0xA016,0xA48C)
+set_letter(0xA490,0xA4C6)
+set_letter(0xF900,0xFA6D)
+set_letter(0xFA6E,0xFA6F)
+set_letter(0xFA70,0xFAD9)
+set_letter(0xFADA,0xFAFF)
+set_letter(0xFE30,0xFE30)
+set_letter(0xFE31,0xFE32)
+set_letter(0xFE33,0xFE34)
+set_letter(0xFE45,0xFE46)
+set_letter(0xFE49,0xFE4C)
+set_letter(0xFE4D,0xFE4F)
+set_letter(0xFE51,0xFE51)
+set_letter(0xFE58,0xFE58)
+set_letter(0xFE5F,0xFE61)
+set_letter(0xFE62,0xFE62)
+set_letter(0xFE63,0xFE63)
+set_letter(0xFE64,0xFE66)
+set_letter(0xFE68,0xFE68)
+set_letter(0xFE6B,0xFE6B)
+set_letter(0xFF02,0xFF03)
+set_letter(0xFF06,0xFF07)
+set_letter(0xFF0A,0xFF0A)
+set_letter(0xFF0B,0xFF0B)
+set_letter(0xFF0D,0xFF0D)
+set_letter(0xFF0F,0xFF0F)
+set_letter(0xFF10,0xFF19)
+set_letter(0xFF1C,0xFF1E)
+set_letter(0xFF20,0xFF20)
+set_letter(0xFF21,0xFF3A)
+set_letter(0xFF3C,0xFF3C)
+set_letter(0xFF3E,0xFF3E)
+set_letter(0xFF3F,0xFF3F)
+set_letter(0xFF40,0xFF40)
+set_letter(0xFF41,0xFF5A)
+set_letter(0xFF5C,0xFF5C)
+set_letter(0xFF5E,0xFF5E)
+set_letter(0xFFE2,0xFFE2)
+set_letter(0xFFE3,0xFFE3)
+set_letter(0xFFE4,0xFFE4)
+set_letter(0x1B000,0x1B001)
+set_letter(0x1F000,0x1F02B)
+set_letter(0x1F030,0x1F093)
+set_letter(0x1F0A0,0x1F0AE)
+set_letter(0x1F0B1,0x1F0BF)
+set_letter(0x1F0C1,0x1F0CF)
+set_letter(0x1F0D1,0x1F0F5)
+set_letter(0x1F200,0x1F202)
+set_letter(0x1F210,0x1F23A)
+set_letter(0x1F240,0x1F248)
+set_letter(0x1F250,0x1F251)
+set_letter(0x1F300,0x1F39B)
+set_letter(0x1F39E,0x1F3B4)
+set_letter(0x1F3B7,0x1F3BB)
+set_letter(0x1F3BD,0x1F3FA)
+set_letter(0x1F400,0x1F49F)
+set_letter(0x1F4A1,0x1F4A1)
+set_letter(0x1F4A3,0x1F4A3)
+set_letter(0x1F4A5,0x1F4AE)
+set_letter(0x1F4B0,0x1F4B0)
+set_letter(0x1F4B3,0x1F4FF)
+set_letter(0x1F507,0x1F516)
+set_letter(0x1F525,0x1F531)
+set_letter(0x1F54A,0x1F579)
+set_letter(0x1F57B,0x1F5A3)
+set_letter(0x1F5A5,0x1F5D3)
+set_letter(0x1F5DC,0x1F5F3)
+set_letter(0x1F5FA,0x1F5FF)
+set_letter(0x1F600,0x1F64F)
+set_letter(0x1F680,0x1F6D0)
+set_letter(0x1F6E0,0x1F6EC)
+set_letter(0x1F6F0,0x1F6F3)
+set_letter(0x1F910,0x1F918)
+set_letter(0x1F980,0x1F984)
+set_letter(0x1F9C0,0x1F9C0)
+set_letter(0x20000,0x2A6D6)
+set_letter(0x2A6D7,0x2A6FF)
+set_letter(0x2A700,0x2B734)
+set_letter(0x2B735,0x2B73F)
+set_letter(0x2B740,0x2B81D)
+set_letter(0x2B81E,0x2B81F)
+set_letter(0x2B820,0x2CEA1)
+set_letter(0x2CEA2,0x2F7FF)
+set_letter(0x2F800,0x2FA1D)
+set_letter(0x2FA1E,0x2FFFD)
+set_letter(0x30000,0x3FFFD)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
index 2f3f4a67069..a90b1e2d89f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjarticle}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -168,8 +168,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand{\baselinestretch}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
index 80833ea86a0..eb605cc8bfd 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjbk10.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{15}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
index 729d0eac73e..bdd9b97faec 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjbk11.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{15.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
index ff4980227c1..e9ec2762030 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjbk12.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{16.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
index 753b02d3d42..8a474c34dfc 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjbook}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -176,8 +176,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand{\baselinestretch}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
index f439b665ab0..aa9a1de288c 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjreport}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -174,8 +174,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand{\baselinestretch}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
index e962e19c561..7d1101828ca 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjsarticle}
- [2015/05/26 ]
+ [2015/10/18 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -301,8 +301,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
index 31c40552de3..4fdcca173eb 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjsbook}
- [2015/05/26 ]
+ [2015/10/18 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -308,8 +308,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
index 4928287507a..0598ed74cb4 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjsize10.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{15}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
index 5ad8b0b3f84..23e9b5cef21 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjsize11.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{15.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
index 12deafaae8d..15ea37b7b38 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjsize12.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{16.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
index e8bfdf3484b..0d1d4bb6f05 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjskiyou}
- [2015/05/26 ]
+ [2015/10/18 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -303,8 +303,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924872] \ltj@stdmcfont:jfm=min}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
index a640f22b67d..e2e7849906b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjspf}
- [2015/05/26 ]
+ [2015/10/18 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -301,8 +301,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.903375] \ltj@stdmcfont:jfm=min}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
index f8bab8b2cbe..228d6d330c3 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjtarticle}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -180,8 +180,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand{\baselinestretch}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
index 1ee1254ad28..4565ea46ae7 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtbk10.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
index 5963a1d1178..65c4594c033 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtbk11.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
index c8fe221d249..b5c89c433a8 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtbk12.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{18}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
index 3527d1196a9..36d9a46d476 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjtbook}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -188,8 +188,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand{\baselinestretch}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
index 56727a81c76..312af11a1cb 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjtreport}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -186,8 +186,13 @@
\advance \@tempdima 2in
\advance \@tempdimb 2in
\fi
-\setlength{\pdfpagewidth}{\@tempdima}
-\setlength{\pdfpageheight}{\@tempdimb}
+\ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\@tempdima}
+ \setlength{\pdfpageheight}{\@tempdimb}
+\else
+ \setlength{\pagewidth}{\@tempdima}
+ \setlength{\pageheight}{\@tempdimb}
+\fi
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand{\baselinestretch}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
index 977f2ad9ecd..5eb5897a84b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtsize10.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
index 30c30e26473..706e5c66af1 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtsize11.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
index f0e8ab4911f..e999c9e0569 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
@@ -39,7 +39,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtsize12.clo}
- [2015/01/01 v1.6-ltj-9
+ [2015/10/18 v1.6-ltj-10
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{18}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index 69c409836df..d55c37578e7 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2015/05/17 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2015/10/12 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -92,7 +92,7 @@
%% Check if LuaTeX is used
\ltx@LocalExpandAfter\ifx\csname directlua\endcsname\relax
% Loading is silently aborted, since the notice of the wrong
- % engine is aldready shown in otfluaload.
+ % engine is already shown in luaotfload.
\ltj@core@AtEnd
\expandafter\endinput\fi\relax
@@ -184,8 +184,7 @@
\def\RequireLuaTeXjaSubmodule#1{%
\@ifnextchar[{\ltj@requirelua@submod{#1}}{\ltj@requirelua@submod{#1}[]}}
\def\ltj@requirelua@submod#1[#2]{%
- \directlua{luatexja.load_module(
- "\luatexluaescapestring{#1}")}}
+ \directlua{luatexja.load_module("\luatexluaescapestring{#1}")}}
%%%%%%%% Load all sub-packages.
@@ -206,25 +205,62 @@
\afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(false, 'yoko','\luatexluaescapestring{\noexpand#1}')}}
\protected\def\globaljfont#1{%
\afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true, 'yoko','\luatexluaescapestring{\noexpand#1}')}}
-\def\ltj@@jfont{\directlua{luatexja.jfont.jfontdefY()}}
+\ifdefined\newluafunction
+ \newluafunction\ltj@@jfont@inner
+ \directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@jfont@inner] = luatexja.jfont.jfontdefY
+ }
+ \def\ltj@@jfont{\luafunction\ltj@@jfont@inner}
+\else
+ \def\ltj@@jfont{\directlua{luatexja.jfont.jfontdefY()}}
+\fi
%%%%%%%% \tfont\CS={...:...;jfm=metric;...}, \globaltfont
\protected\def\tfont#1{%
- \afterassignment\ltj@@tfont\directlua{luatexja.jfont.jfontdefX(false, 'tate','\luatexluaescapestring{\noexpand#1}')}}
+ \afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(false, 'tate','\luatexluaescapestring{\noexpand#1}')}}
\protected\def\globaltfont#1{%
- \afterassignment\ltj@@tfont\directlua{luatexja.jfont.jfontdefX(true, 'tate','\luatexluaescapestring{\noexpand#1}')}}
-\def\ltj@@tfont{\directlua{luatexja.jfont.jfontdefY()}}
+ \afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true, 'tate','\luatexluaescapestring{\noexpand#1}')}}
%%%%%%%% \zw, \zh
-\protected\def\zw{\directlua{tex.setdimen('ltj@zw', luatexja.jfont.get_zw())}\ltj@zw}
-\protected\def\zh{\directlua{tex.setdimen('ltj@zh', luatexja.jfont.get_zh())}\ltj@zh}
+\ifdefined\newluafunction
+ \newluafunction\ltj@zw@inner
+ \newluafunction\ltj@zh@inner
+ \directlua{
+ local t, setdimen, ltjf = lua.get_functions_table(), tex.setdimen, luatexja.jfont
+ t[\the\ltj@zw@inner] = function() setdimen('ltj@zw', ltjf.get_zw()) end
+ t[\the\ltj@zh@inner] = function() setdimen('ltj@zh', ltjf.get_zh()) end
+ }
+ \protected\def\zw{\luafunction\ltj@zw@inner\ltj@zw}
+ \protected\def\zh{\luafuntcion\ltj@zh@inner\ltj@zh}
+\else
+ \protected\def\zw{\directlua{tex.setdimen('ltj@zw', luatexja.jfont.get_zw())}\ltj@zw}
+ \protected\def\zh{\directlua{tex.setdimen('ltj@zh', luatexja.jfont.get_zh())}\ltj@zh}
+\fi
%%%%%%%% \inhibitglue
-\protected\def\ltj@reset@globaldefs{%
- \directlua{luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0}}
-\protected\def\ltj@restore@globaldefs{\directlua{tex.globaldefs = luatexja.global_temp}\relax}
-\protected\def\inhibitglue{\ifhmode\ltj@@ihb\fi}
-\def\ltj@@ihb{\relax\directlua{luatexja.jfmglue.create_inhibitglue_node()}}
+\ifdefined\newluafunction
+ \newluafunction\ltj@reset@globaldefs@inner
+ \newluafunction\ltj@restore@globaldefs@inner
+ \newluafunction\ltj@@ihb@inner
+ \directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@reset@globaldefs@inner]
+ = function() luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0 end
+ t[\the\ltj@restore@globaldefs@inner]
+ = function() tex.globaldefs = luatexja.global_temp end
+ t[\the\ltj@@ihb@inner] = luatexja.jfmglue.create_inhibitglue_node
+ }
+ \protected\def\ltj@reset@globaldefs{\luafunction\ltj@reset@globaldefs@inner}
+ \protected\def\ltj@restore@globaldefs{\luafunction\ltj@restore@globaldefs@inner}
+ \protected\def\inhibitglue{\ifhmode\relax\luafunction\ltj@@ihb@inner\fi}
+\else
+ \protected\def\ltj@reset@globaldefs{%
+ \directlua{luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0}}
+ \protected\def\ltj@restore@globaldefs{\directlua{tex.globaldefs = luatexja.global_temp}\relax}
+ \protected\def\inhibitglue{\ifhmode\ltj@@ihb\fi}
+ \def\ltj@@ihb{\relax\directlua{luatexja.jfmglue.create_inhibitglue_node()}}
+\fi
%%%%%%%% \ltjdefcharrange<name>{100-200,3000-,5000,...}
\protected\def\ltjdefcharrange#1#2{%
@@ -346,8 +382,24 @@
\fi}
% [x]]kanjiskip = <skip>
- \define@key[ltj]{japaram}{kanjiskip}{\ltjsetkanjiskip#1}
- \define@key[ltj]{japaram}{xkanjiskip}{\ltjsetxkanjiskip#1}
+\define@key[ltj]{japaram}{kanjiskip}{\ltjsetkanjiskip#1}
+\define@key[ltj]{japaram}{xkanjiskip}{\ltjsetxkanjiskip#1}
+\ifdefined\newluafunction
+ \newluafunction\ltjsetkanjiskip@inner
+ \newluafunction\ltjsetxkanjiskip@inner
+ \directlua{
+ local t, scan_glue = lua.get_functions_table(), luatexja.token.scan_glue
+ local sss, sti = luatexja.stack.set_stack_skip, luatexja.stack_table_index
+ t[\the\ltjsetkanjiskip@inner] = function()
+ local d = scan_glue(); sss(sti.KSK, d); node.free(d)
+ end
+ t[\the\ltjsetxkanjiskip@inner] = function()
+ local d = scan_glue(); sss(sti.XSK, d); node.free(d)
+ end
+ }
+ \protected\def\ltjsetkanjiskip{\luafunction\ltjsetkanjiskip@inner}
+ \protected\def\ltjsetxkanjiskip{\luafunction\ltjsetxkanjiskip@inner}
+\else
\protected\def\ltjsetkanjiskip{% % SKIP
\directlua{%
local d = luatexja.token.scan_glue()
@@ -358,7 +410,7 @@
local d = luatexja.token.scan_glue()
luatexja.stack.set_stack_skip(luatexja.stack_table_index.XSK, d); node.free(d)
}}
-
+\fi
% jcharwidowpenalty = <count>
\define@key[ltj]{japaram}{jcharwidowpenalty}{% %COUNT
\ltj@@set@stack{JWP}{-10000}{10000}\z@#1 }
@@ -558,37 +610,76 @@
}
\setbox\z@\box\voidb@x
\ifltj@everyhook@avail% using everyhook package
- \PushPreHook{hbox}{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- }
- \PushPreHook{vbox}{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- }
+ \ifdefined\newluafunction
+ \newluafunction\ltj@@box@dirhook
+ \directlua{
+ local t, ltjd = lua.get_functions_table(), luatexja.direction
+ t[\the\ltj@@box@dirhook]
+ = function() ltjd.set_list_direction_hook() end
+ }
+ \PushPreHook{hbox}{\luafunction\ltj@@box@dirhook\aftergroup\ltj@@reset@badness}
+ \PushPreHook{vbox}{\luafunction\ltj@@box@dirhook\aftergroup\ltj@@reset@badness}
+ \else
+ \PushPreHook{hbox}{%
+ \directlua{luatexja.direction.set_list_direction_hook()}%
+ \aftergroup\ltj@@reset@badness
+ }
+ \PushPreHook{vbox}{%
+ \directlua{luatexja.direction.set_list_direction_hook()}%
+ \aftergroup\ltj@@reset@badness
+ }
+ \fi
\else
\let\ltj@@everyhbox=\everyhbox\let\ltj@@everyvbox=\everyvbox
\newtoks\ltj@@i@everyhbox\newtoks\ltj@@i@everyvbox
\let\everyhbox=\ltj@@i@everyhbox\let\everyvbox=\ltj@@i@everyvbox
- \ltj@@everyhbox{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- \the\ltj@@i@everyhbox}
- \ltj@@everyvbox{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- \the\ltj@@i@everyvbox}
+ \ifdefined\newluafunction
+ \newluafunction\ltj@@box@dirhook
+ \directlua{
+ local t, ltjd = lua.get_functions_table(), luatexja.direction
+ t[\the\ltj@@box@dirhook]
+ = function() ltjd.set_list_direction_hook() end
+ }
+ \ltj@@everyhbox{\luafunction\ltj@@box@dirhook
+ \aftergroup\ltj@@reset@badness\the\ltj@@i@everyhbox}
+ \ltj@@everyvbox{\luafunction\ltj@@box@dirhook
+ \aftergroup\ltj@@reset@badness\the\ltj@@i@everyvbox}
+ \else
+ \ltj@@everyhbox{%
+ \directlua{luatexja.direction.set_list_direction_hook()}%
+ \aftergroup\ltj@@reset@badness
+ \the\ltj@@i@everyhbox}
+ \ltj@@everyvbox{%
+ \directlua{luatexja.direction.set_list_direction_hook()}%
+ \aftergroup\ltj@@reset@badness
+ \the\ltj@@i@everyvbox}
+ \fi
+\fi
+
+\ifdefined\newluafunction
+ \newluafunction\ltj@@reset@badness@inner
+ \directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@reset@badness@inner] = function()
+ if luatexja.global_temp then
+ tex.hbadness= tex.hbadness or luatexja.hbadness_temp
+ tex.vbadness= tex.vbadness or luatexja.vbadness_temp
+ tex.globaldefs= luatexja.global_temp or tex.globaldefs
+ end
+ end}
+ \protected\def\ltj@@reset@badness{\luafunction\ltj@@reset@badness@inner}
+\else
+ \protected\def\ltj@@reset@badness{%
+ \directlua{%
+ if luatexja.global_temp then
+ tex.hbadness= tex.hbadness or luatexja.hbadness_temp
+ tex.vbadness= tex.vbadness or luatexja.vbadness_temp
+ tex.globaldefs= luatexja.global_temp or tex.globaldefs
+ end
+ }%
+ }
\fi
-\protected\def\ltj@@reset@badness{%
- \directlua{%
- if luatexja.global_temp then
- tex.hbadness= tex.hbadness or luatexja.hbadness_temp
- tex.vbadness= tex.vbadness or luatexja.vbadness_temp
- tex.globaldefs= luatexja.global_temp or tex.globaldefs
- end
- }%
-}
\AtBeginShipout{\directlua{luatexja.direction.finalize()}}
%%%% \raise, \lower, \moveleft, \moveright
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index 2125969ec3e..940ed213525 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
@@ -1,5 +1,6 @@
require('lualibs')
+tableunpack = table.unpack
------------------------------------------------------------------------
-- naming:
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index 5e1ff328f6a..80437db7fde 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -34,14 +34,15 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2015/09/21 Japanese Typesetting with LuaTeX]
+ \ProvidesPackage{luatexja}[2015/10/12 Japanese Typesetting with LuaTeX]
\fi %</LaTeX>
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
%% Load all sub-packages.
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{luatexja-core} [2013/05/14]
+ %% \RequirePackage{expl3} needed if the version of l3kernel is v6111
+ \RequirePackage{luatexja-core} [2015/10/12]
\RequirePackage{luatexja-compat}[2013/05/14]
\else %<*!LaTeX>
\input luatexja-core.sty %