View Single Post
Old 05-17-2012, 11:43 AM   #1
LadyCygnus
Junior Member
LadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than momLadyCygnus loves his/her reader more than mom
 
Posts: 4
Karma: 78960
Join Date: May 2012
Location: Virginia, USA
Device: Kindle, iPad
Looking for Suggestions to Convert Textboxes

I have a history book epub that has a lot of sidebars and textboxes which interrupt the flow of the text. In the epub they are offset with a border and color, making it clear that they are a different object. However in the Kindle format this is not possible.

I'm looking for suggestions on how these could be coded and ways to automate this.

They are generally formatted in the epub like this:

Code:
<div class="textbox1">
<h1 class="section"><span class="blue">TITLE</span></h1>
<p class="nonindent">Paragraph</p>
<p class="nonindent">Another Paragraph</p>
<p class="center"><img src="images/7-1.jpg" alt=""/></p>
</div>
where textbox1 in the css is one of 6 different textboxes with different background colors and borders:

Code:
div.textbox1 {
background-color: #DFE0E1;
padding-top: 1em;
padding-left: 1em;
padding-right: 1em;
padding-bottom: 1em;
margin-top: 2em;
margin-left: 2em;
margin-bottom: 1em;
margin-right: 2em;
text-align: left;
}
(aside, these may not all be used, our converter has a tendency to add in a lot of extraneous css which makes this all very painful)

Calibre made them into something like a block quote, but this is confusing.

With other books I've put horizontal rules at the start and end to separate these, basically making a top/bottom border, but I do not have this automated yet...and there are a LOT of boxes.

Another consideration is to just move them to the end of the chapters--this was already done with the longer boxes when cleaning up our epub conversion. But again, there are a LOT of text boxes, so an automated solution would be nice.

Other suggestions? Perhaps some feature I'm not considering that may offset the text? With a little time I could cobble together a perl script to automate something, but I have a strong feeling it would be like reinventing the wheel using only rubber bands and duck tape.
LadyCygnus is offline   Reply With Quote