[lltx] fontspec, ragged2e and newluatexattribute

Arno Trautmann Arno.Trautmann at gmx.de
Tue Feb 19 23:08:11 CET 2013


Hi all,

today I found a nice bug that goes into my collection of favorite bugs: 
Combining \justifying from the ragged2e package with fontspec works. But 
only if no luatexattribute is set before fontspec is loaded: If one uses 
\setluatexttribute before loading fontspec, all spaces are gobbled when 
\justifying is called!

The following example shows the problem:

\documentclass{minimal}
\usepackage{luatexbase}
\usepackage{ragged2e}

\newluatexattribute\abc  % 1
\usepackage{fontspec}    % 2

\begin{document}
This is a space test.

\justifying
This is a spaceless test.
\end{document}

If you change lines 1 and 2, the problem disappeares. This happens on an 
updated TeXLive 2012, with

This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012)

Any ideas what this causes? In most cases it's no problem to load 
fontspec first, but it would be good to understand or solve this behaviour …

cheers
Arno


More information about the lualatex-dev mailing list