diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-31 23:45:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-31 23:45:28 +0000 |
commit | 326c162a7ec8088d104101b4739c727d824ae5f7 (patch) | |
tree | b361de0cef7c47e209b56e053f1ec957a38526fb /Master/texmf-dist/tex/luatex | |
parent | a05d0c546c309991c96cf6aed49902bf5d60f66c (diff) |
luatexja (31jan16)
git-svn-id: svn://tug.org/texlive/trunk@39527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
39 files changed, 297 insertions, 488 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 691e53118ff..38ca8eedaca 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 @@ -3,22 +3,14 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luatexja-fontspec-24}[2015/06/28 fontspec support of LuaTeX-ja] +\ProvidesPackage{luatexja-fontspec-24}[2016/01/30 fontspec support of LuaTeX-ja] \RequirePackage{l3keys2e,luatexja} \ExplSyntaxOn %%%%%%%% Change Japanese font family by \rmfamily or not \cs_new:Npn \ltj_fontspec_match_cmd { \renewcommand\jttdefault{\gtdefault} - \DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont} - \DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont} - \DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont} + \@ltj@match@familytrue \DeclareDocumentCommand \setmonojfont { O{} m } { \ltj_fontspec_set_family:Nnn \jttdefault {##1}{##2} \normalfont @@ -180,6 +172,7 @@ \tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl \tl_set:Nn \g_fontspec_encoding_tl {#5} + \tl_set:Nn \l__fontspec_nfss_enc_tl {#5} \exp_args:Nx \clist_map_inline:nn {#4} { \tl_clear:N \l__fontspec_size_tl @@ -212,6 +205,7 @@ \cs_set_eq:NN \__ltj_orig_fontspec_set_family:Nnn \fontspec_set_family:Nnn \cs_set_eq:NN \__ltj_orig_fontspec_make_font_shapes:Nnnnn \__fontspec_make_font_shapes:Nnnnn \cs_set_eq:NN \__ltj_fontspec_orig_DeclareFontShape \DeclareFontShape + \cs_new:Nn \ltj_fontspec_make_font_shapes:Nnnnn { \group_begin: %% 基底フォント diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty index 917ba786a5b..42528e2cc9f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty @@ -1,43 +1,58 @@ % luatexja-preset.sty -\ProvidesPackage{luatexja-preset}[2015/06/28 Japanese font presets] +\ProvidesPackage{luatexja-preset}[2016/01/30 Japanese font presets] -\RequirePackage{expl3} +\RequirePackage{expl3,l3keys2e} \RequirePackage{luatexja} \ExplSyntaxOn -%%%% message -\bool_new:N \l_ltjpreset_nfssonly_bool % nfssonly -\bool_set_false:N \l_ltjpreset_nfssonly_bool -\DeclareOption{nfssonly} {\bool_set_true:N \l_ltjpreset_nfssonly_bool} -\DeclareOption{fontspec} {\bool_set_false:N \l_ltjpreset_nfssonly_bool} - -\bool_new:N \l_ltjpreset_bold_bool % bold -\bool_set_false:N \l_ltjpreset_bold_bool -\DeclareOption{bold} {\bool_set_true:N \l_ltjpreset_bold_bool} -\DeclareOption{nobold}{\bool_set_false:N \l_ltjpreset_bold_bool} +\fp_new:N \l_ltjpreset_scale_fp +\group_begin: +\fontsize{10}{10}\selectfont +\fp_gset:Nn \l_ltjpreset_scale_fp {\zw / 10} +\group_end: -\bool_new:N \l_ltjpreset_expert_bool % expert -\bool_set_false:N \l_ltjpreset_expert_bool -\DeclareOption{expert} {\bool_set_true:N \l_ltjpreset_expert_bool} -\DeclareOption{noexpert}{\bool_set_false:N \l_ltjpreset_expert_bool} +\keys_define:nn { luatexja-preset }{ + unknown .code:n = \PassOptionsToPackage { \l_keys_key_tl } { luatexja-fontspec }, + scale .fp_gset:N = \l_ltjpreset_scale_fp, + match .code: n = + \renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue + \PassOptionsToPackage { match } { luatexja-fontspec }, + match .value_forbidden:n = true +} +\cs_new:Nn \ltjpreset_declare_option:nn { + \keys_define:nn { luatexja-preset }{ + #1 .code:n = #2, + #1 .value_forbidden:n = true + } +} +\cs_new:Nn \ltjpreset_declare_bool_option:nn { + \bool_new:c { l_ltjpreset_#1_bool } + \bool_set_false:c { l_ltjpreset_#1_bool } + \keys_define:nn { luatexja-preset }{ + #1 .bool_set:c = { l_ltjpreset_#1_bool }, + #2 .bool_set_inverse:c = { l_ltjpreset_#1_bool }, + #1 .default:n = true, + #2 .default:n = true, + } +} -\int_new:N \l_ltjpreset_deluxe_int % deluxe -\int_set:Nn \l_ltjpreset_deluxe_int { 0 } -\DeclareOption{deluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 2 }} % 6 fonts -\DeclareOption{nodeluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 0 }} % 2 fonts +%%%%%%%% bool options +\ltjpreset_declare_bool_option:nn { nfssonly }{ fontspec } +\ltjpreset_declare_bool_option:nn { bold }{ nobold } +\ltjpreset_declare_bool_option:nn { expert }{ noexpert } +\ltjpreset_declare_bool_option:nn { deluxe }{ nodeluxe } -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{luatexja-fontspec}} % JFM \cs_set:Npn \ltjpreset_use_jfm: {ujis} % 使用する JFM -%%% \DeclareOption{min}{\cs_set:Npn \ltjpreset_use_jfm: {min}} % min +%%% \ltjpreset_declare_option:nn{min}{\cs_set:Npn \ltjpreset_use_jfm: {min}} % min %%% ↑jfm-min.lua が横組み・縦組み専用仮名に追いついていないので使用禁止 -\DeclareOption{jis}{\cs_set:Npn \ltjpreset_use_jfm: {jis}} % jis -\DeclareOption{ujis}{\cs_set:Npn \ltjpreset_use_jfm: {ujis}} % ujis +\ltjpreset_declare_option:nn{jis}{\cs_set:Npn \ltjpreset_use_jfm: {jis}} % jis +\ltjpreset_declare_option:nn{ujis}{\cs_set:Npn \ltjpreset_use_jfm: {ujis}} % ujis % 漢字字形 \tl_new:N \l_ltjpreset_kanji_shape_tl -\DeclareOption{90jis}{ \tl_set:Nn \l_ltjpreset_kanji_shape_tl { , CJKShape=JIS1990 }} % 90jis -\DeclareOption{jis2004}{\tl_set:Nn \l_ltjpreset_kanji_shape_tl { , CJKShape=JIS2004 }} % jis2004 +\ltjpreset_declare_option:nn{90jis}{ \tl_set:Nn \l_ltjpreset_kanji_shape_tl { , CJKShape=JIS1990 }} % 90jis +\ltjpreset_declare_option:nn{jis2004}{\tl_set:Nn \l_ltjpreset_kanji_shape_tl { , CJKShape=JIS2004 }} % jis2004 % font preset \bool_new:N \l_ltjpreset_office_bool % MS Office の HG 系フォントを使っているか @@ -63,9 +78,17 @@ } +%%%%%%%% プリセット達 + +% カスタム指定 + \keys_define:nn { luatexja-preset }{ + custom .code:n = \ltjpreset_set_multi:n { #1 }, + custom .value_required:n = true +} + % 小塚 (Adobe) %% Pro -\DeclareOption{kozuka-pro}{ +\ltjpreset_declare_option:nn{kozuka-pro}{ \ltjpreset_set_multi:n { KozMinPro-Regular , % mc/m KozMinPro-Bold , % mc/bx @@ -77,7 +100,7 @@ } } %% Pr6 -\DeclareOption{kozuka-pr6}{ +\ltjpreset_declare_option:nn{kozuka-pr6}{ \ltjpreset_set_multi:n { KozMinProVI-Regular , % mc/m KozMinProVI-Bold , % mc/bx @@ -89,7 +112,7 @@ } } %% Pr6N -\DeclareOption{kozuka-pr6n}{ +\ltjpreset_declare_option:nn{kozuka-pr6n}{ \ltjpreset_set_multi:n { KozMinPr6N-Regular , % mc/m KozMinPr6N-Bold , % mc/bx @@ -102,7 +125,7 @@ } % ヒラギノ (OSX) -\DeclareOption{hiragino-pro}{ +\ltjpreset_declare_option:nn{hiragino-pro}{ \ltjpreset_set_multi:n { HiraMinPro-W3 , HiraMinPro-W6 , @@ -113,7 +136,7 @@ HiraMaruPro-W4 , } } -\DeclareOption{hiragino-pron}{ +\ltjpreset_declare_option:nn{hiragino-pron}{ \ltjpreset_set_multi:n { HiraMinProN-W3 , HiraMinProN-W6 , @@ -126,7 +149,7 @@ } % モリサワ -\DeclareOption{morisawa-pro}{ +\ltjpreset_declare_option:nn{morisawa-pro}{ \ltjpreset_set_multi:n { A-OTF-RyuminPro-Light.otf , A-OTF-FutoMinA101Pro-Bold.otf , % mc/m, mc/bx A-OTF-GothicBBBPro-Medium.otf , A-OTF-FutoGoB101Pro-Bold.otf , % gt/m, gt/bx (multiweight)) @@ -134,7 +157,7 @@ A-OTF-Jun101Pro-Light.otf % mg/m } } -\DeclareOption{morisawa-pr6n}{ +\ltjpreset_declare_option:nn{morisawa-pr6n}{ \ltjpreset_set_multi:n { A-OTF-RyuminPr6N-Light.otf , A-OTF-FutoMinA101Pr6N-Bold.otf , % mc/m, mc/bx A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-FutoGoB101Pr6N-Bold.otf , % gt/m, gt/bx (multiweight)) @@ -144,7 +167,7 @@ } % 游明朝/游ゴシック (Win8.1) -\DeclareOption{yu-win}{ +\ltjpreset_declare_option:nn{yu-win}{ \ltjpreset_set_multi:n { YuMincho-Regular , YuMincho-Demibold , % mc/m, mc/bx YuGothic-Regular , YuGothic-Bold , % gt/m, gt/bx (multiweight)) @@ -155,7 +178,7 @@ % Yu fonts in OSX % according to http://support.apple.com/kb/HT5944 -\DeclareOption{yu-osx}{ +\ltjpreset_declare_option:nn{yu-osx}{ \ltjpreset_set_multi:n { YuMincho~Medium , YuMincho~Demibold , % mc/m, mc/bx YuGothic~Medium , YuGothic~Bold , % gt/m, gt/bx (multiweight)) @@ -165,7 +188,7 @@ } % moga-mobo -\DeclareOption{moga-mobo}{ +\ltjpreset_declare_option:nn{moga-mobo}{ \ltjpreset_set_multi:n { Moga90Mincho, Moga90Mincho~Bold , % mc/m, mc/bx Moga90Gothic, Moga90Gothic~Bold , % gt/m, gt/bx (multiweight)) @@ -176,37 +199,36 @@ % ipa, ipaex, ms -\DeclareOption{ipa}{ +\ltjpreset_declare_option:nn{ipa}{ \ltjpreset_set_uni:nn { IPAMincho } { IPAGothic } } -\DeclareOption{ipaex}{ +\ltjpreset_declare_option:nn{ipaex}{ \ltjpreset_set_uni:nn { IPAExMincho } { IPAExGothic } } -\DeclareOption{ms}{ +\ltjpreset_declare_option:nn{ms}{ \ltjpreset_set_uni:nn { MS-Mincho } { MS-Gothic } } % {ipa,ipaex,ms}-dx % Office 付属フォントを利用 -\DeclareOption{ipaex-hg}{ +\ltjpreset_declare_option:nn{ipaex-hg}{ \ltjpreset_set_office:nn { IPAExMincho } { IPAExGothic } } -\DeclareOption{ipa-hg}{ +\ltjpreset_declare_option:nn{ipa-hg}{ \ltjpreset_set_office:nn { IPAMincho } { IPAGothic } } -\DeclareOption{ms-hg}{ +\ltjpreset_declare_option:nn{ms-hg}{ \ltjpreset_set_office:nn { MS-Mincho } { MS-Gothic } } % 非埋込 -\DeclareOption{noembed}{ +\ltjpreset_declare_option:nn{noembed}{ \ltjpreset_set_uni:nn { Ryumin-Light } { GothicBBB-Medium } \bool_set_true:N \l_ltjpreset_noembed_bool } -\ExecuteOptions{ipaex} - -\ProcessOptions* +\keys_set:nn { luatexja-preset }{ ipaex } +\ProcessKeysOptions { luatexja-preset } %%%%%%%% main routine @@ -223,14 +245,22 @@ \bool_new:N \l_ltjpreset_shape_nlck_bool %% KozMinPr6N, HiraMinProN-W3 の場合はjp04 feature がないので,nlck にする \tl_set:Nn \l_tmpa_tl {, CJKShape=JIS2004 } -\tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { +\tl_if_eq:NNTF \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { \clist_if_in:NnT \l_ltjpreset_font_list { KozMinPr6N-Regular } { \bool_set_true:N \l_ltjpreset_shape_nlck_bool } \clist_if_in:NnT \l_ltjpreset_font_list { HiraMinProN-W3 } { \bool_set_true:N \l_ltjpreset_shape_nlck_bool } \clist_if_in:NnT \l_ltjpreset_font_list { Moga90Mincho } - { \tl_remove_all:Nn \l_ltjpreset_font_list {90} }%%% これでいいのか? - + { + \tl_remove_all:Nn \l_ltjpreset_font_list {90} + \tl_clear:N \l_ltjpreset_kanji_shape_tl + } +}{ + \tl_set:Nn \l_tmpa_tl {, CJKShape=JIS1990 } + \tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl { + \clist_if_in:NnT \l_ltjpreset_font_list { Moga90Mincho } + { \tl_clear:N \l_ltjpreset_kanji_shape_tl } + } } %%%% リストからの展開 @@ -305,12 +335,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% nfss only \bool_if:NTF \l_ltjpreset_nfssonly_bool { - -\fp_new:N \l_ltjpreset_scale_fp -\group_begin: -\fontsize{10}{10}\selectfont -\fp_gset:Nn \l_ltjpreset_scale_fp {\zw / 10} -\group_end: \msg_new:nnn { luatexja-preset }{ scale }{ Japanese~fonts~will~be~scaled~by~\fp_use:N \l_ltjpreset_scale_fp. } @@ -344,7 +368,7 @@ \DeclareKanjiFamily{JY3}{ltjpm}{}\DeclareKanjiFamily{JT3}{ltjpm}{} \DeclareKanjiFamily{JY3}{ltjpg}{}\DeclareKanjiFamily{JT3}{ltjpg}{} -\int_compare:nTF { \l_ltjpreset_deluxe_int == 2 } { +\bool_if:NTF \l_ltjpreset_deluxe_bool { \bool_if:NT \l_ltjpreset_bold_bool { \cs_set_eq:NN \ltjpreset_font_mc_bx: \ltjpreset_font_gt_bx: } @@ -374,7 +398,7 @@ \DeclareRobustCommand\rubyfamily { \kanjishape{rb}\selectfont } } -\int_compare:nTF { \l_ltjpreset_deluxe_int == 2 } { +\bool_if:NTF \l_ltjpreset_deluxe_bool { \DeclareKanjiFamily{JY3}{ltjpmg}{}\DeclareKanjiFamily{JT3}{ltjpmg}{} \ltj_preset_define_family:nnn {ltjpmg} {m} {\ltjpreset_font_mg:} \ltj_preset_define_family:nnn {ltjpg} {eb} {\ltjpreset_font_gt_eb:} @@ -389,7 +413,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% fontspec } { - +\PassOptionsToPackage { scale = \fp_use:N \l_ltjpreset_scale_fp } { luatexja-fontspec } \RequirePackage{luatexja-fontspec} % scale \msg_new:nnn { luatexja-preset }{ scale }{ @@ -416,7 +440,7 @@ } % (丸)ゴシック体の設定: bold option もここで -\int_compare:nTF { \l_ltjpreset_deluxe_int == 2 } { +\bool_if:NTF \l_ltjpreset_deluxe_bool { %% mg \newjfontfamily \mgfamily [ BoldFont = \ltjpreset_font_mg:, diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty index f3ad648817c..6b5075f7ba6 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty @@ -4,7 +4,7 @@ % LaTeX only! \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luatexja-ruby}[2015/05/09 v0.22] +\ProvidesPackage{luatexja-ruby}[2015/12/29 v0.23] \RequirePackage{luatexja} %%------------------ diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua index f5535d65c67..f48c2ab14ed 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua @@ -251,200 +251,6 @@ do --! ixbase.length は tex.skip と全く同じなので不要. end --------------------- Number handling in TeX source -do - - local tok_escape = token.create("ltj@@q@escape") - local tok_num = token.create("ltj@@q@escapenum") - local c_id_assign_int = token.command_id("assign_int") - local c_id_char_given = token.command_id("char_given") - - local function error_scan() - package_error("luatexja", - "Missing number of a permitted form, treated as zero", - "A number should have been here; I inserted '0'.") - end - - local function get_expd_next() - local next = token.get_next() - while token.is_expandable(next) do - token.expand(next) - next = token.get_next() - end - return next - end - - local function grab_decimal(next, res) - table.insert(res, next) - while true do - next = get_expd_next() - if not (next[1] == 12 and 0x30 <= next[2] and next[2] <= 0x39) then - break - end - table.insert(res, next) - end - if next[1] == 10 then next = nil end - return true, next - end - - local function grab_hexa(next, res) - local ok = false - table.insert(res, next) - while true do - next = get_expd_next() - if not ((next[1] == 12 and (0x30 <= next[2] and next[2] <= 0x39)) or - ((next[1] == 12 or next[1] == 11) and - (0x41 <= next[2] and next[2] <= 0x46))) then - break - end - ok = true - table.insert(res, next) - end - if next[1] == 10 then next = nil end - return ok, next - end - - local function grab_octal(next, res) - local ok = false - table.insert(res, next) - while true do - next = get_expd_next() - if not (next[1] == 12 and (0x30 <= next[2] and next[2] <= 0x37)) then - break - end - ok = true - table.insert(res, next) - end - if next[1] == 10 then next = nil end - return ok, next - end - - local function grab_charnum(next, res) - table.insert(res, next) - next = token.get_next() - table.insert(res, next) - next = get_expd_next() - if next[1] == 10 then next = nil end - return true, next - end - - local function scan_with(delay, scanner) - local function proc() - if delay ~= 0 then - if delay > 0 then delay = delay - 1 end - return token.get_next() - else - local cont, back = scanner() - if not cont then - ltb.remove_from_callback("token_filter", "ltj@grab@num") - end - return back - end - end - ltb.add_to_callback("token_filter", proc, "ltj@grab@num", 1) - end - - local function scan_brace() - scan_with(1, function() - local next = token.get_next() - if next[1] == 1 then - return false, { tok_escape, next } - elseif next[1] == 10 then - return true, { next } - else - return false, { next } - end - end) - end - - local function scan_number() - scan_with(1, function() - local next = get_expd_next() - local res, ok = { tok_num }, false - while true do - if next[1] == 12 and (next[2] == 0x2B or next[2] == 0x2D) then - table.insert(res, next) - elseif next[1] ~= 10 then - break - end - next = get_expd_next() - end - if next[1] == 12 and 0x30 <= next[2] and next[2] <= 0x39 then - ok, next = grab_decimal(next, res) - elseif next[1] == 12 and next[2] == 0x22 then - ok, next = grab_hexa(next, res) - elseif next[1] == 12 and next[2] == 0x27 then - ok, next = grab_octal(next, res) - elseif next[1] == 12 and next[2] == 0x60 then - ok, next = grab_charnum(next, res) - elseif next[1] == c_id_assign_int or next[1] == c_id_char_given then - table.insert(res, next) - ok, next = true, nil - end - if ok then - table.insert(res, tok_num) - else - error_scan() - res = { tok_escape } - end - if next then table.insert(res, next) end - return false, res - end) - end - - ltjb.scan_brace = scan_brace - ltjb.scan_number = scan_number -end - --------------------- TeX register allocation --- not used in current LuaTeX-ja - -do - local cmod_base_count = token.create('ltj@@count@zero')[2] - local cmod_base_attr = token.create('ltj@@attr@zero')[2] - local cmod_base_dimen = token.create('ltj@@dimen@zero')[2] - local cmod_base_skip = token.create('ltj@@skip@zero')[2] - - local function const_number(name) - if name:sub(1, 1) == '\\' then name = name:sub(2) end - return token.create(name)[2] - end - - local function count_number(name) - if name:sub(1, 1) == '\\' then name = name:sub(2) end - return token.create(name)[2] - cmod_base_count - end - - local function attribute_number(name) - if name:sub(1, 1) == '\\' then name = name:sub(2) end - return token.create(name)[2] - cmod_base_attr - end - - local function dimen_number(name) - if name:sub(1, 1) == '\\' then name = name:sub(2) end - return token.create(name)[2] - cmod_base_dimen - end - - local function skip_number(name) - if name:sub(1, 1) == '\\' then name = name:sub(2) end - return token.create(name)[2] - cmod_base_skip - end - - ltjb.const_number = const_number - ltjb.count_number = count_number - ltjb.attribute_number = attribute_number - ltjb.dimen_number = dimen_number - ltjb.skip_number = skip_number -end - --------------------- getting next token -local cstemp = nil -local function get_cs(s) - cstemp = token.csname_name(token.get_next()) - tex.sprint(cat_lp,'\\' .. s) -end -ltjb.get_cs = get_cs - -------------------- common error message do local function in_unicode(c, admit_math) diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty index 1c7e3b7df1d..75e2b7af65e 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty @@ -85,12 +85,6 @@ #4 } -%% \ltj@burst-`>TEXT -%! トリックに使う \romannumeral をエイリアスしておく. -% Gets the head of TEXT expanded repeatedly until an unexpandable -% token is seen, and if the token is a space then it is gobbled. -\let\ltj@burst\romannumeral - %%------------------ LaTeX vs plain \ifltj@in@latex %<*LaTeX> @@ -140,50 +134,19 @@ %% \ltj@gobble@num <number> %! 次に続く整数を(2 回展開で)読み捨てる. \def\ltj@gobble@num{ - \ltj@burst-`>\ltj@@gobble@num -} -\def\ltj@@gobble@num{ - \expandafter\ltj@@gobble@numA\the\parshapeindent -} -\begingroup - \lccode`8=`p\lccode`9=`t -\lowercase{\endgroup - \def\ltj@@gobble@numA#189{ } + \directlua{luatexja.token.scan_int()} } %% \ltj@gobble@glue <glue> %! 次に続くグルー値を(2 回展開で)読み捨てる. -\def\ltj@gobble@glue{% - \ltj@burst-`>\ltj@@gobble@glue -} -\def\ltj@@gobble@glue{ - \expandafter\ltj@@gobble@glueA\the\glueshrinkorder +\def\ltj@gobble@glue{ + \directlua{luatexja.token.scan_glue()} } -\def\ltj@@gobble@glueA#1{ } %% \ltj@gobble@dimen <dimen> %! 次に続く寸法値を(2 回展開で)読み捨てる. -\def\ltj@gobble@dimen{% - \ltj@burst-`>\ltj@@gobble@dimen -} -\def\ltj@@gobble@dimen{ - \expandafter\ltj@@gobble@dimenA\the\glueshrinkorder - 0pt minus -} -\def\ltj@@gobble@dimenA#1{ } - -%% \ltj@@scan@brace -% This is to be followed by a macro with one argument; if the macro is -% followed by an open-group token (catcode 1), then it receives as the -% argument a token \bxnt@escape instead of the group initiated by the -% open-group, which is left untouched. -\def\ltj@@scan@brace{ - \directlua{luatexja.base.scan_brace()} -} - -%% \ltj@@scan@number -\def\ltj@@scan@number{ - \directlua{luatexja.base.scan_number()} +\def\ltj@gobble@dimen{ + \directlua{luatexja.token.scan_dimen()} } %% \ltj@grab@num <number> @@ -197,25 +160,7 @@ %! (command_name が "assign_int" であるトークン). %! (注意: まだ文字表記(`A)に対応していません.) \def\ltj@grab@num{ - \ltj@burst-`>\ltj@@grab@num -} -\def\ltj@@grab@num{ - \ltj@@scan@brace\ltj@@grab@numA -} -\def\ltj@@grab@numA#1{ - \ltj@ifx{#1\ltj@@q@escape}{}{%else - \ltj@@scan@number\ltj@@grab@numB#1 - } -} -\def\ltj@@grab@numB#1{ - \ltj@ifx{#1\ltj@@q@escape}{ - {0} - }{ - \ltj@@grab@numC - } -} -\def\ltj@@grab@numC#1\ltj@@q@escapenum{ - {#1} + \directlua{tex.sprint('{' .. luatexja.token.scan_int() .. '}')} } %%------------------ Safe passing diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua index a4f2ff2003a..a46fdeb99d2 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua @@ -141,6 +141,7 @@ do local STCK = luatexja.userid_table.STCK local IHB = luatexja.userid_table.IHB local sid_local = node.subtype('local_par') + local id_local = node.id('local_par') local function test_list(h, lv) if not h then @@ -161,7 +162,7 @@ do elseif ps~=sid_local then flag = 0; break end - else + elseif p.id~=id_local then flag = 0; break end end @@ -489,10 +490,12 @@ local function get_box_dir(b, default) local bh = getfield(b,'head') -- b は insert node となりうるので getlist() は使えない local c - for bh in traverse_id(id_whatsit, bh) do - if getsubtype(bh)==sid_user and getfield(bh, 'user_id')==DIR then - c = bh - dir = (dir==0) and has_attr(bh, attr_dir) or dir + if bh~=0 then -- bh != nil + for bh in traverse_id(id_whatsit, bh) do + if getsubtype(bh)==sid_user and getfield(bh, 'user_id')==DIR then + c = bh + dir = (dir==0) and has_attr(bh, attr_dir) or dir + end end end -- for i=1,2 do diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua index af80272ea6c..12f350a84a4 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua @@ -523,6 +523,9 @@ calc_np_auxtable[13] = calc_np_auxtable.box_like calc_np_auxtable[id_ins] = calc_np_auxtable.skip calc_np_auxtable[id_mark] = calc_np_auxtable.skip calc_np_auxtable[id_adjust] = calc_np_auxtable.skip +if node.id('local_par') then + calc_np_auxtable[node.id('local_par')] = calc_np_auxtable.skip +end function calc_np(last, lp) local k diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua index cfd544c0fe3..3679ad11c7e 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua @@ -371,7 +371,7 @@ do if jfm_dir == 'tate' then 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' + name = name .. ';+vert;+vrt2' end else is_vert_enabled = nil @@ -699,7 +699,7 @@ do local function add_fl_table(dest, glyphs, unitable, asc_des, units) local tg, glyphmin, glyphmax = glyphs.glyphs, 0, glyphs.glyphmax for _,v in pairs(fields(glyphs)) do - if v=='glyphmin' then glyphmin = glyphs.glyphmin; break end + if v=='glyphmin' then glyphmin, glyphmax = glyphs.glyphmin, glyphmax+1; break end end for i = glyphmin, glyphmax-1 do local gv = tg[i] @@ -970,8 +970,10 @@ do if h then local g = node_new(id_kern) setfield(g, 'subtype', 1); set_attr(g, attr_icflag, ITALIC) - setfield(g, 'kern', h.characters[getchar(p)].italic) - node_write(g); ensure_tex_attr(attr_icflag, 0) + if h.characters[getchar(p)] and h.characters[getchar(p)].italic then + setfield(g, 'kern', h.characters[getchar(p)].italic) + node_write(g); ensure_tex_attr(attr_icflag, 0) + end end end end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua index 94f4c613342..ed1a1975320 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-otf.lua @@ -159,14 +159,13 @@ local function extract(head) end luatexbase.add_to_callback('hpack_filter', extract, - 'ltj.hpack_filter_otf', + 'ltj.otf', luatexbase.priority_in_callback('pre_linebreak_filter', - 'ltj.pre_linebreak_filter')) + 'ltj.main')) luatexbase.add_to_callback('pre_linebreak_filter', extract, - 'ltj.pre_linebreak_filter_otf', + 'ltj.otf', luatexbase.priority_in_callback('pre_linebreak_filter', - 'ltj.pre_linebreak_filter')) - + 'ltj.main')) -- additional callbacks -- 以下は,LuaTeX-ja に用意された callback のサンプルになっている. @@ -210,7 +209,7 @@ luatexbase.add_to_callback("luatexja.find_char_class", cid_set_char_class, "ltj.otf.find_char_class", 1) -------------------- IVS -local enable_ivs +local enable_ivs, disable_ivs do local is_ivs_enabled = false -- 組版時 @@ -222,23 +221,23 @@ do return p end - local function do_ivs_repr(head) - head = to_direct(head) + local function do_ivs_repr(h) + local head = to_direct(h) local p, r = head - local is_dir_tate = ltjs.list_dir == dir_tate + local is_dir_tate = (ltjs.list_dir == dir_tate) local attr_ablshift = is_dir_tate and attr_tablshift or attr_yablshift local attr_kblshift = is_dir_tate and attr_tkblshift or attr_ykblshift local attr_curfnt = is_dir_tate and attr_curtfnt or attr_curjfnt while p do local pid = getid(p) if pid==id_glyph then - local pf = getfont(p) local q = node_next(p) -- the next node of p if q and getid(q)==id_glyph then local qc = getchar(q) if (qc>=0xFE00 and qc<=0xFE0F) or (qc>=0xE0100 and qc<0xE01F0) then - -- q is a variation selector + -- q is a variation selector if qc>=0xE0100 then qc = qc - 0xE0100 end + local pf = getfont(p) local pt = ltjf_font_extra_info[pf] pt = pt and pt[getchar(p)]; pt = pt and pt[qc] head, r = node_remove(head,q) @@ -254,7 +253,7 @@ do head = node_insert_after(head, p, np) head = node_remove(head,p) node_free(p) - end + end p = r else p = q @@ -265,8 +264,8 @@ do else p = node_next(p) end - end - return to_node(head) + end + return to_node(head) end enable_ivs = function () @@ -275,21 +274,29 @@ do 'luatexja.otf.enable_ivs() was already called, so this call is ignored', '') else luatexbase.add_to_callback('hpack_filter', - do_ivs_repr,'do_ivs', + do_ivs_repr, 'ltj.do_ivs', luatexbase.priority_in_callback('hpack_filter', - 'ltj.hpack_filter_pre')+1) + 'ltj.set_stack_level')+1) luatexbase.add_to_callback('pre_linebreak_filter', - do_ivs_repr, 'do_ivs', + do_ivs_repr, 'ltj.do_ivs', luatexbase.priority_in_callback('pre_linebreak_filter', - 'ltj.pre_linebreak_filter_pre')+1) + 'ltj.set_stack_level')+1) is_ivs_enabled = true end end + disable_ivs = function () + if is_ivs_enabled then + luatexbase.remove_from_callback('hpack_filter', 'ltj.do_ivs') + luatexbase.remove_from_callback('pre_linebreak_filter', 'ltj.do_ivs') + is_ivs_enabled = false + end + end end luatexja.otf = { append_jglyph = append_jglyph, enable_ivs = enable_ivs, -- 隠し機能: IVS + disable_ivs = disable_ivs, -- 隠し機能: IVS cid = cid, } diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua index 42507758e02..9b2bc0708c0 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua @@ -126,6 +126,7 @@ end local ltjs_report_stack_level = ltjs.report_stack_level local ltjf_vert_form_table = ltjf.vert_form_table local ltjf_font_metric_table = ltjf.font_metric_table +local font_getfont = font.getfont local function set_box_stack_level(head, mode) local box_set, cl = 0, tex.currentgrouplevel + 1 for _,p in pairs(wt) do @@ -144,12 +145,11 @@ local function set_box_stack_level(head, mode) setfield(p, 'font', nf) if ltjf_font_metric_table[nf].vert_activated then pc = ltjf_vert_form_table [getchar(p)] - if font.getfont(nf).characters[pc] then setfield(p, 'char', pc) end + if font_getfont(nf).characters[pc] then setfield(p, 'char', pc) end end end end end - --luatexja.ext_show_node_list(head, 'S> ', print) return head end @@ -157,11 +157,11 @@ end luatexbase.add_to_callback('hpack_filter', function (head) return set_box_stack_level(head, true) - end,'ltj.hpack_filter_pre',1) + end,'ltj.set_stack_level',1) luatexbase.add_to_callback('pre_linebreak_filter', function (head) return set_box_stack_level(head, false) - end,'ltj.pre_linebreak_filter_pre',1) + end,'ltj.set_stack_level',1) luatexja.pretreat = { set_box_stack_level = set_box_stack_level, diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls index a90b1e2d89f..65b87c3c7c8 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -164,14 +164,18 @@ \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 eb605cc8bfd..289f7cb0805 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 bdd9b97faec..9642641ada8 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 e9ec2762030..db1eaffb7c6 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 8a474c34dfc..34b4ed353ae 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -172,14 +172,18 @@ \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 aa9a1de288c..03686aa9815 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -170,14 +170,18 @@ \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 7d1101828ca..2f93ffc393d 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/10/18 ] + [2016/01/31 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -295,16 +295,18 @@ \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 @@ -339,16 +341,7 @@ %% \DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{} -\renewcommand\jttdefault{\gtdefault} -\DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont} -\DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont} +\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue %% \AtBeginDocument{% \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} @@ -411,7 +404,7 @@ \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@ \belowdisplayshortskip \belowdisplayskip \let\@listi\@listI} -\normalsize +\mcfamily\selectfont\normalsize \setbox0\hbox{\char"3000}% 全角スペース \setlength\Cht{\ht0} \setlength\Cdp{\dp0} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls index 4fdcca173eb..01c5cc2572b 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/10/18 ] + [2016/01/31 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -302,16 +302,18 @@ \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 @@ -346,16 +348,7 @@ %% \DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{} -\renewcommand\jttdefault{\gtdefault} -\DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont} -\DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont} +\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue %% \AtBeginDocument{% \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} @@ -418,7 +411,7 @@ \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@ \belowdisplayshortskip \belowdisplayskip \let\@listi\@listI} -\normalsize +\mcfamily\selectfont\normalsize \setbox0\hbox{\char"3000}% 全角スペース \setlength\Cht{\ht0} \setlength\Cdp{\dp0} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo index 0598ed74cb4..456da14fbe1 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 23e9b5cef21..0482f88fc5c 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 15ea37b7b38..6a958894e2c 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 0d1d4bb6f05..9fd08453c93 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/10/18 ] + [2016/01/31 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -297,16 +297,18 @@ \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 @@ -341,16 +343,7 @@ %% \DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{} -\renewcommand\jttdefault{\gtdefault} -\DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont} -\DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont} +\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue %% \AtBeginDocument{% \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} @@ -413,7 +406,7 @@ \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@ \belowdisplayshortskip \belowdisplayskip \let\@listi\@listI} -\normalsize +\mcfamily\selectfont\normalsize \setbox0\hbox{\char"3000}% 全角スペース \setlength\Cht{\ht0} \setlength\Cdp{\dp0} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls index e2e7849906b..c82c2c37284 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/10/18 ] + [2016/01/31 ] \RequirePackage{luatexja} \newif\if@restonecol \newif\if@titlepage @@ -295,16 +295,18 @@ \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 @@ -339,16 +341,7 @@ %% \DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{} %% \DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{} -\renewcommand\jttdefault{\gtdefault} -\DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont} -\DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont} +\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue %% \AtBeginDocument{% \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} @@ -411,7 +404,7 @@ \belowdisplayskip 9\p@ \@plus3\p@ \@minus4\p@ \belowdisplayshortskip \belowdisplayskip \let\@listi\@listI} -\normalsize +\mcfamily\selectfont\normalsize \setbox0\hbox{\char"3000}% 全角スペース \setlength\Cht{\ht0} \setlength\Cdp{\dp0} diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls index 228d6d330c3..a94a06932bb 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -176,14 +176,18 @@ \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 4565ea46ae7..6cc2f933bcf 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 65c4594c033..d339d297dbd 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 b5c89c433a8..2f1e1c9efe9 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 36d9a46d476..52f38c1a0c2 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -184,14 +184,18 @@ \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 312af11a1cb..70ce3c8c423 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -182,14 +182,18 @@ \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 5eb5897a84b..eb4ad055201 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 706e5c66af1..d240f119431 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 e999c9e0569..8c8f6081976 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/10/18 v1.6-ltj-10 + [2016/01/31 v1.6-ltj-11 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 bf39e7890b4..c8815703b05 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty @@ -606,8 +606,9 @@ %%%% \hbox, \vbox, \vtop \setbox\z@\hbox{% + \primitive\everymath{} $\directlua{% This value depends on the version of LuaTeX. - luatexja.stack.mmode = -tex.nest[tex.nest.ptr].mode + luatexja.stack.mmode = -tex.nest[tex.nest.ptr].mode }$% } \setbox\z@\box\voidb@x diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua index 940ed213525..491454c5071 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua @@ -322,14 +322,14 @@ do 'pre_linebreak_filter', function (head,groupcode) return main_process(head, true, tex.textdir, groupcode) - end,'ltj.pre_linebreak_filter', + end,'ltj.main', luatexbase.priority_in_callback('pre_linebreak_filter', - 'luaotfload.node_processor') + 1) + 'luaotfload.node_processor')+1) luatexbase.add_to_callback( 'hpack_filter', function (head,groupcode,size,packtype, dir) return main_process(head, false, dir, groupcode) - end,'ltj.hpack_filter', + 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) @@ -481,12 +481,12 @@ local function debug_show_node_X(p,print_fn, limit) prefix, inner_depth = k, bid end else - s = s .. node.subtype(p.subtype) + s = s .. (node.subtype(p.subtype) or '') if p.subtype==1 then s = s .. ' stream=' .. p.stream print_fn(s) for i=1,#p.data do - print_fn(s .. ' [' .. i .. '] = ' .. tostring(token.command_name(p.data[i]))) + print_fn(s .. ' [' .. i .. '] = ' .. tostring(p.data[i].csname)) end else print_fn(s) diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty index 63ba2336175..f8af0aa2d9f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty @@ -193,7 +193,11 @@ \unless\ifnum\ltjgetparameter{direction}=3 \@makefnmark \else\hbox to\z@{\hskip-.25\zw\raise.9\zh\@makefnmark\hss}\fi \ifhmode\spacefactor\@x@sf\fi\relax} -\def\@setref#1#2#3{% +\begingroup +\@ifpackageloaded{hyperref} + {\def\ltj@setrefprefix{real}} + {\def\ltj@setrefprefix{}} +\expandafter\gdef\csname \ltj@setrefprefix @setref\endcsname#1#2#3{% \ifx#1\relax \protect\G@refundefinedtrue \nfss@text{\reset@font\bfseries ??}% @@ -202,6 +206,7 @@ \else \expandafter#2#1\relax% change \null to \relax \fi} +\endgroup \if@compatibility\else \def\verb{\relax\ifmmode\hbox\else\leavevmode\fi \bgroup diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty index dac8b4eff92..466e9c7666b 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjdefs}[2015/08/29 Default font settings of LuaTeX-ja] +\ProvidesPackage{lltjdefs}[2016/01/30 Default font settings of LuaTeX-ja] \def\ltj@stdmcfont{IPAExMincho} \def\ltj@stdgtfont{IPAExGothic} @@ -20,7 +20,7 @@ \newcommand\mcdefault{mc} \newcommand\gtdefault{gt} -\newcommand\jttdefault{\gtdefault} +\newcommand\jttdefault{\mcdefault} \newcommand\kanjiencodingdefault{JY3} \newcommand\kanjifamilydefault{\mcdefault} \newcommand\kanjiseriesdefault{\mddefault} @@ -54,6 +54,22 @@ \DeclareSymbolFontAlphabet{\mathmc}{mincho} \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n} +\newif\if@ltj@match@family +\@ltj@match@familyfalse +\def\verbatim@font{\normalfont\ttfamily\kanjifamily\jttdefault\selectfont} +\DeclareRobustCommand\rmfamily + {\not@math@alphabet\rmfamily\mathrm + \romanfamily\rmdefault + \if@ltj@match@family\kanjifamily\mcdefault\fi\selectfont} +\DeclareRobustCommand\sffamily + {\not@math@alphabet\sffamily\mathsf + \romanfamily\sfdefault + \if@ltj@match@family\kanjifamily\gtdefault\fi\selectfont} +\DeclareRobustCommand\ttfamily + {\not@math@alphabet\ttfamily\mathtt + \romanfamily\ttdefault + \if@ltj@match@family\kanjifamily\jttdefault\fi\selectfont} + \ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF} \ltjdefcharrange{2}{"370-"4FF, "1F00-"1FFF} \ltjdefcharrange{3}{% 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 40c71c83a7b..c1f1b9f81bb 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty @@ -270,7 +270,7 @@ \else\let\lst@next\ltj@lst@MakeActive@ \ifnum`#1>127 \lccode`\^^A=`#1 - \lowercase{\lst@lAddTo\lst@temp{$^^A}}% + \lowercase{\lst@lAddTo\lst@temp{$^^A}}%$ \else \lccode`\^^@=`#1 \lowercase{\lst@lAddTo\lst@temp{^^@}}% @@ -317,7 +317,7 @@ %%%% ここから \@tempdima\z@ \ifdim\ht\strutbox<\cht\@tempdima=\dimexpr\cht-\ht\strutbox\relax\fi - \ifdim\dp\strutbox<\cdp\advance\@tempdima=\dimexpr\cdp-\dp\strutbox\relax\fi + \ifdim\dp\strutbox<\cdp\@tempdima=\dimexpr\cdp-\dp\strutbox\relax\fi \ltj@lst@frame@lslimit=-\@tempdima \def\lst@framelr{% \ifltj@lst@frame@top\ltj@lst@frame@topfalse\else\lineskiplimit\ltj@lst@frame@lslimit\fi @@ -417,8 +417,12 @@ \gdef\lst@breakProcessOther#1{\lst@ProcessOther#1} % ソースコード目次における文字と番号の空き \let \l@lstlisting = \l@figure + +%%%% % キャプションとソースコード目次に対する日本語対応 -\def\lstlistingname{ソースコード} -\def\lstlistlistingname{ソースコード目次} +%\def\lstlistingname{ソースコード} +%\def\lstlistlistingname{ソースコード目次} % \end{修正事項} +%%%% + \endinput diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty index db9361abd1b..b6d17a6031f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty @@ -38,14 +38,14 @@ } \cs_gset:cpn { \tl_use:N \l_tmpa_tl } #1 = "#2 \q_nil {%" \group_begin: - %\typeout {um: \string#1, \int_from_hexadecimal:n {#2}, #2}% <- for debug + %\typeout {um: \string#1, \int_from_hex:n {#2}, #2}% <- for debug \char_set_lccode:nn { `! } { "#2 }%" \tex_lowercase:D { \tl_set:Nn \l_tmpa_tl { \relax \ifmmode!\else{\directlua{tex.globaldefs = 0}\ltj@allalchar!}\fi} \cs_gset_eq:NN #1 \l_tmpa_tl } - \ltjsetmathletter{ \int_from_hexadecimal:n {#2} } + \ltjsetmathletter{ \int_from_hex:n {#2} } \group_end: } } diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty index da4d1a78880..21ce7c9ac8d 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty @@ -5,7 +5,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{lltjp-xunicode}[2013/05/14 Patch to xunicode for LuaTeX-ja] -\def\UTFencname{EU2}\def\XeTeXpicfile{} +\def\XeTeXpicfile{} \RequirePackage{xunicode,luatexja} {\catcode`\"=12 \gdef\check@hexcom@digits@#1#2#3#4#5@!@#6#7#8{% @@ -81,15 +81,18 @@ \let\hbar\relax \let\ltj@tmpb\iftipaonetoken \let\iftipaonetoken\relax -\ReloadXunicode{EU2} +\typeout{UTFencname: \UTFencname} +\let\ltj@temp=\@temp +\edef\@temp{\noexpand\ReloadXunicode{\UTFencname}}\@temp \makeatletter +\let\@temp=\ltj@temp\let\ltj@temp\relax \let\hbar\ltj@tmpa \let\iftipaonetoken\ltj@tmpb \let\ltj@tmpb\relax % no more an if-token %% ticket 30501 {\catcode`\!0\catcode`\\11!catcode`!2 11!catcode`!?11!catcode`!-11 - !gdef!EU2\nobreakspace{!?-\nobreakspace}% + !expandafter!gdef!csname!UTFencname \nobreakspace!endcsname{!?-\nobreakspace}% } \endinput |