Thanks, Aditya. Using \goto works better.

I have been abusing \reference for some time now, mainly to mark the end of a file in order to generate page numbers: E.g., \reference[EOF]{} just before \stoptext or \stopcomponent with \at[EOF]. This has worked for getting the page range of a chapter or paper. Is there a better way to do this?

Alan

On Fri, Aug 18, 2017 at 10:26 PM, Aditya Mahajan <adityam@umich.edu> wrote:
On Fri, 18 Aug 2017, Alan Bowen wrote:

Unlike \goto and \at, \in seems to insert an unwanted space before any text
that follows.

MWE—

starttext
Text\reference[abc]{}

\page
Text ,

\in{Text}[abc],

\at{Text, p.}[abc],

\goto{Text}[abc],
\stoptext

I am not sure if I consider this a bug. In a typical use case, \reference will have a value, e.g., \reference[abc]{whatever}. In that case, if you use \in{Text}[abc], there should be a non-breakable space between "Text" and "whatever". You appear to be abusing the reference system by giving an empty reference.

I think that usin \goto is better in this case rather than adding a check to \in for an atypical use case.

Aditya

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________