这是我第一次在这里提问,所以如果我没有解释清楚,请原谅我。说我是初学者,这太轻描淡写了。但我还是要说说。
我正在写简历,总是遇到同样的问题。前两行总是粘在一起,我无法将它们分开。代码如下:
\documentclass[10pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{titlesec}
\usepackage{array, xcolor}
\newcolumntype{L}{>{\raggedleft}p{0.08\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}]
\begin{document}
\section*{Publications}
\begin{tabular}{L!{\VRule}R}
2021&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}
2020&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}
2019&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}
2018&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}
2015&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
\vspace{5mm}
\end{tabular}
\end{document}
再次道歉,但我不知道如何使用这个网站,所以我不知道如何在评论中排版以向您展示它是什么样子,但基本上有两个问题:
(1)前两行(以“2021”开头的行和以“2020”开头的行之间没有间距,而我希望它们有间距。我尝试了各种各样的方法(例如, \vspace{5mm}),但都没有用。
(2)左侧显示的年份与右侧的信息不一致。
任何帮助都将不胜感激!提前谢谢您。
答案1
另一种方法是使用tabularray
。
您可以设置任何rowsep
您喜欢的设置:
\documentclass[10pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\section*{Publications}
\begin{tblr}{
colspec={Q[t,r,wd={0.08\textwidth}]|X},
vline{2} ={.5pt,lightgray},
rowsep=5mm,
row{1}={abovesep=2pt},
row{Z}={belowsep=2pt},
}
2021&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\
2020&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\
2019&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\
2018&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\
2015&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\
\end{tblr}
\end{document}
答案2
您不应该\vspace
在里面使用tabular
。
如果您想增加行之间的垂直空间,请5pt
使用其他内容更改长度。
\documentclass[10pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{titlesec}
\usepackage{array, xcolor}
\newcolumntype{L}{>{\raggedleft}p{0.08\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{}[{\titlerule[0.8pt]}]
\begin{document}
\section*{Publications}
\begin{tabular}{L!{\VRule}R}
2021&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
2020&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
2019&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
2018&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.\\[5pt]
2015&``Blah blah blah blah.'' \textit{Journal of blah blah blah}. Vol. 1, No. 1, pp. 1-23.
\end{tabular}
\end{document}
而\\[12pt]
不是\\[5pt]
你会得到