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
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Fri, 12 Sep 2008 12:29:51 +0100
text/plain (49 lines)
Frank Mittelbach wrote:
> some history, perhaps Morten can say more because I think he did some of the
> updates ...
> very early definition:
>   \def_long_new:Npn \tlp_put_right:Nn #1#2{\tlp_set:No #1{#1#2}}
> current documentation says
> % A word of warning is appropriate here: Token list pointers are
> % implemented as macros and as such currently inherit some of the
> % peculiarities of how \TeX\ handles "#"s in the argument of
> % macros. In particular, the following actions are legal
> % \begin{verbatim}
> % \tlp_set:Nn \l_tmpa_tlp{##1}
> % \tlp_put_right:Nn \l_tmpa_tlp{##2}
> % \tlp_set:No \l_tmpb_tlp{\l_tmpa_tlp ##3}
> % \end{verbatim}
> % |x| type expansions where macros being expanded contain |#|s do not
> % work and will not work until there is an |\expanded| primitive in
> % the engine. If you want them to work you must double |#|s another
> % level.
> %
> from which I infer that the 
>   \tlp_set:Nn \l_exp_tlp{#2}
> was actually added to raise the error when setting / adding to the tlp and not
> during some later expansion deep down.

Okay, seems sensible.

> However, we could do better now I guess given that we assume for expl3 that
> eTeX is the underlying engine nowadays
> however the problem will be to ensure that the single # will work in all
> circumstances ie all usages of tlps and I'm not sure that wil be possible

As I say, I've altered what I was trying to do to follow this advice.
So the problem is solved for me, at least.  I will be more careful about
this from now on (I suppose I should be anyway).
Joseph Wright