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.
Proceed as follows:
in OneNote, select the page to which you want to create a reference link.
right-click on this page and select “Copy link to page” from the context menu.
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).
Paste (Ctrl-V) the copied link in the field “Address”:
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.
<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:
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”:
<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>