Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --toc-depth support in Typst template #9242

Closed
cderv opened this issue Dec 7, 2023 · 0 comments
Closed

Add --toc-depth support in Typst template #9242

cderv opened this issue Dec 7, 2023 · 0 comments

Comments

@cderv
Copy link
Contributor

cderv commented Dec 7, 2023

Typst has support for a depth in TOC

https://typst.app/docs/reference/model/outline/#parameters-depth

Currently it is set to none in template

$if(toc)$
#outline(
title: auto,
depth: none
);
$endif$

I believe if the Typst writer does handle --toc-depth options like some other template, it could be possible to set $toc-depth$ variable in the template. This would allow to control like other formats.

Typst specific: Typst allows a value of none to have no depth limit, while default in Pandoc is toc-depth: 3.
If the default is used for Typst, there is the question of adding a way to pass toc-depth: none somehow, or another value that would mean no limit. toc-depth: 6 is the max value, and could be used for that maybe.

Context: We have added support for this in Quarto (https://github.com/quarto-dev/quarto-cli/pull/7825/files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant