Zotfile features

edited 9 days ago
Hi,
here are two questions or suggestions to customize the way Zotfile extract annotations from pdf files.
*) For the quotations (highlighted text, etc.) : how about to use the blockquote element so that, let's say Writer, automatically paste the content as quoted?
*) For the refences key: could we choose to use the Better Bibtex keys instead of the citelink name year?
  • On the 2nd point: %b should work according to https://github.com/jlegewie/zotfile/issues/386
  • Thank you. This allows to use the citekey to rename the file. I've found some discussions that helps. But I still can't manage to add the citekey in the note created by extracting the annotations. It's still the initial format (author, year : page). I couldn' find any change in the advanced configuration to get that. I guess that it is the "cite" variable that needs to be changed. Maybe some indications in the 226 line of zotfile/chrome/content/zotfile/pdfAnnotations.js ?
    Maybe using the "wildcards"?
  • That I can't say, not my area of expertise.
  • edited 4 days ago
    Hey, this has bugged me for a while now. I have tried editing the pdfAnnotations.js stored in the folder zotfile/chrome/content/zotfile (of the zotfile@columbia.edu.xpi file in :\Users\...\AppData\Roaming\Zotero\Zotero\Profiles\...\extensions).

    Replacing '%a %y' in line 226 with '%b' didn't change anything.

    Edit 2: Okay I figured out why it had no effect, I had to reinstall the altered .xpi via the add ons menu instead of just editing the xpi. It seems to work now, although the code is not pretty:

    On line 226 I have:

    cite = this.getPref("pdfExtraction.NoteFullCite") ? this.Wildcards.replaceWildcard(item, "%b").replace(/_(?!.*_)/," and ").replace(/_/g,", ") : "p. ",

    An on line 258:

    var link = '[@' + cite + ', ' + page + ']',

    Which produces annotation output in the form of "[@blume2020, 3]".
  • how about to use the blockquote element
    Try adding <blockquote> </blockquote> to the relevant ZotFile preference.
    could we choose to use the Better Bibtex keys
    I guess this currently requires editing the ZotFile code.

    See also this discussion: https://forums.zotero.org/discussion/83077/extract-annotations-gives-just-one-way-in-text-citation-style
  • edited 2 days ago
    Great Chris!

    To use the blockquote :

    go the the advanced config panel and change the html element for:
    extensions.zotfile.pdfExtraction.formatAnnotationHighlight
    extensions.zotfile.pdfExtraction.formatAnnotationUnderline
    Then change :
    "p" and "/p" to "blockquote" and "/blockquote"

    (tip found there : https://forum.zettlr.com/discussion/94/zotero-as-zettelkasten)
Sign In or Register to comment.