我有一个使用wp2rst(使用pandoc)从Wordpress导入的.rst文档。
在导入过程中,我的所有图片都被翻译成了替代的.. image::
:
This is some text |myimage| followed by some more text
.. |myimage| image:: https://myiage.png
:class:alignnone size-full wp-image-1864
:width: 1075px
:height: 135px
我的图片最初有字幕。所以我试过这样的事情:
This is some text |myimage| followed by some more text
.. |myimage| figure:: https://myimage.png
:class:alignnone size-full wp-image-1864
:width: 1075px
:height: 135px
This is my figure's caption
运行Sphinx时出现以下错误:
警告:替换定义“myimage”为空或无效。
以更传统的方式处理数字效果很好,但这需要我重新整理
This is some text
.. figure:: https://myimage.png
:class:alignnone size-full wp-image-1864
:width: 1075px
:height: 135px
This is my figure's caption
followed by some more text
有没有办法像.. figure::
一样创建.. image::
的替代品?