我正在尝试用 LaTeX 编写我的简历,并使用 classicthesis 和 curvvita 作为样式格式。
我有以下代码:
\documentclass{scrartcl}
\usepackage{marginnote}
\reversemarginpar % Move the margin to the left of the page
\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
\newcommand{\MarginText}[1]{\marginpar{\raggedright \textsc \small#1}}
\renewcommand{\cvheadingfont}{\LARGE\color{Maroon}} % Font color of your name at the top
\usepackage{hyperref} % Required for adding links and customizing them
\hypersetup{colorlinks, breaklinks, urlcolor=Black, linkcolor=Black} % Set link colors
\newlength{\datebox}\settowidth{\datebox}{Sept 2015-Present} % 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{0.5em}} % Define a command for descriptions of each entry - change spacing and font sizes here
\begin{document}
\thispagestyle{empty} % Stop the page count at the bottom of the first page
\begin{cv}{{ \hspace{1mm} John Smith}}\vspace{1em} % Your name
\vspace{0.5em} % Extra space between major sections
\spacedlowsmallcaps{Education}\vspace{1em}
\Description{\MarginText{\textsc{Sept. 2010- April 2012}} \textsc{XYZ University, ABC, DE} \newline Bachelor of Science, Physics \newline
Some stuff goes here}
\Description{\MarginText{\textsc{Sept. 2012- April 2015}} \textsc{XYZ High School, ABC, DE} \newline High School Diploma $\cdotp$ GPA: x.x/x.x\ \ $\cdotp$\ \ Dean's Honour List \newline}
\end{cv}
\end{document}
得出的结果为:
我想更改“MarginText”元素(包含 2010 年 9 月至 2012 年 4 月日期的元素)的宽度,以便日期适合一行。我尝试使用 geometry 包来更改它,但这只会更改 margintext 元素左侧的边距。
答案1
您必须更改边距列的宽度以及左边距的宽度。选项showframe
可帮助我们可视化页面布局。请注意额外的段落缩进。
\documentclass{scrartcl}
\usepackage{marginnote}
\reversemarginpar
\usepackage[nochapters]{classicthesis}
\usepackage[LabelsAligned]{currvita}
\newcommand{\MarginText}[1]{\marginpar{\raggedright \textsc \small#1}}
\renewcommand{\cvheadingfont}{\LARGE\color{Maroon}}
\usepackage{geometry}
\geometry{marginparwidth=4cm,left=5cm,showframe}%<-----
\newcommand{\NewEntry}[3]{\noindent\hangindent=2em\hangafter=0 \parbox{\datebox}{\small \textit{#1}}\hspace{1.5em} #2 #3
\vspace{0.5em}}
\newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{0.5em}}
\begin{document}
\thispagestyle{empty}
\begin{cv}{{ \hspace{1mm} John Smith}}\vspace{1em}
\vspace{0.5em}
\spacedlowsmallcaps{Education}\vspace{1em}
\Description{\MarginText{\textsc{Sept. 2010- April 2012}} \textsc{XYZ University, ABC, DE} \newline Bachelor of Science, Physics \newline
Some stuff goes here}
\Description{\MarginText{\textsc{Sept. 2012- April 2015}} \textsc{XYZ High School, ABC, DE} \newline High School Diploma $\cdotp$ GPA: x.x/x.x\ \ $\cdotp$\ \ Dean's Honour List \newline}
\end{cv}
\end{document}
答案2
{Sept 2015-Present}
你可以通过调整下面这行代码来实现。例如:{September 2015 - Present}
\newlength{\datebox}\settowidth{\datebox}{Sept 2015-Present}