[NTG-pdftex] pdftex 1.20b protrusion: skip also zero-width glue?

The Thanh Han hanthethanh at myrealbox.com
Tue Jan 11 04:58:05 CET 2005


Hi,

in my opinion we should not change anything to make \\ work with
character protrusion. \\ is used to end a line at an arbitrary position,
not at the right margin. When one says '...foo\\', he/she doesn't
expect that 'foo' ends up exactly at the right margin, but anywhere. 

In the below case, I think '\break' should be used instead of '\\'


Regards,
Thanh

On Mon, Jan 10, 2005 at 11:52:05PM +0100, Hartmut Henkel wrote:
> Hi,
> 
> this is also an observation by Peter Muthesius on de.comp.text.tex: A
> LaTeX \\ line ending will not get the rightmost character in that line
> protruded. Reason is that \\ puts a glue_node "width 0pt plus 1fil" at
> the end of the line, which is not skipped by the cp_skipable macro in
> hz.ch.
> 
> Now, should one add also
> 
>         or ((type(#) = glue_node) and (width(glue_ptr(#)) = 0))
> 
> to the cp_skipable() macro? Then there would be "correct" protrusion
> also with lines ended by LaTeX \\. But as the glue provided by \\ has
> some fil component, this would influence also positioning of text with
> protrusion component on the line if \hfil is used on the same line. Here
> some pdfLaTeX example:
> 
> \documentclass[a4paper]{article}
> \pdfprotrudechars=1
> \tracingall
> \rpcode\font`\-=1000
> \begin{document}
> Es kommt eine Zeile mit hfil \hfil Ein-\\
> \hrule
> Es kommt eine Zeile mit hfill \hfill Ein-\\
> \hrule
> \pdfprotrudechars=0
> Es kommt eine Zeile mit hfil \hfil Ein-\\
> \end{document}
> 
> With normal pdflatex the 2nd "Ein-" will not protrude into the margin,
> but it would if the above line is inserted in hz.ch. However one sees
> the side effect, that the positioning of the "Ein-" is affected in the
> \hfil case, depending on whether protrusion is activated or not.
> 
> Any idea what would be the right behavior?
> 
> Regards, Hartmut
> _______________________________________________
> ntg-pdftex mailing list
> ntg-pdftex at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-pdftex
> 


More information about the ntg-pdftex mailing list