Basics

OneLatex supports you when you want to create cross references. To create an automatically created cross reference in the document, you need to insert a link in the text.

How to insert a link to a chapter/section that creates a reference in the final document

Proceed as follows:

  1. in OneNote, select the page to which you want to create a reference link.

  2. right-click on this page and select “Copy link to page” from the context menu.

    Untitled

  3. Go to the text where you want to insert the link to the page or chapter and insert the link using Ctrl-K or the context menu (right mouse button).

    Untitled

    Paste (Ctrl-V) the copied link in the field “Address”:

    Untitled

    Enter a name for the link in the “Text to display” field. For example, use the prefix “-> ” and the name of the page to which you are linking to as a general naming rule.

    Untitled

<aside> 💡 During compilation by OneLatex, each hyperlink is checked to see whether it refers to a specific page. If this is the case, a corresponding reference with the label name of the chapter is inserted. The Latex command for the reference can be set in OneLatex navigation "Settings" under "Cross-referencing".

</aside>

The result in the final document using the \\vref looks like this:

Untitled

Set commands for cross-referencing in settings

If the option “Automatically convert hyperlinks to cross-references” is activated, OneLatex creates a cross-reference using the commands that are set in the section “Command for cross-referencing”:

Untitled

<aside> 💡 In order to use the \\vref command, you need to include two packages in the preamble section:

</aside>

\\usepackage[english]{varioref}
\\usepackage[noabbrev,english]{cleveref}
\\usepackage[ngerman]{varioref}
\\usepackage[noabbrev,german]{cleveref}

<aside> 💡 You can also use \\ref and \\pageref, for which you do not need to include any packages. Note, however, that you may have to adapt the text in which these commands are embedded due to the language or the context where it is placed in the document. In the “-- select a predefined option —” field, you can select two predefined options (English and German) with this apporach in addition to the \\vref variant.

</aside>