将项目符号指定给列表中的第一个单元格

将项目符号指定给列表中的第一个单元格

我有以下 LaTeX 代码,用于生成简历的教育部分

\documentclass[a4paper,20pt]{article}

\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[pdftex]{hyperref}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% Adjust margins
\addtolength{\oddsidemargin}{-0.530in}
\addtolength{\evensidemargin}{-0.375in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.45in}
\addtolength{\textheight}{1in}

\urlstyle{rm}

\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}

% Sections formatting
\titleformat{\section}{
  \vspace{-10pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{-6pt}]

%-------------------------
% Custom commands
\newcommand{\resumeItem}[1]{
  \item\small{
    #1 \vspace{-2pt}
  }
}

\newcommand{\resumeItemWithoutTitle}[1]{
  \item\small{
    {\vspace{-2pt}}
  }
}

\newcommand{\resumeSubheading}[4]{
  \vspace{-1pt}\item
    \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
      \textbf{#1} & #2 \\
      \textit{#3} & \textit{#4} \\
    \end{tabular*}\vspace{-5pt}
}


\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-3pt}}

\renewcommand{\labelitemii}{$\circ$}

\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}

%-----------------------------
%%%%%%  RESUME STARTS HERE  %%%%%%

\begin{document}

%----------HEADING-----------------
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
  \textbf{{\LARGE Shrey Joshi}} & Email: \href{mailto:[email protected]}{[email protected]}\\
  \href{https://shreyjoshi.com}{Website: shreyjoshi.com} & LinkedIn: \href{https://www.linkedin.com/in/sjoshi1729/}{in/sjoshi1729} | 
  \href{https://github.com/xprilion}{GitHub: ~~@shreyj1729} \\
\end{tabular*}

%-----------EDUCATION-----------------
\section{~~Education}
  \resumeSubHeadingListStart
    \resumeSubheading
      {University of Texas at Dallas}{Dallas, Texas}
      {B.S. Computer Science, AES + National Merit Full-ride Scholarship}{2022 - 2025 (Expected)}
    \resumeSubHeadingListEnd

\end{document}

但这会导致以下输出,其中项目符号位于两行文本的中心。我怎样才能使项目符号仅位于第一行加粗文本上?

在此处输入图片描述

答案1

[t]重复我在评论中所写的内容,您可以通过将第二个可选参数添加到 tabular* 环境来将 tabular* 环境的顶部与周围文本对齐:

\newcommand{\resumeSubheading}[4]{
  \vspace{-1pt}\item
    \begin{tabular*}{0.97\textwidth}[t]{l@{\extracolsep{\fill}}r}
      \textbf{#1} & #2 \\
      \textit{#3} & \textit{#4} \\
    \end{tabular*}\vspace{-5pt}
}

相关内容