CV 上的多行线高度相同

CV 上的多行线高度相同

我正在努力完善我的简历,但我面临的问题是两条线不在同一水平。

线条不在同一高度

我的代码如下:

\begin{multicols}{2}{}
\begin{rSection}{|Computer Skills|}
\begin{itemize}
    \item Python (numpy, scipy, Keras, TensorFlow, scikit-learn), C++, MATLAB, Bash/Shell, Git 
    \item Databases: MySQL, SQL Server
    \item AWS S3, EC2
\end{itemize}
\end{rSection}
\columnbreak
\begin{rSection}{Awards}
\begin{itemize}
    \item \textbf{NSERC Engage Grant}, Awarded to researches in collaboration with industry partners,  November 2018
    \item \textbf{Agilent Capstone Design Award}, Undergraduate Capstone Design Conference, March 2014

rSection来自以下代码:

% Defines the rSection environment for the large sections within the CV
\newenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \MakeUppercase{\bf #1} % Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section
  }
  \item[]
}{
  \end{list}
}

我的文件的开头是:

\documentclass{resume} % Use the custom resume.cls style 

\usepackage[left=0.4 in,top=0.3 in,right=0.4 in,bottom=0.3in]{geometry} % Document margins
\usepackage{multicol}
\usepackage{comment}
\usepackage{enumitem}
\newcommand{\tab}[1]{\hspace{.2667\textwidth}\rlap{#1}}
\newcommand{\itab}[1]{\hspace{0em}\rlap{#1}}

答案1

您使用的课​​程resume.cls非常旧,最好不要使用它...

但是,对于您来说,罪魁祸首是您使用的环境multicols。在此包的文档中(texdoc multicols在您的终端/控制台上输入)提到,列的类型是平衡的,这意味着列从同一位置开始,并且两列的最后一行位于相同的高度。这只能通过两列中的行之间的不同空白来实现。

这就是您获得问题中向我们展示的输出的原因。

现在您可以使用——例如,请参阅文档!——命令\raggedcolumns来省略列的平衡输出。

请参阅以下内容

\documentclass{resume} % Use the custom resume.cls style

\usepackage[left=0.4 in,top=0.3 in,right=0.4 in,bottom=0.3in]{geometry} % Document margins
\usepackage{multicol}
\usepackage{comment}
\usepackage{enumitem}
\newcommand{\tab}[1]{\hspace{.2667\textwidth}\rlap{#1}}
\newcommand{\itab}[1]{\hspace{0em}\rlap{#1}}

\name{John Doe } % Your name

%\address{The address} % Your address

\begin{document}

\begin{multicols}{2}{}
\raggedcolumns % <======================================================
\begin{rSection}{Computer Skills}
\begin{itemize}
    \item Python (numpy, scipy, Keras, TensorFlow, scikit-learn), C++, MATLAB, Bash/Shell, Git 
    \item Databases: MySQL, SQL Server
    \item AWS S3, EC2
\end{itemize}
\end{rSection}

%\begin{rSection}{Computer Skills}
%\begin{itemize}
    %\item Python (numpy, scipy, Keras, TensorFlow, scikit-learn), C++, MATLAB, Bash/Shell, Git 
    %\item Databases: MySQL, SQL Server
    %\item AWS S3, EC2
    %\item test
    %\item test2
%\end{itemize}
%\end{rSection}
\columnbreak
\begin{rSection}{Awards}
\begin{itemize}
    \item \textbf{NSERC Engage Grant}, Awarded to researches in collaboration with industry partners,  November 2018
    \item \textbf{Agilent Capstone Design Award}, Undergraduate Capstone Design Conference, March 2014
\end{itemize}
\end{rSection}

\begin{rSection}{Awards}
\begin{itemize}
    \item \textbf{NSERC Engage Grant}, Awarded to researches in collaboration with industry partners,  November 2018
    \item \textbf{Agilent Capstone Design Award}, Undergraduate Capstone Design Conference, March 2014
\end{itemize}
\end{rSection}
\end{multicols}
\end{document} 

及其结果:

生成的 pdf

如果您不想要不平衡的输出,您必须更改代码以在两列中获取平衡的文本。

例如你可以尝试以下代码

\documentclass{resume} % Use the custom resume.cls style

\usepackage[left=0.4 in,top=0.3 in,right=0.4 in,bottom=0.3in]{geometry} % Document margins
\usepackage{multicol}
\usepackage{comment}
\usepackage{enumitem}
\newcommand{\tab}[1]{\hspace{.2667\textwidth}\rlap{#1}}
\newcommand{\itab}[1]{\hspace{0em}\rlap{#1}}

\name{John Doe } % Your name

%\address{The address} % Your address

\begin{document}

\begin{multicols}{2}{}
%\raggedcolumns % <======================================================
\begin{rSection}{Computer Skills}
\begin{itemize}
    \item Python (numpy, scipy, Keras, TensorFlow, scikit-learn), C++, MATLAB, Bash/Shell, Git 
    \item Databases: MySQL, SQL Server
    \item AWS S3, EC2
\end{itemize}
\end{rSection}

\begin{rSection}{Computer Skills} % <===================================
\begin{itemize}
    \item Python (numpy, scipy, Keras, TensorFlow, scikit-learn), C++, MATLAB, Bash/Shell, Git 
    \item Databases: MySQL, SQL Server
    \item AWS S3, EC2
    \item test % <======================================================
    \item test2 % <=====================================================
\end{itemize}
\end{rSection}
\columnbreak
\begin{rSection}{Awards}
\begin{itemize}
    \item \textbf{NSERC Engage Grant}, Awarded to researches in collaboration with industry partners,  November 2018
    \item \textbf{Agilent Capstone Design Award}, Undergraduate Capstone Design Conference, March 2014
\end{itemize}
\end{rSection}

\begin{rSection}{Awards}
\begin{itemize}
    \item \textbf{NSERC Engage Grant}, Awarded to researches in collaboration with industry partners,  November 2018
    \item \textbf{Agilent Capstone Design Award}, Undergraduate Capstone Design Conference, March 2014
\end{itemize}
\end{rSection}
\end{multicols}
\end{document}

其结果为:

平衡列

该 mwe 使用的类文件是:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Medium Length Professional CV - RESUME CLASS FILE
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% This class file defines the structure and design of the template. 
%
% Original header:
% Copyright (C) 2010 by Trey Hunner
%
% Copying and distribution of this file, with or without modification,
% are permitted in any medium without royalty provided the copyright
% notice and this notice are preserved. This file is offered as-is,
% without any warranty.
%
% Created by Trey Hunner and modified by www.LaTeXTemplates.com
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ProvidesClass{resume}[2010/07/10 v0.9 Resume class]

\LoadClass[11pt,letterpaper]{article} % Font size and paper type

\usepackage[parfill]{parskip} % Remove paragraph indentation
\usepackage{array} % Required for boldface (\bf and \bfseries) tabular columns
\usepackage{ifthen} % Required for ifthenelse statements

\pagestyle{empty} % Suppress page numbers

%----------------------------------------------------------------------------------------
%   HEADINGS COMMANDS: Commands for printing name and address
%----------------------------------------------------------------------------------------

\def \name#1{\def\@name{#1}} % Defines the \name command to set name
\def \@name {} % Sets \@name to empty by default

\def \addressSep {$\diamond$} % Set default address separator to a diamond

% One, two or three address lines can be specified 
\let \@addressone \relax
\let \@addresstwo \relax
\let \@addressthree \relax

% \address command can be used to set the first, second, and third address (last 2 optional)
\def \address #1{
  \@ifundefined{@addresstwo}{
    \def \@addresstwo {#1}
  }{
  \@ifundefined{@addressthree}{
  \def \@addressthree {#1}
  }{
     \def \@addressone {#1}
  }}
}

% \printaddress is used to style an address line (given as input)
\def \printaddress #1{
  \begingroup
    \def \\ {\addressSep\ }
    \centerline{#1}
  \endgroup
  \par
  \addressskip
}

% \printname is used to print the name as a page header
\def \printname {
  \begingroup
    \hfil{\MakeUppercase{\namesize\bf \@name}}\hfil
    \nameskip\break
  \endgroup
}

%----------------------------------------------------------------------------------------
%   PRINT THE HEADING LINES
%----------------------------------------------------------------------------------------

\let\ori@document=\document
\renewcommand{\document}{
  \ori@document  % Begin document
  \printname % Print the name specified with \name
  \@ifundefined{@addressone}{}{ % Print the first address if specified
    \printaddress{\@addressone}}
  \@ifundefined{@addresstwo}{}{ % Print the second address if specified
    \printaddress{\@addresstwo}}
     \@ifundefined{@addressthree}{}{ % Print the third address if specified
    \printaddress{\@addressthree}}
}

%----------------------------------------------------------------------------------------
%   SECTION FORMATTING
%----------------------------------------------------------------------------------------

% Defines the rSection environment for the large sections within the CV
\newenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \MakeUppercase{\bf #1} % Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section
  }
  \item[]
}{
  \end{list}
}

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

\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
 {\bf #1} \hfill {#2} % Bold company name and date on the right
 \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
  \\
  {\em #3} \hfill {\em #4} % Italic job title and location
  }\smallskip
  \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
   \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
  }{
  \end{list}
  \vspace{0.5em} % Some space after the list of bullet points
}

% The below commands define the whitespace after certain things in the document - they can be \smallskip, \medskip or \bigskip
\def\namesize{\huge} % Size of the name at the top of the document
\def\addressskip{\smallskip} % The space between the two address (or phone/email) lines
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section 
\def\nameskip{\bigskip} % The space after your name at the top
\def\sectionskip{\medskip} % The space after the heading section

相关内容