0

I would like to create a citation style (to be used in Zotero) for which a reference entry would - very minimalistically - only include the following fields:

  • the first author's surname (+the second's if there are two authors, or followed by "et al." if there are 3 or more authors)
  • the year of publication in brackets
  • the abbreviated journal (or book publisher's) name, in italics

These fields would be linked together as shown in these examples:

  • Smith & Johnson (2005), OUP
  • Brady et al. (2010), Nat Comms
  • Mueller (2023), Sci Rep

I've been trying to achieve this for ages using the Visual CSL Editor at https://editor.citationstyles.org/visualEditor/, using a copy of the apa.csl file found in Zotero (APA 7th edition style) as a sandbox fork file.

However, I simply don't get how the damn elements need to be combined in order to get this result. After a lot of trial annd error, I cannot find where exactly the different macros need to stand in the nested hierarchy on the left-hand side.

Making this trial&error very time consuming is the fact that not all changes can be previewed in the Example Bibliography (as it only includes a book chapter and a thesis, but no journal name). Instead, one needs to save the CSL, import into Zotero, restart Zotero, then try exporting a library items with the new style; then reload the Editor page in the browser, since due to a bug, you cannot keep editing that same file.

The screenshot below shows how far I've got. Any indications of what needs to be done, or a demonstration CSL file, would be greatly appreciated!

enter image description here

z8080
  • 571
  • 3
  • 7
  • 23

1 Answers1

0

If you want to start with a style, don't start with APA, which is incredibly complex. Take something like American Chemical Society, which is simpler and already omits titles for many item types.

But given how little you need the style to do, it might just be worth starting fresh ("Style --> New Style" at the top left of the editor).

You can then add one node after the other using the + sign.

Alternatively, some basic code like this will work, depending on what you need exactly, use in the bibliography and/or citation section of the CSL, but note that you do need something in citation (bibliography is optional)

    <names variable="author">
      <name form="short" and="symbol" et-al-min="3" et-al-use-first="1"/>
    </names>
    <date variable="issued" form="numeric" date-parts="year" prefix=" (" suffix=")"/>
    <group prefix=", ">
      <choose>
        <if variable="container-title" match="any">
          <text variable="container-title" form="short" font-style="italic"/>
        </if>
        <else>
          <text variable="publisher" font-style="italic"/>
        </else>
      </choose>
    </group>
adam.smith
  • 808
  • 4
  • 9
  • That worked, thank you! as a final touch, how can I channge the default font type (typeface)? I didn't find anything about this in the CSL [documentation](https://docs.citationstyles.org/en/stable/specification.html), and once again, the Visual Editor is less than helpful, with only font weight and sub/superscript available to change under Bibliography | Layout | Group. – z8080 Mar 19 '23 at 10:30
  • 1
    CSL doesn't change typeface. That's (appropriately) left to the word processor – adam.smith Mar 19 '23 at 12:25
  • That's what I'd have thought, but when I right-click "create bibliography from item" in Zotero, then paste that in Word, it always pastes as Times New Roman even though my default typeface in Word 365 is Calibri – z8080 Mar 19 '23 at 12:59
  • 1
    Neither Zotero nor CSL have any concept of font/typeface for the clipboard. I'd guess this is some weird way how Word interprets clipboard content, but in either case, you can just use paste with "Merge Formatting" to get your default font. – adam.smith Mar 19 '23 at 19:02