如何移除rinohtype生成的Sphinx PDF文档首页水平线?
移除Sphinx PDF首页水平线的解决方法
针对你当前使用的Sphinx样式表,要移除或修改首页(标题页)的水平线,可尝试以下两种方案:
方案一:直接隐藏水平线
在你的样式表中新增[title page separator]配置块,设置hide=true即可完全隐藏水平线:
[STYLESHEET] name=MyStyle base=sphinx [object description] label_max_width=10pt [title page title] typeface=$(sans_typeface) font_size=20pt font_color=#000 text_align=right space_above=0pt [title page author] hide=true typeface=$(sans_typeface) font_weight=bold font_size=17pt text_align=right space_above=110pt [title page separator] hide=true
方案二:修改水平线样式
若不想完全隐藏,仅调整颜色、粗细等属性,可在[title page separator]中配置对应参数:
[title page separator] line_color=#cccccc # 自定义水平线颜色 line_thickness=1pt # 调整水平线粗细 space_above=10pt # 调整水平线与上方内容的间距 space_below=10pt # 调整水平线与下方内容的间距
Sphinx的PDF标题页水平线由title page separator配置项控制,默认处于显示状态,通过新增该配置块即可覆盖默认行为,实现隐藏或样式修改。
内容的提问来源于stack exchange,提问作者TheKingOfRandom
相关产品推荐
相关产品推荐

