I'm really sorry to ask this question but I find myself unable to answer it for myself, with little idea of what went wrong:
I created a template for my CV using LaTeX, which worked fine for a year, but I let it untouched for 2 months. I had to recently upgrade my linux distribution and lost a number of libraries in the process (I mention it without a clue whether it's relevant or not). The end of the story is that now, I can't compile my .tex
code.
Among various warnings, I see the error:
! LaTeX Error: \flushmaketitle undefined.
See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...
l.24
\renewcommand*{\flushmaketitle}
Another maybe relevant warning is
LaTeX Warning: You have requested package
moderncvheadiii', but the package provides
moderncvheadiii'.LaTeX Warning: You have requested package
moderncvbodyiii', but the package provides
moderncvbodyiii'.
Here is a cleared version of the .tex
file:
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{black}
\usepackage[utf8]{inputenc}
\usepackage[hscale=0.8, vscale=1, top=2.5cm]{geometry}
%\usepackage{libertine}
%\usepackage[sfdefault, light]{roboto} %% Option 'sfdefault' only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\usepackage[skins]{tcolorbox}
\renewcommand{\sfdefault}{phv}
\renewcommand{\seriesdefault}{l}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usetikzlibrary{patterns}
\usepackage{booktabs}
\definecolor{color0}{rgb}{0.,0.,0.}
\definecolor{color1}{rgb}{0., 0.6, 0.8}
\makeatletter
\renewcommand{\familydefault}{\sfdefault}
\renewcommand*{\flushmaketitle}{%
\strut\usebox{\maketitlebox}%
\savebox{\maketitlebox}{}%
\savebox{\maketitletempbox}{}%
\setlength{\maketitleboxwidth}{0pt}}
\renewcommand*{\maketitle}{
\setlength{\maketitlewidth}{0.7\textwidth}
\parbox{\maketitlewidth}{
\raggedright
\namestyle{\@firstname~\@lastname}\\
\vspace{0.2cm}
\addressfont\color{color2}%
\vspace{0.1cm}
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtomaketitle{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtomaketitle[~--~]{\@addresscity}
%
\flushmaketitle
\@firstmaketitleelementtrue}
}
%}
\addtomaketitle{\emaillink{\@email}}
\collectionloop{phones}{\addtomaketitle{\@mobile}}
\vspace{0.1cm}
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomaketitle{\@extrainfo}}%
\ifthenelse{\isundefined{\@title}}{}{\addtomaketitle{\@title}}%
%\ifthenelse{\isundefined{\@fax}}{}{\addtomaketitle{\@fax}}%
\vspace{0.1cm}
\flushmaketitle}\\[2.5em]}
\newcommand{\cfbox}[2]{%
\colorlet{currentcolor}{.}%
{\color{#1}%
\fbox{\color{currentcolor}#2}}%
}
% \patchcmd{\maketitle}{\\[2.5em]}{\hfill\raisebox{-1.5cm}{\cfbox{color1}{\includegraphics[width=80pt]{/home/pierre/Documents/Personnel/CVFR/moi1}}}\\[2.5em]}
\makeatother
\firstname{Pierre}
\familyname{Doe}
\address{Street}{Lane}
\mobile{+60669412}
\email{[email protected]}
\extrainfo{age\hspace{7pt}}
\title{\hspace{1pt}}
\fax{}
\begin{document}
\makecvtitle
\nopagenumbers{}
% this puts a dashed thing on the header
% \begin{tikzpicture}
% \fill[pattern=dots, pattern color=color1, overlay] (-0.2,0.2) rectangle (17,4.4);
% \end{tikzpicture}
\begin{tikzpicture}[radius=1cm,delta angle=180, overlay]
\node[circle,draw=color1,inner sep=1.3cm,fill overzoom image=/home/pierre/Documents/.jpg] (A) at (15cm,2.8cm) {};
\end{tikzpicture}
\vspace{0pt}\section{Formation}\vspace{4pt}
\cventry{something}{something}{}{}{}{}\vspace{-12pt}
\end{document}
\newcommand*{\flushmaketitle}{}
near the beginning will make the document compile though it will probably not look as you want it. The "You requested package..." warnings will not cause errors or stop compiling and so can be left. What I expect you want to know (outside my knowledge) is what the\flushmaketitle
command has been renamed to in the moderncv package.log
file (I mean from the time you can compile the cv)? If yes please check in thatlog
file which (old) version ofmoderncv
you have used. In the current version 2 the command is not defined. Can you explain in short words, what that command should do?moderncv
class underwent substantial refactoring when stepping the main version number to 2. Unfortunately, there's no hint in the documentation about what happened to\flushmaketitle