how to edit the form of the pdf extraction in Zotfile

hi,
I was wondering how I can edit the form in which Zotfile extracts the highlights from pdf files. More in details, I would like either to change these quotation marks "" into these «» or just to delete the quotation marks at the beginning and the end of the highlighted texts. Is there anyone who can help me in this matter? Many thanks.
Alfredo
  • There's no option to change the quotation marks in ZotFile prefs. If you know what you're doing, it's easy to change the code, though:
    https://github.com/jlegewie/zotfile/blob/master/chrome/content/zotfile/zotfile.js#L2542
    Replace this line (2542) by:
    note += "<p>"+tagStart+"«"+markup+"» (" + cite + page + ")" +tagEnd+"</p>";
  • Many thanks for your comment. I have already worked several times in codes within xpi files, but I can not figure out why this time it does't work. What I did is to download the xpi file of zotfile; to change the extension into zip; to decompress the zip file; to change the string of the code; to save it; to compress the folder again; and, finally, to revert the extension into xpi. But when I try to install the add-on in Zotero standalone, it does not recognise it. Why?
  • No idea.
    But two hidden options (openingQuotationMarks and closingQuotationMarks) have been added to the next ZotFile version (2.3 not yet released). You can access them through about:config

    To avoid encoding issues, you should type: &amp;#171; to display «

    and &amp;#187; to display »
  • Many thanks.
    Alfredo
  • Hey folks,

    What about the option to disable the extraction of highlighted text altogether? I followed the hidden options guide and it appears I cannot change the values from "string" to "boolean" there. Maybe it's because I upgraded to Mac mountain lion, or maybe it's the new zotero and zotfile releases, but every time i've extracted annotations before now, highlighted text wasn't included. I just want my sticky annotations to come through.
  • @lcyarrington: it's not possible to disable the extraction of highlighted text.
  • thanks for the heads up. maybe you could assist with another issue i've found that is maybe worth drawing attention to. when extracting annotations (made on latest version of Mac OS X Mountain Lion's Preview app) some sticky note annotations get left out. i've noticed this with three different pdfs now, and strangely this problem seems to repeat itself on p. 19 of the pdf. looking at the notes of the extracted annotations, each one shows this for notes extracted from the 19th page of the pdf: "�� (note on p.19)," followed by a blank carriage return. the rest of the extractions, before and after, seem to be intact though. ideas?
  • What was expected instead of these �� ? Diacritics? How did you create the PDF / do you know how it was created (check the properties)?
  • so the issue is happening on several pdfs, and not on the same page of each pdf as i previously described. but i was expecting normal text, for instance:

    226, "In a very real sense, political action is viewed essentially as a means through which the power of all the participants may be increased, if we define power as the ability to command things that are desired by men."

    pdf producer: mac os x 10.8.2 quartz PDFContext
    pdf version: 1.2 (Acrobat 4.x)
    file size: 300.83 kb
    page size: 5.35 x 8.39 in, 21 pp.
    fast web view: no
    application: RealPage PDF Generator 2.0
    all fonts are Helvetica type (bold, bold oblique); realpageBAS13 (embedded subset), etc...

    does this help?
  • btw, i get this outcome when extracting with both pdf.js and poppler
  • I'm sorry I can't help you. It might be an issue with your annotation tool.
Sign In or Register to comment.