Skip to content

Support auto_identifiers extension for Typst #11041

@MarvinJWendt

Description

@MarvinJWendt

Explain the problem.
When converting from typst to markdown and including a table of contents there are no links to the headings.

Typst:

= Heading
#lorem(5)

== Subheading
#lorem(5)

== Subheading 2
#lorem(5)

Converting

pandoc typst.typ --toc -s -o markdown.md

Output markdown (wrong):

-   Heading
    -   Subheading
    -   Subheading 2

# Heading

Lorem ipsum dolor sit amet,

## Subheading

Lorem ipsum dolor sit amet,

## Subheading 2

Lorem ipsum dolor sit amet,

Removing the toc and converting the markdown to markdown again with --toc

pandoc markdown.md --toc -s -o markdown2.md

(correct, should have been the output of the first command)

-   [Heading](#heading){#toc-heading}
    -   [Subheading](#subheading){#toc-subheading}
    -   [Subheading 2](#subheading-2){#toc-subheading-2}

# Heading

Lorem ipsum dolor sit amet,

## Subheading

Lorem ipsum dolor sit amet,

## Subheading 2

Lorem ipsum dolor sit amet,

The same issue happens when using other markdown flavours (I tested with gfm).

Note: I am unsure if this only happens with typst to md, might happen with other formats to markdown too.

Pandoc version?

pandoc 3.6
Features: +server +lua
Scripting engine: Lua 5.4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions