Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2020, 05:35 PM   #1
GarbageGhost
Junior Member
GarbageGhost began at the beginning.
 
GarbageGhost's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite 4
Right to Left Languages

Hello,
For languages reading from right to left, is it possible to edit the direction the book reads? It was a PDF I converted to AZW3, so it initially read from up to down, which wasn't as disorienting as it is to now turn from left to right, and read from right to left.
I tried adding the following line of css:

extra_css="body {direction: rtl;}"

But the pages still turn from left to right in both AZW3 and ePub. My experience with css is next to none, so it’s possible I am just making an error.
I also apologize, because I posted yesterday in the wrong thread.
Any help with this would be much appreciated!
GarbageGhost is offline   Reply With Quote
Old 04-28-2020, 10:00 PM   #2
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,552
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
For Kindle books to change pages in the RTL direction should put the following in the OPF metadata:

<meta name="primary-writing-mode" content="horizontal-rl"/>
jhowell is offline   Reply With Quote
Advert
Old 05-03-2020, 03:52 PM   #3
GarbageGhost
Junior Member
GarbageGhost began at the beginning.
 
GarbageGhost's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite 4
Quote:
Originally Posted by jhowell View Post
For Kindle books to change pages in the RTL direction should put the following in the OPF metadata:

<meta name="primary-writing-mode" content="horizontal-rl"/>
Thank you for taking the time to respond! When I open the metadata edit screen, this is what I am greeted with:

Click image for larger version

Name:	BsbBE1A.jpg
Views:	1159
Size:	358.3 KB
ID:	179080

Where do I go to add this line?
Thank you again.

Last edited by pdurrant; 05-04-2020 at 06:28 AM.
GarbageGhost is offline   Reply With Quote
Old 05-04-2020, 08:35 AM   #4
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,552
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by GarbageGhost View Post
Where do I go to add this line?
It goes in the OPF, an XML file within the EPUB that contains metadata. It can be accessed using the "Edit book" function in calibre. (If you don't know what any of that means you will need to do some research.)
jhowell is offline   Reply With Quote
Old 05-12-2020, 02:50 AM   #5
GarbageGhost
Junior Member
GarbageGhost began at the beginning.
 
GarbageGhost's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite 4
Quote:
Originally Posted by jhowell View Post
It goes in the OPF, an XML file within the EPUB that contains metadata. It can be accessed using the "Edit book" function in calibre. (If you don't know what any of that means you will need to do some research.)
I did my research and even compared it with some other texts that read from right to left, and thought I did everything right, but it still reads from left to right. Please help point out my error?
GarbageGhost is offline   Reply With Quote
Advert
Old 05-12-2020, 08:14 AM   #6
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,552
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by GarbageGhost View Post
Please help point out my error?
Your image shows the primary-writing mode being set to horizontal-lr. It needs to be horizontal-rl instead. ("rl" means right-to-left in this case.)
jhowell is offline   Reply With Quote
Old 05-12-2020, 10:32 PM   #7
GarbageGhost
Junior Member
GarbageGhost began at the beginning.
 
GarbageGhost's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite 4
Quote:
Originally Posted by jhowell View Post
Your image shows the primary-writing mode being set to horizontal-lr. It needs to be horizontal-rl instead. ("rl" means right-to-left in this case.)
Shoot, that is my bad. I attached the wrong screenshot. This should be the correct one. It still reads from left to right with the following line. Thank you for your continued patience.

GarbageGhost is offline   Reply With Quote
Old 05-13-2020, 03:47 PM   #8
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,552
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
The only other thing I can think of to try is set the page-progression-direction.

To do that, if your spine element in the OPF is:

<spine toc="ncx">

Change it to:

<spine toc="ncx" page-progression-direction="rtl">

If that does not work then I am out of ideas.


(Based on your original statement, "But the pages still turn from left to right", this is all about changing the page turn direction so that you can tap the left side of the screen to advance and the right side to go back. This metadata has nothing to do with the direction of text on individual pages.

And just to verify: You are trying this out on your Kindle? I don't think that calibre's e-book reader pays attention to reversed page turn direction in books.)

Last edited by jhowell; 05-13-2020 at 04:24 PM.
jhowell is offline   Reply With Quote
Old 05-13-2020, 04:30 PM   #9
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,605
Karma: 23165369
Join Date: Dec 2010
Device: Kindle PW2
The World Wide Web Consortium recommends using dedicated bidi markup to describe RTL content, where markup is available and epub books with RTL styles will fail EPUBCheck.

For example,

Code:
body {direction: rtl;}
will trigger the following EPUBCheck error message:

Code:
ERROR(CSS-001): The 'direction' property must not be included in an EPUB Style Sheet.
@GarbageGhost
Try replacing all <body> tags with <body dir="rtl"> tags.
Doitsu is offline   Reply With Quote
Old 05-14-2020, 03:21 AM   #10
GarbageGhost
Junior Member
GarbageGhost began at the beginning.
 
GarbageGhost's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite 4
@jhowell this did the trick! Thanks for your help!

@Doitsu thank you for also being there for this!
GarbageGhost is offline   Reply With Quote
Old 10-19-2022, 10:53 AM   #11
tsouron
Junior Member
tsouron began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Device: Kindle paperwhite
Right to left direction

Hi, i knwo this thread is kinf of old,

would you mind sharing with me what script did the trick for you and where should i be insering it?

Thanks a lot!
tsouron is offline   Reply With Quote
Old 10-19-2022, 11:51 AM   #12
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,605
Karma: 23165369
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by tsouron View Post
would you mind sharing with me what script did the trick for you and where should i be insering it?
You'll have to be more specific. For example, .mobi files don't support RTL at all and .azw3 files have only limited RTL support.
Please provide a short HTML excerpt and a screenshot of the rendering isssue(s).
Doitsu is offline   Reply With Quote
Old 10-19-2022, 01:01 PM   #13
tsouron
Junior Member
tsouron began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Device: Kindle paperwhite
Right to left direction

Hi, Thanks for helping here.
im trying to work with a hebrew text which goes from right to left.
i followed the instructions on the thread and in the OPF file i changed the following:
<spine toc="ncx" page-progression-direction="rtl">
it didnt seem to work for me.
please see screenshot below.

Thank you!
Click image for larger version

Name:	Screenshot 2022-10-19 130018.png
Views:	299
Size:	376.5 KB
ID:	197266
tsouron is offline   Reply With Quote
Old 10-19-2022, 01:39 PM   #14
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,605
Karma: 23165369
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by tsouron View Post
it didnt seem to work for me.
  1. What exactly is your problem?
  2. Do all <html> or <body> tags have dir="rtl" attributes?
    For example: <html dir="rtl" lang="he">
Doitsu is offline   Reply With Quote
Old 10-19-2022, 09:55 PM   #15
tsouron
Junior Member
tsouron began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Device: Kindle paperwhite
Im trying to have the text to show from right to left.
In addition the text is revesible, Every single word is spelled backwards.
is there a way to change it?
tsouron is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File names in Right to left languages doron KOReader 2 04-03-2018 05:04 PM
different languages vdem Introduce Yourself 5 12-04-2011 02:39 PM
Languages That Can Be Used Nathan Campos Kindle Developer's Corner 3 11-09-2010 04:51 PM
Calibre support for Right-to-Left languages kiklop74 Calibre 7 04-11-2009 02:02 PM
Other languages? irishjew Sony Reader 2 07-17-2007 03:30 PM


All times are GMT -4. The time now is 01:23 AM.


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