![]() |
superscript code
Hi
I was used to write this in the CSS file Code:
sup { What would be the reason for a faulty display of the above code? What would be the other proposals for ePub3 books? 1. Trust the user agent? (with a "naked" sup tag) 2. When possible, use special characters such as SUPERSCRIPT TWO (\00b2) 3. With suitable font, use open-type alternates such as: font-variant-position: super (text-top?); font-variant-numeric: ordinal; 4. ? |
I like to use "line-height:0" in super-/subscripts to avoid the uneven line spacing.
|
Quote:
See my responses in the 2016 thread: "font with full super/under script support?" Quote:
If it's Footnotes, then it's better to use the basic bracketed form [##] instead: Code:
<p>This is an example.<a href="#fn1" id="ft1">[1]</a></p>If the <sup> is for something else, then it's probably best to use it, because you still want your HTML markup to actually be meaningful. :D And remember: Users can override CSS (like Moon+) + read in different ways (devices/sites without your book's CSS). See some of that discussion in "Colored Text, EPUB, Android Dark Mode". |
Quote:
|
Quote:
AMEN brother. I just went through agonies with a customer. He'd created 3 different types of "notes." He had on-page footnotes (asterisms); he had end notes (numbered notes that elaborated on the content of the on-page footnotes and had author's thoughts about this or that) and then, he had source notes, sourcing the materials for each 'set' of notes. I cannot tell you what we went through, with the eBooks. I had warned him that the superscripts were hard to tap. FIRST, he wanted them separated--so you'd have footnotes, and then end notes and then the (linked, mind you) author's notes/source notes. But no, when that came out, he didn't like it. It was too "hard" for the reader to have to click, go to the end notes list, read what he wanted and then click back. Then he agreed that the superscripted note numbers should be bracket-number-bracket, full sized. Hooray. Then he decided that the so-called "endnotes" would be in numerical sequence, with the footnotes. So, we ended up with (you cannot make this s**t up): [1] 2 [3] 4 5 ... with the non-bracketed so-called "end notes" smaller than the bracketed footnotes. He seemed to think that the reader was going to "infer" that they were meant to read the bracketed content, but only read the non-bracketed content when the book was finished. (Before you ask, no, there was no disclaimer, no nuthin' about this). BUT WAIT, THERE'S MORE... then, when he got the ePUB, and put it into KP3, he was unhappy that the bracketed notes popped up in the on-page popups, but the non-bracketed didn't. (Same identical coding, btw. No idea why some did and some didn't.) I finally gave up. Like, 60+ emails about this topic. When he was unhappy about which notes did and didn't, popup, I sort of lost my s**t. I said "I warned you and I can't tell you what will happen until the book is actually published," (because Amazon is not forthcoming on why certain HTML works for footnotes and why some doesn't.) Honestly. I really wish that people would just get their heads out of their asses and do normal, tappable footnotes. I read on devices *all the time* and I do not want to need a stylus, to tap a footnote. Hell, I'd say make it bold and large and bracketed, myself. Did anybody here read that Churchill book with the DISASTROUS footnote/endnote debacle? The Kindle or ePUB version? This one: https://www.amazon.com/gp/product/B079R3VH13 Oh-em-gee, what an abortion that thing was. 1100 pages and IDK how many foot/endnotes. Hitch |
Quote:
And I can now say I truly hate the new Kindle eBook preview. It's worse then God awful. :angry: |
Thank you all for your comments.
Culprit found: line-height value I checked the book which suffers from a faulty display of the value "text-top" with the help of the Inspector of the Calibre editor. I checked namely a sup tag. I have found that at the above level (that is paragraph), the style definition used the value: line-height:140%; Once removed this line-height value, the sup tag display was again correct. If one does not want to suppress this 140% value of line-height for paragraph, the most logic solution is to add a different value of line-height to the sup tag (as Jellby advised). This value will be displayed in priority due to the application of CSS rules. Adding line-height:1; looks OK. YMMV |
Quote:
|
Quote:
There are plenty of superscript things that aren't footnotes (chemical formulas, equations, etc.). Quote:
Quote:
Jellby's solutions have always worked as long as I can remember. |
Quote:
2013: "A link to jump back to the original start point?" (Post #16) + Post #19 Or everyone remembers the famous "footnoteception" thread! 2018: "Endnotes within Endnotes" Lots of great discussion within those threads. :) That book I showed had 3 sets of footnotes (Author + Editor + Translator) + absolutely massive (one took up 7 pages!). And back in 2018, I came up with the updated "A1" + "E1" + "T1" forms, instead of having various mixes of symbols/letters/numbers. Quote:
With the superscript numbers, the <sup> font is teeny tiny. Trying to click on a super skinny '1' or '*' is just impossible. Quote:
So at the very end of the ebook, you'd have:
or only 2, if you include footnotes at the very end of each chapter. Quote:
NO! They'd have to be completely distinct numbering schemes. And in the merged notes file, you could put them in chronological order. See that Jean-Baptiste Say book I linked in the topic above. Each set of notes numbered from 1->99, and placed in the order they appear within the text. - A1 - A2 - E1 - A3 - E2 - T1 - [...] Quote:
If you're going to be doing something arcane/non-standard, you'd definitely have to explain this somewhere. The very first footnote is a great location. For example, I believe I stuck an[*] footnote as the very first one, which broke down the A# + E# + T# system. Quote:
Did it work in the actual published book though? Perhaps the firmware heuristically detects which type you're using (by looking at the first one or two), then disables the other alternates? Quote:
|
Quote:
The sup tag can make use of its user agent (what I named a "naked" tag). However it's most frequent value for vertical-align is super which may create gaps between lines with text using a tight line-height. You can check this using the inspector of the Calibre editor. I do not use sup tags for notes. For note anchors, I use a a tag with a class. By the way, if this anchor class uses the value text-top, you'll be advised to escort it with Code:
line-height:1;Before October 2019, I also took care to insert brackets for note anchors. After this date, for my personal use, Koreader put an end to my suffering and allowed me to use inline notes (ePub3) or pop-up notes as an option which do not require such a step. Of course, if you publish or convert a book, you may have to insert brackets, bold, color, emoticons, whatever suits better... :) Since this post has been interpreted as a post dealing with notes (it's not, it's about superscript), I'll share with you an aside-unrelated-note. [aside] In chess, the so-called mildly ironical "French school of suffering" expression has been coined after Maxime Vachier-Lagrave's play. Though he is one of the best current chess players, he was used to start unwillingly many of its games with a defective opening and, most of the time, managed later to set up quite a resilient but long and painful defence, hence the above name. Of course, these tremendous efforts could have been avoided if he had efficiently prepared these openings to begin with... [/aside] |
Just note that "line-height:1" is not the same as "line-height:0". The former may still change the line spacing, the latter shouldn't, or at least in far fewer situations.
|
1 Attachment(s)
Indeed.
I join an ePub where I did test this. The body has a line-height of 140%. There are some paragraphs, one sup tag for each paragraph. You can try the display with the value line-height:1; in the CSS or suppress it, or check it with line-height:0; There are also two kinds of spans with which you can make the same kind of experiments. For what I've found, the most reliable display is with the value line-height:1; I tried it with Calibre 5.17. and Koreader. |
Quote:
|
Yes 5.17. I corrected it at the time of your post. They crisscrossed.
Thank you for your quick report. |
Quote:
Warning--buy head protection first, so that when you start clunking your head on the desk, I won't suffer guilt that I caused you brain-damage. Hitch |
Quote:
|
Quote:
There are more than 983 links back there, trust me. What's interesting is that this book, too, has footnotes and endnotes--and the latter are NOT linked. You click and guess what? Nuthin'. That's what. Hitch |
It's a bit unkind to call that a Churchill book. It's actually an Andrew Roberts book!
Sounds like Mr Roberts committed the sort of nonsense up with which Churchill would not have put. |
Quote:
The thing is a horror, in eBook format. I don't know what they did, what they were thinking...it's boggy as hell (which, yes, was going to occur with over 1100 pages), and the reality I faced, when I clicked links that took me to the NOTES section, but *not to the note in question,* that was pretty mind-blowing. Hitch |
Quote:
I'll have to add that to my notes. Superior Letters is the term, and you can find more examples here: https://en.wikipedia.org/wiki/Superior_letter There's also the Ordinal Indicator (a little superscript 'a' or 'o' or '°' [degree sign] that used while marking first/second/third place): https://en.wikipedia.org/wiki/Ordinal_indicator Quote:
If you want to send me a DRM-free version for research purposes, I'd be open though. Quote:
Within the text, they're superscripted. They're also jammed together, so if two notes are next to each other, you get: 1fn1 :smack: (Another reason why brackets are good in ebooks, then you'll see a more distinct "[1][fn1]".) When you jump to the actual note chapters... Endnotes are jammed into one enormous paragraph with a bunch of non-breaking spaces between. Something along these lines: Code:
<p><a href=""><span class="bold">1</span></a><span class="bold">.</span> WSC, <span class="italic">Marl</span> I p. 33 <a href=""><span class="bold">2</span></a><span class="bold">.</span> James, ‘Churchill, the Man’ p. 5 <a href=""><span class="bold">3</span></a> [...]Footnotes, you get all of them wrapped in <blockquote> + centered... and similarly ugly code with millions of useless non-breaking spaces before/after numbers: Code:
<blockquote><span> <sup><small><a href=""><span>fn1 </span></a></small></sup> So nicknamed because of his earliest courtesy title, the Earl of Sunderland, rather than because of his disposition.</span></blockquote>And this thing was published in 2018!!! How does this abomination not have a KQN (Kindle Quality Notice)? That big, red banner should be scaring away buyers and knock some sense into whoever created that hideous thing. |
Quote:
With all those links, there are some that don't work? WOW! |
Quote:
Quote:
I have no idea if this abomination can be fixed. I would drop all of the footnotes as WTF does this mean OB I p. 19 and CS I p. 293. The notes are meaningless. |
Quote:
|
Quote:
|
Quote:
|
Quote:
Code:
AbbreviationsThousands of extra words would be needed if you were writing out the entire full (or even short) title... turning your 1100 page book into 1400. (See Side Note below for real-life example.) Another Abbreviations Example Dumas Malone wrote a fantastic 6-volume work on Thomas Jefferson, "Jefferson and His Time". Each one is ~600 pages with ~1000-1500 footnotes each. Towards the end of each book, he had a chapter with a "List of Short Titles": Code:
Ford Writings of Thomas Jefferson, ed. by P. L. Ford.
would be equivalent to the fully written out form:
* * * Complete Side Note: Short Titles + Selected Bibliography Short Titles can also be done in 2 ways. By using:
For example, a few years ago I worked on a 600-page History book with ~2000 footnotes. Here was the full citations before I got my hands on them:
After:
+ Selected Bibliography:
Isn't that so much more readable? ~500 fully-typed out citations were condensed into 88 in the Selected Bibliography. Using Short Titles, ~3000 words were shaved from the book. Let's say your book was still too long (like 1100 pages)... you'd cut thousands more words just by changing Short Title -> Abbreviations:
You can see how that would cut down the size of footnotes dramatically. |
But the abbreviations would mean either having to try to remember what they mean or having to go and refer to the list when you did forget.
Given that most people don't care about what book some passage or information came from, I would just dump the footnotes. Then I can dump the sections that the footnotes refer to. |
Quote:
Just stop it before you even make more of a fool out of yourself. |
Hi
Looking after this archeological and nice post, I feel eleven years younger.:) https://www.mobileread.com/forums/sh...0&postcount=70 What I find interesting, is that the sup tag here uses three attributes (the values of which are moreless a matter of taste) and the three of them concur nicely to provide a stable display for the superscript text. That was also my major point (nothing new). - vertical-align (I've chosen text-top) - font-size (I've chosen smaller) - line-height (I've chosen 1) Now a note on note anchors (no more superscript only). As many still use brackets (I understand there is a need to enlarge the clicking surface, but I can't help thinking it looks artificial and it should not be a long term solution), these users have to take into account the sheer height of a bracket versus a plain digit or a lowcase letter. It must have an unfavourable impact over the vertical positioning of the note anchor. It would seem logical to replace the bracket by a dash so as not to perturb it but this would have to face established usage... Well... |
Quote:
- If you can count these anchors (and only these anchors), then you can give them a specific class. - You do the same for the definition endnotes (count, give a class). Mind, both counts must be identical. - Then the plugin FootnoteLinker can automatically create links for all these left over endnotes. If you provide me with a scrambled copy of this book, I can make a try. |
Quote:
Hitch |
Quote:
|
Quote:
Brackets, right inline[1] are much, much easier to tap. I've even sometimes used a background gray shade, over the 3-4-5 chars [123] (assume a gray-shaded background there) to show the reader where to tap. I think it's vastly superior to superscripts and i was an adamant supporter of superscripts for a long time. No longer. Ease of use and effectiveness is my motto these days. Hitch |
Quote:
But....but....but... It has to loook pretty....:bucktooth |
Quote:
|
Quote:
Quote:
Some sites do a similar thing when displaying RPNs (Real Page Numbers). Quote:
Quote:
I acquired mine via the high seas library! As I said, only grabbed for research purposes. It was a Calibre-converted version though (oh, how that grinds my gears), so that's why I only took guesstimates at how the original code looked. ... But now that you mentioned it, I hunted down an actual EPUB. (Original is a 39.4MB EPUB, not the 11MB converted junk.) * * * Now, this is the true code: Within the text: Spoiler:
In the Endnotes chapter: Spoiler:
In the Footnotes chapter: Spoiler:
Notes: In the frontmatter:
then in the backmatter:
I ran through Kindle Previewer 3 to test. Clicking on:
I couldn't reproduce broken/wrong links, although I only clicked on a handful of notes. Honestly, it doesn't seem so, so bad. It could easily be regexed into submission. And then one regex to split all those endnotes into actual individual paragraphs... that might even fix the popup issue. I think the only real "issue" is the sheer size of this behemoth:
|
Thanks for posting the code online.
So footnotes are OK. With the aside, one can get pop-up (or inline notes). As you said, the problem lies with these 5000+ endnotes. They use a "classical" code. As I have only one code example, I can only suppose that they do not link to each corresponding individual endnote paragraph but to the same and-huge-endnote folder. Code:
Every endnote is wrapped in a:This seems doable but it's more easily said than done... The code seems to allow it (count and class seems OK) but would probably need to be simplified or cleaned (unified?) using regex. Also, I know that for over 2000 notes, once the links have been created, one has to split the endnote folder in two or three parts. With 5000 (!), it would be more. If it was made working, the display of the individual notes numbers in the anchors would probably not be very nice. [4795] really? A bit distracting. We would have to use a smallish font-size... That's all I can say... |
Quote:
Damn damn damn. Now I'm going to have to mess with it. I have work and other work this weekend--slave labor in menial garage-clearing chores that cannot wait--but I'll see if I can find the instances I'm talking about. I SWEAR, there are more unworking things, in Churchill and Notes, than are dreamt of in your endote philsophy, Tex! Hitch |
Quote:
Frontmatter: <a href="../Text/chapter028_notes.xhtml#ch28_3" id="ch28-3">3</a> Backmatter: <a href="chapter028.xhtml#ch28-3" id="ch28_3">3</a> Just the thing is, it's just one giant <p> with individual <span>s. Quote:
You'd just: Find: <span class="strong"><a href="chapter Replace: </p> <p class="endnote"><span class="strong"><a href="chapter Then Prettify, and bing, bang, boom, every endnote is in its own paragraph. All links would still be the same/working. Quote:
Quote:
In total, ~673 KB of endnotes + ~135KB of footnotes. But once you strip bloated code, you can usually squeeze notes into a single file. But yes, in this case of this many notes, individual files are great. :P Side Note: For example, that history book I mentioned above? One of the very rare cases I did separate notes files to stay under the ~300KB filesize limit: 7 chapters, ~430 KBs of footnotes. 1 normal chapter was even ~40k words (~350KB), so I had to split that in half. I think I've only ever done 2 or 3 books where I had to do that... Quote:
The author originally had per-book numbering—1->1900. I suggested going with per-chapter numbering—1->### + 1->###. That "one/two character difference" saved so many pages, plus made the text much more readable. In later chapters, you had the absurd superscript 1000s taking up huge portions of the actual lines!
Luckily, this Churchill book, they made the sensible per-chapter choice. :P Quote:
A potential hickup is the footnotes chapters are marked as non-linear in the spine, so perhaps that was breaking the jump back/forth. Quote:
Another thing that could've happened is maybe you have an older version of the file. Was an updated one released? From the metadata, looks like the book was released: 2018-09-19 but in my actual zipped up files metadata, I see: 2018-10-04 Although that could just be an artifact of when it was DeDRMed. (I dug through the EPUB's metadata and couldn't find any info on a tool, version numbers, or when files were created.) But maybe you purchased close to release and got some awful 1st copy. Don't most of the stores stick you with one whatever version was latest at the time of purchase, in order for Highlights/Syncing to stay in tact? Side Note: A while back, when I reported that wrongly-marked-language ebook, I was made aware that Kobo does this too! He told me the version on their server already had my error fixed... and the only way to get the updated file is to inform Kobo so they could update it on your account! ABSURD!!! I want the goddamn latest version all the time. That's how it was when I used to purchase+download from B&N. (But they've since gone completely down the toilet.) |
| All times are GMT -4. The time now is 10:20 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.