how to replace latex macros with their definitions (using latex)
Posted
by RamyenHead
on Stack Overflow
See other posts from Stack Overflow
or by RamyenHead
Published on 2009-10-02T14:17:38Z
Indexed on
2010/04/27
14:23 UTC
Read the original article
Hit count: 758
latex
|substitution
How can I replace all occurrence of user defined latex macros with their definitions?
For example, given this file
old.tex
\newcommand{\blah}[2]{#1 \to #2}
...
foo \blah{egg}{spam} bar
...
how to generate the file below in an automatic way
new.tex
...
foo egg \to spam bar
...
Instead of reimplementing latex macro logic with perl, can I use latex or tex engine itself to do this?
© Stack Overflow or respective owner