diff options
author | Karl Berry <karl@freefriends.org> | 2012-12-10 01:31:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-12-10 01:31:19 +0000 |
commit | eb3f5f9a64a4553a16273f9ff5cfe99d10f27dd8 (patch) | |
tree | 5e47c27e88cdb655ee7fefcf919ab531e8a4b757 /Master/texmf-dist/tex/luatex | |
parent | 64b7e39503022a8c0ce58857cea7f25d57369757 (diff) |
luatexja (9dec12)
git-svn-id: svn://tug.org/texlive/trunk@28482 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
23 files changed, 994 insertions, 2000 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty new file mode 100644 index 00000000000..21404ec1456 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty @@ -0,0 +1,119 @@ +% +% luatexja-adjust.sty +% + +%% Avoid multiple loading. +\csname\if11luatexjaadjustLoaded\fi\endcsname +\edef\x{% +\catcode32=\the\catcode32% +\catcode33=\the\catcode33% +\catcode35=\the\catcode35% +\catcode40=\the\catcode40% +\catcode41=\the\catcode41% +\catcode42=\the\catcode42% +\catcode43=\the\catcode43% +\catcode44=\the\catcode44% +\catcode45=\the\catcode45% +\catcode46=\the\catcode46% +\catcode58=\the\catcode58% +\catcode59=\the\catcode59% +\catcode60=\the\catcode60% +\catcode61=\the\catcode61% +\catcode62=\the\catcode62% +\catcode64=\the\catcode64% +\catcode91=\the\catcode91% +\catcode93=\the\catcode93% +\catcode94=\the\catcode94% +\catcode95=\the\catcode95% +\catcode126=\the\catcode126% +\endlinechar=\the\endlinechar +\relax} +\catcode32=10 %< > +\catcode33=12 %<"> +\catcode35=6 %<#> +\catcode40=12 %<(> +\catcode41=12 %<)> +\catcode42=12 %<*> +\catcode43=12 %<+> +\catcode44=12 %<,> +\catcode45=12 %<-> +\catcode46=12 %<.> +\catcode58=12 %<:> +\catcode59=12 %<;> +\catcode60=12 %<<> +\catcode61=12 %<=> +\catcode62=12 %<>> +\catcode64=11 %<@> +\catcode91=12 %<[> +\catcode93=12 %<]> +\catcode94=7 %<^> +\catcode95=8 %<_> +\catcode126=13 %<~> +\endlinechar=-1 % + +\edef\ltj@adjust@AtEnd{\x + \noexpand\let\noexpand\ltj@adjust@AtEnd\relax} +\def\luatexjaadjustLoaded{\endinput} + +%% Check if LaTeX is used. +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname RequirePackage\endcsname\relax %<*!LaTeX> + \expandafter\let\csname ifltj@in@latex\expandafter\endcsname + \csname iffalse\endcsname +\else %<*LaTeX> + \expandafter\let\csname ifltj@in@latex\expandafter\endcsname + \csname iftrue\endcsname + \NeedsTeXFormat{LaTeX2e} + \ProvidesPackage{luatexja-adjust}[2012/10/01 v0.1] +\fi %</LaTeX> + +% Load core module if not yet. +\ifx\luatexjacoreLoaded\@undefined + \ifltj@in@latex %<*LaTeX> + \RequirePackage{luatexja}[2012/04/20] + \else %<*!LaTeX> + \input luatexja.sty % + \fi %</LaTeX> +\fi + +%% When environment check fails, exit now. +\ifx\LuaTeXjaAvailable\@undefined + \ltj@otf@AtEnd +\expandafter\endinput\fi\relax + +%%------------------ +\RequirePackage{expl3} +%! Main part of luatexja-adjust +\RequireLuaTeXjaSubmodule{adjust} + +% enable/disable ``advanced'' line adjustment +\protected\def\ltjdisableadjust{\directlua{luatexja.adjust.disable_cb()}} +\protected\def\ltjenableadjust{\directlua{luatexja.adjust.enable_cb()}} +\ltjenableadjust +% there is also a key for \ltjsetparameter, for same effect +\define@boolkey[ltj]{japaram}{adjust}[true]{% + \ifltj@japaram@adjust\ltjenableadjust\else\ltjdisableadjust\fi +} + +\ExplSyntaxOn +\cs_new:Nn \ltj_adjust_inittable: { + % To be filled... +} +\cs_new:Nn \ltj_adjust_appendtable:n { + % To be filled +} + +\clist_new:N \l_ltj_adjust_priority +\define@key[ltj]{japaram}{adjustpriority}{% COMMA LIST + \clist_set:Nx \l_ltj_adjust_priority {#1} + \ltj_adjust_inittable: + \clist_map_function:NN \l_ltj_adjust_priority \ltj_adjust_appendtable:n +} + +\ExplSyntaxOff + + +%%------------------ all done +\ltj@adjust@AtEnd +\endinput +%% EOF diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty index b37b08f6c0b..4a037d640cd 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty @@ -3,12 +3,12 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luatexja-fontspec}[2011/09/23 v0.2] +\ProvidesPackage{luatexja-fontspec}[2012/09/17 v0.2a] \RequirePackage{fontspec,luatexja} - \ExplSyntaxOn +%%%%%%%% Messages \cs_new:Npn \ltj_fontspec_warning:n { \msg_warning:nn {ltj-fontspec} } \msg_new:nnn {ltj-fontspec} {addjfontfeatures-ignored} @@ -19,12 +19,22 @@ \cs_generate_variant:Nn \prg_new_conditional:Nnn {Nnx} +%%%%%%%% For compatibility with old fontspec. \prg_new_conditional:Nnx \ltj_fontspec_if_liiikeys: {TF,F} { \@ifpackagelater {fontspec} {2011/09/13} { \exp_not:N \prg_return_true: } % fontspec >= 2.2 (l3keys) { \exp_not:N \prg_return_false: } % fontspec < 2.2 (xkeyval) } +%%%%%%%% \g_ltj_fontspec_scale_fp +%% Default scale value for jfont. +\group_begin: +\fontsize{10}{10}\selectfont +\fp_gset:Nn \g_ltj_fontspec_scale_fp {\zw / 10} +\group_end: + +%%%%%%%% Internal control sequences +%% Each CS is ltj_fontspec version that corresponds to original CS of fontspec. \cs_new:Nn \ltj_fontspec_define_option:nn { \ltj_fontspec_if_liiikeys:TF { \keys_define:nn {fontspec} { #1 .code:n = {#2}} @@ -70,7 +80,7 @@ \tl_set:Nn \zf@enc {JY3} } \tl_set:Nx \g_fontspec_default_fontopts_tl - {JFM=ujis,Scale=0.962216,Kerning=Off,\g_ltj_fontspec_default_fontopts_tl} + {JFM=ujis,Scale=\fp_use:N \g_ltj_fontspec_scale_fp,Kerning=Off,\g_ltj_fontspec_default_fontopts_tl} \cs_set_eq:NN \DeclareFontFamily \DeclareKanjiFamily \fontspec_select:nn{#1}{#2} \group_end: @@ -84,6 +94,7 @@ \tl_set_eq:NN #1 \l_fontspec_family_tl } +%%%%%%%% User commands \DeclareDocumentCommand \jfontspec { O{} m } { \ltj_fontspec_set_family:Nnn \k@family {#1}{#2} \selectfont 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 d4fd53bbfc9..61983d57cbf 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty @@ -1,6 +1,6 @@ % luatexja-preset.sty \ProvidesPackage{luatexja-preset} - [2012/05/18 v0.0] + [2012/09/17 v0.1] \RequirePackage{expl3} \RequirePackage{luatexja-fontspec} @@ -25,12 +25,8 @@ \DeclareOption{nodeluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 0 }} % 2 fonts % scale -{ \fontsize{1024}{1024}\selectfont - \fp_set_from_dim:Nn \l_ltjpreset_scale_fp \zw - \fp_gdiv:Nn \l_ltjpreset_scale_fp {1024} -} \msg_new:nnn { luatexja-preset }{ scale }{ - 日本語フォントは~\fp_use:N \l_ltjpreset_scale_fp~倍にスケーリングされます. + 日本語フォントは~\fp_use:N \g_ltj_fontspec_scale_fp~倍にスケーリングされます. } \msg_warning:nn { luatexja-preset }{ scale } @@ -227,7 +223,6 @@ \tl_new:N \l_ltjpreset_add_features_tl \tl_set:Nx \l_ltjpreset_add_features_tl { - Scale = \fp_use:N \l_ltjpreset_scale_fp , \tl_use:N \l_ltjpreset_kanji_shape_tl, JFM = \ltjpreset_use_jfm: } diff --git a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua index d2cd13b6d91..f64080e02ed 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua @@ -2,16 +2,28 @@ -- jfm-ujis.lua: LuaTeX-ja 標準 JFM -- based on upnmlminr-h.tfm (a metric in UTF/OTF package used by upTeX). +-- JIS X 4051:2004 では,行末の句読点や中点はベタなのでそれに従う +-- kanjiskip: 0pt plus .25zw minus 0pt +-- xkanjiskip: .25zw plus .25zw (or .0833zw) minus .125zw + + luatexja.jfont.define_jfm { dir = 'yoko', zw = 1.0, zh = 1.0, - + kanjiskip = {0.0, 0.05, 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 = { - [1] = { 0.5 , 0.0, 0.5 }, - [3] = { 0.25, 0.0, 0.25 } + [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}, } }, @@ -23,25 +35,39 @@ luatexja.jfont.define_jfm { align = 'right', left = 0.0, down = 0.0, width = 0.5, height = 0.88, depth = 0.12, italic=0.0, glue = { - [3] = { 0.25, 0.0, 0.25 } +-- 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}, } }, [2] = { -- 閉じ括弧類 chars = { - '’', '”', '、', '〉', '》', '」', '』', '】', '〕', - '〗', '〙', '〟', ')', ',*', ']', '}', '⦆', + '’', '”', '〉', '》', '」', '』', '】', '〕', + '〗', '〙', '〟', ')', ']', '}', '⦆', '、', ',*' }, align = 'left', left = 0.0, down = 0.0, width = 0.5, height = 0.88, depth = 0.12, italic=0.0, glue = { - [0] = { 0.5 , 0.0, 0.5 }, - [1] = { 0.5 , 0.0, 0.5 }, - [3] = { 0.25, 0.0, 0.25 }, - [5] = { 0.5 , 0.0, 0.5 }, - [6] = { 0.5 , 0.0, 0.5 }, - [7] = { 0.5 , 0.0, 0.5 }, - [8] = { 0.5 , 0.0, 0.5 }, +-- 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}, } }, @@ -49,16 +75,19 @@ luatexja.jfont.define_jfm { chars = {'・', ':', ';'}, align = 'middle', left = 0.0, down = 0.0, width = 0.5, height = 0.88, depth = 0.12, italic=0.0, + --end_stretch = 0.25, glue = { - [0] = { 0.25, 0.0, 0.25 }, - [1] = { 0.25, 0.0, 0.25 }, - [2] = { 0.25, 0.0, 0.25 }, - [3] = { 0.5 , 0.0, 0.5 }, - [4] = { 0.25, 0.0, 0.25 }, - [5] = { 0.25, 0.0, 0.25 }, - [6] = { 0.25, 0.0, 0.25 }, - [7] = { 0.25, 0.0, 0.25 }, - [8] = { 0.25, 0.0, 0.25 }, +-- 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 }, } }, @@ -67,23 +96,29 @@ 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 = { - [0] = { 0.5 , 0.0, 0.0 }, - [1] = { 0.5 , 0.0, 0.0 }, - [3] = { 0.75, 0.0, 0.25 }, - [5] = { 0.5 , 0.0, 0.0 }, - [6] = { 0.5 , 0.0, 0.0 }, - [7] = { 0.5 , 0.0, 0.0 }, - [8] = { 0.5 , 0.0, 0.0 }, +-- 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 }, } }, [5] = { -- ダッシュ - chars = { '—', '―', '‥', '…' }, + chars = { '—', '―', '‥', '…', '〳', '〴', '〵', }, 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 }, - [3] = { 0.25, 0.0, 0.25 } + [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}, }, kern = { [5] = 0.0 @@ -91,18 +126,22 @@ luatexja.jfont.define_jfm { }, [6] = { -- 感嘆符・疑問符 - chars = { '?', '!' }, + chars = { '?', '!', '‼', '⁇', '⁈', '⁉', }, 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 }, - [1] = { 0.5 , 0.0, 0.5 }, - [3] = { 0.25, 0.0, 0.25 }, - [7] = { 0.5 , 0.0, 0.5 }, + [0] = {0, 0, 0}, + [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}, }, kern = { - [5] = 0.0, - [8] = 0.0 + [5] = 0.0 } }, @@ -131,8 +170,14 @@ 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 }, - [3] = { 0.25, 0.0, 0.25 } + [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}, } }, @@ -158,18 +203,43 @@ 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 }, - [3] = { 0.25, 0.0, 0.25 } + [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}, }, kern = { [8] = 0.0 } }, + [9] = { -- 和字間隔 + chars = { + ' ' + }, + align = 'left', left = 0.0, down = 0.0, + width = 1.0, height = 0.88, depth = 0.12, italic=0.0, + glue = { + [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}, + }, + }, + + [99] = { -- box末尾 chars = {'boxbdd', 'parbdd'}, glue = { - [3] = { 0.25, 0.0, 0.25 }, + [3] = { 0.25, 0.0, 0.25, 1 }, } }, diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua new file mode 100644 index 00000000000..db92b2a345f --- /dev/null +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua @@ -0,0 +1,247 @@ +-- +-- luatexja/otf.lua +-- +luatexbase.provides_module({ + name = 'luatexja.adjust', + date = '2012/09/27', + version = '0.1', + description = 'Advanced line adjustment for LuaTeX-ja', +}) +module('luatexja.adjust', package.seeall) + +luatexja.load_module('jfont'); local ltjf = luatexja.jfont +luatexja.load_module('jfmglue'); local ltjj = luatexja.jfmglue + +local id_glyph = node.id('glyph') +local id_kern = node.id('kern') +local id_hlist = node.id('hlist') +local id_glue = node.id('glue') +local id_glue_spec = node.id('glue_spec') +local has_attr = node.has_attribute +local set_attr = node.set_attribute +local attr_icflag = luatexbase.attributes['ltj@icflag'] +local attr_jchar_class = luatexbase.attributes['ltj@charclass'] +local attr_curjfnt = luatexbase.attributes['ltj@curjfnt'] +local node_copy = node.copy +local node_next = node.next +local node_free = node.free + +local ltjf_font_metric_table = ltjf.font_metric_table +local spec_zero_glue = ltjj.spec_zero_glue + +local PACKED = luatexja.icflag_table.PACKED +local FROM_JFM = luatexja.icflag_table.FROM_JFM +local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP +local XKANJI_SKIP = luatexja.icflag_table.XKANJI_SKIP + +local priority_table = { + FROM_JFM + 2, + FROM_JFM + 1, + FROM_JFM, + FROM_JFM - 1, + FROM_JFM - 2, + XKANJI_SKIP, + KANJI_SKIP +} + +local PROCESSED_BEGIN_FLAG = 32 +local function get_attr_icflag(p) + return (node.has_attribute(p, attr_icflag) or 0) % PROCESSED_BEGIN_FLAG +end + +-- box 内で伸縮された glue の合計値を計算 + +local function get_stretched(q, go, gs) + local qs = q.spec + if not qs.writable then return 0 end + if gs == 1 then -- stretching + if qs.stretch_order == go then return qs.stretch end + else -- shrinking + if qs.shrink_order == go then return qs.shrink end + end +end + +-- local new_ks, new_xs +local function get_total_stretched(p) + local go, gf, gs = p.glue_order, p.glue_set, p.glue_sign + local res = { + [0] = 0, + glue_set = gf, name = (gs==1) and 'stretch' or 'shrink' + } + for i=1,#priority_table do res[priority_table[i]]=0 end + if go ~= 0 then return nil end + if gs ~= 1 and gs ~= 2 then return res end + local head = p.head + q = p.head + --luatexja.ext_show_node_list(p.head, '>>> ', print) + while q do + if q.id==id_glue then + local a, ic = get_stretched(q, go, gs), get_attr_icflag(q) + if type(res[ic]) == 'number' then + -- kanjiskip, xkanjiskip は段落内で spec を共有しているが, + -- それはここでは望ましくないので,各 glue ごとに異なる spec を使う. + -- JFM グルーはそれぞれ異なる glue_spec を用いているので,問題ない. + res[ic] = res[ic] + a + if ic == KANJI_SKIP or ic == XKANJI_SKIP then + if q.spec ~= spec_zero_glue then + local ts, g; + q.spec, ts = node_copy(q.spec), q.spec + g = node.copy(q); q.spec = ts + node.insert_before(head, q, g); + head = node.remove(head, q); node.free(q); q = g + end + end + else + res[0] = res[0] + a + end + end + q = node_next(q) + end + return res +end + +local function clear_stretch(p, ic, name) + --print('clear ' .. ic) + for q in node.traverse_id(id_glue, p.head) do + if get_attr_icflag(q) == ic then + local qs = q.spec + if qs.writable then + qs[name..'_order'], qs[name] = 0, 0 + end + end + end +end + +local set_stretch_table = {} +local function set_stretch(p, after, before, ic, name) + if before > 0 then + --print (ic, before, after) + local ratio = after/before + for i,_ in pairs(set_stretch_table) do + set_stretch_table[i] = nil + end + for q in node.traverse_id(id_glue, p.head) do + if get_attr_icflag(q) == ic then + local qs, do_flag = q.spec, true + for i=1,#set_stretch_table do + if set_stretch_table[i]==qs then do_flag = false end + end + if qs.writable and qs[name..'_order'] == 0 and do_flag then + qs[name] = qs[name]*ratio; + set_stretch_table[#set_stretch_table+1] = qs + end + end + end + end +end + +-- step 1: 行末に kern を挿入(句読点,中点用) +local function aw_step1(p, res, total) + local x = node.tail(p.head); if not x then return false end + local x = node.prev(x) ; if not x then return false end + -- 本当の行末の node を格納 + if x.id == id_glue and x.subtype == 15 then + -- 段落最終行のときは,\penalty10000 \parfillskip が入るので, + -- その前の node が本来の末尾文字となる + x = node.prev(node.prev(x)) + end + + local xi, xc = x.id + if xi == id_glyph and has_attr(x, attr_curjfnt) == x.font then + -- 和文文字 + xc = x + elseif xi == id_hlist and get_attr_icflag(x) == PACKED then + -- packed JAchar + xc = x.head + else + return false-- それ以外は対象外. + end + local xk = ltjf_font_metric_table -- + [xc.font].size_cache.char_type[has_attr(xc, attr_jchar_class) or 0] + ['end_' .. res.name] or 0 + --print(res.name, total, xk, unicode.utf8.char(xc.char)) + + if xk>0 and total>=xk then + --print("ADDED") + total = total - xk + local kn = node.new(id_kern) + kn.kern = (res.name=='shrink' and -1 or 1) * xk + set_attr(kn, attr_icflag, FROM_JFM) + node.insert_after(p.head, x, kn) + return true + else return false + end +end + +-- step 2: 行中の glue を変える +local function aw_step2(p, res, total, added_flag) + if total == 0 then -- もともと伸縮の必要なし + if added_flag then -- 行末に kern 追加したので,それによる補正 + local f = node.hpack(p.head, p.width, 'exactly') + f.head, p.glue_set, p.glue_sign, p.glue_order + = nil, f.glue_set, f.glue_sign, f.glue_order + node.free(f); return + end + elseif total <= res[0] then -- 和文処理グルー以外で足りる + for _,v in pairs(priority_table) do clear_stretch(p, v, res.name) end + local f = node.hpack(p.head, p.width, 'exactly') + f.head, p.glue_set, p.glue_sign, p.glue_order + = nil, f.glue_set, f.glue_sign, f.glue_order + node.free(f) + else + total, i = total - res[0], 1 + while i <= #priority_table do + local v = priority_table[i] + if total <= res[v] then + for j = i+1,#priority_table do + clear_stretch(p, priority_table[j], res.name) + end + set_stretch(p, total, res[v], v, res.name) + i = #priority_table + 9 -- ループから抜けさせたいため + end + total, i= total - res[v], i+1 + end + if i == #priority_table + 10 or added_flag then + local f = node.hpack(p.head, p.width, 'exactly') + f.head, p.glue_set, p.glue_sign, p.glue_order + = nil, f.glue_set, f.glue_sign, f.glue_order + node.free(f) + end + end +end + + +function adjust_width(head) + if not head then return head end + for p in node.traverse_id(id_hlist, head) do + local res = get_total_stretched(p) + --print(table.serialize(res)) + if res then + -- 調整量の合計 + local total = 0 + for i,v in pairs(res) do + if type(i)=='number' then + total = total + v + end + end; total = tex.round(total * res.glue_set) + local added_flag = aw_step1(p, res, total) + --print(total, res[0], res[KANJI_SKIP], res[FROM_JFM]) + aw_step2(p, res, total, added_flag) + end + end + return head +end + +local is_reg = false +function enable_cb() + if not is_reg then + luatexbase.add_to_callback('post_linebreak_filter', adjust_width, 'Adjust width', 100) + is_reg = true + end +end +function disable_cb() + if is_reg then + luatexbase.remove_from_callback('post_linebreak_filter', 'Adjust width') + is_reg = false + end +end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-cctbreg.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-cctbreg.sty index c63933beb92..3cd0375820a 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-cctbreg.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-cctbreg.sty @@ -28,7 +28,10 @@ \fi %</LaTeX> % LS = Size of storage reserved for luatex-pkg. -\chardef\ltj@cctb@lower@stor@size=32768 +\chardef\ltj@cctb@lower@stor@size=16384 + +% LL = (upper bound of cctb index used by luatexbase.sty and luatex.sty) - 1 +\chardef\ltj@cctb@limit=32766 %------------------- @@ -77,7 +80,7 @@ \catcode`\_=12 \gdef\ltj@@cctb@org@def#1{% \ifnum\lltxb@catcodetable@alloc<65535\relax - \global\advance\lltxb@catcodetable@alloc\@ne + \global\advance\lltxb@catcodetable@alloc\tw@ \allocationnumber\lltxb@catcodetable@alloc \global\chardef#1\allocationnumber \luatexinitcatcodetable\allocationnumber @@ -126,6 +129,27 @@ %------------------- +\begingroup +\endlinechar=13 +\catcode`\_=12 +\gdef\newluatexcatcodetable#1{% + \ifnum\lltxb@catcodetable@alloc<\ltj@cctb@limit\relax + \global\advance\lltxb@catcodetable@alloc\tw@ + \allocationnumber\lltxb@catcodetable@alloc + \global\chardef#1\allocationnumber + \luatexinitcatcodetable\allocationnumber + \begingroup\escapechar\m@ne + \luatexbase@directlua{luatexbase.catcodetabledef_from_tex( + '\luatexluaescapestring{\string#1}', '\number\allocationnumber')}% + \endgroup + \wlog{\string#1=\string\luatexcatcodetable\the\allocationnumber}% + \else + \errmessage{No room for a new \string\luatexcatcodetable}% + \fi} +\endgroup + +%------------------- + % The luatex package stores its preset settings to registers 1, 3, 5, 7 % and new user allocations go to odd number 9, 11, 13, etc.; registers % with even number are reserved for the "category code table stack". diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua index d976cb3debd..6d13c916349 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua @@ -12,22 +12,23 @@ local err, warn, info, log = luatexbase.errwarinf(_NAME) luatexja.load_module('base'); local ltjb = luatexja.base +ATTR_RANGE = 7 local floor = math.floor local pow = math.pow local has_attr = node.has_attribute local kcat_attr_table = {} local pow_table = {} -for i = 0, 216 do +for i = 0, 31*ATTR_RANGE-1 do kcat_attr_table[i] = luatexbase.attributes['ltj@kcat'..floor(i/31)] pow_table[i] = pow(2, i%31) end -pow_table[217] = pow(2, 31) +pow_table[31*ATTR_RANGE] = pow(2, 31) -- jcr_table_main[chr_code] = index -- index : internal 0, 1, 2, ..., 216 0: 'other' -- external 1 2 216, (out of range): 'other' --- initialize +-- initialize local jcr_table_main = {} local jcr_cjk = 0; local jcr_noncjk = 1; local ucs_out = 0x110000 @@ -36,11 +37,12 @@ for i=0x100,ucs_out-1 do jcr_table_main[i]=0 end -- EXT: add characters to a range function add_char_range(b,e,ind) -- ind: external range number - if not ind or ind<0 or ind>216 then -- 0 は error にしない(隠し) + if not ind or ind<0 or ind>=7*ATTR_RANGE then -- 0 は error にしない(隠し) ltjb.package_error('luatexja', "invalid character range number (" .. ind .. ")", - {"A character range number should be in the range 1..216,", - "ignored."}) + "A character range number should be in the range 1.." + .. 7+ATTR_RANGE-1 .. ",\n" .. + "ignored.") return elseif b<0x80 or e>=ucs_out then ltjb.package_warning('luatexja', @@ -48,7 +50,7 @@ function add_char_range(b,e,ind) -- ind: external range number 'I take the intersection with [0x80, 0x10ffff].') elseif b>e then local j=b; e=b; b=j - end + end for i=math.max(0x80,b),math.min(ucs_out-1,e) do jcr_table_main[i]=ind end @@ -58,8 +60,8 @@ function char_to_range(c) -- return the (external) range number if not c or c<0 or c>0x10FFFF then ltjb.package_error('luatexja', 'bad character code (' .. tostring(c) .. ')', - {'A character number must be between 0 and 0x10ffff.', - 'So I changed this one to zero.'}) + 'A character number must be between 0 and 0x10ffff.\n' .. + 'So I changed this one to zero.') c=0 elseif c<0x80 then return -1 else return jcr_table_main[c] or 0 end @@ -72,12 +74,12 @@ end -- glyph_node p は和文文字か? function is_ucs_in_japanese_char(p) local c = p.char - if c<0x80 then - return false - else - local i=jcr_table_main[c] + if c<0x80 then + return false + else + local i=jcr_table_main[c] return (floor( - has_attr(p, kcat_attr_table[i])/pow_table[i])%2 ~= jcr_noncjk) + has_attr(p, kcat_attr_table[i])/pow_table[i])%2 ~= jcr_noncjk) end end @@ -87,15 +89,15 @@ function toggle_char_range(g, i) -- i: external range number ltjb.package_error('luatexja', "invalid character range number (" .. tostring(i).. ")", "A character range number must be a number, ignored.") - elseif i==0 then return + elseif i==0 then return else local kc if i>0 then kc=0 else kc=1; i=-i end - if i>216 then i=0 end + if i>=7*ATTR_RANGE then i=0 end local attr = kcat_attr_table[i] local a = tex.getattribute(attr) tex.setattribute(g,attr,(floor(a/pow_table[i+1])*2+kc)*pow_table[i]+a%pow_table[i]) end end --- EOF
\ No newline at end of file +-- EOF diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua index fdf878eb919..0dc28f7c35d 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua @@ -54,26 +54,21 @@ local sid_start_thread = node.subtype('pdf_start_thread') local sid_end_link = node.subtype('pdf_end_link') local sid_end_thread = node.subtype('pdf_end_thread') -local ITALIC = 1 -local PACKED = 2 -local KINSOKU = 3 -local FROM_JFM = 4 -local LINE_END = 5 -local KANJI_SKIP = 6 -local XKANJI_SKIP = 7 -local PROCESSED = 8 -local IC_PROCESSED = 9 -local BOXBDD = 15 -local PROCESSED_BEGIN_FLAG = 16 - +local ITALIC = luatexja.icflag_table.ITALIC +local PACKED = luatexja.icflag_table.PACKED +local KINSOKU = luatexja.icflag_table.KINSOKU +local FROM_JFM = luatexja.icflag_table.FROM_JFM +local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP +local XKANJI_SKIP = luatexja.icflag_table.XKANJI_SKIP +local PROCESSED = luatexja.icflag_table.PROCESSED +local IC_PROCESSED = luatexja.icflag_table.IC_PROCESSED +local BOXBDD = luatexja.icflag_table.BOXBDD +local PROCESSED_BEGIN_FLAG = luatexja.icflag_table.PROCESSED_BEGIN_FLAG local kanji_skip local xkanji_skip -local attr_orig_char = luatexbase.attributes['ltj@origchar'] local attr_curjfnt = luatexbase.attributes['ltj@curjfnt'] local attr_icflag = luatexbase.attributes['ltj@icflag'] -local attr_autospc = luatexbase.attributes['ltj@autospc'] -local attr_autoxspc = luatexbase.attributes['ltj@autoxspc'] local max_dimen = 1073741823 local function get_attr_icflag(p) @@ -91,13 +86,20 @@ local function fast_find_char_class(c,m) return m.size_cache.chars[c] or 0 end -local spec_zero_glue = node_new(id_glue_spec) +-- 文字クラスの決定 +local function slow_find_char_class(c, m, oc) + local xc = c or oc + local cls = ltjf_find_char_class(oc, m) + if xc ~= oc and cls==0 then cls, xc = ltjf_find_char_class(-xc, m) end + return cls, xc +end + +local zero_glue = node_new(id_glue) +spec_zero_glue = node_new(id_glue_spec) -- must be public, since mentioned from other sources +local spec_zero_glue = spec_zero_glue spec_zero_glue.width = 0; spec_zero_glue.stretch_order = 0; spec_zero_glue.stretch = 0 spec_zero_glue.shrink_order = 0; spec_zero_glue.shrink = 0 - -local function get_zero_spec() - return node_copy(spec_zero_glue) -end + zero_glue.spec = spec_zero_glue local function skip_table_to_spec(n) local g, st = node_new(id_glue_spec), ltjs.fast_get_skip_table(n) @@ -109,54 +111,27 @@ end -- penalty 値の計算 local function add_penalty(p,e) - if p.penalty>=10000 then - if e<=-10000 then p.penalty = 0 end - elseif p.penalty<=-10000 then - if e>=10000 then p.penalty = 0 end + local pp = p.penalty + if pp>=10000 then + if e<=-10000 then pp = 0 end + elseif pp<=-10000 then + if e>=10000 then pp = 0 end else - p.penalty = p.penalty + e - if p.penalty>=10000 then p.penalty = 10000 - elseif p.penalty<=-10000 then p.penalty = -10000 end + pp = pp + e + if pp>=10000 then p.penalty = 10000 + elseif pp<=-10000 then p.penalty = -10000 + else p.penalty = pp end end return end -- 「異なる JFM」の間の調整方法 -diffmet_rule = math.two_average +diffmet_rule = math.two_paverage function math.two_add(a,b) return a+b end function math.two_average(a,b) return (a+b)*0.5 end - --------------------- idea --- 2 node の間に glue/kern/penalty を挿入する. --- 基本方針: char node q と char node p の間 - --- Np: 「p を核とする塊」 --- first: 最初の node,nuc: p,last: 最後の node --- id: 核 node の種類 --- Nq: 「q を核とする塊」 --- 実際の glue は Np.last, Nq.first の間に挿入される --- Bp: Np.last, Nq.first の間の penalty node 達の配列 - --- Np, Nq, Bp, widow_Bp について --- Np, Nq は別々のテーブル. --- 1回のループごとに Nq = Np, Np = (new table) となるのは効率が悪いので, --- Np <-> Nq 入れ替え,その後 Np をクリアすることでテーブルを再利用. --- 同様の関係は Bp, widow_Bp にも. - - --- 核の定義: --- node x が non-char node のときは,x のみ --- x が char_node のときは, --- - x が \accent の第二引数だったとき --- [kern2 kern y kern2] x の 3 node が核に加わる --- - x の直後に \/ 由来 kern があったとき --- その \/ 由来の kern が核に加わる --- p, q の走査で無視するもの: --- ins, mark, adjust, whatsit, penalty --- --- Nq.last .. + .. Bp.first .... Bp[last] .... * .. Np.first --- +: kern from LINEEND はここに入る --- *: jfm glue はここに入る +function math.two_paverage(a,b) return (a+b)*0.5 end +function math.two_pleft(a,b) return a end +function math.two_pright(a,b) return b end local head -- the head of current list @@ -228,7 +203,7 @@ function check_box_high(Nx, box_ptr, box_end) first_char = nil; last_char = nil; find_first_char = true if check_box(box_ptr, box_end) then if first_char then - if first_char.font == has_attr(first_char, attr_curjfnt) then + if first_char.font == (has_attr(first_char, attr_curjfnt) or -1) then set_np_xspc_jachar(Nx, first_char) else set_np_xspc_alchar(Nx, first_char.char,first_char, ligature_head) @@ -274,7 +249,7 @@ local function calc_np_pbox(lp, last) set_attr(lp, attr_icflag, get_attr_icflag(lp)); while lp~=last and lpa>=PACKED and lpa<BOXBDD do Np.nuc = lp; - lp = node_next(lp); lpa = has_attr(lp, attr_icflag) + lp = node_next(lp); lpa = has_attr(lp, attr_icflag) or 0 -- get_attr_icflag() ではいけない! end return check_next_ickern(lp) @@ -284,7 +259,7 @@ end local calc_np_auxtable = { [id_glyph] = function (lp) Np.first, Np.nuc = (Np.first or lp), lp; - Np.id = (lp.font == has_attr(lp, attr_curjfnt)) and id_jglyph or id_glyph + Np.id = (lp.font == (has_attr(lp, attr_curjfnt) or -1)) and id_jglyph or id_glyph --set_attr_icflag_processed(lp) treated in ltj-setwidth.lua return true, check_next_ickern(node_next(lp)); end, @@ -350,7 +325,7 @@ local calc_np_auxtable = { set_attr_icflag_processed(lp); lp = node_next(lp) set_attr_icflag_processed(lp); lp = node_next(lp) set_attr_icflag_processed(lp); Np.nuc = lp - Np.id = (lp.font == has_attr(lp, attr_curjfnt)) and id_jglyph or id_glyph + Np.id = (lp.font == (has_attr(lp, attr_curjfnt) or -1)) and id_jglyph or id_glyph return true, check_next_ickern(node_next(lp)); else Np.id = id_kern; set_attr_icflag_processed(lp); @@ -373,13 +348,13 @@ calc_np_auxtable[id_glue] = calc_np_auxtable.discglue local pairs = pairs function calc_np(lp, last) - local k + local k -- We assume lp = node_next(Np.last) Np, Nq, ihb_flag = Nq, Np, false -- We clear `predefined' entries of Np before pairs() loop, -- because using only pairs() loop is slower. Np.post, Np.pre, Np.xspc = nil, nil, nil - Np.first, Np.id, Np.last, Np.lend, Np.met = nil, nil, nil, nil + Np.first, Np.id, Np.last, Np.met = nil, nil, nil Np.auto_kspc, Np.auto_xspc, Np.char, Np.class, Np.nuc = nil, nil, nil, nil, nil for k in pairs(Np) do Np[k] = nil end @@ -412,42 +387,49 @@ do -- 和文文字のデータを取得 local attr_jchar_class = luatexbase.attributes['ltj@charclass'] + local attr_orig_char = luatexbase.attributes['ltj@origchar'] + local attr_autospc = luatexbase.attributes['ltj@autospc'] + local attr_autoxspc = luatexbase.attributes['ltj@autoxspc'] function set_np_xspc_jachar(Nx, x) local m = ltjf_font_metric_table[x.font] - local c = has_attr(x, attr_orig_char) or x.char - local cls = ltjf_find_char_class(x.char, m) - if c ~= x.char and cls==0 then cls = ltjf_find_char_class(-c, m) end + local cls, c = slow_find_char_class(has_attr(x, attr_orig_char), m, x.char) Nx.class = cls; set_attr(x, attr_jchar_class, cls) - Nx.lend = m.size_cache.char_type[cls].kern[fast_find_char_class('lineend', m)] or 0 - Nx.met, Nx.var, Nx.char = m, m.var, c - Nx.pre = ltjs_fast_get_penalty_table('pre', c) or 0 - Nx.post = ltjs_fast_get_penalty_table('post', c) or 0 - Nx.xspc = ltjs_fast_get_penalty_table('xsp', c) or 3 + Nx.met, Nx.char = m, c + local t = ltjs.fast_get_penalty_table_parent(c) + Nx.pre = t.pre or 0 + Nx.post = t.post or 0 + Nx.xspc = t.xsp or 3 + Nx.kcat = t.kcat or 0 Nx.auto_kspc, Nx.auto_xspc = (has_attr(x, attr_autospc)==1), (has_attr(x, attr_autoxspc)==1) - end + end local set_np_xspc_jachar = set_np_xspc_jachar -- 欧文文字のデータを取得 local floor = math.floor function set_np_xspc_alchar(Nx, c,x, lig) if c~=-1 then + local xc, xs = x.components, x.subtype if lig == ligature_head then - while x.components and x.subtype and math.floor(x.subtype*0.5)%2==1 do - x = x.components; c = x.char + while xc and xs and xs%4>=2 do + x = xc; xc, xs = x.components, x.subtype end + c = x.char else - while x.components and x.subtype and math.floor(x.subtype*0.5)%2==1 do - x = node.tail(x.components); c = x.char + while xc and xs and xs%4>=2 do + x = node.tail(xc); xc, xs = x.components, x.subtype end + c = x.char end - Nx.pre = ltjs_fast_get_penalty_table('pre', c) or 0 - Nx.post = ltjs_fast_get_penalty_table('post', c) or 0 + local t = ltjs.fast_get_penalty_table_parent(c) + Nx.pre = t.pre or 0 + Nx.post = t.post or 0 + Nx.xspc = t.xsp or 3 Nx.char = 'jcharbdd' else Nx.pre, Nx.post, Nx.char = 0, 0, -1 + Nx.xspc = ltjs_fast_get_penalty_table('xsp', -1) or 3 end Nx.met = nil - Nx.xspc = ltjs_fast_get_penalty_table('xsp', c) or 3 Nx.auto_xspc = (has_attr(x, attr_autoxspc)==1) end local set_np_xspc_alchar = set_np_xspc_alchar @@ -469,7 +451,7 @@ do function after_hlist(Nx) local s = Nx.last_char if s then - if s.font == has_attr(s, attr_curjfnt) then + if s.font == (has_attr(s, attr_curjfnt) or -1) then set_np_xspc_jachar(Nx, s) else set_np_xspc_alchar(Nx, s.char, s, ligature_tail) @@ -489,26 +471,11 @@ local after_hlist, after_alchar, extract_np = after_hlist, after_alchar, extract -------------------- 最下層の処理 -local function lineend_fix(g) - if g and g.id==id_kern then - Nq.lend = 0 - elseif Nq.lend~=0 then - if not g then - g = node_new(id_kern); --copy_attr(g, Nq.nuc); - g.subtype = 1; g.kern = -Nq.lend; - set_attr(g, attr_icflag, LINEEND) - else - g.spec.width = g.spec.width - Nq.lend - end - end - return g -end - -- change penalties (or create a new penalty, if needed) local function handle_penalty_normal(post, pre, g) local a = (pre or 0) + (post or 0) if #Bp == 0 then - if (a~=0 and not(g and g.id==id_kern)) or Nq.lend~=0 then + if (a~=0 and not(g and g.id==id_kern)) then local p = node_new(id_penalty); --copy_attr(p, Nq.nuc) if a<-10000 then a = -10000 elseif a>10000 then a = 10000 end p.penalty = a @@ -523,7 +490,7 @@ end local function handle_penalty_always(post, pre, g) local a = (pre or 0) + (post or 0) if #Bp == 0 then - if not (g and g.id==id_glue) or Nq.lend~=0 then + if not (g and g.id==id_glue) then local p = node_new(id_penalty); --copy_attr(p, Nq.nuc) if a<-10000 then a = -10000 elseif a>10000 then a = 10000 end p.penalty = a @@ -549,28 +516,26 @@ local function handle_penalty_suppress(post, pre, g) end -- 和文文字間の JFM glue を node 化 -local function new_jfm_glue(Nn, bc, ac) +local function new_jfm_glue(m, bc, ac) -- bc, ac: char classes - local z = Nn.met.size_cache.char_type[bc] - local g = z.glue[ac] + local z = m.size_cache.char_type[bc] + local g, d = z.glue[ac], 0 if g then - g = node_copy(g); g.spec = node.copy(g.spec); - elseif z.kern[ac] then - g = node_new(id_kern); --copy_attr(g, Nn.nuc) - g.subtype = 1; g.kern = z.kern[ac] - set_attr(g, attr_icflag, FROM_JFM); + g,d = node_copy(g[1]), g[2]; + g.spec = node_copy(g.spec); -- node_copy は spec をコピーする + else + local k = z.kern[ac] + if k then + g = node_new(id_kern); --copy_attr(g, Nn.nuc) + g.subtype = 1; g.kern, d = k[1], k[2] + set_attr(g, attr_icflag, FROM_JFM); + end end - return g + return g, d end -- Nq.last (kern w) .... (glue/kern g) Np.first local function real_insert(w, g) - if w~=0 then - local h = node_new(id_kern); --copy_attr(h, Nq.nuc) - set_attr(h, attr_icflag, LINE_END) - h.kern = w; h.subtype = 1 - head = node.insert_after(head, Nq.last, h) - end if g then head = insert_before(head, Np.first, g) Np.first = g @@ -584,87 +549,112 @@ end local get_kanjiskip local function get_kanjiskip_normal() - local g = node_new(id_glue); --copy_attr(g, Nq.nuc) - g.spec = (Np.auto_kspc or Nq.auto_kspc) and node_copy(kanji_skip) or get_zero_spec() - set_attr(g, attr_icflag, KANJI_SKIP) - return g + 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 local function get_kanjiskip_jfm() - local g = node_new(id_glue); --copy_attr(g, Nq.nuc) + local g if Np.auto_kspc or Nq.auto_kspc then - local gx = node_new(id_glue_spec); - gx.stretch_order, gx.shrink_order = 0, 0 - local bk = Nq.met.size_cache.kanjiskip - local ak - if (Np.met.size_cache==Nq.met.size_cache) and (Nq.var==Np.var) then - ak = nil - else - ak = Np.met.size_cache.kanjiskip - end - if bk then - if ak then - gx.width = round(diffmet_rule(bk[1], ak[1])) - gx.stretch = round(diffmet_rule(bk[2], ak[2])) - gx.shrink = -round(diffmet_rule(-bk[3], -ak[3])) - else - gx.width = bk[1]; gx.stretch = bk[2]; gx.shrink = bk[3] - end - elseif ak then - gx.width = ak[1]; gx.stretch = ak[2]; gx.shrink = ak[3] - else - gx.width, gx.stretch, gx.shrink = 0, 0, 0 - end - g.spec = gx + g = node_new(id_glue); --copy_attr(g, Nq.nuc) + local gx = node_new(id_glue_spec); + gx.stretch_order, gx.shrink_order = 0, 0 + local pm, qm = Np.met, Nq.met + local bk = qm.size_cache.kanjiskip or {0, 0, 0} + if (pm.size_cache==qm.size_cache) and (qm.var==pm.var) then + gx.width = bk[1]; gx.stretch = bk[2]; gx.shrink = bk[3] + else + local ak = pm.size_cache.kanjiskip or {0, 0, 0} + gx.width = round(diffmet_rule(bk[1], ak[1])) + gx.stretch = round(diffmet_rule(bk[2], ak[2])) + gx.shrink = -round(diffmet_rule(-bk[3], -ak[3])) + end + g.spec = gx else - g.spec = get_zero_spec() + g = node_copy(zero_glue) end set_attr(g, attr_icflag, KANJI_SKIP) return g end -local function calc_ja_ja_aux(gb,ga) +local function calc_ja_ja_aux(gb,ga, db, da) + local rbb, rab = (1-db)/2, (1-da)/2 -- 「前の文字」由来のグルーの割合 + local rba, raa = (1+db)/2, (1+da)/2 -- 「前の文字」由来のグルーの割合 + 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 + end if not gb then + if ga then gb = node_new(id_kern); gb.kern = 0 else return nil end + elseif not ga then + ga = node_new(id_kern); ga.kern = 0 + end + + local k = node.type(gb.id) .. node.type(ga.id) + if k == 'glueglue' then + -- 両方とも glue. + gb.spec.width = round(diffmet_rule( + rbb*gb.spec.width + rba*ga.spec.width, + rab*gb.spec.width + raa*ga.spec.width )) + gb.spec.stretch = round(diffmet_rule( + rbb*gb.spec.stretch + rba*ga.spec.stretch, + rab*gb.spec.stretch + raa*ga.spec.stretch )) + gb.spec.shrink = -round(diffmet_rule( + -rbb*gb.spec.shrink - rba*ga.spec.shrink, + -rab*gb.spec.shrink - raa*ga.spec.shrink )) + node.free(ga) + return gb + elseif k == 'kernkern' then + -- 両方とも kern. + gb.kern = round(diffmet_rule( + rbb*gb.kern + rba*ga.kern, + rab*gb.kern + raa*ga.kern )) + node.free(ga) + return gb + elseif k == 'kernglue' then + -- gb: kern, ga: glue + ga.spec.width = round(diffmet_rule( + rbb*gb.kern + rba*ga.spec.width, + rab*gb.kern + raa*ga.spec.width )) + ga.spec.stretch = round(diffmet_rule( + rba*ga.spec.stretch, raa*ga.spec.stretch )) + ga.spec.shrink = -round(diffmet_rule( + -rba*ga.spec.shrink,-raa*ga.spec.shrink )) + node.free(gb) return ga else - if not ga then return gb end - local k = node.type(gb.id) .. node.type(ga.id) - if k == 'glueglue' then - -- 両方とも glue. - gb.spec.width = round(diffmet_rule(gb.spec.width, ga.spec.width)) - gb.spec.stretch = round(diffmet_rule(gb.spec.stretch,ga.spec.shrink)) - gb.spec.shrink = -round(diffmet_rule(-gb.spec.shrink, -ga.spec.shrink)) - node.free(ga) - return gb - elseif k == 'kernkern' then - -- 両方とも kern. - gb.kern = round(diffmet_rule(gb.kern, ga.kern)) - node.free(ga) - return gb - elseif k == 'kernglue' then - -- gb: kern, ga: glue - ga.spec.width = round(diffmet_rule(gb.kern,ga.spec.width)) - ga.spec.stretch = round(diffmet_rule(ga.spec.stretch, 0)) - ga.spec.shrink = -round(diffmet_rule(-ga.spec.shrink, 0)) - node.free(gb) - return ga - else - -- gb: glue, ga: kern - gb.spec.width = round(diffmet_rule(ga.kern, gb.spec.width)) - gb.spec.stretch = round(diffmet_rule(gb.spec.stretch, 0)) - gb.spec.shrink = -round(diffmet_rule(-gb.spec.shrink, 0)) - node.free(ga) - return gb - end + -- gb: glue, ga: kern + gb.spec.width = round(diffmet_rule( + rba*ga.kern + rbb*gb.spec.width, + raa*ga.kern + rab*gb.spec.width )) + gb.spec.stretch = round(diffmet_rule( + rbb*gb.spec.stretch, rab*gb.spec.stretch )) + gb.spec.shrink = -round(diffmet_rule( + -rbb*gb.spec.shrink,-rab*gb.spec.shrink )) + node.free(ga) + return gb end end local function calc_ja_ja_glue() if ihb_flag then return nil - elseif (Nq.met.size_cache==Np.met.size_cache) and (Nq.var==Np.var) then - return new_jfm_glue(Nq, Nq.class, Np.class) else - return calc_ja_ja_aux(new_jfm_glue(Nq, Nq.class, fast_find_char_class('diffmet',Nq.met)), - new_jfm_glue(Np, fast_find_char_class('diffmet',Np.met), Np.class)) + local qm, pm = Nq.met, Np.met + if (qm.size_cache==pm.size_cache) 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(has_attr(npn, attr_orig_char), qm, npn.char)) + local ga, da = new_jfm_glue(pm, + slow_find_char_class(has_attr(nqn, attr_orig_char), pm, nqn.char), + Np.class) + return calc_ja_ja_aux(gb, ga, db, da); + end end end @@ -673,30 +663,25 @@ end -- get xkanjiskip local get_xkanjiskip local function get_xkanjiskip_normal(Nn) - local g = node_new(id_glue); --copy_attr(g, Nn.nuc) - local gx = node_new(id_glue_spec); g.spec = gx if (Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc) then - g.spec = node_copy(xkanji_skip) + return node_copy(xkanji_skip) else - g.spec = get_zero_spec() + local g = node_copy(zero_glue) + set_attr(g, attr_icflag, XKANJI_SKIP) + return g end - set_attr(g, attr_icflag, XKANJI_SKIP) - return g end local function get_xkanjiskip_jfm(Nn) - local g = node_new(id_glue); --copy_attr(g, Nn.nuc) + local g if (Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc) then + g = node_new(id_glue); --copy_attr(g, Nn.nuc) local gx = node_new(id_glue_spec); gx.stretch_order, gx.shrink_order = 0, 0 - local bk = Nn.met.size_cache.xkanjiskip - if bk then - gx.width = bk[1]; gx.stretch = bk[2]; gx.shrink = bk[3] - else - gx.width, gx.stretch, gx.shrink = 0, 0, 0 - end + local bk = Nn.met.size_cache.xkanjiskip or {0, 0, 0} + gx.width = bk[1]; gx.stretch = bk[2]; gx.shrink = bk[3] g.spec = gx else - g.spec = get_zero_spec() + g = node_copy(zero_glue) end set_attr(g, attr_icflag, XKANJI_SKIP) return g @@ -708,40 +693,43 @@ end local function get_OA_skip() if not ihb_flag then - return new_jfm_glue(Np, - fast_find_char_class(((Nq.id == id_math and -1) or 'jcharbdd'), Np.met), Np.class) + local pm = Np.met + return new_jfm_glue(pm, + fast_find_char_class(((Nq.id == id_math and -1) or 'jcharbdd'), pm), Np.class) else return nil end end local function get_OB_skip() if not ihb_flag then - return new_jfm_glue(Nq, Nq.class, - fast_find_char_class(((Np.id == id_math and -1) or'jcharbdd'), Nq.met)) + local qm = Nq.met + return new_jfm_glue(qm, Nq.class, + fast_find_char_class(((Np.id == id_math and -1) or'jcharbdd'), qm)) else return nil end end -- (anything) .. jachar local function handle_np_jachar(mode) - if Nq.id==id_jglyph or ((Nq.id==id_pbox or Nq.id==id_pbox_w) and Nq.met) then - local g = lineend_fix(calc_ja_ja_glue() or get_kanjiskip()) -- M->K - handle_penalty_normal(Nq.post, Np.pre, g); real_insert(Nq.lend, g) - elseif Nq.met then -- Nq.id==id_hlist + local qid = Nq.id + if qid==id_jglyph or ((qid==id_pbox or qid==id_pbox_w) and Nq.met) then + local g = calc_ja_ja_glue() or get_kanjiskip() -- M->K + handle_penalty_normal(Nq.post, Np.pre, g); real_insert(0, g) + elseif Nq.met then -- qid==id_hlist local g = get_OA_skip() or get_kanjiskip() -- O_A->K handle_penalty_normal(0, Np.pre, g); real_insert(0, g) elseif Nq.pre then local g = get_OA_skip() or get_xkanjiskip(Np) -- O_A->X - if Nq.id==id_hlist then Nq.post = 0 end + if qid==id_hlist then Nq.post = 0 end handle_penalty_normal(Nq.post, Np.pre, g); real_insert(0, g) else local g = get_OA_skip() -- O_A - if Nq.id==id_glue then handle_penalty_normal(0, Np.pre, g) - elseif Nq.id==id_kern then handle_penalty_suppress(0, Np.pre, g) + 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) end real_insert(0, g) end - if mode and (ltjs_fast_get_penalty_table('kcat', Np.char) or 0)%2~=1 then + if mode and Np.kcat%2~=1 then widow_Np.first, widow_Bp, Bp = Np.first, Bp, widow_Bp end end @@ -751,23 +739,24 @@ end local function handle_nq_jachar() if Np.pre then if Np.id==id_hlist then Np.pre = 0 end - local g = lineend_fix(get_OB_skip() or get_xkanjiskip(Nq)) -- O_B->X - handle_penalty_normal(Nq.post, Np.pre, g); real_insert(Nq.lend, g) + local g = get_OB_skip() or get_xkanjiskip(Nq) -- O_B->X + handle_penalty_normal(Nq.post, Np.pre, g); real_insert(0, g) else - local g = lineend_fix(get_OB_skip()) -- O_B + local g = 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) end - real_insert(Nq.lend, g) + real_insert(0, g) end end -- (anything) .. (和文文字で始まる hlist) local function handle_np_ja_hlist() - if Nq.id==id_jglyph or ((Nq.id==id_pbox or Nq.id == id_pbox_w) and Nq.met) then - local g = lineend_fix(get_OB_skip() or get_kanjiskip()) -- O_B->K - handle_penalty_normal(Nq.post, 0, g); real_insert(Nq.lend, g) + local qid = Nq.id + if qid==id_jglyph or ((qid==id_pbox or Nq.id == id_pbox_w) and Nq.met) then + local g = get_OB_skip() or get_kanjiskip() -- O_B->K + handle_penalty_normal(Nq.post, 0, g); real_insert(0, g) elseif Nq.met then -- Nq.id==id_hlist local g = get_kanjiskip() -- K handle_penalty_suppress(0, 0, g); real_insert(0, g) @@ -801,25 +790,18 @@ end local function handle_list_tail(mode) adjust_nq(); Np = Nq if mode then - -- the current list is to be line-breaked: - if Np.id == id_jglyph or (Np.id==id_pbox and Np.met) then - if Np.lend~=0 then - g = node_new(id_kern); g.subtype = 0; g.kern = Np.lend - --copy_attr(g, Np.nuc); - set_attr(g, attr_icflag, BOXBDD) - node.insert_after(head, Np.last, g) - end - end + -- the current list is to be line-breaked. -- Insert \jcharwidowpenalty - Bp = widow_Bp; Np = widow_Np; Nq.lend = 0 + Bp = widow_Bp; Np = widow_Np if Np.first then handle_penalty_normal(0, ltjs_fast_get_penalty_table('jwp', 0) or 0) end else -- the current list is the contents of a hbox - if Np.id == id_jglyph or (Np.id==id_pbox and Np.met) then - local g = new_jfm_glue(Np, Np.class, fast_find_char_class('boxbdd',Np.met)) + 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)) if g then set_attr(g, attr_icflag, BOXBDD) head = node.insert_after(head, Np.last, g) @@ -830,9 +812,10 @@ end -- リスト先頭の処理 local function handle_list_head(par_indented) - if Np.id == id_jglyph or (Np.id==id_pbox and Np.met) then + local npi, pm = Np.id, Np.met + if npi == id_jglyph or (npi==id_pbox and pm) then if not ihb_flag then - local g = new_jfm_glue(Np, fast_find_char_class(par_indented, Np.met), Np.class) + local g = new_jfm_glue(pm, fast_find_char_class(par_indented, pm), Np.class) if g then set_attr(g, attr_icflag, BOXBDD) if g.id==id_glue and #Bp==0 then @@ -849,30 +832,37 @@ end -- return value: (the initial cursor lp), (last node) local function init_var(mode) Bp, widow_Bp, widow_Np = {}, {}, {first = nil} - kanji_skip=skip_table_to_spec('kanjiskip') - get_kanjiskip = (kanji_skip.width == max_dimen) + + kanji_skip = node_new(id_glue) + kanji_skip.spec = skip_table_to_spec('kanjiskip') + set_attr(kanji_skip, attr_icflag, KANJI_SKIP) + get_kanjiskip = (kanji_skip.spec.width == max_dimen) and get_kanjiskip_jfm or get_kanjiskip_normal - xkanji_skip=skip_table_to_spec('xkanjiskip') - get_xkanjiskip = (xkanji_skip.width == max_dimen) + + xkanji_skip = node_new(id_glue) + xkanji_skip.spec = skip_table_to_spec('xkanjiskip') + set_attr(xkanji_skip, attr_icflag, XKANJI_SKIP) + get_xkanjiskip = (xkanji_skip.spec.width == max_dimen) and get_xkanjiskip_jfm or get_xkanjiskip_normal + Np = { auto_kspc=nil, auto_xspc=nil, char=nil, class=nil, - first=nil, id=nil, last=nil, lend=0, met=nil, nuc=nil, + first=nil, id=nil, last=nil, met=nil, nuc=nil, post=nil, pre=nil, xspc=nil, } Nq = { auto_kspc=nil, auto_xspc=nil, char=nil, class=nil, - first=nil, id=nil, last=nil, lend=0, met=nil, nuc=nil, + first=nil, id=nil, last=nil, met=nil, nuc=nil, post=nil, pre=nil, xspc=nil, } if mode then -- the current list is to be line-breaked: -- hbox from \parindent is skipped. - local lp, par_indented = head, 'boxbdd' - while lp and ((lp.id==id_whatsit and lp.subtype~=sid_user) - or ((lp.id==id_hlist) and (lp.subtype==3))) do - if (lp.id==id_hlist) and (lp.subtype==3) then par_indented = 'parbdd' end - lp=node_next(lp) end + local lp, par_indented, lpi, lps = head, 'boxbdd', head.id, head.subtype + while lp and ((lpi==id_whatsit and lps~=sid_user) + or ((lpi==id_hlist) and (lps==3))) do + if (lpi==id_hlist) and (lps==3) then par_indented = 'parbdd' end + lp=node_next(lp); lpi, lps = lp.id, lp.subtype end return lp, node.tail(head), par_indented else -- the current list is the contents of a hbox: @@ -919,11 +909,12 @@ function main(ahead, mode) lp = calc_np(lp, last) while Np do extract_np(); adjust_nq() + local pid, pm = Np.id, Np.met -- 挿入部 - if Np.id == id_jglyph then + if pid == id_jglyph then handle_np_jachar(mode) - elseif Np.met then - if Np.id==id_hlist then handle_np_ja_hlist() + elseif pm then + if pid==id_hlist then handle_np_ja_hlist() else handle_np_jachar() end elseif Nq.met then if Nq.id==id_hlist then handle_nq_ja_hlist() @@ -965,6 +956,8 @@ local function whatsit_callback(Np, lp, Nq) return Np end end + + local function whatsit_after_callback(s, Nq, Np) if not s and Nq.nuc.user_id == 30114 then local x, y = node.prev(Nq.nuc), Nq.nuc diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua index e15563a0cef..c360a6e80dd 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua @@ -24,8 +24,9 @@ local id_kern = node.id('kern') local id_glue_spec = node.id('glue_spec') local id_glue = node.id('glue') local cat_lp = luatexbase.catcodetables['latex-package'] -local ITALIC = 1 -local FROM_JFM = 4 +local ITALIC = luatexja.icflag_table.ITALIC +local FROM_JFM = luatexja.icflag_table.FROM_JFM + ------------------------------------------------------------------------ -- LOADING JFM ------------------------------------------------------------------------ @@ -74,6 +75,9 @@ 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 not (type(v.width)=='number' or v.width~='prop') then defjfm_res= nil; return @@ -93,9 +97,6 @@ function define_jfm(t) if type(v.down)~='number' then v.down = 0.0 end - if type(v.align)~='string' then - v.align = 'left' - end end end v.chars = nil @@ -105,6 +106,13 @@ function define_jfm(t) for j in pairs(v.glue) do if v.kern[j] then defjfm_res= nil; return end end + for j,x in pairs(v.kern) do + if type(x)=='number' then + v.kern[j] = {x, 0} + elseif type(x)=='table' then + v.kern[j] = {x[1], x[2] or 0} + end + end t.char_type[i] = v t[i] = nil end @@ -139,10 +147,15 @@ local function update_jfm_cache(j,sz) for i,v in pairs(t.char_type) do if type(i) == 'number' then -- char_type for k,w in pairs(v.glue) do - local g, h = node.new(id_glue), node_new(id_glue_spec); v.glue[k] = g + local g, h = node.new(id_glue), node_new(id_glue_spec) + v.glue[k] = {g, (w[5] and w[5]/sz or 0)} h.width, h.stretch, h.shrink = w[1], w[2], w[3] h.stretch_order, h.shrink_order = 0, 0 - g.subtype = 0; g.spec = h; set_attr(g, attr_icflag, FROM_JFM); + g.subtype = 0; g.spec = h; set_attr(g, attr_icflag, FROM_JFM + + (w[4] and w[4]/sz or 0)); + end + for k,w in pairs(v.kern) do + w[2] = w[2]/sz end end end diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.lua Binary files differnew file mode 100644 index 00000000000..c22760e5b9f --- /dev/null +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-kinsoku.lua diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty index 3cb52389e14..84901b0bf37 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty @@ -38,14 +38,19 @@ \usepackage{lltjcore} %%% default parameters +\directlua{ + luatexja.stack.charprop_stack_table[0] + = dofile(assert(kpse.find_file('ltj-kinsoku.lua', 'tex'), + "File `ltj-kinsoku.lua' not found")) +} + \ltjsetparameter{kanjiskip=0pt plus 0.4pt minus 0.4pt, xkanjiskip=.25\zw plus 1pt minus 1pt, autospacing, autoxspacing, jacharrange={-1}, yalbaselineshift=0pt, yjabaselineshift=0pt, - jcharwidowpenalty=500, differentjfm=average + jcharwidowpenalty=500, differentjfm=paverage } -\input luatexja-kinsoku.tex \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax %%% patch for packages diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua index fd77dc450d7..793d6586aa0 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-math.lua @@ -41,7 +41,7 @@ local id_frac = node.id('fraction') local id_simple = node.id('noad') local id_sub_mlist = node.id('sub_mlist') -local PROCESSED = 8 +local PROCESSED = 11 local ltjf_font_metric_table = ltjf.font_metric_table local ltjf_find_char_class = ltjf.find_char_class diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty index d09d05be2bd..30012f30fd3 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty @@ -32,16 +32,20 @@ \let\mc=\tenmin \let\gt=\tengt \mc + +\directlua{ + luatexja.stack.charprop_stack_table[0] + = dofile(assert(kpse.find_file('ltj-kinsoku.lua', 'tex'), + "File `ltj-kinsoku.lua' not found")) +} + \ltjsetparameter{kanjiskip=0pt plus 0.4pt minus 0.4pt, xkanjiskip=.25\zw plus 1pt minus 1pt, autospacing, autoxspacing, jacharrange={-1}, yalbaselineshift=0pt, yjabaselineshift=0pt, - jcharwidowpenalty=500, differentjfm=average + jcharwidowpenalty=500, differentjfm=paverage } -\input luatexja-kinsoku.tex - - \ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF} \ltjdefcharrange{2}{"370-"4FF, "1F00-"1FFF} \ltjdefcharrange{3}{% diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua index 18a1df06e78..d0ea84da1be 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua @@ -45,16 +45,17 @@ local function suppress_hyphenate_ja(head) local non_math, p = true, head wt = {} while p do - if p.id == id_glyph then + local pid = p.id + if pid == id_glyph then if (has_attr(p, attr_icflag) or 0)<=0 and ltjc_is_ucs_in_japanese_char(p) then p.font = has_attr(p, attr_curjfnt) or p.font p.subtype = floor(p.subtype*0.5)*2 set_attr(p, attr_orig_char, p.char) end - elseif p.id == id_math then + elseif pid == id_math then p = node_next(p) -- skip math on while p and p.id~=id_math do p = node_next(p) end - elseif p.id == id_whatsit and p.subtype==sid_user and p.user_id==30112 then + elseif pid == id_whatsit and p.subtype==sid_user and p.user_id==30112 then wt[#wt+1] = p; head = node_remove(head, p) end p = node_next(p) diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua index 57db242c19f..5b3ad291521 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua @@ -40,15 +40,15 @@ local attr_icflag = luatexbase.attributes['ltj@icflag'] local ltjf_font_metric_table = ltjf.font_metric_table local PACKED = 2 -local PROCESSED = 8 -local IC_PROCESSED = 9 -local PROCESSED_BEGIN_FLAG = 16 +local PROCESSED = 11 +local IC_PROCESSED = 12 +local PROCESSED_BEGIN_FLAG = 32 do local floor = math.floor function get_pr_begin_flag(p) - return floor((has_attr(p, attr_icflag) or 0) - /PROCESSED_BEGIN_FLAG)*PROCESSED_BEGIN_FLAG + local i = has_attr(p, attr_icflag) or 0 + return i - i%PROCESSED_BEGIN_FLAG end end local get_pr_begin_flag = get_pr_begin_flag @@ -66,24 +66,26 @@ local fshift = { down = 0, left = 0} function capsule_glyph(p, dir, mode, met, class) local char_data = met.size_cache.char_type[class] if not char_data then return node_next(p) end - local fwidth = (char_data.width ~= 'prop') and char_data.width or p.width + local fwidth, pwidth = char_data.width, p.width + fwidth = (fwidth ~= 'prop') and fwidth or pwidth local fheight, fdepth = char_data.height, char_data.depth fshift.down = char_data.down; fshift.left = char_data.left fshift = luatexbase.call_callback("luatexja.set_width", fshift, met, class) - if (mode or p.width ~= fwidth or p.height ~= fheight or p.depth ~= fdepth) then - local y_shift, total = - p.yoffset + (has_attr(p,attr_ykblshift) or 0), fwidth - p.width + if (mode or pwidth ~= fwidth or p.height ~= fheight or p.depth ~= fdepth) then + local y_shift, ca + = - p.yoffset + (has_attr(p,attr_ykblshift) or 0), char_data.align local q; head, q = node.remove(head, p) p.yoffset, p.next = -fshift.down, nil - if total ~= 0 and char_data.align~='left' then + if total ~= 0 and ca~='left' then p.xoffset = p.xoffset - fshift.left - + (((char_data.align=='right') and total) or round(total*0.5)) + + (((ca=='right') and fwidth - pwidth) or round((fwidth - pwidth)*0.5)) else p.xoffset = p.xoffset - fshift.left end local box = node_new(id_hlist); box.width, box.height, box.depth = fwidth, fheight, fdepth box.head, box.shift, box.dir = p, y_shift, (dir or 'TLT') - box.glue_set, box.glue_order = 0, 0 + --box.glue_set, box.glue_order = 0, 0 not needed set_attr(box, attr_icflag, PACKED + get_pr_begin_flag(p)) head = q and node_insert_before(head, q, box) or node_insert_after(head, node_tail(head), box) @@ -102,8 +104,9 @@ function set_ja_width(ahead, dir) while p do if (p.id==id_glyph) and ((has_attr(p, attr_icflag) or 0)%PROCESSED_BEGIN_FLAG)<=0 then - if p.font == has_attr(p, attr_curjfnt) then - p = capsule_glyph(p, dir, false, ltjf_font_metric_table[p.font], + local pf = p.font + if pf == has_attr(p, attr_curjfnt) then + p = capsule_glyph(p, dir, false, ltjf_font_metric_table[pf], has_attr(p, attr_jchar_class)) else set_attr(p, attr_icflag, PROCESSED + get_pr_begin_flag(p)) diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua index c7f52c93fb6..de985d59175 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua @@ -17,7 +17,9 @@ local id_whatsit = node.id('whatsit') local sid_user = node.subtype('user_defined') local hmode = 118 -- in luatexref-t.pdf, this must be 127 -local charprop_stack_table={}; charprop_stack_table[0]={} +charprop_stack_table={}; +local charprop_stack_table = charprop_stack_table +charprop_stack_table[0]={} -- modified from table.fastcopy local next = next @@ -96,14 +98,14 @@ function set_stack_table(g,m,c,p,lb,ub) "(-1 is used for denoting `math boundary')\n" .. 'So I changed this one to zero.') c=0 - elseif not charprop_stack_table[i][m] then - charprop_stack_table[i][m] = {} + elseif not charprop_stack_table[i][c] then + charprop_stack_table[i][c] = {} end - charprop_stack_table[i][m][c] = p + charprop_stack_table[i][c][m] = p if g=='global' then for j,v in pairs(charprop_stack_table) do - if not charprop_stack_table[j][m] then charprop_stack_table[j][m] = {} end - charprop_stack_table[j][m][c] = p + if not charprop_stack_table[j][c] then charprop_stack_table[j][c] = {} end + charprop_stack_table[j][c][m] = p end end end @@ -117,14 +119,14 @@ function set_stack_font(g,m,c,p) "The family number should in the range 0 .. 255.\n" .. "I'm going to use 0 instead of that illegal family number.") c=0 - elseif not charprop_stack_table[i][m] then - charprop_stack_table[i][m] = {} + elseif not charprop_stack_table[i][c] then + charprop_stack_table[i][c] = {} end - charprop_stack_table[i][m][c] = p + charprop_stack_table[i][c][m] = p if g=='global' then for j,v in pairs(charprop_stack_table) do - if not charprop_stack_table[j][m] then charprop_stack_table[j][m] = {} end - charprop_stack_table[j][m][c] = p + if not charprop_stack_table[j][c] then charprop_stack_table[j][c] = {} end + charprop_stack_table[j][c][m] = p end end end @@ -163,8 +165,13 @@ function fast_get_skip_table(m) or { width = 0, stretch = 0, shrink = 0, stretch_order = 0, shrink_order = 0 } end function fast_get_penalty_table(m,c) - local i = table_current_stack[m] - return (i and i[c]) + local i = table_current_stack[c] + return (i and i[m]) +end + +local empty_table = {} +function fast_get_penalty_table_parent(c) + return table_current_stack[c] or empty_table end -- For other situations, use the following instead: @@ -173,8 +180,8 @@ function get_skip_table(m, idx) or { width = 0, stretch = 0, shrink = 0, stretch_order = 0, shrink_order = 0 } end function get_penalty_table(m,c,d, idx) - local i = charprop_stack_table[idx][m] - return (i and i[c]) or d + local i = charprop_stack_table[idx][c] + return (i and i[m]) or d end diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty index 53ef07766c2..ea54c3e5e9e 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty @@ -132,16 +132,16 @@ \def\ltj@defdimen{0} %%%%%%%% Attributes for Japanese typesetting. +\newluatexattribute\ltj@icflag % attribute for italic correction \newluatexattribute\ltj@curjfnt % index for ``current Japanese font'' -\newluatexattribute\jfam % index for current jfam -\newluatexattribute\ltj@charclass % \newluatexattribute\ltj@origchar % -\newluatexattribute\ltj@yablshift % attribute for \yabaselineshift -\newluatexattribute\ltj@ykblshift % attribute for \ykbaselineshift +\newluatexattribute\ltj@charclass % \newluatexattribute\ltj@autospc % attribute for autospacing \newluatexattribute\ltj@autoxspc % attribute for autoxspacing -\newluatexattribute\ltj@icflag % attribute for italic correction -\ltj@icflag=0 \ltj@origchar=0 +\newluatexattribute\ltj@yablshift % attribute for \yabaselineshift +\newluatexattribute\ltj@ykblshift % attribute for \ykbaselineshift +\newluatexattribute\jfam % index for current jfam +\ltj@icflag=0\ltj@origchar=0 %%%%%%%% Attributes for character ranges \newcount\ltj@tempcnta @@ -341,19 +341,22 @@ \define@key[ltj]{japaram}{jcharwidowpenalty}{% %COUNT \ltj@@set@stack0,#1:{jwp}{-10000}{10000}} -% differentjfm = { large | small | average | both } +% differentjfm = { large | small | average | pleft | pright | paverage | both} \define@choicekey*+[ltj]{japaram}{differentjfm}[\ltj@temp\ltj@tempr]% - {large,small,average,both}{% + {large,small,average,pleft,pright,paverage,both}{% \ifcase\ltj@tempr \directlua{luatexja.jfmglue.diffmet_rule = math.max}\or \directlua{luatexja.jfmglue.diffmet_rule = math.min}\or \directlua{luatexja.jfmglue.diffmet_rule = math.two_average}\or + \directlua{luatexja.jfmglue.diffmet_rule = math.two_pleft}\or + \directlua{luatexja.jfmglue.diffmet_rule = math.two_pright}\or + \directlua{luatexja.jfmglue.diffmet_rule = math.two_paverage}\or \directlua{luatexja.jfmglue.diffmet_rule = math.two_add} \fi }{\ltj@PackageError{luatexja}{invalid argument `#1' for `differentjfm'}{% Argument for `differentjfm' must be one of `large', `small', `average',^^J% - and `both'. }} - % large, small, average, both + `pleft', `pright', 'paverage' or `both'. }} + % large, small, average, pleft, pright, paverage, both % jacharrange = { +-<range_number> } diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-kinsoku.tex b/Master/texmf-dist/tex/luatex/luatexja/luatexja-kinsoku.tex deleted file mode 100644 index bd75dca8375..00000000000 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-kinsoku.tex +++ /dev/null @@ -1,454 +0,0 @@ -\ltj@tempcnta="0%" -\loop\ifnum\ltj@tempcnta<"100%" - \ltjsetparameter{alxspmode={\ltj@tempcnta,0}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta=`\0%" -\loop\ifnum\ltj@tempcnta<`\:%" - \ltjsetparameter{alxspmode={\ltj@tempcnta,3}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta=`\A%" -\loop\ifnum\ltj@tempcnta<`\[%" - \ltjsetparameter{alxspmode={\ltj@tempcnta,3}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta=`\a%" -\loop\ifnum\ltj@tempcnta<`\{%" - \ltjsetparameter{alxspmode={\ltj@tempcnta,3}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta="2000%" General Punctuation -\loop\ifnum\ltj@tempcnta<"2070%" - \ltjsetparameter{kcatcode={\ltj@tempcnta,1}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta="2500%" 罫線 -\loop\ifnum\ltj@tempcnta<"2580%" - \ltjsetparameter{alxspmode={\ltj@tempcnta,0}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta="3000%" CJK Symbols and Punctuation -\loop\ifnum\ltj@tempcnta<"3040%" - \ltjsetparameter{kcatcode={\ltj@tempcnta,1}}% - \advance\ltj@tempcnta by1 -\repeat - -\ltj@tempcnta="FF00%" 半角・全角形 -\loop\ifnum\ltj@tempcnta<"FFF0%" - \ltjsetparameter{kcatcode={\ltj@tempcnta,1}}% - \advance\ltj@tempcnta by1 -\repeat - -% -% 行頭、行末禁則パラメータ -% -% 1byte characters -\ltjsetparameter{prebreakpenalty={`!,10000}} -\ltjsetparameter{prebreakpenalty={`",10000}} -\ltjsetparameter{postbreakpenalty={`\#,500}} -\ltjsetparameter{postbreakpenalty={`\$,500}} -\ltjsetparameter{postbreakpenalty={`\%,500}} -\ltjsetparameter{postbreakpenalty={`\&,500}} -\ltjsetparameter{postbreakpenalty={`\`,10000}} -\ltjsetparameter{prebreakpenalty={`',10000}} -\ltjsetparameter{prebreakpenalty={`),10000}} -\ltjsetparameter{postbreakpenalty={`(,10000}} -\ltjsetparameter{prebreakpenalty={`*,500}} -\ltjsetparameter{prebreakpenalty={`+,500}} -\ltjsetparameter{prebreakpenalty={`-,10000}} -\ltjsetparameter{prebreakpenalty={`.,10000}} -\ltjsetparameter{prebreakpenalty={47,10000}} -\ltjsetparameter{prebreakpenalty={`/,500}} -\ltjsetparameter{prebreakpenalty={`;,10000}} -\ltjsetparameter{prebreakpenalty={`?,10000}} -\ltjsetparameter{prebreakpenalty={`:,10000}} -\ltjsetparameter{prebreakpenalty={`],10000}} -\ltjsetparameter{postbreakpenalty={`[,10000}} -%全角文字 -\ltjsetparameter{prebreakpenalty={`、,10000}} -\ltjsetparameter{prebreakpenalty={`。,10000}} -\ltjsetparameter{prebreakpenalty={`,,10000}} -\ltjsetparameter{prebreakpenalty={`.,10000}} -\ltjsetparameter{prebreakpenalty={`・,10000}} -\ltjsetparameter{prebreakpenalty={`:,10000}} -\ltjsetparameter{prebreakpenalty={`;,10000}} -\ltjsetparameter{prebreakpenalty={`?,10000}} -\ltjsetparameter{prebreakpenalty={`!,10000}} -\ltjsetparameter{prebreakpenalty={`゛,10000}}%\jis"212B -\ltjsetparameter{prebreakpenalty={`゜,10000}}%\jis"212C -\ltjsetparameter{prebreakpenalty={`´,10000}}%\jis"212D -\ltjsetparameter{postbreakpenalty={``,10000}}%\jis"212E -\ltjsetparameter{prebreakpenalty={`々,10000}}%\jis"2139 -\ltjsetparameter{prebreakpenalty={`…,250}}%\jis"2144 -\ltjsetparameter{prebreakpenalty={`‥,250}}%\jis"2145 -\ltjsetparameter{postbreakpenalty={`‘,10000}}%\jis"2146 -\ltjsetparameter{prebreakpenalty={`’,10000}}%\jis"2147 -\ltjsetparameter{postbreakpenalty={`“,10000}}%\jis"2148 -\ltjsetparameter{prebreakpenalty={`”,10000}}%\jis"2149 -\ltjsetparameter{prebreakpenalty={`),10000}} -\ltjsetparameter{postbreakpenalty={`(,10000}} -\ltjsetparameter{prebreakpenalty={`},10000}} -\ltjsetparameter{postbreakpenalty={`{,10000}} -\ltjsetparameter{prebreakpenalty={`],10000}} -\ltjsetparameter{postbreakpenalty={`[,10000}} -%\ltjsetparameter{postbreakpenalty={`‘,10000}} -%\ltjsetparameter{prebreakpenalty={`’,10000}} -\ltjsetparameter{postbreakpenalty={`〔,10000}}%\jis"214C -\ltjsetparameter{prebreakpenalty={`〕,10000}}%\jis"214D -\ltjsetparameter{postbreakpenalty={`〈,10000}}%\jis"2152 -\ltjsetparameter{prebreakpenalty={`〉,10000}}%\jis"2153 -\ltjsetparameter{postbreakpenalty={`《,10000}}%\jis"2154 -\ltjsetparameter{prebreakpenalty={`》,10000}}%\jis"2155 -\ltjsetparameter{postbreakpenalty={`「,10000}}%\jis"2156 -\ltjsetparameter{prebreakpenalty={`」,10000}}%\jis"2157 -\ltjsetparameter{postbreakpenalty={`『,10000}}%\jis"2158 -\ltjsetparameter{prebreakpenalty={`』,10000}}%\jis"2159 -\ltjsetparameter{postbreakpenalty={`【,10000}}%\jis"215A -\ltjsetparameter{prebreakpenalty={`】,10000}}%\jis"215B -\ltjsetparameter{prebreakpenalty={`ー,10000}} -\ltjsetparameter{prebreakpenalty={`+,200}} -\ltjsetparameter{prebreakpenalty={`−,200}}% U+2212 MINUS SIGN -\ltjsetparameter{prebreakpenalty={`-,200}}% U+FF0D FULLWIDTH HYPHEN-MINUS -\ltjsetparameter{prebreakpenalty={`=,200}} -\ltjsetparameter{postbreakpenalty={`#,200}} -\ltjsetparameter{postbreakpenalty={`$,200}} -\ltjsetparameter{postbreakpenalty={`%,200}} -\ltjsetparameter{postbreakpenalty={`&,200}} -\ltjsetparameter{prebreakpenalty={`ぁ,150}} -\ltjsetparameter{prebreakpenalty={`ぃ,150}} -\ltjsetparameter{prebreakpenalty={`ぅ,150}} -\ltjsetparameter{prebreakpenalty={`ぇ,150}} -\ltjsetparameter{prebreakpenalty={`ぉ,150}} -\ltjsetparameter{prebreakpenalty={`っ,150}} -\ltjsetparameter{prebreakpenalty={`ゃ,150}} -\ltjsetparameter{prebreakpenalty={`ゅ,150}} -\ltjsetparameter{prebreakpenalty={`ょ,150}} -\ltjsetparameter{prebreakpenalty={`ゎ,150}}%\jis"246E -\ltjsetparameter{prebreakpenalty={`ァ,150}} -\ltjsetparameter{prebreakpenalty={`ィ,150}} -\ltjsetparameter{prebreakpenalty={`ゥ,150}} -\ltjsetparameter{prebreakpenalty={`ェ,150}} -\ltjsetparameter{prebreakpenalty={`ォ,150}} -\ltjsetparameter{prebreakpenalty={`ッ,150}} -\ltjsetparameter{prebreakpenalty={`ャ,150}} -\ltjsetparameter{prebreakpenalty={`ュ,150}} -\ltjsetparameter{prebreakpenalty={`ョ,150}} -\ltjsetparameter{prebreakpenalty={`ヮ,150}}%\jis"256E -\ltjsetparameter{prebreakpenalty={`ヵ,150}}%\jis"2575 -\ltjsetparameter{prebreakpenalty={`ヶ,150}}%\jis"2576 -% kinsoku JIS X 0208 additional -\ltjsetparameter{prebreakpenalty={`ヽ,10000}} -\ltjsetparameter{prebreakpenalty={`ヾ,10000}} -\ltjsetparameter{prebreakpenalty={`ゝ,10000}} -\ltjsetparameter{prebreakpenalty={`ゞ,10000}} - -% -% kinsoku JIS X 0213 -% -\ltjsetparameter{prebreakpenalty={`〳,10000}} -\ltjsetparameter{prebreakpenalty={`〴,10000}} -\ltjsetparameter{prebreakpenalty={`〵,10000}} -\ltjsetparameter{prebreakpenalty={`〻,10000}} -\ltjsetparameter{postbreakpenalty={`⦅,10000}} -\ltjsetparameter{prebreakpenalty={`⦆,10000}} -\ltjsetparameter{postbreakpenalty={`⦅,10000}} -\ltjsetparameter{prebreakpenalty={`⦆,10000}} -\ltjsetparameter{postbreakpenalty={`〘,10000}} -\ltjsetparameter{prebreakpenalty={`〙,10000}} -\ltjsetparameter{postbreakpenalty={`〖,10000}} -\ltjsetparameter{prebreakpenalty={`〗,10000}} -\ltjsetparameter{postbreakpenalty={`«,10000}} -\ltjsetparameter{prebreakpenalty={`»,10000}} -\ltjsetparameter{postbreakpenalty={`〝,10000}} -\ltjsetparameter{prebreakpenalty={`〟,10000}} -\ltjsetparameter{prebreakpenalty={`‼,10000}} -\ltjsetparameter{prebreakpenalty={`⁇,10000}} -\ltjsetparameter{prebreakpenalty={`⁈,10000}} -\ltjsetparameter{prebreakpenalty={`⁉,10000}} -\ltjsetparameter{postbreakpenalty={`¡,10000}} -\ltjsetparameter{postbreakpenalty={`¿,10000}} -\ltjsetparameter{prebreakpenalty={`ː,10000}} -\ltjsetparameter{prebreakpenalty={`ª,10000}} -\ltjsetparameter{prebreakpenalty={`º,10000}} -\ltjsetparameter{prebreakpenalty={`¹,10000}} -\ltjsetparameter{prebreakpenalty={`²,10000}} -\ltjsetparameter{prebreakpenalty={`³,10000}} -\ltjsetparameter{postbreakpenalty={`€,10000}} -\ltjsetparameter{prebreakpenalty={`ゕ,150}} -\ltjsetparameter{prebreakpenalty={`ゖ,150}} -\ltjsetparameter{prebreakpenalty={`ㇰ,150}} -\ltjsetparameter{prebreakpenalty={`ㇱ,150}} -\ltjsetparameter{prebreakpenalty={`ㇲ,150}} -\ltjsetparameter{prebreakpenalty={`ㇳ,150}} -\ltjsetparameter{prebreakpenalty={`ㇴ,150}} -\ltjsetparameter{prebreakpenalty={`ㇵ,150}} -\ltjsetparameter{prebreakpenalty={`ㇶ,150}} -\ltjsetparameter{prebreakpenalty={`ㇷ,150}} -\ltjsetparameter{prebreakpenalty={`ㇸ,150}} -\ltjsetparameter{prebreakpenalty={`ㇹ,150}} -%\ltjsetparameter{prebreakpenalty={`ㇷ゚,150}} -\ltjsetparameter{prebreakpenalty={`ㇺ,150}} -\ltjsetparameter{prebreakpenalty={`ㇻ,150}} -\ltjsetparameter{prebreakpenalty={`ㇼ,150}} -\ltjsetparameter{prebreakpenalty={`ㇽ,150}} -\ltjsetparameter{prebreakpenalty={`ㇾ,150}} -\ltjsetparameter{prebreakpenalty={`ㇿ,150}} -% -% kinsoku JIS X 0212 -% -%\ltjsetparameter{postbreakpenalty={`¡,10000}} -%\ltjsetparameter{postbreakpenalty={`¿,10000}} -%\ltjsetparameter{prebreakpenalty={`º,10000}} -%\ltjsetparameter{prebreakpenalty={`ª,10000}} -\ltjsetparameter{prebreakpenalty={`™,10000}} -% -% kinsoku 半角片仮名 -% -\ltjsetparameter{prebreakpenalty={`。,10000}} -\ltjsetparameter{prebreakpenalty={`、,10000}} -\ltjsetparameter{prebreakpenalty={`゙,10000}} -\ltjsetparameter{prebreakpenalty={`゚,10000}} -\ltjsetparameter{prebreakpenalty={`」,10000}} -\ltjsetparameter{postbreakpenalty={`「,10000}} -% -% xspcode -\ltjsetparameter{alxspmode={`(,preonly}} -\ltjsetparameter{alxspmode={`),postonly}} -\ltjsetparameter{alxspmode={`[,preonly}} -\ltjsetparameter{alxspmode={`],postonly}} -\ltjsetparameter{alxspmode={``,preonly}} -\ltjsetparameter{alxspmode={`',postonly}} -\ltjsetparameter{alxspmode={`;,postonly}} -\ltjsetparameter{alxspmode={44,postonly}} -\ltjsetparameter{alxspmode={`.,postonly}} -% for 8bit Latin -\ltjsetparameter{alxspmode={"80,allow}} -\ltjsetparameter{alxspmode={"81,allow}} -\ltjsetparameter{alxspmode={"82,allow}} -\ltjsetparameter{alxspmode={"83,allow}} -\ltjsetparameter{alxspmode={"84,allow}} -\ltjsetparameter{alxspmode={"85,allow}} -\ltjsetparameter{alxspmode={"86,allow}} -\ltjsetparameter{alxspmode={"87,allow}} -\ltjsetparameter{alxspmode={"88,allow}} -\ltjsetparameter{alxspmode={"89,allow}} -\ltjsetparameter{alxspmode={"8A,allow}} -\ltjsetparameter{alxspmode={"8B,allow}} -\ltjsetparameter{alxspmode={"8C,allow}} -\ltjsetparameter{alxspmode={"8D,allow}} -\ltjsetparameter{alxspmode={"8E,allow}} -\ltjsetparameter{alxspmode={"8F,allow}} -\ltjsetparameter{alxspmode={"90,allow}} -\ltjsetparameter{alxspmode={"91,allow}} -\ltjsetparameter{alxspmode={"92,allow}} -\ltjsetparameter{alxspmode={"93,allow}} -\ltjsetparameter{alxspmode={"94,allow}} -\ltjsetparameter{alxspmode={"95,allow}} -\ltjsetparameter{alxspmode={"96,allow}} -\ltjsetparameter{alxspmode={"97,allow}} -\ltjsetparameter{alxspmode={"98,allow}} -\ltjsetparameter{alxspmode={"99,allow}} -\ltjsetparameter{alxspmode={"9A,allow}} -\ltjsetparameter{alxspmode={"9B,allow}} -\ltjsetparameter{alxspmode={"9C,allow}} -\ltjsetparameter{alxspmode={"9D,allow}} -\ltjsetparameter{alxspmode={"9E,allow}} -\ltjsetparameter{alxspmode={"9F,allow}} -\ltjsetparameter{alxspmode={"A0,allow}} -\ltjsetparameter{alxspmode={"A1,allow}} -\ltjsetparameter{alxspmode={"A2,allow}} -\ltjsetparameter{alxspmode={"A3,allow}} -\ltjsetparameter{alxspmode={"A4,allow}} -\ltjsetparameter{alxspmode={"A5,allow}} -\ltjsetparameter{alxspmode={"A6,allow}} -\ltjsetparameter{alxspmode={"A7,allow}} -\ltjsetparameter{alxspmode={"A8,allow}} -\ltjsetparameter{alxspmode={"A9,allow}} -\ltjsetparameter{alxspmode={"AA,allow}} -\ltjsetparameter{alxspmode={"AB,allow}} -\ltjsetparameter{alxspmode={"AC,allow}} -\ltjsetparameter{alxspmode={"AD,allow}} -\ltjsetparameter{alxspmode={"AE,allow}} -\ltjsetparameter{alxspmode={"AF,allow}} -\ltjsetparameter{alxspmode={"B0,allow}} -\ltjsetparameter{alxspmode={"B1,allow}} -\ltjsetparameter{alxspmode={"B2,allow}} -\ltjsetparameter{alxspmode={"B3,allow}} -\ltjsetparameter{alxspmode={"B4,allow}} -\ltjsetparameter{alxspmode={"B5,allow}} -\ltjsetparameter{alxspmode={"B6,allow}} -\ltjsetparameter{alxspmode={"B7,allow}} -\ltjsetparameter{alxspmode={"B8,allow}} -\ltjsetparameter{alxspmode={"B9,allow}} -\ltjsetparameter{alxspmode={"BA,allow}} -\ltjsetparameter{alxspmode={"BB,allow}} -\ltjsetparameter{alxspmode={"BC,allow}} -\ltjsetparameter{alxspmode={"BD,allow}} -\ltjsetparameter{alxspmode={"BE,allow}} -\ltjsetparameter{alxspmode={"BF,allow}} -\ltjsetparameter{alxspmode={"C0,allow}} -\ltjsetparameter{alxspmode={"C1,allow}} -\ltjsetparameter{alxspmode={"C2,allow}} -\ltjsetparameter{alxspmode={"C3,allow}} -\ltjsetparameter{alxspmode={"C4,allow}} -\ltjsetparameter{alxspmode={"C5,allow}} -\ltjsetparameter{alxspmode={"C6,allow}} -\ltjsetparameter{alxspmode={"C7,allow}} -\ltjsetparameter{alxspmode={"C8,allow}} -\ltjsetparameter{alxspmode={"C9,allow}} -\ltjsetparameter{alxspmode={"CA,allow}} -\ltjsetparameter{alxspmode={"CB,allow}} -\ltjsetparameter{alxspmode={"CC,allow}} -\ltjsetparameter{alxspmode={"CD,allow}} -\ltjsetparameter{alxspmode={"CE,allow}} -\ltjsetparameter{alxspmode={"CF,allow}} -\ltjsetparameter{alxspmode={"D0,allow}} -\ltjsetparameter{alxspmode={"D1,allow}} -\ltjsetparameter{alxspmode={"D2,allow}} -\ltjsetparameter{alxspmode={"D3,allow}} -\ltjsetparameter{alxspmode={"D4,allow}} -\ltjsetparameter{alxspmode={"D5,allow}} -\ltjsetparameter{alxspmode={"D6,allow}} -\ltjsetparameter{alxspmode={"D7,allow}} -\ltjsetparameter{alxspmode={"D8,allow}} -\ltjsetparameter{alxspmode={"D9,allow}} -\ltjsetparameter{alxspmode={"DA,allow}} -\ltjsetparameter{alxspmode={"DB,allow}} -\ltjsetparameter{alxspmode={"DC,allow}} -\ltjsetparameter{alxspmode={"DD,allow}} -\ltjsetparameter{alxspmode={"DE,allow}} -\ltjsetparameter{alxspmode={"DF,allow}} -\ltjsetparameter{alxspmode={"E0,allow}} -\ltjsetparameter{alxspmode={"E1,allow}} -\ltjsetparameter{alxspmode={"E2,allow}} -\ltjsetparameter{alxspmode={"E3,allow}} -\ltjsetparameter{alxspmode={"E4,allow}} -\ltjsetparameter{alxspmode={"E5,allow}} -\ltjsetparameter{alxspmode={"E6,allow}} -\ltjsetparameter{alxspmode={"E7,allow}} -\ltjsetparameter{alxspmode={"E8,allow}} -\ltjsetparameter{alxspmode={"E9,allow}} -\ltjsetparameter{alxspmode={"EA,allow}} -\ltjsetparameter{alxspmode={"EB,allow}} -\ltjsetparameter{alxspmode={"EC,allow}} -\ltjsetparameter{alxspmode={"ED,allow}} -\ltjsetparameter{alxspmode={"EE,allow}} -\ltjsetparameter{alxspmode={"EF,allow}} -\ltjsetparameter{alxspmode={"F0,allow}} -\ltjsetparameter{alxspmode={"F1,allow}} -\ltjsetparameter{alxspmode={"F2,allow}} -\ltjsetparameter{alxspmode={"F3,allow}} -\ltjsetparameter{alxspmode={"F4,allow}} -\ltjsetparameter{alxspmode={"F5,allow}} -\ltjsetparameter{alxspmode={"F6,allow}} -\ltjsetparameter{alxspmode={"F7,allow}} -\ltjsetparameter{alxspmode={"F8,allow}} -\ltjsetparameter{alxspmode={"F9,allow}} -\ltjsetparameter{alxspmode={"FA,allow}} -\ltjsetparameter{alxspmode={"FB,allow}} -\ltjsetparameter{alxspmode={"FC,allow}} -\ltjsetparameter{alxspmode={"FD,allow}} -\ltjsetparameter{alxspmode={"FE,allow}} -\ltjsetparameter{alxspmode={"FF,allow}} -% -% inhibitxspcode -\ltjsetparameter{jaxspmode={`、,postonly}} -\ltjsetparameter{jaxspmode={`。,postonly}} -\ltjsetparameter{jaxspmode={`,,postonly}} -\ltjsetparameter{jaxspmode={`.,postonly}} -\ltjsetparameter{jaxspmode={`;,postonly}} -\ltjsetparameter{jaxspmode={`?,postonly}} -\ltjsetparameter{jaxspmode={`),postonly}} -\ltjsetparameter{jaxspmode={`(,preonly}} -\ltjsetparameter{jaxspmode={`],postonly}} -\ltjsetparameter{jaxspmode={`[,preonly}} -\ltjsetparameter{jaxspmode={`},postonly}} -\ltjsetparameter{jaxspmode={`{,preonly}} -\ltjsetparameter{jaxspmode={`‘,preonly}} -\ltjsetparameter{jaxspmode={`’,postonly}} -\ltjsetparameter{jaxspmode={`“,preonly}} -\ltjsetparameter{jaxspmode={`”,postonly}} -\ltjsetparameter{jaxspmode={`〔,preonly}} -\ltjsetparameter{jaxspmode={`〕,postonly}} -\ltjsetparameter{jaxspmode={`〈,preonly}} -\ltjsetparameter{jaxspmode={`〉,postonly}} -\ltjsetparameter{jaxspmode={`《,preonly}} -\ltjsetparameter{jaxspmode={`》,postonly}} -\ltjsetparameter{jaxspmode={`「,preonly}} -\ltjsetparameter{jaxspmode={`」,postonly}} -\ltjsetparameter{jaxspmode={`『,preonly}} -\ltjsetparameter{jaxspmode={`』,postonly}} -\ltjsetparameter{jaxspmode={`【,preonly}} -\ltjsetparameter{jaxspmode={`】,postonly}} -\ltjsetparameter{jaxspmode={`—,inhibit}}% U+2014 EM DASH -\ltjsetparameter{jaxspmode={`―,inhibit}}% U+2015 HORIZONTAL BAR -\ltjsetparameter{jaxspmode={`〜,inhibit}}% U+301C WAVE DASH -\ltjsetparameter{jaxspmode={`~,inhibit}}% U+FF5E FULLWIDTH TILDE -\ltjsetparameter{jaxspmode={`…,inhibit}} -\ltjsetparameter{jaxspmode={`¥,inhibit}}% U+00A5 YEN SIGN -\ltjsetparameter{jaxspmode={`¥,inhibit}}% U+FFE5 FULLWIDTH YEN SIGN -\ltjsetparameter{jaxspmode={`°,postonly}} -\ltjsetparameter{jaxspmode={`′,postonly}} -\ltjsetparameter{jaxspmode={`″,postonly}} -% -% inhibitxspcode JIS X 0213 -% -\ltjsetparameter{jaxspmode={`⦅,preonly}} -\ltjsetparameter{jaxspmode={`⦆,postonly}} -\ltjsetparameter{jaxspmode={`⦅,preonly}} -\ltjsetparameter{jaxspmode={`⦆,postonly}} -\ltjsetparameter{jaxspmode={`〘,preonly}} -\ltjsetparameter{jaxspmode={`〙,postonly}} -\ltjsetparameter{jaxspmode={`〖,preonly}} -\ltjsetparameter{jaxspmode={`〗,postonly}} -\ltjsetparameter{jaxspmode={`«,preonly}} -\ltjsetparameter{jaxspmode={`»,postonly}} -\ltjsetparameter{jaxspmode={`〝,preonly}} -\ltjsetparameter{jaxspmode={`〟,postonly}} -\ltjsetparameter{jaxspmode={`‼,postonly}} -\ltjsetparameter{jaxspmode={`⁇,postonly}} -\ltjsetparameter{jaxspmode={`⁈,postonly}} -\ltjsetparameter{jaxspmode={`⁉,postonly}} -\ltjsetparameter{jaxspmode={`¡,preonly}} -\ltjsetparameter{jaxspmode={`¿,preonly}} -\ltjsetparameter{jaxspmode={`ª,postonly}} -\ltjsetparameter{jaxspmode={`º,postonly}} -\ltjsetparameter{jaxspmode={`¹,postonly}} -\ltjsetparameter{jaxspmode={`²,postonly}} -\ltjsetparameter{jaxspmode={`³,postonly}} -\ltjsetparameter{jaxspmode={`€,preonly}} -% -% inhibitxspcode JIS X 0212 -% -%\ltjsetparameter{jaxspmode={`¡,postonly}} -%\ltjsetparameter{jaxspmode={`¿,postonly}} -%\ltjsetparameter{jaxspmode={`º,postonly}} -%\ltjsetparameter{jaxspmode={`ª,postonly}} -\ltjsetparameter{jaxspmode={`™,postonly}} -% -% inhibitxspcode 半角片仮名 -% -\ltjsetparameter{jaxspmode={`。,postonly}} -\ltjsetparameter{jaxspmode={`、,postonly}} -\ltjsetparameter{jaxspmode={`「,preonly}} -\ltjsetparameter{jaxspmode={`」,postonly}} - -\endinput -cat `locate ukinsoku.tex` \ - | sed "s/prebreakpenalty\(.*\)=\([0-9]*\)/ltjsetparameter{prebreakpenalty={\1,\2}}/" \ - | sed "s/postbreakpenalty\(.*\)=\([0-9]*\)/ltjsetparameter{postbreakpenalty={\1,\2}}/" \ - | sed "s/inhibitxspcode\(.*\)=0/ltjsetparameter{jaxspmode={\1,inhibit}}/" \ - | sed "s/inhibitxspcode\(.*\)=1/ltjsetparameter{jaxspmode={\1,postonly}}/" \ - | sed "s/inhibitxspcode\(.*\)=2/ltjsetparameter{jaxspmode={\1,preonly}}/" \ - | sed "s/inhibitxspcode\(.*\)=3/ltjsetparameter{jaxspmode={\1,allow}}/" \ - | sed "s/xspcode\(.*\)=0/ltjsetparameter{alxspmode={\1,inhibit}}/" \ - | sed "s/xspcode\(.*\)=2/ltjsetparameter{alxspmode={\1,postonly}}/" \ - | sed "s/xspcode\(.*\)=1/ltjsetparameter{alxspmode={\1,preonly}}/" \ - | sed "s/xspcode\(.*\)=3/ltjsetparameter{alxspmode={\1,allow}}/" > luatexja-kinsoku.tex
\ No newline at end of file diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua index 98b0ae7dc5d..adf741f1938 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua @@ -34,6 +34,22 @@ function luatexja.load_lua(fn) end end +local icflag_table = {} +luatexja.icflag_table = icflag_table +icflag_table.ITALIC = 1 +icflag_table.PACKED = 2 +icflag_table.KINSOKU = 3 +icflag_table.FROM_JFM = 6 +-- FROM_JFM: 4, 5, 6, 7, 8 →優先度高 +-- 6 が標準 +icflag_table.KANJI_SKIP = 9 +icflag_table.XKANJI_SKIP = 10 +icflag_table.PROCESSED = 11 +icflag_table.IC_PROCESSED = 12 +icflag_table.BOXBDD = 15 +icflag_table.PROCESSED_BEGIN_FLAG = 32 + + local load_module = luatexja.load_module load_module('base'); local ltjb = luatexja.base load_module('rmlgbm'); local ltjr = luatexja.rmlgbm -- must be 1st @@ -76,19 +92,6 @@ local attr_icflag = luatexbase.attributes['ltj@icflag'] local attr_uniqid = luatexbase.attributes['ltj@uniqid'] local cat_lp = luatexbase.catcodetables['latex-package'] -local ITALIC = 1 -local PACKED = 2 -local KINSOKU = 3 -local FROM_JFM = 4 -local LINE_END = 5 -local KANJI_SKIP = 6 -local XKANJI_SKIP = 7 -local PROCESSED = 8 -local IC_PROCESSED = 9 -local BOXBDD = 15 -local PROCESSED_BEGIN_FLAG = 16 - - -- Three aux. functions, bollowed from tex.web local unity=65536 local function print_scaled(s) @@ -180,14 +183,16 @@ function luatexja.ext_get_parameter_binary(k,c) c=0 end if k == 'jacharrange' then - if c<0 or c>216 then + if c>=7*ltjc.ATTR_RANGE then ltjb.package_error('luatexja', 'invalid character range number (' .. c .. ')', - 'A character range number should be in the range 0..216,\n'.. + 'A character range number should be in the range 0..' + .. 7+ATTR_RANGE-1 .. ",\n".. 'So I changed this one to zero.') c=0 end - tex.write(ltjc.get_range_setting(c)) + -- 負の値は <U+0080 の文字の文字範囲,として出てくる.この時はいつも欧文文字なので 1 を返す + tex.write( (c<0) and -1 or ltjc.get_range_setting(c)) else if c<0 or c>0x10FFFF then ltjb.package_error('luatexja', @@ -275,7 +280,7 @@ local function debug_show_node_X(p,print_fn) for i = 2, p.glue_order do s = s .. 'l' end end end - if get_attr_icflag(p) == PACKED then + if get_attr_icflag(p) == icflag_table.PACKED then s = s .. ' (packed)' end print_fn(s) @@ -287,11 +292,12 @@ local function debug_show_node_X(p,print_fn) debug_depth=k elseif pt == 'glue' then s = base .. ' ' .. print_spec(p.spec) - if get_attr_icflag(p)==FROM_JFM then - s = s .. ' (from JFM)' - elseif get_attr_icflag(p)==KANJI_SKIP then + if get_attr_icflag(p)>icflag_table.KINSOKU + and get_attr_icflag(p)<icflag_table.KANJI_SKIP then + s = s .. ' (from JFM: priority ' .. get_attr_icflag(p)-icflag_table.FROM_JFM .. ')' + elseif get_attr_icflag(p)==icflag_table.KANJI_SKIP then s = s .. ' (kanjiskip)' - elseif get_attr_icflag(p)==XKANJI_SKIP then + elseif get_attr_icflag(p)==icflag_table.XKANJI_SKIP then s = s .. ' (xkanjiskip)' end print_fn(s) @@ -299,19 +305,18 @@ local function debug_show_node_X(p,print_fn) s = base .. ' ' .. print_scaled(p.kern) .. 'pt' if p.subtype==2 then s = s .. ' (for accent)' - elseif get_attr_icflag(p)==IC_PROCESSED then + elseif get_attr_icflag(p)==icflag_table.IC_PROCESSED then s = s .. ' (italic correction)' -- elseif get_attr_icflag(p)==ITALIC then -- s = s .. ' (italic correction)' - elseif get_attr_icflag(p)==FROM_JFM then - s = s .. ' (from JFM)' - elseif get_attr_icflag(p)==LINE_END then - s = s .. " (from 'lineend' in JFM)" + elseif get_attr_icflag(p)>icflag_table.KINSOKU + and get_attr_icflag(p)<icflag_table.KANJI_SKIP then + s = s .. ' (from JFM: priority ' .. get_attr_icflag(p)-icflag_table.FROM_JFM .. ')' end print_fn(s) elseif pt == 'penalty' then s = base .. ' ' .. tostring(p.penalty) - if get_attr_icflag(p)==KINSOKU then + if get_attr_icflag(p)==icflag_table.KINSOKU then s = s .. ' (for kinsoku)' end print_fn(s) diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty index 46b7e87f9eb..c4224b4c6fb 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty @@ -35,7 +35,7 @@ \expandafter\let\csname ifltj@in@latex\expandafter\endcsname \csname iftrue\endcsname \NeedsTeXFormat{LaTeX2e} - \ProvidesPackage{luatexja}[2011/04/01 v0.1] + \ProvidesPackage{luatexja}[2012/04/20 v0.2] \fi %</LaTeX> \ifnum\catcode`漢=12 diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty index e0d8ee84b1a..936b6253b66 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty @@ -452,8 +452,8 @@ \edef\k@family{#1}% \else % search font definition file... \ifcsname kfam@list@\k@encoding\endcsname\else - \expandafter\gdef\csname kfam@list@\k@encoding\endcsname{} - \expandafter\gdef\csname notkfam@list@\k@encoding\endcsname{} + \expandafter\gdef\csname kfam@list@\k@encoding\endcsname{}% + \expandafter\gdef\csname notkfam@list@\k@encoding\endcsname{}% \fi \edef\@templist{\@nameuse{kfam@list@\k@encoding}}% \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% @@ -478,8 +478,8 @@ \edef\f@family{#1}% \else % search font definition file... \ifcsname ffam@list@\f@encoding\endcsname\else - \expandafter\gdef\csname ffam@list@\f@encoding\endcsname{} - \expandafter\gdef\csname notffam@list@\f@encoding\endcsname{} + \expandafter\gdef\csname ffam@list@\f@encoding\endcsname{}% + \expandafter\gdef\csname notffam@list@\f@encoding\endcsname{}% \fi \edef\@templist{\@nameuse{ffam@list@\f@encoding}}% \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% @@ -519,7 +519,7 @@ \def\useroman#1#2#3#4{% \romanencoding{#1}\romanfamily{#2}\romanseries{#3}\romanshape{#4}% \selectfont\ignorespaces} -\def\usefont#1#2#3#4{% +\protected\def\usefont#1#2#3#4{% \edef\tmp@item{{#1}}% \expandafter\expandafter\expandafter \inlist@\expandafter\tmp@item\expandafter{\kenc@list}% diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings-jpt.tex b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings-jpt.tex deleted file mode 100644 index 505ea3882aa..00000000000 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings-jpt.tex +++ /dev/null @@ -1,1041 +0,0 @@ -% This file is automatically generated by ltjlist.lua. -\message{BMP} -\ltj@@listing@jpset{8192}{8319} -\ltj@@listing@jpset{8320}{8447} -\ltj@@listing@jpset{8448}{8575} -\ltj@@listing@jpset{8576}{8703} -\ltj@@listing@jpset{8704}{8831} -\ltj@@listing@jpset{8832}{8959} -\ltj@@listing@jpset{8960}{9087} -\ltj@@listing@jpset{9088}{9215} -\ltj@@listing@jpset{9216}{9343} -\ltj@@listing@jpset{9344}{9471} -\ltj@@listing@jpset{9472}{9599} -\ltj@@listing@jpset{9600}{9727} -\ltj@@listing@jpset{9728}{9855} -\ltj@@listing@jpset{9856}{9983} -\ltj@@listing@jpset{9984}{10111} -\ltj@@listing@jpset{10112}{10239} -\ltj@@listing@jpset{10240}{10367} -\ltj@@listing@jpset{10368}{10495} -\ltj@@listing@jpset{10496}{10623} -\ltj@@listing@jpset{10624}{10751} -\ltj@@listing@jpset{10752}{10879} -\ltj@@listing@jpset{10880}{11007} -\ltj@@listing@jpset{11008}{11135} -\ltj@@listing@jpset{11136}{11263} -\ltj@@listing@jpset{11264}{11391} -\ltj@@listing@jpset{11392}{11519} -\ltj@@listing@jpset{11520}{11647} -\ltj@@listing@jpset{11648}{11775} -\ltj@@listing@jpset{11776}{11903} -\ltj@@listing@jpset{11904}{12031} -\ltj@@listing@jpset{12032}{12159} -\ltj@@listing@jpset{12160}{12287} -\ltj@@listing@jpset{12288}{12415} -\ltj@@listing@jpset{12416}{12543} -\ltj@@listing@jpset{12544}{12671} -\ltj@@listing@jpset{12672}{12799} -\ltj@@listing@jpset{12800}{12927} -\ltj@@listing@jpset{12928}{13055} -\ltj@@listing@jpset{13056}{13183} -\ltj@@listing@jpset{13184}{13311} -\ltj@@listing@jpset{13312}{13439} -\ltj@@listing@jpset{13440}{13567} -\ltj@@listing@jpset{13568}{13695} -\ltj@@listing@jpset{13696}{13823} -\ltj@@listing@jpset{13824}{13951} -\ltj@@listing@jpset{13952}{14079} -\ltj@@listing@jpset{14080}{14207} -\ltj@@listing@jpset{14208}{14335} -\ltj@@listing@jpset{14336}{14463} -\ltj@@listing@jpset{14464}{14591} -\ltj@@listing@jpset{14592}{14719} -\ltj@@listing@jpset{14720}{14847} -\ltj@@listing@jpset{14848}{14975} -\ltj@@listing@jpset{14976}{15103} -\ltj@@listing@jpset{15104}{15231} -\ltj@@listing@jpset{15232}{15359} -\ltj@@listing@jpset{15360}{15487} -\ltj@@listing@jpset{15488}{15615} -\ltj@@listing@jpset{15616}{15743} -\ltj@@listing@jpset{15744}{15871} -\ltj@@listing@jpset{15872}{15999} -\ltj@@listing@jpset{16000}{16127} -\ltj@@listing@jpset{16128}{16255} -\ltj@@listing@jpset{16256}{16383} -\ltj@@listing@jpset{16384}{16511} -\ltj@@listing@jpset{16512}{16639} -\ltj@@listing@jpset{16640}{16767} -\ltj@@listing@jpset{16768}{16895} -\ltj@@listing@jpset{16896}{17023} -\ltj@@listing@jpset{17024}{17151} -\ltj@@listing@jpset{17152}{17279} -\ltj@@listing@jpset{17280}{17407} -\ltj@@listing@jpset{17408}{17535} -\ltj@@listing@jpset{17536}{17663} -\ltj@@listing@jpset{17664}{17791} -\ltj@@listing@jpset{17792}{17919} -\ltj@@listing@jpset{17920}{18047} -\ltj@@listing@jpset{18048}{18175} -\ltj@@listing@jpset{18176}{18303} -\ltj@@listing@jpset{18304}{18431} -\ltj@@listing@jpset{18432}{18559} -\ltj@@listing@jpset{18560}{18687} -\ltj@@listing@jpset{18688}{18815} -\ltj@@listing@jpset{18816}{18943} -\ltj@@listing@jpset{18944}{19071} -\ltj@@listing@jpset{19072}{19199} -\ltj@@listing@jpset{19200}{19327} -\ltj@@listing@jpset{19328}{19455} -\ltj@@listing@jpset{19456}{19583} -\ltj@@listing@jpset{19584}{19711} -\ltj@@listing@jpset{19712}{19839} -\ltj@@listing@jpset{19840}{19967} -\ltj@@listing@jpset{19968}{20095} -\ltj@@listing@jpset{20096}{20223} -\ltj@@listing@jpset{20224}{20351} -\ltj@@listing@jpset{20352}{20479} -\ltj@@listing@jpset{20480}{20607} -\ltj@@listing@jpset{20608}{20735} -\ltj@@listing@jpset{20736}{20863} -\ltj@@listing@jpset{20864}{20991} -\ltj@@listing@jpset{20992}{21119} -\ltj@@listing@jpset{21120}{21247} -\ltj@@listing@jpset{21248}{21375} -\ltj@@listing@jpset{21376}{21503} -\ltj@@listing@jpset{21504}{21631} -\ltj@@listing@jpset{21632}{21759} -\ltj@@listing@jpset{21760}{21887} -\ltj@@listing@jpset{21888}{22015} -\ltj@@listing@jpset{22016}{22143} -\ltj@@listing@jpset{22144}{22271} -\ltj@@listing@jpset{22272}{22399} -\ltj@@listing@jpset{22400}{22527} -\ltj@@listing@jpset{22528}{22655} -\ltj@@listing@jpset{22656}{22783} -\ltj@@listing@jpset{22784}{22911} -\ltj@@listing@jpset{22912}{23039} -\ltj@@listing@jpset{23040}{23167} -\ltj@@listing@jpset{23168}{23295} -\ltj@@listing@jpset{23296}{23423} -\ltj@@listing@jpset{23424}{23551} -\ltj@@listing@jpset{23552}{23679} -\ltj@@listing@jpset{23680}{23807} -\ltj@@listing@jpset{23808}{23935} -\ltj@@listing@jpset{23936}{24063} -\ltj@@listing@jpset{24064}{24191} -\ltj@@listing@jpset{24192}{24319} -\ltj@@listing@jpset{24320}{24447} -\ltj@@listing@jpset{24448}{24575} -\ltj@@listing@jpset{24576}{24703} -\ltj@@listing@jpset{24704}{24831} -\ltj@@listing@jpset{24832}{24959} -\ltj@@listing@jpset{24960}{25087} -\ltj@@listing@jpset{25088}{25215} -\ltj@@listing@jpset{25216}{25343} -\ltj@@listing@jpset{25344}{25471} -\ltj@@listing@jpset{25472}{25599} -\ltj@@listing@jpset{25600}{25727} -\ltj@@listing@jpset{25728}{25855} -\ltj@@listing@jpset{25856}{25983} -\ltj@@listing@jpset{25984}{26111} -\ltj@@listing@jpset{26112}{26239} -\ltj@@listing@jpset{26240}{26367} -\ltj@@listing@jpset{26368}{26495} -\ltj@@listing@jpset{26496}{26623} -\ltj@@listing@jpset{26624}{26751} -\ltj@@listing@jpset{26752}{26879} -\ltj@@listing@jpset{26880}{27007} -\ltj@@listing@jpset{27008}{27135} -\ltj@@listing@jpset{27136}{27263} -\ltj@@listing@jpset{27264}{27391} -\ltj@@listing@jpset{27392}{27519} -\ltj@@listing@jpset{27520}{27647} -\ltj@@listing@jpset{27648}{27775} -\ltj@@listing@jpset{27776}{27903} -\ltj@@listing@jpset{27904}{28031} -\ltj@@listing@jpset{28032}{28159} -\ltj@@listing@jpset{28160}{28287} -\ltj@@listing@jpset{28288}{28415} -\ltj@@listing@jpset{28416}{28543} -\ltj@@listing@jpset{28544}{28671} -\ltj@@listing@jpset{28672}{28799} -\ltj@@listing@jpset{28800}{28927} -\ltj@@listing@jpset{28928}{29055} -\ltj@@listing@jpset{29056}{29183} -\ltj@@listing@jpset{29184}{29311} -\ltj@@listing@jpset{29312}{29439} -\ltj@@listing@jpset{29440}{29567} -\ltj@@listing@jpset{29568}{29695} -\ltj@@listing@jpset{29696}{29823} -\ltj@@listing@jpset{29824}{29951} -\ltj@@listing@jpset{29952}{30079} -\ltj@@listing@jpset{30080}{30207} -\ltj@@listing@jpset{30208}{30335} -\ltj@@listing@jpset{30336}{30463} -\ltj@@listing@jpset{30464}{30591} -\ltj@@listing@jpset{30592}{30719} -\ltj@@listing@jpset{30720}{30847} -\ltj@@listing@jpset{30848}{30975} -\ltj@@listing@jpset{30976}{31103} -\ltj@@listing@jpset{31104}{31231} -\ltj@@listing@jpset{31232}{31359} -\ltj@@listing@jpset{31360}{31487} -\ltj@@listing@jpset{31488}{31615} -\ltj@@listing@jpset{31616}{31743} -\ltj@@listing@jpset{31744}{31871} -\ltj@@listing@jpset{31872}{31999} -\ltj@@listing@jpset{32000}{32127} -\ltj@@listing@jpset{32128}{32255} -\ltj@@listing@jpset{32256}{32383} -\ltj@@listing@jpset{32384}{32511} -\ltj@@listing@jpset{32512}{32639} -\ltj@@listing@jpset{32640}{32767} -\ltj@@listing@jpset{32768}{32895} -\ltj@@listing@jpset{32896}{33023} -\ltj@@listing@jpset{33024}{33151} -\ltj@@listing@jpset{33152}{33279} -\ltj@@listing@jpset{33280}{33407} -\ltj@@listing@jpset{33408}{33535} -\ltj@@listing@jpset{33536}{33663} -\ltj@@listing@jpset{33664}{33791} -\ltj@@listing@jpset{33792}{33919} -\ltj@@listing@jpset{33920}{34047} -\ltj@@listing@jpset{34048}{34175} -\ltj@@listing@jpset{34176}{34303} -\ltj@@listing@jpset{34304}{34431} -\ltj@@listing@jpset{34432}{34559} -\ltj@@listing@jpset{34560}{34687} -\ltj@@listing@jpset{34688}{34815} -\ltj@@listing@jpset{34816}{34943} -\ltj@@listing@jpset{34944}{35071} -\ltj@@listing@jpset{35072}{35199} -\ltj@@listing@jpset{35200}{35327} -\ltj@@listing@jpset{35328}{35455} -\ltj@@listing@jpset{35456}{35583} -\ltj@@listing@jpset{35584}{35711} -\ltj@@listing@jpset{35712}{35839} -\ltj@@listing@jpset{35840}{35967} -\ltj@@listing@jpset{35968}{36095} -\ltj@@listing@jpset{36096}{36223} -\ltj@@listing@jpset{36224}{36351} -\ltj@@listing@jpset{36352}{36479} -\ltj@@listing@jpset{36480}{36607} -\ltj@@listing@jpset{36608}{36735} -\ltj@@listing@jpset{36736}{36863} -\ltj@@listing@jpset{36864}{36991} -\ltj@@listing@jpset{36992}{37119} -\ltj@@listing@jpset{37120}{37247} -\ltj@@listing@jpset{37248}{37375} -\ltj@@listing@jpset{37376}{37503} -\ltj@@listing@jpset{37504}{37631} -\ltj@@listing@jpset{37632}{37759} -\ltj@@listing@jpset{37760}{37887} -\ltj@@listing@jpset{37888}{38015} -\ltj@@listing@jpset{38016}{38143} -\ltj@@listing@jpset{38144}{38271} -\ltj@@listing@jpset{38272}{38399} -\ltj@@listing@jpset{38400}{38527} -\ltj@@listing@jpset{38528}{38655} -\ltj@@listing@jpset{38656}{38783} -\ltj@@listing@jpset{38784}{38911} -\ltj@@listing@jpset{38912}{39039} -\ltj@@listing@jpset{39040}{39167} -\ltj@@listing@jpset{39168}{39295} -\ltj@@listing@jpset{39296}{39423} -\ltj@@listing@jpset{39424}{39551} -\ltj@@listing@jpset{39552}{39679} -\ltj@@listing@jpset{39680}{39807} -\ltj@@listing@jpset{39808}{39935} -\ltj@@listing@jpset{39936}{40063} -\ltj@@listing@jpset{40064}{40191} -\ltj@@listing@jpset{40192}{40319} -\ltj@@listing@jpset{40320}{40447} -\ltj@@listing@jpset{40448}{40575} -\ltj@@listing@jpset{40576}{40703} -\ltj@@listing@jpset{40704}{40831} -\ltj@@listing@jpset{40832}{40959} -\ltj@@listing@jpset{40960}{41087} -\ltj@@listing@jpset{41088}{41215} -\ltj@@listing@jpset{41216}{41343} -\ltj@@listing@jpset{41344}{41471} -\ltj@@listing@jpset{41472}{41599} -\ltj@@listing@jpset{41600}{41727} -\ltj@@listing@jpset{41728}{41855} -\ltj@@listing@jpset{41856}{41983} -\ltj@@listing@jpset{41984}{42111} -\ltj@@listing@jpset{42112}{42239} -\ltj@@listing@jpset{42240}{42367} -\ltj@@listing@jpset{42368}{42495} -\ltj@@listing@jpset{42496}{42623} -\ltj@@listing@jpset{42624}{42751} -\ltj@@listing@jpset{42752}{42879} -\ltj@@listing@jpset{42880}{43007} -\ltj@@listing@jpset{43008}{43135} -\ltj@@listing@jpset{43136}{43263} -\ltj@@listing@jpset{43264}{43391} -\ltj@@listing@jpset{43392}{43519} -\ltj@@listing@jpset{43520}{43647} -\ltj@@listing@jpset{43648}{43775} -\ltj@@listing@jpset{43776}{43903} -\ltj@@listing@jpset{43904}{44031} -\ltj@@listing@jpset{44032}{44159} -\ltj@@listing@jpset{44160}{44287} -\ltj@@listing@jpset{44288}{44415} -\ltj@@listing@jpset{44416}{44543} -\ltj@@listing@jpset{44544}{44671} -\ltj@@listing@jpset{44672}{44799} -\ltj@@listing@jpset{44800}{44927} -\ltj@@listing@jpset{44928}{45055} -\ltj@@listing@jpset{45056}{45183} -\ltj@@listing@jpset{45184}{45311} -\ltj@@listing@jpset{45312}{45439} -\ltj@@listing@jpset{45440}{45567} -\ltj@@listing@jpset{45568}{45695} -\ltj@@listing@jpset{45696}{45823} -\ltj@@listing@jpset{45824}{45951} -\ltj@@listing@jpset{45952}{46079} -\ltj@@listing@jpset{46080}{46207} -\ltj@@listing@jpset{46208}{46335} -\ltj@@listing@jpset{46336}{46463} -\ltj@@listing@jpset{46464}{46591} -\ltj@@listing@jpset{46592}{46719} -\ltj@@listing@jpset{46720}{46847} -\ltj@@listing@jpset{46848}{46975} -\ltj@@listing@jpset{46976}{47103} -\ltj@@listing@jpset{47104}{47231} -\ltj@@listing@jpset{47232}{47359} -\ltj@@listing@jpset{47360}{47487} -\ltj@@listing@jpset{47488}{47615} -\ltj@@listing@jpset{47616}{47743} -\ltj@@listing@jpset{47744}{47871} -\ltj@@listing@jpset{47872}{47999} -\ltj@@listing@jpset{48000}{48127} -\ltj@@listing@jpset{48128}{48255} -\ltj@@listing@jpset{48256}{48383} -\ltj@@listing@jpset{48384}{48511} -\ltj@@listing@jpset{48512}{48639} -\ltj@@listing@jpset{48640}{48767} -\ltj@@listing@jpset{48768}{48895} -\ltj@@listing@jpset{48896}{49023} -\ltj@@listing@jpset{49024}{49151} -\ltj@@listing@jpset{49152}{49279} -\ltj@@listing@jpset{49280}{49407} -\ltj@@listing@jpset{49408}{49535} -\ltj@@listing@jpset{49536}{49663} -\ltj@@listing@jpset{49664}{49791} -\ltj@@listing@jpset{49792}{49919} -\ltj@@listing@jpset{49920}{50047} -\ltj@@listing@jpset{50048}{50175} -\ltj@@listing@jpset{50176}{50303} -\ltj@@listing@jpset{50304}{50431} -\ltj@@listing@jpset{50432}{50559} -\ltj@@listing@jpset{50560}{50687} -\ltj@@listing@jpset{50688}{50815} -\ltj@@listing@jpset{50816}{50943} -\ltj@@listing@jpset{50944}{51071} -\ltj@@listing@jpset{51072}{51199} -\ltj@@listing@jpset{51200}{51327} -\ltj@@listing@jpset{51328}{51455} -\ltj@@listing@jpset{51456}{51583} -\ltj@@listing@jpset{51584}{51711} -\ltj@@listing@jpset{51712}{51839} -\ltj@@listing@jpset{51840}{51967} -\ltj@@listing@jpset{51968}{52095} -\ltj@@listing@jpset{52096}{52223} -\ltj@@listing@jpset{52224}{52351} -\ltj@@listing@jpset{52352}{52479} -\ltj@@listing@jpset{52480}{52607} -\ltj@@listing@jpset{52608}{52735} -\ltj@@listing@jpset{52736}{52863} -\ltj@@listing@jpset{52864}{52991} -\ltj@@listing@jpset{52992}{53119} -\ltj@@listing@jpset{53120}{53247} -\ltj@@listing@jpset{53248}{53375} -\ltj@@listing@jpset{53376}{53503} -\ltj@@listing@jpset{53504}{53631} -\ltj@@listing@jpset{53632}{53759} -\ltj@@listing@jpset{53760}{53887} -\ltj@@listing@jpset{53888}{54015} -\ltj@@listing@jpset{54016}{54143} -\ltj@@listing@jpset{54144}{54271} -\ltj@@listing@jpset{54272}{54399} -\ltj@@listing@jpset{54400}{54527} -\ltj@@listing@jpset{54528}{54655} -\ltj@@listing@jpset{54656}{54783} -\ltj@@listing@jpset{54784}{54911} -\ltj@@listing@jpset{54912}{55039} -\ltj@@listing@jpset{55040}{55167} -\ltj@@listing@jpset{55168}{55295} -\ltj@@listing@jpset{55296}{55423} -\ltj@@listing@jpset{55424}{55551} -\ltj@@listing@jpset{55552}{55679} -\ltj@@listing@jpset{55680}{55807} -\ltj@@listing@jpset{55808}{55935} -\ltj@@listing@jpset{55936}{56063} -\ltj@@listing@jpset{56064}{56191} -\ltj@@listing@jpset{56192}{56319} -\ltj@@listing@jpset{56320}{56447} -\ltj@@listing@jpset{56448}{56575} -\ltj@@listing@jpset{56576}{56703} -\ltj@@listing@jpset{56704}{56831} -\ltj@@listing@jpset{56832}{56959} -\ltj@@listing@jpset{56960}{57087} -\ltj@@listing@jpset{57088}{57215} -\ltj@@listing@jpset{57216}{57343} -\ltj@@listing@jpset{57344}{57471} -\ltj@@listing@jpset{57472}{57599} -\ltj@@listing@jpset{57600}{57727} -\ltj@@listing@jpset{57728}{57855} -\ltj@@listing@jpset{57856}{57983} -\ltj@@listing@jpset{57984}{58111} -\ltj@@listing@jpset{58112}{58239} -\ltj@@listing@jpset{58240}{58367} -\ltj@@listing@jpset{58368}{58495} -\ltj@@listing@jpset{58496}{58623} -\ltj@@listing@jpset{58624}{58751} -\ltj@@listing@jpset{58752}{58879} -\ltj@@listing@jpset{58880}{59007} -\ltj@@listing@jpset{59008}{59135} -\ltj@@listing@jpset{59136}{59263} -\ltj@@listing@jpset{59264}{59391} -\ltj@@listing@jpset{59392}{59519} -\ltj@@listing@jpset{59520}{59647} -\ltj@@listing@jpset{59648}{59775} -\ltj@@listing@jpset{59776}{59903} -\ltj@@listing@jpset{59904}{60031} -\ltj@@listing@jpset{60032}{60159} -\ltj@@listing@jpset{60160}{60287} -\ltj@@listing@jpset{60288}{60415} -\ltj@@listing@jpset{60416}{60543} -\ltj@@listing@jpset{60544}{60671} -\ltj@@listing@jpset{60672}{60799} -\ltj@@listing@jpset{60800}{60927} -\ltj@@listing@jpset{60928}{61055} -\ltj@@listing@jpset{61056}{61183} -\ltj@@listing@jpset{61184}{61311} -\ltj@@listing@jpset{61312}{61439} -\ltj@@listing@jpset{61440}{61567} -\ltj@@listing@jpset{61568}{61695} -\ltj@@listing@jpset{61696}{61823} -\ltj@@listing@jpset{61824}{61951} -\ltj@@listing@jpset{61952}{62079} -\ltj@@listing@jpset{62080}{62207} -\ltj@@listing@jpset{62208}{62335} -\ltj@@listing@jpset{62336}{62463} -\ltj@@listing@jpset{62464}{62591} -\ltj@@listing@jpset{62592}{62719} -\ltj@@listing@jpset{62720}{62847} -\ltj@@listing@jpset{62848}{62975} -\ltj@@listing@jpset{62976}{63103} -\ltj@@listing@jpset{63104}{63231} -\ltj@@listing@jpset{63232}{63359} -\ltj@@listing@jpset{63360}{63487} -\ltj@@listing@jpset{63488}{63615} -\ltj@@listing@jpset{63616}{63743} -\ltj@@listing@jpset{63744}{63871} -\ltj@@listing@jpset{63872}{63999} -\ltj@@listing@jpset{64000}{64127} -\ltj@@listing@jpset{64128}{64255} -\ltj@@listing@jpset{64256}{64383} -\ltj@@listing@jpset{64384}{64511} -\ltj@@listing@jpset{64512}{64639} -\ltj@@listing@jpset{64640}{64767} -\ltj@@listing@jpset{64768}{64895} -\ltj@@listing@jpset{64896}{65023} -\ltj@@listing@jpset{65024}{65151} -\ltj@@listing@jpset{65152}{65279} -\message{SIP} -\ltj@@listing@jpset{131072}{131199} -\ltj@@listing@jpset{131200}{131327} -\ltj@@listing@jpset{131328}{131455} -\ltj@@listing@jpset{131456}{131583} -\ltj@@listing@jpset{131584}{131711} -\ltj@@listing@jpset{131712}{131839} -\ltj@@listing@jpset{131840}{131967} -\ltj@@listing@jpset{131968}{132095} -\ltj@@listing@jpset{132096}{132223} -\ltj@@listing@jpset{132224}{132351} -\ltj@@listing@jpset{132352}{132479} -\ltj@@listing@jpset{132480}{132607} -\ltj@@listing@jpset{132608}{132735} -\ltj@@listing@jpset{132736}{132863} -\ltj@@listing@jpset{132864}{132991} -\ltj@@listing@jpset{132992}{133119} -\ltj@@listing@jpset{133120}{133247} -\ltj@@listing@jpset{133248}{133375} -\ltj@@listing@jpset{133376}{133503} -\ltj@@listing@jpset{133504}{133631} -\ltj@@listing@jpset{133632}{133759} -\ltj@@listing@jpset{133760}{133887} -\ltj@@listing@jpset{133888}{134015} -\ltj@@listing@jpset{134016}{134143} -\ltj@@listing@jpset{134144}{134271} -\ltj@@listing@jpset{134272}{134399} -\ltj@@listing@jpset{134400}{134527} -\ltj@@listing@jpset{134528}{134655} -\ltj@@listing@jpset{134656}{134783} -\ltj@@listing@jpset{134784}{134911} -\ltj@@listing@jpset{134912}{135039} -\ltj@@listing@jpset{135040}{135167} -\ltj@@listing@jpset{135168}{135295} -\ltj@@listing@jpset{135296}{135423} -\ltj@@listing@jpset{135424}{135551} -\ltj@@listing@jpset{135552}{135679} -\ltj@@listing@jpset{135680}{135807} -\ltj@@listing@jpset{135808}{135935} -\ltj@@listing@jpset{135936}{136063} -\ltj@@listing@jpset{136064}{136191} -\ltj@@listing@jpset{136192}{136319} -\ltj@@listing@jpset{136320}{136447} -\ltj@@listing@jpset{136448}{136575} -\ltj@@listing@jpset{136576}{136703} -\ltj@@listing@jpset{136704}{136831} -\ltj@@listing@jpset{136832}{136959} -\ltj@@listing@jpset{136960}{137087} -\ltj@@listing@jpset{137088}{137215} -\ltj@@listing@jpset{137216}{137343} -\ltj@@listing@jpset{137344}{137471} -\ltj@@listing@jpset{137472}{137599} -\ltj@@listing@jpset{137600}{137727} -\ltj@@listing@jpset{137728}{137855} -\ltj@@listing@jpset{137856}{137983} -\ltj@@listing@jpset{137984}{138111} -\ltj@@listing@jpset{138112}{138239} -\ltj@@listing@jpset{138240}{138367} -\ltj@@listing@jpset{138368}{138495} -\ltj@@listing@jpset{138496}{138623} -\ltj@@listing@jpset{138624}{138751} -\ltj@@listing@jpset{138752}{138879} -\ltj@@listing@jpset{138880}{139007} -\ltj@@listing@jpset{139008}{139135} -\ltj@@listing@jpset{139136}{139263} -\ltj@@listing@jpset{139264}{139391} -\ltj@@listing@jpset{139392}{139519} -\ltj@@listing@jpset{139520}{139647} -\ltj@@listing@jpset{139648}{139775} -\ltj@@listing@jpset{139776}{139903} -\ltj@@listing@jpset{139904}{140031} -\ltj@@listing@jpset{140032}{140159} -\ltj@@listing@jpset{140160}{140287} -\ltj@@listing@jpset{140288}{140415} -\ltj@@listing@jpset{140416}{140543} -\ltj@@listing@jpset{140544}{140671} -\ltj@@listing@jpset{140672}{140799} -\ltj@@listing@jpset{140800}{140927} -\ltj@@listing@jpset{140928}{141055} -\ltj@@listing@jpset{141056}{141183} -\ltj@@listing@jpset{141184}{141311} -\ltj@@listing@jpset{141312}{141439} -\ltj@@listing@jpset{141440}{141567} -\ltj@@listing@jpset{141568}{141695} -\ltj@@listing@jpset{141696}{141823} -\ltj@@listing@jpset{141824}{141951} -\ltj@@listing@jpset{141952}{142079} -\ltj@@listing@jpset{142080}{142207} -\ltj@@listing@jpset{142208}{142335} -\ltj@@listing@jpset{142336}{142463} -\ltj@@listing@jpset{142464}{142591} -\ltj@@listing@jpset{142592}{142719} -\ltj@@listing@jpset{142720}{142847} -\ltj@@listing@jpset{142848}{142975} -\ltj@@listing@jpset{142976}{143103} -\ltj@@listing@jpset{143104}{143231} -\ltj@@listing@jpset{143232}{143359} -\ltj@@listing@jpset{143360}{143487} -\ltj@@listing@jpset{143488}{143615} -\ltj@@listing@jpset{143616}{143743} -\ltj@@listing@jpset{143744}{143871} -\ltj@@listing@jpset{143872}{143999} -\ltj@@listing@jpset{144000}{144127} -\ltj@@listing@jpset{144128}{144255} -\ltj@@listing@jpset{144256}{144383} -\ltj@@listing@jpset{144384}{144511} -\ltj@@listing@jpset{144512}{144639} -\ltj@@listing@jpset{144640}{144767} -\ltj@@listing@jpset{144768}{144895} -\ltj@@listing@jpset{144896}{145023} -\ltj@@listing@jpset{145024}{145151} -\ltj@@listing@jpset{145152}{145279} -\ltj@@listing@jpset{145280}{145407} -\ltj@@listing@jpset{145408}{145535} -\ltj@@listing@jpset{145536}{145663} -\ltj@@listing@jpset{145664}{145791} -\ltj@@listing@jpset{145792}{145919} -\ltj@@listing@jpset{145920}{146047} -\ltj@@listing@jpset{146048}{146175} -\ltj@@listing@jpset{146176}{146303} -\ltj@@listing@jpset{146304}{146431} -\ltj@@listing@jpset{146432}{146559} -\ltj@@listing@jpset{146560}{146687} -\ltj@@listing@jpset{146688}{146815} -\ltj@@listing@jpset{146816}{146943} -\ltj@@listing@jpset{146944}{147071} -\ltj@@listing@jpset{147072}{147199} -\ltj@@listing@jpset{147200}{147327} -\ltj@@listing@jpset{147328}{147455} -\ltj@@listing@jpset{147456}{147583} -\ltj@@listing@jpset{147584}{147711} -\ltj@@listing@jpset{147712}{147839} -\ltj@@listing@jpset{147840}{147967} -\ltj@@listing@jpset{147968}{148095} -\ltj@@listing@jpset{148096}{148223} -\ltj@@listing@jpset{148224}{148351} -\ltj@@listing@jpset{148352}{148479} -\ltj@@listing@jpset{148480}{148607} -\ltj@@listing@jpset{148608}{148735} -\ltj@@listing@jpset{148736}{148863} -\ltj@@listing@jpset{148864}{148991} -\ltj@@listing@jpset{148992}{149119} -\ltj@@listing@jpset{149120}{149247} -\ltj@@listing@jpset{149248}{149375} -\ltj@@listing@jpset{149376}{149503} -\ltj@@listing@jpset{149504}{149631} -\ltj@@listing@jpset{149632}{149759} -\ltj@@listing@jpset{149760}{149887} -\ltj@@listing@jpset{149888}{150015} -\ltj@@listing@jpset{150016}{150143} -\ltj@@listing@jpset{150144}{150271} -\ltj@@listing@jpset{150272}{150399} -\ltj@@listing@jpset{150400}{150527} -\ltj@@listing@jpset{150528}{150655} -\ltj@@listing@jpset{150656}{150783} -\ltj@@listing@jpset{150784}{150911} -\ltj@@listing@jpset{150912}{151039} -\ltj@@listing@jpset{151040}{151167} -\ltj@@listing@jpset{151168}{151295} -\ltj@@listing@jpset{151296}{151423} -\ltj@@listing@jpset{151424}{151551} -\ltj@@listing@jpset{151552}{151679} -\ltj@@listing@jpset{151680}{151807} -\ltj@@listing@jpset{151808}{151935} -\ltj@@listing@jpset{151936}{152063} -\ltj@@listing@jpset{152064}{152191} -\ltj@@listing@jpset{152192}{152319} -\ltj@@listing@jpset{152320}{152447} -\ltj@@listing@jpset{152448}{152575} -\ltj@@listing@jpset{152576}{152703} -\ltj@@listing@jpset{152704}{152831} -\ltj@@listing@jpset{152832}{152959} -\ltj@@listing@jpset{152960}{153087} -\ltj@@listing@jpset{153088}{153215} -\ltj@@listing@jpset{153216}{153343} -\ltj@@listing@jpset{153344}{153471} -\ltj@@listing@jpset{153472}{153599} -\ltj@@listing@jpset{153600}{153727} -\ltj@@listing@jpset{153728}{153855} -\ltj@@listing@jpset{153856}{153983} -\ltj@@listing@jpset{153984}{154111} -\ltj@@listing@jpset{154112}{154239} -\ltj@@listing@jpset{154240}{154367} -\ltj@@listing@jpset{154368}{154495} -\ltj@@listing@jpset{154496}{154623} -\ltj@@listing@jpset{154624}{154751} -\ltj@@listing@jpset{154752}{154879} -\ltj@@listing@jpset{154880}{155007} -\ltj@@listing@jpset{155008}{155135} -\ltj@@listing@jpset{155136}{155263} -\ltj@@listing@jpset{155264}{155391} -\ltj@@listing@jpset{155392}{155519} -\ltj@@listing@jpset{155520}{155647} -\ltj@@listing@jpset{155648}{155775} -\ltj@@listing@jpset{155776}{155903} -\ltj@@listing@jpset{155904}{156031} -\ltj@@listing@jpset{156032}{156159} -\ltj@@listing@jpset{156160}{156287} -\ltj@@listing@jpset{156288}{156415} -\ltj@@listing@jpset{156416}{156543} -\ltj@@listing@jpset{156544}{156671} -\ltj@@listing@jpset{156672}{156799} -\ltj@@listing@jpset{156800}{156927} -\ltj@@listing@jpset{156928}{157055} -\ltj@@listing@jpset{157056}{157183} -\ltj@@listing@jpset{157184}{157311} -\ltj@@listing@jpset{157312}{157439} -\ltj@@listing@jpset{157440}{157567} -\ltj@@listing@jpset{157568}{157695} -\ltj@@listing@jpset{157696}{157823} -\ltj@@listing@jpset{157824}{157951} -\ltj@@listing@jpset{157952}{158079} -\ltj@@listing@jpset{158080}{158207} -\ltj@@listing@jpset{158208}{158335} -\ltj@@listing@jpset{158336}{158463} -\ltj@@listing@jpset{158464}{158591} -\ltj@@listing@jpset{158592}{158719} -\ltj@@listing@jpset{158720}{158847} -\ltj@@listing@jpset{158848}{158975} -\ltj@@listing@jpset{158976}{159103} -\ltj@@listing@jpset{159104}{159231} -\ltj@@listing@jpset{159232}{159359} -\ltj@@listing@jpset{159360}{159487} -\ltj@@listing@jpset{159488}{159615} -\ltj@@listing@jpset{159616}{159743} -\ltj@@listing@jpset{159744}{159871} -\ltj@@listing@jpset{159872}{159999} -\ltj@@listing@jpset{160000}{160127} -\ltj@@listing@jpset{160128}{160255} -\ltj@@listing@jpset{160256}{160383} -\ltj@@listing@jpset{160384}{160511} -\ltj@@listing@jpset{160512}{160639} -\ltj@@listing@jpset{160640}{160767} -\ltj@@listing@jpset{160768}{160895} -\ltj@@listing@jpset{160896}{161023} -\ltj@@listing@jpset{161024}{161151} -\ltj@@listing@jpset{161152}{161279} -\ltj@@listing@jpset{161280}{161407} -\ltj@@listing@jpset{161408}{161535} -\ltj@@listing@jpset{161536}{161663} -\ltj@@listing@jpset{161664}{161791} -\ltj@@listing@jpset{161792}{161919} -\ltj@@listing@jpset{161920}{162047} -\ltj@@listing@jpset{162048}{162175} -\ltj@@listing@jpset{162176}{162303} -\ltj@@listing@jpset{162304}{162431} -\ltj@@listing@jpset{162432}{162559} -\ltj@@listing@jpset{162560}{162687} -\ltj@@listing@jpset{162688}{162815} -\ltj@@listing@jpset{162816}{162943} -\ltj@@listing@jpset{162944}{163071} -\ltj@@listing@jpset{163072}{163199} -\ltj@@listing@jpset{163200}{163327} -\ltj@@listing@jpset{163328}{163455} -\ltj@@listing@jpset{163456}{163583} -\ltj@@listing@jpset{163584}{163711} -\ltj@@listing@jpset{163712}{163839} -\ltj@@listing@jpset{163840}{163967} -\ltj@@listing@jpset{163968}{164095} -\ltj@@listing@jpset{164096}{164223} -\ltj@@listing@jpset{164224}{164351} -\ltj@@listing@jpset{164352}{164479} -\ltj@@listing@jpset{164480}{164607} -\ltj@@listing@jpset{164608}{164735} -\ltj@@listing@jpset{164736}{164863} -\ltj@@listing@jpset{164864}{164991} -\ltj@@listing@jpset{164992}{165119} -\ltj@@listing@jpset{165120}{165247} -\ltj@@listing@jpset{165248}{165375} -\ltj@@listing@jpset{165376}{165503} -\ltj@@listing@jpset{165504}{165631} -\ltj@@listing@jpset{165632}{165759} -\ltj@@listing@jpset{165760}{165887} -\ltj@@listing@jpset{165888}{166015} -\ltj@@listing@jpset{166016}{166143} -\ltj@@listing@jpset{166144}{166271} -\ltj@@listing@jpset{166272}{166399} -\ltj@@listing@jpset{166400}{166527} -\ltj@@listing@jpset{166528}{166655} -\ltj@@listing@jpset{166656}{166783} -\ltj@@listing@jpset{166784}{166911} -\ltj@@listing@jpset{166912}{167039} -\ltj@@listing@jpset{167040}{167167} -\ltj@@listing@jpset{167168}{167295} -\ltj@@listing@jpset{167296}{167423} -\ltj@@listing@jpset{167424}{167551} -\ltj@@listing@jpset{167552}{167679} -\ltj@@listing@jpset{167680}{167807} -\ltj@@listing@jpset{167808}{167935} -\ltj@@listing@jpset{167936}{168063} -\ltj@@listing@jpset{168064}{168191} -\ltj@@listing@jpset{168192}{168319} -\ltj@@listing@jpset{168320}{168447} -\ltj@@listing@jpset{168448}{168575} -\ltj@@listing@jpset{168576}{168703} -\ltj@@listing@jpset{168704}{168831} -\ltj@@listing@jpset{168832}{168959} -\ltj@@listing@jpset{168960}{169087} -\ltj@@listing@jpset{169088}{169215} -\ltj@@listing@jpset{169216}{169343} -\ltj@@listing@jpset{169344}{169471} -\ltj@@listing@jpset{169472}{169599} -\ltj@@listing@jpset{169600}{169727} -\ltj@@listing@jpset{169728}{169855} -\ltj@@listing@jpset{169856}{169983} -\ltj@@listing@jpset{169984}{170111} -\ltj@@listing@jpset{170112}{170239} -\ltj@@listing@jpset{170240}{170367} -\ltj@@listing@jpset{170368}{170495} -\ltj@@listing@jpset{170496}{170623} -\ltj@@listing@jpset{170624}{170751} -\ltj@@listing@jpset{170752}{170879} -\ltj@@listing@jpset{170880}{171007} -\ltj@@listing@jpset{171008}{171135} -\ltj@@listing@jpset{171136}{171263} -\ltj@@listing@jpset{171264}{171391} -\ltj@@listing@jpset{171392}{171519} -\ltj@@listing@jpset{171520}{171647} -\ltj@@listing@jpset{171648}{171775} -\ltj@@listing@jpset{171776}{171903} -\ltj@@listing@jpset{171904}{172031} -\ltj@@listing@jpset{172032}{172159} -\ltj@@listing@jpset{172160}{172287} -\ltj@@listing@jpset{172288}{172415} -\ltj@@listing@jpset{172416}{172543} -\ltj@@listing@jpset{172544}{172671} -\ltj@@listing@jpset{172672}{172799} -\ltj@@listing@jpset{172800}{172927} -\ltj@@listing@jpset{172928}{173055} -\ltj@@listing@jpset{173056}{173183} -\ltj@@listing@jpset{173184}{173311} -\ltj@@listing@jpset{173312}{173439} -\ltj@@listing@jpset{173440}{173567} -\ltj@@listing@jpset{173568}{173695} -\ltj@@listing@jpset{173696}{173823} -\ltj@@listing@jpset{173824}{173951} -\ltj@@listing@jpset{173952}{174079} -\ltj@@listing@jpset{174080}{174207} -\ltj@@listing@jpset{174208}{174335} -\ltj@@listing@jpset{174336}{174463} -\ltj@@listing@jpset{174464}{174591} -\ltj@@listing@jpset{174592}{174719} -\ltj@@listing@jpset{174720}{174847} -\ltj@@listing@jpset{174848}{174975} -\ltj@@listing@jpset{174976}{175103} -\ltj@@listing@jpset{175104}{175231} -\ltj@@listing@jpset{175232}{175359} -\ltj@@listing@jpset{175360}{175487} -\ltj@@listing@jpset{175488}{175615} -\ltj@@listing@jpset{175616}{175743} -\ltj@@listing@jpset{175744}{175871} -\ltj@@listing@jpset{175872}{175999} -\ltj@@listing@jpset{176000}{176127} -\ltj@@listing@jpset{176128}{176255} -\ltj@@listing@jpset{176256}{176383} -\ltj@@listing@jpset{176384}{176511} -\ltj@@listing@jpset{176512}{176639} -\ltj@@listing@jpset{176640}{176767} -\ltj@@listing@jpset{176768}{176895} -\ltj@@listing@jpset{176896}{177023} -\ltj@@listing@jpset{177024}{177151} -\ltj@@listing@jpset{177152}{177279} -\ltj@@listing@jpset{177280}{177407} -\ltj@@listing@jpset{177408}{177535} -\ltj@@listing@jpset{177536}{177663} -\ltj@@listing@jpset{177664}{177791} -\ltj@@listing@jpset{177792}{177919} -\ltj@@listing@jpset{177920}{178047} -\ltj@@listing@jpset{178048}{178175} -\ltj@@listing@jpset{178176}{178303} -\ltj@@listing@jpset{178304}{178431} -\ltj@@listing@jpset{178432}{178559} -\ltj@@listing@jpset{178560}{178687} -\ltj@@listing@jpset{178688}{178815} -\ltj@@listing@jpset{178816}{178943} -\ltj@@listing@jpset{178944}{179071} -\ltj@@listing@jpset{179072}{179199} -\ltj@@listing@jpset{179200}{179327} -\ltj@@listing@jpset{179328}{179455} -\ltj@@listing@jpset{179456}{179583} -\ltj@@listing@jpset{179584}{179711} -\ltj@@listing@jpset{179712}{179839} -\ltj@@listing@jpset{179840}{179967} -\ltj@@listing@jpset{179968}{180095} -\ltj@@listing@jpset{180096}{180223} -\ltj@@listing@jpset{180224}{180351} -\ltj@@listing@jpset{180352}{180479} -\ltj@@listing@jpset{180480}{180607} -\ltj@@listing@jpset{180608}{180735} -\ltj@@listing@jpset{180736}{180863} -\ltj@@listing@jpset{180864}{180991} -\ltj@@listing@jpset{180992}{181119} -\ltj@@listing@jpset{181120}{181247} -\ltj@@listing@jpset{181248}{181375} -\ltj@@listing@jpset{181376}{181503} -\ltj@@listing@jpset{181504}{181631} -\ltj@@listing@jpset{181632}{181759} -\ltj@@listing@jpset{181760}{181887} -\ltj@@listing@jpset{181888}{182015} -\ltj@@listing@jpset{182016}{182143} -\ltj@@listing@jpset{182144}{182271} -\ltj@@listing@jpset{182272}{182399} -\ltj@@listing@jpset{182400}{182527} -\ltj@@listing@jpset{182528}{182655} -\ltj@@listing@jpset{182656}{182783} -\ltj@@listing@jpset{182784}{182911} -\ltj@@listing@jpset{182912}{183039} -\ltj@@listing@jpset{183040}{183167} -\ltj@@listing@jpset{183168}{183295} -\ltj@@listing@jpset{183296}{183423} -\ltj@@listing@jpset{183424}{183551} -\ltj@@listing@jpset{183552}{183679} -\ltj@@listing@jpset{183680}{183807} -\ltj@@listing@jpset{183808}{183935} -\ltj@@listing@jpset{183936}{184063} -\ltj@@listing@jpset{184064}{184191} -\ltj@@listing@jpset{184192}{184319} -\ltj@@listing@jpset{184320}{184447} -\ltj@@listing@jpset{184448}{184575} -\ltj@@listing@jpset{184576}{184703} -\ltj@@listing@jpset{184704}{184831} -\ltj@@listing@jpset{184832}{184959} -\ltj@@listing@jpset{184960}{185087} -\ltj@@listing@jpset{185088}{185215} -\ltj@@listing@jpset{185216}{185343} -\ltj@@listing@jpset{185344}{185471} -\ltj@@listing@jpset{185472}{185599} -\ltj@@listing@jpset{185600}{185727} -\ltj@@listing@jpset{185728}{185855} -\ltj@@listing@jpset{185856}{185983} -\ltj@@listing@jpset{185984}{186111} -\ltj@@listing@jpset{186112}{186239} -\ltj@@listing@jpset{186240}{186367} -\ltj@@listing@jpset{186368}{186495} -\ltj@@listing@jpset{186496}{186623} -\ltj@@listing@jpset{186624}{186751} -\ltj@@listing@jpset{186752}{186879} -\ltj@@listing@jpset{186880}{187007} -\ltj@@listing@jpset{187008}{187135} -\ltj@@listing@jpset{187136}{187263} -\ltj@@listing@jpset{187264}{187391} -\ltj@@listing@jpset{187392}{187519} -\ltj@@listing@jpset{187520}{187647} -\ltj@@listing@jpset{187648}{187775} -\ltj@@listing@jpset{187776}{187903} -\ltj@@listing@jpset{187904}{188031} -\ltj@@listing@jpset{188032}{188159} -\ltj@@listing@jpset{188160}{188287} -\ltj@@listing@jpset{188288}{188415} -\ltj@@listing@jpset{188416}{188543} -\ltj@@listing@jpset{188544}{188671} -\ltj@@listing@jpset{188672}{188799} -\ltj@@listing@jpset{188800}{188927} -\ltj@@listing@jpset{188928}{189055} -\ltj@@listing@jpset{189056}{189183} -\ltj@@listing@jpset{189184}{189311} -\ltj@@listing@jpset{189312}{189439} -\ltj@@listing@jpset{189440}{189567} -\ltj@@listing@jpset{189568}{189695} -\ltj@@listing@jpset{189696}{189823} -\ltj@@listing@jpset{189824}{189951} -\ltj@@listing@jpset{189952}{190079} -\ltj@@listing@jpset{190080}{190207} -\ltj@@listing@jpset{190208}{190335} -\ltj@@listing@jpset{190336}{190463} -\ltj@@listing@jpset{190464}{190591} -\ltj@@listing@jpset{190592}{190719} -\ltj@@listing@jpset{190720}{190847} -\ltj@@listing@jpset{190848}{190975} -\ltj@@listing@jpset{190976}{191103} -\ltj@@listing@jpset{191104}{191231} -\ltj@@listing@jpset{191232}{191359} -\ltj@@listing@jpset{191360}{191487} -\ltj@@listing@jpset{191488}{191615} -\ltj@@listing@jpset{191616}{191743} -\ltj@@listing@jpset{191744}{191871} -\ltj@@listing@jpset{191872}{191999} -\ltj@@listing@jpset{192000}{192127} -\ltj@@listing@jpset{192128}{192255} -\ltj@@listing@jpset{192256}{192383} -\ltj@@listing@jpset{192384}{192511} -\ltj@@listing@jpset{192512}{192639} -\ltj@@listing@jpset{192640}{192767} -\ltj@@listing@jpset{192768}{192895} -\ltj@@listing@jpset{192896}{193023} -\ltj@@listing@jpset{193024}{193151} -\ltj@@listing@jpset{193152}{193279} -\ltj@@listing@jpset{193280}{193407} -\ltj@@listing@jpset{193408}{193535} -\ltj@@listing@jpset{193536}{193663} -\ltj@@listing@jpset{193664}{193791} -\ltj@@listing@jpset{193792}{193919} -\ltj@@listing@jpset{193920}{194047} -\ltj@@listing@jpset{194048}{194175} -\ltj@@listing@jpset{194176}{194303} -\ltj@@listing@jpset{194304}{194431} -\ltj@@listing@jpset{194432}{194559} -\ltj@@listing@jpset{194560}{194687} -\ltj@@listing@jpset{194688}{194815} -\ltj@@listing@jpset{194816}{194943} -\ltj@@listing@jpset{194944}{195071} -\ltj@@listing@jpset{195072}{195199} -\ltj@@listing@jpset{195200}{195327} -\ltj@@listing@jpset{195328}{195455} -\ltj@@listing@jpset{195456}{195583} -\ltj@@listing@jpset{195584}{195711} -\ltj@@listing@jpset{195712}{195839} -\ltj@@listing@jpset{195840}{195967} -\ltj@@listing@jpset{195968}{196095} -\ltj@@listing@jpset{196096}{196223} -\ltj@@listing@jpset{196224}{196351} -\ltj@@listing@jpset{196352}{196479} -\ltj@@listing@jpset{196480}{196607} -\message{Hankaku} -\ltj@@listing@jpsetN{65280}{65376}{\lst@ProcessJALetter} -\ltj@@listing@jpsetN{65377}{65439}{\lst@ProcessJALetterHalf} -\ltj@@listing@jpsetN{65504}{65509}{\lst@ProcessJALetter} - -\message{Opening and Closing brackets} -\@temptokena{}% DO NOT REMOVE THIS LINE - -\ltj@@listing@jpsetN@{`,}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`。}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`,}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`.}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`・}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`:}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`;}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`?}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`!}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`゛}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"212B -\ltj@@listing@jpsetN@{`゜}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"212C -\ltj@@listing@jpsetN@{`´}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"212D -\ltj@@listing@jpsetN@{``}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"212E -\ltj@@listing@jpsetN@{`々}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2139 -\ltj@@listing@jpsetN@{`…}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2144 -\ltj@@listing@jpsetN@{`‥}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2145 -\ltj@@listing@jpsetN@{`‘}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"2146 -\ltj@@listing@jpsetN@{`’}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2147 -\ltj@@listing@jpsetN@{`“}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"2148 -\ltj@@listing@jpsetN@{`”}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2149 -\ltj@@listing@jpsetN@{`)}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`(}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`}}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`{}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`]}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`[}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`〔}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"214C -\ltj@@listing@jpsetN@{`〕}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"214D -\ltj@@listing@jpsetN@{`〈}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"2152 -\ltj@@listing@jpsetN@{`〉}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2153 -\ltj@@listing@jpsetN@{`《}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"2154 -\ltj@@listing@jpsetN@{`》}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2155 -\ltj@@listing@jpsetN@{`「}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"2156 -\ltj@@listing@jpsetN@{`」}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2157 -\ltj@@listing@jpsetN@{`『}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"2158 -\ltj@@listing@jpsetN@{`』}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"2159 -\ltj@@listing@jpsetN@{`【}{\lst@ProcessJALetter@inhibit@postbreak}%\jis"215A -\ltj@@listing@jpsetN@{`】}{\lst@ProcessJALetter@inhibit@prebreak}%\jis"215B -\ltj@@listing@jpsetN@{`ー}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〳}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〴}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〵}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〻}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`⦅}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`⦆}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`⦅}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`⦆}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〘}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`〙}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〖}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`〗}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`«}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`»}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`〝}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`〟}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`‼}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`⁇}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`⁈}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`⁉}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`¡}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`¿}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`ː}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`ª}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`º}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`¹}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`²}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`³}{\lst@ProcessJALetter@inhibit@prebreak} -\ltj@@listing@jpsetN@{`€}{\lst@ProcessJALetter@inhibit@postbreak} -\ltj@@listing@jpsetN@{`™}{\lst@ProcessJALetter@inhibit@prebreak} - -\ltj@@listing@jpset@after{other}% DO NOT REMOVE THIS LINE -\message{done.} 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 aa8c2bd3fda..f175f88f76b 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty @@ -3,76 +3,83 @@ % \NeedsTeXFormat{LaTeX2e} -\def\filedate{2012/02/02} -\def\fileversion{0.51} +\def\filedate{2012/09/22} +\def\fileversion{0.6} \ProvidesPackage{lltjp-listings}[\filedate\space\fileversion] \RequirePackage{listings,luatexbase-cctb} -% catcode 対策 -\newluatexcatcodetable\CatcodeTableLTJlistings -\setluatexcatcodetable\CatcodeTableLTJlistings{ - \luatexcatcodetable\CatcodeTableLaTeXAtLetter - \catcode"FFFFF=9%" - \setcatcoderange{"2000}{"FFFF}{13}% - \setcatcoderange{"20000}{"2FFFF}{13}} - % lowest level \def\lst@kanjitrue{\let\lst@ifkanji\iftrue} \def\lst@kanjifalse{\let\lst@ifkanji\iffalse} \lst@AddToHook{InitVars}{\lst@kanjifalse} +\def\lst@AppendLetter{% + \ltj@lst@setletterflag\lst@Append} \def\lst@AppendOther{% \lst@ifletter\lst@Output\lst@letterfalse\fi\lst@kanjifalse \futurelet\lst@lastother\lst@Append} -\def\lst@AppendLetter{% - \lst@ifletter - \lst@ifkanji\lst@Output\lst@kanjifalse - \fi - \else - \lst@lettertrue\lst@ifkanji\lst@kanjifalse\else\lst@OutputOther\fi - \fi - \lst@Append} - -\def\lst@ProcessJALetter{\lst@whitespacefalse \lst@AppendJALetter} -\def\lst@ProcessJALetterHalf{\lst@whitespacefalse \lst@AppendJALetterHalf} -\def\lst@ProcessJALetter@inhibit@prebreak{% - \lst@whitespacefalse \lst@AppendJALetter@inhibit@prebreak} -\def\lst@ProcessJALetter@inhibit@postbreak{% - \lst@whitespacefalse \lst@AppendJALetter@inhibit@postbreak} - -\def\lst@AppendJALetter{% - \lst@ifletter - \lst@Output - \else - \lst@ifkanji\else\lst@OutputOther\fi\lst@lettertrue - \fi\lst@kanjitrue - \advance\lst@length\@ne\lst@Append} -\def\lst@AppendJALetterHalf{% - \lst@ifletter - \lst@Output + +\def\ltj@lst@setletterflag{% + \lst@ifletter + \lst@ifkanji\lst@Output\lst@kanjifalse\fi + \else + \lst@lettertrue\lst@ifkanji\lst@kanjifalse\else\lst@OutputOther\fi + \fi} + +\def\ltj@lst@setkanjiflag{% + \lst@ifletter + \lst@Output + \else + \lst@ifkanji\else\lst@OutputOther\fi\lst@lettertrue + \fi} + +\def\ltj@lst@setopenflag{% + \lst@ifletter + \lst@letterfalse\lst@Output + \else + \lst@ifkanji\else\lst@OutputOther\fi + \fi\lst@kanjitrue} + +\def\ltj@lst@setcloseflag{% + \lst@ifletter\else\lst@lettertrue\fi\lst@kanjitrue} + +\def\lst@ProcessJALetter#1{% + \lst@whitespacefalse + \ifnum\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{`#1}}=0 + \ifnum\ltjgetparameter{postbreakpenalty}{`#1}>0 + \ltj@lst@setopenflag % 開き括弧類 \else - \lst@ifkanji\else\lst@OutputOther\fi\lst@lettertrue - \fi\lst@kanjitrue - \lst@Append} -\def\lst@AppendJALetter@inhibit@prebreak{% - \lst@ifletter\else\lst@lettertrue\fi\lst@kanjitrue - \advance\lst@length\@ne\lst@Append} -\def\lst@AppendJALetter@inhibit@postbreak{% - \lst@ifletter - \lst@Output + \ifnum\ltjgetparameter{prebreakpenalty}{`#1}>0 + \ltj@lst@setcloseflag % 閉じ括弧類,句読点 + \else + \ltj@lst@setkanjiflag % 通常の和文文字 + \fi\fi + \advance\lst@length\@ne % 和文文字は通常の2倍の幅 + \else + \ltj@lst@setletterflag + \fi + \lst@Append#1} + +\def\lst@ProcessJALetterHalf#1{% + \lst@whitespacefalse + \ifnum\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{`#1}}=0 + \ifnum\ltjgetparameter{postbreakpenalty}{`#1}>0 + \ltj@lst@setopenflag % 開き括弧類 \else - \lst@ifkanji\else\lst@OutputOther\fi - \fi\lst@letterfalse\lst@kanjitrue - \advance\lst@length\@ne\lst@Append} + \ifnum\ltjgetparameter{prebreakpenalty}{`#1}>0 + \ltj@lst@setcloseflag % 閉じ括弧類 + \else + \ltj@lst@setkanjiflag % 通常の和文文字 + \fi\fi + % 半角カナは欧文文字と同じ幅 + \else + \ltj@lst@setletterflag + \fi + \lst@Append#1} -% loading lltjp-listing-jpt.tex -\def\ltj@@listing@jpset#1#2{% fast: #2-#1+1 must be a multiple of 16 - \@tempcnta=#1 \@tempcntb=#2 \@temptokena{}% - \loop\relax\ifnum\@tempcnta<\@tempcntb\relax - \ltj@@listing@jpset@\global\advance\@tempcnta\sixt@@n\repeat - \ltj@@listing@jpset@after{#1} -} +% 半角カナの扱い + \def\ltj@@listing@jpsetN#1#2#3{% for (not large) range \@tempcnta=#1 \@tempcntb=\numexpr 1+#2\relax \@temptokena{}% \loop \global\advance\@tempcnta\@ne\ifnum\@tempcnta<\@tempcntb\relax @@ -88,64 +95,44 @@ \@temptokena{}% } -\begingroup -\catcode`\^^a0=13\catcode`\^^a1=13\catcode`\^^a2=13\catcode`\^^a3=13 -\catcode`\^^a4=13\catcode`\^^a5=13\catcode`\^^a6=13\catcode`\^^a7=13 -\catcode`\^^a8=13\catcode`\^^a9=13\catcode`\^^aa=13\catcode`\^^ab=13 -\catcode`\^^ac=13\catcode`\^^ad=13\catcode`\^^ae=13\catcode`\^^af=13 -\catcode`\^^b0=12\catcode`\^^b1=12\catcode`\^^b2=12\catcode`\^^b3=12 -\catcode`\^^b4=12\catcode`\^^b5=12\catcode`\^^b6=12\catcode`\^^b7=12 -\catcode`\^^b8=12\catcode`\^^b9=12\catcode`\^^ba=12\catcode`\^^bb=12 -\catcode`\^^bc=12\catcode`\^^bd=12\catcode`\^^be=12\catcode`\^^bf=12 -\gdef\ltj@@listing@jpset@{% - {\lccode`\^^a0=\@tempcnta \lccode`\^^b0=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a1=\@tempcnta \lccode`\^^b1=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a2=\@tempcnta \lccode`\^^b2=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a3=\@tempcnta \lccode`\^^b3=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a4=\@tempcnta \lccode`\^^b4=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a5=\@tempcnta \lccode`\^^b5=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a6=\@tempcnta \lccode`\^^b6=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a7=\@tempcnta \lccode`\^^b7=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a8=\@tempcnta \lccode`\^^b8=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^a9=\@tempcnta \lccode`\^^b9=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^aa=\@tempcnta \lccode`\^^ba=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^ab=\@tempcnta \lccode`\^^bb=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^ac=\@tempcnta \lccode`\^^bc=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^ad=\@tempcnta \lccode`\^^bd=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^ae=\@tempcnta \lccode`\^^be=\@tempcnta - \advance\@tempcnta\@ne\lccode`\^^af=\@tempcnta \lccode`\^^bf=\@tempcnta - \lowercase{\gdef\@temp{% - \gdef^^a0{\lst@ProcessJALetter^^b0}\gdef^^a1{\lst@ProcessJALetter^^b1}% - \gdef^^a2{\lst@ProcessJALetter^^b2}\gdef^^a3{\lst@ProcessJALetter^^b3}% - \gdef^^a4{\lst@ProcessJALetter^^b4}\gdef^^a5{\lst@ProcessJALetter^^b5}% - \gdef^^a6{\lst@ProcessJALetter^^b6}\gdef^^a7{\lst@ProcessJALetter^^b7}% - \gdef^^a8{\lst@ProcessJALetter^^b8}\gdef^^a9{\lst@ProcessJALetter^^b9}% - \gdef^^aa{\lst@ProcessJALetter^^ba}\gdef^^ab{\lst@ProcessJALetter^^bb}% - \gdef^^ac{\lst@ProcessJALetter^^bc}\gdef^^ad{\lst@ProcessJALetter^^bd}% - \gdef^^ae{\lst@ProcessJALetter^^be}\gdef^^af{\lst@ProcessJALetter^^bf}% - }}%\message{\meaning\@temp}% - }% - \@temptokena\expandafter\expandafter\expandafter\expandafter% - \expandafter\expandafter\expandafter{\expandafter\expandafter% - \expandafter\the\expandafter\@temptokena\@temp}% -} -\gdef\ltj@@listing@jpsetN@#1#2{{% +\def\ltj@@listing@jpsetN@#1#2{{% \@tempcnta=#1 \lccode`\~=\@tempcnta \lccode`\/=\@tempcnta \lowercase{\gdef\@temp{\gdef~{#2/}}}}% \@temptokena\expandafter\expandafter\expandafter\expandafter% \expandafter\expandafter\expandafter{\expandafter\expandafter% \expandafter\the\expandafter\@temptokena\@temp}% } -\endgroup - -\toks@{} -\input lltjp-listings-jpt.tex -\edef\ltj@@listing@jpcmd{\the\toks@} \toks@{} -\lst@AddToHook{Init}{% - \luatexcatcodetable\CatcodeTableLTJlistings - \ltj@@listing@jpcmd} +\ltj@@listing@jpsetN{65377}{65439}{\lst@ProcessJALetterHalf} +\edef\ltj@@listing@jpcmd{\the\toks@}\toks@{} + +% catcode 対策 +\newluatexcatcodetable\CatcodeTableLTJlistings +\setluatexcatcodetable\CatcodeTableLTJlistings{ + \luatexcatcodetable\CatcodeTableLaTeXAtLetter + \catcode"FFFFF=13%" + \setcatcoderange{"FF61}{"FF9F}{13}% 半角文字 +} + +% hook! +\lst@AddToHook{Init}{ + \luatexcatcodetable\CatcodeTableLTJlistings\ltj@@listing@jpcmd + \lccode`\~="FFFFF\lowercase{\let~\lst@ProcessJALetter}%" + \directlua{luatexbase.add_to_callback('process_input_buffer', + function(buf) + local ret = '' + for i = 1, utf.len(buf) do + local c = utf.sub(buf, i, i) + local cu = utf.byte(c) + if cu > 0x80 and tex.getcatcode(cu) \string~= 13 then + ret = ret .. utf.char(1048575) % U+FFFFF + end + ret = ret .. c + end + return ret + end, 'ltj.listings_unicode', 1)}} +\lst@AddToHook{ExitVars}{\directlua{luatexbase.remove_from_callback('process_input_buffer', 'ltj.listings_unicode')}} % 白線対策 |