Phrases/Publishing

From J Wiki
Jump to navigation Jump to search

Booklet Order

Produce order of pages when printed as a booklet. Used in Pages field of Print dialog in Word.

NB.*booklet v booklet order, 0=4|y
booklet=: _1|."1 [: (,. |.)/ ($~ 2,2,~4%~#)@:>:@i.

Example: fit 12 pages on 3 sheets

   booklet 12
12 1 2 11
10 3 4  9
 8 5 6  7

   load'strings'
   ' ,'rplc~":,booklet 12
12,1,2,11,10,3,4,9,8,5,6,7