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?
\RequirePackage{xcolor}\pagecolor{yellow!50!white}(untested) – Johannes_B Jun 18 '17 at 06:53\AtBeginDocument{....}. (untested) – Ulrike Fischer Jun 18 '17 at 06:55