我正在尝试根据带有箭头的图片调整此特定 CV 模板的标题部分,以便与虚线对齐,以及添加另一个正确对齐的文本列,如红色框中所示。
但是模板使用了 tabularx 包。我对它不太熟悉,因此无法定义实现这些对齐的环境。
\documentclass[10pt]{article}
\usepackage[parfill]{parskip}
\usepackage{tabularx}
\renewcommand{\tabularxcolumn}[1]{b{#1}}
\usepackage{ifthen}
\usepackage[left=1.5cm,top=1.2cm,right=1.5cm,bottom=1cm]{geometry}
\usepackage{graphicx}
% Defining sections
\newenvironment{rSection}[1] % Section name
{
\sectionskip
\MakeUppercase{\bfseries #1} % 2nd title
\sectionlineskip
\hrule % Horizontal line
\begin{list}{}{ % List for each individual item in the section
\setlength{\leftmargin}{0.1em} % Margin within the section
}
\item[]
}{
\end{list}
}
% Defining whitespaces. Can be \smallskip, \medskip or \bigskip
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section
\def\sectionskip{\medskip} % The space after the heading section
\begin{document}
\noindent\begin{tabularx}{\textwidth}{Xl}
{\Large\bfseries Name Surname \par} & \includegraphics[width=3cm,height=3cm]{example-image}
\\
Info \par
More info \par
More, more info
\end{tabularx}
\bigbreak
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\begin{rSection}{Education}
{\bfseries University of California} \hfill { \bfseries Location} \\
{} \hfill {\em XXXX-XXXX} \\
B.S. in Computer Science \& Engineering \\
Minor in Linguistics Minor in Linguistics \smallskip \\
Member of Eta Kappa Nu \\
Member of Upsilon Pi Epsilon \\
Overall GPA: 5.678
\end{rSection}
%----------------------------------------------------------------------------------------
% WORK EXPERIENCE FORMATTING
%----------------------------------------------------------------------------------------
\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
{\bfseries #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
}
%----------------------------------------------------------------------------------------
% WORK EXPERIENCE SECTION
%----------------------------------------------------------------------------------------
\begin{rSection}{Experience}
\begin{rSubsection}{ACME, Inc}{October 2010 - Present}{Web Developer}{Palo Alto, CA}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.
\item Donec et mollis dolor. Praesent et diam eget libero Adobe Coldfusion egestas mattis sit amet vitae augue.
\item Nam tincidunt congue enim, ut porta lorem Microsoft SQL lacinia consectetur.
\item Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\item Pellentesque auctor nisi id magna consequat JavaScript sagittis.
\item Aliquam at massa ipsum. Quisque bash bibendum purus convallis nulla ultrices ultricies.
\end{rSubsection}
\end{rSection}
\end{document}
答案1
您可以简单地使用三个minipage
环境,每个环境占用三分之一的空间。然后,将您的表格插入左侧环境,将第二个表格插入中间环境,将图像插入最后一个小页面(请记住,您需要使用\hfill
使图像右对齐)。
\documentclass[10pt]{article}
\usepackage[parfill]{parskip}
\usepackage{tabularx}
\renewcommand{\tabularxcolumn}[1]{b{#1}}
\usepackage{ifthen}
\usepackage[left=1.5cm,top=1.2cm,right=1.5cm,bottom=1cm]{geometry}
\usepackage{graphicx}
% Defining sections
\newenvironment{rSection}[1] % Section name
{
\sectionskip
\MakeUppercase{\bfseries #1} % 2nd title
\sectionlineskip
\hrule % Horizontal line
\begin{list}{}{ % List for each individual item in the section
\setlength{\leftmargin}{0.1em} % Margin within the section
}
\item[]
}{
\end{list}
}
% Defining whitespaces. Can be \smallskip, \medskip or \bigskip
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section
\def\sectionskip{\medskip} % The space after the heading section
\begin{document}
\begin{minipage}[t]{0.33\textwidth}\vspace{0pt}% Left column
\noindent\begin{tabularx}{\textwidth}{X}
{\Large\bfseries Name Surname \par}
\\
Info \par
More info \par
More, more info
\end{tabularx}
\end{minipage}\begin{minipage}[t]{0.33\textwidth}\vspace{0pt}% Middle column
\noindent\begin{tabularx}{\textwidth}{X}
{\Large\bfseries Second Column \par}
\\
Second col info \par
Second col more info \par
More, more info
\end{tabularx}
\end{minipage}\begin{minipage}[t]{0.34\textwidth}\vspace{0pt}% Right column
\noindent\hfill\includegraphics[width=3cm,height=3cm]{example-image}
\end{minipage}
答案2
您只需进行少量修改即可获得所需内容:不要重新定义X
列,并使用键 valign=t
(定义为 bu adjustbox
)来放置图像。我添加了另一X
列以用于附加信息。
\documentclass[10pt]{article}
\usepackage[parfill]{parskip}
\usepackage{tabularx}
\usepackage{ifthen}
\usepackage[left=1.5cm,top=1.2cm,right=1.5cm,bottom=1cm]{geometry}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
% Defining sections
\newenvironment{rSection}[1] % Section name
{
\sectionskip
\MakeUppercase{\bfseries #1} % 2nd title
\sectionlineskip
\hrule % Horizontal line
\begin{list}{}{ % List for each individual item in the section
\setlength{\leftmargin}{0.1em} % Margin within the section
}
\item[]
}{
\end{list}
}
% Defining whitespaces. Can be \smallskip, \medskip or \bigskip
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section
\def\sectionskip{\medskip} % The space after the heading section
\begin{document}
\noindent\begin{tabularx}{\textwidth}{XXl}
{\Large\bfseries Name Surname \par} Info \par
More info \par
More, more info
&Info \par
More info \par
More, more info
& \includegraphics[height=4cm, valign=t]{pepe-le-pew2}%width=3cm,
\end{tabularx}
\bigbreak
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\begin{rSection}{Education}
{\bfseries University of California} \hfill { \bfseries Location} \\
{} \hfill {\em XXXX-XXXX} \\
B.S. in Computer Science \& Engineering \\
Minor in Linguistics Minor in Linguistics \smallskip \\
Member of Eta Kappa Nu \\
Member of Upsilon Pi Epsilon \\
Overall GPA: 5.678
\end{rSection}
%----------------------------------------------------------------------------------------
% WORK EXPERIENCE FORMATTING
%----------------------------------------------------------------------------------------
\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
{\bfseries #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
}
%----------------------------------------------------------------------------------------
% WORK EXPERIENCE SECTION
%----------------------------------------------------------------------------------------
\begin{rSection}{Experience}
\begin{rSubsection}{ACME, Inc}{October 2010 - Present}{Web Developer}{Palo Alto, CA}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.
\item Donec et mollis dolor. Praesent et diam eget libero Adobe Coldfusion egestas mattis sit amet vitae augue.
\item Nam tincidunt congue enim, ut porta lorem Microsoft SQL lacinia consectetur.
\item Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\item Pellentesque auctor nisi id magna consequat JavaScript sagittis.
\item Aliquam at massa ipsum. Quisque bash bibendum purus convallis nulla ultrices ultricies.
\end{rSubsection}
\end{rSection}
\end{document}