;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 2004--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
(define-public (set-paper-dimension-variables mod)
(module-define! mod 'dimension-variables
'(pt mm cm in staff-height staff-space
page-top-space
between-system-space between-system-padding
- line-width indent paper-width paper-height horizontal-shift
+ line-width indent short-indent paper-width paper-height horizontal-shift
staff-space line-thickness ledgerline-thickness
blot-diameter left-margin right-margin)))
(* f0 (- x1 staff-space)))
(- x1 x0))))
-(define-public (layout-set-absolute-staff-size-in-module m staff-height)
+(define-public (layout-set-absolute-staff-size-in-module module staff-height)
(let*
- ((pt (eval 'pt m))
+ ((pt (eval 'pt module))
(ss (/ staff-height 4))
- (factor (/ staff-height (* 20 pt))))
+ (factor (/ staff-height (* 20 pt)))
+ (setm! (lambda (sym val)
+ (module-define! module sym val))))
- (module-define! m 'text-font-size (* 12 factor))
+ (setm! 'text-font-size (* 12 factor))
- (module-define! m 'output-scale ss)
- (module-define! m 'fonts
+ (setm! 'output-scale ss)
+ (setm! 'fonts
(if tex-backend?
(make-cmr-tree factor)
(make-century-schoolbook-tree factor)))
- (module-define! m 'staff-height staff-height)
- (module-define! m 'staff-space ss)
+ (setm! 'staff-height staff-height)
+ (setm! 'staff-space ss)
- (module-define! m 'line-thickness (calc-line-thickness ss pt))
+ (setm! 'line-thickness (calc-line-thickness ss pt))
;; sync with feta
- (module-define! m 'ledgerline-thickness (+ (* 0.5 pt) (/ ss 10)))
+ (setm! 'ledgerline-thickness (+ (* 0.5 pt) (/ ss 10)))
;; sync with feta
- (module-define! m 'blot-diameter (* 0.4 pt))
+ (setm! 'blot-diameter (* 0.4 pt))
))
- (define-public (layout-set-absolute-staff-size sz)
- "Function to be called inside a \\layout{} block to set the staff size. SZ is in
-points"
-
+(define-public (layout-set-absolute-staff-size sz)
+ "Function to be called inside a \\layout{} block to set the staff
+size. SZ is in points"
(layout-set-absolute-staff-size-in-module (current-module) sz))
(define-public (layout-set-staff-size sz)
- "Function to be called inside a \\layout{} block to set the staff size. SZ is in
-points"
-
+ "Function to be called inside a \\layout{} block to set the staff
+size. SZ is in points"
+
(layout-set-absolute-staff-size (* (eval 'pt (current-module)) sz)))
(define-safe-public (set-global-staff-size sz)
(ly:modules-lookup (list m) 'right-margin (* 10 mm))))
(module-define! m 'indent (/ w 14))
+ (module-define! m 'short-indent (* 5 mm))
;; page layout - what to do with (printer specific!) margin settings?