08-16-2012, 10:28 PM | #1 |
Junior Member
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:
I'm new to ePubs and not yet terribly competent with CSS. If anyone can offer help I'd be incredibly grateful. |
08-17-2012, 05:17 AM | #2 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
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">...
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; 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;
}
warning: This might not survive conversion to MOBI |
Advert | |
|
08-17-2012, 10:44 AM | #3 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
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)
|
08-17-2012, 10:58 AM | #4 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
08-17-2012, 12:21 PM | #5 |
Junior Member
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.
I'm deeply grateful for the time you've taken to help me. |
Advert | |
|
08-17-2012, 08:59 PM | #6 | |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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) |
|
Tags |
bullets, calibre, css, epub |
|
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 |