RST Sphinx - 添加超链接到内部图像
RST Sphinx - add hyperlink to internal image
如何在 sphinx 的 RST 中添加指向内部图像的超链接?
我想要这样的东西:
Examples: 1, 2, 3, 4, 5
然后当我点击 1 时,我希望它移动到 imgs/1.png 等。
我试图使用 ::image: imgs/1.png
但它只是渲染图片,然后当我尝试:
Examples: 1_
:: _1: ../_images/1.png
它不会复制图片,那么我该如何将它们结合起来呢?所以我得到了一张可以用作超链接的复制图像?
如果我没理解错你的问题,你想点击1
,网络浏览器会跳转到引用的图片。
首先使用 name
属性设置目标。
.. image:: ../_images/1.png
:name: 1
.. image:: ../_images/2.png
:name: 2
然后引用目标。
Examples: `1`_, `2`_
如何在 sphinx 的 RST 中添加指向内部图像的超链接? 我想要这样的东西:
Examples: 1, 2, 3, 4, 5
然后当我点击 1 时,我希望它移动到 imgs/1.png 等。
我试图使用 ::image: imgs/1.png
但它只是渲染图片,然后当我尝试:
Examples: 1_
:: _1: ../_images/1.png
它不会复制图片,那么我该如何将它们结合起来呢?所以我得到了一张可以用作超链接的复制图像?
如果我没理解错你的问题,你想点击1
,网络浏览器会跳转到引用的图片。
首先使用 name
属性设置目标。
.. image:: ../_images/1.png
:name: 1
.. image:: ../_images/2.png
:name: 2
然后引用目标。
Examples: `1`_, `2`_