Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-14-2009, 08:05 AM   #1
setzer
Enthusiast
setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.
 
Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
Unhappy page-template -> running headline

Hello,

i'm tryin to get this page.template.thing 2 work but there must be something i won't get about it...
i want to create a running headline (hope it'S the right name for it) which is shown up all the time, at the head of every page with content. (Title and Author - 2 know in which ebook am i reading at the moment)
i looked at the EPUB Best Practice Guide and some other Tutorials but it won't work...
I don't know where to place some code-snippets and how to declarate/place the text which should be shown in the running headline.
Is there someone who has some experience with page-templates who can help me
Or is there someone who understands my baaaad english

THX & Greetz
setzer is offline   Reply With Quote
Old 07-14-2009, 08:37 AM   #2
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
I don't have any experience with the page-template file yet, but it is what I intended to start looking into today (assuming work doesn't get too busy). If I figure out how to do running head using it, I'll post back.
Abecedary is offline   Reply With Quote
Old 07-14-2009, 08:47 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,166
Karma: 4792399
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I don't have experience either but:

1. The page templates are specific for Adobe Digital Editions readers, they are not in the ePUB standard (as far as I know), and other readers will probably not support that.

2. The way to have headers in the ePUB standard is by using the "display: oeb-page-head" CSS, property. This is currently not supported by ADE, but it seems it will be at some point. Other readers usually don't support it either, but it could be possible to convince the developers to do it.
Jellby is offline   Reply With Quote
Old 07-14-2009, 10:18 AM   #4
Abecedary
Exwyzeeologist
Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.Abecedary could sell banana peel slippers to a Deveel.
 
Abecedary's Avatar
 
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
Quote:
Originally Posted by Jellby View Post
1. The page templates are specific for Adobe Digital Editions readers, they are not in the ePUB standard (as far as I know), and other readers will probably not support that.
From what I've read so far, that does seem to be the case. It's one of the Adobe-specific extensions that they've added, and it's not in the formal spec at this point. On the surface, it seems like a decent idea since it allows the creator to specify variant layouts depending on screen/viewer size. More of a forward-thinking move on Adobe's part, but it remains to be seen how things play out, and whether it will ever be formally adopted.
Abecedary is offline   Reply With Quote
Old 07-14-2009, 11:19 AM   #5
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: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
The 'oeb-page-head' and 'oeb-page-foot' CSS properties as well as 'oeb-column-number' are currently supported by the eBookwise .IMP format as noted in this thread.

These are defined as OPS 2.0 extras/extensions that could become part of ADE's implementation of ePub based on this 2007 blog posting (near the bottom of that page). two years ago...
nrapallo is offline   Reply With Quote
Old 07-14-2009, 11:41 AM   #6
setzer
Enthusiast
setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.
 
Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
Quote:
Originally Posted by Jellby View Post
2. The way to have headers in the ePUB standard is by using the "display: oeb-page-head" CSS, property. This is currently not supported by ADE, but it seems it will be at some point. Other readers usually don't support it either, but it could be possible to convince the developers to do it.
thanks fo replies

in my oppinion ADE is supporting these things.. only the sony does not

and when i'm using display: oeb-page-head
should i have this .xpgt file included in epub ?
because i don't know how to get a connection between the template file and the content files...
everything i've tried will not work...

thx again
setzer is offline   Reply With Quote
Old 07-14-2009, 11:53 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,166
Karma: 4792399
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by nrapallo View Post
The 'oeb-page-head' and 'oeb-page-foot' CSS properties as well as 'oeb-column-number' are currently supported by the eBookwise .IMP format as noted in this thread.
Great, now we only need it in ePUB.

Quote:
Originally Posted by setzer View Post
in my oppinion ADE is supporting these things.. only the sony does not
Last time I tried the desktop ADE, it didn't support oeb-page-header. Well, it does recognize it as a valid value, but does nothing with it, so that the header is displayed as if it were normal text.

Quote:
and when i'm using display: oeb-page-head
should i have this .xpgt file included in epub ?
Hmm... the "display: oeb-page-head" goes in the CSS file, not in any .xpgt file or whatever (which I have never used). It's to be used like this:

Code:
<h1>Chapter 1</h1>

<div class="header">Chapter one, running header</div>

<p>Once upon a time...</p>
and then, in the CSS file (which can be inlined) you have:

Code:
div.header { display: oeb-page-head; }
Jellby is offline   Reply With Quote
Old 07-14-2009, 12:02 PM   #8
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: 2530531
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 Jellby View Post
Great, now we only need it in ePUB.
Well, this CSS property definitely is documented (I even provided actual examples) and just ready to be scooped by any ePub aware ebook reader....
nrapallo is offline   Reply With Quote
Old 07-15-2009, 05:11 AM   #9
setzer
Enthusiast
setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.
 
Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
thanks again

hum... so i think i have to use the xpgt file... because this is supported by ADE
does anyone has some experience with this page-template thing?
setzer is offline   Reply With Quote
Old 07-24-2009, 06:44 PM   #10
swr2408018
Enthusiast
swr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enough
 
Posts: 35
Karma: 501
Join Date: Jul 2007
Device: PRS-500
I'm able to get the page-template working up to a point:
a) The books pages appear properly with a reserved space for a header
b) I can assign text to the header region
c) Said text only appears on the first page, not on subsequent pages made with the same template and page master

I can put the fragments I used to get this much working on the thread if there's interest. Does anyone know to make the text appear on all pages made from the same template?

Steve
swr2408018 is offline   Reply With Quote
Old 07-24-2009, 09:20 PM   #11
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by swr2408018 View Post
I'm able to get the page-template working up to a point:
a) The books pages appear properly with a reserved space for a header
b) I can assign text to the header region
c) Said text only appears on the first page, not on subsequent pages made with the same template and page master

I can put the fragments I used to get this much working on the thread if there's interest. Does anyone know to make the text appear on all pages made from the same template?

Steve
i'd be interested to see your code. i've not played with the page template at all so far but i'd like to take a look at it.
zelda_pinwheel is offline   Reply With Quote
Old 07-25-2009, 04:52 AM   #12
swr2408018
Enthusiast
swr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enough
 
Posts: 35
Karma: 501
Join Date: Jul 2007
Device: PRS-500
Code snippets for headers and footers with epub+adobe extensions

Here's as close as I could get:

1) Create template.xpgt with this content (adapted from the ADE "best practices" code--my selection code is a little simpler):

<ade:template xmlns="http://www.w3.org/1999/xhtml"
xmlns:ade="http://ns.adobe.com/2006/ade"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>

<!-- list of page master definitions -->
<fo:simple-page-master master-name="header_body_and_footer">
<fo:region-before extent="1.5em"/>
<fo:region-body margin-top="1.5em" margin-bottom="1.5em"/>
<fo:region-after extent="1.5em"/>
</fo:simple-page-master>

<!-- page master selection -->
<foage-sequence-master>
<fo:repeatable-page-master-reference master-reference="header_body_and_footer"/>
</foage-sequence-master>

</fo:layout-master-set>

<ade:style>
<!-- dynamic styling rules -->
<ade:styling-rule selector=".header" display="adobe-other-region" adobe-region="xsl-region-before"/>
<ade:styling-rule selector=".footer" display="adobe-other-region" adobe-region="xsl-region-after"/>
</ade:style>

</ade:template>

2) Add the template to the manifest:

<item id="template" href="template.xpgt" media-type="application/adobe-page-template+xml" />

3) Link to the selector logic through CSS definitions in style.css:

p.header {
text-indent: 0;
text-align: center;
font-weight: bold;
}

p.footer {
text-indent: 0;
text-align: center;
font-weight: bold;
}

4) Invoke all this machinery with code in the xhtml file:

<p class="header">Jane Austen&mdash;Pride and Prejudice</p>
<p class="footer">Chapter 1</p>

<h1 style="page-break-before:auto" id="toc-anchor-Chapter-1">Chapter 1</h1>

<p>It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.</p>

...

Here is what works:

a) All the pages in the book are created with reserved space at the top and bottom per region-before and region-after up in 1) above.

b) The first page of text generated from this code has the header and footer in those reserved spaces. Thanks to the layout in "em" terms, it all scales nicely at different reader size settings.

Here is what doesn't work:

c) No other pages will have the header and footer text. If I add the same header and footer declarations later in the text, the page output for that point in the text will also have the header and footer. However, it clearly isn't possible to scatter hundreds of these through the text to make sure that all pages end up with header and footer text!

As far as I can tell, this is exactly "by design". In the world of XSL-FO, a flow of text into any of the five regions is only intended to be presented on one page. The mechanism XSL-FO provides for recycling text from one page to the next is <fo:static-content .... />, either with fixed text, with text that contains pre-defined running values like page #, or with a marker that can be redefined at will by additional directives in the text ("running headers")

The ADE "best practices" docs and samples don't show how to add static-content elements to the XSL; these elements are supposed to occur in the scope of a <foage-sequence ... /> element . I've tried a number of variants for adding these elements to the template file, but most of them hung or crashed both ADE and the Sony reader software. If they ran at all, I didn't get the expected static text appearing in the header or footer space. I suspect that the XSL parser in ADE et al only supports a subset of XSL-FO.

I'm about ready to give up on this; my remaining hopes:

A) I haven't yet tried adding XSL-FO directly to the xhtml file to see if that works any better.
B) Someone with better understanding of XSL-FO may have other suggestions.
C) If anyone has seen an epub book with chapter headers, it should be easy to reverse engineer.

However, as pointed out earlier in this thread, the XSL-FO approach Adobe has provided runs against the grain of the standard. Since the best reason for switching from LRF to epub is to get something that will reliably deploy cross-platform, I'd hate to spend a lot of time ironing out the kinks here, only to have to replace them 6-12 months from now. So I'd appreciate any help or insights you or anyone else has, but I'm also hoping that anything we find is easy to swap out.

Thanks for any help!

Steve
swr2408018 is offline   Reply With Quote
Old 07-25-2009, 04:54 AM   #13
swr2408018
Enthusiast
swr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enoughswr2408018 will become famous soon enough
 
Posts: 35
Karma: 501
Join Date: Jul 2007
Device: PRS-500
Looks like I got emoticons for : followed by p. Apologies! Steve
swr2408018 is offline   Reply With Quote
Old 07-27-2009, 12:18 AM   #14
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: 2530531
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 swr2408018 View Post
Looks like I got emoticons for : followed by p. Apologies! Steve
Actually, you can edit your post and below the Additional Options and above the Manage Attachments button, you can checkmark the "Disable smilies in text" option.

This will disable ALL emoticons for THAT post. It's all or nothing, but is useful when posting code.

In other cases, just placing a space between the ':' and 'p' works as well AND allows other emoticons to be used.

Just a FYI!
nrapallo is offline   Reply With Quote
Old 07-27-2009, 03:53 AM   #15
setzer
Enthusiast
setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.setzer has a complete set of Star Wars action figures.
 
Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
Quote:
Originally Posted by swr2408018 View Post
I'm able to get the page-template working up to a point:
a) The books pages appear properly with a reserved space for a header
b) I can assign text to the header region
c) Said text only appears on the first page, not on subsequent pages made with the same template and page master

I can put the fragments I used to get this much working on the thread if there's interest. Does anyone know to make the text appear on all pages made from the same template?

Steve
i got exactly the same problem....
setzer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
page-template.xpgt conversion problems in ePub slantybard Conversion 17 04-19-2011 05:44 AM
Kindle DX optimal "page" size - PDF or Word template guiyoforward Amazon Kindle 12 09-28-2010 07:05 PM
page-template ? setzer Calibre 13 07-27-2009 11:23 PM
Content For My Illiad : BBC Headline News jæd iRex 29 05-29-2009 02:49 AM
Headline in MOBI output (title and author) Tempvs Calibre 2 05-25-2009 02:22 PM


All times are GMT -4. The time now is 02:26 AM.


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