05-09-2009, 01:40 AM | #1 |
Member
Posts: 22
Karma: 10
Join Date: Apr 2009
Device: iphone
|
<pre> tag issue while converting to epub
Greetings,
I was just wondering if there was a way to strip all <pre> tags when converting from .lit to .epub with calibre The reason why is that I use calibre as a server to have my ebooks anywhere on my iphone. But some of the lit files that I have that contain <pre> tags completely play havoc with my iphone text layout. I have managed to find the following CSS to enter while doing a conversion to at least add line wrap functionality (also adds line wrap to the default epub reader of calibre) pre { white-space: pre-wrap; } The problem is that all the other layout function that my iphone usually handles do not seem to work (like paragraph indent, line spacing, font type, etc). Any help would be greatly appreciated. Last edited by Colaveare; 05-09-2009 at 03:19 PM. |
05-09-2009, 01:54 AM | #2 |
creator of calibre
Posts: 44,329
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
just add
pre {display: none } to override css |
Advert | |
|
05-09-2009, 03:17 PM | #3 | ||
Member
Posts: 22
Karma: 10
Join Date: Apr 2009
Device: iphone
|
Yeah the problem is that by adding
Quote:
Instead I've been using this little workaround for now. It seems to be working but sadly it stops me from having layouts that can auto-configure paragraph indent, line spacing between paragraphs and other things like default ereader browser fonts and so forth... Quote:
Last edited by Colaveare; 05-09-2009 at 03:19 PM. |
||
05-09-2009, 03:29 PM | #4 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
05-09-2009, 03:29 PM | #5 |
creator of calibre
Posts: 44,329
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Opena ticket to request a feature to "reflow" <pre> tags
|
Advert | |
|
10-08-2010, 10:46 PM | #7 |
Member
Posts: 11
Karma: 10
Join Date: Aug 2009
Device: SONY READER
|
I'm not familiar with this XTML/CSS stuff, but have learnt some in the last 30 hours or so of trial and horrors.
Could a kind soul pleeease (please) explain step by step how to manually remove pre tags I'd rather have my code reflow like body text -- courier or no courier Have Sony Reader PRS-700. Been using Calibreand Sigil Thanks in advance Found what I think may be a bug: In Sigil, text stops reflowing (when you narrow/enlarge the width of the bookm viewer window) after ANY edit in the CSS. Sigil will be back to normal, though, after save - close - and reopen file. |
10-08-2010, 11:10 PM | #8 | |||
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Update: I was once again suckered into responding to an old thread. I guess the Old Thread Warning wasn't enough. I have now modified this post to make it seem as though I was responding to the recent poster (instead of the original poster).
Old Thread Warning Quote:
Quote:
Quote:
Last edited by DoctorOhh; 10-08-2010 at 11:53 PM. |
|||
10-09-2010, 12:02 AM | #9 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
By the way, if someone has a file with multiple <pre> tags, please attach it to the linked bug. All the examples I found just had a single set of <pre> tags wrapping the entire document, so that's the only case I accounted for. I wasn't sure if multiple sets was a common real-life occurrence to worry about.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TAG - A Techno Thriller set in the near future | simonroyle | Self-Promotions by Authors and Publishers | 160 | 06-15-2012 12:17 AM |
<pre> tags and no text reflow in EPUB | sergio blum | Calibre | 24 | 10-14-2010 08:07 PM |
ePub files do not center a custom <hr /> tag! | Haidon | ePub | 2 | 08-21-2010 04:29 AM |
LRF to EPUB: Each line is a paragraph tag | wudaben | Calibre | 5 | 07-14-2010 07:04 PM |
ebook-convert HTML to EPUB and problem with <pre><code> | mikegr | Calibre | 2 | 03-09-2010 02:27 PM |