\<bookmark_value\>line numbers\</bookmark_value\>\<bookmark_value\>text; line numbers\</bookmark_value\>\<bookmark_value\>lines in text; numbering\</bookmark_value\>\<bookmark_value\>numbering; lines\</bookmark_value\>\<bookmark_value\>numbers; line numbering\</bookmark_value\>\<bookmark_value\>marginal numbers on text pages\</bookmark_value\>\<bookmark_value\>adding;line numbers\</bookmark_value\>

Adding Line Numbers

LibreOffice can automatically count and add line numbers to the lines in an entire document or to selected paragraphs in your document. Line numbers are included when you print your document, but not when you save the document as HTML. You can specify the line numbering interval, the starting line number, and whether to count blank lines or lines in frames. You can also add a separator between line numbers.

Note Icon

Line numbers are not available in HTML format.


To add line numbers to an entire document:

  1. Choose \<emph\>Tools - Line Numbering\</emph\>.

  2. Select \<emph\>Show numbering\</emph\>, and then select the options that you want.

  3. Click \<emph\>OK\</emph\>.

To add line numbers to specific paragraphs:

  1. Choose \<emph\>Tools - Line Numbering\</emph\>.

  2. Select \<emph\>Show numbering\</emph\>.

  3. Press to open the Styles window, and then click the Paragraph Styles icon.

  4. Right-click the "Default" paragraph style and choose \<emph\>Modify\</emph\>.

    All paragraph styles are based on the "Default" style.

  1. Click the Outline & Numbering tab.

  2. In the \<emph\>Line Numbering \</emph\>area, clear the \<emph\>Include this paragraph in line numbering \</emph\>check box.

  3. Click \<emph\>OK\</emph\>.

  4. Select the paragraph(s) where you want to add the line numbers.

  5. Choose Format - Paragraph, and then click the Outline & Numbering tab.

  6. Select \<emph\>Include this paragraph in line numbering\</emph\>.

  7. Click \<emph\>OK\</emph\>.

You can also create a paragraph style that includes line numbering, and apply it to the paragraphs that you want to add line numbers to.

To specify the starting line number:

  1. Click in a paragraph.

  2. Choose Format - Paragraph, and then click the Outline & Numbering tab.

  3. Select the \<emph\>Include this paragraph in line numbering \</emph\>check box.

  4. Select \<emph\>Restart at the paragraph \</emph\>check box.

  5. Enter a line number in the \<emph\>Start with \</emph\>box.

  6. Click \<emph\>OK\</emph\>.

Tools - Line Numbering

Numbering and Numbering Styles

Format - Paragraph - Numbering

Wiki page about numbering paragraphs by styles