提问于:
浏览数:
1858
## 编译环境
操作系统
* [x] Windows 7/8/10
* [ ] macOS
* [ ] Linux
`若需勾选,请把[ ]改成[x]`
Tex发行版
* [x] TexLive `年份`
* [ ] MikTeX `版本号`
* [ ] CTeX
`若需勾选,请把[ ]改成[x]`
这是我的代码
```
%定义进度条
\definecolor{color1}{rgb}{0.22,0.45,0.70} % light blue
\definecolor{color2}{rgb}{0.45,0.45,0.45} % dark grey
\newcommand{\progressbar}[2][2cm]{%
\textcolor{color1}{\rule{#1 * \real{#2} / 100}{1.5ex}}%
\textcolor{color2!15}{\rule{#1 - #1 * \real{#2} / 100}{1.5ex}}}
Office 三件套
\progressbar{70}
```
我的结果:![](https://wenda.latexstudio.net/data/attach/200715/tdVSCQGu.png)
我期望的结果:![](https://wenda.latexstudio.net/data/attach/200715/lSqzJEg5.png)