Meer, Hans van der
11. April 2016 um 18:49


Could be of course. But the question is: from where the counterintuitive behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)
It’s easy to explain on the following example.

%%%% begin example
\starttext

\hfil Text\hfil

\hfill Text\hfill

\stoptext
%%%% end example

At the end of a paragraph TeX removes the last skip and inserts the \parskipfill [1] value which is by default "0pt plus 1fil".

For the first text line this results in the expected output but not for the second line because the inserted “fil” is smaller than the needed “fill”. You can check this when you change the \parskipfill stretchability from fil to fill:

%%%% begin example
\starttext

\hfill Text\hfill

\start \parfillskip = 0pt plus 1 fill
    \hfill Text\hfill \par
\stop

\stoptext
%%%% end example

[1] https://www.tug.org/utilities/plain/cseq.html#parfillskip-rp

Wolfgang