I would like to create a list with a bullet progress bars formatted like this:
Any help would be much appreciated :)
I would like to create a list with a bullet progress bars formatted like this:
Any help would be much appreciated :)
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:
For a black border, change the line [color=fillColor, fill=fillColor] to [color=black, fill=fillColor].
– ntjess Dec 11 '18 at 18:30A 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}