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

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2017, 06:01 PM   #1
AlanRoberts
Member
AlanRoberts began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2014
Device: Android tablet + FBReader
How to control space between paragraphs in my recipe

With Kovid's help I've made some progress with tuning fonts and sizes in my first recipe attempt. Now I'm trying to cut down on the space between paragraphs (margin, I think), which ends up being a bit excessive on my tablet.

My source has unclassed paragraphs, but they are descendants inside a containing div:
Code:
<div id="story-body" class="eza-body clearfix">
					<span class="sLoc">PARIS</span>
				
		
<p>With a military parade on the Champs-Elysees and a gilded tour of France's most storied monuments, French President Emmanuel Macron laid on the charm as he positioned himself as the indispensable intermediary between Europe and President Trump.</p><p>The Bastille Day demonstration on Friday capped two days of Parisian glitz for Mr. Trump and his wife, who were Mr. Macron's guests of honor in commemoration of the 100th anniversary of America's entry into World War I.</p> ...
so I've tried extra_css for the story-body ID, the eza-body class, and paragraph as a descendant selector of both of these, setting zero margin and padding.

Doesn't seem to have made any difference. The markup I see from a test ebook-convert is:
Code:
<div id="story-body" class="eza-body">
<span>PARIS</span>
<p class="calibre8">With a military parade on the Champs-Elysees and a gilded tour of France's most storied monuments, French President Emmanuel Macron laid on the charm as he positioned himself as the indispensable intermediary between Europe and President Trump.</p><p class="calibre8">The Bastille Day demonstration on Friday capped two days of Parisian glitz for Mr. Trump and his wife, who were Mr. Macron's guests of honor in commemoration of the 100th anniversary of America's entry into World War I.</p> ...
so it has classed the paragraphs. However the generated stylesheet.css doesn't ever have styling for the story-body ID even when I add this to extra_css. When my recipe has extra_css for the eza-body class the generated stylesheet does contain this styling, and my margin/padding/text-indent = 0 have been added, but nothing I've tried seems to cause a modification to the calibre8 class, which consistently has a 1em top margin.

Any thoughts on what I need in my recipe to actually reach to the style being applied to the paragraphs would be appreciated.

Thanks,
Alan
AlanRoberts is offline   Reply With Quote
Advert
Old 07-16-2017, 11:31 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,130
Karma: 7757719
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just use the calibre conversion setting for this.


conversion_options = {'remove_paragraph_spacing': True}
kovidgoyal is offline   Reply With Quote
Old 07-17-2017, 11:02 AM   #3
AlanRoberts
Member
AlanRoberts began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2014
Device: Android tablet + FBReader
That pulls the space out, many thanks.
AlanRoberts 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
No space between 2 paragraphs? Phylis Sophical Sigil 32 11-03-2014 04:17 PM
Adding space between paragraphs Gazella Conversion 5 04-03-2014 04:35 PM
How do I get a double space between paragraphs? ficbot Sigil 7 07-17-2013 09:12 PM
space between paragraphs gatorman Sigil 3 01-07-2011 10:17 AM
Unwanted space between paragraphs superanima Calibre 3 10-14-2009 02:28 PM


All times are GMT -4. The time now is 09:27 PM.


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