Using {{< include >}} or knitr::knit_child() but keeping yaml-params of the child. #8638
Unanswered
OffByOne37
asked this question in
Q&A
Replies: 1 comment 2 replies
-
This is a limit of how knitr parameters works. YAML definition must be in the main doc YAML header. However, params definition as YAML is just a wat to defined defaults. Objects are then just transformed to a Why not just have a hidden chunk in your child document that defines this new In ```{r}
#| include: false
params <- list(
val1 = "title",
val2 = TRUE)
```
# content of slide_1 This is quite similar in a way of what you are doing, and currently this is how that would work if you want to work with parameters. Related discussion about child and parameters setting: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hello, im currently trying to create a presentation from multiple slides, but the slides are seperated in chapters.
I have created a master.qmd file that looks something like this:
The slides will be more complicated, but lets's say they look something like this:
The problem is that the params from the slides are not available if i knit them from a parent. Therefore i first need to extract them via knit_params and then I can pass them via the new envir parameter.
Isn't there a better solution?
NOTE: for now I did not implement that I can have multiple chapters, since i first want to resolve the problem with the params. Otherwise i would simply run through all files via a loop and knit them.
Beta Was this translation helpful? Give feedback.
All reactions