将列表项内容对齐到同一级别

将列表项内容对齐到同一级别

完成以下任务的最佳方法是什么?使用表格?

我不想使用它们\hfill并将它们推到行尾。

• list-item           i want this
• longggg-item        and this to be aligned
• another-item        at the same level auto

更普遍地

• some text                  i want this                  same here
• another text               and this to be at the        same here
• not the same length        same level after let say     seconde level here

答案1

像这样吗?

在此处输入图片描述

\documentclass{article}
\newcommand\mybullet{{\tiny\raise0.5ex\hbox{\textbullet}\ }} % custom-size "bullet"
\begin{document}

\noindent
\begin{tabular}{@{\mybullet}ll}
list-item & i want this\\
longgg-item & and this to be aligned\\
another-item & at the same level auto\\
\end{tabular}

\bigskip\noindent
\begin{tabular}{@{\mybullet}lll}
some text & i want this & same here\\
some other text & and this to be at the & same here\\
not the same length & same level after let say & seconde level here\\
\end{tabular}

\end{document}

相关内容