2017-03-21 15 views
1

在使用Sphinx和RTD主题记录python库期间,我使用:download: Download Text <_download/the_file.pdf>角色链接了一些PDF文件以供下载,但由于某种原因导致链接如下所示:防止狮身人面像中的下载链接中的粗体文本阅读文档

下载文本

第一个字是正常的,但所有下面的话是黑体字。这只是相当烦人。有没有办法在下载链接文本中停止第二,第三等字词的粗体字?

回答

0

回答我的问题在这里...

我以前覆盖的主题风格,所以我在这里也做了同样的事情。

我添加了一个名为theme_overrides.css到_static文件夹中的狮身人面像根目录与内容的CSS文件:

/* override the bold words in download links */ 
@media screen and (min-width:767px) { 

    .rst-content code.xref { 
    /* !important prevents the common CSS stylesheets from overriding 
     this as on RTD they are loaded after this stylesheet */ 
     font-weight: inherit !important; 
    } 
} 

令我担心的是,这可能会删除加粗的字体在其他地方唯一令使用.rst-content code.xref样式。但到目前为止我还没有找到任何。

然后添加以下为狮身人面像设置的conf.py文件:

html_context = { 
    'css_files': [ 
     '_static/theme_overrides.css', # override bold download text in RTD theme 
     ], 
    } 

感谢Rackspace的文档指南上http://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html此解决方案。

相关问题