Zotero Integration – Import Templates?

Nice, I understand now, thank you.
Yes I try a hotkey and work very nice.
Any advice or recommendation for the field “Priority” ?

Thanks for you’re answer

1 Like

I forgot one question, how can I refresh the template, I mean, if I put a new highlight in the PDF in zotero how can I see the new highlight in the obsidian note?

Best

I use a combination of numbers and words, like so:

1-low
3-medium
5-high

This allows me to sort by priority, while being more understandable than numbers alone.

To update the note, just import the item again. New annotations will be appended at the end.

@Cat

Thank you so much for posting your template!!! This has solved a problem I have worked on for days. I could not get individual authors to have their names double bracketed for linking.

Your code fixed this problem.

{% for c in creators %}{% if loop.first %}{{c.creatorType | capitalize}}s:: {% endif %}[[{{c.firstName|replace(“.”, “”)}} {{c.lastName|replace(“.”, “”)}}]]{% if not loop.last %}, {% endif %}{% endfor %}

I am not a coder and have been trial and erroring my way through this.

Thank you again!!!

Cannot thank you

2 Likes

Hey @Feralflora I had another doubt regarding the template. When I import a file from zotero using the grouped template, is the order of the different types of annotations always based on the order of first appearance in the document?
E.g., from your macro, the order is

{% macro heading(color) -%}
{%- if color == "#5fb236" -%}
💡 Main ideas and conclusions
{%- endif -%}
{%- if color == "#2ea8e5" -%}
❔ Questions
{%- endif -%}
{%- if color == "#ffd400" -%}
⭐ Important
{%- endif -%}
{%- endmacro -%}

However if in the pdf I annotated a first sentence in the #ffd400 colour, then during import the “:star: Important” group of annotations are listed first and not the annotations belonging to the group “:bulb: Main ideas and conclusions”
Is there a way to specify the order in the obsidian file irrespective of the order of annotations in the zotero pdf? Or did I make a mistake while modifying the template? :sweat_smile:

Hi @Qwxlea - I have been loving your template and just today have began using the latest iteration from you GitHub. One thing I am slightly confused by is the preceding code to each imported annotation? Please could you help me to understand what they are/their purpose/and if at all I could re-jig this so they are not preceding the note?

Hey guys. I have a few questions I hope you can help me with ASAP.

  1. How come no matter what template I try, my output file contains no color? The Call-Out style highlight boxes are always grey with black lettering. I use like mode and have tried Default+Polka theme without change?
    https://forum.obsidian.md/uploads/default/optimized/3X/a/a/aadf212646bfbdd9c41ff02534326f905618c107_2_1380x792.jpeg
    ^ I want something like this. Highlight color background with black letters.
    Mine is plain grey, not even got that darker colored edge to the left. Just a grey box.

  2. What must be added to the formatting language so that each highlight color heading is outputted as Folded/Compact view. Not each highlight themselves but only the heading for Yellow for example, while the highlights are open. Now both are default as open. Usually one adds a minus sign after a CallOut square bracket. Where should a minus for this be added?

To color the callouts like the examples you’ve seen, you need an accompanying CSS file, and your callout must match the those in the CSS file. The CSS is what adds color styling to the callouts.

See mgmeyers’ template, which is the first template in this thread.

See my template for an example where the headings for each color are folded when opening the note. This is done using the Creases plugin. There is no native support for folding using the text formatting, yet.

1 Like

Hey @soakingwombat,

Yes, the order of the headings is the same as the sequence of colors in the annotated document, as is. So no mistake there. @apfelstrudelig has come up with a workaround for this, so you can set a custom order for the headings.

This workaround is listed first in my “Planned enhancements” section:

Thanks for this template. Somehow in my case all the call outs are in the same color (gray)

Happy to hear you like it. Will make some small changes soon. If you have questions, or requests, always feel free.

The code you highlight is what the plugin uses to figure out where a persistent block is located.

{% persist annoID %}
lots of stuff
{% endpersist %}

“lots of stuff” will now be persistent, and when you run the plugin again, will not be updated. This also means that you can remove the part you highlighted, and then it will update that specific block (once!).

1 Like

The new feature Properties (Obsidian 1.4.0) deprecate the inline metadata fields.
If anyone needs a solution (i.e. authors or any other value one per line), there has been a topic on the Discord about that.
I’ve not tested yet but I will edit my Zotero template import as soon as possible!

Why do you say that inline metadata fields are deprecated? These are a Dataview field type.

I guess you meant single-line YAML arrays?

Thanks for contributing your template! I have a feeling that I’m doing something pretty newbie, but when I use it, my graph gets cluttered with variables present in the template code, for example ‘{{url}}’. How do hide these from the graph?

image

No, the error is not yours. You might have been caught in a bugged version of the template, please update, remove the page or at least the offending annotations, and try importing again.

Explanation: {{select}} etc are part of the template, and they should have been replaced with values. This is a bug, and shouldn’t happen.

1 Like

Sorry for not answering faster, somehow lost track of your question:

Block-quotes: should work(?) Could you show your source of that paragraph, it would also be possible to fix it by hand, the annotation would not be overwritten when reimporting the page (unless you remove the page, obviously)

Images: In the template the location of my images was hardcoded, update the template and reimport, it should be fixed

the zotero emojis: hardcoded line 25-32, these can be changed to whatever you like

Hi, guys! First of all, thank you for all your amazing templates. I’ve been able of creating my perfect set up thanks to your contributions. :blush:

I was trying to create a bar with the links to Zotero and PDFs inspired by your designs and I’m having a problem with the link to the PDF in Zotero.

I’ve written this <<Zotero PDF>> following the same pattern as this <<Zotero>>. However, as the second link works perfectly fine, for the first one I get a link that doesn’t work and when I hover over it I find this:

I know I can use {{pdfZoteroLink}} alone, but I would like to create the link as for {{desktopURI}} and I don’t understand why they work in such a different way using the same structure.

Thanks in advance to anyone that can resolve my doubt. :smiling_face_with_three_hearts:

Hope you’re all having a great weekend! :kissing_heart:

Hi espalia! Thanks so much for this. Using this code I’m running into an issue wherethere are no colours for each annotation it just reads the annotation in a grey block. Any ideas?

Hi, I love this template. Do you have a CSS snippet that you use with it to make the callout boxes work correctly?

Thank you @Feralflora for your beautiful template :). My use case is a bit different but works like a charm ! Thank you again :smiling_face_with_three_hearts:

2 Likes