I have had to add a 'List of Supplementary Materials' to my current document using the tocloft package. I currently have the following code in my preamble:
\usepackage[titles]{tocloft} % Create Table of Supplementary Materials
\newcommand{\listsuppmatname}{Supplementary Materials}
\newlistof{suppmat}{smat}{\listsuppmatname}
\newcommand{\suppmat}[1]{%
\refstepcounter{suppmat}
\noindent{Video \thechapter.\thesuppmat\xspace}
\addcontentsline{smat}{suppmat}
{\protect\numberline{\thechapter.\thesuppmat}#1}
}
In the text I have:
\suppmat{blah blah}\label{vid:blahblah}
This works as intended, but I have a trailing space after the reference. I have tried some of the proposed solutions to the macro trailing space (such as xspace package or \suppmat/ etc) but none appear to remove the space. I have a feeling it's a minor conflict with the tocloft package.
Any ideas? Thanks!