我正在使用moderncv
已经定义\cvskill
命令的包。
我正在尝试使用以下命令覆盖/重新定义该命令\renewcommand
:
% ...
% param 1: name of the skill / tech / etc.
% param 2: level (for example in years)
% param 3: percent, values range from 0 to 1
% (maincol, lightcol are defined in the code before)
\renewcommand{\cvskill}[3]{
\begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r}%
\textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2} \\%
\end{tabular*}%
\hspace{4pt}%
\begin{tikzpicture}[scale=1,rounded corners=2pt,very thin]%
\fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15);%
\fill [maincol] (0,0) rectangle (#3\mpwidth, 0.15);%
\end{tikzpicture}%
}
\begin{document}
% ...
\cvskill{Internet of Things}{5+ yrs}{1} \\ [-2pt]
我收到此错误信息:
! Argument of \cvskill has an extra }.<inserted text>\par \begin{document}
! Paragraph ended before \cvskill was complete. <to be read again>\par \begin{document}
\newcommand
仅当我使用另一个名称来定义它时,它才会编译而不会出现错误,\cvskillbis
例如。
我如何\cvskill
以适当的方式覆盖命令?