9

I am entering my publications into the CV. Currently, I am using enumitem to define a new enumerate list as follows:

\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

And add the publications as follows:

\begin{bibenum}
\item \bibentry{pub1}
\item \bibentry{pub2}
\end{bibenum}

It works fine (an example shown below)

example

but gives the numbers in increasing order. Instead I want them in decreasing order. So, I tried using the etaremune package as follows

\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

But it gives an error of undefined control sequence...Package enumitem Error: Unknown list type 'etaremune'). Any ideas what is wrong? Is it possible to use etaremune with enumitem package?

EDIT: As pointed out by egreg, I cannot use etaremune with enumitem. Does anyone know any other way to do it? Basically a reverse numbered list with flexibility of defining the way it looks (like square brackets, indentations, separations etc.

Following is a minimum working example. I started from a template I found online and tried to remove all the unnecessary commands. Any help?

\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}
9
  • There is really no difference between the two usages, even though you mention that you're using etaremune in the second. What "undefined control sequence" error are you receiving exactly?
    – Werner
    Commented Jan 10, 2014 at 15:54
  • In the second one, I use etaremune instead of enumerate while defining the \newlist{bibenum} -- so as to get reverse numbering. I am getting the following error: ./CVheader.tex:127: Undefined control sequence. <argument> ... itemize, description,\messageBreak enumerate*, itemize*, desc... l.127 \newlist{bibenumr}{eta./CVheader.tex:127: Package enumitem Error: Unknown list type `etaremune').
    – Ankush
    Commented Jan 10, 2014 at 16:12
  • 1
    @Ankush Basically you can't do this way: etaremune is not a list defined in enumitem, but rather an environment built over the standard enumerate.
    – egreg
    Commented Jan 10, 2014 at 17:04
  • @egreg: Any other way around it? I want to keep the same style of list as in bibenum but reverse the numbering.
    – Ankush
    Commented Jan 10, 2014 at 17:21
  • Can you add an example of how you would use the environments?
    – egreg
    Commented Jan 10, 2014 at 18:08

1 Answer 1

12

etaremune is customizable similarly to enumitem. Here's an emulation.

\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}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .