[FM Discuss] Using drop-caps in FLOSS Manuals

James Simmons nicestep at gmail.com
Thu Sep 23 14:18:06 PDT 2010


If you checked out the styled pages that the Rural Design Collective
put together for my book you probably admired the drop caps that begin
the first paragraph in each chapter.  I though these were done with
image files but it turns out that you can do this with styles, like
this:

p.intro:first-letter {
   display:block;
   float:left;
   border:3px solid #A64942;
   padding:5px;
   margin:4px 9px 4px 5px;
   font-size:73px;
   background-color: #FAD492;
   font-style: normal;
   color: #1C4501;
}

You need to make the first <p> tag on the page have a class like this:

<p class="intro">

I was able to get the drop caps into my PDF using a custom style
sheet.  I wanted them to be in my web page as well, so I used a
<style> tag to add the style at the top of the page.  The results can
be seen here:

http://en.flossmanuals.net/bin/view/ReadingandSugar/Introduction

If you run this through OBJAVI using the default style sheet the
<style> in the page is ignored when creating a PDF.  You need to use a
custom style sheet with the drop cap style included.

While this effect may not be suitable for every FM the book I'm doing
is about e-books so it's kind of appropriate.  Any thoughts?

James Simmons



More information about the Discuss mailing list