• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Reflowable ePub: is there a way to control default line and paragraph spacing?

Community Beginner ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

It feels like the paragraphs are stacked right on top of each other in my epub doc but adjusting the paragraph spacing in the styles doesn't seem to do anything. I've got books in my library that have big breaks between paragraphs -- how did they do it??

TOPICS
EPUB , How to , Type

Views

363

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 07, 2022 Jun 07, 2022

You can try this. Put it in a text file saved as spacing.css.

 

  • Change the style name BODY to whatever your base, body style name is. If you have spaces, replace them with hyphens (BODY-main, etc.)
  • Change line-height to other values (1 is default, tweak in small steps).
  • Change margin-bottom to other values from 0 to maybe 30.

 

 

p.BODY {
line-height:1.1em;
margin-bottom:10px;
}

 

Add spacing.css to the "additional CSS" list for your export.

 

Experiment to see if this has any effect on your b

...

Votes

Translate

Translate
Community Expert ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

The short answer is that yes, to some degree you can override defaults for the base font.

 

The complete answer is that EPUB readers vary greatly, but all have a tendency to "manage" what they see as the base font and make it the reader default (in font, size and spacing) regardless of how the document encoding is set. In general, you have to accept that the base font is going to be the reader default and work around it.

 

(The technical basis for this is that e-readers are built on the idea that [human] readers can select font face, size, margins, columns etc., and so override nearly all instructions to do anything differently. Most readers are thus very aggressive about this override; some are not.)

 

The results of attempting to override the base font can get comical, such as forcing headings to very large or very small sizes or rescaling images similarly.

 

—


â•Ÿ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) â•¢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

Thanks for the response. I think it's more the breaks between paragraphs than the line spacing I'm trying to adjust. See the difference in the attached two examples; I'm looking to increase the amount of space similar to the more expansive one but just not sure how to make it happen.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

Inter-paragraph spacing is also "mostly" reader controlled.

 

You can try using CSS to adjust it after export, but you'll find that most readers (including Kindle) tend to override everything. The reader settings sometimes allow variation of line and paragraph spacing, and that's a two-edged sword here.

 

Note that this applies almost wholly to that "base" font; you can do all kinds of adjustments to every other style.

 

—


â•Ÿ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) â•¢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

LATEST

You can try this. Put it in a text file saved as spacing.css.

 

  • Change the style name BODY to whatever your base, body style name is. If you have spaces, replace them with hyphens (BODY-main, etc.)
  • Change line-height to other values (1 is default, tweak in small steps).
  • Change margin-bottom to other values from 0 to maybe 30.

 

 

p.BODY {
line-height:1.1em;
margin-bottom:10px;
}

 

Add spacing.css to the "additional CSS" list for your export.

 

Experiment to see if this has any effect on your body and paragraph spacing. It changes paragraph spacing but not body spacing in Kindle Previewer, and both in Thorium Reader, but other EPUB readers might handle it differently.

 

—


â•Ÿ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) â•¢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines