LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 8 Aug 2012 22:40:07 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
On 08/08/2012 22:33, Joel C. Salomon wrote:
> Hi again.
> 
> Is there some preferred style for referring to a family of function
> variants?  For example, from xpeek:
> 
> % \begin{macro}[aux]{\@@_if_in:NNTF}
> %   \begin{arguments}
> %     \item Token-list to search through (the “haystack”)
> %     \item Token to search for (the “needle”)
> %   \end{arguments}
> %   Among the \cs{tl_if_in:**\textit{TF}} conditionals
> %   defined in \pkg{expl3}, \cs{tl_if_in:NNTF} is missing.
> %   But since that’s the functionality I need, define it:
> %    \begin{macrocode}
> 
> Is “\tl_if_in:**TF” (with or without “TF” being italicized) a
> recognizable, non-ambiguous way to refer to those functions as a set,
> or is there a nomenclature already in use that I should rather adopt?
> 
> —Joel
> 

The team docs use something akin to regex syntax for this, but with a
slight 'twist'. In particular

  \@@_if_in:NN(TF)

is used to refer to \@@_if_in:NNT, \@@_if_in:NNF and \@@_if_in:NNTF, but
also \@@_if_in_p:NN if it exists.

On the other hand, something like

  \@@_set:(N|c)n

would refer to \@@_set:Nn and \@@_set:cn.

Often, within a syntax block the approach take is to refer to a 'base'
function only, so \@@_set:Nn, with the implication being that 'the same
follows' for variants as there is a defined relationship between these.
-- 
Joseph Wright

ATOM RSS1 RSS2