ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] wrong spacing after command with optional arguments
@ 2024-04-26 15:29 Pablo Rodriguez via ntg-context
  2024-04-26 16:18 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-04-26 15:29 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Dear list,

I have the following sample:

  \starttext
  \def\MyCommand{\doquadruplegroupempty\doMyCommand}

  \def\doMyCommand#1#2#3#4{%
    \iffourthargument
      #4%
    \orelse\ifthirdargument
      #3%
    \else
      #2%
    \fi}

  \MyCommand{}{second}{third}{fourth},\\
  \MyCommand{}{second}{third}{fourth} e,\\

  \MyCommand{}{second}{third},\\
  \MyCommand{}{second}{third} e,\\

  \MyCommand{}{second},\\
  \MyCommand{}{second} e,\\
  \stoptext

I don‘t know why only the command gets the space after right only when
the four arguments are provided.

What is wrong in my definition above?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________

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

end of thread, other threads:[~2024-04-26 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 15:29 [NTG-context] wrong spacing after command with optional arguments Pablo Rodriguez via ntg-context
2024-04-26 16:18 ` [NTG-context] " Wolfgang Schuster
2024-04-26 17:04   ` Pablo Rodriguez via ntg-context
2024-04-26 17:50     ` Wolfgang Schuster
2024-04-26 18:59       ` Pablo Rodriguez via ntg-context

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).