我正在尝试使用 Latex 创建简历。为此,我尝试将文档的各个部分分成 3 列和任意数量的行。我一直在使用环境minipage
,但文档的下行出现了缩进。我的问题是我应该如何解决这个难题,或者我是否应该使用 LaTeX 的另一个环境来完成我的工作?
先感谢您。
\documentclass[draft]{article}
\title{JOHN JOHNSON}
\author{CITY\\
BORN\\
TELEPHONE\\
E-MAIL}
\begin{document}
\maketitle
\footnotesize
\section*{\flushleft{EDUCATION}}
\hrule
\vspace{0.5cm}
\begin{minipage}[c]{0.15\textwidth}
2013 -- d.d
\end{minipage}
\begin{minipage}[c]{0.5\textwidth}
Masters degree in fluid mechanics
Analytical and numerical methods for a wave generated from an underwater
earthquake.
\end{minipage}
\begin{minipage}[c]{0.25\textwidth}
University of butt
\end{minipage}
\vspace{1cm}
\begin{minipage}[c]{0.15\textwidth}
2008 -- 2012
\end{minipage}
\begin{minipage}[c]{0.5\textwidth}
Bachelors degree in science, from the program physics, astronomy and
meteorology. Specialization in physics with an emphasis on mechanics.
analytical and numerical methods, and some lab work
\end{minipage}
\begin{minipage}[c]{0.25\textwidth}
University of butt
\end{minipage}
\vspace{1cm}
\begin{minipage}[c]{0.15\textwidth}
2005 -- 2008
\end{minipage}
\begin{minipage}[c]{0.5\textwidth}
Secondary school. A levels in mathematics, physics and computer systems
\end{minipage}
\begin{minipage}[c]{0.25\textwidth}
Silly school
\end{minipage}
\section*{\flushleft{WORK EXPERIENCE}}
\hrule
\vspace{0.5cm}
\end{document}
结果图像:
答案1
问题是段落的第一行(除分段单元后的第一行外)将被缩进。您可以使用 来单独防止这种情况\noindent
,例如
\noindent\begin{minipage}{.15\textwidth}
....
\end{minipage}
或者,您可以通过在序言中添加来\parindent
抑制整个文档的缩进设置0pt
\setlength\parindent{0pt}
这是您的代码,其中有一些额外的修改,如附图所示:
\documentclass{article}
\usepackage[explicit]{titlesec}
\titleformat{\section}
{\normalfont\Large\bfseries}{}
{0em}{\MakeUppercase{#1}}
[\vskip5pt\hrule\vskip10pt]
\setlength\parindent{0pt}
\newcommand\CVEntry[3]{%
\par\begin{minipage}[t]{0.15\textwidth}
#1
\end{minipage}\hfill
\begin{minipage}[t]{0.5\textwidth}
#2
\end{minipage}\hfill
\begin{minipage}[t]{0.25\textwidth}
#3
\end{minipage}\par\vspace{0.5cm}%
}
\title{JOHN JOHNSON}
\author{CITY\\
BORN\\
TELEPHONE\\
E-MAIL}
\begin{document}
\maketitle
\footnotesize
\section{Education}
\CVEntry{2013 -- d.d}{Masters degree in fluid mechanics
Analytical and numerical methods for a wave generated from an underwater earthquake.}{University of butt}
\CVEntry{2008 -- 2012}{Bachelors degree in science, from the program physics, astronomy and meteorology. Specialization in physics with an emphasis on mechanics, analytical and numerical methods, and some lab work}{University of butt}
\CVEntry{2005 -- 2008}{Secondary school. A levels in mathematics, physics and computer systems}{Silly school}
\section{Work experience}
\end{document}
由于您的文档不需要缩进,我将其设置
\parindent
为0pt
。我用的是
titlesec
包来定制章节标题:我抑制了编号\section
,进行了调整以自动生成大写标题,并自动添加了水平规则。我定义了一个具有三个强制参数的命令
\CVEntry
:\CVEntry{<dates>}{<information>}{<location>}
方便条目排版。此环境使用三个
minipage
顶部对齐,因为我不喜欢垂直居中对齐(当然,您可以恢复到原始设置)。此命令会自动在底部添加垂直间距,因此您不必手动执行此操作。