[lltx] unsetluatexattribute does not work

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri May 20 09:32:06 CEST 2011


On Fri, May 20, 2011 at 12:15:29PM +0900, Dohyun Kim wrote:

> Just as the title of this email says, when compiling a tex file as follows :
> 
> \input luatexbase-attr.sty
> \newluatexattribute\testattr
> \setluatexattribute\testattr{1}
> \showthe\testattr
> \unsetluatexattribute\testattr
> \showthe\testattr
> \bye
> 
> The result is :
> 
> This is LuaTeX, Version beta-0.60.2-2010071217 (TeX Live 2010) (rev 3736)
> ...<snip>
> (/usr/local/texlive/2010/texmf-dist/tex/luatex/luatexbase/attr.lua))
> > 1.
> l.4 \showthe\testattr
> 
> ?
> > 1.
> l.6 \showthe\testattr

A bug in luatexbase-attr.sty:

\def\unsetluatexattribute#1{%
  \begingroup\escapechar\m at ne
  \luatexbase at directlua{%
    luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
  \endgroup}

The unsetting is done locally and after the group
the old value of the attribute is restored.

Yours sincerely
  Heiko Oberdiek


More information about the lualatex-dev mailing list