jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.75k stars 569 forks source link

asciidoc template is not using correct format for images #916

Open josh-gree opened 6 years ago

josh-gree commented 6 years ago

The current asciidoc template is not using the correct syntax for images. As can be seen https://github.com/jupyter/nbconvert/blob/eb3b0a74436d37e6534f2a35dd4879f6cdb43a5e/nbconvert/templates/asciidoc.tpl#L60-L62

The PNG (and other image formats) seem to be using markdown syntax.

The actual syntax should be:

image::sunset.jpg[]

Where the filename is automatically prefixed by an imagedir path which should be set as a document attribute.

TorbjornT commented 1 year ago

I just noticed this when testing an Asciidoc export of a notebook from Jupyter Lab. I also got the image syntax in a block, e.g.

----
![png](filename.png)
----

Isn't that wrong as well, in that you get the literal code in the document, instead of the image?