[Tex/LaTex] Footnote with number in margin

footnotesmarginpar

How can I make a footnote's number appear in the margin, instead of embedded in the main text? I tried

\marginpar{ \footnote{ blah } }

and the footnote number appears, but not the footnote text.

Example:

\documentclass{article}
\begin{document}
Here is a normal footnote.\footnote{My footnote text.} 
Next we'll place a note in the margin.\marginpar{Margin note here.}
Can we put a footnote number in the margin, 
with the footnote text at the bottom of the page?\marginpar{\footnote{I hope so!}}
\end{document}

Result:

enter image description here

I also tried the marginnote package instead of \marginpar, but that didn't work either.

Best Answer

You can use the pair of commands \footnotemark and \footnotetext as follows:

\documentclass{article}
\newcommand{\marginfootnote}[1]{\marginpar{\footnotemark}\footnotetext{#1}}
\begin{document}
Can we put a footnote number in the margin, with the footnote text at 
the bottom of the page?\marginfootnote{I hope so!}
\end{document}