3

I am using modern cv casual style. Currently I have personal info (address, street, phone, email) in footer.

Is it possible to have these information in header instead of footer and only in first page ?

1
  • Welcome to TeX.SX! Could you please provide your current source code (MWE)? By the way, the fancyhdr is the package you are looking for, it is one of the options.
    – Malipivo
    Commented May 7, 2014 at 11:20

1 Answer 1

2

I didn't clean up the code as cleaning up needs lots of re-writing.

\documentclass[a4paper]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage{geometry}

\firstname{\textsc{S}} % Your first name
\familyname{\textsc{K}} % Your last name

 %many footer words should have been header for symantec reason but they need lot of rewriting hence I left them as such
\makeatletter
\renewcommand*{\makecvfooter}{%
  \setlength{\headheight}{2cm}%
  \setlength{\headsep}{2cm}%
  \topmargin=-1cm
  \setlength{\footerwidth}{0.8\textwidth}%
  \fancypagestyle{plain}{%
    \fancyhead[c]{%
      \parbox[b]{\footerwidth}{%
        \centering%
        \color{color2}\addressfont%
        \vspace{\baselineskip}% forces a white line to ensure space between main text and footer (as footer height can't be known in advance)
        \ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
          \ifthenelse{\equal{\@addresscity}{}}{}{\addtofooter[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
          \ifthenelse{\equal{\@addresscountry}{}}{}{\addtofooter[~--~]{\@addresscountry}}%
          \flushfooter\@firstfooterelementtrue\\}%
        \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
          \addtofooter{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
        \ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
        \ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
        \ifthenelse{\isundefined{\@skype}}{}{\addtofooter{\skypesymbol\@skype}}%
        \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
        \ifthenelse{\lengthtest{\footerboxwidth=0pt}}{}{\flushfooter}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used
        }}}%
  \thispagestyle{plain}}
\makeatother

\address{}{}
\mobile{(+00 000) 0000}
\phone{(+00 00) 0000}
\fax{(000) 111 1113}
\email{[email protected]}
\begin{document}
\makecvtitle
\clearpage
\newgeometry{margin=1in}
new
\end{document}

enter image description here

You must log in to answer this question.

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