自定义 itemize 环境

自定义 itemize 环境

\documentclass[french,11pt]{article}

\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{kpfonts} \usepackage{blindtext}

\setlength{\parskip}{1.2ex} \setlength{\parindent}{0em} \clubpenalty = 10000 \widowpenalty = 10000

  \usepackage{graphicx,bm,url, amsfonts, latexsym, verbatim, xspace, setspace,mathrsfs,marvosym,wasysym,amsmath, amssymb}

\usepackage{caption} \usepackage[caption=false]{subfig} \usepackage{epstopdf}


\usepackage{enumitem} \setlist[itemize]{leftmargin=*,itemsep=1pt,topsep=1pt} %\setlist[description]{leftmargin=*,itemsep=1pt,topsep=1pt} \setlist[enumerate]{leftmargin=*,itemsep=1pt,topsep=1pt}


\usepackage[colorlinks=true,    linkcolor=red,  urlcolor=blue,  pdftitle={article},     pdfauthor={DSA}]{hyperref}   \usepackage{geometry}  \geometry{  a4paper,  total={170mm,257mm},  left=20mm,  top=20mm,  }   \providecommand{\keywords}[1]{\textbf{\textit{Mots clés ---}} #1}

\providecommand{\thematic}[1]{\textbf{\textit{Thématique ---}} #1}

\usepackage{authblk}

\newcommand{\M}{{\it Mathematica}}


\begin{document}

\title{BlaBlaBla} \author[,1]{Dimitrios\thanks{\texttt{\url{[email protected]}}}} %\author[,1]{Panos\thanks{ \texttt{\url{[email protected]}}}} %\author[,1]{Thanos\thanks{Corresponding author:  %\texttt{\url{[email protected]}}}} \affil[1]{Université de nulle parte, Terre, Galaxie}

\date{}

\clearpage\maketitle \thispagestyle{empty}

\begin{itemize}\setlength\itemsep{1em} \item \textbf{1993-1996:}  \blindtext \item  {\bf 1997-2002:}  \blindtext \item \textbf{2003-2015:} \blindtext

\end{itemize}

\end{document}

这给出

在此处输入图片描述

我想修改输出,使年份显示在左侧,并且每个文本条目都向右缩进,就像我们在简历中看到的效果一样。为了清楚起见(我希望!)请看下图。

在此处输入图片描述

我还想知道我们如何实现垂直线分离。

答案1

我宁愿使用description环境来修补\descriptionlabel命令:

\documentclass[french,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
 \usepackage{kpfonts}
 \usepackage{geometry}
 \geometry{ a4paper, total={170mm,257mm}, left=20mm, top=20mm, showframe}
 \usepackage{blindtext}

\setlength{\parskip}{1.2ex} \setlength{\parindent}{0em} \clubpenalty = 10000 \widowpenalty = 10000

 \usepackage{graphicx,bm,url, amsfonts, latexsym, verbatim, xspace, setspace,mathrsfs,marvosym,wasysym,amsmath, amssymb}
 \usepackage{caption}
 \usepackage[caption=false]{subfig}
 \usepackage{epstopdf}

\usepackage{enumitem}
\usepackage{xpatch}
\xpatchcmd{\descriptionlabel}{#1}{---\enspace#1 :}{}{}
\usepackage[colorlinks=true, linkcolor=red, urlcolor=blue, pdftitle={article}, pdfauthor={DSA}]{hyperref} 
\providecommand{\keywords}[1]{\textbf{\textit{Mots clés ---}} #1}

\providecommand{\thematic}[1]{\textbf{\textit{Thématique ---}} #1}

\usepackage{authblk}

\newcommand{\M}{{\it Mathematica}}

\begin{document}

\title{BlaBlaBla} \author[,1]{Dimitrios\thanks{\texttt{\url{[email protected]}}}} %

\date{}

\clearpage\maketitle \thispagestyle{empty}

\begin{description}[itemsep=1em, leftmargin=80pt]
\item[1993-1996] \blindtext
\item[1997-2002] \blindtext
\item[2003-2015] \blindtext
\end{description}

\end{document} 

在此处输入图片描述

答案2

看看以下解决方案是否是您想要的:

\documentclass[french,11pt]{article}
\usepackage{geometry}
\geometry{a4paper,  total={170mm,257mm},  left=20mm,  top=20mm}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{kpfonts}
\usepackage{blindtext}

\setlength{\parskip}{1.2ex}
\setlength{\parindent}{0em}
\clubpenalty = 10000 \widowpenalty = 10000

\usepackage{graphicx,bm,url, latexsym, verbatim, xspace, setspace,mathrsfs,marvosym,wasysym,amsmath, amssymb}

\usepackage{caption}
\usepackage[caption=false]{subfig}
%\usepackage{epstopdf}

\usepackage{enumitem}

\usepackage{authblk}
\usepackage[colorlinks=true,
            linkcolor=red,
            urlcolor=blue,
            pdftitle={article},
            pdfauthor={DSA}]{hyperref}

\providecommand{\keywords}[1]{\textbf{\textit{Mots clés ---}} #1}
\providecommand{\thematic}[1]{\textbf{\textit{Thématique ---}} #1}

\newcommand{\M}{\textit{Mathematica}}


\begin{document}
\title{BlaBlaBla}
\author[,1]{Dimitrios\thanks{\url{[email protected]}}}

\date{}
\clearpage\maketitle \thispagestyle{empty}

\begin{description}[font=\textendash\,\bfseries,
                    leftmargin=27mm,
                    style=nextline]
\item[1993-1996:] \blindtext
\item[1997-2002:] \blindtext
\item[2003-2015:] \blindtext
\end{description}

\end{document}

在此处输入图片描述

相关内容