Open sancho-s opened 1 year ago
I don't know this functionality. Where does this table of contents show up?
In Zotero, if you select an item, expand its attachments, and select a pdf attachment that was added via "Attach link to file", in the right hand panel you will see:
Do you have a sample pdf known to trigger the desired behavior?
Yes, I am attaching it here. Buckling.pdf
PS: I found that, in Zotero, you may or may not get the table of contents, depending on how you add the pdf attachment to the Zotero item. If added via "Attach link to file", the table is created.
If added via Ctrl+Shift+drag, it is not. This is reported in a related thread in Zotero forum.
So, I guess there are two ways in which [zotero-folder-import] can get the table:
According to that thread, the TOC thing is a Zotfile feature, so you would have to ask there why it isn't being generated. folder-import is calling the same functions that Zotero itself calls when importing/linking attachments.
I don't know about the interaction Zotero-Zotfile, and I am not even sure extraction of the table of contents is done by Zotfile or Zotero itself. For instance, apparently, since Zotero 6.0, extraction of annotations is not done by Zotfile anymore, but by Zotero.
At any rate, what I mean is that, apparently, Zotero has two different ways of attaching a PDF, and they perform differently:
Perhaps [zotero-folder-import] can be instructed to work like #2, regardless of that being directly with Zotero or via Zotfile.
If adamsmith says that this is done by Zotfile I'm inclined to believe him. Can you first go check whether @jlegewie agrees with adamsmith before I dive into the Zotero code? If it's Zotfile's feature to do this I'll be glad to help where needed, but would prefer to keep @jlegewie in the lead for it. If it is indeed not a Zotfile feature but something Zotero does itself, that would be a different matter.
Will do. On a separate note, now using Ctrl+Shift+drag does get the table of contents. I can't reproduce what I saw before.
What I can reproduce is that adding via [zotero-folder-import] does not get the table of contents. Which, on a file-by-file basis, can be fixed via Select the PDF item -> Right click -> Manage Attachments -> Get table of contents.
Summarizing, it seems that now [zotero-folder-import] does not do exactly the same a Zotfile... which is very strange.
What is zotero's behavior if you don't have Zotfile installed?
What I can reproduce is that adding via [zotero-folder-import] does not get the table of contents. Which, on a file-by-file basis, can be fixed via Select the PDF item -> Right click -> Manage Attachments -> Get table of contents.
Summarizing, it seems that now [zotero-folder-import] does not do exactly the same a Zotfile... which is very strange.
As soon as @jlewegie weighs in, I can see what to do about this (or whether there is anything to do). I do not know what initiates this behavior, and adamsmith, who is deeply involved with Zotero, says it is Zotfile doing this.
For a Zotero item, whenever I add a pdf file in disk (either the file or a link to it), the tag structure of the pdf is read, and it is shown as an hyperlinked table of contents, so clicking on it opens the pdf at the location of the item.
But when I add Zotero items via [zotero-folder-import], the table of contents is not added. Can this be done?
Thanks!