Allow separate .qmd files for revealjs presentations that can have the same chunk names as in other qmd files, as allowed in book projects #11920
Replies: 2 comments
-
This constraint is not a Quarto constraint, that's a I highly doubt another approach as you request here will come to life. Note that if you use the same label, it implies the content is the same, so you might want to use
What are you referencing here? if you are talking about the project-level |
Beta Was this translation helpful? Give feedback.
-
Thank you - this is really helpful.
…On Tue, Jan 21, 2025 at 11:45 AM Mickaël Canouil ***@***.***> wrote:
I see that I can use {{< include chapter_x.qmd >}} shortcodes to combine
several qmd files into one presentation, but each chapter must have chunk
names that do not duplicate chunk names in any other chapters. When a
presentation becomes very large and complex, the ability to reuse chunk
names becomes valuable.
This constraint is not a Quarto constraint, that's a knitr constraint to
ensure other feature like code cell reuse, etc. will work properly.
I highly doubt another approach as you request here will come to life.
Note that if you use the same label, it implies the content is the same,
so you might want to use knitr feature to reuse code cells
<https://bookdown.org/yihui/rmarkdown-cookbook/reuse-chunks.html> instead
of duplicating them.
If you really want to duplicate your labels and don't care much of knitr
log (which uses labels when provided), then disable this knitr check:
https://bookdown.org/yihui/rmarkdown-cookbook/duplicate-label.html
—
Reply to this email directly, view it on GitHub
<#11920 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABR4JGCXGW3DNWDPU3DQ34L2LZ2UJAVCNFSM6AAAAABVS6F6QCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOJQGUYDKMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Description
Perhaps this feature already exists but if so I haven't figured it out:
It would be great to be able to create a revealjs presentation that consists of several different .qmd files that work like chapters do in a book project. I'd like to be able to have many chapters, each of which has some chunks that may have the same name (e.g., setup, get-data, etc.) even if the chunks have different content.
I see that I can use
render:
in yaml to have independent presentations, but not a single combined presentation with a comprehensive TOC and coordinated page numbering.I see that I can use
{{< include chapter_x.qmd >}}
shortcodes to combine several qmd files into one presentation, but each chapter must have chunk names that do not duplicate chunk names in any other chapters. When a presentation becomes very large and complex, the ability to reuse chunk names becomes valuable.I realize this is a nice-to-have and I can get around it by using shortcodes and just coming up with new names. But given that the feature exists in book projects I thought I'd inquire and suggest it. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions