07-14-2012, 12:55 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jul 2012
Device: none
|
Some letters unique color
Hey would it be possible to make every letter A blue and G red? I've tried doing this using the CSS stylesheet or whatever it is called. Unfortunately it doesn't work. Is it possible?
Maybe using some custom font where certain letters is of a certain color? Thank you very much. |
07-14-2012, 01:11 PM | #2 | |
Well trained by Cats
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
CSS: .firstRed {font-color: red; } .firstBlue { font-color: blue; } Now you modify the code <p class="whatever"><span class="firstRed">G</span>o to the end</p> <p class="whatever"><span class="firstBlue">A</span>nother example</p> |
|
Advert | |
|
07-14-2012, 04:06 PM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jul 2012
Device: none
|
I'm sorry but I've no idea what you're trying to say.
I looked into Sigil and it seems like if I want the letters A and G to be of a certain color - I'll have to edit every word in every book manually. Is that so? |
07-14-2012, 04:37 PM | #4 |
Evangelist
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
It's pretty easy with regex, however the flavour (PCRE) used in Sigil makes it a bit trickier than it needs to be
This is a simple way to do it - however PCRE doesn't allow this. Code:
(?<=>[^<]*)(([dg])\2*) Code:
Find: First run : (?<=>)([^<]*?)(([dg])\3*) Run until 0 matches : (?<=>)([^<]+?)(([dg])\3*) Replace: \1<span class="red">\2</span> In short - upload the book somewhere, then send me a link to it, I'll make the modification as needed. If you need to do this on multiple books, I'll write a little script to do it on epubs. Last edited by Serpentine; 07-14-2012 at 04:42 PM. |
07-14-2012, 06:15 PM | #5 | |
Well trained by Cats
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
While the methods suggested will work, You really need to understand what you are doing (CSS and HTML) before roaring off and doing cute tricks. Start with some good basic textbooks or at www.w3schools |
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unique characters used | Toxaris | ePub | 17 | 03-19-2012 02:30 AM |
Is Amazon unique | jbcohen | Reading Recommendations | 2 | 05-11-2011 10:36 AM |
Your Most Unique Bookmark? | distant.star | Lounge | 12 | 09-12-2010 12:52 AM |
Accessories Unique leather cases? | 123YayKindle | Amazon Kindle | 1 | 08-17-2010 11:56 AM |
hello, all the best for this unique community | FiGi | Introduce Yourself | 4 | 04-03-2009 12:25 PM |