Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-13-2015, 11:18 AM   #1
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Formatting Arabic text to read right to left

I have seen some where posts where this is accomplished by adding to the CSS stylesheet something like:

p.arabic {
}
direction:rtl;
}
The trouble is when I try to validate the file, I get the error message : The 'direction' property must not be included in an EPUB Style Sheet. I am unable to put dir="rtl" in the body tag of the html pages, as I have mixed English and Arabic paras in each document.

Could anyone help me with this?
verydeepwater is offline   Reply With Quote
Old 03-13-2015, 12:39 PM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
What device do you intend to read your books on? It's worth noting that Adobe Digital Editions, which forms the basis of the ePub renderer found in the majority of eInk readers, does not currently support right-to-left languages such as Arabic and Hebrew.
HarryT is offline   Reply With Quote
Advert
Old 03-13-2015, 12:54 PM   #3
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
dir="rtl" or dir="ltr" is the correct form of telling the device of the text direction in an EPUB3. In EPUB2 you should use CSS rule "direction:rtl;".

You should use the dir="rtl" attribute if the majority of the text on that page is in Arabic, for all the English paragraphs you add dir="ltr". e.g.

PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="ar" xml:lang="ar">

...
<
class="test"> &#1575;لأَبْجَدِيَّة العَرَبِيَّة‎</p>
<class="test"> &#1575;لأَبْجَدِيَّة العَرَبِيَّة‎</p>
<class="test"> &#1575;لأَبْجَدِيَّة العَرَبِيَّة‎</p>
<class="test2" dir="ltr">Hello world!</p>
<
class="test2" dir="ltr">Hello world2</p
This will validate perfectly and work on all EPUB3 supporting devices.
odedta is offline   Reply With Quote
Old 03-13-2015, 12:56 PM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by odedta View Post
This will validate perfectly and work on all EPUB3 supporting devices.
... hence the reason I asked the OP what device he's aiming his text at. ePub3 renderers are still something of a rarity.
HarryT is offline   Reply With Quote
Old 03-13-2015, 02:10 PM   #5
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Thank you very much, Odedta. I am using EPUB 3. I was trying to add the direction rule to the stylesheet, but it looks as though I should add it to the html. The majority of the text is in English, so I should add dir="rtl" to all the Arabic paragraphs and add dir="ltr" to the <html... at the top as you have shown. And forget about the stylesheet. This is what I needed to know, thanks.


[QUOTE=odedta;3063758]dir="rtl" or dir="ltr" is the correct form of telling the device of the text direction in an EPUB3. In EPUB2 you should use CSS rule "direction:rtl;".

You should use the dir="rtl" attribute if the majority of the text on that page is in Arabic, for all the English paragraphs you add dir="ltr". e.g.

[PHP]<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="ar" xml:lang="ar">

Last edited by verydeepwater; 03-13-2015 at 02:12 PM.
verydeepwater is offline   Reply With Quote
Advert
Old 03-13-2015, 02:12 PM   #6
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Quote:
Originally Posted by HarryT View Post
... hence the reason I asked the OP what device he's aiming his text at. ePub3 renderers are still something of a rarity.
OK, so this method will not work on devices using ADE. Is there a way round this, or is this something I have to live with?
verydeepwater is offline   Reply With Quote
Old 03-13-2015, 02:30 PM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
I'm afraid there's no way around it. ADE doesn't support RTL languages at all. The Kindle, however, does (at least in its more recent "KF8" file format).
HarryT is offline   Reply With Quote
Old 03-13-2015, 04:24 PM   #8
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
So it will work at least on Apple products, probably most kobo devices and kindles with KF8. not bad
verydeepwater is offline   Reply With Quote
Old 03-13-2015, 05:08 PM   #9
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,250
Karma: 74007256
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Um.. maybe Kobo devices using kEpub format...
PeterT is offline   Reply With Quote
Old 03-13-2015, 05:12 PM   #10
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,250
Karma: 74007256
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Addiotionaly from https://github.com/kobolabs/epub-spec
Quote:
Kobo has support for right-to-left language formatting in the following areas:
  • Kobo supports the OPF spine-level page-progression-direction attribute for right-to-left page flow
  • Kobo supports the writing-mode CSS3 property and associated elements for vertical text layouts (LTR or RTL)
  • Kobo supports the HTML5 dir attribute
  • Kobo supports ruby text*
*This support excludes the Windows 8 platform.
PeterT is offline   Reply With Quote
Old 03-14-2015, 08:46 AM   #11
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Works on Kindle (KF8), iBooks, Android, Readium, Calibre.

Support for EPUB3 will only increase in the future so I think it's good that you're aiming for an EPUB3.
odedta is offline   Reply With Quote
Old 03-14-2015, 09:25 AM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,542
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Gitden Reader supports ePub 3 and it will run on your iPad as long as it's not a 1st gen iPad.

https://itunes.apple.com/us/app/gitd...524939666?mt=8
JSWolf is offline   Reply With Quote
Reply

Tags
arabic script, direction in css, text direction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting an eBook - Left justify or Justified simonroyle General Discussions 145 07-06-2020 07:38 PM
Arabic displayed from left to right in web browsers Heba Amazon Kindle 6 02-03-2015 01:53 AM
Problem with Arabic (Right-To-Left Language) titani Calibre 1 08-21-2014 01:31 PM
Text formatting issues when creating IDs/hyperlinking text rnuss Sigil 2 09-28-2013 06:49 AM
Formatting arabic text majidkadi Sigil 4 06-24-2013 12:01 PM


All times are GMT -4. The time now is 11:30 PM.


MobileRead.com is a privately owned, operated and funded community.