在‘经验’部分下,我想在职位下添加以下日期,分成两行:
2010 年 1 月 - 2012 年 7 月
2014 年 1 月 - 2015 年 6 月
然而,写作
{{Jan 2010 - Jul 2012,
Jan 2014 - Jun 2015}}
强制将日期写在一行上,并将缩进推到右侧。我该如何添加另一个?(见下图)
平均能量损失:
\documentclass[]{friggeri-cv}
\begin{document}
\header{somebody}{iusedtoknow}{fresh graduate}
%-------------------------
\section{experience}
\begin{entrylist}
\entry
{Jan 2010 - Jul 2012}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}
\end{entrylist}
%-------------------------
\end{document}
MWE-在.cls文件中列出环境:
\setlength{\tabcolsep}{3.7pt}
\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
{\small #1} & \parbox[t]{11.8cm}{%
\textbf{#2}%
\hfill%
{\footnotesize\addfontfeature{Color=lightgray} #3}\\%
#4\vspace{\parsep}%
}\\
}
答案1
调整 entrylist 的 .cls 文件:
\setlength{\tabcolsep}{3pt}
\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll |}
}{%
\end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
\parbox[t]{3.2cm}{#1}&\parbox[t]{10.6cm}{%
\textbf{#2}%
\hfill%
{\footnotesize\addfontfeature{Color=lightgray} #3}\\%
#4\vspace{\parsep}%
}\\}
上面,我将第一列内容(#1)包装在 parbox 中,以便您可以修复和控制间距。然后我们缩小第二列,以便它不会超出边距。我还在 entrylist 定义中添加了一些列间间距。然后在您的 .tex 文件中,使用 a,\newline
如下所示:
\entry
{Jan 2010 - Jul 2012\newline
Jan 2014 - Jun 2015}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\vspace{-10pt}\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}
如果您想要蓝色那么:
\entry
{Jan 2010 - Jul 2012\newline
{\addfontfeature{Color=blue}Jan 2014 - Jun 2015}}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\vspace{-10pt}\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}
输出结果如下:
由于默认的 Helvetica 字体中每个字母的间距不相等,因此日期不会完全对齐。您需要为此切换字体。但我认为这可以达到您想要的效果。为了实现这一点,我不得不将第二列进一步向右推,因此您牺牲了空间。
平均能量损失
\documentclass[]{friggeri-cv}
\begin{document}
\header{somebody}{iusedtoknow}{fresh graduate}
%-------------------------
\begin{aside} % In the aside, each new line forces a line break
\section{contact}
123 Street Name
City, Province A2B 3C4
Country
~
+0 (000) 111 1111
+0 (000) 111 1112
~
\href{mailto:[email protected]}{[email protected]}
\href{http://www.johndoe.com}{http://www.johndoe.com}
\href{http://facebook.com/johnsmith}{fb://jsmith}
\section{languages}
english
spanish
\section{programming}
{\color{red} $\varheartsuit$} JavaScript
Python, C++, PHP
CSS3 \& HTML5
\end{aside}
\section{experience}
\begin{entrylist}
\entry
{Jan 2010 - Jul 2012\newline
Jan 2014 - Jun 2015}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\vspace{-10pt}\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}
\end{entrylist}
%-------------------------
\end{document}
答案2
您必须调整参数,因为结果远非理想,但可以使用嵌套表格:
\documentclass[a4paper]{friggeri-cv}
\newcommand{\manylines}[1]{%
\begin{tabular}[t]{@{}l@{}}#1\end{tabular}%
}
\begin{document}
\header{somebody}{iusedtoknow}{fresh graduate}
%-------------------------
\section{experience}
\begin{entrylist}
\entry
{\manylines{Jan 2010 -- Jul 2012\\Jan 2014 - Jun 2015}}
{Cupcakes 'n' Such}
{Cupcake Monster}
{Here's what I did
\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}
\end{entrylist}
%-------------------------
\end{document}