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{[email protected]}    
\extrainfo{\emailsymbol\emaillink{r\[email protected]}}

\newlength{\currentparskip}

\begin{document}

\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
[email protected]\\
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}

1 Answer 1

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{[email protected]}    
\extrainfo{\emailsymbol\emaillink{r\[email protected]}}

\newlength{\currentparskip}

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



\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
[email protected]\\
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{[email protected]}    
\extrainfo{\emailsymbol\emaillink{r\[email protected]}}

\newlength{\currentparskip}

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



\recipient{Department of Philology \\
Faculty of Humanities \\
University California\\
Elgsdelaan 1105 \\
1081 HV California\\
[email protected]\\
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
    Commented Aug 22, 2017 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
    Commented Aug 22, 2017 at 22:38

You must log in to answer this question.

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