Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

how can i make the marginpar note have a number like footnote command does? just like this picture show, this picture is going to show the marginpar note have the auto numbered label like footnote command does

share|improve this question
    
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

1 Answer 1

\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} 

enter image description here

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.