-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversion from ipynb to qmd removes first text cell(s) #12042
Comments
Thanks, I can reproduce on Code
---
title: "Reproducible Quarto Document"
format: html
engine: jupyter
---
## Introduction
This is a reproducible Quarto document with references.
```{python}
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]
plt.plot(x, y)
plt.show()
```
![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
## Lipsum
{{< lipsum 1 >}}
## Conclusion
```{python}
print("Bye!")
```
The end after @fig-placeholder. It produces the following Notebook: Notebook
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: \"Reproducible Quarto Document\"\n",
"format: html\n",
"engine: jupyter\n",
"---\n",
"\n",
"## Introduction\n",
"\n",
"This is a reproducible Quarto document with references."
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"x = [1, 2, 3, 4, 5]\n",
"y = [1, 4, 9, 16, 25]\n",
"\n",
"plt.plot(x, y)\n",
"plt.show()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![An image]({{< placeholder 600 400 >}}){#fig-placeholder}\n",
"\n",
"## Lipsum\n",
"\n",
"{{< lipsum 1 >}}\n",
"\n",
"## Conclusion"
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"print(\"Bye!\")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The end after @fig-placeholder."
]
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"language": "python",
"display_name": "Python 3 (ipykernel)",
"path": "/Users/mcanouil/Projects/quarto/quarto-playground/.venv/share/jupyter/kernels/python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
} For short what is happening is that the first Jupyter cell containing YAML header and text content is not converted back as such. Only the YAML header is taken.
Side note: @MartinSchobben don't use "here" as text for links. Text used for links should be meaningful to the readers especially if they are using assistive technologies. |
Bug description
I noticed that text disappeared when converting a Jupyter Notebook to a
Quarto Notebook. It appears to only happen to text cells that occur
before the first code cell.
Steps to reproduce
To showcase this I will convert an
qmd
file to anipynb
file andback again. Check source files in this GitHub
repo.
This is the starting point:
The output
ipynb
is as expected, seehere.
Here one can see that some text is missing when I now
convert
thisback to a
qmd
file.Expected behavior
No response
Actual behavior
No response
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: