1

Here is my MWE. As you can see, the problem only happens when we use the macro \suppOrApp.

\documentclass{article}

\usepackage[english]{babel}
\usepackage{blindtext}

\usepackage{caption}
\usepackage{float}
\usepackage{ifthen}

\title{A caption test}
\author{Some one}
\date{\today}


\begin{document}

\newcommand{\suppOrApp}{
  \ifthenelse{\boolean{thesisStyle}}
    {Appendix}
    {Supplementary}
}
\newboolean{thesisStyle}
\setboolean{thesisStyle}{false} % Might want to reconsider this here.


% This has additional space:
\renewcommand{\tablename}{\textbf{\suppOrApp Table}}
% But this would work fine.
%\renewcommand{\tablename}{\textbf{Supporting Table}}


\begin{table}
\begin{tabular}{cc}
1 & 2 \\
3 & 4 \\
\end{tabular}
\caption{\blindtext}
\label{mytable}
\end{table}

\blindtext

Please refer to Supporting Table~\ref{mytable}.

\end{document}
bbarker
  • 1,177

0 Answers0