diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-15 21:51:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-15 21:51:27 +0000 |
commit | c293cc5e64a5575b0b22a373061569bacf92ee76 (patch) | |
tree | d0431b0c920cde04479ecc42fcb2fec28b394a8f /Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua | |
parent | 7125751ebd8f93429724b73226f3350a0e0e7635 (diff) |
luatexja (15may13)
git-svn-id: svn://tug.org/texlive/trunk@30485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua index 896b93f5e2b..6f72256d05e 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua @@ -1,17 +1,8 @@ -- --- luatexja/pretreat.lua +-- luatexja/ltj-pretreat.lua -- -luatexbase.provides_module({ - name = 'luatexja.pretreat', - date = '2012/07/19', - version = '0.2', - description = '', -}) -module('luatexja.pretreat', package.seeall) -local err, warn, info, log = luatexbase.errwarinf(_NAME) luatexja.load_module('charrange'); local ltjc = luatexja.charrange -luatexja.load_module('jfont'); local ltjf = luatexja.jfont luatexja.load_module('stack'); local ltjs = luatexja.stack local floor = math.floor @@ -32,7 +23,6 @@ local sid_user = node.subtype('user_defined') local attr_curjfnt = luatexbase.attributes['ltj@curjfnt'] local attr_icflag = luatexbase.attributes['ltj@icflag'] -local ltjf_font_metric_table = ltjf.font_metric_table local ltjc_is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char local attr_orig_char = luatexbase.attributes['ltj@origchar'] local STCK = luatexja.userid_table.STCK @@ -66,7 +56,7 @@ local function suppress_hyphenate_ja(head) end -- mode: true iff this function is called from hpack_filter -function set_box_stack_level(head, mode) +local function set_box_stack_level(head, mode) local box_set, cl = 0, tex.currentgrouplevel + 1 for _,p in pairs(wt) do if mode and p.value==cl then box_set = 1 end; node_free(p) @@ -88,3 +78,7 @@ luatexbase.add_to_callback('hyphenate', function (head,tail) return suppress_hyphenate_ja(head) end,'ltj.hyphenate') + +luatexja.pretreat = { + set_box_stack_level = set_box_stack_level, +} |