### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/2844

<div type='discussions-op-text'>

<sup>Originally posted by **zeileis** October 13, 2022</sup>
In quarto 1.1251, when using one of the [theorem divs](https://quarto.org/docs/authoring/cross-references.html#theorems-and-proofs) with just a list (itemized or enumerated), then in HTML output the theorem title becomes the first list element. Only if there is a paragraph prior to the list, it is handled correctly. Example:

```
::: {#def-twothings-plain}
## Plain list
1. First things first.
2. Second thoughts.
:::

::: {#def-twothings-plus}
## List plus intro paragraph
This is about two things.

1. First things first.
2. Second thoughts.
:::
```

Rendered to HTML:

![](https://i.imgur.com/oqY4gJ2.png)

Rendered to PDF it is a bit better but also not ideal:

![](https://i.imgur.com/nmGFrfc.png)

I guess this may be related to the earlier discussion https://github.com/quarto-dev/quarto-cli/discussions/1925 and corresponding fix https://github.com/quarto-dev/quarto-cli/issues/1926.

One can work around the problem by including something like a non-breaking space only in the first paragraph but it would be nice to have having to do this.</div>
cscheid
2022-10-17T15:12:39Z
cscheid
bug
v1.2
closed
theorem environments containing just a list
https://github.com/quarto-dev/quarto-cli/issues/2886