Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-22-2022, 09:20 AM   #1
tcmoon
Connoisseur
tcmoon is on a distinguished road
 
Posts: 51
Karma: 53
Join Date: Oct 2007
Device: slate pc
RTL alternate lines

I’m basically looking for a way to RTL every other line.

I want to be able to read in a LTR-RTL-LTR ect..

Any help would be appreciated.
tcmoon is offline   Reply With Quote
Old 10-22-2022, 09:55 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,353
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
That's pretty easily done with css by setting the direction:rtl for a particular line.

There are some caveats:
- you can only designate a paragraph, div, or table row, etc. as rtl. You can't designate a particular line as rtl if the paragraph spans more than one line. And you can't know how many lines a paragraph will use with a reflowable epub especially when the user can change font size, margin size, and orientation (landscape/portrait)

- some devices might not support the css so you would have to play around with which one works. Attached are two different ways you can try...personally I prefer the nth-child method but your device may not support it.
Attached Thumbnails
Click image for larger version

Name:	cap1.png
Views:	110
Size:	273.0 KB
ID:	197308   Click image for larger version

Name:	cap2.png
Views:	107
Size:	279.2 KB
ID:	197309  

Last edited by Turtle91; 10-22-2022 at 09:59 AM.
Turtle91 is offline   Reply With Quote
Advert
Old 10-22-2022, 10:12 AM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,353
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I just noticed the latin words were not actually RTL. To achieve that (for a non-rtl language) you would need to add the unicode-bidi element (see attached).
Attached Thumbnails
Click image for larger version

Name:	cap3.png
Views:	107
Size:	284.5 KB
ID:	197310  
Turtle91 is offline   Reply With Quote
Old 10-22-2022, 06:34 PM   #4
tcmoon
Connoisseur
tcmoon is on a distinguished road
 
Posts: 51
Karma: 53
Join Date: Oct 2007
Device: slate pc
Quote:
Originally Posted by Turtle91 View Post
I just noticed the latin words were not actually RTL. To achieve that (for a non-rtl language) you would need to add the unicode-bidi element (see attached).
Thank you for the reply.
tcmoon is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB to PDF: hyperlinks that span lines make all of both lines clickable metallserge Conversion 4 09-23-2021 06:39 AM
RTL recipes TalSO Recipes 11 07-31-2018 08:14 AM
PRS-T2 RTL for PRS-T2 theagalingo Sony Reader Dev Corner 0 11-13-2013 01:21 AM
Highlighting alternate lines in library view BeccaPrice Calibre 3 01-16-2012 04:57 PM
Touch Dark lines between lines of text taming Kobo Reader 12 06-13-2011 07:20 PM


All times are GMT -4. The time now is 05:47 PM.


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