I'm writing my cv using moderncv, and I want to make it in 2 languages. I wrote a common part, which both languages will have, and specific ones, where I put the translated content. I also want to make 2 versions: one with contact information, and another without it.
In short: I want my cv in 4 versions: 2 languages, each one with and without contact information.
I looked for an automated way to do that, just for fun. The ideal answer would be a single main .tex file producing all the 4 versions. I found 2 answers here in tex.sx, this and this, where I think my ideal can be made combining both.
My main.tex have this code now
\ifx\conditionmacro\undefined
\immediate\protect\write18{%
pdflatex --jobname="cv-pt" "\includeonly{pt/personal,pt/contact,pt/content}\input{main}"
}%
\immediate\protect\write18{%
pdflatex --jobname="cv-pt-web" "\includeonly{pt/personal,pt/omitted,pt/content}\input{main}"
}%
\immediate\protect\write18{%
pdflatex --jobname="cv-en" "\includeonly{en/personal,en/contact,en/content}\input{main}"
}%
\immediate\protect\write18{%
pdflatex --jobname="cv-en-web" "\includeonly{en/personal,en/omitted,en/content}\input{main}"
}%
\expandafter\stop
\fi
\input{personal}
\include{pt/contact}
\include{pt/omitted}
\include{en/contact}
\include{en/omitted}
\begin{document}
\makecvtitle
\include{pt/content}
\include{en/content}
\end{document}
I could get this working only once without knowing how. I wish someone here can help me doing it.
I really really really don't want to use a Makefile or shell script to do this. =)
Thanks!