我正在尝试更改“教育”下下划线的长度。我想缩短下划线(与最右侧红线相交的地方),以便它与左侧的红线对齐,这样下划线就可以与最左侧红线下方的所有内容完美对齐。(请参阅下面的链接)。
下划线似乎延伸得有点太远,没有与右边距完全对齐。
代码:
\documentclass[letterpaper,10pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym} % font
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[pdftex]{hyperref}
% or \usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
%\usepackage[english]{babel}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.375in}
\addtolength{\evensidemargin}{-0.375in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{-5pt}]
% Custom commands
\newcommand{\resumeItem}[2]{
\item\small{
\textbf{#1}{: #2 \vspace{-2pt}}
}
}
\newcommand{\resumeSubheadingEd}[4]{
\vspace{-1pt}\item
\begin{tabular*}{0.97\textwidth}{p{0.8\linewidth}@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-5pt}
}
\newcommand{\resumeItemNoBullet}[2]{
\vspace{-5pt}
\item[]\small{
\hspace{0pt}\textbf{#1} #2
\vspace{-4pt}
}
}
\newcommand{\resumeSubheading}[4]{
\vspace{-1pt}\item
\begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-5pt}
}
\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}}
\renewcommand{\labelitemii}{$\circ$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-3pt}}
\begin{document}
%----------HEADING-----------------
\begin{tabular*}{.99\textwidth}{l@{\extracolsep{\fill}}l} % originally .97\textwidth
\textbf{\Huge John J. Doe} & Email: \href{mailto:[email protected]}{[email protected]}\\
& Mobile: +1-312-312-3124 \\
& Address: 000 E. South Water St.\\
& \hspace{38.5pt} Chicago, IL. 60601
\end{tabular*}
%-----------EDUCATION-----------------
\section{Education}
\resumeSubHeadingListStart
\resumeSubheadingEd
{Kellstadt Graduate School of Business -- DePaul University}{Chicago, IL}{Master of Science in Computational Finance}{November 2021}
\resumeSubHeadingListEnd
\end{document}
答案1
您可以在格式化部分命令时使用常规命令,\rule
而不是\textrule
,这样可以指定宽度,但需要反复试验才能使其看起来正确:
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\vspace{-9pt}\color{black}\rule{0.99\textwidth}{0.4px} \vspace{-10pt}]
如果有更好的方法,我不会感到惊讶,但你为什么要按照现在的方式做事,对我来说有点神秘。