1

I would like to create a list with a bullet progress bars formatted like this:

enter image description here

Any help would be much appreciated :)

2

2 Answers 2

5

EDIT: Improves color-choosing logic, borrows better table layout from the answer by Bernard

Does this work for you?

\documentclass[letterpaper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{geometry}
\geometry{margin=0.8in}

\usepackage{array}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{math}

\newcommand{\totCircs}{8}
\newcommand{\circSize}{.125}

\newcommand{\createBullets}[1]{%
  \begin{tikzpicture}
  \emtStart = #1+1;}
  \foreach \filled in {1,...,\totCircs}
  \tikzmath{\xCoord = 4*\filled * \circSize;}
  \ifnum\filled>#1
    \colorlet{fillColor}{DarkGrey}
  \else
    \colorlet{fillColor}{black}
  \fi
  \draw [color=fillColor, fill=fillColor] (\xCoord,0) circle (\circSize);
  \end{tikzpicture}%
}
\begin{document}
\lipsum[1]
\vspace{\baselineskip}

\begin{tabular}{>{\sffamily\color{DarkGrey}}ll}
  Adobe Photoshop & \createBullets{8}\\
  Adobe Illustrator & \createBullets{8}\\
  Adobe Indesign & \createBullets{6}\\
  Adobe Dreamweaver & \createBullets{8}\\
  Adobe Flash & \createBullets{7}\\
  HTML \& CSS & \createBullets{8}\\
  Javascript \& Jquery & \createBullets{3}
\end{tabular}

\end{document}

To modify the output, change the number of total circles at the top (\totCircs) or the circle size.

Outputs:

enter image description here

2
  • Fantastic, thanks very much! What should I modify if I want the grey circle to be blank instead (with just a black border)? Commented Dec 11, 2018 at 12:58
  • The color is determined by the line \ifnum\filled>#1. Under this, change DarkGrey to white (if my current iteration number is > the input, start making white circles). For a black border, change the line [color=fillColor, fill=fillColor] to [color=black, fill=fillColor].
    – ntjess
    Commented Dec 11, 2018 at 18:30
4

A simple solution, just with multido and etoolbox:

\documentclass{article}
\usepackage[svgnames]{xcolor}
\usepackage{array, etoolbox}
\usepackage{multido}
\newcommand{\blackbullets}[1]{\multido{\i=1+1}{8}{\ifnumgreater{\i}{#1}{\color{Gainsboro}}{}\textbullet\kern 0.1em}}

    \begin{document}

\begin{tabular}{>{\sffamily\color{DarkGrey}}ll}
Adobe Photoshop & \blackbullets{8}\\
Adobe Illustrator & \blackbullets{8}\\
Adobe Indesign & \blackbullets{6}\\
Adobe Dreamweaver & \blackbullets{8}\\
Adobe Flash & \blackbullets{7}\\
HTML \& CSS & \blackbullets{8}\\
Javascript \& Jquery & \blackbullets{3}
\end{tabular}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .