Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Closed Thread
 
Thread Tools Search this Thread
Old Yesterday, 09:19 PM   #1
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Is there a way to globally convert all note cues in epub file to superscript?

I've been using Calibre for a few years, but I'm basically new to Sigil.

I'm trying to fix an epub file that I edited (perhaps that was a mistake!) in Word, and then converted back to epub within Calibre.

Most of the formatting went fine, but all of the superscript note cues are now just full size - and because there are passages with quite a lot of mathematical notation, that's particularly confusing. But, in any case, the client's style calls for all the note cues to be superscript.

I've worked out how, in PageEdit, to convert a single cue to superscript, but I'd really like to find out if there's a way of converting all of them at once. They are two-way hyperlinks, of course - so I'm wondering if there's a simple way to get Sigil/PageEdit to search for all hyperlinks within a chapter and convert them to superscript? There are TONS of notes, so that would be an enormous advance on doing it manually.

If anyone has any ideas, I'd be very grateful.

Last edited by Liudprand; Yesterday at 09:21 PM.
Liudprand is online now  
Old Yesterday, 09:40 PM   #2
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Follow-up query: I've done this manually for a few of the note cues, and it works fine when opened again in Calibre, except for one thing:

By default, Sigil/PE generates superscript figures that don't fit properly within the line of text, so that extra (unwanted) space is produced between the line with superscript and the line above.

It's an effect a little like if, in Word, you superscript a figure in a line of text, and then increase the point-size of just that figure. So, if the body text is 12pt, and you increase just the supersript figure to, say, 16pt, it (understandably) generates extra space above the line. But, at least in Word, typefaces behave themselves in this respect: the superscript figures are designed not to create that extra space as long as they're in the same point size - and I know this can be achieved in ePubs generally; there are plenty I've bought with my own money that behave properly in this respect.

So, is there any way of tweaking the superscript figures in Sigil/PE - in terms of size, positioning, or both - so that they behave themselves, and don't generate superfluous line-space above?
Liudprand is online now  
Old Yesterday, 09:55 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,977
Karma: 5449552
Join Date: Nov 2009
Device: many
To handle replacements use Sigil Find and Replace with the appropriate regular expressions.

You control line height, line margins etc through css.

But in general using subscripts or superscripts to indicate links to footnotes can make their use almost impossible on e-readers with small screens. It is much better to wrap them in square brackets which makes them much easier to detect and for people to actually click on.

Something like: blah blah blah.[1]

Using superscripts for footnote indicators are one of the most common mistakes made be people who think they must replicate the printed book exactly, especially when no one ever tries to click on a printed book footnote!

You need to adapt old print-only techniques to actually work in e-books and this is a bad one for limiting Accessibility of your ebook.

Last edited by KevinH; Yesterday at 10:04 PM.
KevinH is online now  
Old Yesterday, 11:22 PM   #4
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Thanks for the reply.

But I think you missed, in my original question, my point that my client requires footnote markers to be superscripted. Also, the vast majority of published nonfiction books - history, social science, etc. - from major presses, use superscripts in their ebooks. I happen to prefer that myself, too, as a reader; I think full-size figures with square brackets are clunky and ugly, and I've never had any trouble clicking on a superscript note cue in an ebook. I appreciate that some people might prefer what you suggest - but in the actual publishing world, that's very much a minority practice (though I've seen it in some textbooks). But I recognise that, over time, that may be the way things go! Just not yet.

I'll give your suggestion a try (though I'm not sure what "regular expression" I need to locate note cues). Thanks again.

Last edited by Liudprand; Yesterday at 11:24 PM.
Liudprand is online now  
Old Today, 03:20 AM   #5
mrprobert
Enthusiast
mrprobert began at the beginning.
 
Posts: 32
Karma: 46
Join Date: Mar 2017
Device: None
Quote:
Originally Posted by Liudprand View Post
By default, Sigil/PE generates superscript figures that don't fit properly within the line of text, so that extra (unwanted) space is produced between the line with superscript and the line above.
Try adding this to your CSS:

sup,sub {
vertical-align: baseline;
position: relative;
top: -0.4em;
}

sub {
top: 0.4em;
}
mrprobert is offline  
Old Today, 07:28 AM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,977
Karma: 5449552
Join Date: Nov 2009
Device: many
Just because other clients demand superscript footnote markers does not make them a good idea. Have you even talked to your client as to the importance of Accessibility for those who have issues with muscle control, vision, etc.

And for what it is worth, if you are unfamiliar with xhtml, css, find and replace, and regular expressions, then Sigil may not be the correct tool for you. You can begin to learn about these subjects using the Sigil Users Guide or many other online resources.

Last edited by KevinH; Today at 08:29 AM.
KevinH is online now  
Old Today, 10:26 AM   #7
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
I've looked - of course - at the Sigil user guide (among other places). I did that before posting here. It does not contain the word "hyperlink" or the phrase "note cue", and I was therefore unable to identify the regular expression for searching for those things. But thanks for your input on that.

On the issue of superscript notes: I don't really think you grasp what the situation is. Sure, Oxford University Press, with its centuries of tradition and legions of in-house staff part of whose job is to manage style issues like this, is going to reconsider details of its style guide because a freelancer popped up with an opinion. I mean... I don't know what you do for a living, but that's not the world I live in. Plus, I happen to agree with them in this particular case! So, I note your view on it, but it wasn't even relevant to the question I asked.

As for accessibility, e-readers are eminently customisable. If you need to increase the point-size so that the notes are easier to hit with your shaking finger, then that option is right there. Making stuff ugly just so that a minority of people won't have to endure the inconvenience of making a small, easy adjustment on a device seems... well, bonkers. But I hope we've put that discussion to bed - because every time I've raised the subject (this and a very long previous thread), the discussion has ended up fixating on this ridiculous idea that the job of people like me is to lobby massive publishing houses from our tiny professional perches, on the basis that they're desperate to hear our views on things they have well-developed style books on, and on which they didn't consult us in the first place. Even if I agreed with you on the substantive point - which, again, I absolutely do not - I can tell you, as someone who's both spent much of my career as a freelance and has often been in the position of hiring freelances: that's a pretty good way of annoying your client to the point that they stop calling you.

Last edited by Liudprand; Today at 10:38 AM.
Liudprand is online now  
Old Today, 10:33 AM   #8
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Quote:
Originally Posted by mrprobert View Post
Try adding this to your CSS:

sup,sub {
vertical-align: baseline;
position: relative;
top: -0.4em;
}

sub {
top: 0.4em;
}
Thanks very much for this. I found a (very time-consuming!) workaround in the meantime, but I'll definitely try this next time.

I actually encountered another problem that you (or someone) might be able to advise me on. Basically, I went through the note cues manually in Sigil, and styled them as superscript. I then opened the epub file in Calibre, and uploaded it to my device using KoboTouchExtended. Unfortunately, the notes now seem to be functioning "backwards" - i.e. when I tap on a note cue, it takes me straight to the page with the notes on, without giving me the popup preview of the note that kepub files usually deliver. But then, when I tapped on the note itself, instead of taking me directly back to the main text, it gave me a preview of the main text.

It's hard to say where this glitch would have been generated - Sigil or Calibre - but I assume it's reasonably easy to fix(??). Anyway, if you have any ideas, or could point me to where in the Sigil user guide (or anywhere else) I might find a solution, I'd be very grateful.

(I did wonder about posting in the KTE forum on here, as that's where Kobo's distinctive way of formatting notes is reproduced; but then I thought that, since I've never had this issue before, it must have been something that happened prior to the conversion to kepub.)

Last edited by Liudprand; Today at 10:37 AM.
Liudprand is online now  
Old Today, 10:42 AM   #9
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 137
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
To be clear, my workaround, in its entirety (in case this is helpful for anyone else), was a) in Sigil, format note cues as superscript; and b) in Calibre, change the font size for the note style from "normal" to "small".

Seemed to work well enough - except for the further glitch I mentioned in my previous message.
Liudprand is online now  
Old Today, 11:30 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,977
Karma: 5449552
Join Date: Nov 2009
Device: many
I have now found your earlier post on the same subject where you basically ignored lots of helpful advice. As this topic really has nothing to do with Sigil itself, I strongly suggest you move your request for help to our EPUB forum. Perhaps people there will help.
KevinH is online now  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Note in an epub file Briano Kobo Reader 1 11-26-2022 06:55 AM
Changing the text file viewer globally? drawson1 Library Management 9 03-04-2018 02:14 AM
How do you convert Word file to ePub file? automa ePub 13 08-11-2013 04:52 PM
Globally convert all existing Author names from LN,FN to FN LN? DZC Library Management 7 03-27-2013 12:16 PM
How can i convert HTML or txt file to EPUB file ? guguqiaqia ePub 7 05-28-2010 09:15 PM


All times are GMT -4. The time now is 01:22 PM.


MobileRead.com is a privately owned, operated and funded community.