On Wed, 5 Dec 2018 19:47:31 +0100
Marco Patzer
Hi!
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 2.
The reason is that many strings in lang-txt.lua end in a space, rather than a non-break space:
["atpage"]={ ["labels"]={ … ["en"]="at page ", …
I fixed this by defining
\setuplabeltext [en] [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.
Example:
\def\pageref#1%% {\in{figure}[#1] \labeltext{atpage}\at[#1]}
\starttext \hsize 3cm See \pageref{foo}.
\page \startplacefigure [reference=foo] \stopplacefigure \stoptext
I agree, it drives me nuts to see p. 5 or in Figure 8 etc. Also, how about: \at{\labeltext{atpage}}[#1] (and does this make the space in the label redundant?) In any case it is a bit sloppy... Alan