In many places, including Marwan's seminal paper in Physics Reports (2007), RR is calculated as the number of recurrent points in the RP divided by N^2; that formula is used in popular software packages, even considering that the LOI - or even more lines around it - may be excluded in the count of recurrent points.

On the other hand, in the first chapter of the book on RQA edited by Webber and Marwan (2015), the definition of RR for recurrence plots (eq. 1.6, page 13) has (N^2-N) in the denominator, taking into account that the LOI is excluded.

So my question is: should RR be or not be adjusted depending on the Theiler window that is used?

This is really a good point. When the LOI is not excluded, the denominator is N×N. There are some special cases where this definition of RR is helpful. In other applications, it can be required to exclude the LOI, then the denominator is N(N–1). Further, a Theiler window can be required, which removes trivial recurrences along the same trajectory segment which fall inside the threshold sphere. When the Theiler window τ is larger than just 1, I suggest to use the N(N–1) and not N(N–τ), because RR should be related to all possible comparisons.