### Bug description

Syntax to insert display style math equations in Quarto documents does not follow conventions explained in the [math section of Pandoc user manual](https://pandoc.org/MANUAL.html#math). 

This issue does not affect inline math expressions and it is probably related to issue report #1181, currently in progress.

This is a minimal reproducible example: https://gist.github.com/glimmerphoenix/641d5e35d7194abadb721c0d9b1e14f2.

In summary:

- Math delimiter for display style expressions must be `$$ ... $$` and preferably written in the same line as the math equation.
- The following option documented in the Pandoc user manual does not work in Quarto:
> In this case, the delimiters may be separated from the formula by whitespace.
  
- The parser still works after invalid inline math expressions, but stops working after the first display style math expression with incorrect syntax. Not sure if this is due to Quarto or Pandoc internal conversion.
- Finally, the recommended syntax for Quarto math expressions described in #1181, suggesting to leave each `$$` delimiter in a separate line, is valid according to Pandoc documentation but does not follow the standard syntax for document convertion. In fact, as I have commented in #1181, both syntax alternatives (`$$` in same line vs. `$$` in a separate line) cannot be mixed in the same document, since the parser stops working at all.

**OS and packages info**
- Platform: Linux, Ubuntu 20.04
- R: 4.2.1
- RStudio: 2022.07.1 Build 554
- Quarto: 1.0.38
- quarto CRAN package: 1.2

### `quarto check` Output

```bash
[✓] Checking Quarto installation......OK
      Version: 1.0.38
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/bin/python3
      Jupyter: (None)

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

      There is an unactivated Python environment in miniconda3. Did you forget to activate it?

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /usr/lib/R
      LibPaths:
        - /home/jfelipe/R/x86_64-pc-linux-gnu-library/4.2
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      rmarkdown: 2.14

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

### `quarto tools check` Output

```bash
[✓] Inspecting tools

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

### 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-10T10:08:17Z
glimmerphoenix
bug
v1.1
closed
Display style math syntax not compliant with Pandoc documentation
https://github.com/quarto-dev/quarto-cli/issues/1781