[NTG-context] Spurious space in \definestartstop

Henri Menke henrimenke at gmail.com
Tue Jan 30 21:12:20 CET 2018


On Tue, 2018-01-30 at 11:58 +0100, Hans Hagen wrote:
> On 1/30/2018 11:34 AM, Henri Menke wrote:
> > 
> > On 01/30/2018 09:17 PM, Hans Hagen wrote:
> > > 
> > > On 1/30/2018 2:54 AM, Henri Menke wrote:
> > > > 
> > > > Dear list,
> > > > 
> > > > the title says it all.  Please add \ignorespaces in a place you deem
> > > > appropriate.  MWE is below.
> > > sometimes you will also add \removeuwantedspaces in the stop
> > I'm confused.  Does that mean there is going to be a fix?
> no, why should there be? spaces are never ignored after the last [...] 
> that is checked for unless a command has an explicit \ignorespaces

I'm not convinced.  Both "before" and "commands" see a \relax and therefore
\ignorespaces is dropped.  I can put \removeunwantedspaces there but that
deletes the space before \start.  The \framed command correctly drops the space
after the options.

---

\definestartstop
  [spurious space a]
  [before=\ignorespaces,
   after=\removeunwantedspaces]

\definestartstop
  [spurious space b]
  [before=\removeunwantedspaces,
   after=\removeunwantedspaces]

\starttext

Hello Foo Bar World

Hello \start[spurious space a] Foo Bar \stop\ World
%   ^^^ neither space        ^^^ is skipped

Hello \start[spurious space b] Foo Bar \stop\ World
%   ^^^ skips this space     ^^^ instead of this

Hello \startframed[offset=overlay] Foo Bar \stopframed\ World
% That's the behaviour I'm looking for.

\stoptext

> > 
> > > 
> > > > 
> > > > Cheers, Henri
> > > > 
> > > > ---
> > > > 
> > > > \definestartstop
> > > >     [spurious space]
> > > > 
> > > > \starttext
> > > > 
> > > > Hello World
> > > > 
> > > > Hello \start[spurious space] World \stop
> > > > %                          ^^^ spurious space here!
> > > > 
> > > > \stoptext
> > > > ________________________________________________________________________
> > > > ___________
> > > > If your question is of interest to others as well, please add an entry
> > > > to the Wiki!
> > > > 
> > > > maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-c
> > > > ontext
> > > > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > > > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > > > wiki     : http://contextgarden.net
> > > > ________________________________________________________________________
> > > > ___________
> > > > 
> > > 
> > ____________________________________________________________________________
> > _______
> > If your question is of interest to others as well, please add an entry to
> > the Wiki!
> > 
> > maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-conte
> > xt
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> > ____________________________________________________________________________
> > _______
> > 
> 


More information about the ntg-context mailing list