TeXstudio Settings – Understanding the ‘Long Range Repetitions’ Feature

texstudio

I am trying to adjust TeXstudio's settings so that it only highlights a word which is repeated immediately immediately (like I just did). "Aardvark Banana Aardvark" should not be highlighted.

My TeXstudio settings page looks like this:

screenshot

What is a "Long Range Repetition"? How is it different from a regular repetition? My best guess is that:

  • Words Between Repetitions = 3 means that the second Aardvark is flagged in "Aardvark 1 2 3 Aardvark" but not in "Aardvark 1 2 3 4 Aardvark"
  • Min Length of Words with Long Repetition = 6 means that "12345" would be ignored when searching for long range repetitions, but "123456" would not

But Long Range Repetitions = 10 is completely opaque to me. If I want to turn

Best Answer

The wording is a bit confusing but apparently "long range" means "long words", so words with a minimal length (as specified in the option below).

From https://github.com/texstudio-org/texstudio/blob/master/src/configdialog.ui:

Equal words are marked as repetition if there are no more than this number of words between them.

Equal, longer words are marked as long range repetition if there are no more than this number of words between them.

Only words with have this length are checked for long range repetitions.

Related Question