# How to separate each section in moderncv to different tex files

How to separate each section in moderncv to different .tex files and include it in main file so that it becomes handy. Consider separating each sections Education to Education.tex, Experience to Experience.tex etc and include in main file.

How can this be accomplished?

This is quite easy with help of standalone package:

main document:

\documentclass{moderncv}
\usepackage{standalone}
% other package which you use
\begin{document}
\input{Education.tex}
\input{Experience.tex}
...
\end{document}


Files Education, Experience you write as

\documentclass[class=moderncv,
preview]{standalone}
.. other used packages
\begin{document}
\end{document}


On this way you can compile each file independently and use in the main file (as stated David Carlisle in his answer, when you like to form complete document.

Edit: For details, how to use standalone package, see the manual of package. There is describe more scenarios, how to use them. Of course, you can make simple text files without of possibilities of their compilation outside of main document.

The CV is usually short document, so its dividing into more (sub)files is not very sensible, however, if you do so, than their direct compilation become handy.

As for any tex file, just place the sections in separate files and then in your main file have

\input{Experience}


to input the contents of Experience.tex at that point.