问题描述
所以有很多关于在降价中创建锚点以及在笔记本中创建内部目录类型锚点的内容。我需要的是能够从外部来源访问Github上的笔记本中的锚点,例如:
So there is a lot out there about creating anchors in markdown, and creating internal table-of-contents-type anchors in a notebook. What I need though is the ability to access an anchor in my notebook on Github from an external source, e.g.:
https://github.com/.../mynotebook.ipynb#thiscell
我有一些以这种方式托管的交互式教程,以及我希望能够链接到笔记本的各个部分的单个手册。我可以使用以下方式将定位标记添加到降价单元中:
I've got a number of interactive tutorials hosted this way, and a single manual that I want to be able to link to sections of the notebooks for. I can add the anchor tags into markdown cells just fine, using:
<a id='thiscell'></a>
但是当我尝试使用上面写的链接时,它只是将笔记本加载到顶部,就好像没有引用锚点一样。
but when I try using the link as I wrote above, it just loads the notebook at the top, as if there was no reference to an anchor.
推荐答案
我有同样的问题。作为解决方法,我已将笔记本的呈现委托给。这只是提供其GitHub 公共 url并点击Go!
I had the same problem. As a workaround, I have delegated the rendering of my notebook to http://nbviewer.jupyter.org. It's just a matter of providing its GitHub public url and clicking Go!
当然,内部链接在GitHub下仍然不起作用,但我现在已经在网络上的某个地方运行了一个功能正常的笔记本电脑,这正是我真正想要的。
Of course, the internal links still don't work under GitHub, but I have now a functioning notebook somewhere on the web, which is what I actually wanted in the first place.
我希望这也适用于您的情况。
I hope this applies to your case too.
这篇关于Github上的Jupyter笔记本中的HTML锚点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!