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

Hartmut Henkel hartmut_henkel at gmx.de
Mon Jan 10 23:52:05 CET 2005


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


More information about the ntg-pdftex mailing list