I created a custom environment to have the first column of a table be a counter with labels that can be referred to throughout the text. I can't figure out how to suppress the counter label (1) in the header column. Here's what I tried:
\documentclass{article}
\title{MWE of Issue}
\author{me}
\usepackage{tabularx}
% this is the custom counter
\newcounter{slots}
\newenvironment{planar}
{
\begin{flushleft}
\begin{tabular}{>{(\refstepcounter{slots}\theslots)}rlll}
\setcounter{slots}{0} %resetting counter after header
Pos. & Type & Elements & Forms \
}
{
\end{tabular}
\end{flushleft}
}
\begin{document}
\maketitle
Some text here.
% here's a table using the custom counter
\begin{planar}
\label{a} & itemA & aboutA & moreA \
\label{b} & itemB & aboutB & moreB \
\label{c} & itemC & aboutC & moreC \
\label{d} & itemD & aboutD & moreD \
\end{planar}
% here are some references to the labels from the custom counter
Sometimes I want to reference something about itemC with a ref \ref{c}, but other times, I need to talk about itemA with a ref \ref{a} more.
\end{document}
And here is the output showing the additional label in the header row and the correct references from the labels:

How can I suppress this label in the header column, i.e. prevent it from showing up?

\def\rownumber{}in the preamble and\begin{tabular}{>{\rownumber}rlll} \gdef\rownumber{\refstepcounter{slots}(\theslots)}in the table) seems to work ok for your document as well. – Marijn Apr 16 '21 at 21:10\preto\tabular{\setcounter{slots}{0}}in the preamble. – SandraA. Apr 17 '21 at 10:50