Loading a New Style

I am new to Zotero, and I am attempting to revise and load the Society of Biblical Literature style. I followed the instructions from another forum posting in regard to eliminating the "Ibid" function by editing the code. No problems there. I changed the id tag to point to the file as I saved it on my system. I completed the changes to the file using Notepad and then saved the file in .csl format. I then dragged the file into my Mozilla Firefox folder. As far as I can see from other discussions, I have followed the procedure correctly thus far.

However, that is as far as I get. When I open the list of available styles in the list in the Word plugin, my new style does not appear. Could anyone help me to understand how to get this new style functioning in Word?

Thanks,
RK
  • hmm - my suspicion is that you did the wrong thing with your csl file:
    don't drag it into the FF _folder_ - drag it right into firefox, i.e. into an open FF window, or just just the open file menu of FF.
  • Thanks for the reply. I tried both methods (dragging the csl file into an open FF window as well as opening the file with the open file menu option). In both cases, the coding of the file appeared in the FF window. I then opened Word and clicked on the Zotero Set Doc Prefs button. However, I still do not see my style listed. Here are the first few lines of my coding:

    <style class="note" xml:lang="en">

    <info>

    <title>
    SBLstyleRK
    </title>

    <id>
    C:\Program Files\Mozilla Firefox\SBLstyleRK.csl
    </id>

    Appreciate the help,
    RK
  • The file needs to have a .csl extension. Make sure Notepad didn't automatically add a .txt extension (which could be hidden if Windows is set not to display all file extensions).
  • Yes, the .txt extension problem did trip me up at first, but I already caught that and corrected it before trying to place the file into FF.
  • does FF prompt you with a question if it should install the new style?
    Also, there is a grey bar saying something like "This XML file doesn't seem to have any style information" at the top of your window.
    If not, it really does sound like your opening a .txt file -
    sorry to ask again - but you are aware that if windows usually doesn't show file extensions and then you save a file as .csl windows really does save the file as .csl.txt? - you have to somewhere in the folder options unselect "hide known file extensions".
  • When I drag the file into the FF window, I get neither a question about installing nor a gray bar saying "This XML...." This led me to check myself on the .csl versus .txt issue. I set windows to display file extensions, and I do indeed have a .csl file. This is confirmed by clicking properties and looking at the file type. To check myself, I copied the original style information (without any changes from me) into a notepad file, saved it as a .csl file, and then dragged it into an open FF window. I got the same effect--no install question or gray bar, just text in a window.

    Here's my process:
    -click on style in style repository;
    -copy style coding to notepad;
    -save as .csl file (I have tried using Unicode, ANSI, and UTF-8 encoding, all with no success)
    -drag .csl file into FF window
  • sorry, I'm out of my wits - courious: when you open a file from the repository (i.e. just click on a link such as this one: http://www.zotero.org/styles/mhra ) do you see said grey bar?
  • (piling on too late to save anyone's time here) It's as per adam.smith's advice. If you have the file in your filesystem, use "file:///" (three slashes) followed by the full path name to the CSL file (saved with a .csl extension). The browser will open it as a page, and (if Zotero is installed and enabled), you'll get a query box asking if you want to install the style. Click, restart, and it's ready to go.

    If there is a severe problem with the file, such as mismatched tags, you'll get an error message with details of the syntax error. Less severe problems (like including attributes that are not valid in the CSL spec) will not produce an error, but that part of the style may not work correctly.

    If you will be making more changes to the file, bookmark it in the browser or drag the address bar icon into the toolbar; anytime you open it, the style will be reinstalled and the old version overwritten.
  • Adam, I do get the gray bar when I click the link, as I do when I click any of the styles in the repository. The file:///C:... line in the address bar has not been a problem. This appears when I drag the file into FF, open it manually with the menu option, or type the location in. In all cases, I get a page of code (no gray bar), no query message, and no error messages.

    The collective advice so far (which I appreciate!) would seem to indicate that I do not have a .csl file but rather a .txt file. However, my file extensions as well as the file description under "properties" both indicate that I do indeed have a .csl file.

    I should note as well that I have tried these processes with a copy of undmodified style codes as well as with the one I have modified. All produce the same result--just a page of code in the FF browser and no more.

    I have tried all this with the Zotero window open and closed. I have tried making sure that the character encoding in FF and in the .csl file were both set the same. Basically, FF simply seems to refuse to recognize my .csl files as anything other than mere text. I am using FF 3.0.5, Windows XP Pro. I have loaded the Zotero extension, and already have a number of references entered. I have also installed the Word plugin (which is where my problem centers--I can't get my modified SBL style to show up).

    RK
  • edited January 17, 2009
    So installing styles directly from the repository does work when you use the install links?
  • Yes, the "Install" function works in the Repository.
  • edited January 17, 2009
    Here's my process:
    -click on style in style repository;
    -copy style coding to notepad;
    Although I don't think it prevents your style from installing, this workflow will prevent the saved style from working correctly, as you will also copy the minus-signs into your text-editor, which Firefox adds when viewing XML documents (clicking those added signs allows you to collapse sections of the XML documents).

    I think the other issue has to do with the encoding of the text. Instead of your earlier workflow, try this:

    - look up the Society of Biblical Literature style in the style repository
    - right-click on the style name, select "Save Link as...", and save the file to your hard drive
    - drag the style into an open Firefox window
    - if the previous step results in a popup that asks whether you want to install the style, make some quick edits and check whether you can install the modified style as well
  • Nice. This route allowed me to save as a .csl file and in XML format. Whatever the differences were, it worked.

    Kudos,
    RK
  • I have read endless discussions on how to import a style. The style I creted with http://www.somwhere.org/csl seems to work in the chrome://zotero/content/tools/csledit.xul.
    I then copy and paste it in notepad (I have Windows XP) and then save it with a .csl extension, not txt. I did enable extension views, etc.
    When I put it in FF I get the text of the code on the browser. I tried everything above and nothing works and I am no expert on this topic. This is the first time I code anything...

    Can you help me?
    Thank you for your time.
  • It works! I had a problem with the format!!!
    Just in case others work with http://www.somwhere.org/csl/, beware: do not copy the following information that appears at the top wich is something like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <?oxygen RNGSchema="http://xbiblio.svn.sourceforge.net/viewvc/*checkout*/xbiblio/csl/schema/trunk/csl.rnc" type="compact"?>

    Do not leave that in your .csl file because it makes it unreadable.
  • edited March 3, 2010
    well actually those lines should be fine.
    I would say, though - in case others work with http://somwhere.org/csl - don't!
    the simple csl editor isn't maintained anymore and produces invalid, ugly csl that's so bloated that no one here will fix problems for you by hand.
  • You are right. After inserting it into Zotero, I tryed putting it into Mendeley and it constantly crashed. The solution was to find a citing type that most resembles the one the publisher is asking. I took vancuver and changed it.
    I have to work on it a bit more, but for the first time trying to program something, I am pretty happy I was able to solve it in 4 hours only!
    That csl editor is bad news, but at least it taught me what to look at when writing my own style.
    Thanks Adam!
  • edited March 4, 2010
    After inserting it into Zotero, I tryed putting it into Mendeley and it constantly crashed.
    yeah - Mendeley is a bit more of a whiner in that respect ;-) - but obviously you shouldn't insert invalid styles (which this almost certainly was).
    The solution was to find a citing type that most resembles the one the publisher is asking. I took vancuver and changed it.
    yep, that's the way to go - any further questions with that we're happy to help (open a new thread, though, so things stay on topic).
    You have seen this:
    http://www.zotero.org/support/csl_simple_edits
    and (for more advanced stuff) this:
    http://www.zotero.org/support/dev/csl_syntax_summary
  • Yes, those pages helped me a lot! Specially the advanced one. Thank you for your rapid response. I am beginning to like Zotero... :D It was hard to get around at the beginning.

    Hope I wont have to bother you with problems in the near future. :)
  • Hi, I've made a new style following the instructions for solving disambiguation issues in chicago author date format. Removing the line and renaming etc.
    When I installed the code into zotero I recieved the warning:
    XML Parsing Error: not well-formed
    Location: file:///C:/Documents%20and%20Settings/Martin/My%20Documents/Martin%20thesis%20style.csl
    Line Number 15, Column 83:

    The style performs the disambiguation task well but when listing multiple works by the same author in the bibliography instead of using a dash to replace the name before the citation, as in Chicago, it shows icons, or white squares.
    I am a complete novice with this, my first attempt at changing a style etc.
    Any advice on what might have gone wrong would be much appreciated.
    Thanks
    Martin
  • try validating the style:
    http://www.zotero.org/support/dev/creating_citation_styles#xml_validation
    this will likely give you a more helpful error message.

    If not, post the style to a public gist at
    gist.github.com and link here so we can actually see what's going on.
  • Hi, I've gone for the gist option as I don't understand the technical language used in the validation process description.
    The gist is at http://gist.github.com/559651
    any advice much appreciated
    Cheers
    Martin
  • The style is valid, but you should edit line 420 to use the character you want. It may have been corrupted by your text editor.
  • Thanks, found the bad line and have changed it to three dashes which looks acceptable in the bibliography. I can't work out how to get the solid line that is used in Chicago but will play around with it and see what happens.
    When I installed the modified version of the style I got a grey panel at the top of the screen with the message "This XML file does not appear to have any style information associated with it. The document tree is shown below." However the style seems to work satisfactorily.
    Again thanks for all the help. I am very new to open source and now understand the purpose of it much better. I've been preaching firefox/Zotero to our undergrads for a while and this has made me keener than ever. It's a shame that the University (Sussex, UK) does not appear to be very interested in supporting zotero in its library catalogue.
  • "This XML file does not appear to have any style information associated with it. The document tree is shown below."

    that's expected behavior - you're good.
Sign In or Register to comment.