1

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}
  • 1
    why the complication of shell escape etc/ why not just put \newcommand{\EMAIL}{cccc@sss.com} into mysettings.sty and then just use \usepackage{mysettings} in both documents? – David Carlisle Aug 23 '15 at 14:58
3

I would avoid the complication of shell escape etc, and just put

\newcommand{\EMAIL}{cccc@sss.com}

into mysettings.sty and then just use

\usepackage{mysettings} 

in both documents.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.