I'm working on my CV and the covering letter and I would like to compile both documents (two different document classes) in one run (more or less). Either way, I followed the example as shown in this thread (requires shell-escape) but unfortunately because I still have "virtually" two different document I can't pass commands and definitions (a la \newcommand{\EMAIL}{cccc@sss.com}) (just to make sure to use the same addresses etc. in the whole document). I thought about using a script file but because I'm using Windows (with MiKTeX and TexStudio) I rejected the idea. Is there a way to pass this information between two different document classes?
\documentclass{report}
\newcommand{\EMAIL}{cccc@sss.com}
\usepackage{filecontents,pdfpages}
\begin{filecontents*}{myletter.tex}
\documentclass{letter}
\begin{document}
My E-Mail: %\EMAIL ->Problem!!!
\end{document}
\end{filecontents*}
\immediate\write18{pdflatex myletter}
\begin{document}
\IfFileExists{myletter.pdf}{\includepdf{myletter.pdf}}{}
My E-Mail: \EMAIL
\end{document}
\newcommand{\EMAIL}{cccc@sss.com}intomysettings.styand then just use\usepackage{mysettings}in both documents? – David Carlisle Aug 23 '15 at 14:58