![Friggeri CV 模板中的侧边栏下一页](https://linux22.com/image/396613/Friggeri%20CV%20%E6%A8%A1%E6%9D%BF%E4%B8%AD%E7%9A%84%E4%BE%A7%E8%BE%B9%E6%A0%8F%E4%B8%8B%E4%B8%80%E9%A1%B5.png)
我正在使用friggeri-CV
此网站的模板https://es.overleaf.com/latex/templates/friggeri-cv-template/hmnchbfmjgqh。
我在侧边栏 (aside) 添加更多部分时遇到问题,这些部分不会转到下一页。我尝试添加新的部分aside
,但内容页面会移动到另一页。有什么办法可以解决吗?
此外,当我添加时\lipsum
出现另一个错误:
LaTex Error: There's no line here to end.
cv-style.cls
:
% -- Encoding UTF-8 without BOM
\ProvidesClass{cv-style}[2015/02/27 CV class]
\NeedsTeXFormat{LaTeX2e}
\usepackage{lipsum}
\DeclareOption{espanol}{\def\@cv@espanol{}}
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
\LoadClass{article}
%----------------------------------------------------------------------------------------
% Colors %
%----------------------------------------------------------------------------------------
\RequirePackage{xcolor}
\RequirePackage[left=5.6cm,top=1cm,right=1cm,bottom=1cm,nohead,nofoot]{geometry}
\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[math-style=TeX,vargreek-shape=unicode]{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}{0pt}
\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}%
}\\}
% \newenvironment{entrylist}{%
% }{%
% }
% \renewcommand{\bfseries}{\headingfont\color{headercolor}}
% \newcommand{\entry}[4]{%
% \par
% \noindent\parbox[t]{%
% \dimexpr\textwidth-12.8cm\relax}{\raggedright #1}\parbox[t]{12.8cm}{%
% \textbf{#2}%
% \hfill%
% {\footnotesize\addfontfeature{Color=lightgray} #3}\par
% #4\vspace{\parsep}%
% }\par}
%----------------------------------------------------------------------------------------
% 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%
}
main.tex
:
% -- Encoding UTF-8 without BOM
% -- XeLaTeX => PDF (BIBER)
\documentclass[]{cv-style} % Add 'print' as an option into the square bracket to remove colours from this template for printing.
% Add 'espanol' as an option into the square bracket to change the date format of the Last Updated Text
\sethyphenation[variant=british]{english}{} % Add words between the {} to avoid them to be cut
\begin{document}
\header{John}{Smith} % Your name
\lastupdated
%----------------------------------------------------------------------------------------
% SIDEBAR SECTION -- In the aside, each new line forces a line break
%----------------------------------------------------------------------------------------
\begin{aside}
%
\section{contact}
123 Broadway
City, State 050022
Country
~
+0 (000) 111 1111
+0 (000) 111 1112
~
[email protected]
%
\section{languages}
English mother tongue
Spanish fluency
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
\section{another item}
{\color{red} $\varheartsuit$} R
Once Item
Another item
Another item
one item more
other items
\end{aside}
%----------------------------------------------------------------------------------------
% SKILLS SECTION
%----------------------------------------------------------------------------------------
\section{skills}
\vspace{-0.2cm}
Skill 1, skill 2, skill 3, skill 4, skill 5.
%----------------------------------------------------------------------------------------
% WORK EXPERIENCE SECTION
%----------------------------------------------------------------------------------------
\section{experience}
\begin{entrylist}
%------------------------------------------------
\entry
{2014--Now}
{COMPANY 3}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.}
%------------------------------------------------
\entry
{2011--2014}
{COMPANY 2}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.\\
Detailed achievements:
\begin{itemize}
\item Achievement 1. Achievement 1. Achievement 1.
\item Achievement 2. Achievement 2. Achievement 2. Achievement 2. Achievement 2. Achievement 2.
\item Achievement 3. Achievement 3. Achievement 3. Achievement 3.
\end{itemize}}
%------------------------------------------------
\entry
{2008--2011}
{COMPANY 1}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.\\
Detailed achievements:
\begin{itemize}
\item Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1.
\end{itemize}}
%------------------------------------------------
\entry
{2007--2008}
{COMPANY 1}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.\\}
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\section{education}
\begin{entrylist}
%------------------------------------------------
\entry
{2010--2011}
{M.Sc. {\normalfont in Economics [Grade]}}
{University}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2004--2009}
{B.Eng. {\normalfont in Engineering Management [Grade]}}
{University}
{(Emphasis in ...)}
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% OTHER QUALIFICATIONS SECTION
%----------------------------------------------------------------------------------------
\section{other qualifications}
\begin{entrylist}
%------------------------------------------------
\entry
{2013}
{Qualification}
{Institution}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2011}
{Qualification}
{Institution}
{\vspace{-0.3cm}}
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% AWARDS SECTION
%----------------------------------------------------------------------------------------
\section{awards}
\begin{entrylist}
%------------------------------------------------
\entry
{2014}
{Award name}
{Institution}
{Award description. Award description. Award description. Award description. Award description. Award description. Award description. }
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% INTERESTS SECTION
%----------------------------------------------------------------------------------------
\section{interests}
\vspace{-0.2cm}
\textbf{professional:} professional interest 1, professional interest 2 and professional interest 3.
\lipsum[2-4]
\begin{itemize}
\end{itemize}{}
%----------------------------------------------------------------------------------------
\end{document}
答案1
lipsum
嗯,您忘记在您的代码中在序言中加载包,我在下面的代码中添加了它。
第二个问题是,friggeri-cv 设计为只包含一页,但您想要两页。
因此,您必须clearpage
在第一页结束后添加一个,并aside
在代码中添加一个新环境(第二个环境),其中包含您想要在第二页的第一列中包含的信息。
请看以下代码(重要代码以 标记<=====
)
% -- Encoding UTF-8 without BOM
% -- XeLaTeX => PDF (BIBER)
\documentclass[]{cv-style} % Add 'print' as an option into the square bracket to remove colours from this template for printing.
% Add 'espanol' as an option into the square bracket to change the date format of the Last Updated Text
\usepackage{lipsum} % <=================================================
\sethyphenation[variant=british]{english}{} % Add words between the {} to avoid them to be cut
\begin{document}
\header{John}{Smith} % Your name
\lastupdated
%----------------------------------------------------------------------------------------
% SIDEBAR SECTION -- In the aside, each new line forces a line break
%----------------------------------------------------------------------------------------
\begin{aside}
%
\section{contact}
123 Broadway
City, State 050022
Country
~
+0 (000) 111 1111
+0 (000) 111 1112
~
[email protected]
%
\section{languages}
English mother tongue
Spanish fluency
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
\end{aside}
%----------------------------------------------------------------------------------------
% SKILLS SECTION
%----------------------------------------------------------------------------------------
\section{skills}
\vspace{-0.2cm}
Skill 1, skill 2, skill 3, skill 4, skill 5.
%----------------------------------------------------------------------------------------
% WORK EXPERIENCE SECTION
%----------------------------------------------------------------------------------------
\section{experience}
\begin{entrylist}
%------------------------------------------------
\entry
{2014--Now}
{COMPANY 3}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.}
%------------------------------------------------
\entry
{2011--2014}
{COMPANY 2}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.\\
Detailed achievements:
\begin{itemize}
\item Achievement 1. Achievement 1. Achievement 1.
\item Achievement 2. Achievement 2. Achievement 2. Achievement 2. Achievement 2. Achievement 2.
\item Achievement 3. Achievement 3. Achievement 3. Achievement 3.
\end{itemize}}
%------------------------------------------------
\entry
{2008--2011}
{COMPANY 1}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.\\
Detailed achievements:
\begin{itemize}
\item Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1. Achievement 1.
\end{itemize}}
%------------------------------------------------
\entry
{2007--2008}
{COMPANY 1}
{City, Country}
{\jobtitle{Job Title}\\
Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description. Job description.\\}
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\section{education}
\begin{entrylist}
%------------------------------------------------
\entry
{2010--2011}
{M.Sc. {\normalfont in Economics [Grade]}}
{University}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2004--2009}
{B.Eng. {\normalfont in Engineering Management [Grade]}}
{University}
{(Emphasis in ...)}
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% OTHER QUALIFICATIONS SECTION
%----------------------------------------------------------------------------------------
\section{other qualifications}
\begin{entrylist}
%------------------------------------------------
\entry
{2013}
{Qualification}
{Institution}
{\vspace{-0.3cm}}
%------------------------------------------------
\entry
{2011}
{Qualification}
{Institution}
{\vspace{-0.3cm}}
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% AWARDS SECTION
%----------------------------------------------------------------------------------------
\section{awards}
\begin{entrylist}
%------------------------------------------------
\entry
{2014}
{Award name}
{Institution}
{Award description. Award description. Award description. Award description. Award description. Award description. Award description. }
%------------------------------------------------
\end{entrylist}
%----------------------------------------------------------------------------------------
% INTERESTS SECTION ----- page 2 <====================================
%----------------------------------------------------------------------------------------
\clearpage % <==========================================================
\begin{aside} % <=======================================================
%
\section{another item}
{\color{red} $\varheartsuit$} R
Once Item
Another item
Another item
one item more
other items
%
\section{contact}
123 Broadway
City, State 050022
Country
~
+0 (000) 111 1111
+0 (000) 111 1112
~
[email protected]
%
\section{languages}
English mother tongue
Spanish fluency
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
%
%
\section{programming}
{\color{red} $\varheartsuit$} R
VBA, SQL, Python
\LaTeX{}
\end{aside}
\section{interests}
\vspace{-0.2cm}
\textbf{professional:} professional interest 1, professional interest 2 and professional interest 3.
\lipsum[2-4]
\begin{itemize}
\item \lipsum % <=======================================================
\end{itemize}{}
%----------------------------------------------------------------------------------------
\end{document}
得到第二页的结果: