Skip to content
Discussion options

You must be logged in to vote

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:

---
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 >}}

![An image]({{< placeholder 600 400 >}}){#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}`{…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@cderv
Comment options

@mcanouil
Comment options

@yyin422
Comment options

Answer selected by yyin422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants