diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-28 15:54:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-28 15:54:16 +0000 |
commit | 7db7ee076f98cc2b3dca7228ae0e38ba4e88715a (patch) | |
tree | c15a7028a935446f0d5dcce2b5008a6f24e2242f /Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty | |
parent | ae29f8fd830ee6798b80ee088fdd0c92b1a215f4 (diff) |
luatexbase update (27may10)
git-svn-id: svn://tug.org/texlive/trunk@18560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty index d839e544bb3..5a78ea8a4fa 100644 --- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty +++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty @@ -52,7 +52,7 @@ \let\x\ProvidesPackage \fi \expandafter\endgroup -\x{luatexbase-attr}[2010/05/12 v0.2 Attributes allocation for LuaTeX] +\x{luatexbase-attr}[2010/05/27 v0.2a Attributes allocation for LuaTeX] \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname RequirePackage\endcsname\relax \input ifluatex.sty @@ -88,28 +88,22 @@ \RequirePackage{luatexbase-loader} \fi \luatexbase@directlua{require('luatexbase.attr')} -\newcount\lltxb@attribute@alloc -\lltxb@attribute@alloc\m@ne \def\newluatexattribute#1{% - \ifnum\lltxb@attribute@alloc<65535\relax - \global\advance\lltxb@attribute@alloc\@ne - \allocationnumber\lltxb@attribute@alloc + \begingroup\escapechar\m@ne \expandafter\expandafter\expandafter + \endgroup \expandafter\expandafter\expandafter + \allocationnumber \luatexbase@directlua{tex.write( + luatexbase.new_attribute("\luatexluaescapestring{\string#1}", true))}% + \ifnum\allocationnumber>\m@ne \global\luatexattributedef#1=\allocationnumber - \unsetluatexattribute#1% - \begingroup\escapechar\m@ne - \luatexbase@directlua{luatexbase.attributedef_from_tex( - '\luatexluaescapestring{\string#1}', '\number\allocationnumber')}% - \endgroup \wlog{\string#1=\string\luatexattribute\the\allocationnumber}% \else \errmessage{No room for a new \string\attribute}% \fi} \def\unsetluatexattribute#1{% - \ifnum\luatexversion<37\relax - #1=-1\relax - \else - #1=-"7FFFFFFF\relax - \fi} + \begingroup\escapechar\m@ne + \luatexbase@directlua{% + luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}% + \endgroup} \def\setluatexattribute#1#2{% #1=\numexpr#2\relax} \lltxb@attr@AtEnd |