### Bug description

I observe situations where code listings are not visible in the PDF output document.  

The `index.qmd` file listing below renders to [index.pdf](https://github.com/quarto-dev/quarto-cli/files/10292396/index.pdf).
The Python code listing is not rendered / included in the PDF.

The behavior seems to be dependent on other elements/text in the `index.qmd` file .. e.g. if I delete all text or use a smaller mermaid diagram the Python code listing is rendered correctly.

Versions:

- OS:
  - Debian GNU/Linux 11 (bullseye)
  - Linux 5.10.0-18-amd64
- quarto: 1.2.280
  - chromium: 869685
  - tinytex: v2022.12.12
- IDE
  - VS Code: 1.71.2
  - Quarto Plugin 1.59.0


This is my index.qmd file:

````md
---  
lang: en
format:
  pdf:
    documentclass: scrreprt  
    keep-tex: true
    number-sections: true
pdf-engine: pdflatex  
---

# Chapter 1

```{mermaid}
%%| echo: false
%%| label: fig-some-figure
%%| fig-cap: some caption
%%| fig-width: QUARTO_FIG_WIDTH 
%%| fig-pos: 'H'
classDiagram
class `pkg.Module`
class Realization1 {
__init__(Base)
__call__(x, **kwargs)
}
class Realization2 {
__init__(Base)
__call__(x, **kwargs)
}
class Base {
__call__(x1, x2)* ndarray
__add__(k1, k2) Base
__mul__(k1, k2) Base
}
class Child1 {
__call__(x1, x2) ndarray
}
class Child2 {
__call__(x1, x2) ndarray
}
class Child3 {
__call__(x1, x2) ndarray
}
`pkg.Module` <|-- Realization1
`pkg.Module` <|-- Realization2
`pkg.Module` <|-- Base
Base <-- Realization1
Base <-- Realization2
Base <|-- Child1
Base <|-- Child2
Base <|-- Child3
```

Lorem ipsum dolor sit amet. Et quas doloremque et quae molestias eos assumenda laudantium nam eaque numquam quo ratione iure qui repudiandae consequatur sit consequatur obcaecati. Est maiores ipsum et perferendis molestiae est debitis soluta eum maxime voluptatum ad dicta voluptate 33 inventore nostrum sit dignissimos omnis. Sit error harum et natus reprehenderit qui alias suscipit in perferendis soluta. Aut aliquam molestias qui dolor facilis qui earum ipsa ea voluptas vitae ab placeat assumenda non soluta harum et harum quia?

Et dolor numquam quo iusto repellat et animi natus est internos modi. Et voluptas possimus ad dolorum omnis qui nulla libero et similique voluptas. Rem internos dolorem et quos quas eum dolorem nisi aut odit quae et provident ipsam.

Ea excepturi quia aut nostrum voluptatum At reiciendis dolores qui quam quia. Aut alias quos est similique repellendus aut illum corrupti ut voluptatibus quis.

```{#lst-some-lst .python lst-cap="some listing"}
import numpy as np
x = np.arange(5)
print(x)
```
Lorem ipsum dolor sit amet. Et quas doloremque et quae molestias eos assumenda laudantium nam eaque numquam quo ratione iure qui repudiandae consequatur sit consequatur obcaecati. Est maiores ipsum et perferendis molestiae est debitis soluta eum maxime voluptatum ad dicta voluptate 33 inventore nostrum sit dignissimos omnis. Sit error harum et natus reprehenderit qui alias suscipit in perferendis soluta. Aut aliquam molestias qui dolor facilis qui earum ipsa ea voluptas vitae ab placeat assumenda non soluta harum et harum quia?

Et dolor numquam quo iusto repellat et animi natus est internos modi. Et voluptas possimus ad dolorum omnis qui nulla libero et similique voluptas. Rem internos dolorem et quos quas eum dolorem nisi aut odit quae et provident ipsam.

Ea excepturi quia aut nostrum voluptatum At reiciendis dolores qui quam quia. Aut alias quos est similique repellendus aut illum corrupti ut voluptatibus quis.
````




### Checklist

- [X] Please include 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] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
cscheid
2022-12-23T06:17:35Z
mamarder
bug needs-repro
closed
Code listings not visible in PDF output format
https://github.com/quarto-dev/quarto-cli/issues/3742