How, exactly, do I install a new style of my own?

I obtained and edited the chicago-author-date .csl file in emacs to do something I need.

I don't know, though, how to start using it.

I could drag and drop it into Firefox, but after restarting FF and Word, Word does not see the new style.

I also was unclear what name to give the new file, and what needs to go into the material at the very top, such as name and category.

Running FF on Mac OS 10.8 with Word 2011 for Mac.
  • did you see this?

    Most importantly, you want to change the id and the title of the new style. The filename doesn't matter as long as it ends in .csl.
    If you want to share the style with other users on the repository (which we'd greatly appreciate), there is a longer list of requirements here:
    Any further problems let us know.
  • I did see the link above on editing step-by-step, and it was not enough step-by-step for me as a complete newbie.

    I hadn't seen the github wiki.

    I'm still a bit confused. The chicago-author-date file I downloaded does not have an <id> field. Looking in the .csl I see a <title> field, but not an <id> field.

    How do I set the <title> filed and the file name in order to play around with it on my machine for starters? And while doing that, do I need to add an <id> field?

    BTW, adding the answers to my questions to the step-by-step would probably help future newbies like me.
  • Every csl file must have an id field. In the Chicago author-date style from the repository it is:
    If the version of your style doesn't have such a field it's corrupted somehow.
  • Ahah! My copy was corrupted. (Probably by me, inadvertently clobbering an adjacent line while editing.)

    This still doesn't tell me what I put into the ID line while I am playing with my own local copy.

    Does it work to still point to the zotero styles http address for the master file when I am working on my local copy, or do I replace http:// with the appropriate file://?
  • and for the title field - that's actually very robust - you just write the title of the style however you want it to show up in Zotero (though you need to escape protected characters - in your case ampersand & would be a likely candidate.

    There is also this:
    which you may find easier to use and it automates a lot of the formal stuff.
  • sorry, that overlapped. Yes, just add the last bit of the URL for the ID, it can still point to (it can actually be pretty much anything, but no reason to not point it to
  • Thanks. Now I can install (though I get a complaint from FF that "This XML file does not seem to have any style file associated with it.")

    My next problem is that while I can get some of the changes I need to get closer to AAAI style, I cannot seem to move from hanging-indent entries to filled flush left and right entries.

    I've tried changing the line

    <bibliography hanging-indent="true" et-al-min="11" ... >

    both by deleting the


    and by changing it to


    but either way my entries still appear with hanging indents.


    As far as the visual editor goes, it seems like a nice idea that is not yet ready. I can't find anyplace using it to change the overall hanging-indent format, and it has some other problems as well.
  • deleting hanging indent should work (as should setting it to false). We'd need to see the style that you have to say more.
  • Hmm. Deleting the .csl and reinstalling it made it work, when updating had not.

    Next 2 questions:

    (1) Now that I've gotten rid of the hanging indent, is there a way to right justify bibliography entries, which is how AAAI style in fact appears?

    (2) How do I tell Zotero that in this style I want all author names in the form: last-name, first-initial.

    I assume the styling of author names is related to/in the code

    <macro name="contributors">
    <names variable="author">
    <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
    <label form="short" plural="never" prefix=", "/>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="title"/>
    <text macro="recipient"/>
    <macro name="contributors-short">
    <names variable="author">
    <name form="short" and="text" delimiter=", " initialize-with=". "/>
    <names variable="editor"/>
    <names variable="translator"/>
    <text macro="title"/>

    but it's not so easy for me to figure out exactly what is what.
  • (1) Now that I've gotten rid of the hanging indent, is there a way to right justify bibliography entries, which is how AAAI style in fact appears?
    that's not possible in Zotero, though easy enough to do in Word/LO afterwards (ideally by modifying the "bibliography" style).
    (2) How do I tell Zotero that in this style I want all author names in the form: last-name, first-initial.
    <name and="text" name-as-sort-order="always" initialized-with=". "
    sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>

    see here for details:
    but it's not so easy for me to figure out exactly what is what.
    Obviously we're happy to help with small things, more generally, I would recommend taking another look at the visual editor, which I believe is much better than you give it credit for - e.g. it has info-bubbles over all items that you can modify.
    Otherwise read the specs linked to above, which are an exhaustive guide to CSL.
  • 1. Thank you very much for the pointer to
    That is exactly the level of documentation that somebody like me--a programmer but utterly ignorant of .csl (because almost always Zotero already has exactly what I need or I'm writing in LaTeX with bibtex)--needs!

    2. Visual editor:
    If they cleaned up a few things and gave a bit of an intro it would have been a easier for me. I've finally figured out:

    a. Rather than having a "save as" option under either the Style or Edit menus, where it would logically go, you're expected to go into Style Info-->Info and edit the title field.
    At the very least, the "Save" warning message about clobbering the style you are working with could point to the field one needs to edit.

    b. hanging-indent is located under "Advanced" rather than under Bibliography-->Layout. Advanced isn't where the newcomer is going to look on day one.

    Programmer or not, of course I'd rather use a visual tool than learn a new language for something that I'm only going to do once a year if that.
  • 2. there are instructions here:
    which I don't think are very good yet (e.g. they don't tell you how to save a style and change it's title.) It looks like those are editable by regular github users, so feel free to add anything you think is worthwhile (same for the step by step instructions on, which are also in wiki form, though you need a separate wiki account).

    a) true, people do struggle with the naming/saving. I think it's highly convenient that you just need to change the title and the editor does everything else for you, but it'd be a good idea to point people to that more directly.

    b) that's actually not true - if you click on "bibliography" rather than bibliography-->layout - you do get to the hanging indent. Admittedly it's a bit hard to figure out where to find what - the tree on the left mirrors the structure of the XML - but for the formatting options that's not easy to solve. (Getting to other parts of the tree by clicking on relevant parts of the citation is quite elegant, but not really doable for formatting).
  • Hi rsloan17,
    Did you have success coding a AAAI style file?
    If so, might you be willing to share it?

    Best wishes,

  • Hi rsloan17,

    Can you please share the AAAI style file?
  • I never got something fully satisfactory, but am happy to share the limited progress I made. I'm not seeing here how to post a .csl file.

    Either tell me the trick for uploading a file, or email me at sloan at
    uic dot edu and I'll send you what I have.
  • paste the content to --> Create secret gist (or public, doesn't matter), and post the link here. Anyone can then download using the "Raw" link at the top right on that page.
  • I would definitely be interested in getting a hold of the CSL for AAAI as well if it can be provided. Thanks!
Sign In or Register to comment.