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}
   \noindent{Video \thechapter.\thesuppmat\xspace}

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!

1 Answer 1

\newcommand{\listsuppmatname}{Supplementary Materials}
   \noindent{Video \thechapter.\thesuppmat}%%%%%%%%

Your macro was adding 4 spaces each time, I commented them out with %%%% (you only need one %) also I removed \xspace if you do use this it has to be the very last token in the definition. At the place you had it it would always just have seen the following space in the definition and so never add a space.

  • 3
    Grrrrrrrrrrrrrrr. ;-)
    – egreg
    Jun 6, 2016 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .