如何从简历模板中删除空白的水平线?

如何从简历模板中删除空白的水平线?

我正在用网上找到的模板写我的学术简历Latex。模板顶部有一个联系信息部分,编辑后如下所示: 在此处输入图片描述

我尽力想弄清楚为什么在“CONTACT”一词旁边有一条空白的水平线,但徒劳无功。地址似乎是在“INFORMATION”一词的开头。非常感谢任何帮助。以下是 MWE:

\documentclass[12pt]{article}
\RequirePackage[T1]{fontenc}
\usepackage{times}
\usepackage{calc}
\reversemarginpar

\usepackage[paper=a4paper,
        marginparwidth=30.5mm,    
        marginparsep=1.5mm,       
        margin=1.9cm,             
        includemp]{geometry}

\setlength{\parindent}{0in}

\usepackage{color,hyperref}

\newcommand{\makeheading}[2][]%
    {\hspace*{-\marginparsep minus \marginparwidth}%
     \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
         {\large #2 \hfill #1}\\[-0.15\baselineskip]%
             \rule{\columnwidth}{1pt}%
     \end{minipage}}

\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}


\begin{document}
\makeheading{\Huge{\textsc{John Doe}}}

\section{Contact Information}
%
\newlength{\rcollength}\setlength{\rcollength}{1.85in}%
\newlength{\spacewidth}\setlength{\spacewidth}{20pt}
%
\begin{tabular}[t]{@{}p{\textwidth-\rcollength-\spacewidth}@{}p{\spacewidth}@{}p{\rcollength}}%

% Address box
\parbox{\textwidth-\rcollength-\spacewidth}{%
Center for Big Shot Studies\\
The Haughty University\\
Viale Brillianca, 23, 00197 Rome RM, Italy}

&
\parbox[m][5\baselineskip]{\spacewidth}{} &
\parbox{\rcollength}{%
\textit{Mobile:} +39-00000-11111 \\
\textit{E-mail:} \href{[email protected]}{[email protected]}\\
\textit{WWW:} \href{https://haughty.com/}{haughty.com/}}

\end{tabular}

\end{document}

答案1

没有 parboxes 的简单方法tabular应该可以完美运行。除了计算列宽,您还可以使用简单方法tabular*组合,\extracolsep{\fill}}以确保表格使用可用的文本宽度。

在此处输入图片描述

\documentclass[12pt]{article}
\RequirePackage[T1]{fontenc}
\usepackage{times}
\usepackage{calc}
\reversemarginpar

\usepackage[paper=a4paper,
        marginparwidth=30.5mm,    
        marginparsep=1.5mm,       
        margin=1.9cm,             
        includemp]{geometry}

\setlength{\parindent}{0in}

\usepackage{color,hyperref}

\newcommand{\makeheading}[2][]%
    {\hspace*{-\marginparsep minus \marginparwidth}%
     \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
         {\large #2 \hfill #1}\\[-0.15\baselineskip]%
             \rule{\columnwidth}{1pt}%
     \end{minipage}}

\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}


\begin{document}
\makeheading{\Huge{\textsc{John Doe}}}

\section{Contact Information}
%
\newlength{\rcollength}\setlength{\rcollength}{1.85in}%
\newlength{\spacewidth}\setlength{\spacewidth}{20pt}
%
\begin{tabular}[t]{@{}p{\textwidth-\rcollength-\spacewidth}@{}p{\spacewidth}@{}p{\rcollength}@{}}%
Center for Big Shot Studies && \textit{Mobile:} +39-00000-11111\\
The Haughty University      && \textit{E-mail:} \href{[email protected]}{[email protected]}\\
Viale Brillianca, 23, 00197 Rome RM, Italy && \textit{WWW:} \href{https://haughty.com/}{haughty.com/}
\end{tabular}

\begin{tabular*}{\hsize}[t]{@{\extracolsep{\fill}}l@{}l@{}}%
Center for Big Shot Studies & \textit{Mobile:} +39-00000-11111\\
The Haughty University      & \textit{E-mail:} \href{[email protected]}{[email protected]}\\
Viale Brillianca, 23, 00197 Rome RM, Italy & \textit{WWW:} \href{https://haughty.com/}{haughty.com/}
\end{tabular*}

\end{document}

相关内容