Prism.js RIS Highlighting Example

This is an example of a RIS entry highlighted by the custom Prism.js plugin.


TY  - BOOK
AU  - Smith, John
AU  - Doe, Jane
T1  - The Art of Coding
PB  - Tech Publications
CY  - New York
DA  - 2023
ER  - 
TY  - Type of reference
AU  - Author
PY  - Publication Year
T1  - Primary Title
T2  - Secondary Title
SP  - Start Page
EP  - End Page
VL  - Volume
IS  - Issue
ER  - 

# Below we demonstrate comments in RIS
# note: that empty lines are allowed in RIS, 
#       each entry start with TY and ER independent of empty lines 
TY  - BOOK
AU  - Smith, John
AU  - Doe, Jane
T1  - The Art of Coding

# This is a general note about the file itself.
# This entire record was manually entered and has been verified.
% This is a good place to add more detailed thoughts about the citation.
% The abstract for this article is particularly relevant.

N1  - This is a note that will be imported into a notes field.

// A double-slash comment block.
// I plan to use this article in my literature review.

-- This is a final comment line before the end of the record.
IS  - Issue
ER  - 

About comments in RIS

The core issue is that the RIS format has no official, public, and universally accepted specification. The format was created by a company, Research Information Systems, and while many other software tools reverse-engineered it, there is no central authority that dictates the rules.

Because of this, different parsers (e.g., in Zotero, Mendeley, EndNote, or a custom script) might handle "non-standard" lines in slightly different ways.

A Safe Practice

To minimize the risk of an error, follow these best practices:

In conclusion, while there is no official "comment" syntax in the RIS format, the use of a non-conforming tag like % is the closest and most reliable workaround. The risk of a fatal error is small, but it's important to be aware that the RIS standard is not strictly enforced, and different parsers may behave differently.

Below is listing of reliable strings that can be used to start a comment line in an RIS file. These strings are chosen because they do not match the required "XX - " format of a valid RIS tag and are therefore highly likely to be ignored by parsers.

Advice

Just use a % character followed by a space at the beginning of a line to start a comment. Put a comment above the publication and separate it with multiple empty lines above it and one between the comment and the publication. This makes clear to which publication the comment belongs to, but it is clearly separated from the publication.

% below publication is a book 

TY  - BOOK
AU  - Smith, John
AU  - Doe, Jane
T1  - The Art of Coding
PB  - Tech Publications
CY  - New York
DA  - 2023
ER  - 


% Just use a % character followed by a space at the beginning of a line to
% start a comment. Put a comment above the publication and separate it with multiple
% empty lines above it and one between the comment and the publication. This makes
% clear to which publication the comment belongs to, but it is clearly separated
% from the publication.

TY  - Type of reference
AU  - Author
PY  - Publication Year
T1  - Primary Title
T2  - Secondary Title
SP  - Start Page
EP  - End Page
VL  - Volume
IS  - Issue
ER  - 


% below publication is another book 

TY  - BOOK
AU  - Smith, John
T1  - The Art of Coding 2
DA  - 2025
ER  -