我正在尝试执行moderncv 中的分页符,按照@tjanez的回答(他于2013年10月16日12:24回答):
% customize the enumerate environments (i.e. enumerate, itemize, ...)
\usepackage{enumitem}
\setlist{nolistsep}
% A custom version of the \cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
\newcommand*{\cventrylong}[7][.25em]{%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
\raggedleft\hintstyle{#2} &{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
}%
\end{tabular}%
{\small#7}%
\par\addvspace{#1}}
% A custom version of the itemize environment that sets the appropriate left
% margin for use inside \cventylong
\newlist{cvitemize}{itemize}{1}
\setlist[cvitemize]{label=\labelitemi,%
leftmargin=\hintscolumnwidth+\separatorcolumnwidth+\labelwidth+\labelsep}
我有两个问题:
1 - 使用破折号“-”而不是项目符号来列出嵌套的项目\itemize
通过使用@tjanez 解决方案,\cvitemize
和嵌套/内部都\itemize
显示项目符号...相反,我希望使用项目符号\cvitemize
和用于嵌套/内部的破折号“-” \itemize
。
我怎样才能用破折号“-”而不是项目符号来列出嵌套的\begin{itemize} ... \end{itemize}
?
请参见下面的示例:
\cventrylong{01/01/2022 -- Present}{Accountant}
{CompanyName}
{NewYork}
{}
{
\begin{cvitemize}
\item Topic: counting money all-day
\item Method: using a calculator
\item Role Description:
\begin{itemize}
\item I digit numbers on the calculator
\item I write down sums and differences
\end{itemize}
\item
\end{cvitemize}
}
2 - 如何在两者之间放置垂直空间\cventrylong
?
答案1
我找到了一个可能的解决方案 - 显然,任何更好的实现或评论都非常受欢迎!
\usepackage{enumitem}
\setlist{nolistsep}
% (1) A custom version of the \cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
\newcommand*{\cventrylong}[7][.25em]{%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
\raggedleft\hintstyle{#2} &{%
{\bfseries#3}
\ifthenelse{\equal{#4}{}}{}\textcolor{color1}{#4}
% \ifthenelse{\equal{#4}{}}{}{{\slshape#4}}
\ifthenelse{\equal{#5}{}}{}{\newline #5}
\ifthenelse{\equal{#6}{}}{}{#6}%
}%
\end{tabular}%
{\small#7}%
% (2) set vertical space among "\cventrylong" - I used "1em" as space
\par\addvspace{1em}}
% (3) A custom version of the itemize environment that sets the appropriate left margin for use inside \cventylong
\newlist{cvitemize}{itemize}{1}
\setlist[cvitemize]{label=\labelitemi,%
leftmargin=\hintscolumnwidth+\separatorcolumnwidth+\labelwidth+\labelsep}
% (4) Itemize with a dash "-" (instead of a bullet) the nested "\itemize", for use inside "\cventylong"
\newlist{cvitemize2}{itemize}{1}
\setlist[cvitemize2]{label=\labelitemii}
使用两个的示例\cventrylong
:
\cventrylong{01/01/2021 -- 31/12/2021}{Carpenter}
{\newline{\href{https://www.company_website_1.com/}{\textcolor{color1}{Company Name 1}}}
}
{Los Angeles, USA}
{}
{
\begin{cvitemize}
\item Topic: ....
\item Role Description:
\begin{cvitemize2}
\item \textbf{Measure, cut, and shape wood} \newline
I performed ...
\item \textbf{Measure, cut, and shape other materials} \newline
I did ....
\end{cvitemize2}
\item Keywords: construct, ...
\end{cvitemize}
}
\cventrylong{01/01/2022 -- Present}{Accountant}
{\newline{\href{https://www.company_website_2.com/}{\textcolor{color1}{Company Name 2}}}
}
{New York, USA}
{}
{
%\renewcommand{\labelitemi}{$\bullet$}
\begin{cvitemize}
\item Topic: ....
\item Role Description:
\begin{cvitemize2}
\item \textbf{Count money} \newline
I performed ...
\item \textbf{Supervision of other employees} \newline
I supervised ....
\end{cvitemize2}
\item Keywords: money, ...
\end{cvitemize}
}
这是最终结果: