我想在我的简历中使用 创建moderncv
一个包含两列的表格。它应该看起来像:
-------- Experience
* Item 1 x
x
x
并且它应该位于 文本下方\section
。
我尝试了以下代码,但由于某种我无法理解的原因,我收到了错误
\documentclass{moderncv}
\moderncvtheme{casual}
\usepackage[scale=0.8]{geometry}
\recomputelengths
\firstname{first}
\familyname{last}
\begin{document}
\section{Experience}
%\cvline{}{\begin{tabular}{ll}
\cvline{}{\begin{tabular}{p{5cm}p{5cm}}
\begin{itemize}
\item Item 1
\end{itemize} & x \\
& x \\
& x
\end{tabular}}
\end{document}
编辑\cvline{}{\begin{tabular}{ll}
更改为 后,\cvline{}{\begin{tabular}{p{5cm}p{5cm}}
错误消失,但Item 1
与 不在同一行x
。
答案1
itemize
以下三种解决方案以不同的方式实现了与您想要的输出类似的输出。我不知道如何消除 之前的空格tabular
,但这似乎是一个普遍问题,而不是 特有的问题moderncv
。
\documentclass{moderncv}
\moderncvtheme{casual}
\usepackage{geometry}
\firstname{first} \familyname{last}
\usepackage{lipsum} % Just for dummy text
\begin{document}
\section{Experience}
% This seems to be the best solution to me
\cvlistitem{\parbox[t]{5cm}{Item 1}
\parbox[t]{5cm}{
\lipsum[66]
x \\
x \\
}}
% This one works if you really want to keep the table setup.
% \labelitemi is the macro LaTeX uses to insert the itemize bullet.
% The text block is a little further left because the bullet + following
% space are part of the 5cm.
\cvline{}{
\begin{tabular}{p{5cm}p{5cm}}
\labelitemi~Item 1 & \lipsum*[66] \\
& x \\
& x \\
\end{tabular}}
% This version is a little more idiosyncratic to moderncv's layout with
% a "label" in the left column. Note, however, how the bullets don't line up.
% This doesn't happen with the other solutions.
% If you don't want the paragraphs to be as wide, you can replace \linewidth
% with something like 5cm, of course.
\cvline{\labelitemi~Foo}{\parbox[t]{\linewidth}{
x \\
x }}
\cvline{\labelitemi~Item 1}{\parbox[t]{\linewidth}{
\lipsum[66]
x \\
x }}
\end{document}