將清單項目內容對齊在同一層級

將清單項目內容對齊在同一層級

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

我不想使用它們\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}

相關內容