Add hyperlinks to definitions automatically

asked 2018-04-12 11:23:13 +0200

jonathan.scholbach gravatar image

I am looking for a certain functionality. I don't know, if this is currently achievable, or if it would need the creation of an add-on. I will describe my use scenario and my ideal solution first. I would be glad to get your ideas how to reach this solution with LibreOffice. If it requires the creation of an add-on, I would be glad of some guidance. I am a Python programmer, but have never written a LibreOffice add-on.

  1. I want to write documentation. I will have several text documents containing definitions of termini technici being used in the documentation documents. A definition is consisting of the terminus technicus and a definition body which is defining the term. A terminus technicus can consist of one or multiple words. I am fine by assigning a certain special style to the termini and one to the definition body.

  2. I will put all documents of the documentation in one project directory (with subdirectories).

  3. In any document in the project-directory I want to have the following functionality:

    A) When I type a sequence of words, which are a terminus technicus, LibreOffice should recognize that I wrote a terminus technicus.

    B) Whenever LibreOffice is recognizing the use of a terminus technicus, it should propose to mark the sequence of words as the terminus technicus. If I accept the proposal, the sequence should be marked as terminus technicus. "mark as terminus technicus" means the following:

    I) The word sequence should be assigned a certain formatting style.

    II) The word sequence should be followed by a footnote.

    III) The text of that footnote should hold a hyperlink to the definition of the terminus with the following properties:

    i) The address of the hyperlink should be the definition of the terminus technicus.

    ii) The text of the hyperlink should be the path to the respective definition document (inside the project directory) and the location (page number) of the definition in that document.

    iii) On mouse-over, that hyperlink should show the definition body of the definition.

  4. All those properties should be dynamic, i.e. A) Whenever the location of a terminus technicus definition is changing, the hyperlink texts should be updated accordingly

    B) Whenever the definition body of a terminus technicus is changing, the mouse-over text of the hyperlinks should be updated accordingly

  5. The hyperlink behavior should persist, when I export the text document to pdf.

Your help and ideas are very much appreciated!

edit retag flag offensive close merge delete