
我正在嘗試製作一份簡歷,其中有一個部分我想列出我用項目符號完成的項目,所以我在這樣的環境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}