NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Here the \expandafter instructions do one level expansion, while the \unexpand's prevent any further expansion. Without e-TeX, you could use token registers:
Here the \expandafter instructions do one level expansion, while the \unexpand's prevent any further expansion. Without e-TeX, you could use token registers:
but this is obviously more awkward (especially as the number of items grows).
Your suggestions don't work here because \hello is itself a macro with a parameter. Here we either need two \expandafter chains or exhaustive expansion:
Thanks! I think I get the idea now. I was somehow misleaded by expandafter definition that says that
\expandafter\a\b
"expands \b, then \a". A more correct statement I think would be that it expands \b than put \a back in front of it, not preventing it from being expanded. What I mean is that expandafter does not itself expands \a, right?
yes I agree that not using the braces does not work either. What I meant is that the code with the braces only works if the \hello command only takes a single argument...
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p