16

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.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Ocean
  • 2,882
  • 1
  • 18
  • 21

3 Answers3

5

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

barracel
  • 1,831
  • 13
  • 24
4

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

Mehdi Alisoltani
  • 349
  • 3
  • 13
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.

Ahmad Yoosofan
  • 961
  • 12
  • 21