I'd like to expand a macro inside \AtBeginDocument, although I guess the concrete macro does not matter.


  \AtBeginDocument{\@input@{helper\x .tex}}%

Do something with the definitions from helper1.tex etc. 

The file inclusion works without the \AtBeginDocument{...}, and of course it does not work with it, as \x is not expanded at call time. I have the feeling the right amount of \expandafters in the right places will do the job, but I don't see it.


Or with expl3:

\clist_map_inline:nn { 1 , 2 , 3 }
  • 2
    +1 I suppose: you were quicker by a second as \x shorter than \tmp – David Carlisle Jul 4 '13 at 22:59
  • @DavidCarlisle That's almost automatic; isn't using \x with six different meanings lovely? – egreg Jul 4 '13 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.