我一直在想如何格式化这一部分ShareLaTeX 提供的专业简历使垂直间距更加紧密。
列之间的垂直条往往会在脚注部分的最后一条条目后留下不必要的空间。我试图让项目符号列表与上方的项目描述左对齐。
前言:
\documentclass[a4paper,10pt, scale=0.8,top=2cm]{article}
%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec} %for loading fonts
\usepackage{xunicode,xltxtra,url,parskip} %other packages for formatting
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[big]{layaureo} %better formatting of the A4 page
% an alternative to Layaureo can be ** \usepackage{fullpage} **
\usepackage{supertabular} %for Grades
\usepackage{titlesec} %custom \section
%final bullet list for projects
\usepackage{enumitem}
\setlist[itemize]{leftmargin=1em}
\newenvironment{myitemize}
{ \begin{itemize}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt} }
{ \end{itemize} }
% for linkedin/icons
\usepackage{fontawesome}
%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}
%FONTS
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}
%%% modified for Karol Kozioł for ShareLaTeX use
\setmainfont[
SmallCapsFont = Fontin-SmallCaps.otf,
BoldFont = Fontin-Bold.otf,
ItalicFont = Fontin-Italic.otf
]
{Fontin.otf}
%%%
%CV Sections inspired by:
%http://stefano.italians.nl/archives/26
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
%Tweak a bit the top margin
%\addtolength{\voffset}{-1.3cm}
%Italian hyphenation for the word: ''corporations''
\hyphenation{im-pre-se}
%-------------WATERMARK TEST [**not part of a CV**]---------------
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{2mm}{0.65\paperheight}
\setlength{\parindent}{0pt}
和项目部分
%Section: Projects section
\section{Projects}
\begin{tabular}{r|p{11cm}}
\emph{KenKen puzzle} & \textbf{Java} \\\textsc{2014} & Arithmetic and logic puzzle similar to Sudoku\\
&\footnotesize{\begin{myitemize}
\item Takes a pre-loaded puzzle and determines proper ordering of numbers.
\item Validates the arithmetic restrictions and recursively verifies the solution.
\end{myitemize}} \\ \multicolumn{2}{c}{} \\
\emph{Huffman Tree} & \textbf{Java} \\ \textsc{2014} & A Binary Tree used to store character frequency and used to calculate compression ratio.\\ & \footnotesize{\begin{myitemize}
\item Determines which branch to store character based on level of frequency.
\item Utilizes HashMaps, PriorityQueues, and recursion to place the characters within the right node.
\end{myitemize}}\\ \multicolumn{2}{c}{} \\
\emph{Bird Maze} & \textbf{Java} \\ \textsc{2014} & A maze that consists of bird-like objects that can only go in the direction of their beak. \\ &\footnotesize{\begin{myitemize}
\item Includes the ability to check the path for correctness and discovers the right path.
\item Implements recursive solutions and iterative solutions.
\end{myitemize}} \\ \multicolumn{2}{c}{} \\
\emph{Gettysburg Address} & \textbf{C} \\ \textsc{2014} & A Binary Tree implementation of the Gettysburg Address. \\ & \footnotesize{\begin{myitemize}
\item Successfully prints out the Gettysburg address via Binary Tree implementation.
\item Correctly used Malloc and Free to obtain and release memory.
\end{myitemize}} \\
\end{tabular}
答案1
我建议使用完整tabular
的实现 - 使用tabularx
- 设置简历结构的这一部分。此外,避免使用列表并将内容设置为表格内的行...这种方式维护起来并不困难,并为您提供了在如此严格的结构中所需的控制。
% https://www.sharelatex.com/templates/cv-or-resume/professional-cv
\documentclass[a4paper,10pt]{article}
%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec} %for loading fonts
\usepackage{xunicode,xltxtra,url,parskip} %other packages for formatting
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[big]{layaureo} %better formatting of the A4 page
% an alternative to Layaureo can be ** \usepackage{fullpage} **
\usepackage{supertabular} %for Grades
\usepackage{titlesec} %custom \section
%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}
%FONTS
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}
%%% modified for Karol Kozioł for ShareLaTeX use
\setmainfont[
SmallCapsFont = Fontin-SmallCaps.otf,
BoldFont = Fontin-Bold.otf,
ItalicFont = Fontin-Italic.otf
]
{Fontin.otf}
%%%
%CV Sections inspired by:
%http://stefano.italians.nl/archives/26
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
%Tweak a bit the top margin
%\addtolength{\voffset}{-1.3cm}
%Italian hyphenation for the word: ''corporations''
\hyphenation{im-pre-se}
%-------------WATERMARK TEST [**not part of a CV**]---------------
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{2mm}{0.65\paperheight}
\setlength{\parindent}{0pt}
%final bullet list for projects
\usepackage{tabularx}
\newcommand{\blankline}{\multicolumn{1}{c}{}\\}
\newcommand{\projectitem}{\footnotesize\textbullet~\ignorespaces}
%--------------------BEGIN DOCUMENT----------------------
\begin{document}
%WATERMARK TEST [**not part of a CV**]---------------
%\font\wm=''Baskerville:color=787878'' at 8pt
%\font\wmweb=''Baskerville:color=FF1493'' at 8pt
%{\wm
% \begin{textblock}{1}(0,0)
% \rotatebox{-90}{\parbox{500mm}{
% Typeset by Alessandro Plasmati with \XeTeX\ \today\ for
% {\wmweb \href{http://www.aleplasmati.comuv.com}{aleplasmati.comuv.com}}
% }
% }
% \end{textblock}
%}
\pagestyle{empty} % non-numbered pages
\font\fb=''[cmr10]'' %for use with \LaTeX command
%--------------------TITLE-------------
\par{\centering
{\Huge Alessandro \textsc{Plasmati}
}\bigskip\par}
%--------------------SECTIONS-----------------------------------
%Section: Personal Data
\section{Personal Data}
\begin{tabular}{rl}
\textsc{Place and Date of Birth:} & Someplace, Italy | dd Month 1912 \\
\textsc{Address:} & CV Inn 19, 20301, Milano, Italy \\
\textsc{Phone:} & +39 123 456789\\
\textsc{email:} & \href{mailto:[email protected]}{[email protected]}
\end{tabular}
%Section: Projects section
\section{Projects}
\noindent
\begin{tabularx}{\textwidth}{@{}r|>{\raggedright\arraybackslash}X@{}}
\emph{KenKen puzzle} & \textbf{Java} \\
\textsc{2014} & Arithmetic and logic puzzle similar to Sudoku \\
& \projectitem Takes a pre-loaded puzzle and determines proper ordering of numbers. \\
& \projectitem Validates the arithmetic restrictions and recursively verifies the solution. \\
\blankline
\emph{Huffman Tree} & \textbf{Java} \\
\textsc{2014} & A Binary Tree used to store character frequency and used to calculate compression ratio. \\
& \projectitem Determines which branch to store character based on level of frequency. \\
& \projectitem Utilizes HashMaps, PriorityQueues, and recursion to place the characters within the right node. \\
\blankline
\emph{Bird Maze} & \textbf{Java} \\
\textsc{2014} & A maze that consists of bird-like objects that can only go in the direction of their beak. \\
& \projectitem Includes the ability to check the path for correctness and discovers the right path. \\
& \projectitem Implements recursive solutions and iterative solutions. \\
\blankline
\emph{Gettysburg Address} & \textbf{C} \\
\textsc{2014} & A Binary Tree implementation of the Gettysburg Address. \\
& \projectitem Successfully prints out the Gettysburg address via Binary Tree implementation. \\
& \projectitem Correctly used Malloc and Free to obtain and release memory.
\end{tabularx}
\end{document}
一些说明:
使用
\noindent
确保tabularx
不会更宽的而不是\textwidth
由于段落缩进。@{}
删除 两侧的表格列分隔tabularx
。这可确保最宽的条目与 左侧对齐(在第一列)和与 右侧对齐(在第二列/最后一列)。>{\raggedright\arraybackslash}
将 -column格式化X
为\raggedright
(\arraybackslash
进行此类格式化时是必需的),但可能不需要,具体取决于您是否想要合理的外观。我选择了“不”。\blankline
在条目之间插入一个空白行。\projectitem
通过使用 来itemize
设置文本,以格式化类似结构。为了获得更“ d”的外观,您可以考虑使用以下定义:\footnotesize
\textbullet
itemize
\newcommand{\projectitem}{% \footnotesize\makebox[1em][l]{\textbullet}% \hangindent=1em\ignorespaces}