![在简历中添加技能条形图](https://linux22.com/image/341717/%E5%9C%A8%E7%AE%80%E5%8E%86%E4%B8%AD%E6%B7%BB%E5%8A%A0%E6%8A%80%E8%83%BD%E6%9D%A1%E5%BD%A2%E5%9B%BE.png)
答案1
简单的基本代码
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node [anchor=west] at (.1,.8) {Java};
\draw [fill=gray] (0,0) rectangle (5,.5);
\draw [fill={rgb:red,1;green,2;blue,3}] (0,0) rectangle (.1,.5);
\end{tikzpicture}
\vspace{.05cm}
\begin{tikzpicture}
\node [anchor=west] at (.1,.8) {polite};
\draw [fill=gray] (0,0) rectangle (5,.5);
\draw [fill={rgb:red,1;green,2;blue,3}] (0,0) rectangle (3.5,.5);
\end{tikzpicture}
\vspace{.05cm}
\begin{tikzpicture}
\node [anchor=west] at (.1,.8) {outgoing};
\draw [fill=gray] (0,0) rectangle (5,.5);
\draw [fill={rgb:red,1;green,2;blue,3}] (0,0) rectangle (4,.5);
\end{tikzpicture}
\vspace{.05cm}
\begin{tikzpicture}
\node [anchor=west] at (.1,.8) {good manners};
\draw [fill=gray] (0,0) rectangle (5,.5);
\draw [fill={rgb:red,1;green,2;blue,3}] (0,0) rectangle (3.5,.5);
\end{tikzpicture}
\vspace{.05cm}
\begin{tikzpicture}
\node [anchor=west] at (.1,.8) {pursuer of rabbits};
\draw [fill=gray] (0,0) rectangle (5,.5);
\draw [fill={rgb:red,1;green,2;blue,3}] (0,0) rectangle (4.8,.5);
\end{tikzpicture}
\end{document}
答案2
我知道已经晚了,但这是我从中提取的代码例子截图位置:
\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{white}{RGB}{255,255,255}
\definecolor{gray}{HTML}{4D4D4D}
\definecolor{maingray}{HTML}{B9B9B9}
\newcommand\skills[1]{
\begin{tikzpicture}
\foreach [count=\i] \x/\y in {#1}{
\draw[fill=maingray,maingray] (0,\i) rectangle (6,\i+0.4);
\draw[fill=white,gray](0,\i) rectangle (\y,\i+0.4);
\node[above right] at (0,\i+0.4) {\x};
}
\end{tikzpicture}
}
\begin{document}
\skills{{b/2}}
\skills{{a/1}}
\end{document}