RTL support in Python Sphinx

无人久伴 提交于 2019-12-05 17:43:02

问题


Is there a way to use RTL (Right to left, like farsi, arabic, ...) text in sphinx ?

When generating html from .rst files, the generated html is LTR(Left to right by default) and aligned left, and my question is how I can change it, and make it RTL, and be aligned right.

Thanks for your reply.


回答1:


You can check python's docutils FAQ. It explains how to use css and classes to mark text direction.




回答2:


As mentioned in this answer you can use css. In put a text in center and Right to left numbering problem, I mentioned that you can use class names like rtl and ltr for changing the direction of texts. My website is powered by Nikola. My Persian gitlab guidance project is simpler and more readable. Specially farsi.css and the last line of README.rst may be more helpfull.




回答3:


you can try Minoo theme which supports RTL languages like Persian.



来源:https://stackoverflow.com/questions/12661206/rtl-support-in-python-sphinx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!