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
Condense Mail Headers

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

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 27 Aug 2015 12:34:10 +0200
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Message-ID:
In-Reply-To:
Content-Type:
text/plain; charset=UTF-8
From:
Bruno Le Floch <[log in to unmask]>
Parts/Attachments:
text/plain (43 lines)
On 8/27/15, aparsloe <[log in to unmask]> wrote:
> I hadn't thought of the \use_none:... functions. (There is much of expl3
> which is *not* at my fingertips.) Thank you, and I see that they can
> absorb up to 9 tokens.

up to 9 brace groups, yes.

> Dare I continue the theme? For instance I have used rescanning of ( and
> ) to "group begin" and "group end" to obtain the parenthesised arguments
> of functions "at one gulp", e.g.
>
> \max(<variable number of terms>)
>
> or the parenthesised part (the inner sum) of
>
> \sum_{k=0}^{\infty}\frac{(-1)^{k}}{2^{k+1}}\left(\sum_{n=0}^{k}(-1)^{n}\binom{k}{n}\frac{1}{(k-n)!}\right)
>
> (= 1/e).

That's much harder.  Catcode changes are probably warranted in this
case, since teaching TeX to nest parentheses in this way is tough.
Maybe Joseph will have better ideas?  Abusing xparse, perhaps?

> Finally, in arguing against changing catcodes you are assuming a greater
> knowledge of TeX than I possess. There must be a reason for this
> deprecation.

We're not deprecating catcode changes, just saying that many cases are
better solved in a different way.  Your case above might be one where
using catcode changes makes sense.

> The great joy of discovering expl3 was that it made TeX
> programming available to someone familiar with basic (or even, dare I
> say it, line-numbered BASIC) programming concepts but with only a meagre
> knowledge of TeX. (So, for instance, I wonder why you use
> \cs_new_protected:Npn above rather than \cs_new:Npn or
> \cs_new_nopar:Npn. Interfaces3.pdf is thin on such matters.)

We should describe better the difference between expandable and
non-expandable commands.

Bruno

ATOM RSS1 RSS2