09-13-2010, 11:37 AM | #1 |
Guru
Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Specify indent in css, not with  
I'm converting a book from odt to epub with Calibre. In odt the first line indent is handled by Open Office, and works well. When it is converted by Calibre, I see two things. There is a small first line indent, and in addition there is a variable number of   entries, which appear to range from 0 to 5, making for non-aligned initial letters.
Isn't it possible to code the first line indent in the css and skip the   code? |
09-13-2010, 11:49 AM | #2 |
creator of calibre
Posts: 44,428
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre does not insert nbsp if there's nbsp in the output then it was there in the input
|
Advert | |
|
09-13-2010, 11:58 AM | #3 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
You can verify this for yourself by putting a directory in the debug area of conversion and after the conversion is complete you can easily review the resultant html. This directory will show you the code at each point in the conversion process.
|
09-13-2010, 12:31 PM | #4 |
Guru
Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Thanks, Dwanthny, I forgot I always save the debug information now. It can be so helpful.
|
09-13-2010, 12:48 PM | #5 | |
Member
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
|
Quote:
|
|
Advert | |
|
09-13-2010, 07:02 PM | #6 | |
Guru
Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Quote:
|
|
09-13-2010, 07:21 PM | #7 | ||
Member
Posts: 16
Karma: 10
Join Date: Aug 2010
Location: Canada
Device: Sony
|
Quote:
Quote:
|
||
09-13-2010, 09:48 PM | #8 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Some logic just got hooked into the preprocess option to take care of multiple nbsp's being used as indents, converting them to css styles. The code was just checked in, so it will be in the next release.
I don't believe odt files go through that code path during conversion, but if you take the html in the debug output, add that back as a new format, then re-convert with preprocess enabled in structure detection, you should be in good shape. Right now it just takes any number(2 or more) of nbsps and normalizes them to 3% indent. I've been debating changing the indent based on the actual number of nbsps, but a lot of books I've seen use entirely too many anyway. Last edited by ldolse; 09-13-2010 at 09:50 PM. |
Tags |
 , first line, indent |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
txt to Epub - nbsp nbsp | cybmole | Calibre | 1 | 09-17-2010 09:05 AM |
Unwanted $nbsp; | Nathanael | Sigil | 10 | 09-07-2010 03:52 PM |
CSS wacky p indent post-chapter split? | Hitch | Sigil | 0 | 06-17-2010 08:59 PM |
Mobiperl lost when converting to mobi | Jellby | Kindle Formats | 19 | 08-26-2008 03:10 PM |
CSS & regex for chapter titles | hpstricker | Calibre | 3 | 07-17-2008 10:13 AM |