Vertical tennis ball into fancy new enumerate
Not really difficult with xparse
. ;-)
\documentclass[12pt]{article}
\usepackage{fontawesome5,xcolor,xparse,graphicx}
\usepackage{enumitem}
\usepackage{lipsum}
\setlist{nolistsep}
\ExplSyntaxOn
\NewDocumentCommand{\tennis}{m}
{
\sebastiano_tennis:c { c@#1 }
}
\cs_new_protected:Nn \sebastiano_tennis:N
{
\smash
{
\begin{tabular}[t]{@{}c@{}}
[\int_to_arabic:n { #1 }] \\
\rotatebox[origin=c]{90}{ \__sebastiano_tennis:n { #1 } }
\end{tabular}
}
}
\cs_generate_variant:Nn \sebastiano_tennis:N { c }
\cs_new_protected:Nn \__sebastiano_tennis:n
{
\textcolor
{
\clist_item:Nn \c_sebastiano_tennis_clist
{
\int_mod:nn { #1 } { \clist_count:N \c_sebastiano_tennis_clist } + 1
}
}
{
\prg_replicate:nn { #1 } { \faBaseballBall }
}
}
% make \tennis available to enumitem
\AddEnumerateCounter{\tennis}{\sebastiano_tennis:c}{[1]}
% define here your colors: the first in the list is actually the last used
\clist_const:Nn \c_sebastiano_tennis_clist {magenta,green,orange,yellow,red}
\ExplSyntaxOff
\begin{document}
\begin{enumerate}[label=\tennis*,ref=\arabic*]
\item \lipsum[1][1-7]
\item \lipsum[1][1-7]
\item \lipsum[1][1-7]
\item \lipsum[1][1-7]
\item \lipsum[1][1-7]
\end{enumerate}
\end{document}
Using \rotatebox
\documentclass[12pt]{article}
\usepackage{
fontawesome5,
xcolor,lipsum,graphicx}
\usepackage{enumitem}
\setlist{nolistsep}
\newcount\cnt
\cnt=1
\newbox\tennis
\setbox\tennis=\hbox{\faBaseballBall}
\def\numberlabel{%
\ifnum\the\cnt>4\relax
\else {\bfseries\small\sffamily[\the\cnt]}%
\fi
}
\def\Iitem{%
\item[%
\smash{\raisebox{-.5em}{%
\vbox{\baselineskip=10pt
\hbox to \the\wd\tennis{\hss\numberlabel\hss}
\hbox{%
\ifnum\the\cnt=1{\color{green}{\faBaseballBall}}
\else
\ifnum\the\cnt=2{\color{orange}\rotatebox{90}{\faBaseballBall \,\faBaseballBall}}
\else
\ifnum\the\cnt=3{\color{yellow}\rotatebox{90}{\faBaseballBall\,\faBaseballBall\,\faBaseballBall}}
\else
\ifnum\the\cnt=4{\color{red}\rotatebox{90}{\faBaseballBall\,\faBaseballBall\,\faBaseballBall\,\faBaseballBall}}
\else{\sffamily\color{magenta}\rotatebox{90}{\faBaseballBall\,\faBaseballBall\,\faBaseballBall\,\faBaseballBall\,\faBaseballBall}}
\fi
\fi
\fi
\fi}%
}}}%
]%
\advance\cnt by 1
}
\begin{document}
\begin{enumerate}
\Iitem \lipsum[1]
\Iitem \lipsum[1]
\Iitem \lipsum[1]
\Iitem \lipsum[1]
\Iitem \lipsum[1]
\end{enumerate}
\end{document}