我正在尝试制作一份简历,其中有一个部分我想用项目符号列出我所做过的项目,因此我在这样的环境itemize
中使用列表:tabularx
\begin{tabularx}{\linewidth}{>{\centering\arraybackslash}p{2.8cm}|X}
2015 - 2017 & \textbf{Title of Master} \textbf{(120 ECTS)}, Specialization\\[1mm]
& Key projects:\\
& \begin{itemize}
\item Project 1
\item Project 2
\item Project 3
\end{itemize}\\
\multicolumn{2}{c}{}\\
2010 - 2014 & \textbf{Bachelor (180 ECTS)}\\[1mm]
& Final grade: 7.51/10.00 - Name of University\\
& $\bullet$ Diploma thesis: \textit{"Name of thesis"}\\
& $\bullet$ Type of Specialization \\%[2mm]
\end{tabularx}
\setlist[itemize]{leftmargin=*}
使用文档开头的命令,我设法抑制了包含关键项目的列表中项目的缩进,但在“关键项目”行后面有一个垂直空格,在列表末尾后面有一个垂直空格,我无法抑制。我尝试使用topsep
下面块中的选项,但没有用:
& Key projects:\\
& \begin{itemize}[noitemsep,topsep=0pt]
\item Project 1
\item Project 2
\item Project 3
\end{itemize}\\
最后,我尝试手动列出项目,只需在每个项目前面添加项目符号即可:
& Key projects:\\
& $\bullet$ Project 1\\
& $\bullet$ Project 2\\
& $\bullet$ Project 3\\
效果很好,只是最后一个项目的标题比实际的要长,\linewidth
并且换行时,文本从项目符号的正下方开始,而不是从上一行开始的地方开始。
所以我的问题是,我该怎么做全球抑制列表创建的缩进和垂直空格?
更新:这是重现和可视化问题的代码的一部分。
\documentclass[a4paper,10pt]{article}
%%%%-------------------------Packages-------------------------------------------
%\usepackage{extsizes} %package for extra font sizes
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{titlesec} %package to edit document and section titles
\usepackage{enumitem} %package to edit the lists
\usepackage{parskip} %package to suppress paragraph indentation
\usepackage{verbatim} %package to comment in/out chunks of code
\usepackage{tabularx} %package for better manipulation of matrix dimensions
\usepackage{array} %package that allows an alignement command along with a column width specifier (p-column)
\usepackage{geometry} %package to tweak the margins and dimensions of the page
\geometry{
a4paper,
left=10mm,
right=10mm,
top=9mm,
bottom=8mm
}
\usepackage{hyperref} %package to include hyperlinks
\hypersetup{ %edit how the hyperlinks will appear
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
\urlstyle{same}
%%%%%%%%%%%%%%%%%%----------------- Beginning of the document-------------------
\begin{document}
%-------------general settings for the whole document--------------------
% \url{https://www.sharelatex.com/learn/Sections_and_chapters#
% Customize_chapters_and_sections}
\titleformat{\section}[block]{\large\bf\raggedright}{}{0cm}{}[\titlerule]
\titlespacing{\section}{0pt}{1.5pt}{0pt}
%\setlist[itemize]{leftmargin=*} % remove the indent from all list items
%\setlist[itemize]{noitemsep, topsep=0pt}
%\setlist[itemize]{nosep}
\pagestyle{empty} %non-numbered pages
%-------------------------Education Section----------------------------------
\section{Education} % Section Education
\begin{tabularx}{\linewidth}{>{\centering\arraybackslash}p{2.8cm}|X}
2015 - 2017 & \textbf{Title of Master} \textbf{(120 ECTS)}, Specialization\\[1mm]
& Key projects:\\
& \begin{itemize}
\item Project 1
\item Project 2
\item Project 3
\end{itemize}\\
\multicolumn{2}{c}{}\\
2010 - 2014 & \textbf{Bachelor (180 ECTS)}\\[1mm]
& Final grade: 7.51/10.00 - Name of University\\
& $\bullet$ Diploma thesis: \textit{"The name of the thesis which is long enough that the text wraps but starts right below the bullet instead of starting where the word ""Diploma" starts}\\
& $\bullet$ Type of Specialization \\%[2mm]
\end{tabularx}
\end{document}
因此,在第一种情况下,我无法消除项目的缩进以及它们上方和下方的垂直空格。在第二部分中,我只是手动添加项目符号,但毕业论文的名称太长,以至于它会换行并且看起来很丑陋,因为它与项目符号对齐,而不是与上面的单词对齐。
我想要的是结果像第二种情况那样显示,但同时修复换行问题。希望我说清楚了。谢谢你的帮助。
答案1
我将它们隐藏在表格中:
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[style=british]{csquotes} \usepackage{array, tabularx}
\usepackage{enumitem}
\usepackage[table, x11names]{xcolor}
\begin{document}
\begin{table}[!ht]
\setlist[itemize]{wide=0pt, label=\color{LightBlue3}\textbullet, noitemsep, topsep=2pt, leftmargin=*, after =\vspace*{-\baselineskip}}
\begin{tabularx}{\linewidth}{>{\centering\arraybackslash}p{2.8cm}! {\color{LightBlue3}\vrule width1.5pt}>{\arraybackslash}X}
2015 - 2017 & \textbf{Title of Master} \textbf{(120 ECTS)}, Specialization \\[1mm]
& Key projects:
\begin{itemize}
\item Project 1
\item Project 2
\item Project 3
\end{itemize}\\
\multicolumn{2}{c}{}\\
2010 - 2014 & \textbf{Bachelor (180 ECTS)} \\[1mm]
& Final grade: 7.51/10.00 - Name of University
\begin{itemize}
\item Diploma thesis: \textit{\enquote{The Hunting of the Snark. An agony in eight fits}}
\item Type of Specialization%[2mm]
\end{itemize}
\end{tabularx}
\end{table}
\end{document}