[OS X TeX] Off Topic: changing command behavior (legacy issue)

Joseph C. Slater joseph.slater at wright.edu
Wed Sep 1 23:58:40 CEST 2004


On Sep 1, 2004, at 3:54 PM, Francesco Costanzo wrote:

> Hi There:
>
> I have a question concerning how to modify the behavior of a command I 
> have defined in a document I have written.
>
> *PREMISE*
> Currently, I have a command that works as follows:
>
> \mycommand[option]{FirstArgument}{SecondArgument}
>
> where `SecondArgument' is a string that gets used as the argument of a 
> \label command.
>
> *WHAT I WANT*
> I would like to modify the behavior of \mycommand so that the 
> following two forms result in the same outcome:
>
> form 1: \mycommand[option]{FirstArgument}{SecondArgument}
>
> form 2: \mycommand[option]{FirstArgument}{\label{SecondArgument}}
>
> In other words, if `SecondArgument' is a string then behave as usual; 
> if instead the second argument is already in the form 
> `\label{SecondArgument}' then use as is (as opposed to doing 
> \label{\label{SecondArgument}}).
>

Francesco,
I know the books. ;) . I looked around for a little while hoping the 
mechanism for ensuremath would shed some light on the problem (you need 
something like ensurelabel). Sorry that I had no luck, but maybe this 
will provide a starting point.
Joe

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list