awesome-cv
通过使用以下内容修改类,我cvskills
使用tabularray
包重新定义环境
\NewEnviron{cvskills}{%
\begin{tblr}[expand=\BODY]{
colspec={Q X},
}
\BODY
\end{tblr}
}
% Define a line of cv information(skill)
% Usage: \cvskill{<type>}{<skillset>}
\newcommand*{\cvskill}[2]{%
\skilltypestyle{#1} & \skillsetstyle{#2} \\
}
然而,当使用它时,它应该导致Misplaced alignment tab character &. \cvskill #1#2->\skilltypestyle {#1} &
\begin{cvskills}
\cvskill{Programming}{Skill1, Skill2, Skill3}
\end{cvskills}
cvskills
当像在普通表中一样插入值时,环境会起作用
\begin{cvskills}
Programming & Skill1, Skill2, Skill3 \\
\end{cvskills}
答案1
您想使用\NewDocumentEnvironment
并扩展\cvskills
。
在下面的例子中,我使用未修改的awesome-cv
and do \RenewDocumentEnvironment
and \renewcommand
。
\documentclass[]{awesome-cv}
\usepackage{tabularray}
\RenewDocumentEnvironment{cvskills}{+b}{%
\begin{tblr}[expand=\cvskill]{
colspec={Q X},
}
#1
\end{tblr}
}{}
% Define a line of cv information(skill)
% Usage: \cvskill{<type>}{<skillset>}
\renewcommand*{\cvskill}[2]{%
\skilltypestyle{#1} & \skillsetstyle{#2} \\
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Personal Data
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Essentials
\name{Some}{Name}
\address{An Address, 3245}
\mobile{(+57) 45-45654-434}
%%% Social
\email{[email protected]}
\homepage{www.SomePage.com}
\github{Someone2}
\linkedin{Someone2}
%%% Optionals
\position{My Position}
\quote{``I am me.''}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Content
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Make a footer for CV with three arguments(<left>, <center>, <right>)
\makecvfooter
{\today}
{My Resume}
{\thepage}
\begin{document}
%%% Make a header for CV with personal data
\makecvheader
\begin{cvskills}
\cvskill{Programming}{Skill1, Skill2, Skill3}
\end{cvskills}
\end{document}