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:
Morten Høgholm <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 11 Nov 2008 15:28:05 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
On Tue, Nov 11, 2008 at 9:06 AM, Frank Mittelbach wrote:

> depends on how efficient you want to make it ...

Or how much you want it expanded.

> \def_new:Npn \tlp_reverse:N #1 {
>  \tlp_set:Nx #1
>    {\tlist_reverse:o{#1}}
> }
>
> \def_new:Npn \tlist_reverse:o { \exp_args:No \tlist_reverse:n }

\def_new:Npn \tlp_reverse:N #1 {
   \tlp_set:Nf #1
   {\tlist_reverse:o{#1\exp_stop_f:}}
}

This reverses the list, leaving \exp_stop_f: in front, which in turn
is removed by the f expansion which comes to a halt.
-- 
Morten

ATOM RSS1 RSS2