Citation style request: AMA with parenthesis for citation number instead of superscript

edited December 12, 2016
Hi, I'm trying to edit the American Medical Association (no URL) style to incorporate parentheses for the citation numbers instead of having the numbers in superscript form. This is for Journal of Clinical Investigation (not in the database).

What I tried to do was replace the following:
<layout delimiter="," vertical-align="sup">
<text variable="citation-number"/>
<group prefix="(" suffix=")">
<label variable="locator" form="short" strip-periods="true"/>
<text variable="locator"/>


With:
<layout prefix=“(“ suffix=“)” delimiter=", “>
<text variable="citation-number"/>
<group prefix="(" suffix=")">
<label variable="locator" form="short" strip-periods="true"/>
<text variable="locator"/>


Opening this style in zotero Firefox doesn't work. I always get the error: .csl file is not a valid style file.

Please let me know what I'm doing wrong. Thanks in advance!
  • could your edit your post and wrap your code examples between <code> and </code> tags so they don't disappear?
  • Thanks for fixing my post. Does anyone know how to change it to parenthesis?
  • It looks like you modified the style code in a word processor like Word or Pages -- one of the things they do which makes them nice for text and awful for code is the use of smart quotes “(“ instead of straight quotes ",". With that fixed, your modified styles should work.

    For CSL (and really for all computer code) you always want straight quotes.
    As basic tools, Notepad on Windows or TextEdit on Mac will work, though editors like Atom (cross platform) provide more features like code highlighting.
  • I tried it again using Notepad on Windows instead of TextEdit on Mac and it worked! I also didn't include the group prefix and label variable line since I didn't see them in styles with parenthesis.
  • Those lines are for formatting page numbers in the citation. Without them, it will just list the number instead of, for example:

    2 (p123)

    You might want to instead, change the group prefix to ", " which will print like this:

    (2, p123)
Sign In or Register to comment.