How to separate the CV and cover letter in moderncv?
You can have a separate letter file. A template is provided in the modercv github
letter.tex
\documentclass[11pt]{article}
\usepackage{kantlipsum} %% only for demo
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{marvosym}
\usepackage{graphicx}
\pagestyle{empty}
\usepackage[scale=0.775]{geometry}
\setlength{\parindent}{0pt}
\addtolength{\parskip}{6pt}
\def\firstname{John}
\def\familyname{Doe}
\def\FileAuthor{\firstname \familyname}
\def\FileTitle{\firstname \familyname's cover letter}
\def\FileSubject{Cover letter}
\def\FileKeyWords{\firstname \familyname, Cover letter}
\renewcommand{\ttdefault}{pcr}
\usepackage{url}
\urlstyle{tt}
\ifpdf
\usepackage[pdftex,pdfborder=0,breaklinks,baseurl=http://,pdfpagemode=None,pdfstartview=XYZ,pdfstartpage=1]{hyperref}
\hypersetup{
pdfauthor = \FileAuthor,%
pdftitle = \FileTitle,%
pdfsubject = \FileSubject,%
pdfkeywords = \FileKeyWords,%
pdfcreator = \LaTeX,%
pdfproducer = \LaTeX}
\else
\usepackage[dvips]{hyperref}
\fi
\begin{document}
\sffamily % for use with a résumé using sans serif fonts;
%\rmfamily % for use with a résumé using serif fonts;
\hfill%
\begin{minipage}[t]{.6\textwidth}
\raggedleft%
{\bfseries John Doe}\\[.35ex]
\small\itshape%
street and number\\
postcode city\\[.35ex]
\Telefon~phone number\\
\Letter~\href{mailto:[email protected]}{[email protected]}
\end{minipage}\\[1em]
%
\begin{minipage}[t]{.4\textwidth}
\raggedright%
{\bfseries Company XYZ}\\[.35ex]
\small\itshape%
street and number\\
postcode city
\end{minipage}
\hfill % US style
%\\[1em] % UK style
\begin{minipage}[t]{.4\textwidth}
\raggedleft % US style
\today
%April 6, 2006 % US informal style
%05/04/2006 % UK formal style
\end{minipage}\\[2em]
\raggedright
Dear Sir or Madam:\\[1.5em]
%
\kant[1-3]
%Yours sincerely,\\[2em] % if the opening is "Dear Mr(s) Doe,"
Yours faithfully,\\[2em] % if the opening is "Dear Sir or Madam,"
%
%\includegraphics[scale=0.75]{signature_blue}\\
{\bfseries John Doe}\\
%
\vfill%
{\slshape Enclosure}
{\slshape Attachment: curriculum vit\ae{}}
\end{document}
And CV.tex
\documentclass[11pt,a4paper]{moderncv}
% moderncv themes
\moderncvtheme[blue]{casual} % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)
%\moderncvtheme[green]{classic} % idem
% character encoding
\usepackage[utf8]{inputenc} % replace by the encoding you are using
% adjust the page margins
\usepackage[scale=0.8]{geometry}
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
%\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}} % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details
%\AtBeginDocument{\recomputelengths} % required when changes are made to page layout lengths
% personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title (optional)} % optional, remove the line if not wanted
\address{street and number}{postcode city} % optional, remove the line if not wanted
\mobile{mobile (optional)} % optional, remove the line if not wanted
\phone{phone (optional)} % optional, remove the line if not wanted
\fax{fax (optional)} % optional, remove the line if not wanted
\email{email (optional)} % optional, remove the line if not wanted
\homepage{homepage (optional)} % optional, remove the line if not wanted
\extrainfo{additional information (optional)} % optional, remove the line if not wanted
\photo[64pt]{picture} % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted
\quote{Some quote (optional)} % optional, remove the line if not wanted
% to show numerical labels in the bibliography; only useful if you make citations in your resume
\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\makeatother
% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\section{Master thesis}
\cvline{title}{\emph{Title}}
\cvline{supervisors}{Supervisors}
\cvline{description}{\small Short thesis abstract}
\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
\begin{itemize}%
\item Sub-achievement (a);
\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
\begin{itemize}
\item Sub-sub-achievement i;
\item Sub-sub-achievement ii;
\item Sub-sub-achievement iii;
\end{itemize}
\item Sub-achievement (c);
\end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\section{Languages}
\cvlanguage{Language 1}{Skill level}{Comment}
\cvlanguage{Language 2}{Skill level}{Comment}
\cvlanguage{Language 3}{Skill level}{Comment}
\section{Computer skills}
\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvcomputer{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvcomputer{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
\section{Interests}
\cvline{hobby 1}{\small Description}
\cvline{hobby 2}{\small Description}
\cvline{hobby 3}{\small Description}
\section{Extra 1}
\cvlistitem{Item 1}
\cvlistitem{Item 2}
\cvlistitem[+]{Item 3} % optional other symbol
\renewcommand{\listitemsymbol}{-} % change the symbol for lists
\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
\cvlistdoubleitem{Item 2}{Item 5 \cite{book1}}
\cvlistdoubleitem{Item 3}{}
% Publications from a BibTeX file without multibib\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}% for BibTeX numerical labels
\nocite{*}
\bibliographystyle{plain}
\bibliography{publications} % 'publications' is the name of a BibTeX file
% Publications from a BibTeX file using the multibib package
%\section{Publications}
%\nocitebook{book1,book2}
%\bibliographystylebook{plain}
%\bibliographybook{publications} % 'publications' is the name of a BibTeX file
%\nocitemisc{misc1,misc2,misc3}
%\bibliographystylemisc{plain}
%\bibliographymisc{publications} % 'publications' is the name of a BibTeX file
\end{document}
No need to write the letter in a different file, nor is convenient if you want to use the same footer that the curriculum.
\documentclass{moderncv}
\usepackage[utf8]{inputenc}
% Uncomment next line to reproduce exactly the MWE image
% \usepackage[margin=1cm,bmargin=3cm,paperwidth=15cm, paperheight=12cm]{geometry}
\moderncvtheme[blue]{casual}
\firstname{John}
\familyname{Doe}
\title{Curriculum vit\ae}
\address{MyStreet, 24}{012345}
\mobile{000 000 000}
\phone{555 555 555}
\fax{888 888 888}
\email{[email protected]}
\homepage{http://example.com}
\extrainfo{This a MWE for TeX.SX}
\photo[64pt]{example-image}
\quote{To work or not shouldn't be a question }
% Letter Information
\recipient{HR Department}{Corporation\\123 Pleasant Lane\\12345 City, State} % Letter recipient
\date{\today}
\opening{Dear Sir or Madam,} % Opening greeting
\closing{Sincerely yours,} % Closing phrase
\enclosure[Attached]{curriculum vit\ae{}} % List of enclosed documents
\begin{document}
{\fancyfoot[r]{} % No page/lastapage in the letter
\setcounter{page}{0} % Change if letter is more than 1 page
\makelettertitle % Print letter title
Lore ipum dolor % Letter body
sit amet, consectetuer
adiscipliging elit.
Up purus ...
\makeletterclosing % Print letter signature
\newpage
% this is the page "1/1" % (no number when total pages = 1)
}% end of pages without page/lastapage}
\maketitle
\section{Academic titles}
\cventry{2010--2012}{etcetera ...}{}{}{}{}
\newpage
% this is the page "2/2"
\section{Experience}
\cventry{2013--2015}{etcetera ...}{}{}{}{}
\end{document}
Use \end{document}
instruction after your cv reference. Write the cover letter separately.