我正在尝试创建简历。现在我注意到以下内容似乎会给自动处理带来问题。即日期读取不正确。当我在 pdf 中选择文本时,我也会得到错误的选择顺序;当然我想在其余项目之前选择所有日期。我该如何解决这个问题?
\documentclass[draft]{scrartcl}
\usepackage{enumitem,calc,array}
\newlength\descriptionwidthi
\settowidth\descriptionwidthi{\sffamily\bfseries 11/2012}
\newlength\descriptionsepi
\setlength\descriptionsepi{1ex}
\setlist[1]{
labelwidth=\descriptionwidthi,
labelsep=\descriptionsepi,
leftmargin=!,
parsep=.5ex,
align=left,
}
\setlength{\parindent}{0pt}
\setcounter{secnumdepth}{0}
\newcommand{\range}[2]{\smash{\parbox[t]{\descriptionwidthi}{#1\\\llap{–\,}#2}}}
\begin{document}
\section{John Doe}
\begin{description}[]
\item[\range{01/2011}{12/2015}] Some degree\\Activities:
\item[\range{01/2011}{12/2015}] Something else\\Activities:
\item[\range{01/2011}{12/2015}] Just for demonstration\\Bla bla bla
\end{description}
\end{document}
答案1
作为标记可以提供帮助的概念证明(这需要当前的 LaTeX。列表的界面尚未完成并且必然会发生变化!):
\DocumentMetadata{testphase=phase-III,pdfversion=2.0} %or some other pdfversion
\documentclass[draft]{article}
\newlength\descriptionwidthi
\AddToHook{begindocument/end}{\settowidth\descriptionwidthi{\sffamily\bfseries 11/2012}}
\newcommand{\range}[2]{\smash{\tagstop
\parbox[t]{\descriptionwidthi}{\sffamily\bfseries#1\\\llap{–\,}#2}}}
\begin{document}
\section{John Doe}
\begin{description}[label-width=\descriptionwidthi,
leftmargin= \descriptionwidthi+1ex,
label-sep=1ex,
]
\item[\range{01/2011}{12/2015}] Some degree\\Activities:
\item[\range{01/2011}{12/2015}] Something else\\Activities:
\item[\range{01/2011}{12/2015}] Just for demonstration\\Bla bla bla
\end{description}
\end{document}