将 enumitem 标签放置在右边距

将 enumitem 标签放置在右边距

这与 tex 问题类似,但略有相反:左边距的标签

我希望右列中的描述(enumitem)在右边距有标签,类似于左列在左边距有标签。

当前(不完全正确)

\documentclass{article}
\usepackage{enumitem}
\usepackage{paracol}
\SetLabelAlign{margin}{\llap{#1~~}}
\usepackage{showframe} % just to show the margins
\begin{document}

\begin{paracol}{2}
\begin{description}[align=margin,labelsep=0pt,leftmargin=*,font=\color{gray}]
  \item[A] text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
  \item[ABC] moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext
\end{description}
\switchcolumn
\raggedleft
\begin{description}[align=margin,labelsep=0pt,leftmargin=*,font=\color{gray}]
  \item[A] text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
  \item[ABC] moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext moretext
\end{description}
\end{paracol}



\end{document} 

最小可重复示例

答案1

定义一个rightmargin键来排版超出列宽的零宽度框。我将其重命名marginleftmargin以实现对称性。

\documentclass{article}

\usepackage{enumitem}
\usepackage{paracol}
\usepackage{showframe} % just to show the margins

\SetLabelAlign{leftmargin}{\llap{#1\enspace}}
\SetLabelAlign{rightmargin}{\rlap{\hspace{\columnwidth}\enspace#1}}

\begin{document}

\begin{paracol}{2}
\begin{description}[align=leftmargin,labelsep=0pt,leftmargin=*,font=\color{gray}]
  \item[A] text text text text text text text text text text text text text 
           text text text text text text text text text text text text text
           text text text text text text text text text text text
  \item[ABC] moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
\end{description}
\switchcolumn
\raggedleft
\begin{description}[align=rightmargin,labelsep=0pt,leftmargin=*,font=\color{gray}]
  \item[A] text text text text text text text text text text text text text
           text text text text text text text text text text text text text
           text text text text text text text text text text text
  \item[ABC] moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
             moretext moretext moretext moretext moretext moretext moretext
\end{description}
\end{paracol}

\end{document} 

在此处输入图片描述

相关内容