Skip to content

Compile breaks when given a single abstract #3

Open
MitchellAcoustics/LaPreprint-typst
#1
@MitchellAcoustics

Description

@MitchellAcoustics

When providing only a single string as an abstract, e.g.:

#show: template.with(
  abstract: lorem(50),
)

or

#show: template.with(
  abstract: "This is an abstract",
)

the compile breaks with

typst compile examples/pixels/main.typ --root .
error: type dictionary has no method `map`
    ┌─ lapreprint.typ:278:14
    │
278 │     abstracts.map(abs => {
    │               ^^^

The same happens if the abstract text is wrapped as content [This is text] rather than a string.

I think this is happening because line 270-271 of lapreprint.typ returns a dictionary, but the abstracts.mapin line 278 requires an array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions