[tex4ht] enspace for \<space> instead of nbsp

Karl Berry karl at freefriends.org
Thu Feb 27 00:03:03 CET 2020

Hi tex4ht folks - at my (quite likely misguided) insistence, Michal has
made the \<space> (that is, "\ " and \<newline>, etc.) TeX command
generate an enspace
  (U+2002, https://www.fileformat.info/info/unicode/char/2002/)
instead of the previous nbsp
  (U+00A0, http://www.fileformat.info/info/unicode/char/00a0/)

This should be in tonight's TeX Live update.  If it turns out to be too
incompatible, we will change it back or make it an option. So please
report problems.

The idea is that \<space> in TeX is a valid breakpoint, as is the HTML
ensp, but nbsp is not. Although enspace is generally going to be larger
than a normal interword space, we hope it'll be close enough, given the
general vagaries of the web.

Apparently there is no way to generate a normal interword space that is
breakable except with an actual space character (U+0020), and that
collapses multiple successive spaces into one, no matter what form is
used.  \<space> must not collapse.

Another issue is whether the spaces disappear if the browser makes a
line break at them; for \<space>, we want them to disappear, but I fear
that nbsp (with or without <wbr>) does not.

Thanks Michal, and I hope I didn't break the world :). -k

Ref: https://puszcza.gnu.org.ua/bugs/?449

More information about the tex4ht mailing list.