support "next" value for `page-side-start`

main
Matthew Butterick 3 years ago
parent 4a0e7d18bb
commit dfb8c83340

@ -546,7 +546,7 @@ First page number used. Value is an integer. Default is @racket[1].
}
@defthing[#:kind "attribute" page-side-start symbol?]{
Side that first page appears on. Value is @racket["left"] or @racket["right"]. A blank page will be inserted if necessary. Default is @racket["right"].
Side that first page appears on. Value is @racket["left"], @racket["right"], or @racket["next"]. Default is @racket["right"]. If the value is @racket["left"] or @racket["right"], a blank page will be inserted if necessary.
}
@deftogether[(@defthing[#:kind "attribute" column-count symbol?]

@ -351,8 +351,11 @@
(define insert-blank-page?
(and (pair? qs)
;; if we need a 'left page and will get 'right (or vice versa) then insert page
(let ([next-page-side (if (even? (add1 (section-pages-used))) 'left 'right)])
(not (eq? section-starting-side next-page-side)))))
(cond
[(eq? section-starting-side 'next) #false]
[else
(let ([next-page-side (if (even? (add1 (section-pages-used))) 'left 'right)])
(not (eq? section-starting-side next-page-side)))])))
;; update page count before starting page wrap
(when insert-blank-page?

Loading…
Cancel
Save