I’m not sure if there is a way to do this but any tips would be appreciated. Its more common with the work I do to have the TOC hyperlinked by the page number instead of the heading title
Do I understand correctly that you want the outline to link to the top of the page, instead of to the heading? You can wrap the entry with a link to the top of the page, like so:
#show outline.entry: it => link(
(
"page": it.element.location().page(),
"x": 0em, "y": 0em
),
it,
)
Hi there @Brier_Gallihugh,
It is quite hard to provide some help without more context.
- Are you referring to the hyperlink itself or the target?
- Which PDF reader are you using?
- Perhaps you could provide a minimal working example (MWE) demonstrating the issue you are experiencing?
Hyperlinks are made with the whole outline entry, including the heading, padding delimiters and page number. The way I read your question, you seem to be asking if it is possible to click on the page number rather than the rest of the outline entry? If so, it should already work.
Or are you asking for a way to click on the outline entry that leads to where the page number is located (which, again, would require a MWE to be able to help).
Hey @Brier_Gallihugh, welcome to the forum! I’ve changed your question post’s title to better fit our guidelines: How to post in the Questions category
Make sure your title is a question you’d ask to a friend about Typst.
In addition, please add more information to your post, such as images and examples, as currently it is ambiguous enough that 3 different interpretations have been had so far.
Did I interpret correctly that you are looking for a way to remove the link from the heading title and keep it only on the outline entry’s page number (not both)? If so, you will have to apply a show rule on outline.entry
rebuilding it from scratch, as explained here: Outline Function – Typst Documentation