[NTG-context] Ending strings with non-break space in lang-txt.lua

Marco Patzer lists at homerow.info
Wed Dec 5 19:47:31 CET 2018


I've got a few unfortunate line breaks in my documents. In particular, breaks
are introduced in between the string “page” and the number:

  See figure 1 at page

The reason is that many strings in lang-txt.lua end in a space, rather than a
non-break space:

    ["en"]="at page ",

I fixed this by defining

    [atpage=at page\nbsp]

So I wonder: Does it ever make sense to have a regular space at the end of
those commands? I just skimmed through the file and most, if not all, strings
ending in a space would actually benefit from having it replaced by a
non-break space IMO.


  {\in{figure}[#1] \labeltext{atpage}\at[#1]}

  \hsize 3cm
  See \pageref{foo}.

  \page \startplacefigure [reference=foo] \stopplacefigure


More information about the ntg-context mailing list