Help request - bookdown figure numbers out of order


Data Science in Education Using R co-author Isabella posted in RStudio Community about a strange issue encountered when adding figure numbers to the book: they are regularly out of order. The post in RStudio Community is here.

As one example, in Chapter 5, the figure numbering begins with 5.1 … but then proceeds to 0.1, and then picks up (correctly) with 5.3 through the last figure, 5.10.

After trying to figure out whether there was an issue with that figure (source code for Chapter 5), we looked at other chapters, like Chapter 9, for which the numbering is even more dramatically out or order.

If you have any suggestions, please consider responding to the RStudio Community post or by messaging us at