I have defined a new command to change the footnote symbol to an asterisk to be used on a chapter's title:
% New command for chapter title footnote. This command changes the
% footnote symbol from a number to an asterisk
\newcommand{\chfootnote}[1]{
\let\oldthefootnote=\thefootnote
\setcounter{footnote}{0}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\footnote{#1}
\let\thefootnote=\oldthefootnote
}
But when I use it I end up having a space right before the asterisk (see image below). The space does not appear if I use a regular footnote. What am I doing wrong?
\chapter[test]{Title\chfootnote{This is a footnote.}}
EDIT: Thank you all for the quick response. Here is the new code that does not add whitespace before the symbol.
% New command for chapter title footnote. This command changes the
% footnote symbol from a number to an asterisk
\newcommand{\chfootnote}[1]{%
\let\oldthefootnote=\thefootnote
\setcounter{footnote}{0}%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\footnote{#1}
\let\thefootnote=\oldthefootnote
}

\newcommand{\chfootnote}[1]{%will remove the first one -- the newline after\newcommand{\chfootnote}{introduces one spurious white space, the next one appears after\setcounter{footnote}{0}– Feb 08 '19 at 14:36\let...should not give rise to a spurious space, should it? – Feb 08 '19 at 14:43\chapteryou need\protect\chfootnotein order to make this compilable – Feb 08 '19 at 14:44\footnote{#1}, but that's of course not visible in the MWE. – campa Feb 08 '19 at 14:51\footnote{#1}SPACE– David Carlisle Feb 08 '19 at 15:02