[texhax] \mark causing a blank line

Heiko Oberdiek heiko.oberdiek at googlemail.com
Tue Jun 23 17:55:29 CEST 2015


On 21.06.2015 00:45, Stan wrote:

> This sentence's length and the use of a mark create an unexpected blank
> line below for some reason..... \mark{mark}
> Removing one period after ``reason'', or the space before the mark,
> makes the blank line disappear. (I'm not saying that putting a space
> there makes sense.) Does anyone know why this happens? My only guess is
> that the mark prevents the space before it from being removed when TeX
> breaks the text into lines. I'm not sure if this is a bug, but it seems
> odd, at least.

When TeX finishes a paragraph, then it removes glue at the end and
replaces it by the value of `\parfillskip'. However, there are *two*
spaces at the end:

    reason..... \mark{mark}

TeX removes the space *after* `\mark{mark}', but the space
before `\mark{mark}' remains. Since this space is preceded
by a non-discardable item, the period character, this space
allows a line break at its left side.

Therefore this is indeed correctly fixed by removing the space
before `\mark'.

Yours sincerely
  Heiko Oberdiek

More information about the texhax mailing list