Quarto version: I tried a few version. Started with 1.0.37 then I updated to the latest dev version (says 99.9.9) using this
```
git clone https://github.com/quarto-dev/quarto-cli
cd quarto-cli
./configure-macos.sh
```
Then went back to v1.0.38 by re-installing.
RStudio: 2022.02.2 
OS: Mac Big Sur 11.6.2

This is specific to a Quarto book project.

If have 2 h1 headers in a chapter qmd, the first appears in TOC and the others appear with the right sequential chapter numbers but don't appear in the TOC and later chapters don't "know" about the new chapters. 

Example `_quarto.yml`
```
project:
  type: book

book:
  title: "test"
  chapters:
    - index.qmd
    - chap1and2.qmd
    - chap3.qmd

format:
  html:
    theme: cosmo
```

`chap1and2.qmd`
```
# Chapter 1

This is chapter 1

# Chapter 2

This is chapter 2
```

This is the output. Notice the TOC.
<img width="662" alt="image" src="https://user-images.githubusercontent.com/2545978/183253088-e90f396a-43fc-4253-b199-50c865c61326.png">

### `quarto check` Output

```
[✓] Checking Quarto installation......OK
      Version: 1.0.37
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.12
      Path: /opt/homebrew/opt/python@3.9/bin/python3.9
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.1.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/eli.holmes/Library/R/x86_64/4.1/library
        - /Library/Frameworks/R.framework/Versions/4.1/Resources/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
```

### `quarto tools check` Output

```
[✓] Inspecting tools

Tool         Status                    Installed     Latest  
chromium     Not installed             ---           869685  
tinytex      External Installation     ---           v2022.08
```

### Use case, why is this needed?

In report writing situation, you often don't know how many chapters (appendices) you will need. You are using `knit_expand()` with an child.Rmd that is creating all your chapters (appendices) based on the data (which vary). That `knit_expand()` is a for loop (or map function) and is creating the markdown dynamically.  This works fine in Quarto...except that it doesn't recognize the later h1 levels as proper chapters.

### Checklist

- [x] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [x] included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [x] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [x] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [x] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [x] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [x] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
cscheid
2022-08-06T14:36:36Z
eeholmes
enhancement books
v1.4
open
Quarto book: multiple chapters in one qmd chapter
https://github.com/quarto-dev/quarto-cli/issues/1712