Changing Annotation Note template

edited August 12, 2024
I'd like to change the annotation template for easier export into Obsidian.

I'd like it to look like

< page label>
> < text>

e.g.
42
> Lorem ipsum . . .


I've managed to find the relevant config entries, and I've gotten the bottom part with the greater-than-sign but I can't figure out if there's a variable for page labels.

I thought I'd seen a thread somewhere that talked about that, but can't find it anymore. I don't want the whole citation info from for each highlight, I just want the page label.

Is this possible? I'd even settle for the literal page number if the label isn't possible.

Thanks!
  • Curious about this as well, especially about the leading link put into markdown notes via the api. That doesn't seem available in the config, unless I'm missing something.
  • This is not at all easier, but if you or anyone is up for some mostly ChatGPT built scripting, you can try what I've been working on if you're on Linux or know what you're doing:


    xdotool key ctrl+c

    citation="$(xsel -o -b | sed 's/\\>/>/g' | sed -E '
    s/\([^)]* ([0-9a-z]+)\)[[:space:]]{2,}/\1/g;
    s/^> ?["“]([^"“”]+.*[^"“”]*)["”]$/\> \1/;
    s/^> ?[‘\047]([^’\047]+.*[^’\047]*)[’\047]$/\> \1/')"


    You can then use $citation for wherever you want, and if you've set the annotation template to

    {{citation}}
    > {{highlight}} {{comment}}

    It'll then look

    42
    > Lorem ipsum . . .

Sign In or Register to comment.