+\usepackage{intcalc}
+\usepackage{color}
+\definecolor{gray}{RGB}{200,200,200}
+\newcounter{parnum}
+\newlength{\parnumwidth}
+\setlength{\parnumwidth}{3em}
+\newcommand{\N}{%
+ \leavevmode\refstepcounter{parnum}\reversemarginpar%
+ \marginnote{\textcolor{gray}{\small{\theparnum}}}%
+ \reversemarginpar}
+\newcommand{\Nw}{%
+ \leavevmode\refstepcounter{parnum}\reversemarginpar%
+ \ifnum\intcalcMod{\value{parnum}}{5}=0%
+ \marginnote{\textcolor{gray}{\small{\theparnum}}}%
+ \fi\reversemarginpar}
+