Style with AUTHOR in capital letters or where to edit?

Hey guys,

my University wants capital letters in the citation and bibliography of the authors.
Does anybody know of a style that does it? Couldn't find one...

Or where in the .cls of a given style can I edit this? I tried to understand the syntax, but I'm kinda lost.

Thanks for your help!

Damnation
«1
  • edited December 12, 2010
    you want
    text-case="uppercase"
    either in the
    <names variable="author">
    line or in the
    <name
    line following it - try it out:
    http://www.zotero.org/support/csl_simple_edits
  • Brilliant! Thanks for the help.
    Found this great Primer on CLS and this helped a lot aswell to understand the code. All them macros in the beginning (nice way though ;) )
    http://citationstyles.org/downloads/primer.html#getting-started-a-basic-csl-style <--- helped a lot!

    Formatting the style now based on my University's recommendations based on Harvard1. this will help a lot of people here :)
  • Well, next question already:

    In the Bibliography there are these 2 options:
    <option name="et-al-min" value=""/>
    <option name="et-al-use-first" value="1"/>

    We're supposed to name ALL authors. Can I just delete these two lines?
  • yes. or put in really large numbers - like 99 and 98.

    Note that there are two different csls -
    csl 0.8, which is part of the current Zotero 2.0.9 and for which documentation is more limited, and csl 1.0, which is part of Zotero 2.1 beta at this time and has ample documentation.
    The guide you link to above is for the latter. Not all of this will work in the current Zotero and some of it might actually break a style. The general idea is the same, though. Conversion of styles from 0.8 to 1.0 is automatic, so you're not wasting your time coding for 0.8.
  • Great! Thanks.
    Actually trying to get it running in Mendeley, but having this error now like so many other people: http://feedback.mendeley.com/forums/4941-mendeley-feedback/suggestions/1137415-bug-error-requested-citation-index-out-of-range

    Well well, have to see what's going to happen. Obviously no workaround exists.

    Thanks so far.
  • Mendeley uses csl 1.0 - you might have to convert the style - see the citationstyles page for a how to. Also, Mendeley's csl implementation seems to be more buggy, so you might just be running into that. Send them an e-mail to support, they tend to be very good in getting back to people.
  • Also, Mendeley's csl implementation seems to be more buggy, so you might just be running into that.
    Note that the CSL implementations in Zotero and Mendeley are the same at their core, starting with the Zotero 2.1 betas. This should be a great thing, since it will mean that that core is well-tested and that styles are fully portable. But it also means that Mendeley's CSL implementation (starting with Z 2.1) really only differs in how the word processor plugins and core software interact with it.

    (of course, adamsmith knows all this already, but it's good to remember)
  • edited December 13, 2010
    Ahh. I took harvard1.cls from the zotero.com/styles depository.
    Can I use the harvard.cls style that came with Mendeley and change that according to my needs? That must be in the right format anyway, wouldn't it?

    Thanks!

    edit:// just did a quick validation and no errors occured now. We're on the way. ;)
  • yes, that should work. You would not be able to use the test panel in Zotero 2.0.9, for a csl 1.0 style, though. So either you upgrade Zotero to the beta (which, if you mainly work with Mendeley is unproblematic) or you work without the test panel.
  • Sooo. Got it working now the way I mentioned.
    Did all the changes I wanted appart from one! The most important, the upper case, won't work...
    Yesterday this worked fine in the Zotero testpanel (0.8) and today it won't.

    Here a screenshot of the 2 macros (author and author-short):
    http://img340.imageshack.us/f/notepadwtmstyle.jpg/

    Thanks
  • the macros are fine.
    But if you use 1.0 formatting in the 0.8 testpanel, it will just stop updating - try if that's the case - i.e. try to change other things about the citation. If it doesn't update, that's the problem
  • Yes. I saw that with the testpanel. (I actually updated to the beta as you said)
    I'm actually testing my styles directly in Mendeley/Word and the names just show up in "lowercase". Other things I changed showed up as wanted in Word.
  • so this works in the Zotero preview and it doesn't work in Mendeley?
    First step would be to install a Zotero Word plugin and try if it works with that. If it does, get in touch with Mendeley, because it's clearly not a Zotero problem.
    If it doesn't, this would be a problem of csl 1.0 and Frank or someone from the team would have to check.
  • No. It doesn't work with Zotero either. Didn't use the Zotero test panel since it didn't show me what I was changing anyway.

    Will the CSL1.0 guys see this here or should i write them?
  • I think the test panel in the beta actually works.
    But I think I know the problem: csl 1.0 is more sophisticated in letting you specify what to uppercase and what not.
    Try moving the text-case="uppercase" one line down, into the
    <name .... line (instead of the <names variable... line it's in now.
  • edited December 14, 2010
    Actually, uppercase can only be set on the name-part elements in CSL 1.0. See http://citationstyles.org/downloads/specification.html#name-part-formatting for an example.
  • Thanks guys. Would this be ok then?

    <macro name="author">
    <names variable="author">
    <name text-case="uppercase" name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
    <label form="short" prefix=" " suffix="." text-case="lowercase" strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </macro>
  • No - look at the link that Rintze posted.
    You'd need something like:

    <macro name="author">
    <names variable="author">
    <name text-case="uppercase" name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", ">
    <name-part name="family" text-case="uppercase">
    <name/>

    (and add name-part name="given" etc. as needed.)
  • Ahh. I see.
    Puhh. That's some work then. Will try my best.

    Do any of you guys know where Mendeley saves its styles how install afterwards trough the list? It's definitely not in the folder where the 8 basic styles can be found. I would be interested in the code of some styles to see how they managed the problem, but can't find the code.
    DIN1505-2 for example has capitalized letters.

    Cheers,

    Damnation
  • sorry, for Mendeley support ask Mendeley - you might find some instructions on their site.
  • Yep, asked already, but you guys seem more active round here ;)

    Thanks anyway.
  • Tried it now a couple of times. this was my last try:

    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
    <name-part name="family" text-case="uppercase">
    <label form="short" prefix=" " suffix="." text-case="lowercase" strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </name>
    </names>
    </macro>

    And when I change my style to this all citations and the bibliography vanisch, but reoccur when chaning the style to something normal.
    Is the syntax correct?
  • </name>
    needs to go before the <label.../> line.

    It might be helpful to think about ways to improve the documentation here - I struggled understanding that part, too.
  • edited December 19, 2010
    It's in the CSL 1.0 spec:
    The cs:label element ... should be included after the cs:name and cs:et-al elements, but before the cs:substitute element.
    http://citationstyles.org/downloads/specification.html#label-in-cs-names
  • yeah - I realized it's there - it just took me a while to understand - in this case that the nodes can't overlap (i.e. that <name ...> <label...> </name> will break the style. And considering that I'm probably on the sophisticated end of csl users (at least at this point) I'm wondering how that could be made clearer.

    Don't get me wrong - I think overall the documentation is wonderful and a vast improvement over the current 0.8 one.
  • Just tried the following:

    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
    <name-part name="family" text-case="uppercase">
    </name>
    <label form="short" prefix=" " suffix="." text-case="lowercase" strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </macro>

    The Validator tells me the following (just found out that it would be usefull to look for errors):

    1.

    Error: Element name-part from namespace http://purl.org/net/xbiblio/csl not allowed as child of element names from namespace http://purl.org/net/xbiblio/csl in this context. (Suppressing further errors from this subtree.)

    1. From line 29, column 9; to line 29, column 55

    >↩ <name-part name="family" text-case="uppercase">↩ </n

    2.

    Fatal Error: required character (found >) (expected -)

    At line 30, column 9

    case">↩ </name>↩ <la

    Thanks guys!
  • the first <name... line shouldn't have a slash at the end:
    <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", ">
    <name-part name="family" text-case="uppercase">
    </name

    the last </name> closes the name node - you're doing that twice (i.e. once in the long <name name-as-sort-order..../> line and once with the </name>, so the style breaks. Sorry, I overlooked that above.
    Good idea to look at the validator, yes.
  • Sorry, for the late answer. Xmas holiday madness....

    I've never realised that slash at the end of the <name... line. Obviously it's all in the details ;)

    got the following now:
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", ">
    <name-part name="family" text-case="uppercase">
    </name>
    <label form="short" prefix=" " suffix="." text-case="lowercase" strip-periods="true"/>
    <substitute>
    <names variable="editor"/>
    <text macro="anon"/>
    </substitute>
    </names>
    </macro>

    But the validator says:

    1.

    Fatal Error: required character (found >) (expected -)

    At line 30, column 9

    case">↩ </name>↩ <l

    Any suggestions?

    Thanks again ;)
  • edited December 27, 2010
    You should close the name-part element with a slash, e.g.: <name-part attribute="value" />
  • Ahh! Now it's working! Ha :) Thanks.
Sign In or Register to comment.