0

I have the following:

\documentclass[12pt]{report}
\newcounter{para}
\newcommand\mypara{\par\refstepcounter{para}\thepara\space}

\begin{document}

\mypara This is my paragraph.

\end{document}

This solution is from this question which incorporates the numbering at the beginning of the paragraph. However, I would like to have the numbering like so:Desired result Notice the numbering is on the right and outside of the paragraph itself.

Thank you in advance and have a wonderful day! (The image was blurred due to legal reasons.)

F. Pantigny
  • 40,250
Koroks
  • 21
  • 3
  • You could probably get marginnote or a similar package to work … ? – Ingmar Apr 24 '23 at 11:09
  • This worked, thank you! Sometimes though the paragraph number stays on one page even though the first line of the actual paragraph is on the next. This can be kind of solved by using \pagebreak. – Koroks Apr 24 '23 at 16:17

1 Answers1

3

Use \rlap at the beginning of the paragraph:

\newcount\paranum
\def\para{\par
   \global\advance\paranum by1
   \noindent \rlap{\kern\hsize\rlap{\quad\the\paranum}}\indent
}

\para This is my paragraph.

wipet
  • 74,238