name-as-sort-order not working

Using with MS Word (Office 2007), Zotero WinWord integration 3.0a3.


I cannot get the name order to be lastname-firstname for all authors in a bibliography entry. Using name-as-sort-order="first" behaves as expected with just the first name being last-first, but using the value "all" or omitting the name-as-sort-order both result in first-last ordering.

Below is the code for my authors macro. To be thorough, I've confirmed that if I do something like font-weight="bold" it indeed affects the entire authors list that I am trying to modify into the last-first order. Can anyone point out if I might be doing something incorrectly, or if this might be a bug? Is there a setting somewhere else I should look for that might be overriding my name-as-sort-order preference when I use all

<macro name="authors">
<names variable="author">
<name delimiter=", " delimiter-precedes-last="always" initialize-with="." name-as-sort-order="all"/>
</names>
</macro>
  • you need to define the sort separator
    i.e.
    sort-separator=", "
    for the standard Lastname, FN. - but you can put pretty much anything else you want - inlcuding nothing - between the quotation marks.
  • Yup, I just figured this out and was about to post this when you posted (in fact I was on post-preview and was about to hit "submit" when i got an email informing me of your post!). Seems odd that name-as-sort-order="first" works but name-as-sort-order="all" does not when the sort-separator field is missing (I'd suggest that name-sorting should work with or without this field), but at least I can get it to do what I need. Thanks!!
  • Hi,

    name-as-sort-order is not working for me too. I tried to figure out the solution but I don't understand where there could be problem.

    There is the code I'm using to display the authors in the bibliography:

    <macro name="author-short">
    <names variable="author">
    <name font-weight="normal" font-style="normal" font-variant="small-caps" form="long" name-as-sort-order="first" and="symbol" delimiter=", " delimiter-precedes-last="never" initialize-with="." />
    </names>
    </macro>

    And the result is for instance:
    A.L. Hodgkin & A.F. Huxley - 1939 - Action Potentials Recorded from Inside a Nerve Fibre.

    I would like to have the "Name FN. " configuration instead of "FN. Name "one and changing the input to name-as-sort-order doesn't change anything.

    If someone could help me on that, it would be very useful.

    Thanks in advance...
  • As adamsmith said back in October:
    you need to define the sort separator
    i.e.
    sort-separator=", "
  • Damn,

    I saw
    sort-separator=", "

    but I red
    delimiter=", "

    This is why I shouldn't do too much stuff in the same time... hum I'll try to be more focus next time!

    Anyway, thank you very much to teach me how to read it was very very helpfull ;°)
  • edited January 18, 2010
    No worries, it's a confusing requirement. Arguably the CSL schema should refuse to validate the style when name-as-sort-order is used without the sort-separator attribute.

    (EDIT: Following this up, I've just had a brief chat with someone about CSL 1.0 and the new processor for Zotero, coming later in the year, that will speak it. The new processor will not block on this; you'll get the names reversed, but with nothing between them, until the sort-separator is added. That behavior should be enough of a hint; we won't try to catch this at validation as I suggest above.)
  • @Frank - that sounds great - I'm really excited. Just saw the fancy manual you published.
  • Hi,
    I got the same problem, can anyone tell me where can I find the "code"/"macro" to change the sort-separator=", " ??


    cheers,
  • deparis - not sure what you're trying to do and what "same problem" you're refering to.
    maybe this helps?
    http://www.zotero.org/support/csl_simple_edits
    otherwise you'll need to explain in more detail.
Sign In or Register to comment.