[luatex] Trouble with subtype leftskip/rightskip.

Paul Isambert zappathustra at free.fr
Mon Aug 2 13:42:17 CEST 2010


Hello again and again,

(I'm obvioulsy investigating skips today.)

Here's a document. It gets all the glues in the lines of a paragraph and prints
some information to the log if the glue's width is 1sp, to which I've set
\leftskip, or 2sp, to which I've set \rightskip, so they can be spotted (don't
worry, those values doesn't appear anywhere else), or if subtype = 15, i.e. it's
\parfillskip. In case the glue is \left- or \rightskip, the subtype is also
printed. See the log below.

\directlua{%
  get_type = function(head)
    for line in node.traverse_id(0, head) do
      texio.write_nl("Here's a line:")
      for item in node.traverse_id(10,line.list) do
        if item.spec.width == 1 then
          texio.write_nl("That's leftskip with subtype " .. item.subtype)
        elseif item.spec.width == 2 then
          texio.write_nl("That's rightskip with subtype " .. item.subtype)
        elseif item.subtype == 15 then
          texio.write_nl("Here's a parfillskip")
        end
      end
    end
    return head
  end
  callback.register("post_linebreak_filter",get_type)
  }
\leftskip=1sp
\rightskip=2sp
% A two-line paragraph.
abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc
abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc
\bye

Here's the interesting part of the log:

...
Here's a line:
That's leftskip with subtype 7
That's rightskip with subtype 9
Here's a line:
That's leftskip with subtype 7
Here's a parfillskip
That's rightskip with subtype 8
...

The first line displays \leftskip with subtype 7 and \rightskip with subtype 9,
whereas the second line has subtype 8 for \rightskip. The manual says \leftskip
has subtype 8 and \rightskip has subtype 9. I think something is going wrong
here.

As far as I can tell, \rightskip flips its subtype with \parfillskip: it has 9
on all lines except on the last one, where it's 8.

I haven't investigated what value is returned by \belowdisplayshortskip (7
according to the manual) because my handling of math is far from good.

Best,
Paul, tremendously hoping that the bug isn't in his brain again

PS: In the previous thread on glue order, I've said the \hfi and \vfi primitives
from Omega aren't defined. You didn't react, Taco, so I mention it again, just
in case.


More information about the luatex mailing list