如何才能得到类似这样的结果:
Languages:
Language 1 Native speaker
Language 2 Fluent speaker
Skills:
Working knowledge Skill1, Skill2, Skill3
Basic knowledge Skill4, Skill5, Skill6
我尝试使用\indent
,但效果并不理想。Word 中是否有类似制表位的东西?
答案1
tabular
s 可以轻松做到这一点。可以通过固定值来调整缩进@{\hspace{2em}
,并且可以通过分别调整第一列和第二列的值p{4cm}
和来控制每列的宽度p{5cm}
。
\documentclass[12pt]{article}
\setlength{\parindent}{0in}
\begin{document}
\textbf{Languages:}\par\smallskip
\begin{tabular}{@{\hspace{2em}}p{4cm}p{5cm}}
Language 1 & Native speaker \\
Language 2 & Fluent speaker
\end{tabular}
\bigskip
\textbf{Skills:}\par\smallskip
\begin{tabular}{@{\hspace{2em}}p{4cm}p{5cm}}
Working knowledge & Skill1, Skill2, Skill3 \\
Basic knowledge & Skill4, Skill5, Skill6
\end{tabular}
\end{document}
答案2
您可以使用列表和包中的description
样式。nextline
enumitem
\documentclass{article}
\usepackage{enumitem,array}
\begin{document}
\begin{description}[style=nextline]
\item[Language]
\begin{tabular}{@{}>{\raggedright}p{0.3\linewidth}
>{\raggedright\arraybackslash}p{\dimexpr0.8\linewidth-2\tabcolsep\relax}}
Language 1 & Fluent \\
Language 2 & Read
\end{tabular}
\item[Skills]
\begin{tabular}{@{}>{\raggedright}p{0.3\linewidth}
>{\raggedright\arraybackslash}p{\dimexpr0.8\linewidth-2\tabcolsep\relax}}
Working knowledge & Skill 1, skill 2 skill 3 \\
Basic knowledge & Skill 1, skill 2 skill 3
\end{tabular}
\end{description}
\end{document}