我想要创建一个如下所示的列表:
Date of Birth: 14 Contact address: Alsaksa permanent address: cbsdfhkjhsdlkf.... fjdhkgjh languages known: fjdkjflsdjfkjdghkdf Location preference: dfjsd
如何使每个标签的描述从与永久地址标签相同的位置继续?我目前正在使用以下代码:
\resheading{\textbf{PERSONAL DETAILS} }\\[\lsep]
\begin{itemize}
\item Date of Birth: 14\textsuperscript{th}
\item \noindent Permanent Address: bcbv
\end{itemize}
答案1
让我详细说明一下我的评论:
\documentclass{book}
\usepackage{tabularx}
\usepackage{lipsum}
\begin{document}
\begin{tabularx}{\linewidth}{@{}l X}
Date of birth: & 14\textsuperscript{th} \\
Contact address: & Alsaksa \\
Permanent address: & cbsdfhkjhsdlkf ... fjdhkgjh \\
Languages known: & fjdkjflsdjfkjdghkdf \\
Location preference: & \lipsum*[11]
\end{tabularx}
\end{document}
答案2
这是一个具有description
环境的解决方案enumitem
:
\documentclass{book}
\usepackage{enumitem, calc}
\begin{document}
\begin{description}[font=\normalfont, labelwidth=\widthof{Location preference:}, leftmargin=\widthof{Location preference:}+\labelsep]
\item[Date of birth:] 14\textsuperscript{th}
\item[Contact address:] Alsaksa
\item[Permanent address:] cbsdfhkjhsdlkf.... fjdhkgjh cbsdfhkjhsdlkf.... fjdhkgjh fjdh kgjh cbsdfhkjhsdlkf....
\item[Languages known:] fjdkjflsdjfkjdghkdf
\item[Location preference:] dfjsd
\end{description}
\end{document}