CSL editor with live preview
As noted on the dev list, I've added a very basic tool to the dev branch for editing CSLs with a live preview of selected Zotero items. Eventually this functionality should be added to Scaffold, but this is a quick way to test changes to CSL templates in the meantime for people who don't want to mess with SQLite.
There's a drop-down menu at the top to load in an existing CSL from the database, an editing window, and a preview area. There's currently no way to save back to the database or add metadata like in Scaffold, but perhaps somebody will find it useful nonetheless.
To use, load up chrome://zotero/content/tools/csledit.xul in the latest dev build. People not running a dev build can either install one or add the csledit.xul file to an official release by following the steps in Modifying Zotero Files. (Note: chrome://zotero/content/tools/csledit.xul would map to chrome/content/zotero/tools/csledit.xul).
Feel free to improve upon it (or, better yet, help integrate it into a separate CSL mode in Scaffold).
There's a drop-down menu at the top to load in an existing CSL from the database, an editing window, and a preview area. There's currently no way to save back to the database or add metadata like in Scaffold, but perhaps somebody will find it useful nonetheless.
To use, load up chrome://zotero/content/tools/csledit.xul in the latest dev build. People not running a dev build can either install one or add the csledit.xul file to an official release by following the steps in Modifying Zotero Files. (Note: chrome://zotero/content/tools/csledit.xul would map to chrome/content/zotero/tools/csledit.xul).
Feel free to improve upon it (or, better yet, help integrate it into a separate CSL mode in Scaffold).
But as Rich K. mentioned in another thread, why not host this on your web site as a simple HTML + JS web page, instead of using client-side Mozilla stuff?
It's simpler both from a programming and user standpoint (nothing to install), and also could be the start of what we really need longer term: a web-based style editor and repository.
I ask because I'm a little worried about the long term vision reflected in your choice. In short, I do not think there should be a "CSL Mode." Zotero started client-side and then will go server/web-based. CSL really needs to do the reverse.
For the record, adding the ability to save to the database and also to validate the CSL against the schema would be really useful next steps.
Also we need a way to ensure good URIs for new styles. If we figure out a good way to get the distributed repository idea running, I'd be fine with a repository running at zotero.org; where users uploaded them there by default.
Of course, it becomes a little awkward from a UI perspective to extend the current approach. What would be the citation, after all? Just the first item selected? Or if there are more than one, the first two or three?
- Single citation
- Multiple citations
- Bibliography
Just so you know I'm coming at this from the point of view of numbered citations ("number" class in CSL) where there is the possibility of collapsing the citation numbers (e.g.: [1][2][3] would collapse to [1-3]). Of course, all of this is assuming Zotero properly implements all the features in CSL.
Justin
I very much appreciate all the work you guys put into this, and it functions very well for me. My only problem is trying to access the csledit.xul? I need to use an obscure Harvard variation (thanks to UEL and "Cite them Right") :-/ and I can't figure out how to make the minor modifications?
I have planned to just simply tidy it all up after I am 100% done, but just in case it is easier than I thought... :-)
Thanks again for all the help!!
(added this to the documentation).
Thank you very much Adam, I have found that now, but I get the same error discussed here
http://forums.zotero.org/discussion/19882/cslpreviewxulcsleditxul-dont-open-in-standalone-under-winxp/
I can try the solution of changing the upper case letters, or changing it "on the trunk" but a)I wasn't sure how to re-jar the contents after changing them, or b) how to change it on the trunk...
I apologize for not being more familiar with opensources, but there's only one way to learn I suppose!! :-)
If you're not in a hurry the easiest would be to just wait for that version. Otherwise, for re-jaring, which operating system do you use?
Thank you for everything, especially the fast response! I have just started a master's program that suggests using reference software, so on top of re-learning to write properly, I am very grateful for a free, friendly and very functional program like this!!
until next time :-) (since this was only opening the editor, now I have to fully comprehend my referencing style!!)