View Single Post
Old 10-22-2009, 07:46 AM   #186
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 74,206
Karma: 317184274
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Not a PM, as it may be of interest generally.

There are several ways to do a drop cap. If you book is formatted just right, it can be done just with CSS, but setting it up is tricky.

So, a simple two-step drop cap tutorial:

1. In Sigil Book View, go to the paragraph you want to have a drop cap. Now switch to code view. Find the paragraph and add the following around the first letter of the paragraph, in this example, an H.

<span class="dropcap">H</span>

2. Now look up at the top of the file in code view. Find the lines that say

<style type="text/css">
/*<![CDATA[*/

and immediately after them add the following

span.dropcap { float:left; font-size: 4.7em; line-height:0.8em; margin-right: 3pt; margin-bottom: -0.1em; }

Switch back to book view. Ta da!

Add the <span class="dropcap"></span> to all the letters at the start of paragraphs where you want a drop cap.

You might need to tweak the values for font-size, line-height and margin-bottom to get the effect you want. The Sigil book view may not show exactly how it'll appear in ADE, but it's pretty close.

I've added a sample Sigil file showing the drop cap in action.

Quote:
Originally Posted by Croker View Post
As an aside - and without wishing to derail this thread - if anyone can explain in layman's terms how I can easily add drop caps to my ePubs, please drop me a PM and let me know!
Attached Files
File Type: zip DropCap.sgf.zip (2.0 KB, 378 views)

Last edited by pdurrant; 10-23-2009 at 03:15 PM. Reason: Added sample file; Fixed example!
pdurrant is offline