Quote:
Originally Posted by d351r3d
I was wondering how I'd be able to make just the Arabic text RTL by using CSS or some other means that would work in an epub because no one seems to have covered this exact topic or an exact solution.
|
The World Wide Web Consortium
recommends using dedicated bidi markup to describe RTL content, where markup is available. BTW, the IDPF adopted this position, and epub books with RTL styles will fail EPUBCheck.
Since you can't
assign dir="rtl" attributes to control the alignment inline tags such as
<span>, you'll have to use
<p> tags (or other
block level tags). For example:
Code:
<h3>2:25</h3>
<p dir="rtl">وَبَشِّرِ الَّذِينَ آمَنُوا وَعَمِلُوا الصَّالِحَاتِ أَنَّ لَهُمْ جَنَّاتٍ تَجْرِي مِن تَحْتِهَا الْأَنْهَارُ ۖ كُلَّمَا رُزِقُوا مِنْهَا مِن ثَمَرَةٍ رِّزْقًا ۙ قَالُوا هَٰذَا الَّذِي رُزِقْنَا مِن قَبْلُ ۖ وَأُتُوا بِهِ مُتَشَابِهًا ۖ وَلَهُمْ فِيهَا أَزْوَاجٌ مُّطَهَّرَةٌ ۖ وَهُمْ فِيهَا خَالِدُونَ</p>
<p>And give good tidings to those who believe and do righteous deeds that they will have gardens [in Paradise] beneath which rivers flow. Whenever they are provided with a provision of fruit therefrom, they will say, "This is what we were provided with before." And it is given to them in likeness. And they will have therein purified spouses, and they will abide therein eternally.</p>
I'd also recommend using h1..h6 tags for the surah numbers. This'll simplify generating the TOC once you're done with the Qur'an.
Note also that very few epub
3 readers/apps actually support RTL text. (AFAIK, there's isn't a single epub
2 app that supports RTL text.)
I.e., you might want to create an epub3 book or convert your book to an epub3 book once you're done.