CSL Style modification asterisk (*) in meta-analysis references APA

edited January 19, 2018
Hi all,

I'm trying to get a * preceding some reference list entries (the ones that were included in a meta-analysis, not just referenced in the text).

As there seems to be no proper way to "tag" some references, I came up with the idea to use the keywords entry and do an "is numeric" check with it. Thus, I would put a number in the keywords entry for all references I want to be marked with a *. My code is as follows:

I added that as a choose-if in the bibliography section (modifying the apa6 style), but nothing happens at all.

Is my approach possible? If yes, where is my mistake? Or do you have any better ideas?

Thanks!

Code follows (I only added the <choose> part:
<bibliography hanging-indent="true" et-al-min="8" et-al-use-first="6" et-al-use-last="true" entry-spacing="0" line-spacing="2">
<sort>
<key macro="author"/>
<key macro="issued-sort" sort="ascending"/>
<key macro="title"/>
</sort>
<layout>
<group suffix=".">
<choose>
<if match="any" is-numeric="keyword">
<text value="* "/>
</if>
</choose>
<group delimiter=". ">
<text macro="author"/>
<text macro="issued"/>
<text macro="title-plus-extra"/>
<text macro="container"/>
</group>
<text macro="legal-cites"/>
<text macro="locators"/>
<group delimiter=", " prefix=". ">
<text macro="event"/>
<text macro="publisher"/>
</group>
</group>
<text macro="access" prefix=" "/>
<text macro="original-date" prefix=" "/>
</layout>
</bibliography>
«1
  • I think, you cannot add uncited items to the bibliography.
  • Thanks LiborA, I have a folder with all articles for the meta-analysis and inserted the in-text references into a paragraph at the end that I will delete before submission (and without then updating the bibliography). I just would like those articles to appear with an asterisk...
  • The question isn't about unchecking but about putting an asterisk in front of references.

    Keyword isn't mapped anywhere into CSL, so you can't use that.
    Extra would work ("note" in CSL), but you may need that for other purposes.

    @bwiernik had advice on handling this in systematic reviews some time back, he might chime in.
  • I am also not sure by construction <if match="any" is-numeric="keyword">.

    Standard construction seems like:
    <if variable="XY" match="any" is-numeric> but currently I am in the car, so I can be wrong.
  • No, the syntax above is correct, it's just that Zotero has no concept of keyword in citation styles.
  • Thanks LiborA and adamsmith!

    I also found the discussion you mention earlier, which has details on the "note" solution (for others interested: https://forums.zotero.org/discussion/67193/inserting-asterisks-into-zotero-bibliography

    The APA actually mandates (again, after a back-and-forth and with a convincing explanation) to include and *-mark references in the main manuscript section, not only in an appendix, see here: http://blog.apastyle.org/apastyle/2012/08/alert-change-in-apa-style-on-meta-analysis-references.html
  • edited January 19, 2018
    I do actually need notes for other purposes, but found a workaround that does the job for me: I put the * in Publication City (which is never used in journal articles, and those are the only candidates for meta-analysis as far as I know). My working code is:

    <choose>
    <if type="article-journal" match="any">
    <text variable="publisher-place" suffix=" "/>
    </if>
    </choose>

    In the same place as above
  • This is based on adamsmith's very helpful code for a different style, thanks for sharing!
  • edited January 19, 2018
    A lot of APA meta-analyses that journals do definelty accept sources listed in just an Appendix, particularly if there are a lot of sources (e.g., I have one meta-analysis under review with 1500 sources). The asterisk hails from old meta-analytic reporting standards before the full data tables were required, and its use is in my experience very outdated. In published meta-analyses at this point, listing in an Appendix is probably more common than asterisks.

    Otherwise, if you really want the asterisk, I would recommend either adding them manually after you unlink citations or else adding an unused CSL variable to Extra and modifying the style. For example, you could add:
    keyword: *

    to Extra and then modify the APA style to add <text variable=keyword suffix=“ “/> to the beginning of the bibliography layout.

    You could also use this code to use indicators other than asterisks (e.g., if you wanted to use superscript letters to indicate articles contributing effect sizes for different variables in your meta-analyses or to indicate studies that reported effect sizes versus those that only contributed reliability or other artifact values).
  • edited January 19, 2018
    (Commenting on the last post before mine, I would not use publication place, as that variable is used for books, book chapters, reports, manuscripts, and theses, all of which might be used as sources in a meta-analysis. Using a variable that is not used by any Zotero item, like keyword, is a more robust and flexible solution.)
  • Also, I’ll make this version of APA style and post it later today.
  • (FWIW, I believe gedankenraum is using Mendeley)
  • Mendeley maps tags to CSL keyword, correct?
  • I don't know. I'll check. But it'd be weird -- how do you deal with multiple tags?
  • Perhaps annote would be better than keyword.
  • bwiernik and adamsmith, thank you very much!

    @bwiernik: I suppose the number of sources makes a huge difference in the appendix/asterisk debate. Mine is about 30 sources, of which a number are also cited individually anyway. And the APA blog statement that sources in appendixes usually don't get credit for having been cited made a lot of sense to me.

    I also agree that the "city" tag is awkward and doesn't lend itself to use cases outside my narrow one (even though most meta-analyses I read restrict themselves to peer-reviewed articles).

    keyword didn't work for me, but that might be a mendeley thing (which I am actually using, sorry I didn't mention - in my googling I found this forum much more helpful :) Mendeley stores the keywords in a separate SQL table, I don't know if it even maps to CSL, but Zotero might be different.

    The note field is problematic because I use that heavily in other work flows.

    With a field that works for most people, adding a style to the repositories could be helpful (unless most people go the appendix route anyways).

    Again thanks for your support!
  • I would use ‘annote’ in the Note field (note, not ‘note’)—the citation processor will extract CSL variables from the top of this field and leave the other contents in place. There isn’t a way to get a consistent field across item types without conflicts other than to use the CSL note syntax.

    (Any solution is going to be fairly hack-y and there are already too many variations on APA in the repository, so I don’t think they would add something like that in the repository, unless @adamsmith thinks that the annote approach might be added to the main APA style? In any event, I am planning on hosting such a style on my GitHub repo.)
  • No, not going to put the annote APA on the official CSL repo. I think having it somewhere as part of a "Systematic Review kit" makes a lot of sense.
  • I will add it to my to-do list for the systematic review kit/article I am putting together.
  • Here is the style. https://github.com/bwiernik/zotero-tools/blob/master/apa-meta-analysis.csl

    Add annote: * to the Note field in Mendeley for the items included in your meta-analysis.
  • I got it to work in Mendeley with a somewhat changed syntax:
    {:annote: *}

    Amazing, thank you!!! Much better than my publication place hack :)

    (for others reading this, background on the curly brackets is here: https://forums.zotero.org/discussion/47132/book-sections-have-dois-too/
  • It looks like Mendeley is still running a very old version of the citation processor, which required the Curly brackets syntax.
  • Dear Mr Wiernik,

    Thanks so much for creating this style! However: I seem totally unable to get my zotero to read/accept it. I saved it to my destop where it is recognized as a .csl file that should be opened with zotero by default. Yet, upon double-clicking it, a dialogue box informs me that "/Users/myname/Desktop/apa-meta-analysis.csl" is not a valid style file. When actively importing it in Zotero's style manager, the message thrown is: An unexpected error occurred while installing "/Users/myname/Desktop/apa-meta-analysis.csl". Finally, when copy/pasting the file content into the Style editor, the message is: "Error parsing style:
    Error: File is not valid XML".

    Any and all ideas on how to fix are welcome!

  • Thanks!

    But alas, no joy (and unless I am very mistaken, this is the exact same file as I tried to install yesterday?).

    I'm using zotero for mac v 5.0.55.1. Could that matter in any way?
  • edited October 4, 2018
    There's a typo in the style. I've proposed a fix and this will work once bwiernik accepts it.
  • edited October 4, 2018
    @adamsmith, thanks for checking in!

    By now I had figured that the style installing problem was due to the following line:

    <summary>APA style, with sources included in a meta-analysis indicated using the CSL 'annote' variable</description>


    Making that either summary /summary or description /description fixes the file with respect to importing (although it does ask about being sure to want to import earlier version file... forgot the details but it seems to import ok after telling it to go ahead anyways).

    Once imported, the bibliography list is generated according to normal APA 6 rules so that's good - yet I seem unable to get the asterisk thing to work. There are quite a few differences between the "apa-meta-analysis.csl" and the default "apa.csl' file but I figured that this is the crucial one:

    <layout>
    <text variable="annote" vertical-align="sup" suffix=" "/>


    I've tried several potential fixes (most of them involving replacing annote with note - which I think ought to be mapped to the "Extra" field in Zotero and trying a simplified rule "<text variable="note"/>" inserted at different locations in the .csl file ) but I am having very little luck so far. Is that also fixed in your solution? If so, I'll stop my attempts and await the fix file - if not: any ideas?


  • The file is fixed now.
  • edited October 4, 2018
    The style as posted by bwiernik will work with
    annote: *
    in the extra field.

    If you just want to use * in the Extra field (which I would not recommend for other reasons), indeed using
    <text variable="note" vertical-align="sup" suffix=" "/> would work.
  • Yes, I strongly recommend not using the CSL 'note' variable, as this will print the entire Extra field for all items. Many things get stored in Extra, and this will likely yield unexpected results. Using annote: * in Extra with the style as written will yield much more consistent and reliable results.
Sign In or Register to comment.