Appendix numbering in bookdown using bs4_book

My apologies if this has been addressed and I can't find it:

I'm working on a bs4_book using bookdown, and the numbering in the appendix is odd. I don't know how to fix it.

The problem is that the book's table of contents and the page table of contents label the Appendix and its sections as A, A.1, etc. But the content of the appendix itself is labeled with a number that is the number of other files that have been processed.

So I have a preface, two chapters and an appendix. The chapters are all labeled correctly, as 1 and 2. But the appendix is labeled as "4".

I've created a tiny example on Netlify here: https://adoring-villani-e6e799.netlify.app
and the source code for it is on GitHub (without the output docs folder) here: https://github.com/sarahcnyt/tmpbs4

Can anyone tell me what I'm doing wrong?

Thanks in advance.

I stumbled on the answer to my own problem, so I'll mark this closed. The example I needed was in Hadley's Shiny book, which I was looking at for a solution to a totally different problem.

He had an introduction to each part, which was its own .Rmd file. When i did it that way, it seemed to work.

As an aside, I also discovered that if you're trying to control the naming of the html files, you can't start them with numbers. Or at least it seems that way.

It looks like this:

# (PART\*) Getting started {.unnumbered}

# In this section... {#starter-intro .unnumbered}

Thanks again for considering helping me. I'll mark this ask closed

2 Likes

The key is the “.unnumbered” in that code. It need not be in a separate file.

You can also do it like this:

# Appendix {-}
1 Like

Thanks. I had tried that, but it just came out as "{-}" on the page. Maybe I had something off on it. - SC