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
Last revisionBoth sides next revision
dev:citation_styles:style_editing_step-by-step [2017/11/27 04:33] – Update for Zotero 5. bwiernikdev:citation_styles:style_editing_step-by-step [2018/11/20 08:38] – example for "Change the Style Title and Id" : title changed from "Harvard..." to "American Psychological..." so that title and ID are consistent fflamerie
Line 19: Line 19:
 Download the style you want to edit to your computer, and open it in a (plain) text editor like Notepad on Windows, TextEdit on Mac OS X (select "Make Plain Text" under "Format"), or gedit in Linux. Other options are [[http://notepad-plus-plus.org/|Notepad++]] for Windows, [[http://www.barebones.com/products/TextWrangler/|TextWrangler]] for Mac OS X, [[http://www.oxygenxml.com/|oXygen XML Editor]], [[http://www.thaiopensource.com/nxml-mode/|Emacs in nXML mode]], and [[http://www.jedit.org/|jEdit]], which all support XML syntax highlighting (CSL is an XML-based language) and in some cases also real-time [[https://github.com/citation-style-language/styles/wiki/Validation|validation against the CSL schema]]. Download the style you want to edit to your computer, and open it in a (plain) text editor like Notepad on Windows, TextEdit on Mac OS X (select "Make Plain Text" under "Format"), or gedit in Linux. Other options are [[http://notepad-plus-plus.org/|Notepad++]] for Windows, [[http://www.barebones.com/products/TextWrangler/|TextWrangler]] for Mac OS X, [[http://www.oxygenxml.com/|oXygen XML Editor]], [[http://www.thaiopensource.com/nxml-mode/|Emacs in nXML mode]], and [[http://www.jedit.org/|jEdit]], which all support XML syntax highlighting (CSL is an XML-based language) and in some cases also real-time [[https://github.com/citation-style-language/styles/wiki/Validation|validation against the CSL schema]].
  
-Paste the style code into the [[/support/dev/citation_styles/reference_test_pane|Zotero Reference Test pane]], so you instantly see the effect of code changes on the style output. If you make your edits directly in the test pane, save your edits often via your text editor or using the "Save" button {{:dev/citation_styles/csledit-save.png}}, as changes in the test pane get lost easily.+Paste the style code into the [[/support/dev/citation_styles/reference_test_pane|Zotero CSL Editor]], so you instantly see the effect of code changes on the style output. If you make your edits directly in the test pane, save your edits often via your text editor or using the "Save" button {{:dev/citation_styles/csledit-save.png}}, as changes in the test pane get lost easily.
  
 See the [[http://citationstyles.org/citation-style-language/documentation/|documentation page]] of the CSL project website for information on making CSL changes (in particular, make sure to take a look at the [[http://citationstyles.org/downloads/specification.html|CSL specification]]. Below we discuss a few common and simple style edits to get you started. See the [[http://citationstyles.org/citation-style-language/documentation/|documentation page]] of the CSL project website for information on making CSL changes (in particular, make sure to take a look at the [[http://citationstyles.org/downloads/specification.html|CSL specification]]. Below we discuss a few common and simple style edits to get you started.
Line 25: Line 25:
 === Change the Style Title and ID === === Change the Style Title and ID ===
  
-**Important:** Before installing your edited style, you must change the style title and ID at the type of the style code. If you don't change these, your modified style will be overwritten the next time the original style is updated.+**Important:** Before installing your edited style, you must change the style title and ID at the top of the style code. If you don't change these, your modified style will be overwritten the next time the original style is updated.
  
 The style title and ID are stored within the ''<title/>'' and ''<id/>'' elements near the top of the style. For example, The style title and ID are stored within the ''<title/>'' and ''<id/>'' elements near the top of the style. For example,
  
-<code><title>Harvard Reference format 1 (Author-Date)</title> +<code><title>American Psychological Association 6th edition</title> 
 +<title-short>APA</title-short>
 <id>http://www.zotero.org/styles/apa</id></code> <id>http://www.zotero.org/styles/apa</id></code>
 +
  
 can be changed to can be changed to
  
-<code><title>Harvard Style Modified</title>+<code><title>American Psychological Association 6th edition Modified</title
 +<title-short>APA</title-short>
 <id>http://www.zotero.org/styles/apa-modified</id></code> <id>http://www.zotero.org/styles/apa-modified</id></code>
  
Line 158: Line 161:
 ==== 3 - Install your Edited Style with Zotero ==== ==== 3 - Install your Edited Style with Zotero ====
  
-See [[/support/styles|Styles]].+See [[/support/styles|Citation Styles]].
  
 Save the style with a ".csl" file extension (you can generally do this by simply typing ”.csl” after the name of your file). Then, go to the [[/support/preferences/cite|Cite pane]] in the Zotero [[/support/preferences|preferences]]. Click on the "+" sign below the list of installed styles. In the file selection dialogue that opens, navigate to the .csl file you just created and open it. This will install your new style. Save the style with a ".csl" file extension (you can generally do this by simply typing ”.csl” after the name of your file). Then, go to the [[/support/preferences/cite|Cite pane]] in the Zotero [[/support/preferences|preferences]]. Click on the "+" sign below the list of installed styles. In the file selection dialogue that opens, navigate to the .csl file you just created and open it. This will install your new style.
dev/citation_styles/style_editing_step-by-step.txt · Last modified: 2023/01/07 17:37 by dstillman