Zotero 6: tags lost when exporting-editing-reimporting annotations
I can see how a lot of thought has gone into the new annotation feature, especially the option to export and import annotations between the zotero database and the pdf file. But there is still a risk of data loss in that process: tags on annotations are lost if the annotation is edited in an external pdf editor and then re-imported.
I wonder if this could be fixed by exporting the tags into the actual annotation text instead of in some hidden place, as seems to be the case now? That way, the user will immediately know whether s/he is deleting tags in an external editor. Saving the tags into the annotation text would also have the benefit that tags can be seen (and edited) in external pdf viewers.
(Just to avoid confusion: tags are correctly exported and reimported as long as the annotation is not edited externally.)
I wonder if this could be fixed by exporting the tags into the actual annotation text instead of in some hidden place, as seems to be the case now? That way, the user will immediately know whether s/he is deleting tags in an external editor. Saving the tags into the annotation text would also have the benefit that tags can be seen (and edited) in external pdf viewers.
(Just to avoid confusion: tags are correctly exported and reimported as long as the annotation is not edited externally.)
Including tags in the PDF annotation tags is quite hack-ish and would include all sorts of undesirable side-effects, so that's a clear no.
So if the tags are not saved to the pdf, that means that when I re-import the annotations, the tags are re-matched with the re-imported annotations, right?
In that case, why not do the same when the comments on those annotations have been changed (i.e. edited outside zotero)?
Regarding the saving the tags in the pdf annotation: what are the undesirable side-effects? It seems to me that recognizing strings starting with # as tags works quite well in all kinds of contexts...
We can try to find a more resilient way to store that additional data.
Regarding your question: I am not 100 percent certain which pdf viewer I used for testing this. I was going back and forth between Preview and Highlights, so I think I tried it with both of them. - Are you unable to reproduce the behviour?
It would be great if the tag data could persist across external edits. I don’t know anything about the pdf standard, but if there is a rule (or some form of ”good practice”) that says something like ”comment metadata should be preserved when comment is edited” I wouldn’t count on that being widely implemented… That’s why my hunch was that the only way to achieve that resilience is by writing the tags into the actual comment. But as I said: I know nothing about the pdf standard, apart from it being complicated.
I’m curious: Are comment-metadata even an official thing or are you hiding the data in some sort of tags within the actual content of the comment? Maybe such tags can be considered metadata, but if they are stored in the content, then that would explain why they disappear when the content is written. Maybe it’s possible to (ab)use an official tag that any pdf editor will recognize and preserve?