ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* system macros/doquadrupleemtpy
@ 2008-09-03 14:41 Thomas A. Schmitz
  2008-09-03 16:58 ` Aditya Mahajan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas A. Schmitz @ 2008-09-03 14:41 UTC (permalink / raw)
  To: mailing ConTeXt users list for

Hi all,

I'm trying to define a macro \Command which can either have four or  
five arguments. If it has five, I want to define them as

\Command1[#1][#2][#3][#4]{#5}

if it has four, as

\Command2[#1][#2][#3]{4#}

I thought this would be the way to go:

\def\Command{%
	\doquadrupleempty\doCommand}

\def\doCommand{%
  	\iffifthargument%
  		\doquadrupleargument\Command1%
  	\else%
  		\dotripleargument\Command2%
  	\fi}

but that gives me errors about "too many }s". So I'm wondering: am I  
on the wrong track? Can this be done at all?

Thanks, and best

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


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

end of thread, other threads:[~2008-09-04  8:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-03 14:41 system macros/doquadrupleemtpy Thomas A. Schmitz
2008-09-03 16:58 ` Aditya Mahajan
2008-09-04  7:39   ` Thomas A. Schmitz
2008-09-03 18:32 ` Peter Rolf
2008-09-04  6:45 ` Wolfgang Schuster
2008-09-04  8:21   ` Thomas A. Schmitz

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