LATEX-L Archives

Mailing list for the LaTeX3 project


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
David Carlisle <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Tue, 30 Jun 1998 10:18:00 +0100
text/plain (55 lines)
spec  arg forms              meaning
~~~~  ~~~~~~~~~              ~~~~~~~~
u     \cmd                   unexpanded/unbraced token
n     \cmd  {\cmd}           token name
c     \cmd  {\cmd1\cmd2...}  container; the contents will be passed as
                                argument [\expandafter{\cmd}]
l     \cmd  {\cmd1\cmd2...}  token list
x     \cmd  {\cmd1\cmd2...}  expanded token list

A further spec is to be used with \exp_args:
d   \cmd  {\cmd}     dormant; usually n but it will not be expanded
                     in protected expansions.

....... and uppercase variants of  these.


I Would need to experiment a bit more with it before really
commenting, but in anycase having some control over arguments in
protected contexts must be useful (even in etex which has some
primitive protection mechanism)

> Actually, the problem is always present if diferent variants of
> \exp_args and command specs are mixed: \exp_args:Noox\cmd:nNxn...
> What? :-) )

Yes the current exp_arg schemes really assume that the underlying
command is of type nnnn (or possibly some N's). If you apply it to
something that already has a `different' argument type you get a mess.

> So \def:Npn #1{\tex_def:D #1} instead
> of \let:NN\def:Npn\tex_def:D. In the notation above that gives
> \def:npl \def:npx \def:Npl \def:Npx.

The whole question of what to do with the primitives is not clear.
Initially the names like \def:Npn were defined in the initial pass
through the TeX primitives. That is, each primitive was given a new name
(and then the old name undefined).  While descripibing the system for
the paper at TUG98 this summer we decided to switch to a regular
naming scheme for the primitives of \tex_(old name):D and then \let
them to useable name(s) in the appropriate module (or modules).

This does `waste' some csnames (as the :D forms are not supposed to be
used) and it does let evil people like Phil reconstruct plain TeX by
relocating all the primitive commands in a consistent way, but it seemed
better than trying to decide the `right' new name for the primitives.

The hope was that apart from these low level modules most code would be
using (slightly) higher level functions in which the argument
conventions were more rationalized.