Skip to content

Bug: Multiple authors and affiliations fails #25

@luismmontilla

Description

@luismmontilla

Bug description
When specifying multiple authors with affiliations (including both index and id fields as per documentation), the template throws the error:

error: dictionary does not contain key "index"
    ┌─ @preview/pubmatter:0.2.1/pubmatter.typ:270:30
    │
270 │         super(str(affiliation.index))
    │                               ^^^^^

To Reproduce
Steps to reproduce the behavior:

  1. Use the following YAML front matter in a Quarto document:

      title: "Mathematical Theorems"
      abstract-title: Theorems
      authors: 
        - name: Jane James
          orcid: 0000-0000-0000-0000
          affiliations: 
            - name: University of A 
        - name: Jhon Jones
          orcid: 0000-0000-0000-0000
          affiliations: 
            - name: University of B
       ´´´

Alternatively:

```yaml
authors: 
  - name: "Author One"
    orcid: "0000-0000-0000-0001"
    email: "author1@domain.edu"
    affiliations: 
      - id: "AFF1"
        index: 1
  - name: "Author Two"
    orcid: "0000-0000-0000-0002"
    affiliations: 
      - id: "AFF1"
        index: 1
affiliations:
  - id: "AFF1"
    index: 1
    name: "Institution Name"
```
  1. Render the document with lepub-typst format.

Expected behavior
The document should render with authors and their affiliations correctly displayed.

Actual behavior
Rendering fails with the error above.

Environment

  • Quarto version: 1.7.31
  • lepub-typst version: [your version]
  • OS: MacOS 15.1.1

Additional context

  • I have confirmed that both id and index are specified in the authors' affiliations and the main affiliations list.

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