The space after the register entry is only ignored when you put it
before the start of a paragraph because ConTeXt saves the content
and flushes it at the start of the next paragraph.

When the register entry appear within in a paragraph or when TeX
is in horizontal mode (like in your footnote) the space after the argument
stays and appears in the text. In this case you have to put a comment
after it to ignore the space which is generated from the line break in your
document.

Wolfgang


Rik Kabel schrieb am 27.11.18 um 21:17:
On 11/27/2018 08:43, Rik Kabel wrote:
On 11/27/2018 05:38, mf wrote:
In my setup, i have an index of names:

\defineregister[Nome][...]

The indexing of names can be toggled with a mode: --mode=AddNames

The setup is something like this:

\startmode[AddNames]
  \Name[key]{term}\xmlflush{#1}
\stopmode
\startnotmode[AddNames]
  \xmlflush{#1}
\stopnotmode

I noticed that \Name[key]{term} adds some space, leading to a different typesetting of the paragraph in rare cases (especially in a paragraph full of names).

Can \Name[key]{term} add some space, or should i look for a different bug in my setup?

Sorry, no MWE; i tried, but i could not reproduce the problem in a minimal example.

This has been a long-standing issue with registers in straight (non-XML) code. I always follow a \index{} with a % to avoid it. I suspect that will help here as well, splitting onto two lines, as

\Name[key]{term}%
\xmlflush{#1}

or perhaps

\Name[key]{term}\letterpercent
\xmlflush{#1}

Have you tried this?

(I cannot construct an MWE at this point either.)

And now I can construct it, so here is a not-necessarily-minimal example. Note that the problem occurs in footnotes (and endnotes, left as an exercise to the curious).

\setuppapersize[A9]
\starttext
\startparagraph
Text
\startfootnote
Text
\stopfootnote
\stopparagraph
\startparagraph
\index{Strumpf}
Text
\startfootnote
\index{Strumpf}
Text
\stopfootnote
\stopparagraph\startparagraph
Text
\startfootnote
\index{Strumpf}%
Text
\stopfootnote
\stopparagraph
\stoptext

With the result:

--
Rik



___________________________________________________________________________________
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
___________________________________________________________________________________