1

I'm writing my cover letter using moderncv.

When I compile/create the document, the text which I entered between \opening{} and \closing{} is placed at the top of the page. Followed by the adress and everything else.

In the log is written:

Underfull \hbox (badness 10000) in paragraph.

But even when I write it as one connected text it shows it like I explained above.

Any idea?

Here I tried to give an example. I'm using the blank moderncv template with only text entered between the two commands mentioned above. Nothing else.

    \documentclass[11pt,a4paper,sans,english]{moderncv}        % possible         options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper',         'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and         font family ('sans' and 'roman')
    \moderncvstyle{casual}                             % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
    \moderncvcolor{blue}                               % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
    %\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page
    \usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding you are using
    \usepackage[scale=0.75,a4paper]{geometry}
    \usepackage{babel}
    %----------------------------------------------------------------------------------
    %            personal data
    %----------------------------------------------------------------------------------
    \firstname{first name}
    \familyname{family name}
    \title{Resumé title}                               % optional,         remove/comment the line if not wanted
    \address{street and number}{postcode city}{country}         % optional, remove/comment the line if not wanted; the "country" arguments can be omitted or provided empty
    \mobile{mobile number}                          % optional, remove/comment the line if not wanted
    \phone{phone number}                           % optional, remove/comment the line if not wanted
    \fax{fax number}                             % optional, remove/comment the line if not wanted
    \email{email}                               % optional, remove/comment the line if not wanted
    \homepage{home page}                         % optional, remove/comment the line if not wanted
    \extrainfo{additional information}                 % optional, remove/comment  the line if not wanted
    % \photo[64pt][0.4pt]{picture}                       % optional,         uncomment the line if wanted; '64pt' is the height the picture must be resized         to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame)         and 'picture'   is the name of the picture file
    \quote{some quote}                                 % optional, remove/comment         the line if not wanted
    %
    \begin{document}
    %-----       letter       ---------------------------------------------------------
    % recipient data
    \recipient{Company Recruitment team}{Company's name\\Street address\\Zip Code City}
    \date{Date}
    \opening{Dear Sir or Madam,}

    Far curiosity incommode now led smallness allowance. Favour bed assure son things yet. She consisted consulted elsewhere happiness disposing household any old the. Widow downs you new shade drift hopes small. So otherwise commanded sweetness we improving. Instantly by daughters resembled unwilling principle so middleton. Fail most room even gone her end like. Comparison dissimilar unpleasant six compliment two unpleasing any add. Ashamed my company thought wishing colonel it prevent he in. Pretended residence are something far engrossed old off.\\

    She suspicion dejection saw instantly. Well deny may real one told yet saw hard dear. Bed chief house rapid right the. Set noisy one state tears which. No girl oh part must fact high my he. Simplicity in excellence melancholy as remarkably discovered. Own partiality motionless was old excellence she inquietude contrasted. Sister giving so wicket cousin of an he rather marked. Of on game part body rich. Adapted mr savings venture it or comfort affixed friends.\\

    Started his hearted any civilly. So me by marianne admitted speaking. Men bred fine call ask. Cease one miles truth day above seven. Suspicion sportsmen provision suffering mrs saw engrossed something. Snug soon he on plan in be dine some.\\

    By an outlived insisted procured improved am. Paid hill fine ten now love even leaf. Supplied feelings mr of dissuade recurred no it offering honoured. Am of of in collecting devonshire favourable excellence. Her sixteen end ashamed cottage yet reached get hearing invited. Resources ourselves sweetness ye do no perfectly. Warmly warmth six one any wisdom. Family giving is pulled beauty chatty highly no. Blessing appetite domestic did mrs judgment rendered entirely. Highly indeed had garden not.\\

    \closing{Yours faithfully,}
    \enclosure{enclosures}          % use an optional argument to use a string other than "Enclosure", or redefine \enclname
    \makelettertitle
    \makeletterclosing
    \end{document}
4
  • How can we replicate your behaviour? Can you provide us with a minimal working example (MWE)? It may be that your inputting content incorrectly...
    – Werner
    Oct 14, 2016 at 16:40
  • Sorry I edited it, hope it's okay like that.
    – n.o.b.667
    Oct 14, 2016 at 17:17
  • If you put makelettertitle after the body, it will be typeset after the body. Move the line on top.
    – Johannes_B
    Oct 14, 2016 at 17:31
  • I get this error if I put it below \begin document: Undefined control sequence. \makelettertitle
    – n.o.b.667
    Oct 14, 2016 at 17:40

1 Answer 1

2

The structure of your CV letter should be

\documentclass[<options>]{moderncv}

\moderncvstyle{<style>}
\moderncvcolor{<colour>}

% Various package choices

% Personal data (these things are used in the title/header/footer
\firstname{<first name>}
\lastname{<last name>}
% ...

\begin{document}

% Content for the CV letter
\recipient{<recipient information>}
\date{<date>}
\opening{<opening>}
\closing{<your closing>}
\enclosures{<enclosures>}
\makelettertitle

% Your letter
Lorem ipsum...

\makeletterclosing

\end{document}

Here is your input arranged in the above order:

enter image description here

\documentclass[11pt,a4paper,sans,english]{moderncv}        % possible         options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper',         'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and         font family ('sans' and 'roman')
\moderncvstyle{casual}                             % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue}                               % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page
\usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding you are using
\usepackage[scale=0.75,a4paper]{geometry}
\usepackage{babel}
%----------------------------------------------------------------------------------
%            personal data
%----------------------------------------------------------------------------------
\firstname{first name}
\familyname{family name}
\title{Resumé title}                               % optional,         remove/comment the line if not wanted
\address{street and number}{postcode city}{country}         % optional, remove/comment the line if not wanted; the "country" arguments can be omitted or provided empty
\mobile{mobile number}                          % optional, remove/comment the line if not wanted
\phone{phone number}                           % optional, remove/comment the line if not wanted
\fax{fax number}                             % optional, remove/comment the line if not wanted
\email{email}                               % optional, remove/comment the line if not wanted
\homepage{home page}                         % optional, remove/comment the line if not wanted
\extrainfo{additional information}                 % optional, remove/comment  the line if not wanted
% \photo[64pt][0.4pt]{picture}                       % optional,         uncomment the line if wanted; '64pt' is the height the picture must be resized         to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame)         and 'picture'   is the name of the picture file
\quote{some quote}                                 % optional, remove/comment         the line if not wanted
%
\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data
\recipient{Company Recruitment team}{Company's name\\Street address\\Zip Code City}
\date{Date}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully,}
\enclosure{enclosures}          % use an optional argument to use a string other than "Enclosure", or redefine \enclname
\makelettertitle

Far curiosity incommode now led smallness allowance. Favour bed assure son things yet. She consisted consulted elsewhere happiness disposing household any old the. Widow downs you new shade drift hopes small. So otherwise commanded sweetness we improving. Instantly by daughters resembled unwilling principle so middleton. Fail most room even gone her end like. Comparison dissimilar unpleasant six compliment two unpleasing any add. Ashamed my company thought wishing colonel it prevent he in. Pretended residence are something far engrossed old off.\\

She suspicion dejection saw instantly. Well deny may real one told yet saw hard dear. Bed chief house rapid right the. Set noisy one state tears which. No girl oh part must fact high my he. Simplicity in excellence melancholy as remarkably discovered. Own partiality motionless was old excellence she inquietude contrasted. Sister giving so wicket cousin of an he rather marked. Of on game part body rich. Adapted mr savings venture it or comfort affixed friends.\\

Started his hearted any civilly. So me by marianne admitted speaking. Men bred fine call ask. Cease one miles truth day above seven. Suspicion sportsmen provision suffering mrs saw engrossed something. Snug soon he on plan in be dine some.\\

By an outlived insisted procured improved am. Paid hill fine ten now love even leaf. Supplied feelings mr of dissuade recurred no it offering honoured. Am of of in collecting devonshire favourable excellence. Her sixteen end ashamed cottage yet reached get hearing invited. Resources ourselves sweetness ye do no perfectly. Warmly warmth six one any wisdom. Family giving is pulled beauty chatty highly no. Blessing appetite domestic did mrs judgment rendered entirely. Highly indeed had garden not.\\

\makeletterclosing
\end{document}

Here is a very similar output, produced using the default article class. The code presentation is far clearer in my opinion:

\documentclass{article}

\usepackage{geometry}
\geometry{hmargin=1in,top=.5in,bottom=1.5in,includeheadfoot}

\usepackage{fancyhdr,xcolor,fontawesome}
\usepackage{lipsum}% Just for this example

\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% No header rule
\fancyfoot[C]{%
  \color{black!55}% 55% black
  \sffamily
  \begin{tabular}{c}
    \bfseries first name family name \\
    \slshape street and number --- postal code --- country \\
    {\Large\faMobile}~mobile number \quad $\bullet$ \quad
      \faPhone~phone number \quad $\bullet$ \quad
      {\small\faFax}~fax number \quad $\bullet$ \quad
      {\small\faEnvelopeO}~email \\
    {\small\faGlobe}~home page \quad $\bullet$ \quad additional information
  \end{tabular}
}

\AtBeginDocument{\sffamily}
\setlength{\parindent}{0pt}% No paragraph indentation
\raggedright

\begin{document}

\begin{tabular}[t]{@{}l}
  \bfseries Company Recruitment team \\
  \slshape Company's name \\
  \slshape Street address \\
  \slshape Zip Code City
\end{tabular}\hfill
Date

\vspace{\baselineskip}

Dear Sir or Madam,

\vspace{\baselineskip}

\lipsum[1-3]

Yours faithfully,

\vspace{3\baselineskip}

{\bfseries first name family name}

\vspace{6\baselineskip}

\textcolor{black!55}{\slshape encl: enclosures}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .