Skip to content
Discussion options

You must be logged in to vote

file-scope: true is already the right Quarto setting; moving it under pdf won’t change this. The catch is that Pandoc only resets (@) examples when it receives multiple input files, while Quarto combines a book before the final single-document conversion.

For book-aware numbering, use Quarto’s native example blocks instead:

::: {#exm-chapter-one}
## An example

Example text.
:::

In a numbered book these render per chapter, such as Example 1.1 and Example 2.1. If you specifically need the literal (1) style to restart in every chapter, file-scope can’t do that in a Quarto book; that needs custom filtering rather than a different YAML placement.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

Answer selected by adamiturabi
Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants