Skip to content

Rendering a book type project to PDF with multiple chapters yields a MultipleDefinitionError #35

@zaza183

Description

@zaza183

Rendering a book type project (as defined in _quarto.yml) with a single chapter renders well to PDF, however adding multiple chapters gives a MultipleDefinitionError: The variable 'mo' was defined by another cell error.

Follow example is created with quarto create project (type book) and quarto add marimo-team/quarto-marimo. Then use a index.qmd and index2.qmd both as this file index.qmd.

_quarto.yml:

project:
  type: book

book:
  title: "Big Book"
  author: "Norah Jones"
  date: "22.8.2025"
  chapters:
    - index.qmd
    - index2.qmd
    - intro.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib

format:
  html:
    theme:
      - cosmo
      - brand
  pdf:
    documentclass: scrreprt

which gives the following error

MultipleDefinitionError: The variable 'my_value' was defined by another cell
MultipleDefinitionError: The variable 'mo' was defined by another cell
MultipleDefinitionError: The variable 'my_value' was defined by another cell
MultipleDefinitionError: The variable 'mo' was defined by another cell
MarimoExceptionRaisedError: Name `mo` is not defined. It was expected to be defined in
MarimoExceptionRaisedError: Name `mo` is not defined. It was expected to be defined in
MarimoExceptionRaisedError: Name `mo` is not defined. It was expected to be defined in
MarimoExceptionRaisedError: Name `mo` is not defined. It was expected to be defined in

Rendering to a html target works perfectly though.

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