Lars Hellström wrote:
> Hmm... IMHO, the awkwardness here is partly due to using a list-oriented
> API to construct what really is a tree (even though we must _store_ it
> in linearised form, as a list).
Well, things do start of in a more structured format (I'm using a
property list to put each "part" together, but in the end I need
something TeX can print in one go).
> In order to respect this tree structure,
> I'd probably rather do the last two steps as
>
> \def\l_tmpa#1{
> \def\l_tmpa_tl{10^{#1}}
> }
> \expandafter\l_tmpa \expandafter{ \l_tmpa_tl} % Or use \exp_args:No
>
> if you pardon the primitives[*]. Of course, if the material isn't
> fragile -- the given example isn't -- then a single (protected) \edef is
> even simpler.
In the LaTeX2e version, I do use \[log in to unmask] However, I'm trying to
avoid this method, if possible, as it does not make the flow as clear.
With something like \tl_put_right:NV, the point that the contents of one
variable is being added to another variable is clearer, I think.
> [*] I'm starting to doubt I'll ever manage a transition to l3names,
> myself... Sure, some parts are really nifty, but other parts seem bent
> on establishing a computational model for LaTeX that I'm not quite
> comfortable with.
I guess this very much depends what you want to achieve. For what I'm
working on, I need lots of higher-level stuff such as loops, comparisons
and the like. It's at that level that LaTeX3 is useful to me, as I can
use the built-in ones rather than code them myself.
--
Joseph Wright
|