MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub (https://www.mobileread.com/forums/forumdisplay.php?f=179)
-   -   superscript code (https://www.mobileread.com/forums/showthread.php?t=339458)

roger64 05-17-2021 01:01 AM

superscript code
 
Hi

I was used to write this in the CSS file
Code:

sup {
 vertical-align: text-top;
 font-size: smaller;
}

and be happy with it. For some reason, it does not seem to display so well recently(including with Calibre but not only). I had used text-top because super left too much space between lines.

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. ?

Jellby 05-17-2021 04:46 AM

I like to use "line-height:0" in super-/subscripts to avoid the uneven line spacing.

Tex2002ans 05-17-2021 10:26 AM

Quote:

Originally Posted by roger64 (Post 4122168)
2. When possible, use special characters such as SUPERSCRIPT TWO (\00b2)

No. Never use these.

See my responses in the 2016 thread: "font with full super/under script support?"

Quote:

Originally Posted by roger64 (Post 4122168)
1. Trust the user agent? (with a "naked" sup tag)

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>

Easier to click, easier to read.

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".

JSWolf 05-17-2021 04:43 PM

Quote:

Originally Posted by Tex2002ans (Post 4122252)
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>

Easier to click, easier to read.

That's my preferred method for footnotes.

Hitch 05-17-2021 05:50 PM

Quote:

Originally Posted by Tex2002ans (Post 4122252)
No. Never use these.

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>

Easier to click, easier to read.


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

JSWolf 05-17-2021 06:15 PM

Quote:

Originally Posted by Hitch (Post 4122387)
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

I've not read this, I've only seen a sample. How many maps does this think needs? Sheesh!

And I can now say I truly hate the new Kindle eBook preview. It's worse then God awful. :angry:

roger64 05-18-2021 01:38 AM

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

JSWolf 05-18-2021 04:11 PM

Quote:

Originally Posted by roger64 (Post 4122464)
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

You don't need a line-height of 1. You can take that out. In fact, you can take out the entire class. You don't need it. You also don't need <sup> for a footnote. You are best off with [##] (bolding it works well). You want the footnote to be large enough to be seen and pressed on.

Tex2002ans 05-18-2021 07:44 PM

Quote:

Originally Posted by JSWolf (Post 4122649)
You also don't need <sup> for a footnote. You are best off with [##] (bolding it works well). You want the footnote to be large enough to be seen and pressed on.

roger64 never mentioned what he was using the <sup> for.

There are plenty of superscript things that aren't footnotes (chemical formulas, equations, etc.).

Quote:

Originally Posted by JSWolf (Post 4122649)
You don't need a line-height of 1. You can take that out. In fact, you can take out the entire class. You don't need it.

No. It completely depends on the actual book's code/context.

Quote:

Originally Posted by roger64 (Post 4122464)
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).

Fantastic.

Jellby's solutions have always worked as long as I can remember.

Tex2002ans 05-18-2021 08:10 PM

Quote:

Originally Posted by Hitch (Post 4122387)
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.

Reminds me of that absolute mother of all footnotes I worked on:

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:

Originally Posted by Hitch (Post 4122387)
I cannot tell you what we went through, with the eBooks. I had warned him that the superscripts were hard to tap.

What's frustrating is I read on a smaller font on my phone.

With the superscript numbers, the <sup> font is teeny tiny. Trying to click on a super skinny '1' or '*' is just impossible.

Quote:

Originally Posted by Hitch (Post 4122387)
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.

Hmmm... What would be wrong with 3 separate endnote chapters?

So at the very end of the ebook, you'd have:
  • Footnotes.xhtml
  • Endnotes.xhtml
  • Author Notes.xhtml

or only 2, if you include footnotes at the very end of each chapter.

Quote:

Originally Posted by Hitch (Post 4122387)
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
...

W...T...F.

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:

Originally Posted by Hitch (Post 4122387)
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).

.....................

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:

Originally Posted by Hitch (Post 4122387)
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.)

Hmmm... strange, strange.

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:

Originally Posted by Hitch (Post 4122387)
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.

What's the exact problems?

roger64 05-18-2021 08:49 PM

Quote:

Originally Posted by JSWolf (Post 4122649)
You don't need a line-height of 1. You can take that out. In fact, you can take out the entire class. You don't need it. You also don't need <sup> for a footnote. You are best off with [##] (bolding it works well). You want the footnote to be large enough to be seen and pressed on.

I should have explained first my use case (which is generalized at least for French users). I use the sup tag for ordinals (like for XXe siècle, Ve armée) square or cubic roots (m3, km2), mathematical or chemical formulas, some titles and so on.

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;
as for the sup tag above.

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]

Jellby 05-19-2021 03:02 AM

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.

roger64 05-19-2021 07:08 AM

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.

JSWolf 05-19-2021 11:34 AM

Quote:

Originally Posted by roger64 (Post 4122799)
I tried it with Calibre 5.18. and Koreader.

5.18 doesn't exist yet. 5.17 is the current version.

roger64 05-19-2021 08:28 PM

Yes 5.17. I corrected it at the time of your post. They crisscrossed.

Thank you for your quick report.

Hitch 05-20-2021 01:21 AM

Quote:

Originally Posted by Tex2002ans (Post 4122694)


What's the exact problems?

You know what, sweetie? I would rather buy the book for you and have YOU look and see, than to try to explain it. Seriously. Ping me and lemme know if you want it.

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

JSWolf 05-20-2021 07:08 AM

Quote:

Originally Posted by Hitch (Post 4123054)
You know what, sweetie? I would rather buy the book for you and have YOU look and see, than to try to explain it. Seriously. Ping me and lemme know if you want it.

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

I've borrowed this Churchill book from Overdrive and it's really slow with ADE. It has 983 different links with a lot of them doubled in the back. It's a nightmare at best.

Hitch 05-20-2021 09:53 AM

Quote:

Originally Posted by JSWolf (Post 4123126)
I've borrowed this Churchill book from Overdrive and it's really slow with ADE. It has 983 different links with a lot of them doubled in the back. It's a nightmare at best.

YUP, that's it.

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

Notjohn 05-20-2021 11:57 AM

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.

Hitch 05-20-2021 12:57 PM

Quote:

Originally Posted by Notjohn (Post 4123258)
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.

Well, NJ, if you like, I could call it a paper book, which would be the most accurate in terms of its derivation, yeah?

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

Tex2002ans 05-20-2021 03:15 PM

Quote:

Originally Posted by roger64 (Post 4122710)
I should have explained first my use case (which is generalized at least for French users). I use the sup tag for ordinals (like for XXe siècle, Ve armée) square or cubic roots (m3, km2), mathematical or chemical formulas, some titles and so on.]

Ahhh yes, I always forget that little superscript 'e' in French.

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:

Originally Posted by Hitch (Post 4123054)
You know what, sweetie? I would rather buy the book for you and have YOU look and see, than to try to explain it. Seriously. Ping me and lemme know if you want it.

No need to waste money on such abominations. I'll acquire it elsewhere.

If you want to send me a DRM-free version for research purposes, I'd be open though.

Quote:

Originally Posted by Hitch (Post 4123179)
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?

Am I seeing this correct?
  • 1 = Endnotes
  • fn1 = Footnotes

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&nbsp;&nbsp;&nbsp;&nbsp;<a href=""><span class="bold">2</span></a><span class="bold">.</span> James, ‘Churchill, the Man’ p. 5&nbsp;&nbsp;&nbsp;&nbsp;<a href=""><span class="bold">3</span></a> [...]
Why? Just why?

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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<sup><small><a href=""><span>fn1&nbsp;&nbsp;&nbsp;&nbsp;</span></a></small></sup> So nicknamed because of his earliest courtesy title, the Earl of Sunderland, rather than because of his disposition.</span></blockquote>
At least it's not all in a single paragraph! :smack:

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.

JSWolf 05-20-2021 03:21 PM

Quote:

Originally Posted by Hitch (Post 4123179)
YUP, that's it.

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

Yes, there are more the 983 different links because there are a few out of book links. 983 is the number of different numbered links even though they are used in the back sometimes multiple times.

With all those links, there are some that don't work? WOW!

JSWolf 05-20-2021 03:41 PM

Quote:

Originally Posted by Tex2002ans (Post 4123355)
No need to waste money on such abominations. I'll acquire it elsewhere.

If you want to send me a DRM-free version for research purposes, I'd be open though.

I got mine from Overdrive. I refused to pay for it.


Quote:

Am I seeing this correct?
  • 1 = Endnotes
  • fn1 = Footnotes

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&nbsp;&nbsp;&nbsp;&nbsp;<a href=""><span class="bold">2</span></a><span class="bold">.</span> James, ‘Churchill, the Man’ p. 5&nbsp;&nbsp;&nbsp;&nbsp;<a href=""><span class="bold">3</span></a> [...]
Why? Just why?

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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<sup><small><a href=""><span>fn1&nbsp;&nbsp;&nbsp;&nbsp;</span></a></small></sup> So nicknamed because of his earliest courtesy title, the Earl of Sunderland, rather than because of his disposition.</span></blockquote>
At least it's not all in a single paragraph! :smack:

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.
I think this eBook should be reported to Amazon so it can be taken down.

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.

j.p.s 05-20-2021 04:11 PM

Quote:

Originally Posted by Tex2002ans (Post 4123355)
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.

Hah! It's officially "Great on Kindle" which implies it's been vetted by amazon.

JSWolf 05-20-2021 05:06 PM

Quote:

Originally Posted by j.p.s (Post 4123385)
Hah! It's officially "Great on Kindle" which implies it's been vetted by amazon.

As I don't have a Kindle version, does it slow down on a Kindle when you get past the pictures?

j.p.s 05-20-2021 05:28 PM

Quote:

Originally Posted by JSWolf (Post 4123405)
As I don't have a Kindle version, does it slow down on a Kindle when you get past the pictures?

I do not have any version of that book.

Tex2002ans 05-20-2021 07:40 PM

Quote:

Originally Posted by JSWolf (Post 4123374)
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.

... it's explained right in the beginning of the notes:

Code:

Abbreviations
General

AP      Avon Papers at Birmingham University Archives
[...]
CS      ed. Robert Rhodes James, Winston S. Churchill: His Complete Speeches, published in New York in eight volumes in 1974
[...]
OB      The Official Biography of Sir Winston Churchill. Vols. I and II by Randolph S. Churchill and vols. III to VIII by (Sir) Martin Gilbert, published in eight volumes between 1966 and 1988:
OB I    Winston S. Churchill: Youth 1874–1900  1966

When you're constantly referencing the same works over and over again, it's simpler/shorter to use abbreviations.

Thousands 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.
[...]
LC    Library of Congress. Unless otherwise indicated the references are to the Jefferson Papers.

So a footnote like this:
  • [20] To Small, May 7, 1775, LC, 1:140, partly printed in Ford, I, 453–455.

would be equivalent to the fully written out form:
  • [20] To Small, May 7, 1775, Library of Congress, 1:140, partly printed in Ford, P.L., ed. Writings of Thomas Jefferson, Vol. I, 453–455.

* * *

Complete Side Note:

Short Titles + Selected Bibliography

Short Titles can also be done in 2 ways. By using:
  • Full citation in first reference, then short every time after that.
    • Per chapter or per book.
  • Selected Bibliography
    • Short citation throughout book, full citation in bibliography.

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:
  • [162] George Fitzhugh, Sociology for the South, Or the Failure of Free Society, Richmond: VA, A. Morris Publisher, 1854, pp. 27–28.
  • [163] George Fitzhugh, Cannibals All! or Slaves Without Masters, Richmond: VA, A. Morris Publisher, 1857, p. 278.
  • [164] George Fitzhugh, Sociology for the South, Or the Failure of Free Society, Richmond: VA, A. Morris Publisher, 1854, p. 170.

After:
  • [162] Fitzhugh, Sociology for the South, pp. 27–28.
  • [163] Fitzhugh, Cannibals All!, p. 278.
  • [164] Fitzhugh, Sociology for the South, p. 170.

+ Selected Bibliography:
  • Fitzhugh, George. Cannibals All! Or Slaves Without Masters. Richmond, VA: A. Morris Publisher, 1857.
  • ———. Sociology for the South, Or the Failure of Free Society. Richmond, VA: A. Morris Publisher, 1854.

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:
  • [164] George Fitzhugh, Sociology for the South, Or the Failure of Free Society, Richmond: VA, A. Morris Publisher, 1854, p. 170.
  • [164] Fitzhugh, Sociology for the South, p. 170.
  • [164] SS, p. 170.

You can see how that would cut down the size of footnotes dramatically.

JSWolf 05-20-2021 08:22 PM

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.

Tex2002ans 05-20-2021 08:30 PM

Quote:

Originally Posted by JSWolf (Post 4123459)
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.

This is absurd. Footnotes and proper citations are an integral piece of all texts.

Just stop it before you even make more of a fool out of yourself.

roger64 05-20-2021 09:41 PM

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...

roger64 05-21-2021 12:21 AM

Quote:

Originally Posted by Hitch (Post 4123288)
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

What's the formatting used for anchors and definitions of these endnotes?
- 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.

Hitch 05-21-2021 11:01 AM

Quote:

Originally Posted by roger64 (Post 4123508)
What's the formatting used for anchors and definitions of these endnotes?
- 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.

I'm going to ask Tex to do this for me. I know, I know, I suck, but TEEEEXXXXX, can you sharesies with Roger, pretty please?

Hitch

Jellby 05-21-2021 12:33 PM

Quote:

Originally Posted by roger64 (Post 4123476)
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...

The bracket suggestion is instead of superscripting, and it's also common in plain-text contexts. In any case, adding brackets should not change at all the line spacing, if the brackets have the same size/position/etc. as the number. From the point of view of the line spacing, it doesn't matter which characters you have, they're just boxes with something drawn inside (or sometimes outside). What could happen is that a bracket clashes with the line above/below where another character wouldn't, but this shouldn't be the case in normal circumstances.

Hitch 05-21-2021 12:50 PM

Quote:

Originally Posted by Jellby (Post 4123664)
The bracket suggestion is instead of superscripting, and it's also common in plain-text contexts. In any case, adding brackets should not change at all the line spacing, if the brackets have the same size/position/etc. as the number. From the point of view of the line spacing, it doesn't matter which characters you have, they're just boxes with something drawn inside (or sometimes outside). What could happen is that a bracket clashes with the line above/below where another character wouldn't, but this shouldn't be the case in normal circumstances.

IMHO, Brackets work well. Even reading on my Oasis/Voyage/whatever it is, at font size 7, superscripts are a bear to tap. Worse on my Samsung Note 9 phone, which is hardly small for a phone.

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

Turtle91 05-21-2021 02:33 PM

Quote:

Originally Posted by Hitch (Post 4123671)
... Ease of use and effectiveness is my motto these days.

Hitch




But....but....but... It has to loook pretty....:bucktooth

Jellby 05-21-2021 02:44 PM

Quote:

Originally Posted by Turtle91 (Post 4123701)
But....but....but... It has to loook pretty....:bucktooth

Bold, fancy font, in gray color (to make it less intrusive)

Tex2002ans 05-21-2021 05:03 PM

Quote:

Originally Posted by Hitch (Post 4123671)
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.

Quote:

Originally Posted by Jellby (Post 4123703)
Bold, fancy font, in gray color (to make it less intrusive)

These are some pretty good ideas.

Some sites do a similar thing when displaying RPNs (Real Page Numbers).

Quote:

Originally Posted by Hitch (Post 4123632)
I'm going to ask Tex to do this for me.

Of course. Email me a copy and I'll convert whatever you need.

Quote:

Originally Posted by Hitch (Post 4123632)
I know, I know, I suck, but TEEEEXXXXX, can you sharesies with Roger, pretty please?

Share what now? lol.

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:
Quote:

<p class="EB03BodyTextIndented" id="chu0002819">‘Winston revelled over our success!’ wrote Brooke the next day.<sup class="EBsup"><a href="../Text/chapter028_notes.xhtml#ch28_3" id="ch28-3">3</a></sup><a class="noteref" epub:type="noteref" href="../Text/footnotes004.xhtml#ch28_1" id="ch28-fn1">fn1</a> [...]</p>


In the Endnotes chapter:

Spoiler:
Quote:

<p class="endnotes" id="chu0004795"><span class="strong"><a href="chapter028.xhtml#ch28-1" id="ch28_1">1</a>.</span> <em>CS</em> VI p. 6704&#160;&#160;&#160;&#160;<span class="strong"><a href="chapter028.xhtml#ch28-2" id="ch28_2">2</a>.</span> ed. Gorodetsky, <em>Maisky Diaries</em> p. 510&#160;&#160;&#160;&#160;<span class="strong"><a href="chapter028.xhtml#ch28-3" id="ch28_3">3</a>.</span> eds. Danchev and Todman, <em>War Diaries</em> p. 340&#160;&#160;&#160;&#160;[...]</p>


In the Footnotes chapter:

Spoiler:
Quote:

<aside class="footnote" epub:type="footnote" id="ch28_1" role="doc-footnote"><p class="EB02BodyTextFullOut" id="chu00493"><a class="footnote_return" href="../Text/chapter028.xhtml#ch28-fn1">fn1</a> Years later Brooke added, ‘I think this is the only occasion on which he expressed publicly any appreciation or thanks for work I had done during the whole of the period I worked for him’ (eds. Danchev and Todman, <em>War Diaries</em> p. 340). [...]</p>
</aside>


Notes:

In the frontmatter:
  • Every endnote is wrapped in a:
    • <sup class="EBsup">
    • <a
      • href="../Text/chapter028_notes.xhtml#ch28_3" id="ch28-3">
  • Every footnote is wrapped in a:
    • <a class="noteref" epub:type="noteref"
      • href="../Text/footnotes004.xhtml#ch28_1" id="ch28-fn1">

then in the backmatter:
  • Every endnote is wrapped in a:
    • <span class="strong">
    • <a href="chapter028.xhtml#ch28-1" id="ch28_1">
  • Every footnote is wrapped in a:
    • <aside class="footnote" epub:type="footnote" id="ch28_1" role="doc-footnote">
    • <p class="EB02BodyTextFullOut" id="chu00493">
    • <a class="footnote_return" href="../Text/chapter028.xhtml#ch28-fn1">

I ran through Kindle Previewer 3 to test. Clicking on:
  • Footnote does popup
  • Endnote jumps you to the enormous single paragraph.
    • In Sigil, cursor appears in actual note location.
    • No clue if actual device would jump there or to the beginning of the entire paragraph.

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:
  • 478k words
  • 5378 endnotes
  • 292 footnotes

roger64 05-21-2021 06:24 PM

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:

    <p class="endnotes" id="chu0004795">
    <span class="strong">
    <a href="chapter028.xhtml#ch28-1" id="ch28_1">

If one wishes to target each individual endnote paragraph from each anchor, it seems necessary to rebuild all the links for endnotes.

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...

Hitch 05-21-2021 06:37 PM

Quote:

Originally Posted by roger64 (Post 4123753)
Thank 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:

    <p class="endnotes" id="chu0004795">
    <span class="strong">
    <a href="chapter028.xhtml#ch28-1" id="ch28_1">

If one wishes to target each individual endnote paragraph from each anchor, it seems necessary to rebuild all the links for endnotes.

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 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.

However, even if it was made working, the display of the notes numbers would probably not be very nice. [4795] really? We would have to use a smallish font-size...

That's all I can say...

Crap, now I'm going to have to dive back into this file. I know--I know, because I had an argument about it with a customer who wanted all this fruitcakey footnoes+endnotes+author's notes (WTF?) stuff--that Churchill has non-working, non-fuctional notes. I forget what it is now, dammit, but either you get to the Endnotes and then can't get Back, or something.

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

Tex2002ans 05-21-2021 08:29 PM

Quote:

Originally Posted by roger64 (Post 4123753)
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.

The Churchill endnotes point directly to the correct location/ID:

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:

Originally Posted by roger64 (Post 4123753)
If one wishes to target each individual endnote paragraph from each anchor, it seems necessary to rebuild all the links for endnotes.

I don't see why.

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:

Originally Posted by roger64 (Post 4123753)
[...] but would probably need to be simplified or cleaned (unified?) using regex.

Normalized. One of my favorite terms. :D

Quote:

Originally Posted by roger64 (Post 4123753)
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.

Depends. Right now:
  • Each chapter's endnotes are split into its own files.
    • 34 chapters, 34 endnote files.
  • Footnotes are split into 5 separate files, with some chapters combined.

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:

Originally Posted by roger64 (Post 4123753)
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...

Yes, this is also an issue that came up while I was typesetting the physical book:

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!
  • This is an example with two footnotes.1008,1009 And two more.1010,1011
  • This is an example with two footnote.[8][9] And two more.[10][11]
  • This is an example with two footnote.8,9 And two more.10,11

Luckily, this Churchill book, they made the sensible per-chapter choice. :P

Quote:

Originally Posted by Hitch (Post 4123757)
Crap, now I'm going to have to dive back into this file. I know--I know, because I had an argument about it with a customer who wanted all this fruitcakey footnoes+endnotes+author's notes (WTF?) stuff--that Churchill has non-working, non-fuctional notes. I forget what it is now, dammit, but either you get to the Endnotes and then can't get Back, or something.

I believe you.

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:

Originally Posted by Hitch (Post 4123757)
I SWEAR, there are more unworking things, in Churchill and Notes, than are dreamt of in your endote philsophy, Tex!

Sure, sure, whatever you say. :D

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.