![etemune 中的缩进](https://linux22.com/image/415065/etemune%20%E4%B8%AD%E7%9A%84%E7%BC%A9%E8%BF%9B.png)
我正在使用 etemune 包来制作我的 CV。下面是示例代码,如下所示:使用 etemune 进行 enumitem newlist
\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}
如您所见,enumerate 和 etaremune 的缩进有所不同。如何使 etaremune 项目与 enumerate 项目相同?我尝试更改 etaremune 包的选项,但无法解决问题。
答案1
如果你想要wide=0pt
,你所做的许多设置都是无用的。我通过让 LaTeX 显示一些参数得到了一个“魔法长度”。
\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}