我可以从Jupyter笔记本电脑中引用Sphinx中的一个部分吗?

发布于 2025-02-06 01:15:38 字数 733 浏览 1 评论 0原文

我在文档目录的顶部有自动化的API文档,并且在笔记本 subdirectory中的笔记本中有这样的笔记本:

/src
  /mypkg
    -- modname.py
/docs
  -- index.rst  # includes mynotebook.ipyx
  -- mypkg.mymod.rst  # autogenerated
  /notebooks
    -- mynotebook.ipyx

在sphinx中,对modName的引用可能会如下:

See also the :py:mod:`mypkg.modname` documentation.

我的问题是:我如何进行参考在笔记本电脑中链接回模块的API文档?

我知道似乎用这种语法解决了这个问题:

[link text](mypkg.mymod.rst#mymod.modname)

在我的情况下,这只是返回“未找到文件”。我尝试添加..

我该如何?

I have autogenerated API docs at the top of my docs directory and a notebook in the notebooks subdirectory like this:

/src
  /mypkg
    -- modname.py
/docs
  -- index.rst  # includes mynotebook.ipyx
  -- mypkg.mymod.rst  # autogenerated
  /notebooks
    -- mynotebook.ipyx

In sphinx a reference to modname might look like this:

See also the :py:mod:`mypkg.modname` documentation.

My question is: how can I make a reference inside the notebook that links back to API docs for the module?

I am aware of this question which seemingly addressed the question with this syntax:

[link text](mypkg.mymod.rst#mymod.modname)

In my case, this just returns a "file is not found". I've tried adding ..

How do I this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文