diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-08 22:40:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-08 22:40:55 +0000 |
commit | 7d792d75bcbca9fc8310de945404489ea7885c64 (patch) | |
tree | 678cfe3bfa8eae2b147cf38006513236a5e2321e /Master/texmf-dist/tex/luatex | |
parent | 3de5300f4fc8c1aa82a49981c0a95dc0e3a8c3af (diff) |
luatexja (8feb16)
git-svn-id: svn://tug.org/texlive/trunk@39629 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
31 files changed, 174 insertions, 149 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua index f48c2ab14ed..e66a196aee6 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua @@ -400,6 +400,33 @@ ltjb.generic_info_no_line = generic_info_no_line ltjb.ltj_warning_no_line = ltj_warning_no_line ltjb.ltj_error = ltj_error +---- deterministic version of luatexbase.add_to_callback +function ltjb.add_to_callback(name,fun,description,priority) + local priority= priority + if priority==nil then + priority=#luatexbase.callback_descriptions(name)+1 + end + if(luatexbase.callbacktypes[name] == 3 and + priority == 1 and + #luatexbase.callback_descriptions(name)==1) then + luatexbase.module_warning("luatexbase", + "resetting exclusive callback: " .. name) + luatexbase.reset_callback(name) + end + local saved_callback={},ff,dd + for k,v in ipairs(luatexbase.callback_descriptions(name)) do + if k >= priority then + ff,dd= luatexbase.remove_from_callback(name, v) + saved_callback[#saved_callback+1]={ff,dd} + end + end + luatexbase.base_add_to_callback(name,fun,description) + for _,v in ipairs(saved_callback) do + luatexbase.base_add_to_callback(name,v[1],v[2]) + end + return +end + -------------------- mock of debug logger if not ltjb.out_debug then local function no_op() end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua index a46fdeb99d2..b5f267c4bb1 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua @@ -275,7 +275,7 @@ do end end - luatexbase.add_to_callback('hpack_filter', + ltjb.add_to_callback('hpack_filter', create_dir_whatsit_hpack, 'ltj.create_dir_whatsit', 10000) end @@ -290,7 +290,7 @@ do ensure_tex_attr(attr_dir, 0) return h end - luatexbase.add_to_callback('post_linebreak_filter', + ltjb.add_to_callback('post_linebreak_filter', create_dir_whatsit_parbox, 'ltj.create_dir_whatsit', 10000) end @@ -987,7 +987,7 @@ do stop_time_measure('direction_vpack') return to_node(hd) end - luatexbase.add_to_callback('vpack_filter', + ltjb.add_to_callback('vpack_filter', dir_adjust_vpack, 'ltj.direction', 10000) end @@ -997,7 +997,7 @@ do local function dir_adjust_pre_output(h, gc) return to_node(create_dir_whatsit_vbox(to_direct(h), gc)) end - luatexbase.add_to_callback('pre_output_filter', + ltjb.add_to_callback('pre_output_filter', dir_adjust_pre_output, 'ltj.direction', 10000) @@ -1026,7 +1026,7 @@ do end end end - luatexbase.add_to_callback('buildpage_filter', + ltjb.add_to_callback('buildpage_filter', dir_adjust_buildpage, 'ltj.direction', 10000) end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua index 12f350a84a4..a63c270e676 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua @@ -1101,6 +1101,7 @@ end -- return value: (the initial cursor lp), (last node) local init_var do + local id_local = node.id('local_par') local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP local XKANJI_SKIP = luatexja.icflag_table.XKANJI_SKIP local KSK = luatexja.stack_table_index.KSK @@ -1151,8 +1152,10 @@ do -- the current list is to be line-breaked: -- hbox from \parindent is skipped. local lp, par_indented, lpi, lps = head, 'boxbdd', getid(head), getsubtype(head) - while lp and ((lpi==id_whatsit and lps~=sid_user) - or ((lpi==id_hlist) and (lps==3))) do + while lp and + ((lpi==id_whatsit and lps~=sid_user) + or ((lpi==id_hlist) and (lps==3)) + or (lpi==id_local)) do if (lpi==id_hlist) and (lps==3) then Np.char, par_indented = 'parbdd', 'parbdd' Np.width = getfield(lp, 'width') diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua index ed1a1975320..75494d6428f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua @@ -158,15 +158,10 @@ local function extract(head) return to_node(head) end -luatexbase.add_to_callback('hpack_filter', extract, - 'ltj.otf', - luatexbase.priority_in_callback('pre_linebreak_filter', - 'ltj.main')) -luatexbase.add_to_callback('pre_linebreak_filter', extract, - 'ltj.otf', - luatexbase.priority_in_callback('pre_linebreak_filter', - 'ltj.main')) - +ltjb.add_to_callback('hpack_filter', extract,'ltj.otf', + luatexbase.priority_in_callback('hpack_filter', 'ltj.main')) +ltjb.add_to_callback('pre_linebreak_filter', extract,'ltj.otf', + luatexbase.priority_in_callback('pre_linebreak_filter', 'ltj.main')) -- additional callbacks -- 以下は,LuaTeX-ja に用意された callback のサンプルになっている. -- JFM の文字クラスの指定の所で,"AJ1-xxx" 形式での指定を可能とした. @@ -273,14 +268,10 @@ do ltjb.package_warning('luatexja-otf', 'luatexja.otf.enable_ivs() was already called, so this call is ignored', '') else - luatexbase.add_to_callback('hpack_filter', - do_ivs_repr, 'ltj.do_ivs', - luatexbase.priority_in_callback('hpack_filter', - 'ltj.set_stack_level')+1) - luatexbase.add_to_callback('pre_linebreak_filter', - do_ivs_repr, 'ltj.do_ivs', - luatexbase.priority_in_callback('pre_linebreak_filter', - 'ltj.set_stack_level')+1) + ltjb.add_to_callback('hpack_filter', do_ivs_repr, 'ltj.do_ivs', + luatexbase.priority_in_callback('hpack_filter', 'luaotfload.node_processor')) + ltjb.add_to_callback('pre_linebreak_filter', do_ivs_repr, 'ltj.do_ivs', + luatexbase.priority_in_callback('pre_linebreak_filter', 'luaotfload.node_processor')) is_ivs_enabled = true end end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua index 9b2bc0708c0..f95ae5f61fa 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua @@ -116,7 +116,7 @@ do return h end - luatexbase.add_to_callback('hyphenate', + ltjb.add_to_callback('hyphenate', function (head,tail) return suppress_hyphenate_ja(head) end,'ltj.hyphenate') @@ -139,9 +139,8 @@ local function set_box_stack_level(head, mode) if ltjs.list_dir == dir_tate then for p in Dnode.traverse_id(id_glyph,to_direct(head)) do if (has_attr(p, attr_icflag) or 0)<=0 and getfield(p, 'lang')==lang_ja then - local pfn = has_attr(p, attr_curtfnt) or getfont(p) local pc = ltjs_orig_char_table[p] - local nf = ltjf_replace_altfont(pfn, pc) + local nf = ltjf_replace_altfont( has_attr(p, attr_curtfnt) or getfont(p) , pc) setfield(p, 'font', nf) if ltjf_font_metric_table[nf].vert_activated then pc = ltjf_vert_form_table [getchar(p)] @@ -154,11 +153,11 @@ local function set_box_stack_level(head, mode) end -- CALLBACKS -luatexbase.add_to_callback('hpack_filter', +ltjb.add_to_callback('hpack_filter', function (head) return set_box_stack_level(head, true) end,'ltj.set_stack_level',1) -luatexbase.add_to_callback('pre_linebreak_filter', +ltjb.add_to_callback('pre_linebreak_filter', function (head) return set_box_stack_level(head, false) end,'ltj.set_stack_level',1) diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls index 65b87c3c7c8..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} - [2016/01/31 v1.6-ltj-11 + [2015/10/18 v1.6-ltj-10 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -164,18 +164,14 @@ \setlength\columnseprule{0\p@} \setlength{\@tempdima}{\paperwidth} \setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo index 289f7cb0805..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} - [2016/01/31 v1.6-ltj-11 + [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 9642641ada8..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} - [2016/01/31 v1.6-ltj-11 + [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 db1eaffb7c6..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} - [2016/01/31 v1.6-ltj-11 + [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 34b4ed353ae..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} - [2016/01/31 v1.6-ltj-11 + [2015/10/18 v1.6-ltj-10 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -172,18 +172,14 @@ \setlength\columnseprule{0\p@} \setlength{\@tempdima}{\paperwidth} \setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls index 03686aa9815..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} - [2016/01/31 v1.6-ltj-11 + [2015/10/18 v1.6-ltj-10 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -170,18 +170,14 @@ \setlength\columnseprule{0\p@} \setlength{\@tempdima}{\paperwidth} \setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls index 2f93ffc393d..d71f55e4d77 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} - [2016/01/31 ] + [2016/01/30 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -295,18 +295,16 @@ \fi \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% +\setlength{\@tempdima}{\paperwidth} +\setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls index 01c5cc2572b..92c9822e45f 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} - [2016/01/31 ] + [2016/01/30 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -302,18 +302,16 @@ \fi \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% +\setlength{\@tempdima}{\paperwidth} +\setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo index 456da14fbe1..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} - [2016/01/31 v1.6-ltj-11 + [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 0482f88fc5c..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} - [2016/01/31 v1.6-ltj-11 + [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 6a958894e2c..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} - [2016/01/31 v1.6-ltj-11 + [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 9fd08453c93..6279b5096d6 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} - [2016/01/31 ] + [2016/01/30 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -297,18 +297,16 @@ \def\inv@mag{1.02354} \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% +\setlength{\@tempdima}{\paperwidth} +\setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls index c82c2c37284..00efa99d5be 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} - [2016/01/31 ] + [2016/01/30 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -295,18 +295,16 @@ \fi \setlength\paperwidth{\inv@mag\paperwidth}% \setlength\paperheight{\inv@mag\paperheight}% +\setlength{\@tempdima}{\paperwidth} +\setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls index a94a06932bb..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} - [2016/01/31 v1.6-ltj-11 + [2015/10/18 v1.6-ltj-10 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -176,18 +176,14 @@ \setlength\columnseprule{0\p@} \setlength{\@tempdima}{\paperwidth} \setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo index 6cc2f933bcf..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} - [2016/01/31 v1.6-ltj-11 + [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 d339d297dbd..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} - [2016/01/31 v1.6-ltj-11 + [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 2f1e1c9efe9..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} - [2016/01/31 v1.6-ltj-11 + [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 52f38c1a0c2..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} - [2016/01/31 v1.6-ltj-11 + [2015/10/18 v1.6-ltj-10 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -184,18 +184,14 @@ \setlength\columnseprule{0\p@} \setlength{\@tempdima}{\paperwidth} \setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls index 70ce3c8c423..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} - [2016/01/31 v1.6-ltj-11 + [2015/10/18 v1.6-ltj-10 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -182,18 +182,14 @@ \setlength\columnseprule{0\p@} \setlength{\@tempdima}{\paperwidth} \setlength{\@tempdimb}{\paperheight} +\iftombow + \advance \@tempdima 2in + \advance \@tempdimb 2in +\fi \ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pdfpagewidth}{\@tempdima} \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in - \fi \setlength{\pagewidth}{\@tempdima} \setlength{\pageheight}{\@tempdimb} \fi diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo index eb4ad055201..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} - [2016/01/31 v1.6-ltj-11 + [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 d240f119431..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} - [2016/01/31 v1.6-ltj-11 + [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 8c8f6081976..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} - [2016/01/31 v1.6-ltj-11 + [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.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua index 491454c5071..7b0cd155341 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua @@ -318,22 +318,20 @@ do end -- callbacks - luatexbase.add_to_callback( + ltjb.add_to_callback( 'pre_linebreak_filter', function (head,groupcode) return main_process(head, true, tex.textdir, groupcode) end,'ltj.main', - luatexbase.priority_in_callback('pre_linebreak_filter', - 'luaotfload.node_processor')+1) - luatexbase.add_to_callback( + luatexbase.priority_in_callback('pre_linebreak_filter', 'luaotfload.node_processor')+1) + ltjb.add_to_callback( 'hpack_filter', function (head,groupcode,size,packtype, dir) return main_process(head, false, dir, groupcode) end,'ltj.main', - luatexbase.priority_in_callback('hpack_filter', - 'luaotfload.node_processor') + 1) - luatexbase.add_to_callback('pre_linebreak_filter', adjust_icflag, 'ltj.adjust_icflag', 1) - luatexbase.add_to_callback('hpack_filter', adjust_icflag, 'ltj.adjust_icflag', 1) + luatexbase.priority_in_callback('hpack_filter', 'luaotfload.node_processor')+1) + ltjb.add_to_callback('pre_linebreak_filter', adjust_icflag, 'ltj.adjust_icflag', 1) + ltjb.add_to_callback('hpack_filter', adjust_icflag, 'ltj.adjust_icflag', 1) end diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty index 2e55d5c22eb..4d239659cb1 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty @@ -34,7 +34,7 @@ \expandafter\let\csname ifltj@in@latex\expandafter\endcsname \csname iftrue\endcsname \NeedsTeXFormat{LaTeX2e} - \ProvidesPackage{luatexja}[2015/11/03 Japanese Typesetting with Lua(La))TeX] + \ProvidesPackage{luatexja}[2015/11/03 Japanese Typesetting with Lua(La)TeX] \fi %</LaTeX> \directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty index 4855f503306..08f9b7ff027 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2015/08/28 Patch to NFSS2 for LuaTeX-ja] +\ProvidesPackage{lltjfont}[2016/02/07 Patch to NFSS2 for LuaTeX-ja] \let\k@encoding\@empty \let\ck@encoding\@empty @@ -365,10 +365,47 @@ \vrule\@width\z@ \@height.7\baselineskip \@depth.3\baselineskip}% \let\size@update\relax}} -\newbox\adjust@box -\newbox\adjust@box@aux -\newdimen\adjust@dimen -\def\adjustbaseline{% + +\ifdefined\newluafunction + \newluafunction\ltj@@adjust@baseline@inner + \begingroup\catcode`\~=12 + \directlua{% + local nulltable = {} + local t = lua.get_functions_table() + local getfont, dir_tate = font.getfont, luatexja.dir_table.dir_tate + local fmt, get_attr = luatexja.jfont.font_metric_table, tex.getattribute + local setdimen, set_attr = tex.setdimen, tex.setattribute + local dir = luatexja.unary_pars.direction + t[\the\ltj@@adjust@baseline@inner] = function() + local ft = fmt[get_attr('ltj@curtfnt')] or nulltable + ft = ft and ft.char_type or nulltable + local fk = ft and ft[0] or nulltable + local ht, dp, wd = fk.height or 0, fk.depth or 0, + fk.width or ft.zw or 0 + local fm + = ((getfont(font.current()) or nulltable) + .characters or nulltable)[77] or nulltable %% 'M' + set_attr('ltj@tablshift', + 0.5*((fm.height or 0)- (fm.depth or 0) - ht+ dp)) + if dir() ~= dir_tate then + ft = fmt[get_attr('ltj@curjfnt')] or nulltable + ft = ft and ft.char_type or nulltable + fk = ft and ft[0] or nulltable + ht, dp, wd = fk.height or 0, fk.depth or 0, + fk.width or ft.zw or 0 + end + setdimen('cht', ht); setdimen('cdp', dp) + setdimen('cwd', wd); setdimen('chs', wd) + setdimen('cHT', ht+dp) + end + }\endgroup + \def\adjustbaseline{\luafunction\ltj@@adjust@baseline@inner + \cvs\normalbaselineskip} +\else + \newbox\adjust@box + \newbox\adjust@box@aux + \newdimen\adjust@dimen + \def\adjustbaseline{% \setbox\adjust@box\hbox{% \ltj@ykblshift\z@\ltj@tkblshift\z@ 漢}% \cht\ht\adjust@box @@ -385,7 +422,9 @@ \divide\adjust@dimen\tw@ \advance\adjust@dimen0.5\dp\adjust@box@aux \advance\adjust@dimen-\dp\adjust@box - \ltj@tablshift=\adjust@dimen} + \ltj@tablshift=\adjust@dimen + } +\fi \DeclareRobustCommand\romanencoding[1]{% \expandafter\ifx\csname T@#1\endcsname\relax \@latex@error{Encoding scheme `#1' unknown}\@eha diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty index c1f1b9f81bb..987cd691c52 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-listings}[2015/12/11 Patch to listings for LuaTeX-ja] +\ProvidesPackage{lltjp-listings}[2016/02/07 Patch to listings for LuaTeX-ja] \RequirePackage{listings,luatexbase-cctb} %%%%%%%%%%%%%%%% Japanese support @@ -286,7 +286,7 @@ \else \lst@lExtend\lst@arg{\lst@temp~}% \expandafter\lst@InsideConvert@ - \fi #2} + \fi#2} }\endgroup \lst@AddToHook{ExitVars}{% @@ -344,7 +344,7 @@ %%%%%%%%%%%%%%%% escape to \LaTeX \lstloadaspects{escape} -\gdef\lst@Escape#1#2#3#4{ +\gdef\lst@Escape#1#2#3#4{% \lst@CArgX #1\relax\lst@CDefX {}% {\lst@ifdropinput\else |