# [OS X TeX] Checking pairs (parentheses, brackets etc) in TeXShop, a feature request

Bruno Voisin bvoisin at icloud.com
Fri May 26 06:38:43 EDT 2017

> Le 26 mai 2017 à 11:47, Robert Blackstone <blackstone.robert at gmail.com> a écrit :
>
> Since about a year TeXShop has also become my preferred editor for LilyPond (as for all TeX-things ).
> One of its best features for this type of work is its marvelous system of checking pairs, of brackets, braces and parentheses, by displaying this yellow field when one enters the area between the pair from one side or the other.
>
> I wonder if it would be possible to add this feature to < > and << >> , essential pairs in LilyPond code.
>
> [...]
>
> So it would be wonderful to have this match-check also for < >  as a native feature in TeXShop.

A difficulty for < and > is that in maths, they don't necessarily come up in pairs: \{ and \} are delimiters and come up in matching pairs, same for \langle ⟨ and \rangle ⟩, but < and > are binary relations and don't match. For example, $1 < 2$.

So a way would be needed to exclude maths from the matching.

As for >> and <<, the situation is different: they normally don't come up in maths, but I know a number of colleagues who persist writing >> and << in their (La)TeX code instead of \gg ≫ and \ll ≪, because that is how they write things on paper.

Bruno Voisin