06-05-2011, 03:18 PM | #1 |
Grand Sorcerer
Posts: 5,885
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
using sigil to make changes befote conversion
hi, i usually restrict my participation to the calibre and kindle forums, but this question belongs here i believe.
there's a known problem with some epubs that when converted to mobi (using calibre) leave a fairly wide and unnecessay left margin. to fix this i just finished doing this (afterwards it converts w/o the expanded left margin). i opened the epub in sigil and then opened all the pieces of the text portion. one by one i separately selected all the text in each of the pieces and then i pressed the decrease indent button at the top (again one by one) to get rid of the offending left margin. is there any 'select all' function like the standard in windows (in the edit pull down)? further, is there any 'select all' for all the pieces at once? and lastly, is there a better way to accomplish this end result? thanks |
06-05-2011, 05:02 PM | #2 |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Ctrl-A does not work?
Note add indent usually is done by Blockquotes so if you don't have any ??? for remove. Switch to Codeview and figure what class is controlling the indent (not the same as margin or Padding) of the section. Then find that class in the stylesheet (see the page headers for which stylesheet if more than one). Make your chang nd look at the page in bookview Repeat as needed. |
Advert | |
|
06-05-2011, 06:10 PM | #3 | |
Grand Sorcerer
Posts: 5,885
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
i'm a reader, not a programmer. he's dead jim!
Quote:
thanks |
|
06-06-2011, 10:42 AM | #4 | |
Resident Curmudgeon
Posts: 73,866
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Say the code read... <p class="para"> you would find .para in the CSS and change or add in... margin-left: 0 & margin-right: 0. That would fix the class para to have no margins and usually there's a class like <p class="noindent"> for the paragraphs that have no indents. Do the same fix. And for any other class that needs it. But if there is a page template file, you'll need to delete it and in the OPF delete the reference to it as well as delete the call to it in all the CSS files. In the CSS if there is a body style, make the left, right, top, & bottom margins all 0. And if there is an @page declaration, delete it. And finally if the ePub is a Calibre made ePub, go into all the XML files and delete the @page style it puts in. Calibre puts in a top & bottom margin of 5pt and that is a bug. |
|
06-06-2011, 11:05 AM | #5 | |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I use 2,2,16,2 for my ADE based reader with those edge numbers |
|
Advert | |
|
06-06-2011, 11:06 AM | #6 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
if is is a blockquotes issue you could also use find / replace all to change every instance of <blockquote to <p
calibre has an "remove fake margins" tick box in the conversion options which will take out unwanted left space. it is in preferences - conversion - common options. it also has a ignore margins tick box in preferences - conversion - output options - mobi - which gets rid of kindle margins. |
06-06-2011, 12:21 PM | #7 | |
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 |
|
06-06-2011, 01:22 PM | #8 | |||||
Grand Sorcerer
Posts: 5,885
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
yikes, a deluge of useful info, thanks!!
Quote:
Quote:
Quote:
Quote:
Quote:
thanks to all again! |
|||||
06-06-2011, 01:33 PM | #9 | |
Grand Sorcerer
Posts: 5,885
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
swahili or mandarin?
Quote:
i simply never imagined that reinvigorating my reading would entail reading *CODE* again. thanks |
|
06-06-2011, 03:07 PM | #10 |
Grand Sorcerer
Posts: 5,885
Karma: 464403178
Join Date: Feb 2010
Location: 33.9388° N, 117.2716° W
Device: Kindles K-2, K-KB, PW 1 & 2, Voyage, Fire 2, 5 & HD 8, Surface 3, iPad
|
that did it
wow! i went back to the original epub (a calibre generated epub) and exploded it in calibre (thanks for this idea to blossom in the kindle forum). then i edited (notepad++) both the css and toc files in about 5 minutes or less. in the css i changed all occurrences of margin-left that were not 0 to 0. in the toc i fixed some errors in the text (i'd not yet mentioned this problem here). now the generated mobi is fine on my kindle. hooray
thanks again to dale, cybmole, the ducks and jswolf. |
06-07-2011, 01:44 AM | #11 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
glad to have helped. some folks work your way, with notepad plus, others ( me included) use Sigil to open & edit the epub. Sigil has it's own helpful forum.
if you are fussy about having working kindle 5 way navigation controls in every book then you may end up learning enough of sigil to be able to fix up chapter headers, I learnt it for that reason, & for auto fixing mid-sentence line breaks. you can also hook in a free spell checker ( microspell) but I abandoned that as it is awkward to use & because most books have lots of ( intentional) capitalised proper names - people & place names - which spell checker insists on flagging up. |
06-07-2011, 07:50 AM | #12 | |
Wizard
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
In addition, I've encountered files that in addition to margins set in the CSS file(s) have margins in a <style> section in the <head> section of the XHTML files as well. Check for those and set them to zero if present. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
i can't make sigil run in fedora 14 | nastarovia | Sigil | 1 | 01-20-2011 05:02 AM |
Sigil 0.3.1 | Valloric | Sigil | 0 | 11-07-2010 05:24 PM |
Sigil conversion doesn't pass Flight Crew | mrmikel | Sigil | 1 | 11-07-2010 05:53 AM |
Book Error In Sigil After Calibre Conversion (from lit to epub) | Guns4Hire | Sigil | 13 | 03-05-2010 05:02 PM |
Make: HOW TO - Make PDFs for the Sony Reader (Ebook e-ink device) | kalivoodoo | Sony Reader | 6 | 02-01-2007 11:56 AM |