View Full Version : Unusual ID


curiousgeorge
08-08-2012, 12:03 PM
I have a valid epub that was given to me by a friend to examine. I see in one particular page it shows the h2 class but than it shows two ids.

One id is

<a id="page_393"></a>


the second:

<a id="ch24"></a>

I understand the second and see it in the toc.ncx file and it calls the page

<navPoint id="30" playOrder="30">
<navLabel>
<text>Text here</text>
</navLabel>
<content src="xhtml/chapter24.html#ch24"/>
</navPoint>


but when epub is viewed in adobe digital page 393 is not right. Im trying to figure out where the id 393 is being called at and what it is for.

actual code:

<h2 class="h2"><a id="page_393"></a><a id="ch24"></a>


edit:
and contents appears to do the same thing:


<h2 class="h2"><a id="page_6"></a><a id="page_7"></a>Contents</h2>


By looking at it it appears to be an order structure???

Jellby
08-08-2012, 12:25 PM
Those are probably anchors marking the pages in some printed edition of the book. They are probably invisible, and may be actually unused. They do no harm and only take some space (some caution may be necessary with the spacing around them, though), and could be useful for future references... They have absolutely no relation with the "page" number that ADE might show.

JSWolf
08-08-2012, 05:26 PM
Removing these page numbers ID tags is actually a very good idea as then the page number ADE displays is a lot more accurate to show the size of the ePub. You don't need to jump to an anchor point in the ToC since you would just be jumping to the top of the page in that chapter's XML.

Also, for most of your paragraphs, just use <p>text of the paragraph</p> and again, you will have more accurate page numbers. Just remember to proper define the p style.

for example...

p {
margin-top: 0;
margin-bottom: 0;
margin-right: 0;
margin-left: 0;
text-indent: 1.2em
}

And if you need to modify the paragraph style such as a paragraph with no indent, use...

<p class="noindent">text of paragraph</p>

.noindent {
text-indent: 0
}

Doitsu
08-08-2012, 06:29 PM
It looks like the book contains a pagemap (http://wiki.mobileread.com/wiki/Adobe_Digital_Editions#Page-map).

curiousgeorge
08-09-2012, 11:29 AM
I dont know what it is. I was tasked with fixing epubs so I am learning as I go. So far I have 15 epubs corrected and validate to epub 3.0. Still learning what some errors mean.

JSWolf
08-10-2012, 09:28 PM
I dont know what it is. I was tasked with fixing epubs so I am learning as I go. So far I have 15 epubs corrected and validate to epub 3.0. Still learning what some errors mean.

Please don't make then ePub 3. That will cause all kinds of trouble that you don't want and don't need. Most readers/reading apps won't work with ePub 3.