Is there a way to check whether I'm currently in a footnote?
(This question has already been asked on tex.stackexchange.com, but the accepted answer only provides a solution to the user's specific issue but does not answer the question I am now posing.)
I'd like to be able to define a command, which I'll call \mycommand, which behaves one way in footnotes and another way when it appears outside of a footnote. Both cases may occur in the same document. It seems like I could define \mycommand using an \ifthenelse statement, but only if I know a command which will answer the question "am I currently in a footnote."
In other words, what should write for X in the following barebones example?
\newcommand{\mycommand}[1]{\ifthenelse{\boolean{X}{...}{...}}
...
This is a paragraph \mycommand{...}.\footnote{This is a footnote.
Things should look different here \mycommand{...}.}
Or is there a better approach to take?
