Page Range Numbering

It may sometimes be necessary to have a single score with numbered pages that are consecutive but you want to skip specified page ranges.
This snippet shows how to specify a list of page number ranges to print, with numbers not in the list omitted. Page numbers greater than the last number in the range list will be printed consecutively as per normal.
For example, specifying a list of page ranges '((1) (3 5) (7 10)) would skip pages 2 and 6, and continue with consecutive numbering from 11 onwards.
(Please note: only first page is displayed in preview)