【发布时间】:2011-06-12 05:53:37
【问题描述】:
如何在 reStructuredText 中指定链接中设置文本格式?
具体来说,我希望从我的第一个 HTML 中生成以下 HTML:
<a href="http://docs.python.org/library/optparse.html"><tt>optparse.OptionParser</tt> documentation documentation</a>
结果应该是这样的:
其中“optparse.OptionParser”部分是固定宽度字体。
我试过了
```optparse.OptionParser`` <http://docs.python.org/library/optparse.html>`_
但是,这给了
<tt class="docutils literal">`optparse.OptionParser</tt> documentation <<a class="reference external" href="http://docs.python.org/library/optparse.html">http://docs.python.org/library/optparse.html</a>>`_
看起来像这样
``optparse.OptionParser
documentation <http://docs.python.org/library/optparse.html>\_
【问题讨论】:
标签: python-sphinx restructuredtext