quarto-dev / quarto-dev/quarto-cli
Header gets promoted to title on jupyter kernel, when code block appears first.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
The typst format "promotes" the first subheading to a title, even when I specify no title in a document, but only if a code block comes first. If the code block comes second, it behaves as expected.
Steps to reproduce
---
format:
typst:
keep-typ: true
---
<!-- #### First Header here -->
```{python}
#| echo: false
#| output: false
print("Hello")
```
#### First Header
Text.
If #### First Header is placed after the python code block, it becomes a title. If it's placed before the code block, it remains a header. This is the diff of the typst:
331d330
< title: [First Header],
336a336,337
> = First Header
> <first-header>
Actual behavior
The first subsection header becomes the title.
Expected behavior
There should be no title, the subsection header should remain a subsection header.
Your environment
- IDE: Neovim
- Fedora 42
Quarto check output
Quarto 99.9.9
[✓] Checking environment information...
Quarto cache location: /home/wojtek/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: a7d8b6a794780a80df3728c94b4aaaa8299adb85
Path: /home/wojtek/bin/quarto-cli/package/dist/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/wojtek/.TinyTeX/bin/x86_64-linux
Version: 2025
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.5.0
Path: /opt/R/4.5.0/lib64/R
LibPaths:
- /home/wojtek/.local/share/R/x86_64-pc-linux-gnu-library/4.5
- /opt/R/4.5.0/lib64/R/library
knitr: 1.50
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.13.11
Path: /usr/bin/python3
Jupyter: 5.7.2
Kernels: python3, julia-1.11
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided Quarto Markdown example using the typst format and a Python code block first. Compare the generated Typst output with the shown diff, then trace the heading and title handling involved in that render path. Done means the heading remains a subsection and no title is emitted when the document has no title.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100