Add a prefix to BetterBibTex citation

Hi,

I export PDFs to Obsidian from Zotero on occasion and would like to include the prefix (Z) to the citation. This will identify the file in Obsidian as coming from Zotero so I can use the search function to find all articles prefixed with (Z).

My searching suggested using the syntax of (Z)[auth.etal][year] but I am getting a message that it is the wrong syntax.

Any help would be appreciated.

Cheers,

  • edited June 2, 2023
    The syntax has changed; the old syntax still works, but needs a [ as the first character to detect legacy mode. I see now the error message explaining this (and what the equivalent new syntax is) is not shown; I'll fix that, but in the mean time, adding [] at the front will work.
  • Thanks for the response. I have tried the following:

    [(Z)][auth.etal][year]
    [Z][auth.etal][year]
    ["Z"][auth.etal][year]

    and

    [(Z)]authEtal2 + year
    [Z]authEtal2 + year
    ["Z"]authEtal2 + year

    Still getting error messages I'm afraid. Obviously the syntax is still wrong.

    Cheers,
  • Try [](Z)[auth.etal][year] or "(Z)" + authEtal2 + year
  • Many thanks for your help. The brackets will not show unfortunately. The first one didn't work at all. I have settled for:

    "(Z_)" + authEtal2.fold + year

    The Z_ should create an adequate search parameter in Obsidian to identify all sources from Zotero.

    Cheers,
  • Did the field turn orange for the first one? The leading empty brackets aren't supposed to show up in the citekey, they just signal to BBT to parse it as the legacy format.
  • Apologies for late reply. The first one is not turning orange and it seems to be working. I saved this page to test and got Z2023 as the citation key. Just doesn't seem to like those brackets.

    [](Z)[auth.etal][year] did work and didn't turn orange.
  • I'm sorry but I don't understand which formula with "those brackets" you entered that was supposed to work but doesn't.
  • Sorry. I will try to be clearer.

    You suggested [](Z)[auth.etal][year] or "(Z)" + authEtal2 + year

    If you look at either of those, the intent is to try to get (Z) as a prefix to any citation key so that when it goes to Obsidian via my workflow, I know where it's come from. It seems BetterBibTex doesn't like the brackets because "(Z_)" + authEtal2.fold + year worked with a underscore after the Z but still no brackets.
  • Ah like that - I didn't know brackets could refer to (), I know those as parentheses. Parentheses are not legal in citation keys, so BBT removes them before export.
  • LOL... international terms. In Australia they are brackets ( ) and parentheses are { }
Sign In or Register to comment.