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
      is a nice publication 
PB  - Tech Publications
CY  - New York
      in the USA
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  -  


About comments in RIS

No official RIS specification

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.

While it's not strictly part of the official standard, many RIS parsers and software (like citation managers) do allow for multi-line values after a tag, particularly for fields like N1 (Notes), AB (Abstract), and KW (Keywords). The convention is that the multi-line entry continues until the parser encounters a new line that starts with a valid RIS tag.

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  -