如何使用 awesome-cv 读取 \cventry 项的新命令语法?

如何使用 awesome-cv 读取 \cventry 项的新命令语法?

我正在尝试使用 awesome-cv 和 overleaf 编写我的简历。我的简历中有一个职位,我想直接转到描述,省去 (i) 职位和 (ii) 句号。因此,我需要重新定义 \cventry。我的主要问题是,我不知道如何阅读它的命令/语法。因此,有人能将以下命令(从 \ifempty 开始)“翻译”成正确的英语吗?那将非常有帮助,非常感谢。谢谢!

\newcommand*{\cventry}[5]{%
  \vspace{-2.0mm}
  \setlength\tabcolsep{0pt}
  \setlength{\extrarowheight}{0pt}
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
    \ifempty{#2#3}
      {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
      {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
      \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
    \if\relax\detokenize{#5}\relax\else
        \multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
    \fi
  \end{tabular*}
}

答案1

% defining a command of 5 arguments not allowed to have pararaph ends.
\newcommand*{\cventry}[5]{%
% probably missing \par here
  \vspace{-2.0mm}% negative space, missing % here
  \setlength\tabcolsep{0pt}% set tabular spacing to 0, missing % here
  \setlength{\extrarowheight}{0pt}% set extra vertical tabular spacing to 0, missing % here
  % two column tabular spanning full text width (L and R defined elsewhere)
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
%
% if 2nd and 3rd argument are empty (\ifempty defined elsewhere)
    \ifempty{#2#3}
% if no #2 or #3 then set #1 and #4 using the commands
% \entrypositionstyle and \entrydatestyle  defined elsewhere
      {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
% else if #2 or #3 are non empty set #2 and #3 using
% \entrytitlestyle and \entrylocationstyle (defined elsewhere) on one row of the table
% then set #1 and #4 on a second row.
      {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
      \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
%
% Now test if #5 is empty (using tex primitives rather than \ifempty macro)
    \if\relax\detokenize{#5}\relax\else
% if #5 is non empty make a spanning entry containing #5 formatted with \descriptionstyle 
        \multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
    \fi
% end the tabular
  \end{tabular*}% % missing here
}

相关内容