To keep edited Zotero CSL rules, save them in the replacement file and retain your custom style’s ID for later revisions. When first customizing a repository style, give it a distinct title and ID to protect your changes from upstream updates.
This workflow is for a Mac desktop user who already has a custom citation style and wants to install a revised version without losing its formatting decisions. The key is to preserve both the style’s identity and its complete edited contents. Zotero’s installation code replaces an existing style file; it does not merge your previous formatting edits into the incoming file. Zotero style installation source
What should stay the same when you replace a custom style?
Decide whether you are revising the same custom style or creating a separate alternative before editing its metadata. CSL defines the style ID as a stable, unique identifier. Zotero explicitly advises changing the title and ID when creating a customized copy of an existing style, because retaining the original identity leaves those edits vulnerable to the original style’s updates. CSL 1.0.2 Specification: Info, Editing CSL Styles — Step-by-Step Guide
| Your task | Identity to use | File contents to install |
|---|---|---|
| First customization of a repository style | A distinct custom title and ID | The complete style with your edits |
| Revision of your existing custom style | Its existing custom ID; keep its recognizable title | The complete revised custom style |
| Separate experimental alternative | A distinct title and ID | A separate complete style |
| Adoption of a newer upstream version | Your custom identity in the finished replacement | The newer rules plus the custom edits you deliberately carry forward |
Treat the final row as a manual comparison task. A replacement downloaded from elsewhere cannot contain edits that exist only in your older local copy. Keep that older file until you have compared the output of the replacement.
Changing only the filename is insufficient. Zotero’s current installation implementation checks for an existing style by ID, with additional filename and title collision checks. Give a separate variant a distinct title as well as a distinct ID, and inspect the installation dialog before proceeding. Zotero style installation source
Save the actual rules before preparing the replacement
Open your known working custom style and save a complete copy outside the editor. A practical arrangement is one working file named neutral-notes.csl and an archived copy named neutral-notes-before-revision.csl. These filenames are organizational suggestions; the embedded ID establishes the style’s identity.
Use plain text. In TextEdit, choose Format → Make Plain Text, and ensure that the saved filename ends in .csl. Zotero’s editing guide recommends plain-text editing and saving frequently. Editing CSL Styles — Step-by-Step Guide
If your changes exist only in Zotero’s Style Editor, save them before selecting another style or closing the window. The editor documentation warns that either action loses unsaved edits. A correct preview is therefore only an intermediate result. Zotero Style Editor
Check whether the file contains formatting instructions
A dependent CSL style is an alias: it refers to an independent parent whose citation format is used. If your file consists mainly of metadata and an independent-parent link, obtain the parent style as the starting point for your customized independent copy. Renaming the alias does not create a place for separate formatting rules. Primer — An Introduction to CSL
In an independent style, inspect the relevant citation, bibliography, and macro elements. Those hold the rendering instructions. For an existing custom revision, retain its id; for a new fork, assign a unique identity. The current stable specification recommends UUIDs for new style IDs, while recognizing existing URI-based IDs. CSL 1.0.2 Specification
Turn your edits into a small rendering contract
Before replacing anything, write down a few exact expected outputs. This gives you a repeatable check that detects a missing rule even when the replacement installs successfully. Use synthetic work metadata so the test remains easy to inspect.
For example, suppose your custom bibliography rule separates a publisher and its location with a comma and encloses the result in parentheses. Define the following checks for the publisher segment of a synthetic book titled Shape Catalogue:
| Test | Synthetic metadata | Expected publisher segment |
|---|---|---|
| Both fields present | Publisher: Example Press; place: Sample Town |
(Example Press, Sample Town) |
| Publisher only | Publisher: Example Press; place empty |
(Example Press) |
| Place only | Publisher empty; place: Sample Town |
(Sample Town) |
| Both fields empty | Publisher and place empty | No publisher segment |
The following is a rendering fragment for that segment, not a complete installable style. It belongs at the appropriate rendering position inside your existing bibliography layout or a macro called by it. Replace the old publisher segment rather than adding a second copy:
<group delimiter=", " prefix="(" suffix=")">
<text variable="publisher"/>
<text variable="publisher-place"/>
</group>
The group supplies the separator and surrounding punctuation. CSL suppresses the group when all its referenced variables are empty. Zotero’s editing guide uses this pattern to avoid punctuation problems when a field is missing. These outputs are specification-derived expectations, not results of a desktop test performed here. CSL 1.0.2 Specification: Group, Editing CSL Styles — Step-by-Step Guide
Create equivalent checks for your actual changes: author separators, title formatting, date placement, or another specific rule. Record whether each expectation concerns an in-text citation, a bibliography entry, or both. Also retain one unchanged example to catch accidental changes outside the edited segment.
Install and verify the replacement on your Mac
Open Zotero → Settings, then select Cite. The application menu is the documented location for settings on Mac. How do I change Zotero settings?
Use this sequence to keep saving, testing, and installation distinct:
- Select your synthetic test items in the Zotero library.
- Open
Style EditorfromCiteand load or paste the complete revised style. - Click
Refreshto use the selected items, then compare the preview with your rendering contract. - Save the complete edited
.cslfile and validate it against the CSL schema before installation. - In the Style Manager, click
+and choose that saved file. - Check the installation dialog, then install the intended revision.
- Reopen the installed style and repeat the same output checks.
The editor processes selected library items and updates its preview as you edit. It can report invalid XML, but a preview alone does not establish valid CSL; its documentation directs you to validate the style. Local file installation through + is documented separately in Zotero’s style instructions. Zotero Style Editor, Citation Styles
For later revisions, start from the saved custom file that passed these checks. If you instead start from a newer upstream file, compare it with your archived custom copy and deliberately reapply the required rules before installing.
Why does Word still show the old formatting?
Installing a style and selecting it for a Word document are separate steps. In Word’s Zotero tab, open Document Preferences and select your custom style. Then use Refresh and inspect both a citation and the bibliography. Zotero documents Document Preferences as the control for changing a document’s citation style. Using the Zotero Word Plugin
Avoid fixing a recurring style rule by typing over the bibliography in Word. Zotero documents that manual bibliography edits are overwritten on refresh. Keep repeatable formatting rules in the CSL file. Using the Zotero Word Plugin
Use the location of the failure to choose your next check:
| What you observe | What to check next |
|---|---|
| The saved replacement file lacks your edit | Recover the rule from the archived working copy |
| The editor preview fails your contract | Inspect the rendering rule and test-item fields |
| The preview passes, but the installed style fails | Confirm which saved file you installed, then reopen that installed style |
| Zotero’s installed-style preview passes, but Word differs | Check the document’s selected style and refresh it |
| A separate variant unexpectedly replaces another style | Compare their embedded IDs and titles |
Keep the complete working CSL file, its stable custom identity, and the small set of expected outputs together. When the next revision arrives, those three things let you carry the rules forward deliberately and verify the replacement before relying on it.
Sources
- Editing CSL Styles — Step-by-Step Guide — Zotero.
- Citation Styles — Zotero.
- Zotero Style Editor — Zotero.
- How do I change Zotero settings? — Zotero.
- Using the Zotero Word Plugin — Zotero.
- CSL 1.0.2 Specification — Citation Style Language.
- Primer — An Introduction to CSL — Citation Style Language.
- Zotero style installation source: style.js — Zotero.