0

I am using the banking style in moderncv and attempting to put my contact info all in one line.

I have my margin set to 0.5in, but my contact info is split across two lines.

0.5in margin: 0.5in margin

As shown in the second image, with a 0.3in margin, there is still more than enough space left on the sides for it to have fit in the original 0.5in margin.

0.3in margin: 0.3in margin

How can I get this header to follow the margin I set and not require additional spacing?

\documentclass[12pt,letterpaper,sans]{moderncv}

\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[margin=.5in]{geometry}
\usepackage{lipsum}

\name{John}{Doe}
\phone{(012) 345-6789}
\email{[email protected]}
\social[linkedin]{john-doe}
\homepage{mywebsite.tld}

\begin{document}

\makecvtitle
\lipsum[1-1]

\end{document}

1 Answer 1

1

The added code will expand the available space to the full line.

a

\documentclass[12pt,letterpaper,sans]{moderncv}

\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[margin=0.5in,showframe]{geometry}

\usepackage{lipsum}

%************************************************************* added <<<<<<<<<<
\usepackage{xpatch}
\xpatchcmd{\makehead}
{\setlength{\makeheaddetailswidth}{0.8\textwidth}}
{\setlength{\makeheaddetailswidth}{\textwidth}}
{}{}
%*************************************************************

\name{John}{Doe}
\phone{(012) 345-6789}
\email{[email protected]}
\social[linkedin]{john-doexxxxx}
\homepage{mywebsite.tld}

\begin{document}
    
    \makecvtitle
    \lipsum[1-1]
    
\end{document}

You must log in to answer this question.

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