Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2018, 07:59 PM   #1
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: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Adjusting "space" paragraph width

Hi

I format ebooks using styles. I use a main textbody paragraph style. Nothing unusual.

Sometimes, it's required to mark a breathing space between text paragraphs.

The non-recommended (dirty?) way to do it is to add an empty paragraph. Easy, you just click "Enter" in a text-processor and get a <p> </p> in your html (or many if you click several times).

You also can try to do it in a "cleaner" way
- either using a slightly modified textbody style, incorporating a bigger margin-bottom value of some pixels. You need to make use of two styles (or of two different classes).
- or by creating a dedicated "space" paragraph. To avoid it to be empty, you can insert a nobreak space. You give it a class name (say "BlancUn"), provide this css class with some margin and padding values.

Either way, when you display it, you may realize using the Inspector of the Calibre editor, that you do not get the exact vertical margin width you were aiming for because a 1em -webkit-margin-before and a 1em -webkit-margin-after seems to be systematically added by the so called "user agent stylesheet" (see screenshot). This spoils the space display if you wish to use only a small value.

I'd like to know if this user agent values are only a Calibre editor peculiarity or if it will be met elsewhere with common ebook-readers. Maybe the optimal way to deal with this would be to add some null webkit margin values in the css?
Attached Thumbnails
Click image for larger version

Name:	webkit.png
Views:	252
Size:	52.2 KB
ID:	161258  

Last edited by roger64; 01-04-2018 at 08:45 PM. Reason: optimal and -webkit
roger64 is offline   Reply With Quote
Old 01-04-2018, 09:53 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: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Those rules come from WebKit, not the editor. So any rendering engine that happens to use WebKit will have them. And note that you have to take into account margin collapsing as well https://css-tricks.com/what-you-shou...psing-margins/
kovidgoyal is offline   Reply With Quote
Advert
Old 01-04-2018, 10:58 PM   #3
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: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Thank you for your reply and for a very informative link
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
InDesign to ePub: Preflight question about "char width" mtrahan ePub 4 03-28-2013 02:42 PM
Are paragraph ending marks ("pilcrow" symbols) necessary for page breaks? DSpider Workshop 4 01-02-2012 03:57 PM
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" therealjoeblow Calibre 15 07-25-2011 03:14 PM
Paragraph/line space - "n" added NormalJoe Conversion 6 01-25-2011 11:28 AM
Centering and adjusting the width of a block Jellby ePub 3 04-09-2009 12:38 PM


All times are GMT -4. The time now is 04:23 PM.


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