Skip to content

PDF generation with typst fails #11076

@TuongNM

Description

@TuongNM

The current main branch (at 93f8145 as of this writing) fails to generate PDFs using typst from a simple markdown file.

Compiling pandoc-cli and running pandoc -t typst -o test.pdf test.md
causes the following error:

error: expected string or array, found none
   ┌─ toPdfViaTempFile177255-0.typ:64:12
   │
64 │     author: authors.map(author => content-to-string(author.name)).join(", ", last: " & "),
   │             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

help: error occurred in this call of function `conf`
    ┌─ toPdfViaTempFile177255-0.typ:142:14
    │  
142 │   #show: doc => conf(
    │ ╭───────────────^
143 │ │   abstract-title: [Abstract],
144 │ │   pagenumbering: "1",
145 │ │   cols: 1,
146 │ │   doc,
147 │ │ )
    │ ╰─^

This seems to have been caused by the template changes in #9970

test.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions