![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
superscript code
Hi
I was used to write this in the CSS file Code:
sup { vertical-align: text-top; font-size: smaller; } 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. ? |
![]() |
![]() |
![]() |
#2 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I like to use "line-height:0" in super-/subscripts to avoid the uneven line spacing.
|
![]() |
![]() |
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
See my responses in the 2016 thread: "font with full super/under script support?" Depends. What's your use case? 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> [...] <p class="footnote"><a href="#ft1" id="fn1">[1]</a> This is the footnote.</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. ![]() 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". Last edited by Tex2002ans; 05-17-2021 at 10:26 AM. |
|
![]() |
![]() |
![]() |
#4 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,258
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
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 |
|
![]() |
![]() |
![]() |
#6 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,258
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
And I can now say I truly hate the new Kindle eBook preview. It's worse then God awful. ![]() |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
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 Last edited by roger64; 05-18-2021 at 03:59 AM. Reason: rules |
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,258
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
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. Last edited by Tex2002ans; 05-18-2021 at 06:46 PM. |
|||
![]() |
![]() |
![]() |
#10 | |||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
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:
Last edited by Tex2002ans; 05-18-2021 at 07:13 PM. |
|||||||
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
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] Last edited by roger64; 05-19-2021 at 12:07 AM. |
|
![]() |
![]() |
![]() |
#12 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
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.
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
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. Last edited by roger64; 05-19-2021 at 10:44 AM. Reason: 17 |
![]() |
![]() |
![]() |
#14 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,258
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Yes 5.17. I corrected it at the time of your post. They crisscrossed.
Thank you for your quick report. Last edited by roger64; 05-19-2021 at 07:34 PM. Reason: report |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superscript issues | carlsbad | Workshop | 3 | 07-30-2014 03:20 AM |
Superscript widow's | Themus | ePub | 2 | 10-02-2012 06:17 AM |
Superscript best practices? | DiapDealer | ePub | 19 | 04-14-2012 04:28 PM |
Superscript and Subscript | ramjet1953 | Sigil | 1 | 06-13-2010 07:15 AM |
Superscript in titles | paulpeer | Sigil | 5 | 01-20-2010 08:37 AM |