我正在使用parcolumns
这个包来制作我的简历。里面有以下部分:
这部分对应的代码LaTeX
如下:
\begin{parcolumns}[nofirstindent, colwidths={1=.15\linewidth}]{2}
\colchunk[1]{%
\fontsize{8pt}{8pt}\selectfont{}%
EDUCATION\\*
\\*
\\*
\\*
[.5\baselineskip]
}
\colchunk[2]{%
\textbf{University of California, XYZ}\hfill 2011 - 2013 (Expected)\\*
Master of Science, Computer Science, 4.0/4.0\\*
[0.5\baselineskip]
\textbf{University of California, ABC}\hfill 2007 - 2011\\*
Bachelor of Science, Computer Science, 4.0/4.0
}
\end{parcolumns}
如您所见,我无法对齐两列的高度,“EDUCATION”不是从列的顶部开始的。我该如何实现?
答案1
您可以使用tabular
或tabularx
,具体取决于您的喜好:
\documentclass{article}
\usepackage{array,calc}
\usepackage{tabularx} % needed only for the second example
\newcolumntype{L}[1]{@{}>{\raggedright}p{#1\linewidth-\tabcolsep}}
%%% for the first example you need also these
\newcolumntype{C}[1]{>{\raggedright}p{#1\linewidth-2\tabcolsep}}
\newcolumntype{R}[1]{>{\raggedright\arraybackslash}p{#1\linewidth-\tabcolsep}@{}}
\textwidth=420pt% just for the example
\parindent=0pt
\renewcommand{\arraystretch}{1.8}
\begin{document}
\hrule
\bigskip
\begin{tabular}{L{.15}C{.5}R{.35}}
\textsc{Education}
&
\textbf{University of California, XYZ}\newline
Master of Science, Computer Science, 4.0/4.0
&
2011 - 2013 (Expected)
\\
&
\textbf{University of California, ABC}\newline
Bachelor of Science, Computer Science, 4.0/4.0
&
2007 - 2011
\\
\end{tabular}
\bigskip
\hrule
\bigskip
\begin{tabularx}{\textwidth}{L{.15}>{\raggedright}Xl@{}}
\textsc{Education}
&
\textbf{University of California, XYZ}\newline
Master of Science, Computer Science, 4.0/4.0
&
2011 - 2013 (Expected)
\\
&
\textbf{University of California, ABC}\newline
Bachelor of Science, Computer Science, 4.0/4.0
&
2007 - 2011
\\
\end{tabularx}
\end{document}
这些\hrule
命令只是为了显示完整的线宽。