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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2012, 10:28 PM   #1
ErikThePerik
Junior Member
ErikThePerik began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2012
Device: all
Indenting Paragraphs in Calibre Messes up Bullets

I just built converted a book to ePub in Sigil and used Calibre to provide some final formatting, following the method described here:

http://cameronchapman.com/ebook-form...e-easy-way.htm

It all works great except for one thing. Chapman recommends setting "Indent Size" under the "Look and Feel" menu at 1.5.

This gives me nicely indented paragraphs through the document. Unfortunately, my document contains several enumerated or bulleted lists. And creating an Indent Size of 1.5 has the effect of indenting the first line of text of each bullet as if it's a paragraph, which means the first line of text in each bullet isn't flush with any lines that of text that follow.

I'm guessing I'm going to need to define an alternate CSS style just for bullets, which won't inherit the body text's indentation. I could really use some help here getting:
  • the CSS code that will be needed for my bullet style
  • advice on where and how to insert this CSS code into my ePub through either Calibre or Sigil

I'm new to ePubs and not yet terribly competent with CSS. If anyone can offer help I'd be incredibly grateful.
ErikThePerik is offline   Reply With Quote
Old 08-17-2012, 05:17 AM   #2
theducks
Well trained by Cats
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: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
IMHO your process is backwards
Calibre makes a rough(er) first pass EPUB from an external format

Then you polish the EPUB with Sigil.


For normal (indented) paragraphs, you need this line in the CSS (class) selector: Calibre does not always use the same selector name... Look at the paragraph in question.
Code:
<p class="calibre5">...
remember the green part

Now in the CSS, find (dot).calibre5 {
add or change the line: (pay attention to the trailing semi-colon. all lines, except the last, must have a semicolon. the last line one optional)
Code:
text-indent: 1.5em;
For bullet lists (we will NOT use HTML lists as they can be a pain), things get tricky:
Make a new class selector in the CSS. I will use .bullet
Code:
/* a hanging indent used for lists */
.bullet {
   display: block;
    margin-bottom: 0;
    margin-left: 4.5em;
    margin-right: 0;
    margin-top: .5em;
    text-indent: -1.5em;
    }
.nobullet { /* use for additional paragraphs of a bullet item */
   display: block;
    margin-bottom: 0;
    margin-left: 4.5em;
    margin-right: 0;
    margin-top: .5em;
    text-indent: 0;
    }
adjust the left margin and text-indent values/ratio to taste

warning: This might not survive conversion to MOBI
theducks is offline   Reply With Quote
Advert
Old 08-17-2012, 10:44 AM   #3
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,211
Karma: 11766195
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
It can survive if you use padding-left instead of margin-left (checked)
Terisa de morgan is offline   Reply With Quote
Old 08-17-2012, 10:58 AM   #4
theducks
Well trained by Cats
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: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Terisa de morgan View Post
It can survive if you use padding-left instead of margin-left (checked)
Thanks for the tip
theducks is offline   Reply With Quote
Old 08-17-2012, 12:21 PM   #5
ErikThePerik
Junior Member
ErikThePerik began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2012
Device: all
three follow-up questions

Thank you so much, theducks, for the detailed advice.

Three really simple things are still going over my head.
  1. I've used CSS for websites before, but I'm new to creating ePubs. So could you please tell me how I should access and modify my ePub's CSS? Do I access it using Sigil or do I access it in Calibre? And what steps must I take to view/edit the CSS?
  2. My book also features ordered (numbered) lists in addition to bulleted lists. How can I impose the same formatting you've provided for my bulleted lists onto my ordered lists?
  3. Will the CSS modifications you've made work with bulleted or ordered lists I've created in Sigil, in which I've highlighted the lines I want bulleted and clicked the Bullets or Numbering icons from the second row in Sigil's menu? Or is there some other way I must designate that a given selection of text is to be bulleted or ordered?

I'm deeply grateful for the time you've taken to help me.
ErikThePerik is offline   Reply With Quote
Advert
Old 08-17-2012, 08:59 PM   #6
theducks
Well trained by Cats
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: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by ErikThePerik View Post
Thank you so much, theducks, for the detailed advice.

Three really simple things are still going over my head.
  1. I've used CSS for websites before, but I'm new to creating ePubs. So could you please tell me how I should access and modify my ePub's CSS? Do I access it using Sigil or do I access it in Calibre? And what steps must I take to view/edit the CSS?
  2. My book also features ordered (numbered) lists in addition to bulleted lists. How can I impose the same formatting you've provided for my bulleted lists onto my ordered lists?
  3. Will the CSS modifications you've made work with bulleted or ordered lists I've created in Sigil, in which I've highlighted the lines I want bulleted and clicked the Bullets or Numbering icons from the second row in Sigil's menu? Or is there some other way I must designate that a given selection of text is to be bulleted or ordered?

I'm deeply grateful for the time you've taken to help me.
Edit in Sigil
or
Use Tweak ('T') and your favorite Text editor, then click "rebuild"


My advice was how to Simulate lists (which avoids any other problem that EPUB vs Lists has

so whether you type a number (plus &emsp'/&ensp'padding or a &bull' + padding )

some folk give up and insert an image of the list (that does no scale/reflow)
theducks is offline   Reply With Quote
Reply

Tags
bullets, calibre, css, epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paragraphs between Pages and Calibre La Nuestra Calibre 21 10-18-2010 08:03 AM
Can't get calibre to *not* put space between paragraphs lunixer Calibre 8 09-11-2010 10:23 PM
Fixing paragraphs with calibre? enarchay Calibre 17 08-16-2009 08:31 PM
How to eliminate blank lines between paragraphs with Calibre Mr. Goodbar Calibre 8 06-02-2008 07:39 AM
Screen messes up in landscape diabloNL Sony Reader 6 05-17-2007 05:32 AM


All times are GMT -4. The time now is 02:06 PM.


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