Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • At first sight: Why are you using \cs_generate_variant:Nn inside a macro? Why all those _set and _gset? If you want an expandable function, you definitely have to leave those out. I'm not sure what you want to do, but you have \tl_item:nn at your disposition. Commented May 18, 2015 at 19:39
  • @Manuel The key words are "I am trying...", but you right I will move the generate_variant functions out. I also changed all _set to Nx these are \edefs, so it should be closer to fully expandable. Commented May 18, 2015 at 19:41
  • 1
    Mmm… I'm not sure I understand (or you don't understand). If you want a function to be fully expandable, you need that everything inside is expandable and definetly \edef is an assignment, so it's not expandable. Commented May 18, 2015 at 19:49
  • 1
    I'm afraid there are too many things that should be improved. Your naming of variables is wrong, but it's the least thing. The last lines: \tl_gset:Nn \head_tl{\tl_head:f \start_tl} is completely wrong, because you probably want \tl_gset:Nf \head_tl {\tl_head:V \start_tl}; instead of \tl_gset:Nf \oldtail_tl {\start_tl } you should say \tl_gset_eq:NN \oldtail_tl \start_tl. But it's unclear why global setting is used. Commented May 18, 2015 at 21:27
  • If you really want a critique of your approach, I'll drop you a line-by-line one by e-mail. Commented May 18, 2015 at 21:54