Bug in 'Format citations'?

I could not get Paperpile to format citations where there is only an editor, no author, with my own CSL , so I checked with the standard APA 6th edition CSL and the problem remains.

  • Book, no authors, one editor.
  • Editor’s name in field as Surname, Firstname.
  • Citation style: American Psychological Association, 6th edition.

If I use the quick ‘Cite’ button in Paperpile, this is copied to the clipboard in the following format, as expected:

  • Insoll, T. (Ed.). (2007). The archaeology of identities : a reader. London: Routledge.

When I am creating a document in Google Docs and use CTRL-ALT-P to insert this item as an inline citation it gives:

  • (Insoll 2007)

But when I use ‘Format citations’ in the Paperpile menu this is changed to:

  • (Timothy Insoll, 2007)

and the reference is formatted as:

  • Timothy Insoll. (2007). The archaeology of identities : a reader. London: Routledge.

When they should be:

  • (Insoll, 2007)
  • Insoll, T. (Ed.). (2007). The archaeology of identities : a reader. London: Routledge.

Let me know if you need any more information needed.

Can you have a look at this thread: Bibliography: First name included even though APA style selected

But in Paperpile there is only this one reference with Insoll as the author.

If you click ‘cite’ in Paperpile the citation is formatted under the assumption that this is the only item in your bibliography so there is never disambiguation going on if you just have selected one item.

If you cite multiple papers in one Google Doc with the same author APA will disambiguate.

It could be totally unrelated and if you really only have one item with the author Insoll in your library it might be something different.

I can confirm that “Insoll” appears only once in my Paperpile database and there is only one inline citation in my document.

It is not just APA - the same incorrect formatting occurs in my own Harvard-based CSL.

I wonder if it is how the Paperpile formatting engine implements “substitute” ?

Oh, I included an XML snippet in that last comment but it didn’t appear - perhaps this will be better:

<macro name="author-short">
<names variable="author">
  <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
  <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
  </substitute>
</names>

Thanks, we will have a look at it.

[quote=“richardm, post:1, topic:921”][/quote]

You are on the right track. The same processing that is applied to the author variable, needs to be applied to the editor variable. The CSL file needs to edited this way:

<names variable="editor">
  <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
  <label form="short" prefix=" (" suffix=")" text-case="capitalize-first"/>
</names>

And the same needs to be done for the “author-short” macro:

<macro name="author-short">
  <names variable="author">
    <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
    <substitute>
       <names variable="editor">
         <name form="short" and="symbol" delimiter=", " initialize-with=". "/>
       </names>
   ...

By my reading of the specification the substituted element inherits the earlier name attribute values (see [here][1]):

“A shorthand version of [cs:names] without child elements, which inherits the attributes values set on the [cs:name] and [cs:et-al] child elements of the original [cs:names] element, may also be used.”

I understand that to mean that this is a simple and straightforward way of applying the the same values whether it is an author or editor.

I am testing with the APA 6th ed CSL and that has the simple layout as above and Zotero interprets that correctly (i.e. in line with my understanding of the specification) in formatting both inline ciation and the reference, whereas Paperpile does not.

Am I missing something…?

Thanks.
[1]: http://docs.citationstyles.org/en/stable/specification.html#substitute

I also talked to the Zotero developers and the error seems to be in the CSL processing engine citeproc.js used by both Zotero and Paperpile. I am currently looking into the requirements to update it to a new version.

Thanks Andreas.

We have updated citeproc-js to version 1.1.63, which should fix the issues you mentioned.

Thanks Andreas - I’ve just done a quick check and it looks good.