
On Mon, January 30, 2012 10:40 pm, don kretz wrote:
That's accomplished by embedding
sd ssdsd ssd khkjkj [pgnum]1153[/pgnum] khjh Ssd wwShk
You can do more powerful stuff if you don't embed immutable html markup. at exactly the right spot in the text flow.
This is virtually the same thing I do, except I place the page number in the "title" attribute instead of in phrasing content. This leads me to my first rule of HTML construction (mirrored in the DP "Proofreader's Guide to EPUB") which is: 1. Do not use markup that requires CSS. Style sheets are encouraged and recommended, but every HTML file must be acceptably legible when CSS is disabled. In your case, a CSS style of "a.pgnum {display:none}" would cause the inline page number to disappear, but it would still disrupt the text when CSS is disabled. I don't know if KindleGen supports the "display:none" style, but if it doesn't you would have page numbers throughout the text. I haven't given it a lot of thought, but I believe you could get a page number display similar to your example by using JavaScript and reading the "title" attribute of the <a> objects. Fancy browsers that support JavaScript could get the floating page number display, but they wouldn't be obvious in a less capable User Agent.