How to get chapter metadata to appear in PDF and EPUB of Quarto Book? #9382
-
DescriptionHow can chapter-specific metadata be made visible in the PDF and EPUB versions, as it is in the HTML version, of a Quarto book? I ask as I'm hoping to create a Quarto book in which each chapter's metadata (author, doi, abstract, etc.) will be different from the book's metadata. While most of the different chapter and book metadata are made visible in the HTML version via the example below, very little of the different chapter and book metadata are made visible in the PDF and EPUB versions (only the different abstracts) via that example. I want, however, all the chapter and book metadata to be present in these versions to display such information as the different authors of each chapter, each chapter's doi, etc. Can this be done? Book Metadata project:
type: book
book:
title: "Conference Proceedings"
author: ["Norah Jones", "John Doe"]
date: "4/12/2024"
abstract: "This is a book of conference proceedings."
doi: 10.5967/book
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
lang: en
language:
title-block-author-plural: "Editors"
bibliography: references.bib
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt Chapter Metadata ---
author:
- name: John Doe
email: john@doe.edu
- name: Jane Doe
email: jane@doe.edu
abstract: >
Essay about ...
doi: 10.5967/chapter
language:
title-block-author-single: "Author"
title-block-author-plural: "Authors"
---
# Conference Paper I
This is a book created from markdown and executable code.
See @knuth84 for additional discussion of literate programming. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You're gonna need to use a Lua filter to inject the content where you want it. |
Beta Was this translation helpful? Give feedback.
-
By any chance, has someone come up with a lua filter to achieve displaying chapter-specific meta-data in pdf quarto books? |
Beta Was this translation helpful? Give feedback.
You're gonna need to use a Lua filter to inject the content where you want it.
In the case of HTML, it's simpler because it's done via the title block partial which is used on all pages, but for PDF, there are no pages/documents. It's one single document.