LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Message-ID: <[log in to unmask]>
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Bruno Le Floch <[log in to unmask]>
Date: Thu, 17 Feb 2011 23:19:13 -0500
Content-Type: text/plain; charset=ISO-8859-1
MIME-Version: 1.0
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: text/plain (33 lines)

> Put all of the stuff you've written together with some documentation,
> sticking to expl3 conventions, and send it to the list

As Joseph asked, I wrote some documentation.
(and the usual .ins, .dtx, .sty) I hope that naming it "l3..." is not an issue.

I ended up defining a new data structure: "conversion table" (ctab),
which behaves somewhat like a property list, plus a bunch of special
methods (for brace groups, etc.). For efficiency reasons, I went for
the "one macro per token" approach. This can be changed later.

Since the code leads to an expandable version of the "x" argument
specifier, I took the liberty of defining a *new argument type*, "e"
(for expandable x), via \::e. See Sections 2.5.5 and 2.5.4 for

Various things are coded:
- \Lowercase, \Uppercase, \NoCaseChange, which detect math mode ($ and $$)
- \tl_flip:n (I didn't want to overwrite \tl_reverse:n), \tl_token_count:n
- \exp_some:n{ .... \exp_this:N <token> ..... } will expand <token>
before anything else. Multi-expansion variants are also given.
- \exp_after:nN, expanding after a group
- Full expansion, and the possibility of having an "e" argument specifier.

@Joseph: I will take a look at how xparse grabs arguments.