Not currently. We would like to produce a GUI or other non-techy way of producing styles easily.
The advantage of creating a CSL through the more technical methods is that that style can be then shared with other Zotero users, and indeed can serve as a template for citation styles in any other software that recognizes CSLs as well.
Would be nice if you guys updated your handling of CSL files to be more in the spirit of the spec. A simple example is the ID for a CSL style is a URI (as it is in Atom), but in the Zotero database it's a GUID. Can you not make that change now? You can then easily extend it later to load styles from URIs, etc.
Would be nice if you guys updated your handling of CSL files to be more in the spirit of the spec. A simple example is the ID for a CSL style is a URI (as it is in Atom), but in the Zotero database it's a GUID. Can you not make that change now?
For 1.0, no. The latest upgrade exposed problems in mozStorage in Firefox 2.0, and we're going to do everything we can to avoid further database migrations until Firefox 3.0 is stable. The remaining releases up to 1.0 Final will be code-only changes.
OK, but then it might make sense to include in the documentation a suggestion that if people do want to work on their own styles, they are as careful about the ID URI on the style file as they are on the GUID for Zotero. I suppose an easy approach is to reserve a URI space for this (say http://zotero.org/styles/), and append the GUID to it?
Also, I don't really think I was asking you to make any database schema changes. Was just suggesting you store the URI ID in that existing column, rather than an otherwise meaningless (in the sense that it has no connection to the CSL instance) non-URI GUID. [of course, there may be something in the schema definition that precludes that]
The main thing holding up my using Zotero is the absence of any styles for my field (political science). I'm tempted to try to write my own style, but have never programmed in XML before. Two questions: is there somewhere I could see examples of the existing styles in CSL (other than running sqllite and extracting them)? And, anyone have some idea how much of a time sink this is likely to be (I used to program in java)?
It might be a little learning curve to understand XML and using a validating editor like oXygen or emacs nxml mode, but it's a skill that's broadly useful and transferable. Beyond that, there's also some learning curve in CSL. I can't tell you if that will constitute a "time sink" or not.
I suppose a test is to see if you can adapt the APA style, using the csledit.xul previewer that has been mentioned elsewhere on the forums. If you feel you're making progress, follow through; if not, post the style you want on the forums and hopefully someone will get to it.
But then why does the documentation include the sentence "‘cslID’: a GUID to uniquely identify the CSL — you can use an online GUID generator to create one"?
While a GUID can be helpful to create the style URI, that per se is not enough. I'd suggest tweaking that to be more clear.
But then why does the documentation include the sentence "‘cslID’: a GUID to uniquely identify the CSL — you can use an online GUID generator to create one"?
My mistake—must've copied that over from the translator documentation. Fixed.
I was also wondering about custom output styles : not being a developer, i am quite unsure how to write my own output style - let alone adding it to the Zotero SQLite database.
Is anyone willing to help me out here - all i want is a really simple output style as such shown below.
I have had a look at the CSL documentation, could someone post an example of a CSL document and a view of how the citation and bibliography looks in the article - to help me understand how the information in the CSL documentation relates to the actual CSL document i want to write and how this would relate to what the final view in after applying the output style...
Wow, this is very cool. I haven't seen it mentioned before. Note that in Win XP/FF 2.0.0.7 the pulldown menu is about 4 pixels high. It works, but it's easy to miss.
Just a warning to those using csledit.xul: in rc3, only the APA style and the new number-based styles (Nature, NLM, and IEEE) are using the new schema, and some subtle modifications have been made in the dev builds since then. Support for the old schema will be dropped in 1.0. The development version of Zotero also includes a version of MLA reformulated in the new schema.
Too bad. I was wondering if the Extra field might be a place for the interim storage of details (about the original edition of a published book, say) which might need to make it into my bibliography, but which currently has no place in the data model. It all will be sorted out when the relational data model is worked out, I expect. But I was looking for a short-term hack. It would probably have been hard to implement anyway.
In CSL, the "note" variable is intended to work as in BibTeX, and so *might* be an appropriate target for the "extra" field. I never did have any idea what "extra" is anyway ;-)
-----------
Dan Wrote:
"The Extra field isn't actually accessible in CSLs, since it's not a standard field that would be defined in the CSL spec."
-----------
Gaaaaaa!!! That's really annoying!
Can anyone think of a work around to be able to output the info from the extra field (I really need to be able to output the PMIDs)
Sorry - totally new to styles and sqlite. I managed to create a style using csledit.xul based on the Nature style and it worked in the editor. By help of the scrapers.sql, referred to as an example, I have then created a text file: REPLACE INTO csl VALUES('url', '2007-09-24 15:15:00', 'Clinical Infectious Diseases', '<?xml version="1.0" encoding="UTF-8"?> <?oxygen RNGSchema="../csl.rnc" type="compact"?>........</style>'); And inserted the new style. I changed the title and date - but what about the url for this local style? The file inserts into zotero.sqlite but no new style turns up in zotero.
The URI is the ID for the style. You have to make sure it is unique and stable. Otherwise, Zotero will probably think it's the same as an existing style. If you're not sure how to do that under a domain of your own control, you can always follow this advice.
I got it working - I actually find the csledit.xul easier to work with than the style editor in e.g. ReferenceManager. I have, however, still one problem: the in-text citations appear as e.g. [1; 2; 3; 4] but preferably it should be [1-4]. More complex combinations also often arise: [1; 2; 3; 6] - should be: [1-3; 6].
Do you have some code for these conditional situations?
<citation> <option name="collapse" value="citation-number"/> <sort> <key variable="citation-number"/> </sort> <layout> (...) </layout> </citation> If you upgrade to the development XPI, you'll also need the latest version of the Word integration extension/template for your OS and word processor.
The advantage of creating a CSL through the more technical methods is that that style can be then shared with other Zotero users, and indeed can serve as a template for citation styles in any other software that recognizes CSLs as well.
Just a thought ...
Thanks, Peter
It might be a little learning curve to understand XML and using a validating editor like oXygen or emacs nxml mode, but it's a skill that's broadly useful and transferable. Beyond that, there's also some learning curve in CSL. I can't tell you if that will constitute a "time sink" or not.
I suppose a test is to see if you can adapt the APA style, using the csledit.xul previewer that has been mentioned elsewhere on the forums. If you feel you're making progress, follow through; if not, post the style you want on the forums and hopefully someone will get to it.
But then why does the documentation include the sentence "‘cslID’: a GUID to uniquely identify the CSL — you can use an online GUID generator to create one"?
While a GUID can be helpful to create the style URI, that per se is not enough. I'd suggest tweaking that to be more clear.
I was also wondering about custom output styles : not being a developer, i am quite unsure how to write my own output style - let alone adding it to the Zotero SQLite database.
Is anyone willing to help me out here - all i want is a really simple output style as such shown below.
(in text citations)
[1] or [2,3] or [4,5,6,7]
(bibliography)
[1]
Authornames; year; title; journal; volume; pages.
[2]
Authornames; year; title; journal; volume; pages.
Thanks
Andy
I have had a look at the CSL documentation, could someone post an example of a CSL document and a view of how the citation and bibliography looks in the article - to help me understand how the information in the CSL documentation relates to the actual CSL document i want to write and how this would relate to what the final view in after applying the output style...
that would be great thanks!
Andy
Regards
Andy
Thanks to that link I have managed to make myself an output style and successfully added it to the sqlite db.
I wanted to add the 'Extra' field that contains PMID numbers (for references taken from pubmed)
but I don't know what the name of this variable is
<bibliography>
<layout>
<text variable="citation-number" suffix=". "/>
<text variable="extra"/>
</layout>
</bibliography>
but this does not add the information, does the extra field have another name??
Thanks
Andy
Dan Wrote:
"The Extra field isn't actually accessible in CSLs, since it's not a standard field that would be defined in the CSL spec."
-----------
Gaaaaaa!!! That's really annoying!
Can anyone think of a work around to be able to output the info from the extra field (I really need to be able to output the PMIDs)
Thanks
Andy
REPLACE INTO csl VALUES('url', '2007-09-24 15:15:00', 'Clinical Infectious Diseases',
'<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="../csl.rnc" type="compact"?>........</style>');
And inserted the new style. I changed the title and date - but what about the url for this local style? The file inserts into zotero.sqlite but no new style turns up in zotero.
Can you help me? Thanks - Chris
I got it working - I actually find the csledit.xul easier to work with than the style editor in e.g. ReferenceManager. I have, however, still one problem: the in-text citations appear as e.g. [1; 2; 3; 4] but preferably it should be [1-4]. More complex combinations also often arise: [1; 2; 3; 6] - should be: [1-3; 6].
Do you have some code for these conditional situations?
Chris
<citation>
<option name="collapse" value="citation-number"/>
<sort>
<key variable="citation-number"/>
</sort>
<layout>
(...)
</layout>
</citation>
If you upgrade to the development XPI, you'll also need the latest version of the Word integration extension/template for your OS and word processor.