-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
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