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
csl_simple_edits [2011/04/08 21:26] – [Give your style a new name and ID] rmzellecsl_simple_edits [2012/05/24 11:40] (current) – removed rmzelle
Line 1: Line 1:
-====== Making Basic Changes to CSL Styles - Step-by-step Guide ====== 
- 
-===== The Zotero Reference Test Pane ===== 
- 
-An easy way to get started with editing CSL styles is by using the Zotero Reference Test Pane. This tool renders items from your Zotero library with the CSL style of your choice, and gives real-time feedback when you edit the style. 
- 
-To open the Zotero Reference Test Pane, paste 
- 
-''<nowiki>chrome://zotero/content/tools/csledit.xul</nowiki>'' 
- 
-into the Firefox address bar and press Enter. 
- 
-Now select a style from the drop-down menu in the top-right corner of the Test Pane, or copy and paste a CSL style into the text box into the upper half of the split pane window. Now open the Zotero pane, and select one or several items. The lower half of the window will now show how citations and bibliographies are formatted for the selected style and Zotero items. 
- 
-==== Make some changes ==== 
- 
-You can now make changes to the CSL code in the upper half of the split window. As long as the changed style is still correct XML and CSL, the lower half of the window will automatically update after each change. **Style changes are lost when you close the Firefox tab or switch styles. If you plan to make extensive changes, make sure to save your edits often.**  
- 
-=== CSL 0.8.1 styles === 
- 
-Minor issues are likely to be in the ''<citation>'' or ''<bibliography>'' sections, which are usually near the bottom. 
- 
-For example, to remove all [[kb/given_name_disambiguation|given-name disambiguation]], find the line: 
- 
-''<option name="disambiguate-add-givenname" value="true"/>'' 
- 
-And just delete the whole line. 
-You'll see the change occur immediately in the preview pane below. 
- 
-The [[dev/csl_syntax_summary|CSL 0.8.1 syntax summary]] explains how the CSL works.  Common options you might wish to change are [[dev/csl_syntax_summary#options|here]]. 
- 
-A bit of trial and error, and testing with a few combinations should help. You can see what different items and combinations will look like by selecting them in Zotero (Ctrl-click to select multiple items), and then "Refresh" at the top-left of the Test pane.   
- 
-<html> 
-<blockquote><font color="blue" size="+1.2">TIP :</font> 
- If nothing happens when you click refresh, you've broken the style!<br>Use Ctrl-Z to undo, or if you get really stuck, just select the style from the drop-down again and you're back where you started.</blockquote></html> 
- 
-==== (optional) Change the Style Title and ID ==== 
- 
-Changing the title and ID of your modified style has two advantages: 
- 
-  * Installing your modified style won't overwrite the original style 
-  * The styles that ship with Zotero are automatically updated. If you modified one of these styles and didn't change the title/ID, your modified style will be overwritten when a style update becomes available. 
- 
-The 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>  
-<id>http://www.zotero.org/styles/harvard1</id></code> 
- 
-can be changed to 
- 
-<code><title>Bob's Harvard Style Version 1</title> 
-<id>http://www.zotero.org/styles/BobsHSv1</id></code> 
-==== Using your Edited Style with Zotero ==== 
- 
-You've made some changes to a style, and now you'd like to use your edited style with Zotero. How do you install this new style? 
- 
-Select all the style code in the upper half of the test pane (Ctrl-A on Windows, Cmd-A on Mac OS X). Copy and paste the code into a text editor and save the style with a ".csl" file extension (don't use Microsoft Word or WordPad; suitable text editors include Notepad on Windows, and TextEdit on Mac OS X [in plain text mode: Format menu -> Make Plain Text], and gedit or Kate on Linux). 
- 
-To install the style, drag the file from where you saved it into an open Firefox page, and click Install. Done! 
- 
-=====  Some Slightly more advanced tips ===== 
- 
-For anything more advanced, [[dev/creating_citation_styles|this page]] is your friend, especially if you have made changes that would have wider appeal and you wish to share them. 
- 
-If you are making several changes, you might want to copy all the CSL code from the top window (Ctrl-A, Ctrl-C) and paste it into a new file in a text editor. Notepad works fine, though using a good text editor designed for programming like the free [[http://notepad-plus.sourceforge.net|Notepad++]] for Windows or [[http://www.barebones.com/products/TextWrangler/|TextWrangler]] for Mac, can help you to see the structure clearly and not make mistakes.  Set the "language" to XML  (CSL is based around XML). 
- 
-The Zotero forums have little nuggets of gold all through them, and [[/search/#support|searching ]] usually finds the solution to any issue.  If you are still having trouble, post a question in the Styles section of the Forum and it's likely to get answered quickly. 
- 
-===== Sharing Styles ===== 
- 
-If your new style has general appeal, consider [[dev:submitting_citation_styles|submitting]] it for inclusion into the [[http://www.zotero.org/styles|Zotero Style Repository]]. 
  
csl_simple_edits.1302312373.txt.gz · Last modified: 2011/04/08 21:26 by rmzelle