mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Bibliography section becomes code #1161

Closed matthew-brett closed 11 months ago

matthew-brett commented 1 year ago

This is really to ask for advice about a problem I have with jupyter-book files.

For some files, I want to list ciations. The obvious way to do this, is to include a version of this Markdown cell at the end of the page (RMarkdown format) - see https://jupyterbook.org/en/stable/content/citations.html#local-bibliographies

```{bibliography}
```

However, Jupytext interprets this text as a code cell of language bibliography, so running jupytext --to Rmd on a file with this cell, results in:

```{bibliography language="bibliography"}

```

In the notebook interface, this also appears as a code cell.

Do you have any advice for avoiding this behavior?

Thanks as ever.

mwouts commented 1 year ago

Hi @matthew-brett , thank you for the bug report! Should be easy to fix, I will have a look when time permits.

mwouts commented 11 months ago

Reopening because I am not completely sure that the fix committed yesterday will work if a code cell happens to be placed after the bibliography section.