Is there a script out there to expand LaTeX commands in a tex source?
I am submitting a manuscript source and I need a tool that expands a LaTeX command because I do not want some commands to appear in the source. Example source:
\documentclass{article}
\newcommand{\modified}[2]{#2}
\begin{document}
\modified{Old long
% Possible comments
Text} {New
correct
Text % with comments
}
\end{document}
After executing the command, I would like an output like this
\documentclass{article}
\newcommand{\modified}[2]{#2}
\begin{document}
New
correct
Text % with comments
\end{document}
If such a script doesn't exist, can you suggest tools to write one? For example, is there a Perl package that is LaTeX-aware?
Perlorsed, in my point of view – Apr 01 '16 at 08:38