-
DescriptionI'm trying to build a "back to toc" button in my pdf quarto book. Does quarto have something similar to |
Beta Was this translation helpful? Give feedback.
Answered by
mcanouil
Sep 30, 2024
Replies: 1 comment 3 replies
-
As far as I know, there isn't for LaTeX. Here is a demo/workaround: ---
title: "Quarto Playground"
format:
html: default
pdf:
include-before-body:
- text: |
\addtocontents{toc}{\protect\hypertarget{toc}{}}
format-links: false
toc: true
toc-location: body
---
# Section 1
This is a playground for Quarto.
{{< lipsum 1 >}}
{#fig-placeholder}
# Section 2
{{< lipsum 2 >}}
::: {.content-visible when-format="html"}
[Table of Contents](#TOC)
:::
::: {.content-visible when-format="pdf"}
`\hyperlink{toc}{Table of Contents}`{=latex}
::: Adding I think, this can be a good enhancement. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
yyin422
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I know, there isn't for LaTeX.
For HTML,
[xxx](#TOC)
should work (I have no idea why the id is capitalised here).For Typst, there isn't.
Here is a demo/workaround: