2

If I have a R code block,

```{r}
#| collapse: TRUE
1+1                 
mean(c(1,2,3))      
summary(mtcars)
```

then the output and code are integrated in the same block. Moreover, the output is placed "in between" each new command:

enter image description here

Alternatively, if I write:

--- 
code-annotations: hover
---

```{r}
1+1                 #<1>
mean(c(1,2,3))      #<2>
summary(mtcars)     #<3>
```
1. This is a basic sum
2. Create vector and calculate mean
3. Summary statistics

then I have syntax annotation (on a quarto generated webpage). This feature is explained here.

However, things no longer work as expected when I want to combine the two features:

--- 
code-annotations: hover
---

```{r}
#| collapse: TRUE
1+1                 #<1>
mean(c(1,2,3))      #<2>
summary(mtcars)     #<3>
```
1. This is a basic sum
2. Create vector and calculate mean
3. Summary statistics

enter image description here

The output no longer is "in between" but everything is shown at the end. Since I have longer blocks of code, I want to avoid this, and show intermediate output along the way.

heoof123
  • 55
  • 4
  • 1
    I have Quarto 1.3.340. I rephrased my original question (with screenshots) to formulate the "problem" more precisely. – heoof123 Apr 28 '23 at 14:20

0 Answers0