Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FA] Default RTL #612

Open
Atcold opened this issue Sep 23, 2020 · 5 comments
Open

[FA] Default RTL #612

Atcold opened this issue Sep 23, 2020 · 5 comments
Assignees

Comments

@Atcold
Copy link
Owner

Atcold commented Sep 23, 2020

Farsi should default to RTL.
@ebetica can you please take care of this?

@Alireza1044
Copy link
Contributor

I've tried to apply RTL to farsi in my local repo and everything was fine except that inline math is not rendered correctly, I'm not sure if this is something that should be handled in MD file or in html.
image

@Atcold
Copy link
Owner Author

Atcold commented Sep 23, 2020

@Alireza1044 can you please check if the Arabic version looks alright?
How did you apply RTL to your local repo?
Also, please circle what's wrong and add a screenshot with the English version, so that we better understand what's going on.

@Alireza1044
Copy link
Contributor

@Atcold The Arabic translation looks right because they didn't put math expressions in $$ in their markdown files.
I changed line 12 in pytorch-Deep-Learning/docs/jekyllbook/_layouts/default.html file to apply RTL to Farsi in my local repo.
image
In the below screen shot you can see that the math expressions are messed up.
photo_2020-09-23 20 48 49

The image below is the English version. They are in the week06/06-2.md file.
Screen Shot 2020-09-23 at 20 50 54

@Atcold
Copy link
Owner Author

Atcold commented Sep 26, 2020

Then, what do you suggest? Can you figure a way to fix this locally?

@Alireza1044
Copy link
Contributor

Alireza1044 commented Sep 26, 2020

I don't know much about web developing and how to handle these things, But I think there's a way to render math expressions in LTR and the rest of the text in RTL.

As you can see below math expressions are not an exception and are rendered like the rest of the text:
image

After a slight change in the md file (the <div dir="ltr"> tag which I added before $$) to force this part to be rendered in LTR:
image

The output is like this:
image

But this trick won't work with inline math expressions (As you can see in the picture below), But I suppose there is a way to make an exception for math expressions. I think an expert in web programming should help us here.
94335850-3af8c200-ffeb-11ea-891e-1ac0c0f49921

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants