Suppose I have received a selfcontained LaTeX source file, main.tex
.
It includes a file of macro definitions, my_macros.tex
, that the author
included in the preamble. This macro file is under my control, but,
besides beeing included by the author, shall not interfer with the LaTeXing
of the author.
To make it more precise: The file my_macros.tex
may well be empty, on
the computer the author uses. But because the author is my customer,
he agreed to including it.
On my computer, I can fill my_macros.tex
with whatever I like.
Is it possible to write some macros, and put them into my_macros.tex
, that
do the following:
After issuing
$ latex main.tex
I'll find a file in my filesystem, say main.nem
, that contains the documentclass
of the file main.tex
.
So if for example main.tex
looked like this
\documentclass{eth_super_article}
% ...
\input{my_macros.tex}
% ....
\begin{document}
%....
\end{document}
then main.nem
will contain the line and only the line
\documentclass{eth_super_article}