Closed CyuHat closed 1 month ago
@CyuHat could you double-check the version of Quarto you have? You may need to update RStudio (which has a built-in version of Quarto) or directly update Quarto itself:
In addition, be sure that you are using the live-html
version of the HTML format, rather than just the plain html
format, in your book's _quarto.yml
file. e.g.
format:
live-html:
theme: cosmo
pdf:
documentclass: scrreprt
This kind of problem should probably be listed in some form of FAQ in the documentation.
Thank you both for your answers! I tried your solutions but it still does not work. Also I should have given more context. Here are the version I am working with:
R: 4.2.1 Rstudio: 2024.04.2 Quarto: 1.5.55
After updating quarto to the version 1.5.56, the problem persisted. In fact, since the begining it worked for single page html or quarto website, but it still do not works for quarto book. I have done two examples, one using quarto website (see here) and the other one using quarto book (see here). Looking at the final results, it works for quarto web site (see here) but does not work for quarto book (see here).
I kept all the default options for both cases, but here are the changes I have for the quarto website (note: there is no "\" added to the original code chunks):
index.qmd
---
title: "test-quarto-live-1"
engine: knitr
format: live-html
---
{{< include ./_extensions/r-wasm/live/_knitr.qmd >}}
\```{webr}
fit = lm(mpg ~ am, data = mtcars)
summary(fit)
plot(fit)
\```
And here are the changes I have done for the quarto book version:
.github/workflows/quarto-publish.yml
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.5.56
tinytex: true
_quarto.yml
format:
html-live:
theme: cosmo
pdf:
documentclass: scrreprt
index.qmd
---
title: A Quarto Live Document
engine: knitr
format: live-html
---
{{< include ./_extensions/r-wasm/live/_knitr.qmd >}}
\```{webr}
fit = lm(mpg ~ am, data = mtcars)
summary(fit)
plot(fit)
\```
My concern is that I can't get the extension using the command in a quarto book project and after adding the folder manually, it still doesn't work.
Please could you double check the contents of your _quarto.yml
file? The format should be live-html
, but you seem to have html-live
.
Yes, you are right, it is working now. Thank you for your patience and advices. It is really an amazing project!
Dear authors,
First of all, thank you for this excellent extension. I've tested it and think it is great. I will definitly use it for future contents!
I wanted to let you know about a problem I encountered when trying to use it in a quarto book. When I try to install the extension in a quarto book project using
quarto add r-wasm/quarto-live
, I get the following error after the first question in the installation process:To get around this, I simply install the extension in another project and copy the
_extensions
folder into the quarto book folder. But when I generate the final book, I realize that the extension does not work, i.e. the{webr}
boxes are not considered as usable code zones rather plain code.Do you know why this problem occurs and how to fix it?
Thanks in advance!