# how can i make the marginpar note have a number like footnote command does

how can i make the marginpar note have a number like footnote command does? just like this picture show,

-
It does not answer the question, but I thought worth mentioning: check the side option of the footmisc package (but it turns all footnotes into marginpars) –  henrique Oct 12 '13 at 17:10
There's the sidenotes package and the snotez package. IIRC the memoir class also provides sidenotes. –  cgnieder Oct 12 '13 at 17:27

\documentclass{article}
\usepackage{blindtext}
\newcounter{mparcnt}
\renewcommand\themparcnt{\textbf{\arabic{mparcnt}: }}
\newcommand\mpar[1]{\refstepcounter{mparcnt}\marginpar{\themparcnt#1}}

\begin{document}
\mpar{test}\blindtext
\mpar{test\label{p:test}}\blindtext
\mpar{test}\blindtext
\mpar{test}\blindtext

See margin~\ref{p:test} for a labeltest
\end{document}


-
thanks，it's simple and beautiful, Does not use any package or class.that is the best. –  wanze Oct 13 '13 at 4:16