Allow variables to be used in a \footnote{} function

Thanks to Andreas Löffler.