Reference the line number of a bookmark

I have a line-numbered document, and I would like to include in it references to line numbers of other parts of the document that will update as the document is edited. I’m perfectly fine using bookmarks. Is there a way to insert the line number of a bookmark that will auto-update? On the cross-references tab of fields, when I select bookmarks on the left, I see Page, Chapter, Reference, Above/Below, and “As Page Style”, whatever that is, but no line number.

No, I don’t see any way to use the line number as a reference.
IMHO this does not make sense either.
For example, if you use a reference further down in the document to line 3 and three new lines of text were entered starting at line 2, then IMHO the reference is senseless.

Describe in general terms what exactly you want to achieve. Maybe there is another solution.


This is for use in busy, long documents. The reference would be to help the reader find something specific that would not be easy to find with only a page number. It seems to me that giving the line number would be very helpful. But if I manually enter the line number and afterward it what I’m referencing moves to a different line number, it would be detrimental.

Well, I think there are plenty of other ways to work with references in Writer.
Have a look at LibreOffice Help.
Enter " Inserting Cross-References" in the search bar.

And here is the English documentation.

I’ve decided on a better approach to this. Instead of referencing line numbers, I’m going to use numbered paragraphs. This is very simple to use in cross-references.

This is an alternate solution to the one I suggest below but take special care on the way you number your paragraphs in case you need a unique number across your book. Numbered list may not be the right tool.

Another possibility is to associate a footnote to your reference word. The footnote can be the definition or a comment. Afterwards, you can reference the note number just like any other cross-reference.

Instead of citing the line number, you can create an “index” of your “specifics”. By “index” I mean some unique label attached to a “specific”.

For example:

In this text, word (ref. 1) "meaning" has an important role.
See page 3 ref.1 where "meaning" is defined.

You number your references with a number range you create in Insert>Field>More Fields, Variables tab. Give a name of your own like Ref so that it is independent from any other number ranges, notably those used to caption images, drawings, …

  • When you have several references inside a paragraph, you need to help Writer to disambiguate the designation (because the reference dictionary is paragraph-based and you need to point on a definite reference). In this case, select the reference and Insert>Cross-reference choosing Set Reference in Type. Give it a name.

  • When there is a single reference in a paragraph, don’t bother with this additional step.

Where you want to give a pointer to your reader, you Insert>Cross-reference, Cross-references tab. In Type list, you have an item with name Ref. The Selection box shows all paragraphs. Click on the relevant paragraph, then on the required Insert reference to information: Page, Chapter or Numbering.

  • If your reference lies in a multi-referenced paragraph, you must instead choose Insert Reference in Type and select the name you gave to this specific reference.

I suspect that is more helpful when the goal is for the reader to be able to click on the reference and land on the target.
In my case, I’m dealinig with a document that will be used in printed form. This is why I went with my workaround approach to put all paragraphs into a numbered list and cross-reference them.

Basically my approach is the same with a more targeted scope. I think turning all paragraphs into a huge numbered list will cause much more formatting trouble than a more selective approach, notably if your document already contains numbered lists.

Correctly configuring numbered lists across a document is one of the most difficult tasks in Writer. The numbered-list button in the toolbar is a very poor surrogate for this task and has severe limitations. The full solution goes through a combination of paragraph+list styles and is not elementary.

That may be the case. Nonetheless, the numbered list approach is working for my needs.