[NTG-pdftex] [ pdftex-Bugs-274 ] \unhbox kills protrusion

noreply at sarovar.org noreply at sarovar.org
Wed Feb 9 12:35:12 CET 2005

Bugs item #274, was opened at 2005-01-31 03:09
You can respond by visiting: 

Category: hz
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Robert (schlcht)
Assigned to: The Thanh Han (hanthethanh)
Summary: \unhbox kills protrusion

Initial Comment:
Protrusion will break when boxes containing protruded
characters are \unhbox'ed. I've stumbled upon this when
using edmac/ledmac, which decomposes each paragraph
into lines, then reassembling them.

I wasn't sure whether protrusion is supposed to survive
this treatment but it does if one uses \unhcopy instead
of \unhbox.

Here's a greatly reduced example:
\font\testfont=cmr10 \testfont

   Margin kerning is the adjustments
   of the characters at the
   margins of a typeset text.
   \setbox\testline=\vsplit\testbox to\baselineskip
   \hbox to\hsize{\unhcopy\testline}% OK
   \hbox to\hsize{\unhbox\testline} % not OK

% --------------------------------------------------

Robert  <w.m.l[at]gmx.net>


Comment By: Martin Schröder (oneiros)
Date: 2005-02-09 12:35

Logged In: YES 

This has been fixed in 1.21a


Comment By: Hartmut Henkel (hhenkel)
Date: 2005-01-31 23:34

Logged In: YES 

There seems to be one place in hz.ch where \unhbox and
\unhcopy are treated differently:

%@x [1100] - margin kerning
%while link(tail)<>null do tail:=link(tail);
%if c = copy_code then begin
%    while link(tail)<>null do tail:=link(tail);
%else while link(tail) <> null do begin
%    r := link(tail);
%    if not is_char_node(r) and (type(r) = margin_kern_node)
then begin
%        link(tail) := link(r);
%        free_avail(margin_char(r));
%        free_node(r, margin_kern_node_size);
%    end;
%    tail:=link(tail);

After just commenting this piece out (as shown), both
\unhcopy and \unhbox do protrusion ok. Now i don't have the
slightest idea what this code is for, neither which side
effects would appear if it's removed...

Regards, Hartmut


You can respond by visiting: 

More information about the ntg-pdftex mailing list