-
Notifications
You must be signed in to change notification settings - Fork 132
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
hyperlinks in jupyter notebook are missing when converted to html with nbsphinx+sphinx #468
Comments
HTML-style hyperlinks are currently not supported by You can use one of these instead:
|
Why is this the case, when regular Markdown supports html tags like From the documentation Maybe these parts of the documentation should be clarified if certain html tags are stripped. |
Simply because nobody has implemented it yet. This is quite easy to implement if you just want to simply convert Markdown to HTML and nothing else. In the case of Raw HTML snippets which are just passed through will be missing in the LaTeX output. There are already two special cases implemented which also work with LaTeX output: Theoretically, a third special case for
I guess this could be implemented. Do you want to make a PR?
I guess they get lost in the conversion from Markdown to reStructuredText. I think they are swallowed by In the long term, I'd like to avoid the intermediate reStructuredText representation (and the use of
OK, that's strange, that's probably an artifact caused by the use of the various tools mentioned above.
You can write something like this in your Markdown cell:
The Alternatively, you could try if MyST-NB handles this situation more to your liking. You can also try RunNotebook (which uses a more direct Markdown-to-HTML conversion) or any of the alternatives mentioned in https://nbsphinx.readthedocs.io/en/0.7.0/links.html.
Yes, definitely, the documentation is missing some important information here! Would you like to make a PR to fix this? |
I will look into |
Not sure if that might be out-of-scope for this issue, but my original use-case for :class:`.SomeClass` And my specific problem was that I could not replicate the `.SomeClass`{.interpreted-text role="class"} This won't be nicely displayed in a notebook, but that would have been a long shot either way. I think the documentation should more clearly say that Markdown cells are treated as Interestingly enough, any If I'm not mistaken, one could even add autodoc using the following: <div class="automodule" data-members="" data-undoc-members="" data-show-inheritance="">
some_module.submodule
</div> |
Yes, I think
The Lines 1362 to 1366 in 992d555
The Then there is some special handling for citations ans You can check
Note that for (future) CommonMark compatibility, blank lines should be used inside the
vs.
That would be great!
I don't know, probably not.
My work-around for This is of course not as simple as
I would prefer not mentioning I think it would be better to mention a few tags that work (e.g. This way we are open for future changes in behavior.
The raw But all other
You mean instead of using the Why not just use a raw reST cell (or a separate reST source file) for that? |
My use of a markdown cell is usually just a mixture of plain text, HTML tags, images and Latex code, |
I don't know. Probably. How would you modify them? |
I saw that workaround, unfortunately it does not replicate the styling that is applied when linking to domain objects in sphinx. Functionally it does the same though, so it is a solution. |
Yeah, I know, the problem is that reST doesn't allow nested markup, see #301. |
I use
sphinx
withnbsphinx
to generate HTML files from Jupyter Notebook files. But hyperlinks in the notebook doesn't show up in the converted html file. More preciselyindex.ipynb
which contains an cell with html-style hyperlink<a href="https://google.com">Google</a>
to the Google website.sphinx
commandmake html
withnbsphinx
as an extension to generate the documentationindex.html
, the hyperlink turns into un-formated text, namely only the plain textGoogle
appear in the source code ofindex.html
, the hyperlink<a href="https://www.google.com"></a>
part just disappears.Does
nbsphinx
keep the hyperlinks in the notebook when used in sphinx as an extension?The text was updated successfully, but these errors were encountered: