当前代码是:
\begin{enumerate}[label=LEVEL \arabic{*},leftmargin=*]
\item Description of Level 1 \quad L1 \\ \emph{more text}
\item Description of Level 2 \quad L2 \\ \emph{more text}
\end{enumerate}
但\quad
不会在垂直方向上均匀对齐 L1 和 L2。我想\quad
用制表符替换,但tabbing
环境不允许与 混合使用enumerate
!
答案1
您可以使用该包tabto
\documentclass{article}
\usepackage{tabto}
\begin{document}
\TabPositions{4cm}
\begin{enumerate}[label=LEVEL \arabic{*},leftmargin=*]
\item Description of Level 1 \tab L1 \\ \emph{more text}
\item Description of Level 2 \tab L2 \\ \emph{more text}
\end{enumerate}
\end{document}
还可以使用更多标签
\documentclass{article}
\usepackage{tabto}
\begin{document}
\NumTabs{3}
\begin{itemize}
\item some text \tab i want this \tab same here
\item another text \tab and this to be at the \tab same here
\item not the same length \tab same level after let say \tab seconde level here
\end{itemize}
\end{document}
答案2
您可以使用宽度相等的框来制作“标签”。这不是真正的标签,但效果很好
\documentclass{article}
\newlength{\tablen}
\newcommand\tabbox[2][\tablen]{\makebox[#1][l]{#2}}
\begin{document}
\begin{enumerate}
\settowidth\tablen{Description of Level 1 \quad}
\item \tabbox{Description of Level 1} L1 \\ \emph{more text}
\item \tabbox{Description of xxx} L2 \\ \emph{more text}
\end{enumerate}
\end{document}