以下reST无法按预期工作。我该怎么办?
Only the word python_ in this text is linked. What to do if
I want using other words such as `like it <python_>`_ to jump
to the same link?
.. _python: http://www.python.org
谢谢你的帮助!
在tetella
就我能够阅读而言,这不是一个真正有据可查,但OP的方法应该有效。我在cygwin上用rst2html.py(v 0.11)和Sphinx(v 1.2b1)测试了以下输入。两者都生成到CNN站点的正确超链接。
* According to `CNN <http://www.cnn.com/>`_ the economy...
* According to `The Amazing Cable News Network`_ the economy...
* According to the `Cable News Network <CNN_>`_ the economy...
.. _The Amazing Cable News Network: CNN_
.. CNN: http://www.cnn.com/
第二种形式是由@Ajay提出的,虽然我不得不创建另一个别名来获取你想要的文本,但是第三种形式似乎是OP正在寻找的东西,据我所知它是有效的精细。第三种形式也适用于文档中的内部链接。