LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

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

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

Print Reply
Jonathan Sauer <[log in to unmask]>
Fri, 14 Dec 2007 08:58:20 +0100
text/plain (31 lines)

> [...]
> I can think of at least three advantages of this kind of 
> postprocessing:

4.	Arguments can be checked (i.e. a numeric argument to be
	in a given range, not empty etc.)

> [...]
> Implementation-wise, a postprocessor could simply be something which 
> fits the syntax
>    <postprocessor> <token register> <grabbed argument>

I would prefer the approach

	<postprocessor> <continuation> <grabbed argument>

where the postprocessor has the task of calling <continuation> (a macro,
possibly with additional parameters) with the <grabbed argument>. That
way, postprocessors can be chained (i.e. first check if it is empty and
replace with zero, then check that the value is not negative). The
final continuation would pass it on to the "real macro" or store it in
a token register.

> Lars Hellström