# Updating Friggeri's CV - Making it work with texlive 2015 and up - Too many errors

I am updating my old CV based on Friggeri's template, and now that I am using texlive 2015 instead of texlive 2013, I am finding maaaaany errors...

I compile it with LuaLaTeX and Biber for the bibliography.

I think most of the errors have to deal with the bibliography, which format all of a sudden is not understood...

Let me include a MWE below, where I think most of the errors are:

This is a MWE tex file:

\documentclass{MWE}

\begin{document}
\section{Publications}
\printbibsection{article}
\clearpage
\end{document}


This is a MWE cls file:

\ProvidesClass{MWE}[2016/08/31 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
\usepackage{hyperref}

%%%%%%%%%%%%%
% Structure %
%%%%%%%%%%%%%

\RequirePackage{parskip}
\newcounter{colorCounter}

\def\@sectioncolor#1#2#3#4#5{%
{%
\color{%
\ifcase\value{colorCounter}%
green\or%
blue\or%
magenta\or%
yellow\or%
brown\or%
turquoise\fi%
} #1#2#3#4#5%
}%
\stepcounter{colorCounter}%
}
\renewcommand{\section}[1]{
\par\vspace{\parskip}
{%
\@sectioncolor #1%
}
\par\vspace{\parskip}
}
\renewcommand{\subsection}[2]{
\par\vspace{.5\parskip}%
\par\vspace{.25\parskip}%
}
\pagestyle{empty}

%%%%%%%%%%%%%%%%%%%%
% List environment %
%%%%%%%%%%%%%%%%%%%%

\setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}
\newcommand{\entry}[4]{%
#1&\parbox[t]{11.8cm}{%
\textbf{#2}%
\hfill%

#4\vspace{\parsep}%
}\\}

\makeatletter
\renewenvironment{entrylist}{%
\par\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}\par
}
\makeatother

%%%%%%%%%%%%%%%%
% Bibliography %
%%%%%%%%%%%%%%%%

\RequirePackage[style=verbose, maxnames=99, sorting=ydnt, backend=biber, dateabbrev=true]{biblatex}

\DeclareFieldFormat[article]{title}{#1\par}

\DeclareBibliographyDriver{article}{%
\printfield{title}%
\par\vspace{0.1\baselineskip}%
\newblock%
\printnames{author}%
\par\vspace{0.1\baselineskip}%
\newblock%
{%
\usebibmacro{journal+issuetitle}%
\setunit{\space}%
\printfield{pages}%
\newunit%
\printlist{publisher}%
%\printfield{year}%included in issuetitle
\newunit%
}
\par\vspace{0.1\baselineskip}%
}

\DeclareFieldFormat[misc]{title}{#1\\}
\DeclareFieldFormat[misc]{type}{#1}

\newbibmacro*{bib:svtitle}{%
\savefield{title}{\lasttitle}}

\newbibmacro*{bib:svauthor}{%
\savename{author}{\lastauthor}}

\newbibmacro*{verifytitle}{%
\iffieldequals{title}{\lasttitle}{\hspace{\bibhang}}{%
\printfield{title}%
\undef\lastauthor}%
\usebibmacro{bib:svtitle}%
}

\newbibmacro*{verifyauthor}{%
\ifnameequals{author}{\lastauthor}
{}
{\printnames{author}\\}%
\usebibmacro{bib:svauthor}}

\newbibmacro*{newtitle}{%
\usebibmacro{verifytitle}}

\newbibmacro*{newauthor}{%
\usebibmacro{verifyauthor}}

\DeclareBibliographyDriver{misc}{%
\usebibmacro{newtitle}%
\usebibmacro{newauthor}%
{%
\scriptsize \textcolor{lightgray}{\faCaretRight}%
}
{%
\hspace{5px}%
\printfield{type} (\printfield{month} \printfield{year})%
\printfield{note}%
\printlist{location}%
}
\usebibmacro{finentry}%
}

\DeclareFieldFormat[thesis]{title}{#1\par}

\DeclareBibliographyDriver{thesis}{%
\printfield{title}%
\par\vspace{0.1\baselineskip}%
\newblock%
\printnames{author}%
\par\vspace{0.1\baselineskip}%
\newblock%
{%
\printfield{type}%
\usebibmacro{institution+location+date}%
\printfield{url}%
\newunit%
}
\par\vspace{0.1\baselineskip}
}

\DeclareNameFormat{author}{%
\ifblank{#3}{}{#3\space}#1%
\ifthenelse{\value{listcount}<\value{liststop}}
{}%
}

\newcommand{\printbibsection}[1]{
\begin{refsection}
\nocite{*}
\end{refsection}
}

\DeclareSortingScheme{chronological}{
\sort[direction=descending]{\field{year}}
\sort[direction=descending]{\field{month}}
\sort{\field{title}}
\sort[direction=descending]{\field{day}} %I include the day in entries in the same month and year
}


This is a MWE bib file:

@article{Levine1991,
author = {Levine, A J and Momand, J and Finlay, C A},
journal = {Nature},
pages = {453--456},
title = {{The p53 tumor suppressor gene}},
volume = {351},
year = {1991}
}
@article{Scully2000,
author = {Scully, R and Livingston, D M},
journal = {Nature},
pages = {429--432},
title = {{In search of the tumour-suppressor functions of BRCA1 and BRCA2.}},
volume = {408},
year = {2000}
}


Some of the errors that I find are the following (the ones I can reproduce with the MWE):

Undefined control sequence. \section{Publications}

Undefined control sequence. \printbibsection{article}

You can't use macro parameter character #' in horizontal mode. \printbibsection{article}

Missing \$ inserted. \printbibsection{article}

You can't use \spacefactor' in math mode. \printbibsection{article}

And warnings (the ones I can reproduce with the MWE):

sorting option to \printbibliography is no longer supported, use 'sorting' option to \newrefcontext.

Command \small invalid in math mode

Could anyone help me update the Friggeri's CV template? I have no idea what these errors/warnings mean and how to solve them. I think updating this CV template could be really useful for many people...

Thanks a lot!

• friggeri-cv is now in a state of not working anymore. Nobody wants to update that hideous thing. It was merely working for quite a while, but the biblatex update from march finally broke the template. Good thing. – Johannes_B Aug 31 '16 at 7:17
• Oh wow, I was not aware of that... Is there a similar template out there that works well? – DaniCee Aug 31 '16 at 7:20
• It is a CV, you need no template. All you need is maybe a tabular, a description list and an itemize list. That is really all you need. – Johannes_B Aug 31 '16 at 7:49
• IMO modernCV looks nicer anyway, and just plain works (including biblatex). @Johannes_B is perhaps a little optimistic, depending on the field, as things like a multi-column list can be useful without having to wrap itemizes inside tabulars. – Chris H Aug 31 '16 at 7:53
• @moewe If you want to fix the bib-related things, i can manage to update the template on ltemplates. You would also be mentioned (if you want to). – Johannes_B Aug 31 '16 at 7:56

Some of the bibliography code could probably be streamlined, but this answer shall focus on making things work again.

The main problem is the name format (see biblatex 3.3 name formatting) which can be fixed with

\DeclareNameFormat{author}{%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:given-family}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}


instead of the current \DeclareNameFormat{author}. Maybe there is a better solution than that, but this will restore proper functionality.

Another issue is that the sorting option is not valid as an argument to \printbibliography any more, it needs to be passed to a refcontext.

So we want

\newcommand{\printbibsection}[2]{%
\begin{refsection}%
\newrefcontext[sorting=chronological]%
\nocite{*}%
\end{refsection}}


for \printbibsection.

Something similar goes for the manual re-enactment of \printbibsection in cv_10.tex.

• I can't understand why you don't want to be assosiated with that template :-) +1 and Thanks – Johannes_B Aug 31 '16 at 8:43
• When I make this change to the classe file, I get an error and no output file is produced. The message I get is: stdin -> CV:pdf[1][2][3] xdvipdfmx:warning: invalid CMap xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object. Output file removed. Did somebody run into the same problem ? – Pierrick Oct 24 '16 at 9:44
• @Pierrick At face value that looks like something else entirely. Can you isolate the problem into an MWE and ask it as a new question. Preferably with details about how you compile your document as well as software versions. – moewe Oct 24 '16 at 16:26
• @moewe I will try to isolate it as soon as I get time to do it. will probalbly be in two weeks. – Pierrick Oct 26 '16 at 12:25

replacing bibheading with subbibliography after @moewe suggestion fixed everything. Thanks, wasn't really looking forward to create a new CV from scratch...

\newcommand{\printbibsection}[2]{%
\begin{refsection}%
\newrefcontext[sorting=chronological]%
\nocite{*}%

• Is this still specific to Friggeri's CV? If so, why doesn't moewe's answer work with bibheading? – Werner Mar 13 '17 at 21:38
• This is not an answer: at best it is a comment to @moewe's answer. And the best way to signal your approval with an answer on this site is to upvote it. (Of course, you may also leave a comment about the minor change.) – jon Mar 14 '17 at 1:46