On 11/26/2025 3:15 PM, mf wrote:
Il 26/11/25 14:48, Thomas Meyer ha scritto:
\noindent\start[test]foo\stop bar\par
Am 26.11.25 um 14:29 schrieb mf:
\definestartstop[test]
[before={\inframed[width=3cm]\bgroup},after=\egroup\ignorespaces]
\noindent\start[test]foo\stop\ bar\par
Thanks Thomas for answering, but the space was intentional, to simulate
what, in my real XML, is something like this:
<Para><Span class="test">foo</Span> bar...</Para>
and the space is meaningful.
Once I want to separate the content of the <Span> from the rest in a
particular typesetting, I need to suppress the space.
Anyways, I found the solution looking into ConTeXt sources (core-
sys.mkiv or core-sys.mkxl): since startstop is a grouped command, I need
an \aftergroup to move the \ignorespaces outside of the group.
\definestartstop[test][...,after=\egroup\aftergroup\ignorespaces]
I tested it and it works in my XML, although not in the MWE above, where
a \gobbleoneargument can be used to suppress the next token (hopefully a
space).
Here's the working MWE:
------------------------------------------------
\starttext
\definestartstop[test]
[before={\inframed[width=3cm]\bgroup},after=\egroup\aftergroup\gobbleoneargument]
\noindent\start[test]foo\stop\ bar\par
\stoptext
------------------------------------------------
If you want no spacing at all:
{\nospacing test test\ test test}
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________