You have a citation guide from your university or publisher, but none of the existing styles in Zotero or Mendeley really fit?
With CSL citation styles (‘Citation Style Language’), you can customise existing templates to suit your needs. In this article, I will show you step by step how to edit a CSL style, what typical pitfalls there are, and when a made-to-measure citation style is worth it.
What are CSL citation styles?
The Citation Style Language (CSL) is an XML-based programming language and a open-source library, which now provides more than 10,000 citation styles.
Der Vorteil:
- The public format (in stark contrast to EndNote or Citavi) has resulted in CSL being supported by a number of programmes, including Zotero, Mendeley, Papers, RefWorks, PaperPile and more.
- Furthermore, the community has also provided a number of tools to simplify working with CSL.
- In addition, you can of course modify existing templates for your own use.
Customising CSL citation style in Zotero – step by step
Below you can see a typical way of adapting an existing style to your specifications.
1. Find the right style to use as a template
The first step is to find a style that comes as close as possible to your guidelines – then you will have less to change in the code later on.
- Open the Zotero Style Repository or the style settings in Zotero.
- Search for keywords such as ‘Harvard’, the name of your university or your field of study.
- Alternatively, you can also find something suitable with the "Search by Example" tool
- Compare one or two test sources in the bibliography with your guide and choose the style that fits best.
You can use this style as a basis for your customisations.
2. Download the CSL file and open it in Style Editor.
Once you have found a basic style, you need the .cslfile.
- Download the style from the repository or export it from Zotero.
- Open the integrated Style Editor in Zotero (Settings → Citations → Styles → ‘Edit Style’).
- Alternatively, you can also open the
.cslfile in a text editor, like VS Code or Notepad++, or use the VisualEditor für CSL for CSL
In the Style Editor, you will see the CSL code: at the top, the metadata for the style (name, ID, author, etc.), and below that, the actual formatting rules for citations and the bibliography.


3. Frequent adjustments to the CSL code
In practice, it is almost always a matter of the same adjustments:
- Order in the bibliography – e.g. ‘Author – Year – Title – Publisher’ instead of ‘Author – Title – Publisher – Year’.
- Format of the authors – e.g. ‘surname, initials’ instead of full first name, or the use of ‘et al.’ for three or more persons.
- Year date – in round brackets, without brackets or in another position.
- Italics – whether magazine titles or book titles should be set in italics.
- Punctuation – which full stops, commas or colons are used between the elements.
All of this can be customised in the CSL code – provided you find the right places and know the structure of the style. Usually, you edit the ‘citation’ and ‘bibliography’ sections, where the output of the references is defined.
The following are helpful in this regard: Step-by-Step Instructions from the Zotero documentation, as well as the 'CSL Specification', to understand CSL and use it correctly.


4. Test style: try it out in Word or LibreOffice
After every major change, you should test the style in a real document.
- Save the edited style in the editor and activate it in Zotero.
- Create a short test document in Word or LibreOffice with a few different sources (book, journal article, anthology, internet source, etc.).
- Insert citations and create a bibliography.
- Compare the output line by line with the official guidelines from your university or publisher.
Only when the most important source types are displayed correctly is it worthwhile to use the style permanently.
Common problems when editing CSL styles
When editing a CSL style, many people stumble at similar points:
- XML errors – Even one forgotten closing tag is enough for Zotero to reject the style or not format references at all.
- Changes do not take effect everywhere – Adjustments often only apply to certain document types (e.g. journal articles) because other types have their own rules in the code.
- Differences between Word and LibreOffice – Depending on the word processor, fields are interpreted slightly differently.
- Cryptic validator messages – the official CSL‑Validator helps with testing, but the error messages are written more for developers than for stressed-out students.
If this is your first time working with XML, troubleshooting can quickly take several hours – especially if your guide contains many special cases (e.g. online sources, legal texts, multiple editors).
Please note: LLMs, although tempting, are not yet able to implement citation styles in a complex manner. Students have told me that they lost marks for incorrect citations because a citation style created by ChatGPT produced incorrect output.
Customise yourself or tailor-made citation style?
Whether you edit your style yourself or prefer to leave it to me depends primarily on time, nerves and the complexity of the guidelines.
It is worth customising yourself if ...
- your guide deviates only slightly from an existing style.
- you are interested in technology and have some time to experiment.
- you are mainly writing a one-off piece of work and minor deviations are acceptable.
A customised citation style is useful if ...
- the guidelines provided by your university or publisher are very detailed and strict.
- you are about to submit your thesis and do not have time for trial and error.
- you want to write several papers or publications in the same style and want maximum certainty.
Customised citation style: How I can help you
If you don't have the time or inclination to familiarize yourself with CSL, XML code, and validator messages, I'll take care of it for you.
With my 'Your Custom Citation Style' service I create a verified CSL citation style based on your university or publisher guidelines, test it in Zotero and make any necessary adjustments – so you can focus on your content instead of formatting.
➜ All information & enquiries: Your Custom Citation Style






