Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:start:citation_styles [2011/04/14 13:47] – [Editing CSL 1.0 Styles] rmzelledev:start:citation_styles [2011/04/23 22:02] (current) – removed rmzelle
Line 1: Line 1:
-====== Citation Styles ====== 
  
-===== Citation Formatting in Zotero ===== 
- 
-Zotero offers multiple ways to generate citations and bibliographies, including [[/support/word_processor_integration|word processor integration]] (for Word and OpenOffice), [[/support/creating_bibliographies|Quick Copy]], and [[/support/rtf_scan|RTF Scan]]. To get the right citation format (e.g. APA, Chicago Manual of Style or MLA), Zotero relies on the [[http://citationstyles.org/|Citation Style Language]] (CSL).  
- 
-CSL is an independent open source project, but has a close relation with Zotero: most of the over 1400 CSL styles available have been created by Zotero users. Zotero uses another open source tool, [[https://bitbucket.org/fbennett/citeproc-js/wiki/Home|citeproc-js]], a CSL processor, to do the actual citation formatting. Zotero developers created a wrapper, citeproc-node, to use citeproc-js on a web server. 
- 
-Below we give instructions on how to edit CSL styles, contribute to CSL development, and use CSL processors and citeproc-node. 
- 
-===== Editing CSL Styles ===== 
- 
-CSL styles are XML files (their structure resembles the HTML of webpages). There are currently no WYSIWYG CSL editors (although [[http://www.mendeley.com/|Mendeley]] has started  
-work on [[http://bitbucket.org/csledit/csl-wysiwyg-editor/|one]]), so for now styles must be edited by hand. Styles can be edited with any plain text editor (e.g. Notepad on Windows and TextEdit on Mac OS X), although dedicated XML editors have some advantages, such as real-time validation (checking during editing whether the style is still both correct XML and CSL). 
- 
-In addition to a text editor, you can use the following two tools that ship with Zotero: 
- 
-  * The Zotero Reference Test pane. Available by entering <nowiki>"chrome://zotero/content/tools/csledit.xul"</nowiki> in the Firefox address bar, this tool provides instant processing of CSL styles, using items selected in the local copy of Zotero. 
-  * The Zotero Preview pane. Available by entering <nowiki>"chrome://zotero/content/tools/cslpreview.xul"</nowiki> in the Firefox address bar, this tool generates citations for the items selected in the local copy of Zotero for all installed CSL styles. 
- 
-==== The CSL 0.8.1 to 1.0 Upgrade ==== 
- 
-Zotero 2.1 is the first release to support CSL 1.0 (through citeproc-js). Earlier versions (up to Zotero 2.0.9) supported CSL 0.8.1 through an in-house developed CSL processor. 
- 
-The [[http://www.zotero.org/styles|Zotero Style Repository]] has traditionally been the main repository for CSL 0.8.1 styles. However, because a CSL 1.0 style repository is still under construction, and because Zotero 2.1 can install both CSL 1.0 and CSL 0.8.1 styles (Zotero converts the latter internally to the CSL 1.0 format), it can still make sense to make (small) edits to CSL 0.8.1 styles. However, some of the new features in CSL 1.0 can only be used by editing CSL 1.0 styles. 
- 
-At the moment, CSL 0.8.1 and CSL 1.0 styles can be made available through the Zotero Style Repository. CSL 1.0 styles should preferably also be added to the GitHub [[https://github.com/citation-style-language/styles|CSL 1.0 style code repository]]. The latter repository already contains all styles from the Zotero style repository (CSL 0.8.1 styles have been automatically converted to the CSL 1.0 format). 
- 
-CSL 0.8.1 and 1.0 styles can be easily distinguished by looking at the cs:style element at the top of the style. CSL 1.0 styles include a version attribute on this element with a value of "1.0", e.g. "<nowiki><style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0"></nowiki>". CSL 0.8.1 styles lack the version attribute. 
- 
-==== Editing CSL 0.8.1 Styles ==== 
- 
-The following resources exist for editing CSL 0.8.1 styles: 
- 
-  * [[http://www.zotero.org/support/csl_simple_edits]] - Tutorial for making small CSL style changes 
-  * [[http://www.condast.com/zotero/index.html]] - Another tutorial  
-  * [[http://www.zotero.org/support/dev/csl_syntax_summary]] - Description of the CSL 0.8.1 syntax 
- 
-==== Editing CSL 1.0 Styles ==== 
- 
-The following resources exist for editing CSL 1.0 styles: 
- 
-  * [[http://citationstyles.org/downloads/primer.html]] - Introduction to CSL 1.0 and guide for making small edits 
-  * [[http://citationstyles.org/downloads/specification.html]] - CSL 1.0 specification, detailed description of CSL 1.0 
- 
-==== Style Validation ==== 
- 
-After you finished editing a CSL style, it is crucial to verify whether the style consist of valid XML and conforms to the CSL schema. This ensures that Zotero can install the style and process it correctly. Fortunately, there are several XML validation tools with support for the RELAX NG Compact schema language. These include the editors [[http://www.gnu.org/software/emacs/|Emacs]] (when using the [[http://www.thaiopensource.com/nxml-mode/|nXML addon]]) and [[http://www.oxygenxml.com/|oXygen XML Editor]] (both offer real-time validation), and the command-line utilities [[http://www.davidashen.net/rnv.html|RNV]] and [[http://www.thaiopensource.com/relaxng/jing.html|Jing]]. However, especially for infrequent use, the easiest option might be the online XML validator [[http://validator.nu/|Validator.nu]]. To validate a style using this website: 
- 
-  - Select “Text Field” in the upperleft drop down menu, and copy and paste the style into the text box. 
-  - Enter the link to the CSL schema file in the "Schemas" text field. For CSL 0.8.1, this is “http://bitbucket.org/bdarcus/csl-schema/raw/83f9cf9b53bd/csl.rnc”. For CSL 1.0, this is “http://bitbucket.org/bdarcus/csl-schema/raw/855dcc00cba7/csl.rnc”. 
-  - Select “XML: don’t load external entities” in the "Parser" drop down menu. 
-  - Click the “Validate” button. If the style is correct, you will get the message “The document validates according to the specified schema(s).” 
-==== Installing (and Deleting) Styles ==== 
- 
-CSL styles can be installed either via the Firefox File menu (select "Open File...") or by dragging and dropping the style into an open browser window. Styles can also be added via the [[preferences/styles|Style Manager]] in the Zotero [[/support/preferences|preferences window]], which is located on the Styles tab of the Cite tab. Styles can also be deleted via the Style Manager. Finally, if you are hosting CSL styles online, serving the styles with a “text/x-csl” MIME type will allow Zotero to automatically install the style. 
- 
-==== Contributing CSL Styles ==== 
- 
-For information on how to distribute CSL styles, see [[/support/dev/submitting_citation_styles|Submitting Citation Styles]]. 
- 
-==== Translating CSL Locales ==== 
- 
-CSL locale files allow for easy, automatic localization of citations and bibliographies generated with CSL styles. For more information about CSL locales, to see the current status of translation, and to learn how you can contribute to these translations, see the [[/support/dev/start/localization#csl_styles|localization section]]. 
- 
-===== Diving Deeper ===== 
- 
-==== CSL and citeproc-js ==== 
- 
-To learn more about CSL, visit the [[http://citationstyles.org/|CSL project home]] and the [[http://sourceforge.net/mailarchive/forum.php?forum_name=xbiblio-devel|xbiblio mailing list]]. For more information about the citeproc-js CSL processor, see the citeproc-js [[https://bitbucket.org/fbennett/citeproc-js/wiki/Home|code repository]], [[http://gsl-nagoya-u.net/http/pub/citeproc-doc.html|integrator's manual]], and [[https://groups.google.com/forum/#!forum/citeproc-js|mailing list]]. 
- 
-==== citeproc-node ==== 
- 
-citeproc-node allows citeproc-js to be deployed on a server. See the [[/support/dev/citeproc-node|citeproc-node installation instructions]]. 
dev/start/citation_styles.1302803238.txt.gz · Last modified: 2011/04/14 13:47 by rmzelle