4

For some weird reason the otherwise very nice template that can be found here

http://www.latextemplates.com/template/friggeri-resume-cv

is not A4-paper but something else. If, however, I simply add a4paper as an option to the geometry package, it screws up the header, and more important, the spacing between the columns.

My version with a4paper:

what I have

Original:

original

I guess the header part has something to do with this part:

\newcommand{\header}[3]{%
  \begin{tikzpicture}[remember picture,overlay]
    \node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=4cm] (box) at (current page.north){};
    \node [anchor=center] (name) at (box) {%
      \fontsize{40pt}{72pt}\color{header}%
      {\thinfont #1}{\bodyfont  #2}
    };
    \node [anchor=north] at (name.south) {%
      \fontsize{14pt}{24pt}\color{header}%
      \thinfont #3%
    };
  \end{tikzpicture}
  \vspace{2.5cm}
  \vspace{-2\parskip}
}

It is done with TikZ, and makes as much sense to me as ancient egyptian glyph language. I tried some hacks with \raisebox and such, but it only screws up more.

So, does anyone have an idea of how to change the format to A4, and keep the name in the header centered vertically and the columns spaced properly?

  • Did you try recompiling? If I add \geometry{a4paper} to the sample CV file and compile twice, the header seems correct. – egreg Jun 3 '15 at 15:46
  • Yes, I realized that compiling twice solves some issues. But the header still moves a tiny bit to the bottom. Another bigger issue are the columns, I'll add an example in a second – Maxim Moloshenko Jun 3 '15 at 15:47
  • The main difference between the two screenshots is the content by the way. Which makes it an apple-orange comparison. – Johannes_B Oct 27 '15 at 9:18
4

In my answer I will address both the header concern, and the incorrect column spacing problem separately.

General Requirement

The first thing to do is to modify the .cls file by adding the following lines at the beginning after the main packages are loaded:

\newif\ifafourpaper

\afourpaperfalse


\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}%
    \afourpapertrue%
  }

\ProcessOptions

This will allow us to create two sets of code within the .cls file that will run depending on whether or not you have selected a4paper as an option when loading the class file.

Fixing the Header

When I change my Friggeri-style resume to a4paper, the header seems correct to me, however, if you want to tweak it you can do the following:

\usetikzlibrary{calc}
\ifafourpaper
    \newcommand{\header}[3]{%
      \begin{tikzpicture}[remember picture,overlay]
        \node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=3.5cm] (box) at (current page.north){};
        \path let \p1 = (box) in node[anchor=center] (name) at (\x1-0cm,\y1-0cm) {%
          \fontsize{40pt}{72pt}\color{header}%
          {\headingfonttwo #1}{\kern 0.2cm}{\headingfonttwo #2}
        };
        \node [anchor=north] (title) at (name.south) {%
          \fontsize{14pt}{24pt}\color{header}%
          \headingfonttwo #3%
        };
      \end{tikzpicture}
      \vspace{2.5cm}
      \vspace{-2\parskip}
    }
\else
    \newcommand{\header}[3]{%
      \begin{tikzpicture}[remember picture,overlay]
        \node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=3.5cm] (box) at (current page.north){};
        \node [anchor=center] (name) at (box) {%
          \fontsize{40pt}{72pt}\color{header}%
          {\headingfonttwo #1}{\kern 0.2cm}{\headingfonttwo #2}
        };
        \node [anchor=north] (title) at (name.south) {%
          \fontsize{14pt}{24pt}\color{header}%
          \headingfonttwo #3%
        };
      \end{tikzpicture}
      \vspace{2.5cm}
      \vspace{-2\parskip}
    }
\fi

The tikz library calc lets you save node coordinates (\p1 holding the coordinates of the node we defined as box) and recall them using \x1 and \y1.

Within the \ifafourpaper section, you can modify the \x1-0cm and \y1-0cm to shuffle around the name position to wherever you like (for example, shifting it up by 0.1cm would be \x1-0cm and \y1+0.1cm.

Column Spacing

The column spacing definitely does get messed up when switching to a4paper. I have adjusted it as follows:

\ifafourpaper
    \newcommand{\entry}[4]{%
      \parbox[t]{2cm}{\hfill#1}&\parbox[t]{15.5cm}{%
        \textbf{#2}%
        %\hfill%
        {, \normalsize\addfontfeature{Color=gray} \textit{#3}}\\%
        #4\vspace{\parsep}%
      }\\}
\else
    \newcommand{\entry}[4]{%
      \parbox[t]{2cm}{\hfill#1}&\parbox[t]{16cm}{%
        \textbf{#2}%
        %\hfill%
        {, \normalsize\addfontfeature{Color=gray} \textit{#3}}\\%
        #4\vspace{\parsep}%
      }\\}
\fi

Referenced

This question and this question.

  • Thanks a lot! I had to do some minor editing, but your tips were great, and I now have a CV that can be switched to A4 and a cover letter. In case anyone is interested - where could I upload it? Also - can I just bundle the Helvetica fonts, or should I better not do this, as they are not free? – Maxim Moloshenko Jul 16 '15 at 13:09
  • Why didn't you report the error at the time? – Johannes_B Oct 26 '15 at 11:44

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.