GUILE is not reset after processing a @code{.ly} file, so be careful
not to change any system defaults from within Scheme.}
+In addition, the value of @code{output-suffix} will be inserted between
+the basename and the number. An input file containing
+
+@example
+#(define output-suffix "violin")
+\book @{ @dots{} @}
+#(define output-suffix "cello")
+\book @{ @dots{} @}
+@end example
+
+@noindent
+will output @var{base}@file{-violin.ps} and
+@var{base}@file{-cello-1.ps}.
+
+
@subsection Command line options
(let*
((paper (ly:parser-lookup parser '$defaultpaper))
(layout (ly:parser-lookup parser '$defaultlayout))
-
(count (ly:parser-lookup parser 'output-count))
- (base (ly:parser-output-name parser)))
+ (base (ly:parser-output-name parser))
+ (output-suffix (ly:parser-lookup parser 'output-suffix)) )
+
+ (if (string? output-suffix)
+ (set! base (format "~a-~a" base (string-regexp-substitute
+ "[^a-zA-Z0-9-]" "_" output-suffix))))
;; must be careful: output-count is under user control.
(if (not (integer? count))
(if (> count 0)
(set! base (format #f "~a-~a" base count)))
-
(ly:parser-define! parser 'output-count (1+ count))
(process-procedure book paper layout base)
))