Somebody \smash'd our company letter style

David Carlisle d.p.carlisle at gmail.com
Wed Apr 3 17:02:33 CEST 2019


This is not directly related to texlive, but this was a
documented change in last year's LaTeX release see

https://www.latex-project.org/news/latex2e-news/ltnews29.pdf

All Latex box constructs start in hmode. smash and phantom had been
overlooked and quite regularly caused issues when used at the start of
a paragraph. Similarly it was clearly a bug that \,  was a horizontal
space unless at the start of a paragraph when it was a vertical space.

The changed behaviour you show here is only occurring as \smash is
being used in combination with tex primitive box constructs so given
that, wrapping it in \hbox is reasonable adjustment or, as for all
changes to the kernel, you could use the latexrelease package to roll
back the definitions to an earlier format.

The definition of \smash in latex has not been the same as in plain
since colour support was added 25 years ago.

Sorry this affected your code, we did check all existing code in ctan
packages for likely conflicts, as well as our test suite. That and he
fact that this has been used in the released latex for some months
with no reported problems until now does suggest that overall this
change  is for the best, giving a far more consistent behaviour for
latex box and spacing commands at the start of a paragraph.

David





On Mon, 1 Apr 2019 at 21:10, Hartmut Henkel <hartmut_henkel at gmx.de> wrote:
>
> Hi,
>
> with newest TeX Live testing, running letters through our (din-brief)
> based letterstyle, the footer info (company address, phone, etc.) at the
> lower page end slips to the top of the page, ugly. The reason seems to
> be some changed functionality of \smash{}. We have been using \smash{}
> in vertical mode to shift stuff like a footers vertically around from
> some anchor position by \kern, conceptually something like:
>
> \documentclass{article}
> \def\briefkopf{%
>   \vbox to 0pt{
>     \smash{\hbox to \textwidth{Headerstuff\hss}}
>     \kern720bp
>     \smash{\hbox to \textwidth{Footerstuff\hss}}
>     \vss
>   }
> }
> \begin{document}
> \briefkopf
> \end{document}
>
> Now \kern doesn't work anymore here. Seems the reason is this line,
> found by "svn blame latex.base":
>
> 49390 karl \def\finsm at sh{\ht\z@\z@ \dp\z@\z@ \leavevmode at ifvmode\box\z@}
>
> It looks like recently a \leavevmode sneaked into the \smash{}
> definition, starting a new paragraph, and by this making \smash{} pretty
> incompatible with its former self and with Plain TeX. Our solution for
> now is to write \hbox{\smash{...}} in an updated letter style, but this
> change hits also many of our archived projects, where we have been
> happily using the \smash{}\kern idiom all along for many (> 30) years
> :-)
>
> It would be nice if this \leavevmode could still be removed. But it must
> have also some beneficial purpose yet unknown to me.
>
> Best Regards, Hartmut


More information about the tex-live mailing list