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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-19-2010, 08:54 AM   #1
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Removing unwanted white space

Hi Valloric,

First of all thanks for your app been using for search & replace to clean up some ebooks but I have a few ebooks that I need to clean up and remove unwanted white spaces, I am opening them up in Sigil in code view and I'm trying to use the tip below but I can't see yellow color text in code view, this will prob be a very easy thing to do to for most people but I'm not that clued up to editing, could someone post a screen grab and show me how to do what I want...

Regards
Jay

To remove the white space between the paragraphs, add this to the bottom of the CSS code (the yellow color text in the Code View):

p {margin: 0; padding: 0;}

This will affect only the paragraph spacing. To remove all the whitespace between the various elements and make the document look more "book like", use this code:

body, div, p, h1, h2, h3, h4 { margin: 0; padding: 0; }
JayLaFunk is offline   Reply With Quote
Old 03-19-2010, 09:36 AM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
OK, which version of Sigil are you using? The 0.2.0 betas or 0.1.9?

The CSS code will probably be in a different CSS file if you're using 0.2.0. You should see a file in the "Styles" folder in the Book Browser.
Valloric is offline   Reply With Quote
Old 03-19-2010, 09:50 AM   #3
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by Valloric View Post
OK, which version of Sigil are you using? The 0.2.0 betas or 0.1.9?

The CSS code will probably be in a different CSS file if you're using 0.2.0. You should see a file in the "Styles" folder in the Book Browser.
Hi,

I am using 0.1.9 (Win 7), would I be better to upgrade to 0.2.0

Jay
JayLaFunk is offline   Reply With Quote
Old 03-19-2010, 11:29 AM   #4
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,211
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by JayLaFunk View Post
Hi,

I am using 0.1.9 (Win 7), would I be better to upgrade to 0.2.0

Jay
0.2 is very much Beta. There is a file name with spaces bug that will be corrected in the next release. Removing spaces from files inside the EPUB is a PITA if there are very many splits.
theducks is offline   Reply With Quote
Old 03-19-2010, 11:33 AM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,399
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
Beware, I am just a beginner on CSS. This time I succeeded to reduce the white space between paragraphs.

The epub text is coming from a foreign source and has been converted from an odt file by calibre as an EPUB .

I opened this epub file with Sigil 0.2, I looked at an xhtml file with code view and I identified the P11 paragraph style as being the most used (why? mystery?) : see joint texte.png on the right

I then opened the css stylesheet at P11 and reduced to zero the values of margin-bottom and margin-top which were set at 1em (all the others values related to margin and padding were already at zero): see joint style.png

That was enough to do the trick.

I am not sure at all this is academic but it works. Now I have one line between paragraphs instead of three.
Attached Thumbnails
Click image for larger version

Name:	style.png
Views:	227
Size:	16.2 KB
ID:	48385   Click image for larger version

Name:	texte.png
Views:	217
Size:	13.2 KB
ID:	48386  

Last edited by roger64; 03-19-2010 at 11:45 AM. Reason: typos
roger64 is online now   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
How to reduce indents without "removing space between paragraphs" Skydog Calibre 5 06-05-2010 12:58 AM
Unwanted space between paragraphs superanima Calibre 3 10-14-2009 02:28 PM
Horror White, Frederick M.: The Great White Moth v1 23 apr 2009 mtravellerh ePub Books 0 04-23-2009 06:06 AM
Horror White, Fred Merrick: The Four White Days. V1. 7 Dec 2008 crutledge IMP Books 0 12-07-2008 12:12 PM
Horror White, Fred Merrick: The Four White Days. V1. 7 Dec 2008 crutledge Kindle Books 0 12-07-2008 12:05 PM


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


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