![]() |
#1 |
Enthusiast
![]() ![]() ![]() Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
|
![]()
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 ![]() |
![]() |
![]() |
![]() |
#2 |
Exwyzeeologist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#3 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,542
Karma: 19001583
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. |
![]() |
![]() |
![]() |
#4 |
Exwyzeeologist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
|
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.
|
![]() |
![]() |
![]() |
#5 |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
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). ![]() |
![]() |
![]() |
![]() |
#6 | |
Enthusiast
![]() ![]() ![]() Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
|
Quote:
![]() 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 |
|
![]() |
![]() |
![]() |
#7 | |||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,542
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
![]() Quote:
Quote:
Code:
<h1>Chapter 1</h1> <div class="header">Chapter one, running header</div> <p>Once upon a time...</p> Code:
div.header { display: oeb-page-head; } |
|||
![]() |
![]() |
![]() |
#8 |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() ![]() ![]() 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? |
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#11 | |
zeldinha zippy zeldissima
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() 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 --> <fo ![]() <fo:repeatable-page-master-reference master-reference="header_body_and_footer"/> </fo ![]() </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—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 <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 |
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() Posts: 35
Karma: 501
Join Date: Jul 2007
Device: PRS-500
|
Looks like I got emoticons for : followed by p. Apologies! Steve
|
![]() |
![]() |
![]() |
#14 | |
GuteBook/Mobi2IMP Creator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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! |
|
![]() |
![]() |
![]() |
#15 | |
Enthusiast
![]() ![]() ![]() Posts: 33
Karma: 264
Join Date: Mar 2009
Device: Sony PRS-505, Amazon Kindle2, Palm, iPhone
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |