Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Other formats > IMP

Notices

Reply
 
Thread Tools Search this Thread
Old 03-08-2008, 12:10 AM   #16
rpresser
Member
rpresser has learned how to buy an e-book online
 
Posts: 17
Karma: 84
Join Date: Mar 2008
Device: Ebookwise1150, Treo 600
Running Headers

Here's how to do running headers in IMP books, entirely with HTML:

1. Add this to the <STYLE> section in the <HEAD> element:

Code:
   .header {display:none; display:oeb-page-head; margin-left:2.0em; margin-right:2.0em}
   .headleft {height:3.0ex; vertical-align:top; text-align:left; font-family:smallfont}
   .headright {height:3.0ex; vertical-align:top; text-align:right; font-family:smallfont}
2. Add this text on the page where you want the running header to start -- i.e., if you have a title page, put this after the <HR> that ends the title page:

Code:
<!-- Running Header -->
<table class="header" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="headleft">book title</td>
<td class="headright">book author</td>
</tr>
<tr>
<td colspan="2" height="10"><hr /></td>
</tr>
</table>
This is (almost) straight out of the Gemstar OEB Formatting guide. Note that you could do almost anything instead of this rather plain header. Any block-level element (table, div, P, etc.) that has the style display:oeb-page-head can be your running header.

Cool, huh?

My apologies if this is already well known. I just couldn't find it explicitly mentioned anywhere, and the mobi2imp thread explicitly says that running headers aren't implemented. Maybe it could be incorporated into the perl script?
rpresser is offline   Reply With Quote
Old 03-08-2008, 10:50 AM   #17
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by rpresser View Post
Here's how to do running headers in IMP books, entirely with HTML:
...
My apologies if this is already well known. I just couldn't find it explicitly mentioned anywhere, and the mobi2imp thread explicitly says that running headers aren't implemented. Maybe it could be incorporated into the perl script?
It is good to see example coding put into practical use. Thanks for sharing this.

The next release of mobi2imp should have this 'Running Headers' feature. I wanted to lessen the impact of loosing that space at the top, so I devised a way to elimante the following <hr> and use color to differentiate the header from the text

I will implement in mobi2imp, this additional style:
Code:
<style>
header {display:none; display:oeb-page-head; oeb-column-number:1}
</style>
Then will place this code after <body>, for the header to appear:
Code:
<header>
<table border="0" cellspacing="0" width="100%">
<tr>
<td align="left" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_TITLE_HERE</td>
<td align="right" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_AUTHOR_HERE</td>
</tr>
</table>
</header>
Please note that by placing this AFTER <body>, the margin settings are inherited and properly displayed. The 'smallfont' use may be optional.

It adds a bit of color (grayscale for 1150 owners ).

By the way, bgcolor="#B0C4DE" is LightSteelBlue, but I also like, bgcolor="#FFDAB9" (PeachPuff) and bgcolor="#F5DEB3" (Wheat) as being non-obtrusive.
nrapallo is offline   Reply With Quote
Old 03-08-2008, 01:00 PM   #18
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by nrapallo View Post
It is good to see example coding put into practical use. Thanks for sharing this.

The next release of mobi2imp should have this 'Running Headers' feature. I wanted to lessen the impact of loosing that space at the top, so I devised a way to elimante the following <hr> and use color to differentiate the header from the text

I will implement in mobi2imp, this additional style:
Code:
<style>
header {display:none; display:oeb-page-head; oeb-column-number:1}
</style>
Then will place this code after <body>, for the header to appear:
Code:
<header>
<table border="0" cellspacing="0" width="100%">
<tr>
<td align="left" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_TITLE_HERE</td>
<td align="right" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_AUTHOR_HERE</td>
</tr>
</table>
</header>
Please note that by placing this AFTER <body>, the margin settings are inherited and properly displayed. The 'smallfont' use may be optional.

It adds a bit of color (grayscale for 1150 owners ).

By the way, bgcolor="#B0C4DE" is LightSteelBlue, but I also like, bgcolor="#FFDAB9" (PeachPuff) and bgcolor="#F5DEB3" (Wheat) as being non-obtrusive.
I hope this will be an option. I prefer the extra screen real estate for text.

Dale
DaleDe is offline   Reply With Quote
Old 03-08-2008, 04:24 PM   #19
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by DaleDe View Post
I hope this will be an option. I prefer the extra screen real estate for text.

Dale
As do I. Yes, it will be an option.

I wrestled with incorporating this in mobi2imp, because, personally I think its cute, but wears on you. I know it serves a purpose, so I will be adding this ability to the next release of mobi2imp.

p.s. On a related note, I was so happy when I found out that the running headers used by GEBLibrarian could be turned off with a registry change.
nrapallo is offline   Reply With Quote
Old 03-08-2008, 06:32 PM   #20
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by nrapallo View Post
As do I. Yes, it will be an option.

I wrestled with incorporating this in mobi2imp, because, personally I think its cute, but wears on you. I know it serves a purpose, so I will be adding this ability to the next release of mobi2imp.

p.s. On a related note, I was so happy when I found out that the running headers used by GEBLibrarian could be turned off with a registry change.
Yea, I noticed that in the wiki where you added it. Great find. When I want running headers I want more than a static entry such as chapter titles. It can also be done but it requires some manual intervention.

Dale
DaleDe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attention iPhone3GS/iPhone4/iPod Touch users: GRiker Devices 4 06-24-2010 09:46 PM
iPad I beg every Apple Users' Attention!! tiananmen Apple Devices 80 06-06-2010 09:46 AM
A Tip for Kindle DX users Daithi Amazon Kindle 16 10-08-2009 06:53 AM
Attention Kindle Users RickyMaveety Amazon Kindle 7 06-27-2008 05:40 PM


All times are GMT -4. The time now is 03:01 AM.


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