- (string->symbol
- (string-append (car entry) "-default")))
- (orientation (cdr entry)))
- (if paper-default
- (cons (car entry)
- (round (* orientation
- (/ (eval-carefully entry-symbol m 0)
- (if (= orientation w)
- (car paper-default)
- (cdr paper-default))))))
- entry)))
- scaleable-values)))
-
- (module-define! m 'paper-width w)
- (module-define! m 'paper-height h)
- ;; Left and right margin are stored in renamed variables because
- ;; they must not be overwritten.
- ;; Output_def::normalize () needs to know
- ;; whether the user set the value or not.
- (module-define! m 'left-margin-default-scaled
- (assoc-get "left-margin" scaled-values 0 #t))
- (module-define! m 'right-margin-default-scaled
- (assoc-get "right-margin" scaled-values 0 #t))
- ;; Sometimes, lilypond-book doesn't estimate a correct line-width.
- ;; Therefore, we need to unset line-width.
- (module-remove! m 'line-width)
- (set! scaled-values (assoc-remove!
- (assoc-remove! scaled-values "left-margin")
- "right-margin"))
- (for-each
+ (string->symbol
+ (string-append (car entry) "-default")))
+ (vertical? (cadr entry)))
+ (cons (if (cddr entry)
+ (string-append (car entry) "-default-scaled")
+ (car entry))
+ (round (* (if vertical? h w)
+ (/ (eval-carefully entry-symbol m 0)
+ ((if vertical? cdr car)
+ paper-default)))))))
+ scaleable-values)))
+
+ (module-define! m 'paper-width w)
+ (module-define! m 'paper-height h)
+ ;; Sometimes, lilypond-book doesn't estimate a correct line-width.
+ ;; Therefore, we need to unset line-width.
+ (module-remove! m 'line-width)
+
+ (for-each