我设置了一系列表格环境,但由于某种原因,其中一个与其他表格环境非常不一致。
左侧的红线显示顶部日期与其他日期不一致。有办法解决这个问题吗?
作为一个“附加问题”,我还想知道是否有办法增加我在“就业历史”下设置的栏的长度,使其更接近日期,就像在左侧更接近文本的开头一样。如果我应该将其作为一个单独的问题,我会这样做。
这是我的代码,尽可能减少:
\documentclass[letterpaper,11pt]{article}
\usepackage{kpfonts}
\usepackage{color}
\usepackage{xcolor}
\usepackage{enumerate}
\usepackage{xparse}% http://ctan.org/pkg/xparse
\NewDocumentCommand{\myrule}{O{1pt} O{3pt} O{black}}{%
\par\nobreak % don't break a page here
\kern\the\prevdepth % don't take into account the depth of the preceding line
%\kern#2 % space before the rule
{\color{#3}\hrule height #1 width\hsize} % the rule
% \kern#2 % space after the rule
\nointerlineskip % no additional space after the rule
}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
\definecolor{smokyblack}{rgb}{0.06, 0.05, 0.03}
\definecolor{darkjunglegreen}{rgb}{0.1, 0.14, 0.13}
\definecolor{mygrey}{rgb}{0.0, 0.26, 0.15}
\usepackage[
top = 0.85cm,
bottom = 1.00cm,
left = 0.90cm,
right = 0.70cm]{geometry}
%\usepackage{fullpage}
\begin{document}
\pagenumbering{gobble}
\textheight=374pt
\begin{tabular*}{7.5in}{l@{\extracolsep{\fill}}r}
\colorbox{white}{\textbf{\LARGE \textcolor{darkjunglegreen}{ZIP ZORN}}} & \Large{[email protected]}\\
\colorbox{darkjunglegreen!10}{\textbf{\Large \textcolor{smokyblack}{Adventurer}}} & \large{555-555-5555 - Narnia, NR}\\
%& \large{New York, NY}
\vspace{1mm}
\end{tabular*}
\break
\textbf{\Large{Employment History}}
\myrule[3pt][10pt][mygrey]
\vspace{4mm}
\begin{tabular*}{7.5in}{l@{\extracolsep{\fill}}r}
\large\textbf{Self-Employed} - \large{Consultant} & \large{01/0001 - Present}\\
% \textit{Analyst} & %\textit{February 2012 - July 2012}\\
\end{tabular*}
\begin{enumerate}[-]
\setlength\itemsep{0.6mm}
\large\item Filler text
\end{enumerate}
\vspace{2mm}
\begin{tabular*}{7.5in}{l@{\extracolsep{\fill}}r}
\large\textbf{Job two}\large{ - Senior Associate} & \large{08/2015 - 07/2016}\\
%\textit{Senior Associate} & % \textit{August 2015 - July 2016}\\
\end{tabular*}
\begin{enumerate}[-]
\setlength\itemsep{0.6mm}
\large\item Filler text
\end{enumerate}
\vspace{2mm}
\begin{tabular*}{7.5in}{l@{\extracolsep{\fill}}r}
\large\textbf{Job one} - \large{Worker} & \large{95/2056 - 87/9015}\\
% \textit{Consultant} & %\textit{May 2013 - June 2015}\\
\end{tabular*}
\begin{enumerate}[-]
\setlength\itemsep{0.6mm}
\large\item Filler text
\end{enumerate}
\end{document}
答案1
看看以下方法是否能给出接近您想要实现的结果:
\documentclass[letterpaper,11pt]{article}
\usepackage[top = 0.85cm,
bottom = 1.00cm,
left = 0.90cm,
right = 0.70cm]{geometry}
\usepackage[table]{xcolor}
\usepackage{array, booktabs}
\usepackage{enumitem}
\setlist[itemize]{itemsep = 0.6mm,
topsep = 0pt,
leftmargin = *,
label = -,
before = \vspace{-0.5\baselineskip},
after = \vspace{-0.5\baselineskip}
}
\begin{document}
\large
\arrayrulecolor{gray}
\begin{tabular}{p{5in} l}
\LARGE\textbf{ZIP ZORN} & \Large [email protected] \\
\Large \textbf{Adventurer} & 555-555-5555 - Narnia, NR \\
\addlinespace[9pt]
\midrule[2pt]
\addlinespace[12pt]
% \arrayrulecolor{black} % if needed
\textbf{Self-Employed} - Consultant
& 01/0001 - Present \\
\begin{itemize}
\item Filler text
\end{itemize} & \\
\textbf{Job two} - Senior Associate
& 08/2015 - 07/2016 \\
\begin{itemize}
\item Filler text
\end{itemize} & \\
\textbf{Job one} - Worker & 95/2056 - 87/9015 \\
\begin{itemize}
\item Filler text
\end{itemize}
\end{tabular}
\end{document}
多于姆韦给出:
如您所见,我省略了所有与颜色相关的内容(可以轻松添加)。除此之外,我还做了以下更改:
- 删除包
color
(有就足够了xcolor
) - 删除页面
gemoetry
设置 enumerate
用以下软件包替换enumitem
- 更改表格格式
- 将所有表格合并为一个(如果完整表格超过一页,则需要
longtable
在序言中添加包并替换tabular
为longtable
enumerate
被替换itemize
,并且所有列表都是新的 insife 表格单元格- 对于规则,我建议使用
booktabs
包中的规则。如果需要,可以对它们进行着色 - 字体大小切换
\large
从表格移至文档开头(您真的需要它吗?)
我希望这个大多与主题无关的建议能够有所帮助。建议的更改也仅针对您在问题中报告的问题。