auctex
[Top][All Lists]

## Re: [AUCTeX] Fold citep

 From: Ralf Angeli Subject: Re: [AUCTeX] Fold citep Date: Sat, 31 May 2008 18:58:45 +0200

* Joost Kremers (2008-05-31) writes:

> On Sat, May 31, 2008 at 05:57:59PM +0200, Ralf Angeli wrote:
>> > what happens if the optional argument isn't there, and the user hasn't
>> > supplied an optional argument? would you use some default string or leave
>> > it empty?
>>
>> Unless I am misunderstanding you, that's what the <alt_string> is for.
>
> sorry, my question was confusing. what i meant to say was: what happens
> if the optional argument isn't there, and the user hasn't supplied an
> *alternative string*?

Then the placeholder would be replaced by an empty string, I guess.

>> I'm not sure if this is flexible enough.  The scheme does not cater for
>> the situation where one wants to use a completely different string if
>> the optional argument is not found.  For example for "\item[foo]" you
>> might wanna display "foo:" but for "\item" just "*".
>
> mmm... perhaps i'm not understanding you correctly... isn't this what you
> get when you supply "*" as the alternative string? i.e. if you specify
> "[1:*]" as the replacement string?

This would result in "*" for "\item", but "foo" for "\item[foo]".  In
order to get "foo:" for "\item[foo]" one would need to supply "[1:*]:"
but this would result in "*:" for "\item".

--
Ralf