07-18-2009, 10:50 PM | #1 |
Zealot
Posts: 125
Karma: 1031580
Join Date: Nov 2008
Device: Kindle Paperwhite, Sony PRS-505(LC) & Rocket eBook
|
LRF with aligned HTML tags
I'm still experimenting with the right combination of styling to get my LRF conversions looking the way I want them to come out for my new 505.
I've been using Calibre and its CSS override to try to force the tags to render my way with some odd results. Here's the CSS override I use: Code:
@font-face {font-family: "Trebuchet";font-weight: normal;font-style: normal;src: url(res:///Data/fonts/trebuc.ttf);} @font-face {font-family: "Trebuchet";font-weight: bold;font-style: normal;src: url(res:///Data/fonts/trebucbd.ttf);} @font-face {font-family: "Trebuchet";font-weight: bold;font-style: italic;src: url(res:///Data/fonts/trebucbi.ttf);} @font-face {font-family: "Trebuchet";font-weight: normal;font-style: italic;src: url(res:///Data/fonts/trebucit.ttf);} body, p, div, h1, h2, h3, h4, a, center, blockquote { font-family: "Trebuchet", sans-serif; font-weight: normal; font-style: normal; font-size: 10px; line-height: 0.9em; margin-top: 1px; margin-bottom: 1px; margin-right: 2px; margin-left: 2px; } b, strong { font-family: "Trebuchet", sans-serif; font-weight: bold; font-style: normal; font-size: 10px; line-height: 0.9em; margin-top: 1px; margin-bottom: 1px; margin-right: 2px; margin-left: 2px; } i, em { font-family: "Trebuchet", sans-serif; font-weight: normal; font-style: italic; font-size: 10px; line-height: 0.9em; margin-top: 1px; margin-bottom: 1px; margin-right: 2px; margin-left: 2px; } This is all a 'work-in-progress' so I hope you can forgive the font-face tags I included from my ePub experiments. The most odd thing I've encountered is that whenever I have a header tag with the align attribute set, I get weird results. For example, the tags: Code:
<h2 align=center> Chapter 1<br> Going Up<br><br> </h2> Chapter 1 Going Up Centered, with almost default-sized initials and tiny, tiny word-bodies. Has anyone seen this before? Am I imagining it? Is there a work-around? Is there a work-around that doesn't involve my re-writing the source files? Thanks. -Joe |
08-10-2009, 08:06 PM | #2 |
Enthusiast
Posts: 27
Karma: 32
Join Date: Aug 2009
Device: Kindle 2
|
As near as I can tell, the anything to LRF conversion in the 0.6.x versions of Calibre is VERY, VERY broken. I can't get it to recognize simple center tags most of the time and it makes a huge mess out of any html I throw at it. I've wound up downgrading Calibre back to 0.5.14 to do my LRF conversion. Hopefully the new LRF routines in the 0.6.x version will get some love, cuz right now they're really busted.
|
08-12-2009, 10:27 AM | #3 | |
Addict
Posts: 317
Karma: 1232685
Join Date: Nov 2008
Location: Ireland
Device: Kindle Voyage, Kobo Aura, Nexus 9
|
Quote:
|
|
08-12-2009, 01:22 PM | #4 | |
Wizard
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
This is the CSS override code I'm using for my LRF conversions... p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt;} h1 { text-align: center; } h2 {text-align: center; font-size: larger; page-break-before: always;} h3 { text-align: center; } h4 { text-align: center; } h5 { text-align: center; } h6 { text-align: center; } img {text-align: center; } I normally don't define the font and it comes out as Times New Roman as default. |
|
08-12-2009, 01:22 PM | #5 | |
Wizard
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
|
|
Tags |
lrf html align calibre |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add HTML with meta tags | Pixelmagic | Calibre | 9 | 04-19-2020 05:47 PM |
CBZ > LRF (LRF>HTML/MOBI????) | sideburnt | Calibre | 4 | 09-15-2009 06:44 AM |
HTML author / title tags ? | romi | Bookeen | 0 | 05-11-2009 07:47 AM |
PRS-500 Tags for Bold, Italic, Center, Etc. in LRF? | EatingPie | Sony Reader Dev Corner | 9 | 04-07-2007 01:06 AM |