我正在尝试使用scrartcl
文档类编写我的简历。我努力减少页面右侧的边距。例如,如果大学名称太长,它将出现在下一行(如果可能的话,我宁愿避免这种情况)。这也会在右侧留下大量空白。我怎样才能产生更好的输出?
我附上了编译后的 .pdf。代码如下:
%----Preamble
\documentclass[paper=a4, fontsize=11pt DIV=18]{scrartcl}
\reversemarginpar % Move the margin to the left of the page
\newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}}
\usepackage[nochapters]{classicthesis}
\usepackage[LabelsAligned]{currvita}
\renewcommand{\cvheadingfont}{\LARGE\color{Maroon}}
\usepackage{hyperref}
\hypersetup{colorlinks, breaklinks, urlcolor=Maroon, linkcolor=Maroon}
\newlength{\datebox}
\settowidth{\datebox}{Nov 2012 - Feb 2013}
\newcommand{\NewEntry}[3]{
\noindent\hangindent=2em\hangafter=0
\parbox{\datebox}{
\small \textit{#1}}
{\hspace{0.2em} #2}
{ #3 \vspace{0.5em} }
}
\newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{1em}}
%----------------------------------------------------------------------------------------
\begin{document}
\thispagestyle{empty}
% ----- NAME AND CONTACT INFORMATION SECTION
\begin{cv}{\spacedallcaps{My Name}}\vspace{1.5em}
\noindent\spacedlowsmallcaps{Personal Information}\vspace{0.5em}
\NewEntry{current position} {\textit{Researcher, Blabla university}}
\NewEntry{address} {\textit{longer address goes on a new line that is not indented, this is another problem }}
\NewEntry{email}{\href{mailto:[email protected]}{[email protected]}}
\NewEntry{Twitter}{@blabla}
\vspace{1em}
\noindent\spacedlowsmallcaps{Main interests}\vspace{1em}
\Description{Political behaviour, political economy, research methods, EU politics}\vspace{2em}
%------ WORK EXPERIENCE
\noindent\spacedlowsmallcaps{Work Experience}\vspace{1em}
\NewEntry{Mar 2013} {Research Assistant, \textsc{blabla university}}
\Description{\MarginText{Blabla Univ.} Assistanship for the blabla ebook on the African history.\\ Reference: Prof. Name \textsc{Surname}\ \ $\cdotp$\ \ BlaBla University\ \ $\cdotp$\ \ \href{mailto:[email protected]}{[email protected]}}
%------------------------------------------------
\NewEntry{Nov 2012--Feb 2013}{Research Assistant, \textsc{Longer University Name that goes on New Line}}
\Description{\MarginText{Longer University} Longer names of the university create problems because they will end up in a new line while leaving plenty of space on the right part of the page.\\ Reference: Prof. Name \textsc{Surname}\ \ $\cdotp$\ \ Longer Name University \ \ $\cdotp$\ \ \href{mailto:[email protected]}{[email protected]}}
\vspace{1em} % Extra space between major sections
%------ OTHER INFORMATION
\spacedlowsmallcaps{General interests}\vspace{1em}
\Description{\MarginText{}Electric guitar\ \ $\cdotp$\ \ bicycle travelling\ \ $\cdotp$\ \ }
\end{cv}
\end{document}
答案1
编译 MWE 时,我收到 4 条错误消息,首先是
\NewEntry 的参数有一个额外的}。
此错误是由于缺少{}
宏\NewEntry
(在第 34、35、37、39 行添加此宏)造成的。您为其提供了两个参数,但您用三个参数定义了它(第 15 行)。
在我添加这四个之后,{}
你的 MWE 在我的 MiKTeX 2.9 系统上运行并且没有错误消息。
我不确定您想要得到什么,所以请进一步解释您想用宏存档什么\NewEntry
。
编辑:
屏幕截图中的箭头指向单词“Longer names”的一个小缩进。这导致代码中写入错误的空格:
\Description{\MarginText{Longer University} Longer names of the university
正确的是(小心宏中的空格):
\Description{\MarginText{Longer University}Longer names of the university
最后我添加了一个包geometry
来获得更小的右边距。你也可以用它来控制左边距。参见 MWE。
我通过在代码中添加空行解决了其他几个错误。
因此,请检查下面的代码,打印得稍微漂亮一些(请参阅我用 标记的重要更改% <=========
):
\documentclass{scrartcl}%[paper=a4, fontsize=11pt, DIV=18]{scrartcl}% <=========
\reversemarginpar % Move the margin to the left of the page
\newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}}
\usepackage[nochapters]{classicthesis}
\usepackage[LabelsAligned]{currvita}
\renewcommand{\cvheadingfont}{\LARGE\color{Maroon}}
\usepackage[left=3.5cm,right=2.5cm]{geometry}% <=================================
\usepackage{hyperref}
\hypersetup{colorlinks, breaklinks, urlcolor=Maroon, linkcolor=Maroon}
\newlength{\datebox}
\settowidth{\datebox}{Nov 2012 -- Feb 2013}
\newcommand{\NewEntry}[3]{
\noindent\hangindent=2em\hangafter=0
\parbox{\datebox}{
\small \textit{#1}}
{\hspace{0.2em} #2}
{ #3 \vspace{0.5em} }
}
\newcommand{\Description}[1]{%
\hangindent=2em\hangafter=0\noindent\raggedright%
\footnotesize{#1}\par\normalsize\vspace{1em}%
}
%----------------------------------------------------------------------------------------
\begin{document}
\thispagestyle{empty}
% ----- NAME AND CONTACT INFORMATION SECTION
\begin{cv}{\spacedallcaps{My Name}}\vspace{1.5em}
\noindent\spacedlowsmallcaps{Personal Information}\vspace{0.5em}
\NewEntry{current position}{\textit{Researcher, Blabla university}}{}% <=========
\NewEntry{address}{first line, second line, third line third line third line}{}% <=========
\NewEntry{email}{\href{mailto:[email protected]}{[email protected]}}{}% <=========
\NewEntry{Twitter}{@blabla}{}% <=================================
\vspace{1em}
\noindent\spacedlowsmallcaps{Main interests}\vspace{1em}
\Description{Political behaviour, political economy, research methods,
EU politics}\vspace{2em}
%------ WORK EXPERIENCE
\noindent\spacedlowsmallcaps{Work Experience}\vspace{1em}
\NewEntry{Mar 2013}{Research Assistant, \textsc{blabla university}}{}% <=========
\Description{\MarginText{Blabla Univ.}Assistanship for the blabla ebook
on the African history.\\
Reference: Prof. Name \textsc{Surname}\ \ $\cdotp$\ \
BlaBla University\ \ $\cdotp$\ \ \href{mailto:[email protected]}{[email protected]}}
%------------------------------------------------
\NewEntry{Nov 2012--Feb 2013}{Research Assistant,
\textsc{Longer University Name that goes on New Line}}{}% <=========
\Description{\MarginText{Longer University}Longer names of the university
create problems because they will end up in a new line while leaving
plenty of space on the right part of the page.\\
Reference: Prof. Name \textsc{Surname}\ \ $\cdotp$\ \ Longer Name University
\ \ $\cdotp$\ \ \href{mailto:[email protected]}{[email protected]}}
\vspace{1em} % Extra space between major sections
%------ OTHER INFORMATION
\spacedlowsmallcaps{General interests}\vspace{1em}
\Description{\MarginText{}Electric guitar\ \ $\cdotp$\ \ bicycle
travelling\ \ $\cdotp$\ \ }
\end{cv}
\end{document}
结果是:
答案2
首先请注意,在 documentclass 选项中指定DIV=18
不会产生任何效果。这是因为页面设置由classicthesis
您稍后加载的包重新定义。您可以通过查看文件来发现这一点log
。
该类scrartcl
通过包设置页面,每次页面布局更改时typearea
都会将信息写入。加载后,您会看到:log
classicthesis
(typearea) DIV = areaset (typearea) BCOR = 0.0pt (typearea) \paperwidth = 597.50793pt (typearea) \textwidth = 336.0pt (typearea) \evensidemargin = 58.48398pt (typearea) \oddsidemargin = 58.48398pt (typearea) \paperheight = 845.04694pt (typearea) \textheight = 750.0pt
等等。更改布局的一种方法是发出如下命令
\areaset[current]{420pt}{750pt}
就在 之前\begin{document}
。这将使用原始文本高度,但将文本从 增加到420pt
。336pt
该选项current
可确保保留当前绑定更正;但与 无关,因为0pt
。
另一方面,引用scrguien
该类的手册scrartcl
,该类通过包设置页面尺寸typearea
:
该
typearea
包不是为了设置预定义的边距值而制作的。如果你必须这样做,你可以使用包geometry
因此,\usepackage[right=2.5cm]{geometry}
正如您所建议的,类似 的操作是更改右侧边距宽度的另一种方法。但是,它还将对页面布局的其他部分使用不同的默认值,因此您可能需要添加更多geometry
选项。无论如何,请确保在加载classicthesis
更改页面布局的包后使用此方法。