I have a book which I build with bookdown. In the book, I use the exercises
environment extensively. My exercises are usually a list of steps. Recently I built the book (I use R 4.2.1, RStudio 2022.07.1 and bookdown 0.27) and noticed that the title of the exercises is numbered too (which was not the case before). To reproduce the issue, I create a new example bookdown project in RStudio and added Rmd file 01-1-exr.Rmd
, the contents of which are as follows (I tried the old and the new syntax to define the exercises block):
File contents
# Excercises
Do exercises \@ref(exr:exr-1) and \@ref(exr:exr-2).
::: {.exercise #exr-1}
1) Open RStudio.
2) Write `1 + 9` to console.
:::
```{exercise, exr-2, echo=TRUE}
1) Open RStudio.
2) Write `1 + 9` to console.
```
With bookdown 0.25 and newer I get:
With bookdown 0.24 the old syntax gave the desired result:
If I use HTML comment, which is a regular practice to restart list numbering, pandoc fails:
::: {.exercise #exr-1}
<!-- -->
1) Open RStudio.
2) Write `1 + 9` to console.
:::
I'm aware that from bookdown 0.25 exercises
do not use block2
. But what about the numbering? Is it a bug? Or is it expected to have the title of exercises numbered?
Yet, how can I get the previous behaviour? Is using bookdown 0.24 the only option?