I am aware of package lineno for row numbers, but my line numbers may change due to English language editing but my paragraphs will likelly not: is it possible to number (on the left margin) paragraphs instead of lines, so I can refer to some text as “Section 2.2, paragraph 3″ ?

I saw How can I number paragraphs (and sections) in the margin? but section numbers and paragraph numebers are put together there, while I am looking to something more like lineno, where on the margin I have just parapraphs numbers instead of lines.

  • Are you talking about the command \paragraph or automatic counting of paragraphs after empty lines? How do you want to reference in the second case? In the first case: Your link does provide everything you need. Just kick the redefinitions of the Sections out.
    – LaRiFaRi
    Dec 4, 2014 at 9:21
  • @Antonello Can you upload a picture what you want? A counter for all paragraphs, starting with 1 and ending at the end of the document with 867? Or should the counter be reseted to 1 after each section? What in case of subsections, subsubsections and so on?
    – Keks Dose
    Dec 4, 2014 at 13:26

1 Answer 1


You can use the parano package mentioned in that other posting, together with a couple of fixes and customisations as follows. Now updated to work with hyperref:

Sample output


\usepackage{parano}% http://www.sci.usq.edu.au/staff/braithwa/parano.sty

%Fixes to parano.sty

\newcommand{\paranospace}{\hfill}% Introduced for more flexible customisation

  \everypar{\setbox0\lastbox% Fixes first paragraph indent problem
    \hbox to \paranoboxwidth{\prepara\theparano\paranospace}\postpara}}

   \@parano}% To avoid code duplication


%Customizations for this example







Here is a paragraph to be labelled.\label{mypara}


The labelled paragraph was \ref{mypara}.


If you want the paragraphs just to be numbered within each section then add


to the preamble.

  • I am sorry my question wasn't clear. This is the effect I wanted to give to the document, with the added code to the preamble to reset the counter at each section and subsection. Thank you.
    – Antonello
    Dec 8, 2014 at 8:56
  • On my real document using "\usepackage{hyperref}" sends back the paragraph lines within the document margins. Why and how could I avoid it ?
    – Antonello
    Dec 8, 2014 at 10:19
  • 1
    I have updated the code - the first two statements in the \everypar need to be in the opposite order when using hyperref, without it doesn't make any difference. Dec 8, 2014 at 10:25
  • 2
    A copy of the package seems to be available at github.com/HugoAreias/DRAW--includes-DREQL-/blob/master/Manual/… Nov 28, 2018 at 12:13
  • 1
    @JonathanPrieto-Cubides I have just downloaded it again and tested on the above code and it works fine for me with parano.sty in the same directory as the tex file. Sep 13, 2021 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .