1

I am using etaremune package for my CV. Below is sample code as described in: enumitem newlist with etaremune

\documentclass[11pt]{article}

% This is a helpful package that puts math inside length specifications
\usepackage{calc}
\usepackage{blindtext}
% 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}[wide=0pt]
    \item pub1
    \item \blindtext
\end{bibenum}

\section{\textbf{Reverse order}}

\begin{bibenum*}
    \item \blindtext
    \item pub1
\end{bibenum*}

\end{document}

As you can see, there is a difference in indentation between enumerate and etaremune. How can I make the etaremune item same as enumerate items? I have tried changing the options of etaremune packages, but could not able to solve the problem.

enter image description here

3
  • I get the same indentation if I omit [wide=0pt].
    – egreg
    May 30, 2020 at 21:08
  • @egreg: yes, at least one can change the indentation for enumerate items using [wide=0pt]. It seems one cannot easily change those for etaremune. May 30, 2020 at 21:28
  • That's much more difficult, I'm afraid.
    – egreg
    May 30, 2020 at 21:37

1 Answer 1

1

If you want wide=0pt, many of the settings you do are useless. I got a “magic length” by asking LaTeX to show some parameters.

\documentclass[11pt]{article}

% This is a helpful package that puts math inside length specifications
\usepackage{calc}
\usepackage{blindtext}
% 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,
  itemsep=\bibsep,parsep=0pt,partopsep=0pt,
  topsep=0pt,
  wide=0pt
}

\newenvironment{bibenum*}
  {\renewcommand\labelenumi{[\theenumi]}%
   \etaremune[
     topsep=0pt,
     itemsep=\bibsep,
     parsep=0pt,partopsep=0pt,
     labelwidth=0pt,
     labelsep=5.475pt,
     itemindent=5.475pt,
     leftmargin=0pt,
   ]\renewcommand{\makelabel}[1]{##1\hss}%
}
  {\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 \blindtext
\end{bibenum}

\section{\textbf{Reverse order}}

\begin{bibenum*}
    \item \blindtext
    \item pub1
\end{bibenum*}

\end{document}

enter image description here

2
  • worked wonderfully. Thank you. Can you please share the commands that you have used for LaTeX to show the “magic length”? May 30, 2020 at 22:30
  • @SomnathBhowmick I added \showthe\labelsep in the enumerate environment.
    – egreg
    May 31, 2020 at 7:55

You must log in to answer this question.

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