Index ¦ Archives ¦ RSS

Bibliography improvements in LibreOffice Writer: refer to a specific page

Estimated read time: 3 minutes

The bibliography feature in Writer allows authors of e.g. scientific papers to track sources: first you can insert bibliography entry fields, then at the end you can generate a bibliography table automatically.

Writer recently gained two improvements in this area, and now there is one more: the ability to refer to a specific page of a (potentially long) source.

First, thanks TUBITAK ULAKBIM who made this work by Collabora possible.

Motivation

The same feature in normal HTML linking / citation is well-known: you can place anchors in your document and then links can refer to not only to your page, but also can set the fragment part of the URL to jump to a specific section directly. E.g. this link will jump to the "Motivation" section of the above referred previous post.

Wouldn’t it be nice if you could also jump to a specific page of a scientific PDF?

Results so far

You can add such references by choosing the Insert → Table of Contents and Index → Bibliography Entry menu item. Set Bibliography Source to Document Content and press the New button. The appearing dialog now has widgets to set a specific page number:

https://share.vmiklos.hu/blog/sw-bibliography-page/page.png
Figure 1. Refer to a specic page of a bibliography source, user interface

This is then stored in the URL by setting its fragment to page=..., and typically PDF readers understand this syntax, so when you click on the URL, the PDF will open exactly on the cited page.

This also works the other way around: URLs with such syntax are presented to the user with the dedicated widget to see, edit or delete the page number of the URL.

Finally, if you refer to different pages of the same source, the bibliography text generator detects this and lists the source in the bibliography only once.

How is this implemented?

If you would like to know a bit more about how this works, continue reading… :-)

As usual, the high-level problem was addressed by a series of incremental development steps:

Want to start using this?

Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF’s next release (7.2).

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.