2

When I increase the scales to left=4cm, right=3cm, the second email in the footer goes to the next line. So, with the same scales as in the following letter template, how can I keep both emails in the footer on the same line, that is, how to prevent the second email from going the next line.

\documentclass[11pt,a4paper,sans]{moderncv}      
\moderncvstyle{casual}  
\moderncvcolor{blue}                               
\usepackage[utf8]{inputenc}                      
\usepackage[scale=0.95, top=1cm, bottom=2cm, left=4cm, right=3cm]{geometry}
\renewcommand*{\addressfont}{\small\mdseries}
\name{John}{Templeton}
\title{Resumé title}                             
\address{36 Mauniour, Valybir, Alcansa}{}{United States}
\phone[mobile]{+19193433283}                  
\email{rre8wwtrni@gmail.com}    
\extrainfo{\emailsymbol\emaillink{r\_ratreei@epi.ac.us}}

\newlength{\currentparskip}

\begin{document}

\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
M.h.vertt@mi.us\\
Job number:5675}{}

\date{\today}


\opening{To whom it may concern,}
\closing{Yours sincerely,\vspace{-0.5cm}}
\makelettertitle
\setlength{\currentparskip}{\parskip}
    \setlength{\parskip}{\currentparskip}

The body of the letter

\vspace{0.5cm}

\enclosure [\upshape Attached]{\upshape resume, writing sample.}      

\makeletterclosing

\clearpage

\end{document}
3

Well, one possibility is to change the defined width for the footer (0.8\textwidth) to be a little bit longer.

In moderncvfooti.sty you will find the definition

% lengths
\@initializelength{\footwidth}%
\renewcommand*{\recomputefootlengths}{%
  \setlength{\footwidth}{0.8\textwidth}} 

Add the following code to your preambel with a changed width:

\renewcommand*{\recomputefootlengths}{%
  \setlength{\footwidth}{0.85\textwidth}} % original: 0.8\textwidth

With the following MWE

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}

% character encoding
\usepackage[utf8]{inputenc}

% adjust the page margins
\usepackage[scale=0.95, top=1cm, bottom=2cm, left=4cm, right=3cm,showframe]{geometry} % left=4cm, right=3cm  left=2cm, right=1cm

\usepackage{blindtext} % to generate dummy text <===========================

%\setlength{\hintscolumnwidth}{3cm}
%\setlength{\makecvtitlenamewidth}{10cm}

% lengths
%\@initializelength{\footwidth}%
\renewcommand*{\recomputefootlengths}{% <======================================
  \setlength{\footwidth}{0.85\textwidth}} % original: 0.8\textwidth <==========


\renewcommand*{\addressfont}{\small\mdseries}
% personal data
\name{John}{Templeton}
\title{Resumé title}                               % optional, remove / comment the line if not wanted
\address{36 Mauniour, Valybir, Alcansa}{}{United States}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+19193433283}                   % optional, remove / comment the line if not wanted
\email{rre8wwtrni@gmail.com}    
\extrainfo{\emailsymbol\emaillink{r\_ratreei@epi.ac.us}}

\newlength{\currentparskip}

\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data



\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
M.h.vertt@mi.us\\
Job number:5675}{}

\date{\today}


\opening{To whom it may concern,}
\closing{Yours sincerely,\vspace{-0.5cm}}
\makelettertitle
\setlength{\currentparskip}{\parskip}% save the value of paragraph spacing

    \setlength{\parskip}{\currentparskip}% restore the value    


The body of the letter

\blindtext

\vspace{0.5cm}

\enclosure [\upshape Attached]{\upshape resume, writing sample.}


\makeletterclosing

\clearpage

\end{document}

you get the result:

the new footer

In version 1.3.0 of moderncvare the footer for cv (command \makecvfooter) and letter (\makeletterfooter) defined in file moderncvstylecasual.sty.

To change command \makeletterfooter you can use the following code:

\patchcmd{\makeletterfooter}{\setlength{\footerwidth}{0.8\textwidth}}{\setlength{\footerwidth}{0.85\textwidth}}{}{} % <==========

((And if you need it to change command \makecvfooter:

\patchcmd{\makecvfooter}{\setlength{\footerwidth}{0.8\textwidth}}{\setlength{\footerwidth}{0.85\textwidth}}{}{} % <==========

With the following MWE only for the usage with version 1.3.0

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{casual}
\moderncvcolor{blue}

% character encoding
\usepackage[utf8]{inputenc}

% adjust the page margins
\usepackage[scale=0.95, top=1cm, bottom=2cm, left=4cm, right=3cm,showframe]{geometry} % left=4cm, right=3cm  left=2cm, right=1cm

\usepackage{blindtext} % to generate dummy text <===========================

%\setlength{\hintscolumnwidth}{3cm}
%\setlength{\makecvtitlenamewidth}{10cm}

\patchcmd{\makeletterfooter}{\setlength{\footerwidth}{0.8\textwidth}}{\setlength{\footerwidth}{0.85\textwidth}}{}{} % <==========

\renewcommand*{\addressfont}{\small\mdseries}
% personal data
\firstname{John} % Your first name
\familyname{Templeton} % Your last name
\title{Resumé title}
\address{36 Mauniour, Valybir, Alcansa}{}{United States}
\mobile{+19193433283}
\email{rre8wwtrni@gmail.com}    
\extrainfo{\emailsymbol\emaillink{r\_ratreei@epi.ac.us}}

\newlength{\currentparskip}

\begin{document}
%-----       letter       ---------------------------------------------------------
% recipient data



\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
M.h.vertt@mi.us\\
Job number:5675}{}

\date{\today}


\opening{To whom it may concern,}
\closing{Yours sincerely,\vspace{-0.5cm}}
\makelettertitle
\setlength{\currentparskip}{\parskip}% save the value of paragraph spacing

    \setlength{\parskip}{\currentparskip}% restore the value    


The body of the letter

\blindtext

\vspace{0.5cm}

\enclosure [\upshape Attached]{\upshape resume, writing sample.}


\makeletterclosing

\clearpage

\end{document}
2
  • Interesting solution! – Shivid Aug 22 '17 at 22:37
  • Weird, It does not work here. It says: LaTeX Error: \recomputefootlengths undefined. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.29 \renewcommand*{\recomputefootlengths} {% – Sasan Aug 22 '17 at 22:38

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.