在以下 (M)WE 中,tabular
CV 中的联系信息版本在使用 编译时会给出水平盒子过满警告pdfLatex
,但minipage
版本不会。为什么?在关于水平盒子过满的众多问题中,我还没有找到令人满意的解释,但如果你知道正确的地方,请引导我去那里!
\documentclass[10pt,draft]{article}
\usepackage{calc}
\usepackage[paper=letterpaper,
margin=1in,
showframe]{geometry}
\setlength{\parindent}{0in}
\setlength\fboxsep{0pt}
\begin{document}
\newlength{\rcollength}\setlength{\rcollength}{2.1in}%
\newlength{\spacewidth}\setlength{\spacewidth}{50pt}%
\newlength{\lcollength}\setlength{\lcollength}{\textwidth-\rcollength-\spacewidth}
%
\begin{tabular}[t]{@{}p{\lcollength}@{}p{\spacewidth}@{}p{\rcollength}}%
\parbox{\lcollength}{%
Department of Mechanical Engineering\\%
University of Anywhere\\%
123 Road St.\\%
Normal, IL USA}%
&%
{\vrule width 0.5pt}
\parbox[m][4\baselineskip]{\spacewidth}{}%
&%
\parbox{\rcollength}{%
\textit{E-mail:}\\%
\textit{Work:} +1-123-456-7890 \\%
\textit{Cell:} +1-123-456-7890 \\%
\textit{Web:}%
}%
\end{tabular}%
\begin{minipage}{\lcollength}
Department of Mechanical Engineering\\%
University of Anywhere\\%
123 Road St.\\%
Normal, IL USA%
\end{minipage}%
\begin{minipage}{\spacewidth}
\rule{0.5pt}{4\baselineskip}
\end{minipage}%
\begin{minipage}{\rcollength}
\textit{E-mail:}\\%
\textit{Work:} +1-123-456-7890 \\%
\textit{Cell:} +1-123-456-7890 \\%
\textit{Web:}%
\end{minipage}
\end{document}
答案1
\begin{tabular}[t]{@{}p{\lcollength}@{}p{\spacewidth}@{}p{\rcollength}}%
您已经习惯省略大部分列间空间,但最后@{}
却没有,因此最后一列后面有一个。@{}
\tabcolsep
\begin{tabular}[t]{@{}p{\lcollength}@{}p{\spacewidth}@{}p{\rcollength}@{}}%