Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2012, 04:59 AM   #1
Baja
Junior Member
Baja began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Remove Indent?

I noticed a few books that have an extra indent on the left hand side.

Is there an easy way to remove this?

P.S. They are in mobi format.

Baja is offline   Reply With Quote
Old 02-17-2012, 05:09 AM   #2
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,223
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
For mobi files this is often due to the book using <blockquote> instead of <p> tags. Or it could possibly be due to some general page margin setting.

As I commented on the other thread, my preferred approach is to convert the book to epub, edit the book using either Tweak ePub/Sigil or the Modify ePub plugin to get it looking exactly how I want it, and then convert back to mobi. That way you can edit the .css file of the epub to your liking for all margins.

Someone may have a more direct approach for mobi files though.
kiwidude is offline   Reply With Quote
Old 02-17-2012, 05:42 AM   #3
Baja
Junior Member
Baja began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Hmm... Tweak ePub presents a few dozen files after exploding the epub. Not sure which one(s) to search for the <blockquote> references.

Modify ePub presents a nice simple GUI menu, but I'm not clear which setting to use for this issue.

I'm hoping Sigil's WYSIWG interface will be the most appropriate for my limited experience. Downloading now...

Thanks for the tips!
Baja is offline   Reply With Quote
Old 02-17-2012, 07:09 AM   #4
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,223
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
If you are using Tweak ePub (or Sigil), you will want to open one of the html pages for the book content where you are seeing the indentation. That will show you what tags are applied, and more importantly what style name it has. Then you can edit the .css file and make changes to the appropriate style name and/or body style tags. You can also use calibre's ebook viewer with its rather nifty ability to show the hierarchy of styles that are applied to a particular paragraph, since of course there could be multiple levels of div tags etc.

My personal approach for a book like you mention would be after converting to ePub, to open with Sigil, open one of the chapter pages, lookup the style name(s) causing the issue, open the css, zero the margin-left for that style name. If it isn't <blockquote> based paragraphs, then it is just a case of looking at the relevant tag hierarchy to see whether it is the paragraphs, div or some body level class style that you need to change. I would also normally do any other margin adjustments for other relevant styles to my preference, fixup the TOC styles if needed, resplit/join to resolve any page break issues and do some basic checks for broken lines etc.

You are going to have to learn some basics about what files make up an epub to know which to edit, and some basic css/html concepts. If you get into heavier editing regex knowledge is mandatory as well. There is a forum on MobileRead dedicated to Sigil for any questions for it and google is your friend.

If using Sigil I suggest installing the "Open With" plugin as well, which gives you a convenient right-click or keyboard shortcut to open an ePub with Sigil. Sigil just gives you a more convenient way of working with the files that you saw Tweak ePub.

The Modify ePub plugin is for "touch-up" type tasks - an automated way to correct "flaws" identified by the Quality Check plugin or that a user otherwise knows they want applied. Many of its features are just options that you could achieve by doing an ePub->ePub conversion, but there are circumstances where avoiding such a conversion is desirable. You are correct in that the plugin does not have anything specific that would apply to your particular mobi issue, but I mentioned it because if you start down the route if converting or using ePub as a "master" source in your library, then it may come in useful for other reasons.

Final point - you are likely downloading the latest Sigil of 0.5.2. The 0.5 releases have been fairly problematic, the guys are working through the issues still. Personally I still use 0.4.2, which has a truckload of problems of its own but until the next Sigil comes out I am still waiting for the dust to settle. Just look at the 0.5.2 thread in the Sigil forum to make sure you are aware of the known gotchas and you should be fine.
kiwidude is offline   Reply With Quote
Old 02-17-2012, 10:24 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,099
Karma: 39198909
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Quote:
Originally Posted by kiwidude View Post
For mobi files this is often due to the book using <blockquote> instead of <p> tags. Or it could possibly be due to some general page margin setting.

As I commented on the other thread, my preferred approach is to convert the book to epub, edit the book using either Tweak ePub/Sigil or the Modify ePub plugin to get it looking exactly how I want it, and then convert back to mobi. That way you can edit the .css file of the epub to your liking for all margins.

Someone may have a more direct approach for mobi files though.
The "Ignore Margins" conversion option works well to get rid of this kind of thing.
HarryT is offline   Reply With Quote
Old 02-17-2012, 10:34 AM   #6
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,223
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@HarryT - but I would imagine that setting would nuke *all* margins though, right? Which means books which have intentionally indented paragraphs (songs, letters, signage, etc) are going to lose such indentation?

That is why I pick and choose to change just the styles I want changed, because it can make for confusing reading if you take the sledgehammer approach. Obviously some people don't care, I do
kiwidude is offline   Reply With Quote
Old 02-29-2012, 04:16 AM   #7
Baja
Junior Member
Baja began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Kiwi - thank you for the extremely detailed explanation! Sure enough, it was the <blockquote> vs <p> problem that you mentioned. You also got me thinking about using epub as my master format in conjunction with the Quality Check plugin.

I have to admit I was hoping the "Ignore Margins" function would work (easier for batch corrections), but I didn't notice any changes for this particular problem. I'm assuming that was because of the <blockquote> tags?
Baja is offline   Reply With Quote
Old 02-29-2012, 04:47 AM   #8
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,223
Karma: 1333994
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Baja - glad you found the info useful.

As for "Ignore Margins", to be perfectly honest I don't know exactly what this does, I would have to look at the code. I've done a google and can't find an explanation either and the tooltip is too vague/ambiguous. To my mind there are two possible things it might be doing:

(1) It sets to zero the default 5pt left/right and top/bottom margins that calibre sets for the page when doing conversions. Since the Kindle already has it's own "margin" setting on the device, it is redundant to insert additional margins in the document for the standard page. However I don't see how this would solve your problem, because if a large left margin is set on a style at paragraph level (like a blockquote tag) then this would not change that.

(2) That it looks for margin-left in the css file and setting this to zero. This would brute force solve your problem, at the cost of trashing the style for text that was important to be indented, as per my last post. If it did that I would certainly stay away from that setting.

It was HarryT that recommended the setting, perhaps he or someone else may have some insight into what it does. If it does (1) then it is safe to use but won't solve your issue in my opinion, and if it is (2) I wouldn't recommend it.
kiwidude is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WTB: Ability to change indent without ticking 'remove spaces between lines' gweminence Calibre 9 08-27-2011 09:05 AM
remove indent from 1st line of chapter only cybmole Sigil 15 02-21-2011 10:50 AM
indent control cybmole Conversion 18 02-18-2011 11:12 AM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 10:37 AM
Paragraphs and indent mrmikel Calibre 33 01-10-2009 05:37 PM


All times are GMT -4. The time now is 07:03 PM.


MobileRead.com is a privately owned, operated and funded community.