tags:

views:

24

answers:

1

Using Sphinx, I'm editing pylearn documentation content at https://bitbucket.org/omidraha/pylearn/.

All paragraphs are Right-to-Left (because of Persian language) and code samples between text, rendered incorrectly.

Generally I'm looking for a way to apply bi-directionality algorithms of unicode or microsoft on a web page.

Is there a way to set css style of codes, to be LTR inside of a RTL paragraph? if not, how could I modify sphinx source to do seperate code samples, for example in a frame or something like that?

+1  A: 

If you want to specify the direction in which the test is displayed, use the "dir" attribute. See: http://reference.sitepoint.com/html/core-attributes/dir

Ton van Lankveld
As I know, the dir attribute of a paragraph is unique. I think if I add some tex in a <span>, it will be rendered in a new line, I guess. I'll try it. thanks
Sorush Rabiee