3 Feb
2009
3 Feb
'09
11:24 p.m.
Aditya Mahajan wrote:
Hi,
I want to write a macro which behaves differently depending on whether its argumet is a single character or not.
\MACRO[a] should give $X_{a}$ \MACRO[a:b] should give $X_{[a:b]}$
Any hints on how to do this?
\def\MACRO[#1#2]% {\doifelsenothing{#2} {$X_{#1}$} {$X_{[#1#2]}$}} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------