2

I want to limit width of the \extrainfo field, where I want place some long text. How can I do such thing? Now it looks like this:

enter image description here

I am using moderncv with casual blue style.

1 Answer 1

2

You can patch \makecvfooter so that \@extrainfo is placed inside a \parbox of the desired width and with the desired formatting; for example, using \linewidth for the width and \centering to have the information centered:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}

\makeatletter
\patchcmd{\makecvfooter}
  {\addtofooter{\@extrainfo}}
  {\addtofooter{\parbox{\linewidth}{\centering\@extrainfo}}}
  {}
  {}
\makeatother

% personal data
\name{John}{Doe}
\title{The title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information and some other text goes here and we add some more text for the example}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}


\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{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}

\end{document}

enter image description here

Update:

After the comment:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}

\makeatletter
\patchcmd{\makecvfooter}
  {\addtofooter{\@extrainfo}}
  {\addtofooter{\makebox[\linewidth]{\parbox{\textwidth}{\centering\@extrainfo}}}}
  {}
  {}
\makeatother

% personal data
\name{John}{Doe}
\title{The title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information and some other text goes here and we add some more text for the example; here we add osme additional text}
\photo[64pt][0.4pt]{picture}
\quote{Some quote}


\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{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}

\end{document}
1
  • It's almost great. One more question, how can I move this element to the left. I want fill total size of page? (with margins of course).
    – user52034
    May 20, 2014 at 0:21

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.