LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Sun, 7 Jul 2013 15:07:35 -0400
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Bruno Le Floch <[log in to unmask]>
Parts/Attachments: text/plain (36 lines)
Hi,

>> In fact one could think of also having
>>
>> \<thing>_case:nnTF
>>
>> where the T branch is selected if you have a match (in addition to
>> executing any match code from the "n" argument).
> This sounds more logical for me and I really like this idea. I think the
> true part is mostly a message instead of a function. However for me as a
> beginner it's more consistent in a expl3 manner. ;-)
>
> So after this small discuss I vote for the following:
>
> \<thing>_case:nn_p
> \<thing>_case:nnF
> \<thing>_case:nnT
> \<thing>_case:nnTF

I don't think we can really have \<thing>_case_p:nn (note that you
misplaced the "_p"), because the \<thing>_case:nn part leaves tokens
in the input stream, that would interact badly with the boolean
expression code.  E.g.,

    \bool_if:nTF { \int_case_p:nn {1*0} { {0}{} {1}{} } }

would only work because all "code" brace groups are empty.  I believe
that such a situation would be a job for a different function,
\<thing>_any:nn(TF), to be discussed separately:

    \int_if_any:nnTF {1*0} { {0} {1} } ...
    \bool_if:nTF { \int_if_any_p:nn {1*0} { {0} {1} } } ...

Regards,
Bruno

ATOM RSS1 RSS2