我正在将我的出版物输入到简历中。目前,我正在使用enumitem
以下方式定义新的枚举列表:
\makeatletter
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
{\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
\newlist{bibenum}{enumerate}{3}
\setlist[bibenum]{label=[\arabic*],resume,leftmargin={\bibhang+\widthof{[999]}},%
itemindent=-\bibhang,
itemsep=\bibsep,parsep=\z@,partopsep=0pt,
topsep=0pt}
\let\oldendbibenum\endbibenum
\def\endbibenum{\oldendbibenum\vspace{-.6\baselineskip}}
\makeatother
并添加以下出版物:
\begin{bibenum}
\item \bibentry{pub1}
\item \bibentry{pub2}
\end{bibenum}
运行良好(如下所示的示例)
但给出的数字是按升序排列的。相反,我希望它们按降序排列。因此,我尝试使用etaremune
以下包
\makeatletter
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
{\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
\newlist{bibenumr}{etaremune}{3}
\setlist[bibenumr]{label=[\arabic*],resume,leftmargin={\bibhang+\widthof{[999]}},%
itemindent=-\bibhang,
itemsep=\bibsep,parsep=\z@,partopsep=0pt,
topsep=0pt}
\let\oldendbibenumr\endbibenumr
\def\endbibenumr{\oldendbibenumr\vspace{-.6\baselineskip}}
\makeatother
但是它给出了错误undefined control sequence...Package enumitem Error: Unknown list type 'etaremune')
。有什么想法吗?是否可以使用etaremune
withenumitem
包?
编辑:正如 egreg 指出的那样,我无法将 etaremune 与 enumitem 一起使用。有人知道其他方法吗?基本上是一个反向编号列表,可以灵活地定义其外观(如方括号、缩进、分隔等)。
以下是一个最低限度的工作示例。我从网上找到的模板开始,并尝试删除所有不必要的命令。有什么帮助吗?
\documentclass[11pt]{article}
% This is a helpful package that puts math inside length specifications
\usepackage{calc}
% Layout: Puts the section titles on left side of page
\reversemarginpar
%% Use these lines for letter-sized paper
\usepackage[paper=letterpaper,
marginparwidth=1.2in, % Length of section titles
marginparsep=.05in, % Space between titles and text
margin=1in, % 1 inch margins
includemp]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DEFINE THE "bibenum" list using enumitem package
%%% Need to modify this such that "bibenum" gives reverse numbering instead
\usepackage[shortlabels]{enumitem}
\makeatletter
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
{\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
\newlist{bibenum}{enumerate}{3}
\setlist[bibenum]{label=[\arabic*],resume,leftmargin={\bibhang+\widthof{[999]}},%
itemindent=-\bibhang,
itemsep=\bibsep,parsep=\z@,partopsep=0pt,
topsep=0pt}
\let\oldendbibenum\endbibenum
\def\endbibenum{\oldendbibenum\vspace{-.6\baselineskip}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
%%% SECTION HEADINGS
\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}
\begin{document}
\section{\textbf{Journal Publications}}
\begin{bibenum}
\item pub1
\item pub2
\item pres1
\item pres2
\end{bibenum}
\end{document}
答案1
etaremune
可自定义,类似于enumitem
。这是一个模拟。
\documentclass[11pt]{article}
% This is a helpful package that puts math inside length specifications
\usepackage{calc}
% Layout: Puts the section titles on left side of page
\reversemarginpar
%% Use these lines for letter-sized paper
\usepackage[paper=letterpaper,
marginparwidth=1.2in, % Length of section titles
marginparsep=.05in, % Space between titles and text
margin=1in, % 1 inch margins
includemp]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DEFINE THE "bibenum" list using enumitem package
%%% Need to modify this such that "bibenum" gives reverse numbering instead
\usepackage[shortlabels]{enumitem}
\usepackage{etaremune}
\makeatletter
\newlength{\bibhang}
\setlength{\bibhang}{1em}
\newlength{\bibsep}
{\@listi \global\bibsep\itemsep \global\advance\bibsep by\parsep}
\newlist{bibenum}{enumerate}{3}
\setlist[bibenum]{label=[\arabic*],resume,leftmargin={\bibhang+\widthof{[999]}},%
itemindent=-\bibhang,
itemsep=\bibsep,parsep=0pt,partopsep=0pt,
topsep=0pt}
%\let\oldendbibenum\endbibenum
%\def\endbibenum{\oldendbibenum\vspace{-.6\baselineskip}}
\newenvironment{bibenum*}
{\renewcommand\labelenumi{[\theenumi]}%
\etaremune[
topsep=0pt,
itemsep=\bibsep,
parsep=0pt,partopsep=0pt,
itemindent=-\bibhang,
leftmargin={\bibhang+\widthof{[999]}}]}
{\endetaremune}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
%%% SECTION HEADINGS
\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}
\begin{document}
\section{\textbf{Journal Publications}}
\begin{bibenum}
\item pub1
\item pub2
\item pres1
\item pres2
\end{bibenum}
\section{\textbf{Reverse order}}
\begin{bibenum*}
\item pub1
\item pub2
\item pres1
\item pres2
\end{bibenum*}
\end{document}