![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
[Plugin] FootnoteLinker Sigil plugin
Updated: December 29, 2019
Current Version: "0.3.3" This very simple plugin will automatically generate links to endnotes and backlinks to footnote anchors. By default, it'll look for footnote anchors with a noteanchor class attribute (e.g. <sup class="noteanchor">1</sup>) and endnote defintions with a note class attribute (e.g. <p class="note">1. Footnote definition...</p>). You'll also need to right-click the endnotes file and select Add Semantics... > Notes/Footnotes. (For an example, see the test file.) Please make sure to make a backup copy before running this plugin! Credits: roger64 for beta testing and feedback. Installation: 1. Select Manage Plugins from the Plugins menu and select Use Bundled Python, if it isn't already selected. 2. Click Add Plugin and select FootnoteLinker_v0.3.3.zip. This will install the FootnoteLinker plugin, which you can select via Plugins > Edit > FootnoteLinker. License: GNU General Public License v3 (GPL-3) Last edited by Doitsu; 12-29-2019 at 04:23 AM. Reason: New version w/Sigil 1.0 support |
![]() |
![]() |
![]() |
#2 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16
Karma: 1422
Join Date: Mar 2016
Device: none
|
I find a little problem, if you use the plugin then add some other note and use again the plugin in the foot note page you have two link of the past note:
1 1 in matters of taste, there is no argument... not a big problem for me just for information |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Ideally, you should run this plugin only once, but I've updated the code to allow users to run it multiple times.
|
![]() |
![]() |
![]() |
#4 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 519
Karma: 32158
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Dear Doitsu,
Would you please make this for Calibre Editor too? |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,561
Karma: 74358018
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I was sure beautiful soup was in Calibre; I'm sure it's used by many of the recipes for news downloads.
Sent from my Nexus 7 using Tapatalk |
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
EDIT: I just checked the recipe documentation and it looks that your right, because one of the examples contain the following import: Code:
from calibre.ebooks.BeautifulSoup import BeautifulSoup Last edited by Doitsu; 07-05-2017 at 11:54 AM. |
|
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,063
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Yes, that is a copy of the original BS module for python 2 (it used to be a single file). I think it even has some Kovid improvements to it. Should work basically the same way to the extent that BS4 was almost backwards compatible with the original BS.
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
I attached a new version, which allows users to customize the footnote and anchor id prefixes.
|
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2017
Device: Kindle Paperwhite
|
Doitsu I'm using your plugin (thank you) and I'm stuck. I'm getting this error message:
Status: failed Error: Missing Notes guide item. Use Add Semantics > Notes to mark the footnote definitions file. I've put the class="noteanchor" in the <sup> tags and the class="note" in the end notes section on the <p> tags, just like in the example ePub. I've left the items in the box (in your intial post) as you have them (although I don't know what the 2nd, 4th and 5th items mean and I can't find them anywhere in your example ePub either). I have no idea what the "Add Semantics" bit means either - I can't find any menu items called that. Any idea what's going wrong and how I can get it to work? Thanks |
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
This'll add the following line to content.opf: Code:
<guide>
<!-- more entries -->
<reference type="notes" title="Notes" href="Text/endnotes.xhtml"/>
<!-- more entries -->
</guide>
After adding the Notes semantic you should also see (Notes) after your endnotes file, if you hover the mouse over it in the Book Browser. |
|
![]() |
![]() |
![]() |
#12 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20,870
Karma: 27620684
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
ninja'd by the chief warrior himself
![]() @KarenD - right click the xhtml file where you have the notes, select Add Semantics, a list of available values will pop (n.b. different, but similar lists for ePub2 and ePub3) select the one for Notes BR |
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2017
Device: Kindle Paperwhite
|
Thank you! That got it working
![]() |
![]() |
![]() |
![]() |
#14 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Apr 2018
Device: Kindle Fire
|
Hey Doitsu, this plugin is great. I am using it with success on the first go. However, I know this is a style thing, but can you fix the plugin so it DOES NOT automatically put the square brackets around the footnote number? I think they look awful. I'm doing a scholarly book which is heavily footnoted. I would rather just have a space on either side of the footnote number (in the main body of the text) But I would want the underline for the link to be just under the number. I had to go back and fix all of the footnotes manually this time.
*Please* ![]() |
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
I use square brackets for my notes, not for aesthetical reasons but for practical ones. With them, I can click on the links on any ePub, less so when I keep only a plain number (well, clicking ability improves with the number of digits). When I produce an ePub, I usually add square brackets using this joint regex with the Calibre editor (written in .json format, you can import it). Most probably, you can achieve a similar result with Sigil. You could adapt it so that to make it work in reverse order (i.e. to suppress all unwanted square brackets in one go ). Anyway you certainly do not need to do that manually... Admittedly, a Preference setting giving the user an alternative choice of using or not square brackets would be quite nice, but I have no idea on how difficult it would be to implement... |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
epubcheck plugin for Sigil | Doitsu | Plugins | 519 | 07-22-2024 04:59 PM |
kindlegen plugin for Sigil | Doitsu | Plugins | 169 | 02-16-2024 06:48 AM |
[Plugin] PunctuationSmarten Sigil plugin | DiapDealer | Plugins | 138 | 07-11-2023 11:22 AM |
[Plugin] ePub3-itizer - epub3 output plugin for Sigil | KevinH | Plugins | 435 | 01-19-2023 09:46 PM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 10:11 AM |