Creating a Citation Style???

2»
  • I actually find the csledit.xul easier to work with than the style editor in e.g. ReferenceManager.
    Great!

    Just remember to validate your style against the schema.

    Come to think of it, it might be nice if one could load the CSL style from a file, such that one could edit in a proper (validating) XML editor, but preview the result in csledit.xul. Of course, one could copy-and-paste, but that's a bit tedious.
  • Thanks a lot to both of you!
    It works in OOo and Word!
  • "make sure to validate your style against the schema"
    But where can I get the schema? The link points to http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/branches/csl.rnc?view=markup, but what I find there doesn't look anything like a schema to me (or to any of the XML tools I use)!
  • It is a RELAX NG schema, using the compact (non-XML) syntax. Trang (included in oXygen) can automatically convert it to the XML syntax if that's easier.

    What tools are you using?
  • I'm using Microsoft XML Notepad for preference, Exchanger XML Lite 3.2 as an alternative. I think Macromedia Dreamweaver MX2004 and Microsoft Visual Studio 2005 have XML awareness too, but I've not explored that.
  • Exchange Lite appears to have support for RNG validation, though I can't tell if it supports the compact syntax. If it doesn't, as I said, you can just use Trang to convert it.

    MS doesn't tend to support RNG (though there's rumors they use it internally).
  • Just want to make sure of something obvious--are you downloading the RNG file from that page or are you trying to use that particular URL (which is actually an XHTML page that is for human readers only)?

    You should use:
    http://xbiblio.svn.sourceforge.net/viewvc/*checkout*/xbiblio/csl/schema/branches/csl.rnc
  • "MS doesn't tend to support RNG"
    Well, it's a new one to me. Although last time I did anything serious with XML, W3C XML Schema was strictly non-standard and poorly supported, so I'm hardly keeping up with developments.

    I've found Trang, so I'll experiment. Thanks. I may also be eligible for the academic version of Oxygen, but I need to be careful with that; if I use it to customise a zotero citation style then I won't be permitted to use it for work.
  • I may also be eligible for the academic version of Oxygen, but I need to be careful with that; if I use it to customise a zotero citation style then I won't be permitted to use it for work.
    IIRC, they offer a free 30 day trial. You could always try and see if it's worth it. For me, it is (despite being a fan of free software). That said, it's been awhile since I've renewed my subscription ;-)
  • After struggling with the CSL language for a while, I've started to document some of my findings in the zotero wiki. You can find the page here
    http://dev.zotero.org/csl_syntax_summary
    also some notes on how I think zotero maps between its database and the markup language.

    Contributions welcomed.
  • Codec: thank you, thank you, thank you for doing the work I should have done a long time ago! This is a really nice start.

    It would be good if we could further develop it and move it (or at least the general stuff not specific to zotero) to the CSL site. Or I guess I could always link over from there; doesn't make any big difference.

    I'll take a more detailed look later. There are a few details I think I'd like to add (like, there should always be an author macro, and that macro should always include a substitute element).
  • How does adding a new style to the database work? If I add a new style, are subsequent changes to the XML automatically reflected by Zotero, do I need to add the style again after subsequent changes to the XML? If the latter, do I have to remove the old version of the style before adding the new one? How? Is there any way to look at the effects of a style before I add it to the database?

    Thanks in advance,

    Tim
  • And another question on custom styles -- is it possible to insert a non-breaking space into a citation? It's mandated in some places in our corporate style (citations have to take the form "[Ref 1]", where the space between "Ref" and the reference number is non-breaking), so it would be a big help to me if Zotero could do it.

    Thanks,

    Tim
  • I'm interested in creating citation style (for few journal of chemistry). Once the CSL file is done, we have to validate it by oXygen or nXml. Is it possible to do that with a simple xml editor as editX ?

    Is there currently a repository where we can share our own citation style ?
  • edited November 12, 2007
    Once the CSL file is done, we have to validate it by oXygen or nXml. Is it possible to do that with a simple xml editor as editX ?
    I don't know anything about editX, but you need RELAX NG validation support. If your editor doesn't support RELAX NG, you can validate via the command line with xmllint, from the GNU libxml2 library, using its --relaxng flag. You can easily get libxml2 from the package manager on any Linux distro (if it's not preinstalled) or via MacPorts on OS X. It might be available from cygwin on Windows, but I haven't checked.
  • edited November 12, 2007
    Dan: does libxml now support the compact (non-XML) syntax? In the past it didn't.

    If not, you'd need to first convert the schema to the XML syntax using Trang, or use RNV instead (which is really excellent; faster and smaller than libxml, if less feature-full).

    Once we finally freeze CSL at 1.0, I'll release an XML version of the schema.
  • does libxml now support the compact (non-XML) syntax? In the past it didn't.
    Right, sorry, no it doesn't. I use Trang to convert.
  • edited November 13, 2007
    editX support RELAX NG validation; for those interested.
    http://macmegasite.com/node/1793

    How far are we from an easy-way to create/modify personal styles through a end-user interface ?
  • Dan: can we come up with an answer for the question we both skipped, and that I brought up recently in a different context: "Is there currently a repository where we can share our own citation style ?"

    As for:
    How far are we from an easy-way to create/modify personal styles through a end-user interface ?
    Completely unknown. It could be two weeks, or two years, and depends entirely on whether developers step up to write it. There is one currently working on just that (search the forums), and csledit.xul is the start of one more closely tied to Zotero.

    To do a full editing interface is non-trivial. But a wizard-interface would b a good first step that shouldn't be too hard.
  • can we come up with an answer for the question we both skipped, and that I brought up recently in a different context: "Is there currently a repository where we can share our own citation style ?"
    Sure.
  • So... 5 years have passed... any GUI available now? :-)
  • A promising tool for editing CSL styles is under development at present (in another lab, but as free and open source software). We should see a release by the end of the year.
  • (you can follow the development process at: http://csleditor.wordpress.com/ )
  • That's great news :-) Thanks!
Sign In or Register to comment.