02-06-2012, 09:54 AM | #1 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Jul 2011
Device: Kindle
|
Foot Note Format
I'm trying to reformat the footnotes throughout my epub which I will be converting to mobi.
The issue was that all of my link id's were inside the <p> tags which referenced the CSS file and so if you used a link on a Kindle to get to a footnote or a chapter, the format of the text would be messed up, but if you flipped to it it was fine. So I fixed all the chapter headings and the endnotes and I am about to fix the endnote references throughout the chapter so when you go back to them from the endnotes they are still superscripted. My question is, what is the best way to link back to them? I've been playing with the book and it seems wrong that the links back to the references just give you the reference as the first character of the page but you can't see what the reference was actually for. I think it would be better if it linked back to the beginning of the sentence or the paragraph that the reference is in. I only have a few purchased books but none of them do this, is this irregular or frowned upon to do? If not then can anyone give suggestions for the best way to do this, possibly with regex? Thanks |
02-06-2012, 07:33 PM | #2 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
I'm not sure what you mean by this:
Could you post a sample of the xhtml code and the css? |
Advert | |
|
02-06-2012, 10:38 PM | #3 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Jul 2011
Device: Kindle
|
Sure, but to be clear, I have already resolved this problem. What I'm asking here is what is the common format for footnotes?
Here is the code just in case. This is how I fixed it, Code:
<a id="Part_1"></a><p class="Section-Heading" id="toc_marker-4"><a id="Anchor"></a>Part I</p> Code:
<p class="Section-Heading" id="toc_marker-4"><a id="Part_1"></a><a id="Anchor"></a>Part I</p> Code:
p.Section-Heading { font-size : 1.67em; font-style : italic; font-weight : normal; text-decoration : none; font-variant : normal; line-height : 0.78; text-align : center; color : #000000; text-indent : 0px; margin : 9px 0px; line-break-before:always; } |
02-07-2012, 02:57 AM | #4 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
in all the footnoted e-books that i have read, the footnote links back to the paragraph it came from. typically, a filepos structure is used e.g. filenote 4 has this coding
Code:
href="../Text/The_Quest__Energy%2C_Security%2C_an_split_041.html#filepos1482143"><span class="calibre10">4</span></a> i.e. the lines with footnotes are spaced wider than other lines. ( in ADE/ sony readers anyway) So I have altered the footnote numbers from superscripts to regular ( but small font ) numbers to overcome this. in paper books, this does not seem to be an issue, but in e-books it is often ugly Last edited by cybmole; 02-07-2012 at 03:01 AM. |
02-07-2012, 11:39 AM | #5 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
There are lots of ways to do things, and here's my take.
First of all, the problem I see with your improved code, Code:
<a id="Part_1"></a><p class="Section-Heading" id="toc_marker-4"><a id="Anchor"></a>Part I</p> I presume that you (OP) and cybmole want to avoid the situation where the return from the footnote places you back on a page with the footnote number itself at the top of the page, losing the context of the footnote until you go back a page. This can be avoided by putting the return target in a span which encloses however much context you want to include, thus: Code:
<p class="normal"> blah blah blah... <span id="ret-fn-1">Just a second, Danger, what about my pickle?</span><span class="footnote-reference"><a href="../Text/endnotes.xhtml#fn-1" >1</a></span></span> Code:
<p class="ttb-body-text-11-0-14-0"><span><a href="../Text/Chapter_0022.xhtml#ret-fn-1" id="fn-1">1</a></span> Rocky Rococo, as quoted by Firesign Theatre (1969)</p> And for completeness, here's the CSS I use for the superscripted footnote numbers: Code:
span.footnote-reference { font-family: "Times New Roman" , serif; font-weight: normal; font-style: normal; font-size: 1.00em; vertical-align:super; color: rgb(0,0,0); text-decoration: none; } |
Advert | |
|
02-07-2012, 12:04 PM | #6 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
I really wouldn't bother with a link back from the footnote to the text. That's what the "Back" button/menu item/whatever on the reader is there for.
|
02-07-2012, 12:34 PM | #7 | |
Wizard
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
The "Zen of Kindle" dictates that reader uses the Back button to return from an endnote. This results in a clean return with the page displaying the same as before the jump to the endnote. The only need for a coded link back is if you intend to also keep the ePub version for distribution. |
|
02-07-2012, 12:48 PM | #8 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
for clarity
1. I did not author the example that I posted, just lifted it from a book that I can currently reading. 2. I hardly ever follow thru to read footnotes. as I use a sony touch screen PRS650 it requires using the stylus to accurately tap tha footnote number & the info thus found is usually just a book title. I'd prefer to have the foot note info embedded into the flow of main text, but in a smaller typeface. 3. I'd never thought of using back button to return, for a touch screen device, although the Sony does also have buttons... hmm - doesn't worjk, for this book anyway, the sony back button ( which is same as swipe for previous page) just steps back 1 screen in the footnotes list. the only way back is to tap the hyperlinked number with the stylus, & to carefully only single tap it, otherwise you get into dictionary lookup. Last edited by cybmole; 02-07-2012 at 12:51 PM. |
02-07-2012, 02:08 PM | #9 |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Footnotes
as far as i can see, actually no one has answered your question.
A reference to a footnote can look like this: <p class="does not matter"><a href="#footnote1" id="position1">Some visible text</a></p> The footnote with a backward reference like this <p class="footnoteclass"><a href="#position1" id="footnote1">Some visible text</a>more footnote text</p> This works fine for me (well, at xhtml/epub, i dont know what kindel does with this) How to get there with regex: I do not think that it's possible in one step, try to split the job, and exchange only parts of then string in one step. And there isn't a sample of your footnotes, so i can't see if there is alread a reference to jump back. to your css: What is line-hight: 0.78 ?? millimeters, centimeters, kilometers ? :-) |
02-07-2012, 02:20 PM | #10 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
that is well put. I'd never coded footnotes myself & could not see how to compute those file pointer #filepos numbers as per the example I cut n pasted from an actual text. I'm guessing that they are added when book code is converted from some other format into epub ?. I see them also in some retail .toc
PS original kindle had a "browser" back button but what about Kindle touch ? |
02-07-2012, 02:41 PM | #11 | |
Well trained by Cats
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
"filename1.html#washere" "filename1.html#tohere" While relative anchors are legal, Sigil can not cope if yo split the file and you end up with orphan references. I suggest you always include the Full filename path in a reference, just to be solid |
|
02-07-2012, 02:45 PM | #12 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
To make sure the same issue doesn't happen with footnotes, the same hoops would still need jumped through... The link in the main body of the text: Code:
<a id="position1" /><p class="does not matter">Some text that might<a href="#footnote1">[1]</a> need some clarification.</p> Code:
<a id="footnote1" /><p class="footnoteclass"><a href="#position1">[1]</a> Some clarifying text.</p> What "works" in making an epub is not usually the same as what "works" in making an epub that's going to be converted using Kindlegen. |
|
02-07-2012, 03:41 PM | #13 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
02-07-2012, 03:43 PM | #14 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
|
02-07-2012, 05:39 PM | #15 |
Well trained by Cats
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Linux] Note format reader and convertor | benlau | Sony Reader | 12 | 12-13-2018 04:35 PM |
Stylus + PDF support + Open note format | dataangel | Which one should I buy? | 2 | 12-31-2010 06:11 PM |
Text (.txt) files to PRS (.note) format | OutaDaDark | Sony Reader | 3 | 10-04-2010 01:26 AM |
What's the .NOTE format that DR800 uses for saved notes..? | martienne | iRex | 5 | 06-08-2010 01:40 PM |
How to convert .note to another format? | benlau | Sony Reader | 6 | 12-27-2009 10:09 AM |