There are some minor issues of the html output of theorem div. I am using quarto v0.3.114 on mac os.

A minimal example:

```
::: {#thm-line}

The equation of any straight line, called a linear equation, can be 
written as: $y=ax+b$.

A second par.

:::

See @thm-line.

::: {#thm-line2}

A second theorem.

:::
```

HTML output:
![image](https://user-images.githubusercontent.com/16741954/152935214-caaac116-dec5-4084-a2e6-1ae15f1d3de9.png)

In the example above:

(1) Sometimes the theorem body begins in a new paragraph (as in Theorem 2), sometimes just following the theorem tag (as in Theorem 1). Not sure whether this is a design choice or not, but it might be better to let the body just follow the theorem tag for consistency.

(2) It's hard to tell the scope of the theorem body. For example, in theorem 1 "A second par" is part of the body, while "See theorem 1" is not.
A possible fix is to put the whole theorem in a box environment. From my experience, many math blogs do that (eg, [Terry Tao's blog](https://terrytao.wordpress.com/2021/12/28/the-inverse-theorem-for-the-u3-gowers-uniformity-norm-on-arbitrary-finite-abelian-groups-fourier-analytic-and-ergodic-approaches/)). Another fix is to italicize the whole theorem/lemma/etc as LaTeX does. 

I personally prefer the first fix (i.e., box). A con of the italicize approach is that users may not be able to use the markdown syntax `**` for emphasis once the whole texts are italicized. LaTeX solves this problem by using the `\emph` command, which produces normal texts for emphasis in a italicized environment.  
 
   

2022-02-08T07:56:33Z
AlbertLei
crossref
Future
open
Customize the html output of theorem div 
https://github.com/quarto-dev/quarto-cli/issues/317