ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* prevent gobbling of spaces when omitting optional argument
@ 2011-01-28 22:24 Florian Wobbe
  2011-01-29  8:51 ` Wolfgang Schuster
  2011-02-01 12:27 ` Wolfgang Schuster
  0 siblings, 2 replies; 7+ messages in thread
From: Florian Wobbe @ 2011-01-28 22:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

please consider the following minimal example:

\def\before{\dodoubleempty\dobefore}%
\def\dobefore[#1][#2]{before}

\starttext
\before[] after (should be: \before[]\ after without explicit \type{\ })\par
\before[]after\par
\before[][] after\par % this works
\before[][]after\par
\stoptext

How can I prevent gobbling the following space, when the second optional argument is not given (i.e. first line). The macro itself should not insert space if the command is followed by any other character (2nd and 4th line).

Thanks,
Florian

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-01 12:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 22:24 prevent gobbling of spaces when omitting optional argument Florian Wobbe
2011-01-29  8:51 ` Wolfgang Schuster
2011-01-29 14:57   ` Florian Wobbe
2011-01-29 16:21   ` Florian Wobbe
2011-01-29 17:09     ` Philipp Gesang
2011-01-29 17:20       ` Florian Wobbe
2011-02-01 12:27 ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).