Articles with the tag:
Close
Changelog
Close
Articles with the tag:
Close
Try in the cloud
Try in the cloud

Insert line numbers

The ONLYOFFICE Document Editor can count lines in your document automatically. This feature can be useful when you need to refer to a specific line of the document, e.g. in a legal agreement or a code script. Use the Line Numbers tool to apply line numbering to the document. Please note that the line numbering sequence is not applied to the text in the objects such as tables, text boxes, charts, headers/footers, etc. These objects are treated as one line.

Applying line numbering

  1. Open the Layout tab located at the top toolbar and click on the
    Line Numbers icon.
  2. Choose the required parameters for a quick set-up in the opened drop-down menu:
    • Continuous - each line of the document will be assigned a sequence number.
    • Restart Each Page - the line numbering sequence will restart on each page of the document.
    • Restart Each Section - the line numbering sequence will restart in each section of the document. Please refer to this guide to learn more about section breaks.
    • Suppress for Current Paragraph - the current paragraph will be skipped in the line numbering sequence. To exclude several paragraphs from the sequence, select them via the left-mouse button before applying this parameter.
  3. Specify the advanced parameters if needed. Click the Line Numbering Options item in the Line Numbers drop-down menu. Check the Add line numbering box to apply the line numbering to the document and to access the advanced parameters of the option:

    Line Numbering window

    • Start at sets the starting numeric value of the line numbering sequence. The parameter is set to 1 by default.
    • From text specifies the distance between the line numbers and the text. Enter the required value in cm. The parameter is set to Auto by default.
    • Count by specifies the sequence numbers that are displayed if not counted by 1, i.e. the numbers are counted in a bunch by 2s, 3s, 4s, etc. Enter the required numeric value. The parameter is set to 1 by default.
    • Restart Each Page - the line numbering sequence will restart on each page of the document.
    • Restart Each Sectionthe line numbering sequence will restart in each section of the document.
    • Continuous - each line of the document will be assigned a sequence number.
    • The Apply changes to parameter specifies the part of the document you want to assign sequence numbers to. Choose one of the available presets: Current section to apply line numbering to the selected section of the document; This point forward to apply line numbering to the text following the current cursor position; Whole document to apply line numbering to the whole document. The parameter is set to Whole document by default.
    • Click OK to apply the changes.

Removing line numbering

To remove the line numbering sequence,

  1. open the Layout tab located at the top toolbar and click on the
    Line Numbers icon,
  2. choose the None option in the opened drop-down menu or choose the Line Numbering Options item in the menu and deactivate the Add line numbering box in the opened Line Numbers window.
Return to previous page
Try now for free Try and make your decision No need to install anything
to see all the features in action