我使用RinohType将我的RST文件生成为PDF。
我试图了解如何在PDF中为我的标志和其他元素提供自定义样式。
我觉得默认匹配器中的解释并没有给出如何做到这一点的例子。
conf.py
rinoh_documents = [dict(doc='index', # top-level file (index.rst)
target='manual',
template='rinohtype.rtt',
logo='_static/rr-logo-vertical2022-1100px-transp.png')]rhinotype.rtt
[TEMPLATE_CONFIGURATION]
name = my article configuration
template = article
stylesheet = my_stylesheet.rts
parts =
title
;front_matter
contents
language = fr
abstract_location = title
[SectionTitles]
contents = 'Contents'
[AdmonitionTitles]
caution = 'Careful!'
warning = 'Please be warned'
[VARIABLES]
paper_size = A5
[title]
page_number_format = lowercase roman
end_at_page = left
[contents]
page_number_format = number
[title_page]
top_margin = 2cmmy_stylesheet.rts
在这里,我试图改变我的标志在PDF中的宽度。在这里给出css属性的正确方法是什么。
width: 100px发布于 2022-06-21 14:55:36
默认匹配器定义标题页徽标样式。要调整此元素的样式,您可以创建在此基础上的样式表默认的狮身人面像样式表并调整标题页徽标样式:
[STYLESHEET]
name=My Style Sheet
description=My tweaks to the Sphinx style sheet
base=sphinx
[title page logo]
width = 4cm此样式接受FlowableStyle样式属性。在链接的文档中,可以看到width属性支持一组单元,但不支持px。
请继续关注以获得更好的文档。那个地区发生了什么事!
如果您想要对文档的样式进行更多的更改,那么样式日志对于找出哪个样式名称对应于特定的文档元素非常有用。
https://stackoverflow.com/questions/72695374
复制相似问题