Article View: comp.text.tex
Article #11816Re: problems with optional parameters...
From: Daniel Luecking
Date: Thu, 26 Feb 1998 00:00
Date: Thu, 26 Feb 1998 00:00
29 lines
1628 bytes
1628 bytes
Leo Cacciari <leo.cacciari@univ-pau.fr> writes:
>\newcommand{\Set}[2][\empty]{\ensuremath{\subscriptifnotempty{\mathsf{#2}}{#1}}\xspace}
>\newcommand{\Mname}[2][\empty]{\ensuremath{\subscriptifnotempty{\mathbf{#2}}{#1}}\xspace}
>\newcommand{\INMSet}[2][\empty]{\ensuremath{{\Set{#1}{#2}}^{\text{in}}}\xspace}
>\begin{document}
>When I type \verb|\INMSet[\Mname{M}]{S}| I espect to obtain somethyng
>like ${\mathsf{S}}_{\mathbf{M}}^{\text{in}}$ but I get
>\INMSet[\Mname{M}]{S} (ie.\ ${\mathbf{M}}S^{\text{in}}$).
>Why?
You have defined \Set as a command that takes one mandatory argument
and one optional argument. Your definition of \INMSet passes to \Set
only the mandatory argument. You are therefore executing the equivalent
of
$\Set[\empty]{\Mname{M}}{S}^{\text{in}}$\xspace
where the {S} is simply typeset alone and is not the argument of
any command.
--
Dan Luecking Dept. of Mathematical Sciences
luecking@comp.uark.edu University of Arkansas
http://comp.uark.edu/~luecking/ Fayetteville, AR 72101
Technical Details
Message-ID:
<6d4s17$1jd@picayune.uark.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34F5934A.11E96BF5@univ-pau.fr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9e16,e576764e3b867f51 X-Google-Attributes: gidf9e16,public X-Google-Thread: 10ee61,e576764e3b867f51 X-Google-Attributes: gid10ee61,public From: luecking@comp.uark.edu (Daniel Luecking) Subject: Re: problems with optional parameters... Date: 1998/02/26 Message-ID: <6d4s17$1jd@picayune.uark.edu> X-Deja-AN: 329020974 References: <34F5934A.11E96BF5@univ-pau.fr> Organization: The University of Arkansas Newsgroups: comp.text.tex,fr.comp.text.tex