-
Notifications
You must be signed in to change notification settings - Fork 130
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
Parse <img> tags #438
Parse <img> tags #438
Conversation
Hi @mgeier - an unusual quirk of this feature is that when an I guess it seemed reasonable for Do you have any thoughts on how we could/should handle that better? |
Thanks for the report @jayaddison! But doesn't that sound more like a bug in
Maybe it seemed reasonable to someone, but it isn't.
Definitely not. Maybe related: #500, #162, jgm/pandoc#6194 |
You're welcome @mgeier - thanks for the considered response.
Yep, People are capable of making the most of the info provided to them - but UUIDs are -- by-design -- low-information, while human-language labels are likely (hopefully) to be more meaningful. Are |
Exactly.
They might be more meaningful, but that doesn't necessarily mean that they are suitable as
Yes, Markdown cells are processed with Pandoc via nbsphinx/src/nbsphinx/__init__.py Line 180 in 6145052
... which is defined here: nbsphinx/src/nbsphinx/__init__.py Line 959 in 6145052
The Markdown cells are converted to reST, which is then parsed by The intermediate reST document for |38d18b0a1469490f86f4570a48f1693d|
...
.. |38d18b0a1469490f86f4570a48f1693d| image:: images/notebook_icon.png
:width: 300
:class: no-scaled-link With |0689d12a29f54e41a224a6998da89e99|
...
.. |0689d12a29f54e41a224a6998da89e99| image:: images/notebook_icon.png
:alt: Jupyter notebook icon
:width: 300
:class: no-scaled-link |
Thanks @mgeier - yep, I agree with your assessment, and the illustrative examples of the intermediate rST format look correct too.
I've been wondering about -- but haven't yet confirmed -- two ways to do this on the |
That might be very problematic! The important thing to know is that
A non-existing Therefore,
Yes, as I said above (#438 (comment)), the only reasonable fallback is to completely omit the |
Thank you @mgeier - I wasn't previously aware of the meaning of an empty-string |
I began looking at It seems that the In particular: the logic that only sends an |
Nope, ignore that; the test coverage of In any case: I'll try to develop a |
Mailing list discussion/question opened here: https://sourceforge.net/p/docutils/mailman/message/58746996/ |
Thanks for taking care of this! Let's hope for a positive response. |
Sadly, with the current Pandoc-based implementation I couldn't make the
align
attribute work. I had to use "inline" images (because Pandoc stores the<img>
tag in aRawInline
object), but:align:
is not supported in reST for inline images.This fixes (at least partially) #52, #284, #437 and probably #321.
Rendered HTML: https://208-210404706-gh.circle-artifacts.com/0/html/markdown-cells.html#Using-the-HTML-%3Cimg%3E-tag
Rendered PDF: https://208-210404706-gh.circle-artifacts.com/0/nbsphinx.pdf#subsubsection.3.5.1
And rendered HTML on RTD: https://nbsphinx--438.org.readthedocs.build/en/438/markdown-cells.html#Using-the-HTML-%3Cimg%3E-tag