我想列出类似这样的内容,但所有:符号应与列表中所有其他项目位于同一水平空间
答:jkajdkpajd
银行:odoida
kaak ka: asjad
除了表格之外,如何在乳胶中实现这一点?
答案1
这里我展示了三种方式:\makebox
、tabbing
和tabular
。
\documentclass{article}
\parindent 0in
\begin{document}
RAW: \par
A : jkajdkpajd\par
Bnk : odoida\par
kaak ka: asjad
\bigskip
\newlength\longest
\setbox0=\hbox{kaak ka}
\setlength\longest{\wd0}
MAKEBOX:\par
\makebox[\longest][l]{A}: jkajdkpajd\par
\makebox[\longest][l]{Bnk}: odoida\par
\makebox[\longest][l]{kaak ka}: asjad
\bigskip
TABBING:
\begin{tabbing}
kaak ka\=\kill
A \>: jkajdkpajd\\
Bnk \>: odoida\\
kaak ka\>: asjad
\end{tabbing}
\bigskip
TABULAR:\par
\begin{tabular}{@{}l@{}l}
A &: jkajdkpajd\\
Bnk &: odoida\\
kaak ka&: asjad
\end{tabular}
\end{document}
答案2
和enumitem
:
\documentclass{article}
\usepackage{enumitem,calc}
\begin{document}
\begin{itemize}[align=left,labelwidth=\widthof{kaak ka}]
\item[A]: jkajdkpajd\par
\item[Bnk]: odoida\par
\item[kaak ka]: asjad
\end{itemize}
\end{document}