LaTeX 上技能点的表示

LaTeX 上技能点的表示

我想在我的简历中插入一个部分,以图形方式展示我的技能(我使用此模板 -> it.overleaf.com/latex/templates/forty-seconds-cv/pztcktmyngsk)。由于空间有限,我想删除技能描述前面的图像(在本例中为蓝色箭头)。我该怎么做?

% uniform icon style for all skill icons, e.g. flags or fontawesome icons
    \newcommand{\cvicon}[1]{\makebox[1em]{\color{iconcolor} #1}}


% \pointskill[<indent>]{<description>}{<points>}[<maxpoints>] creates
% | [indent] description  \hfill  ● ● ● ○ ○ |
% -- inspired by arravc.cls by LianTze Lim: https://github.com/liantze/AltaCV
\NewDocumentCommand{\pointskill}{ O{0em} m m m O{5} }{%
    \hspace{#1} \cvicon{#2} ~ #3 \hfill%
    \foreach \x in {1,...,#5}{%
        \space%
        {\ifnumgreater{\x}{#4}{\color{skillbg}}{\color{iconcolor}}% from etoolbox
        % don't use totalheight; see https://tex.stackexchange.com/a/41014
        \raisebox{0.5\height-0.4ex}{\scriptsize\faCircle}%
        }
    }\par%
}

如果我调用 \pointskill{►}{Python}{3} ,它看起来会是这样的图形示例: 在此处输入图片描述

答案1

您可以更新的定义\pointskill以忽略作为第二个参数提供的任何内容(注意第一个参数是可选的):

\NewDocumentCommand{\pointskill}{ O{0em} m m m O{5} }{%
    \hspace{#1}#3 \hfill%
    \foreach \x in {1,...,#5}{%
        \space%
        {\ifnumgreater{\x}{#4}{\color{skillbg}}{\color{iconcolor}}% from etoolbox
        % don't use totalheight; see https://tex.stackexchange.com/a/41014
        \raisebox{0.5\height-0.4ex}{\scriptsize\faCircle}%
        }
    }\par%
}

你会发现上面的定义中没有用到#2,所以你仍然可以使用

\pointskill{►}{Python}{3}

如果你想要完全删除传递前面图标的选项,那么使用

\NewDocumentCommand{\pointskill}{ O{0em} m m O{5} }{%
    \hspace{#1}#2 \hfill%
    \foreach \x in {1,...,#4}{%
        \space%
        {\ifnumgreater{\x}{#3}{\color{skillbg}}{\color{iconcolor}}% from etoolbox
        % don't use totalheight; see https://tex.stackexchange.com/a/41014
        \raisebox{0.5\height-0.4ex}{\scriptsize\faCircle}%
        }
    }\par%
}

相关内容