Sender: |
|
Date: |
Fri, 17 Jul 2015 15:05:52 +0100 |
Reply-To: |
|
Message-ID: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
7bit |
In-Reply-To: |
|
Content-Type: |
text/plain; charset=iso-8859-15 |
From: |
|
Parts/Attachments: |
|
|
On 17/07/2015 15:00, Alexander Grahn wrote:
> Joseph,
>
> On Fri, Jul 17, 2015 at 12:09:27PM +0100, Joseph Wright wrote:
>> by
>>
>> \bool_if:nTF
>> {
>> !\cs_if_exist:cTF {#1}
> really an `!' in front?
>
>> by
>>
>> \bool_if:nT
>> {
>> ! \cs_if_exist:NTF \fxocg@insert@OC
> same here.
>
>> which could be redone as for the first case in media9. However,
>> reviewing the code I realise that as you have \use:c here you'll
>> actually get away with it (the second part will evaluate even if the
>> csname is undefined). If you do want a 'safe' change then
>>
>> \bool_if:nTF
>> {
>> ! \cs_if_exist:cTF { OCGpdfobj#3 }
> same here.
>
> Alexander
Indeed :-)
I've tried to offer a 'minimal change' version of your code. To do that,
I've using the fact that \bool_if:nTF works by expansion. So
\bool_if:nTF
{
!\cs_if_exist:cTF {#1}
...
}
will find the "!" then expand what follows looking ultimately for
\c_true_bool or \c_false_bool. In the usual set up with something like
\cs_if_exist_p:c we have a function that will expand to one of these
outcomes. With \cs_if_exist:cTF that's not automatically the case but we
can put the logical outcomes into the T/F branches (as I did) to force
the same result.
--
Joseph Wright
|
|
|