You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If title is not explicitly set in the yaml frontmatter, the heading immediately following an executable code block (i.e., ```{python}) is used as the title of the document. This bug does not happen when the code block is not executable (i.e., ```python).
Steps to reproduce
Input
Output
---format: typst---# This is what happens when I don't set the title.## This is a level 2 heading
This is some paragraph text.
```{python}# This is an executable Python code block.print("This is the output of an executable Python code block.")```## This is another level 2 heading
This is some more paragraph text.
Actual behavior
No response
Expected behavior
Input
Output
---format: typsttitle: Title---# This is what happens when I set the title.## This is a level 2 heading
This is some paragraph text.
```{python}# This is an executable Python code block.print("This is the output of an executable Python code block.")```## This is another level 2 heading
This is some more paragraph text.
Your environment
IDE: VSCode 1.98.2
OS: Linux Pop!_OS 22.04
Quarto check output
Quarto 1.6.42
[✓] Checking environment information...
Quarto cache location: /home/jj/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.42
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.1
Path: /home/jj/Desktop/quarto_bug/.venv/bin/python3
Jupyter: 5.7.2
Kernels: python3, coconut_py, coconut, coconut_py2, xonsh, coconut_py3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.3
Path: /usr/lib/R
LibPaths:
- /home/jj/R/x86_64-pc-linux-gnu-library/4.4
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.49
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered:
The bug happens with a combination of the following characteristics of an .ipynb file to be converted to .qmd:
a single markdown cell has metadata but not title
that same single markdown cell has an H1 heading with the implicit title
a different markdown cell has an H2 heading
What happens here, I think, is that if the code for title detection finds a YAML block, then it takes the lack of a title: field in that block to mean that the implicit title is not present in the entire cell. Then, the code searches for the next implicit title, which is the H2 heading two cells down.
Bug description
If
title
is not explicitly set in the yaml frontmatter, the heading immediately following an executable code block (i.e.,```{python}
) is used as the title of the document. This bug does not happen when the code block is not executable (i.e.,```python
).Steps to reproduce
Actual behavior
No response
Expected behavior
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: