在sphinx中的交叉引用是使用ref完成的,如下所示:
.. _my-reference-label:
Section to cross-reference
--------------------------
This is the text of the section.
It refers to the section itself, see :ref:`my-reference-label`.当编译成HTML时,上面会在"see“之后引入一个超链接,但也会将其嵌入到<em>标记中,使内部引用看起来与外部超链接不同。
有没有办法指示sphinx不要强调内部引用,也就是说,不要将它们嵌入到<em>标记中?
发布于 2014-01-18 08:55:20
您可以在CSS文件中添加一行:
a.internal {font-style: normal}为了让Sphinx使用定制的CSS文件,您需要编辑conf.py
html_style = 'my_style.css'然后将文件放入_static目录中,或者放入您用html_static_path声明的任何目录中。
那么my_style.css可能看起来像这样:
@import url("default.css"); /* This should be the file used by your theme */
/* Internal links */
a.internal {font-style: normal}这不会去掉周围的<em>标记,但应该可以正确地设置文档的样式。
发布于 2013-12-14 18:28:42
您可以编写自己的theme和template来完成此任务。
https://stackoverflow.com/questions/20578101
复制相似问题