I am tryin to write a customized list where the label separation (separation between text and label) should change depending on the number of digits in the label. For example, if the label is less than 10, the label separation should be 0.36in, for labels between 10 and 99, the label separation should be 0.27in.
In the first step, I am trying to write a customized list which should display foo if the list counter is equal to 1, else it should display bar. However, it is working for last \item entry no matter how many entries there are. Following is MWE.
\documentclass{article}
\usepackage{enumitem}
\usepackage{etoolbox}
\setlist[enumerate]{wide, align=left, topsep=0mm, parsep=0.20in, partopsep=0mm, itemsep=0in, labelindent=0pt, labelsep=0.36in}
\newenvironment{FirstList}[1][]{
\begin{enumerate}[#1] } {
\ifnumcomp{\theenumi}{=}{1}{
FOO } {
BAR}
\end{enumerate} }
\begin{document}
\begin{FirstList}
\item
\item
\item
\item
\end{FirstList}
\end{document}