将章节标题放在“单独列”中的文本左侧

将章节标题放在“单独列”中的文本左侧

我找到了这份简历,并尝试使用 latex 重新创建类似的东西。部分标题位于左侧,在其自己的列中,但它不在边缘,这让我相信它不在边距中。我该如何做到这一点?

在此处输入图片描述

答案1

您可以使用以下模板:

在此处输入图片描述

\documentclass{article}

\usepackage[margin=1in,left=2in]{geometry}

\newcommand{\newheading}[1]{% Insert a heading
  \par% End off the previous paragraph, if there was one (and enter vertical mode)
  \addvspace{.5\baselineskip}% Insert a gap
  \leavevmode% Leave vertical mode (to start setting the paragraph
  \llap{\bfseries\sffamily #1\hspace*{1em}}% Set the heading in the margin; 1em space on the right
  \ignorespaces% Ignore spaces following \newheading{...}
}
\newcommand{\subheading}[1]{% Insert a subheading
  \ifvmode% If in vertical mode...
    \addvspace{.5\baselineskip}% ...add some vertical space
  \fi
  {\bfseries #1}% Set the subheading...
  \par% ...and end off the paragraph
}
\setlength{\parindent}{0pt}% Remove paragraph indent

\begin{document}

\sffamily

\newheading{Skills}
\subheading{Graphics Programming / Software Engineering / Machine Learning}
Proficient in: C++, Vulkan, Python, TensorFlow, PyTorch, Pandas, JavaScript, React

\subheading{Communication}
Presented at companies and conferences including Microsoft, Amazon, and Web
Summit to audiences of 200+ people on my work with machine learning

\newheading{Competencies}
\subheading{Graphics Programming / Software Engineering / Machine Learning}
Proficient in: C++, Vulkan, Python, TensorFlow, PyTorch, Pandas, JavaScript, React

\subheading{Communication}
Presented at companies and conferences including Microsoft, Amazon, and Web
Summit to audiences of 200+ people on my work with machine learning


\end{document}

相关内容