# Trasform Friggeri-CV to A4

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

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:

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) {%
{\thinfont #1}{\bodyfont  #2}
};
\node [anchor=north] at (name.south) {%
\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

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.

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
\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) {%
};
\node [anchor=north] (title) at (name.south) {%
};
\end{tikzpicture}
\vspace{2.5cm}
\vspace{-2\parskip}
}
\else
\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) {%
};
\node [anchor=north] (title) at (name.south) {%
};
\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%
#4\vspace{\parsep}%
}\\}
\else
\newcommand{\entry}[4]{%
\parbox[t]{2cm}{\hfill#1}&\parbox[t]{16cm}{%
\textbf{#2}%
%\hfill%