Zotero best practices

In terms of getting the color names to show up in the exported annotation (ala @PedroSilva ) , you can modify the categories in extensions.zotfile.pdfExtraction.colorCategories and remove the hex code and replace it with the color name. Then when using @color_categories in extensions.zotfile.pdfExtraction.formatAnnotationHighlight you will get the name instead of the hex code

Original:
{“Black”: “#000000”, “White”: “#FFFFFF”, “Gray”: “#808080”, “Red”: “#FF0000”, “Orange”: “#FFA500”, “Yellow”: “#FFFF00”, “Green”: “#00FF00”, “Cyan”: “#00FFFF”, “Blue”: “#0000FF”, “Magenta”: “#FF00FF”}

Modified:
{“Black”: “Black”, “White”: “White”, “Gray”: “Gray”, “Red”: “Red”, “Orange”: “Orange”, “Yellow”: “Yellow”, “Green”: “Green”, “Cyan”: “Cyan”, “Blue”: “Blue”, “Magenta”: “Magenta”}

If you want the highlighted color to show up in Obsidian as well you could use the 8 x 8 Highlight Colors CSS from @Steve_yang.

{“Black”: “#h/black”, “White”: “#h/white”, “Gray”: “#h/gray”, “Red”: “#h/red”, “Orange”: “#h/orange”, “Yellow”: “#h/yellow”, “Green”: “#h/green”, “Cyan”: “#h/cyan”, “Blue”: “#h/blue”, “Magenta”: “#h/magenta”}

Then your extensions.zotfile.pdfExtraction.formatAnnotationHighlight value would need to include the highlighting syntax that Obsidian uses:

<p>%(color_category)==<span style=“background-color:%(color);”>"%(content)"</span>== (%(cite))</p>

image

2 Likes