is there a way to pass these strings:
\let\includegraphicsbak\includegraphics
\renewcommand*{\includegraphics}[2][]{\fbox{\includegraphicsbak[#1]{#2}}}
by command-line?
I tried:
latex "\let\includegraphicsbak\includegraphics \renewcommand*{\includegraphics}[2][]{\fbox{\includegraphicsbak[#1]{#2}}} \input{myfile.tex}"
but, obviously, it doesn't work because the compiler complains about "\includegraphics
is undefined" (at that point). Any idea to fix that?
\AtBeginDocument{....}
. (untested)