On Thu, 17 Feb 2005, The Thanh Han wrote:
this probably has to do with the issue whether to copy or not margin_kern_node when unboxing a box we discussed a while ago.
Yes, seems so. Meanwhile i have temporarily reverted the status to _before_ patch-274, and then it shows here that even this example \font\testfont=cmr10 \testfont \pdfprotrudechars=2 \rpcode\font`\-=1000 \parindent0pt \hsize=126pt \newbox\testline \newbox\testbox \setbox\testbox\vbox{Margin kerning is the adjustments $\dots$} \setbox\testline=\vsplit\testbox to\baselineskip \unvbox\testline \setbox\testline=\lastbox \unhcopy\testline \bye gives an error: "! This can't happen (paragraph)" (wondering why this case wasn't detected before). So if one goes the way of removing margin_kern_node, it needs to be done _both_ for \unhbox and \unhcopy cases.
I have no idea how to solve it yet. Ignoring margin_kern_node during line-breaking seems to be the right thing to do, but I am afraid it's not enough. Leaving margin_kern_node nodes pass unboxing means that they can end up anywhere, hence we also need to handle them everywhere (which is very fragile).
It looks like after patch-292 one actually would be rather safe against "confusion" cases since it seems that \hboxes anyway can't be unhboxed or unhcopied into a vlist or into a math list; this is caught early by TeX. I couldn't yet find a case, where after patch-292 it would still give such an error. But patch-292 introduces typographic problems, weird breaks, and letters are running into each other, see the catastrophies in the following test file (which should run through smoothly after patch-292): \font\testfont=cmr10 \testfont \pdfprotrudechars=2 \rpcode\font`\-=1000 \parindent0pt \hsize=126pt \newbox\testline \newbox\testbox % \setbox\testbox\vbox{Margin kerning is the adjustments $\dots$} \beginsection --- 1 --- \hrule \copy\testbox \hrule \beginsection --- 2 --- \hrule \setbox\testline=\vsplit\testbox to\baselineskip \unvbox\testline \setbox\testline=\lastbox \line{\unhcopy\testline} ABC \unhcopy\testline XYZ\break \bye \unhcopy\testline\break \unhcopy\testline XYZ \hrule \beginsection --- 3 --- \rlap{\vbox{ \halign{#\unskip\hfil\cr A\cr \unhcopy\testline X\cr \noalign{\hrule} B\cr}}} \beginsection --- 4 --- \rlap{\vbox{ \halign{#\unskip\hfil\cr A\cr Margin kerning is the adjust-\cr Margin kerning is the adjust-C\cr \noalign{\hrule} B\cr}}} \bye And sorting these cases out so that they are right (after one knows what "right" should be) doesn't look straightforward to me. Regards, Hartmut