Python Sphinx 中的 RTL 支持 [英] RTL support in Python Sphinx

查看:48
本文介绍了Python Sphinx 中的 RTL 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 Sphinx 中使用 RTL(从右到左,如波斯语、阿拉伯语等)文本 ?

当从 .rst 文件生成 HTML 时,生成的 HTML 是 LTR(默认情况下从左到右)并左对齐,我的问题是如何更改它,使其成为 RTL,并右对齐.

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.

推荐答案

可以查看 python 的 docutils 常见问题解答.它解释了如何使用 css 和 classes 来标记文本方向.

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

这篇关于Python Sphinx 中的 RTL 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆