Linking Two Sections of the Same Document

I feel like this should be really simple, but I can’t figure it out. I’m writing an FAQ-style document, and I want to be able to link each question from the table of contents to the part of the document where it’s actually answered (think Wikipedia article). Ideally, the links need to still function correctly if I export the document as a PDF, but if that’s not possible, that’s fine.

@ajrlegits - If I understand your question and @Huskey’s comment right, @Huskey wants to say make each question a heading and add a table-of-contents. You can then jump via crtl+click directly to the heading and the text below.

To jump back to the table of content you need to make a hyperlink to the table of content.

I am not entirely certain I understand your question as you appear to indicate a fairly typical document structure. When you say “two sections”, what exactly do you mean? The W3C FAQ page would seem to be an appropriate example as it contains these components:

  • List of links (table of contents): In Writer a table of contents can be generated from the headings in the document, or you can manually create / manage it by inserting hyperlinks to headings or bookmarks.
  • Question (heading): This is the Heading N style (probably Heading 1) for each “section” of the document. Refer my comment on use of the term “section”, and how it relates to word processing software, in this answer.
  • Answer (paragraph): The is the Text Body or equivalent text style. Naturally this text can include a link (cross-reference) to another question / answer.

Any standard document with headings, paragraphs, and a table of contents based on headings will have this structure.

EDIT: What @ROSt53 says is correct, if this is what you require. Insert a bookmark at the Table of Contents heading (make sure the ToC is editable) and then a hyperlink cross-reference in each answer back to this bookmark. I did not understand this from your question.

What is more, in LibreOffice (and correspondingly in OpenDocument) there is a distinction between hyperlinks and cross-references. When referring to other parts of the same document, cross-references are more powerful and should be preferred to hyperlinks. See the Writer Guide, chapter 3, section “Linking to another part of a document”.

Thanks for this correction @CyanCG. I have amended my answer in accordance. I think I wrote “hyperlink” as an artefact of researching hyperlinks for another answer at the time.

The solution could be to insert the questions into a table of content. I’m not aware of other solutions.