Skip to content

[Typst writer] Section headers does not respect .unnumbered #9585

@pbsds

Description

@pbsds

Explain the problem.

The typst writer doesn't preserve which section heading should be numbered and not.

Repro:

main.md:

---
title: foobar
numbersections: true # latex
section-numbering: "1." # typst  
---

# I should have a section number

neat

# I should not have a section number {-}

oh no!
$ nix shell nixpkgs#{pandoc,texlive.combined.scheme-small,typst}
$ pandoc repro.md -o repro.md.tex.pdf --pdf-engine pdflatex 
$ pandoc repro.md -o repro.md.typ.pdf --pdf-engine typst

main.md.tex.pdf:

image

main.md.typ.pdf:

image

Pandoc version?

$ pandoc --version
pandoc 3.1.11.1
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /home/pbsds/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

$ typst --version
typst 0.11.0 (unknown hash)

$ pdflatex --version
pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023/nixos.org)
kpathsea version 6.3.5
Copyright 2023 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.40; using libpng 1.6.40
Compiled with zlib 1.3.1; using zlib 1.3.1
Compiled with xpdf version 4.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions