[lltx] luacolor bug

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sun Dec 12 02:43:29 CET 2010


On Fri, Dec 10, 2010 at 10:02:14PM +0100, Damien Robert wrote:

> 2) A bug in luacolor:
> 
> \documentclass{minimal}
> \usepackage{fontspec}
> \usepackage{luacolor}
> \defaultfontfeatures{Ligatures=TeX}
> \setmainfont{Latin Modern Roman} 
> \begin{document}
> Foo--Bar---Foo
> \end{document}
> 
> luacolor breaks the Tex Ligatures.

luacolor.sty loads luatex.sty that is not yet adopted to lualatexbase
(sorry I haven't returned to the luatex stuff yet).
Workaround:

\let\newattribute\newluatexattribute
\usepackage{luacolor}

Yours sincerely
  Heiko Oberdiek

PS:
Probably I will switch to luatexbase-attr.sty for luacolor
that also loads luatexbase-compat.sty. I found two problems
so far:

* [luatexbase-compat.sty]
  Bug: Missing curly braces:
    \luatexbase at directlua{tex.enableprimitives('luatex', '#1')}}
  should be:
    \luatexbase at directlua{tex.enableprimitives('luatex', {'#1'})}}

* [luatexbase-compat.sty]
  If eTeX isn't enabled, then \ifcsname isn't available.
  Perhaps it can be enabled before \begingroup:

\ifnum\luatexversion<37 %
\else
  \begingroup\expandafter\expandafter\expandafter\endgroup
  \expandafter\ifx\csname ifcsname\endcsname\relax
    \directlua{tex.enableprimitives('',{'ifcsname'})}%
  \fi
\fi
\begingroup % original line
...
\def\y#1{}%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname ifcsname\endcsname\relax
  \x{%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx\csname luatex#1\endcsname\relax
    \else
  }%
  \y\fi
\else
  \x{%
    \ifcsname luatex#1\endcsname
    \else
  }%
  \y\fi
\fi
\ifnum\luatexversion<37\relax % original line


More information about the lualatex-dev mailing list