You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible that your hook is correct but where is loaded does not work. Here is a full analysis rstudio/bookdown#1252 (comment)
Basically when new_session: yes, before_chapter_script is sourced before render(), as each file is rendered in a different session. This means that it is possible that some options (like knitr configuration) does not apply because overwrittren by render(). Usually in a document project, those change of behavior for knitr are done in a setup chunk. And with a bookdown project this would apply. Some different way to load a common file in all document are shared in the issue linked above.
That may be what causes the hook you defined to not work.
A modification of yihui/knitr#1142 that works for
bookdown
(knit_hooks
is not exposed when rendering inbookdown
)The text was updated successfully, but these errors were encountered: