How to capitalize only the Author's last name?

I've managed to create my own style. I need to capitalize the Author's last name (text-case: uppercase) and to put the surname in parentheses (text-case: capitalize-first, prefix: "( " and suffix: " )"), like that :
LAST NAME (Surname),

Any idea?

Thanks a lot for your help
  • edited February 26, 2009
    Don't you mean "LAST NAME (Given name)"?

    You can have uppercase names:

    http://www.zotero.org/support/dev/csl_syntax_summary#formatting
    e.g. <text variable="author" text-case="uppercase"/>

    but I don't think there is the for this situation required support in CSL to explicitly call either given names or last names.
  • "Don't you mean "LAST NAME (Given name)"?"
    Of course, sorry for my really bad English!

    "I don't think there is the for this situation required support in CSL to explicitly call either given names or last names."
    I was afraid to read this kind of answer... Because of the possibility to manage the display of the given name's initial letter (option "initialize-with" for the <name> block), I still hope to find a solution.

    Could anyone please help me?
  • I had the same problem, writing in a French academic context where the last name needs to be in capitals, preferably in small capitals. The only workaround I found was to export my zotero to bibtex and then use biblatex to write my texts in latex. Their style 'verbose' let me get pretty close to what I actually need.
    That won't be much help to you, but perhaps someone who understands how biblatex styles work can tell us what mechanism lets them determine where to put the capitals?
    Clio
  • I'm the author of CSL. This is tricky, but I think it probably makes sense to add a new option to names; maybe something like "family-name-format" with option of "capitalize" as a first step.

    So there's no solution now, but hopefully there will be before too long.
  • That would be great! I hope you will find the time to add this kind of option.
    Anyway, thank's a lot for your useful work
  • If you add new option to "names", it will be fine to add prefix ans suffix options (given-name-prefix and given-name-suffix) for givenname part because sometime givennames have to be written with braces and in small caps.
    To be able to write LastName part in bold font and FirstName part in normal (roman) font should be also nice.
  • I'm a bit afraid handling all these options requires adding tons of extra attributes.

    What about extending it on the element level, allowing style authors to use the existing formatting facilities for formatting text?

    E.g.:
    <names variable="author">
    <name name-as-sort-order="all" sort-separator=" " delimiter=", ">
    <forename prefix="(" suffix=")"/>
    <surname text-case="uppercase"/>
    </name>
    </names>
    forename and surname would only handle formatting, since name order is already defined by name-as-sort-order. This would also be backwards compatible, since in most cases forename and surname elements could simply be omitted.

    (By the way: is text-case or text-transform the correct variant, or are both identical? Both are used in the docs.)
  • felwert, I agree with you. Your proposal is simple and seems backward compatible.

    And maybe could be compatible with an other request: In french citations sometimes firstnames should be "initalized" not with the first letter but with the first "digram" or "trigram" (Ch. for Charles, Chr. for Christian, Th. for Thomas, Cl. for Claude, ...).I believe it's a usage but not a standard. I don't know how to specifies this.
  • edited March 3, 2009
    You two are forgetting one big issue: more than half of the world does not have the same sorting and display rules as the U.S., Western Europe, etc. Consider a name like "Mao Zedong," which even in English should be sorted exactly as it's displayed (on 'Mao').

    There are reasons why the design is the way it is.
  • @bdarcus: I'm not sure I totally understand your concern. Of course sorting and display rules are important when dealing with names, but I don't think this should prevent the implementation of specific requirements from publishers.

    If it clarifies the semantics, take "family name" and "given name" instead of forename and surname.

    Let's take "Richard Strauss" and "Takeda Shingen". In sort order, they should probably be written as "Strauss, Richard" and "Takeda Shingen", since the family name is usually taken into account for sorting. Given the rules mentioned above, this would display as "STRAUSS (Richard)" and "TAKEDA (Shingen)". The interesting question is how this should be displayed when not in sort order.

    I can think of two approaches:

    a) Only take the locale into account. So write "Richard Strauss" and "Shingen Takeda" in a European locale. This is the way quotes are handled, when even English titles are quoted using German quotes in a German locale.
    b) Take the order of the locale of the person into account, whose name is concerned. So write "Richard Strauss" (as he was German) and "Takeda Shingen" (as he was Japanese).

    But none of these should prevent the styling of names. So for example, in many Euro-Japanese co-production movies you would see names in the form of "Richard STRAUSS" and "TAKEDA Shingen".

    To be honest, I don't know how Zotero handles the non-sorting order of names. But anyway, style authors should have the possibility to style family name and given name independently. And there are real-world requirements that encourage such a feature.
  • edited March 3, 2009
    @bdarcus: I'm not sure I totally understand your concern. Of course sorting and display rules are important when dealing with names, but I don't think this should prevent the implementation of specific requirements from publishers.
    My concern is that the CSL that would result from your suggestion would either:

    1. be very complex, and very verbose, or ...

    2. not be international-friendly

    How, for example, would you encode the rules in your hypothetical example, using the changes you'd like to see in CSL?

    E.g. maybe I'm just being dim, but I don't see how a processor is supposed to know how to get "Richard STRAUSS" and "TAKEDA Shingen." It seems to me you'd need a conditional that treats each type of name (as well as organizational names) differently. If I'm correct, then that means what can be achieved now with, say, three lines, would need 10 or more.

    Or, alternately, we'd need some rule that says order per se is unimportant with the cs:names element. That would probably cause other problems, though.
  • edited March 3, 2009
    Also, now that CSL is implemented in a number of different projects, with over a thousand styles, backward-incompatible changes are painful.

    Just to be clear: I don't dispute the use cases. Am just leery of these kinds of particular implementation changes.
  • bdarcus, I am sorry but I don't understand your answer. For me, sorting algorithm is an other issue and i agree with you that sorting rules are not the same in U.S., in Western Europe, etc. and i agree it's not easy to take into account specific algorithms for all languages.
    The question is just how to format bibliographic entry and to how to specify other formats, how to offer to the user more flexibility in bibliography appearance. "Initalize" methods and prefix and suffix for givenname do not modify sort algorithms.
    As i consider Zotero is quite perfect and as i appreciate translations in other languages (some other bibliographic tools have never been translated), perhaps i am too inclined to request more flexibility. Sorry.

    An other question for bdarcus, may be you can help me (I don't know where to post this question):
    as i plan to adapt some part of Zotero for my own needs (dedicated initialize methods, annotated bibliographies, etc.), i am looking for an IDE to do this. For now, I use Eclipse and Oxygene (it's OK for csl, xml and xul) but "Spket" plug-in claims for errors in javascript files (I know javascript is not really standardized). Up to now I have not found a good javascript plug-in for Eclipse adapted to the javascript used by Mozilla Firefox. Do you know an other free IDE ? Thanks a lot.
  • My concern is that the CSL that would result from your suggestion would either:

    be very complex, and very verbose, or ...

    not be international-friendly
    I have the impression that we're talking of totally different things. So please let me clarify what I really meant.

    My suggestion doesn't touch order issues at all. And, as zebulon lined out concerning the initialization, Zotero/CSL does already handle family name and given name differently. E.g., initialize-with does initialize the given name, not the family name ("R. Strauss"). Your suggestion ("family-name-format") also has to distinguish family name and given name.
    How, for example, would you encode the rules in your hypothetical example, using the changes you'd like to see in CSL?

    E.g. maybe I'm just being dim, but I don't see how a processor is supposed to know how to get "Richard STRAUSS" and "TAKEDA Shingen."
    I wouldn't know, either. But I think the problem is display order here, not capitalization.

    The MODS standard encodes names like this:
    <name type="personal">
    <namePart type="given">Richard</namePart>
    <namePart type="family">Strauss</namePart>
    </name>
    All I am asking for is different formatting rules for namePart[@type=given] and namePart[@type=family]. The CSL processor can use whatever ordering rules it used to, I don't request any change here.
    Also, now that CSL is implemented in a number of different projects, with over a thousand styles, backward-incompatible changes are painful.
    I don't think that the proposed changes are in fact backwards incompatible. Quite the contrary.
    <names variable="author">
    <name name-as-sort-order="all" sort-separator=" " delimiter=", ">
    <given-name prefix="(" suffix=")"/>
    <family-name text-case="uppercase"/>
    </name>
    </names>
    The given-name and family-name elements are purely optional. So all the existing styles would be perfectly valid, since they offer all the information needed. New styles could make use of these elements to specify formatting rules that differ between given name and family name. All other information (like ordering) is taken from the name element, just as it used to.

    I don't think this syntax is very verbose. It only adds two optional elements which can carry the standard formatting attributes. I think this is a cleaner solution than adding specialized attributes to control formatting of different parts of the name.

    I hope I could clarify some points I might have messed up in my previous post.
  • I am completely in line with "felwert". Felwert clearly explains in good english what i think.(i am french and english language is not easy for me, i am sorry but it's not perfectly natural to explain my point of view).
  • edited March 3, 2009
    As I said, "Or, alternately, we'd need some rule that says order per se is unimportant with the cs:names element.." That's what you're suggesting.

    But I also suggested that the change might cause other problems. I'll raise the issue with the xbib group (where there are a couple of different projects working on CSL implementations). If they like the idea, then we can add it.

    PS - forums maintainers, quotes aren't properly rendered.
  • Is there something new now?


    I need uppercase for LASTNAME and normal for FIRSTNAME ...

    I programmed everything for my oyn purpose, but can´t use it without this option...

    waste of time ;(

    PLEASE DO SOMETHING FOR THE WHOLE EUROPE! ;)
  • edited June 28, 2011
    PLEASE DON'T POST REPEATEDLY ABOUT THE SAME TOPIC. WE CAN HEAR YOU.

    AS IT HAPPENS, WE DID DO SOMETHING FOR EUROPE, AND MUCH OF THE WORK WAS DONE BY EUROPEAN CONTRIBUTORS. ZOTERO 2.1 USES CSL 1.0, WHICH IS DESCRIBED HERE:

    http://citationstyles.org/downloads/specification.html#name-part-formatting
  • love you! sorry, i assure you i´ve been searching for days!
  • THANKS FRANK! EUROPE LOVES YOU!
Sign In or Register to comment.