View Single Post
Old 06-20-2025, 09:42 AM   #7
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: 8,836
Karma: 6120478
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Doitsu View Post
I also did some quick tests and everything looks OK. For footnotes and endnotes it would be helpful, if the clip would replace _N_ with a number if a number was selected before the clip was applied.

For example, if I enter a 1, select it and apply an Endnote LI clip the result should be:

Code:
    <li id="en1" epub:type="endnote">
      <p>
        <a href="HREF_FOR_RETURN_FROM_ENDNOTE#en1" epub:type="backlink" role="doc-backlink">[1]</a>
            TEXT_OF_ENDNOTE_HERE
      </p>
    </li>
But the user would still have to manually replace all the other placeholders, so it really would not help much. Especially with endnotes. One you created the endnotes you could always sequentially renumber them with Python Function Replace. To search for and replace that placeholder would be easy. But filling in all the remaining placeholders hrefs not so much.


So Let's say you had 6 footnotes, at the end of the file, I would insert one footnote clip, and copy and paste it 5 more times. Then use Python Function Replace to fill in each _N_ incrementing them automatically. For only 1 or 2 footnotes I would just do the replace by hand.

That still leaves replacing each footnotes text appropriately.

Footnotes are really hard to deal with in an editor, so a plugin is probably a better way to handle them.

Inside CV editor it is not clear if the footnote text already exists (ie. you are marking up existing text) and you just want to wrap around selected text and provide a number.

Or if no text exists so you just want to create a structure with all the roles and things first and as many of them as needed. The go back and fill in the text.

In a plugin you can assume the author has already somehow marked both the text you are footnoting and its corresponding footnote, and then can create links and number them much more easily.

I took the clips approach but perhaps a standalone insert footnote command or insert endnote command might be better. But it would need to differ across epub 2 and epub3.

Really not sure here.

Last edited by KevinH; 06-20-2025 at 09:48 AM.
KevinH is offline   Reply With Quote