0

So, I simply used a predefined template for my CV - Here, when the text exceeds the 1st page it simply jumps to the next page leaving the first page blank - Furthermore, when the text on the 2nd page exceeds 1 page, it simply continues on the 2nd page - It will not jump to page 3.

Here is the code - I really dont know which of the predefined code have something to do with this - Hope you can help me - the images shows the problem.

enter image description here

enter image description here

% -- Encoding UTF-8 without BOM

\ProvidesClass{cv-style}[2015/02/27 CV class]
\NeedsTeXFormat{LaTeX2e}

\DeclareOption{espanol}{\def\@cv@espanol{}}
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
\LoadClass{article}

%----------------------------------------------------------------------------------------
% Colors %
%----------------------------------------------------------------------------------------

\RequirePackage{xcolor}

\definecolor{white}{RGB}{255,255,255}

\definecolor{darkgray}{HTML}{333333}
\definecolor{gray}{HTML}{4D4D4D}
\definecolor{lightgray}{HTML}{999999}

\definecolor{blue}{HTML}{66D9EE}
\definecolor{red}{HTML}{FA2772}
\definecolor{orange}{HTML}{FE9720}
\definecolor{green}{HTML}{A7E22E}
\definecolor{purple}{HTML}{9358FE}
\definecolor{aquamarine}{HTML}{36AF90}

\definecolor{date}{HTML}{A4A4A4}

\ifdefined\@cv@print
\colorlet{blue}{gray}
\colorlet{red}{gray}
\colorlet{orange}{gray}
\colorlet{green}{gray}
\colorlet{purple}{gray}
\colorlet{aquamarine}{gray}
\colorlet{fillheader}{white}
\colorlet{header}{gray}
\else
\colorlet{fillheader}{gray}
\colorlet{header}{white}
\fi
\colorlet{textcolor}{gray}
\colorlet{headercolor}{gray}

%----------------------------------------------------------------------------------------
% Fonts %
%----------------------------------------------------------------------------------------

\RequirePackage[quiet]{fontspec}
\RequirePackage{unicode-math}

\newfontfamily\bodyfont{Roboto-Regular}[Path=fonts/]
\newfontfamily\bodyfontit{Roboto-LightItalic}[Path=fonts/]
\newfontfamily\thinfont{Roboto-Thin}[Path=fonts/]
\newfontfamily\headingfont{RobotoCondensed-Bold}[Path=fonts/]

\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor, Path = fonts/]{Roboto-Light}

\newcommand{\italica}[1]{%
  {\color{gray}\bodyfontit #1}%
}

%----------------------------------------------------------------------------------------
% Header %
%----------------------------------------------------------------------------------------

\RequirePackage{tikz}

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

%----------------------------------------------------------------------------------------
%   Last updated command %
%----------------------------------------------------------------------------------------

\RequirePackage[absolute,overlay]{textpos}
\RequirePackage{polyglossia}

\newcommand{\sethyphenation}[3][]{%
\sbox0{\begin{otherlanguage}[#1]{#2}
  \hyphenation{#3}\end{otherlanguage}}}
%\sethyphenation[<options>]{<language>}{<list of words separated by spaces>}

\ifdefined\@cv@espanol
\setdefaultlanguage{spanish}
\def\lastupdatedtext{Última Actualización el}
\else
\setdefaultlanguage[variant=british]{english}
\def\lastupdatedtext{Last Updated on}
\fi

\setlength{\TPHorizModule}{0.01\paperwidth}
\setlength{\TPVertModule}{0.01\paperwidth}

\newcommand{\lastupdated}{ 
\begin{textblock}{10}(11.3, 0.05)
  \raggedleft
  \fontsize{8pt}{10pt}\color{date}\thinfont 
  \lastupdatedtext{} \today
\end{textblock}}

%----------------------------------------------------------------------------------------
% Structure %
%----------------------------------------------------------------------------------------
\RequirePackage{parskip}

\newcounter{colorCounter}
\def\@sectioncolor#1#2#3{%
{%
  \color{%
    \ifcase\value{colorCounter}%
      blue\or%
      red\or%
      orange\or%
      green\or%
      purple\or%
      aquamarine\else%
      headercolor\fi%
  } #1#2#3%
}%
\stepcounter{colorCounter}%
}

\renewcommand{\section}[1]{
{\par\vspace{\parskip}
{%
  \LARGE\headingfont\color{headercolor}%
  \@sectioncolor #1%
}
\par\vspace{\parskip}}
}

\renewcommand{\subsection}[2]{
\par\vspace{.5\parskip}%
\Large\headingfont\color{headercolor} #2%
\par\vspace{.25\parskip}%
}

\newcommand{\jobtitle}[1]{%
  {\color{gray}\bodyfontit #1}%
}

\pagestyle{empty}

%----------------------------------------------------------------------------------------
% List environment %
%----------------------------------------------------------------------------------------

\setlength{\tabcolsep}{2pt}
\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
#1&\parbox[t]{12.8cm}{%
  \textbf{#2}%
  \hfill%
  {\footnotesize\addfontfeature{Color=lightgray} #3}\\%
  #4\vspace{\parsep}%
}\\}





%----------------------------------------------------------------------------------------
% Side block %
%----------------------------------------------------------------------------------------

\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}
\newenvironment{aside}{%
\let\oldsection\section
\renewcommand{\section}[1]{
  \par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1}
}
\begin{textblock}{3.6}(1, 1.87)
\begin{flushright}
\obeycr
}{%
\restorecr
\end{flushright}
\end{textblock}
\let\section\oldsection
}

%----------------------------------------------------------------------------------------
% Other tweaks %
%----------------------------------------------------------------------------------------

\RequirePackage[left=5.6cm,top=1cm,right=1cm,bottom=1cm,nohead,nofoot]{geometry}
\RequirePackage{hyperref}
\hypersetup{
  pdftitle=CV/Resume \textbar{} Alejandro Pérez Londoño,
  pdfauthor=Alejandro Pérez Londoño,
  pdfsubject=CV/Resume%
  }
0

I tried compiling it using your preamble and someone else's CV text using the same template, and it gave me something more messed up than your result; I could not replicate the exact problem.

In the mean time, this version of the template works a lot better: https://github.com/martjanz/cv/blob/master/cv-style.cls

Please give that a try.

So far, if you prefer debugging the current template, you can try the following tweaks.

  1. replace \ifdefined@cv@print with \ifdefined\@cv@print. Similarly replace \def@sectioncolor#1#2#3 with \def\@sectioncolor#1#2#3.
  2. you missed many square brackets [] in the code you post. I doubt if it will even compile in its current state. For example, the line
\newcommand{\italica}1{% {\color{gray}\bodyfontit #1}% }

should really be

\newcommand{\italica}[1]{% 
   {\color{gray}\bodyfontit #1}% 
}

note the square brackets. Such occurrences are a bit too numerous to list. Click through the error messages, if you get them, and they should show you the locations.

  1. In the current state of the code as you posted, you missed many essential line breaks and large blocks of the code were ignored because they occur after a % sign of the previous line.

  2. In the last line of the section of List Environment you typed }\}. Change it to }\\}. Also one location }\ to }\\

  3. Instead of using longtable which is a package you did not load, use tabular*. Also add a {\textwidth} argument so it becomes

\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
  \end{tabular*}
}
  1. Change \RequirePackage[math-style=TeX,vargreek-shape=unicode]{unicode-math} to just \RequirePackage{unicode-math} probably because changes in the package unicode-math made the options obsolete.

Actually, after @Mico and my edit, the code in your question section should work now.

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.