在 CV 中定位 \NewEntry 元素

在 CV 中定位 \NewEntry 元素

我需要写一份附在论文中的简历。因为我的论文是用 latex(经典论文)写的,所以我想也用 latex 设置我的简历,这样它才能符合论文的布局。

我目前使用这段代码来制作我的简历:

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[a4paper,ngerman]{scrartcl}

\reversemarginpar % Move the margin to the left of the page 

\newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}} % New command defining the margin text style

\usepackage[nochapters]{classicthesis} % Use the classicthesis style for the style of the document
\usepackage[LabelsAligned]{currvita} % Use the currvita style for the layout of the document

\renewcommand{\cvheadingfont}{\LARGE\color{Maroon}} % Font color of your name at the top

\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=true]{}

\usepackage{hyperref} % Required for adding links   and customizing them
\hypersetup{colorlinks, breaklinks, urlcolor=Maroon, linkcolor=Maroon} % Set link colors

\newlength{\datebox}\settowidth{\datebox}{Spring 2011} % Set the width of the date box in each block

\newcommand{\NewEntry}[3]{\noindent\hangindent=2em\hangafter=0 \parbox{\datebox}{\small \textit{#1}}\hspace{1.5em} #2 #3 % Define a command for each new block - change spacing and font sizes here: #1 is the left margin, #2 is the italic date field and #3 is the position/employer/location field
\vspace{0.5em}} % Add some white space after each new entry

\newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{1em}} % Define a command for descriptions of each entry - change spacing and font sizes here



\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage[LabelsAligned]{currvita}% nice cv style


%----------------------------------------------------------------------------------------

\begin{document}

\thispagestyle{empty} % Stop the page count at the bottom of the first page

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\begin{cv}{\spacedallcaps{Curriculum Vit\ae}}\vspace{1.5em} % Headline

\noindent\spacedlowsmallcaps{Personal Information}\vspace{0.5em} % Personal information heading

\NewEntry{}{Some Name} % Birthplace and date

\NewEntry{}{Geboren am 14. Januar 2050 in Village} % Birthplace and date

\NewEntry{Address}{Some Streetname 11\\* 12345 City} % Phone number(s)

\NewEntry{Phone}{+49 344 1234567} % Phone number(s)

\NewEntry{Email}{[email protected]} % Email address

\NewEntry{Website}{http://www.name.com} % Personal website

\vspace{1em} % Extra white space between the personal information section and goal

%----------------------------------------------------------------------------------------
%   EDUCATION
%----------------------------------------------------------------------------------------

\noindent\spacedlowsmallcaps{Education}\vspace{1em}

\NewEntry{2000-2005}{A very long University title with a lot of names an so on}

\Description{\MarginText{Masters in TeX}Masters in Life, Party Informatics and some other stuff}

\vspace{1em} % Extra space between major sections

%----------------------------------------------------------------------------------------
%   WORK EXPERIENCE
%----------------------------------------------------------------------------------------

\spacedlowsmallcaps{Work Experience}\vspace{1em}

\NewEntry{January 2010 - March 2012}{Some Company}

\Description{\MarginText{Researcher}Brief description of what I've done.}


%----------------------------------------------------------------------------------------
%   PUBLICATIONS
%----------------------------------------------------------------------------------------

\spacedlowsmallcaps{Publications}\vspace{1em}

\Description{Some, A., Other, B., Third, C. (2011). Title of the Article with some fancy subtitle. In: A famous journal. pages 123–133.}

\vspace{1em} % Extra space between major sections

\end{cv}

\end{document}

结果如下: 在此处输入图片描述

到目前为止,一切都正常(我使用 texmaker 中的 pdflatex 进行编译)。我收到的唯一警告是:Underfull \hbox (badness 10000) in paragraph at lines 86--86

有几件事我无法理解:

  1. 代码\NewEntry{Address}{Some Streetname 11\\* 12345 City}生成的地址带有换行符。问题是,“12345 City”应该位于“Some Streetname”下,而不是“Address”下

  2. 类似的事情也发生在以下行上\NewEntry{2000-2005}{A very long University title with a lot of names an so on},此处的换行符不是手动设置的,而是因为行太长。但此处的换行符也不应该位于第一个“日期”元素下。

  3. 是否还有一种方法可以将大学条目设置为顶部,以便日期条目的第一行与大学在同一行?

  4. 现在,我手动将出版物放入其中。我之前尝试过使用\printbibliography声明\nocite{*},但这没有用。有没有办法也可以这样做?

我认为第 1-3 点是同一个问题,但我不知道如何解决。有人有解决方案吗?

感谢您的帮助。

答案1

您的代码存在一些缺陷。

  • 您使用三个强制参数定义命令\NewEntry。在文档中,您始终使用两个参数调用它。
  • 第二个参数的对齐失败。如果第二个参数中有换行符,则下一行始终从左侧开始。
  • 使用该命令printbibliography需要加载包biblatex。我看不到这个。

然而我建议如下定义\NewEntry

\newcommand{\NewEntry}[2]{%
    \par\addvspace{0.5em}
    \noindent\hspace*{2em}%
    \parbox[t]{\datebox}{\strut\small\itshape #1}%
    \hspace*{1.5em}%
    \parbox[t]{\dimexpr\textwidth-2em-\datebox-1.5em}{\strut #2}%
    \par\addvspace{0.5em}%
}

根据这个定义,你可以得到以下结果:

在此处输入图片描述

相关内容