Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persisting state across Rmd file execution #101

Open
psychemedia opened this issue Feb 24, 2022 · 4 comments
Open

Persisting state across Rmd file execution #101

psychemedia opened this issue Feb 24, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@psychemedia
Copy link

I have various complex builds that embed knitrd documents from templated sub-documents, as well as Rmd files that rely on state set in previously run Rmd files from earlier in the same book build.

Is there a default setting in the ottrpal::bookdown_to_leanpub() function that clears state when each new Rmd file is executed? I can build books fine in RStudio via the book build tools, but using ottrpal::bookdown_to_leanpub() I get not found errors where state set from other files is not available.

@psychemedia psychemedia added the bug Something isn't working label Feb 24, 2022
@cansavvy
Copy link
Contributor

Hi @psychemedia sorry for my slow response. Thanks for your interest in ottrpal and your idea contributions here!

The inner workings of bookdown_to_leanpub depend on bookdown which run each file individually and sequentially based on what's in the _bookdown.yml file.

I'm not sure I completely understand the ask here. Do you think you could link me to an example or write a toy example?

@psychemedia
Copy link
Author

I don't have a minimal example to hand, but the idea was along lines of suppose I have a book constructed from two Rmd files. The first sets a = 1, the second uses a. Ideally, I'd like to run both files in the same scope so variables set from the first Rmd file can be referenced by the second.

@psychemedia
Copy link
Author

In passing, I think that quarto offers a leanpub flavoured markdown output, so for future rather than legacy projects, .qmd and the quarto publishing route look promising for LeanPub publications.

@cansavvy
Copy link
Contributor

In passing, I think that quarto offers a leanpub flavoured markdown output, so for future rather than legacy projects, .qmd and the quarto publishing route look promising for LeanPub publications.

We do hope to offer Quarto compatibility and have started work on it. https://github.com/jhudsl/quarto_ottr_test

But I can't tell you how quickly we'll get this going as we have other pots on the burner right now as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants