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

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

<sup>Originally posted by **zeileis** August 16, 2022</sup>
When using one of the [theorem divs](https://quarto.org/docs/authoring/cross-references.html#theorems-and-proofs), then in the HTML output the corresponding "theorem-title" is sometimes in its own paragraph and sometimes not. Specifically, if the div just consists of a single paragraph, then the title is in a separate paragraph. Otherwise it is merged into the first paragraph.

As a concrete example consider:

```
::: {#exr-1}
Compute: 25 + 17.
:::

::: {#exr-2}
Let a = 25 and b = 17.

Compute: a + b.
:::
```

I have simply inserted the snippet above into the `intro.qmd` from the `mybook` demo (`quarto create-project mybook --type book`). This yields the following HTML output using quarto 1.0.38 with pandoc 2.17.1.1 on Debian GNU/Linux.

```
<div id="exr-1" class="theorem exercise">
<p><span class="theorem-title"><strong>Exercise 1.1 </strong></span></p>
<p>Compute: 25 + 17.</p>
</div>
<div id="exr-2" class="theorem exercise">
<p><span class="theorem-title"><strong>Exercise 1.2 </strong></span>Let a = 25 and b = 17.</p>
<p>Compute: a + b.</p>
</div>
```

Rendered in a browser it looks like this:

![browser screenshot](https://i.imgur.com/GJWj8k8.png)

Note that the text of the first exercise starts in a new paragraph while the second exercise starts in the same paragraph as the title.

Is this difference by design? Can I somehow switch between these layouts? I would like a consistent layout, preferably with the theorem-title in its own paragraph.</div>
cscheid
2022-08-16T16:13:43Z
jjallaire
bug
v1.1
closed
theorem-title not in its own HTML paragraph
https://github.com/quarto-dev/quarto-cli/issues/1926