diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-cctbreg.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-cctbreg.sty | 28 |
1 files changed, 26 insertions, 2 deletions
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". |