Help with hack of Zotero citation style to facilitate Word-to-LaTeX conversion

Dear Zotero community,

I'm in the process of converting a Word document with a vast amount of (footnote) citations, created via Zotero, to LaTeX (with a little help of writer2latex). To make my life at least a little bit easier, I have started to hack a Zotero citation style.

The idea is: Have automatic bibtex keys created for every bibliography entry via Better Bib(La)TeX in the form of "" and export the Zotero database to a .bib file. Then hack an existing "author date"-citation style such that the actual citation in the Word document looks like a BibLaTeX citation command, namely "\autocite{}".

I have chosen the style "Springer Humanities (author-date)". In it, I have changed
* prefix="(" to prefix="\autocite{"
* suffix=")" to suffix="}"
* delimiter=" " to delimiter="".
With single-author citations without prenotes and postnotes (such as "cf." or "p. 32"), I get the desired result.

I'd like to ask you, the community, two things:
1) Can I get the citation in the text to abide by the form "<1st-author>" in cases where there are at least two authors involved? (Because the bibtex key will only list the first author.)
2) Could I even get the hacked citation style to automatically include prenotes and postnotes to get "\autocite[][]{}"?

Any help would be much appreciated!
  • edited October 18, 2016
    Uh-oh, something has gone wrong: IN many cases <'s and >'s and everything in between got swallowed... :(

    And for some reason I can't edit the original question above: when I try, Firefox automatically inserts an old question I posted on this site. I'm sorry, this is very messy.
  • Edit: ...via Better Bib(La)TeX in the form of "authoryear"
  • ...such that the actual citation in the Word document looks like a BibLaTeX citation command, namely "\autocite{authordate}".
  • The second question is supposed to read

    Could I even get the hacked citation style to automatically include prenotes and postnotes to get "\autocite[prenote][postnote]{authordate}"?
  • 1) You can experiment with setting the et al term to an empty string and then setting et-al-min="2"

    2) I don't think so. The prefix and suffix are always added after/before the actual citation output by CSL, so you can't put them in a different position nore can you style output around them.
  • @adamsmith Thank you, great idea. Could you point me at the "et al term" if you happen to know what it's called? I have searched the cit. style's code for "et al" (because that literally appears in the citation short form), but I just can't seem to find it. Is it something involving "contributors" by chance?
  • You'd have to redefine it in the style, something like
    <locale>
    <terms>
    <term name="et-al"></term>
    </terms>
    </locale>


    Typically placed right after </info>
  • @adamsmith Thank you, I simply copied the middle line to the respective code section, and it worked immediately!
  • (Also, to post code snippets on the forums, put them in <code> HTML tags)
  • @bwiernik Thank you for the tip. However, when I used "<" and ">" in the original question, the angle-brackets and everthing in-between did not appear in the output...?

    By the way, is there a documentation for markups in this forum? I couldn't find one.

  • the forum takes basic (aka "filtered") HTML. So if you just write <info> anything in brackets disappears.
    So to get the above I actually wrote <code><info></code>
    other common tags include <blockquote><i><b>
Sign In or Register to comment.