Altering the use of "and" in a names list

edited July 7, 2020

Is it possible for names of different types to be considered as belonging to a single group when placing the commas and the "and"? For instance, the code below will result in: DOE, John and SMITH, Adam and WILLIAMS, Sam (dir.), because Williams is a collection editor, not an author. I would like to ignore the distinction and obtain: DOE, John, SMITH, Adam and WILLIAMS, Sam (dir.).

Thank you for any help!

<macro name="author">
<names variable="author collection-editor" delimiter=" and ">
<name delimiter=", " and="text" delimiter-precedes-last="never" name-as-sort-order="all">
<name-part name="family" text-case="uppercase"/>
<label form="short" prefix=" (" suffix=")"/>

  • edited July 7, 2020
    Also the code in my post doesn't show. Anybody knows what's up with that? Fortunately it was only complimentary to the question
  • To show code, wrap it in <code> <code/> tags.

    What you are saying is not currently possible with CSL but may be in a future version.

    Could you explain what the use case is here with author/collection-editor? What’s an example real citation for this? I’ve only seen examples like this for media roles (e.g., director, producer).
  • Thank you for your answer!

    The code now shows in the first post.

    I'm making the style for someone else who is editing an already existing french bibliography. This would be an example of a real citation: << BURY, Emmanuel et VAN DER SCHUEREN, Éric (dir.), Charles Sorel polygraphe, Québec, Presses de l'Université Laval (Collections de la République des Lettres), 2006. >> Obviously the problem doesn't show here because there is only one author instead of two, plus the collection editor. (in french it's "directeur de collection", thus I created the corresponding term "dir.").

    Also, I just learned that in the style, the last author should not be inverted and show as NAME SURNAME. I read through the documentation and it looks like name-as-sort-order="first" is the closest to what I would like. There isn't any equivalent to name-as-sort-order="all-but-last", is there?
  • Firat, there is already a CSL variable for directeur de la publication: editorial-director. Use that instead of hacking collection-editor.

    They best way to accomplish what you are doing is to give the authors and editorial-director in separate names elements entirely. Don’t put them together at all.
Sign In or Register to comment.