]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/stencil.scm (stack-lines): return empty-stencil if argument
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 21 Nov 2004 18:19:11 +0000 (18:19 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 21 Nov 2004 18:19:11 +0000 (18:19 +0000)
is '()
(stack-stencils): idem.

* Documentation/user/changing-defaults.itely (Creating titles):
document new title layout options.

* lily/parser.yy (lilypond_header_body): copy previous
$globalheader if present.

* lily/ly-module.cc (LY_DEFINE): rename ly:import-module to
ly:module-copy

* scm/page-layout.scm (marked-up-headfoot): remove old functions.

* scm/titling.scm: remove old titling functions

* ly/titling-init.ly (oddFooterMarkup): new file. Generate titles
via markup.

* scm/page-layout.scm (marked-up-headfoot): create header/footer
field from user-supplied markup

* scm/define-markup-commands.scm (on-the-fly): new markup
command. Enter SCM markup procedure directly in Scheme.
(fromproperty): new markup command. Read markup from props argument.

* scm/titling.scm (marked-up-title): create title via
user-specified markup.

* scm/define-markup-commands.scm (column): remove empty stencils
from column.

* lily/ly-module.cc (LY_DEFINE): use ly_module_lookup(). This does
not have side-effect of creating variable stub.

17 files changed:
ChangeLog
Documentation/user/changing-defaults.itely
input/mutopia/J.S.Bach/baerenreiter-sarabande.ly
lily/include/ly-module.hh
lily/lily-lexer.cc
lily/ly-module.cc
lily/output-def.cc
lily/score.cc
lily/side-position-interface.cc
lily/text-item.cc
ly/paper-defaults.ly
ly/titling-init.ly
scm/define-markup-commands.scm
scm/page-layout.scm
scm/stencil.scm
scm/titling.scm
scripts/convert-ly.py

index 9a8f01dd00a28ef0e2c939f91e5b2a8528b7a07f..56186211f7b849a56e3e6d41d225aa177cbc3ec8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
 2004-11-21  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * scm/stencil.scm (stack-lines): return empty-stencil if argument
+       is '()
+       (stack-stencils): idem.
+
+       * Documentation/user/changing-defaults.itely (Creating titles):
+       document new title layout options.
+
+       * lily/parser.yy (lilypond_header_body): copy previous
+       $globalheader if present.
+
+       * lily/ly-module.cc (LY_DEFINE): rename ly:import-module to
+       ly:module-copy
+       
+       * scm/page-layout.scm (marked-up-headfoot): remove old functions.
+
+       * scm/titling.scm: remove old titling functions
+
        * lily/stencil.cc (translate): remove absolute dimension.
 
        * ly/titling-init.ly (oddFooterMarkup): new file. Generate titles
index d560a03b0ce8848d20102ad5ac2a312308964860..424d09575a90b9f4a8e5c6a34b501c212dc45aa4 100644 (file)
@@ -2159,15 +2159,42 @@ Different fonts may be selected for each element by using
 @}
 @end example
 
-A more advanced option is to change the Scheme functions
-@code{make-book-title} and @code{make-score-title} functions, defined
-in the @code{\paper} section of the @code{\book} block.  These functions
-create a block of titling, given the information in the
-@code{\header}.  The init file @file{ly/@/titling@/.scm} shows how the
-default format is created, and it may be used as a template for
-different styles.
+A more advanced option is to change the definitions of the following
+variables in the @code{\paper} block. The init file
+@file{ly/titling-init.ly} lists the default layout.
+
+@itemize @code
+@item bookTitleMarkup
+  This is the title put over an entire @code{\book} block. Typically,
+  it has the composer and the title of the piece
+  
+@item scoreTitleMarkup
+  This is the title put over a @code{\score} block within a
+@code{\book}. Typically, it has the name of the movement (@code{piece}
+field).
+
+@item oddHeaderMarkup
+  This is the page header for odd-numbered pages. 
+
+  @item evenHeaderMarkup
+  This is the page header for even-numbered pages.  If unspecified,
+  the odd header is used instead.
+
+  By default, headers are defined such that the page number is on the
+  outside edge, and the instrument is centered.
+
+  @item oddFooterMarkup
+  This is the page footer for odd-numbered pages. 
+  
+@item evenFooterMarkup
+  This is the page footer for even-numbered pages.  If unspecified,
+  the odd header is used instead.
+
+  By default, the footer has the copyright notice on the first, and
+  the tagline on the last page.
+@end itemize
+
 
 @cindex \paper
 @cindex header
 @cindex footer
index 3eb4bff029d6bc7b413b7d225f1be905935e99fb..738c78f25151d15a29ea9bd2a3b0220ef4295999 100644 (file)
@@ -171,15 +171,16 @@ smallerPaper = \layout {
   betweensystempadding = 0\mm
 }
 
-\score{
-  \sarabandeCelloStaff
-  \midi{ \tempo 4 = 40 }
-  \layout { }
-  \header{
-    opus= "" 
-    piece ="Sarabande" }
+\book {
+  \score{
+    \sarabandeCelloStaff
+    \layout { }
+    \midi{ \tempo 4 = 40 }
+    \header{
+      opus= "" 
+      piece ="Sarabande" }
+  }
 }
-
 %%% Local variables:
 %%% LilyPond-indent-level:2
 %%% End:
index 1862845cdeca46e85c491a1e59bbc69a9e31959f..09768502a09c94d6cd617ed896046773aa5ef1ad 100644 (file)
@@ -11,7 +11,7 @@
 #include "lily-guile.hh"
 
 SCM ly_make_anonymous_module (bool safe);
-SCM ly_import_module (SCM dest, SCM src);
+SCM ly_module_copy (SCM dest, SCM src);
 SCM ly_module2alist (SCM mod);
 SCM ly_module_lookup (SCM module, SCM sym);
 SCM ly_modules_lookup (SCM modules, SCM sym, SCM);
index 191997357f72a28373f2ff05e84dbc3c5e8c130a..983dbc043fe035e2cbe48e719c7d10a3a51a0725 100644 (file)
@@ -123,7 +123,7 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src)
   for (SCM s = src.scopes_; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM newmod = ly_make_anonymous_module (false);
-      ly_import_module (newmod, scm_car (s));
+      ly_module_copy (newmod, scm_car (s));
       *tail = scm_cons (newmod, SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
index 5125b7762b45b54fe6a010f24855296043536d60..f3f0c528b3469b6ea5d199cc1f0bb58e80b58767 100644 (file)
@@ -54,7 +54,7 @@ ly_use_module (SCM mod, SCM used)
 #define FUNC_NAME __FUNCTION__
 
 static SCM
-ly_module_define (void *closure, SCM key, SCM val, SCM result)
+module_define_closure_func (void *closure, SCM key, SCM val, SCM result)
 {
   (void) result;
   SCM module = (SCM) closure;
@@ -67,18 +67,16 @@ ly_module_define (void *closure, SCM key, SCM val, SCM result)
 typedef SCM (*Hash_cl_func)();
 
 /*
-  Check me. This is NOT an actual import. It just copies the
-  definitions.
-
   If a variable in changed in SRC, we DEST doesn't see the
   definitions.
  */
-LY_DEFINE (ly_import_module, "ly:import-module",
+LY_DEFINE (ly_module_copy, "ly:module-copy",
           2, 0, 0, (SCM dest, SCM src),
-          "Import all bindings from module SRC into DEST.")
+          "Copy all bindings from module SRC into DEST.")
 {
   SCM_VALIDATE_MODULE (1, src);
-  scm_internal_hash_fold ((Hash_cl_func) &ly_module_define, (void*) dest,
+  scm_internal_hash_fold ((Hash_cl_func) &module_define_closure_func,
+                         (void*) dest,
                          SCM_EOL, SCM_MODULE_OBARRAY (src));
   return SCM_UNSPECIFIED;
 }
index e220ffdfc4335370e1119ff36b5ba1e4254285f9..1c2cb478345b88dec65a43105c76e5ace4a4df8d 100644 (file)
@@ -36,7 +36,7 @@ Output_def::Output_def (Output_def const &s)
   input_origin_ = s.input_origin_;
   scope_= ly_make_anonymous_module (false);
   if (ly_c_module_p (s.scope_))
-    ly_import_module (scope_, s.scope_);
+    ly_module_copy (scope_, s.scope_);
 }
 
 Output_def::~Output_def ()
index 6a962306b0959d0889a70175de8128d5b691c434..b758fde169abea3cd2f27eed67e3493a84b3a16c 100644 (file)
@@ -89,7 +89,7 @@ Score::Score (Score const &s)
 
   header_ = ly_make_anonymous_module (false);
   if (ly_c_module_p (s.header_))
-    ly_import_module (header_, s.header_);
+    ly_module_copy (header_, s.header_);
 }
 
 
index d40648c7519d958a71558ab01985c02a772deefb..deaaf5f3aae4b941a1edfce62f8a0277a2c6f250 100644 (file)
@@ -114,8 +114,14 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
 
   /* FIXME: 100CM should relate to paper size.  */
   if (fabs (total_off) > 100 CM)
-    programming_error (String_convert::form_string ("Improbable offset for grob %s: %f%s", me->name (), total_off, INTERNAL_UNIT));
-  
+    {
+      String msg
+       =  String_convert::form_string ("Improbable offset for grob %s: %f%s",
+                                       me->name ().to_str0 (), total_off,
+                                       INTERNAL_UNIT);
+      
+      programming_error (msg);
+    }
   return scm_make_real (total_off);
 }
 
index fdceef15f849d002c8d1a78b64b1825664cb996d..758252f32b4b4a8d544cdfe6fd0b2fb478bf7cc7 100644 (file)
@@ -81,7 +81,18 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
       
       return scm_apply_2 (func, layout_smob, props, args);
     }
-  return SCM_EOL;
+  else
+    {
+      programming_error ("Is not a markup: ");
+      scm_display (markup, scm_current_error_port());
+      assert (false);
+      Box b;
+      b[X_AXIS].set_empty();
+      b[Y_AXIS].set_empty();
+      
+      Stencil s(b, SCM_EOL);
+      return s.smobbed_copy();
+    }
 }
 
 MAKE_SCHEME_CALLBACK (Text_interface,print,1);
index 55a95d8333cb8c0d28eb2d6d3035af4adcd53c11..612216d9cae7fd36946558400fdf982ccf94e063 100644 (file)
@@ -25,9 +25,6 @@
 
     outputscale = #1.7573
     
-    #(define-public score-title default-score-title)
-%    #(define-public user-title default-user-title)
-%    #(define-public book-title default-book-title)
     #(define-public book-title (marked-up-title 'bookTitleMarkup))
     #(define-public score-title (marked-up-title 'scoreTitleMarkup))
 
@@ -70,8 +67,9 @@
     %% use lmodern in latin1 (cork) flavour if EC is not available.
     #(define text-font-defaults
       `((font-encoding
-        . ,(if (and (not (ly:kpathsea-find-file "ecrm10.pfa"))
-                (ly:kpathsea-find-file "cork-lm.enc")) 'cork-lm 'Extended-TeX-Font-Encoding---Latin))
+        . cork-lm)
+;       . ,(if (and  ;  (not (ly:kpathsea-find-file "ecrm10.pfa"))
+;               (ly:kpathsea-find-file "cork-lm.enc")) 'cork-lm 'Extended-TeX-Font-Encoding---Latin))
        (baseline-skip . 2)
        (word-space . 0.6)))
 
index d94c42a78be4537ef8a3318f594854e5e77d08ad..bea90f7ebcc5166fdeb3ef8f50a54b69f668683b 100644 (file)
@@ -1,4 +1,3 @@
-
 bookTitleMarkup = \markup {
   \column <
     \fill-line < \fromproperty #'header:dedication >
@@ -7,25 +6,25 @@ bookTitleMarkup = \markup {
     >
     \fill-line <
       \override #'(baseline-skip . 3)
-        \column <
-         \fill-line <
-               \huge \bigger \bigger
-                  \bold \fromproperty #'header:subtitle
-               >
-         \fill-line <
-               \huge \bigger
-                  \bold \fromproperty #'header:subsubtitle
-               >
-         >
+      \column <
+       \fill-line <
+         \huge \bigger \bigger
+         \bold \fromproperty #'header:subtitle
+       >
+       \fill-line <
+         \huge \bigger
+         \bold \fromproperty #'header:subsubtitle
+       >
+      >
     >
     \fill-line <
       \fromproperty #'header:poet
       \fromproperty #'header:instrument 
       \column <
-               \fromproperty #'header:composer
-               \fromproperty #'header:arranger
-               >
+       \fromproperty #'header:composer
+       \fromproperty #'header:arranger
       >
+    >
   >
 }
 
@@ -54,6 +53,8 @@ evenHeaderMarkup = \markup
 oddFooterMarkup = \markup {
   \column <
     \fill-line <
+
+      % put copyright only on pagenr. 1 
       \on-the-fly #(lambda (layout props arg)
                    (if (= 1 (chain-assoc-get 'page:page-number props   -1))
                     (interpret-markup layout props arg)
@@ -62,6 +63,7 @@ oddFooterMarkup = \markup {
       \fromproperty #'header:copyright
     >
     \fill-line <
+      % put tagline only on last page
       \on-the-fly #(lambda (layout props arg)
                    (if (chain-assoc-get 'page:last?  props #f)
                     (interpret-markup layout props arg)
@@ -72,6 +74,3 @@ oddFooterMarkup = \markup {
   >
 }
 
-
-
-
index 0b44e689a6912ad3057a4a64c51dc80046029255..36886996d68057d12cff771f615ac4bf208386bf 100644 (file)
@@ -11,6 +11,7 @@
 ;;     syntax, description and example. 
 
 (define-public empty-stencil (ly:make-stencil '() '(1 . -1) '(1 . -1)))
+(define-public point-stencil (ly:make-stencil "" '(0 . 0) '(0 . 0)))
 
 (def-markup-command (stencil layout props stil) (ly:stencil?)
   "Stencil as markup"
@@ -98,32 +99,38 @@ gsave /ecrm10 findfont
    If there are no arguments, return an empty stencil.
 "
 
-  (let* ((stencils (filter
-                   (lambda (stc) (not (ly:stencil-empty? stc)))
+  (let* ((orig-stencils
                    (map (lambda (x) (interpret-markup layout props x))
-                       markups)))
-        (text-width (apply + (map interval-length
-                                  (map (lambda (x)
-                                         (ly:stencil-extent x X))
-                                       stencils))))
-       (word-count (length stencils))
-       (word-space (chain-assoc-get 'word-space props))
-       (line-width (chain-assoc-get 'linewidth props))
-       (fill-space (if (< line-width text-width)
-                       word-space
-                       (/ (- line-width text-width)
-                          (if (= word-count 1) 2 (- word-count 1)))))
-       (line-stencils (if (= word-count 1)
-                          (list
-                           (ly:make-stencil '() '(0 . 0) '(0 . 0))  
-                           (car stencils)
-                           (ly:make-stencil '() '(0 . 0) '(0 . 0))  )
-                          stencils)))
-
-    (if (null? stencils)
+                       markups))
+        (stencils
+         (map (lambda (stc)
+                (if (ly:stencil-empty? stc)
+                    point-stencil
+                    stc))  orig-stencils))
+        (text-width (apply +
+                           (map (lambda (stc)
+                                  (if (ly:stencil-empty? stc)
+                                      0.0
+                                      (interval-length (ly:stencil-extent stc X))))
+                                stencils)))
+        (word-count (length stencils))
+        (word-space (chain-assoc-get 'word-space props))
+        (line-width (chain-assoc-get 'linewidth props))
+        (fill-space (if (< line-width text-width)
+                        word-space
+                        (/ (- line-width text-width)
+                           (if (= word-count 1) 2 (- word-count 1)))))
+        (line-stencils (if (= word-count 1)
+                           (list
+                            point-stencil
+                            (car stencils)
+                            point-stencil)
+                           stencils)))
+
+    (if (null? (remove ly:stencil-empty? orig-stencils))
        empty-stencil
        (stack-stencils X RIGHT fill-space line-stencils))))
-  
+
 (define (font-markup qualifier value)
   (lambda (layout props arg)
     (interpret-markup layout
index 6ca7591428466cd38ee183804112bd96672e189c..98eede9abaffa9bf5dd6b281747d7b8e90e46f9e 100644 (file)
 
 (define TAGLINE
   (string-append "Engraved by LilyPond (version " (lilypond-version) ")"))
-
-;; TODO: take <optimally-broken-page-node> iso. page-number
-;; for all of these functions ?
-
-(define-public (plain-header layout scopes page-number last?)
-  "Standard header for a part: page number --outside--  and instrument--centered."
-
-  (let* ((props (page-properties layout))
-         (pnum
-          (if (ly:output-def-lookup layout 'printpagenumber)
-              (markup #:bold (number->string page-number))
-              ""))
-         (instr (ly:modules-lookup scopes 'instrument))
-         
-         (line (list "" (if (markup? instr) instr "") pnum)))
-    
-    (if (even? page-number)
-        (set! line (reverse line)))
-    
-    (if ((if (ly:output-def-lookup layout 'printfirstpagenumber)
-             <=
-             <)
-         (ly:output-def-lookup layout 'firstpagenumber) page-number)
-        (interpret-markup layout props (make-fill-line-markup line))
-        '())))
-
-(define-public ((marked-up-headfoot what-odd what-even) layout scopes page-number last?)
-
-  "Read variables WHAT-ODD, WHAT-EVEN, and interpret them as
-markup. The PROPS argument will include variables set in SCOPES and
-page:last?, page:page-number-string and page:page-number
-" 
-
-  (define (get sym)
-    (let ((x (ly:modules-lookup scopes sym)))
-      (if (markup? x) x #f)))
-  (define (interpret-in-page-env potential-markup)
-    (if (markup? potential-markup)
-       (let*
-           ((alists  (map ly:module->alist scopes))
-            (prefixed-alists
-             (map (lambda (alist)
-                    (map (lambda (entry)
-                           (cons
-                            (string->symbol
-                             (string-append
-                              "header:"
-                              (symbol->string (car entry))))
-                            (cdr entry)
-                            ))
-                         alist))
-                  alists))
-            (pgnum-alist (list
-                          (cons 'page:last? last?)
-                          (cons 'page:page-number-string
-                                (number->string page-number))
-                          (cons 'page:page-number  page-number)))
-            (props (append
-                    (list pgnum-alist)
-                    prefixed-alists
-                    (page-properties layout)))
-            )
-
-         (interpret-markup layout props potential-markup))
-       
-       empty-stencil))
-
-  (interpret-in-page-env
-   (if (and (even? page-number)
-           (markup? (get what-even)))
-       (get what-even)
-       (get what-odd)))) 
-
-
-
-;; TODO: add publisher ID on non-first page.
-(define-public (plain-footer layout scopes page-number last?)
-  "Standard footer. Empty, save for first (copyright) and last (tagline) page."
-  
-  (let*
-      ((props (page-properties layout))
-       (copyright (ly:modules-lookup scopes 'copyright))
-       (tagline-var (ly:modules-lookup scopes 'tagline))
-       (tagline (if (markup? tagline-var) tagline-var TAGLINE))
-       (stencil #f))
-
-    (if last?
-       (set! stencil
-             (ly:stencil-combine-at-edge
-              stencil Y DOWN (interpret-markup layout props tagline)
-              0.0
-              )))
-
-    (if (and (= 1 page-number)
-            (markup? copyright))
-
-       (set! stencil
-             (ly:stencil-combine-at-edge
-              stencil Y DOWN (interpret-markup layout props copyright)
-              0.0
-              )))
-
-    stencil))
   
 (define (page-headfoot layout scopes number sym sepsym dir last?)
   "Create a stencil including separating space."
index f1faee20f87da2038238eff8f165cd016bc15f71..3957d40f046d2fd8cd59d1825be2297b9b26f14a 100644 (file)
@@ -7,7 +7,7 @@
 (define-public (stack-stencils axis dir padding stils)
   "Stack stencils STILS in direction AXIS, DIR, using PADDING."
   (if (null? stils)
-      '()
+      empty-stencil
       (if (pair? stils)
          (ly:stencil-combine-at-edge
           (car stils) axis dir (stack-stencils axis dir padding (cdr stils))
@@ -16,7 +16,7 @@
 (define-public (stack-lines dir padding baseline stils)
   "Stack vertically with a baseline-skip."
   (if (null? stils)
-      '()
+      empty-stencil
       (if (null? (cdr stils))
          (car stils)
          (ly:stencil-combine-at-edge
index d64a71f4b69600acd904a5a471877fa6f21227f5..a72fa8085696e99e4ccbba800a6b0bb0324ba5d4 100644 (file)
 
 ;;;;;;;;;;;;;;;;;;
 
+(define-public ((marked-up-headfoot what-odd what-even) layout scopes page-number last?)
+
+  "Read variables WHAT-ODD, WHAT-EVEN from LAYOUT, and interpret them
+as markup. The PROPS argument will include variables set in SCOPES and
+page:last?, page:page-number-string and page:page-number
+" 
+
+  (define (get sym)
+    (ly:output-def-lookup layout sym))
+
+  (define (interpret-in-page-env potential-markup)
+    (if (markup? potential-markup)
+       (let*
+           ((alists  (map ly:module->alist scopes))
+            (prefixed-alists
+             (map (lambda (alist)
+                    (map (lambda (entry)
+                           (cons
+                            (string->symbol
+                             (string-append
+                              "header:"
+                              (symbol->string (car entry))))
+                            (cdr entry)
+                            ))
+                         alist))
+                  alists))
+            (pgnum-alist (list
+                          (cons 'page:last? last?)
+                          (cons 'page:page-number-string
+                                (number->string page-number))
+                          (cons 'page:page-number  page-number)))
+            (props (append
+                    (list pgnum-alist)
+                    prefixed-alists
+                    (page-properties layout)))
+            )
+
+         (interpret-markup layout props potential-markup))
+       
+       empty-stencil))
+
+  (interpret-in-page-env
+   (if (and (even? page-number)
+           (markup? (get what-even)))
+       (get what-even)
+       (get what-odd))))
 
 (define-public ((marked-up-title what) layout scopes)
   "Read variables WHAT from SCOPES, and interpret it as markup. The
@@ -40,7 +86,7 @@ PROPS argument will include variables set in SCOPES (prefixed with
        (props (append prefixed-alist
                      (page-properties layout)))
 
-       (markup (get what))
+       (markup (ly:output-def-lookup layout what))
        )
 
     (if (markup? markup)
@@ -48,125 +94,3 @@ PROPS argument will include variables set in SCOPES (prefixed with
        (ly:make-stencil '() '(1 . -1) '(1 . -1)))
   ))
 
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; old
-                                       ; titling.
-(define-public (default-book-title layout scopes)
-  "Generate book title from header strings."
-
-
-  (define (get sym)
-    (let ((x (ly:modules-lookup scopes sym)))
-      (if (markup? x) x "")))
-  (define (has sym)
-    (markup?  (ly:modules-lookup scopes sym)))
-
-  (let ((props (page-properties layout)))
-
-    (interpret-markup
-     layout props
-     (make-override-markup
-      '(baseline-skip . 4)
-      (make-column-markup
-       (append
-       (if (has 'dedication)
-           (list (markup #:fill-line
-                         (#:normalsize (get 'dedication))))
-           '())
-       (if (has 'title)
-           (list
-            (markup (#:fill-line
-                     (#:huge #:bigger #:bigger #:bigger #:bigger #:bold
-                             (get 'title)))))
-           '())
-       (if (or (has 'subtitle) (has 'subsubtitle))
-           (list
-            (make-override-markup
-             '(baseline-skip . 3)
-             (make-column-markup
-              (list
-               (markup #:fill-line
-                       (#:large #:bigger #:bigger #:bold (get 'subtitle)))
-               (markup #:fill-line (#:bigger #:bigger #:bold
-                                             (get 'subsubtitle)))
-               (markup #:override '(baseline-skip . 5)
-                       #:column ("")))
-
-              ))
-            )
-           '())
-       
-       (list
-        (make-override-markup
-         '(baseline-skip . 2.5)
-         (make-column-markup
-          (append
-           (if (or (has 'poet) (has 'composer))
-               (list (markup #:fill-line
-                             (#:bigger (get 'poet)
-                                       #:large #:bigger #:caps
-                                       (get 'composer))))
-               '())
-           (if (or (has 'texttranslator) (has 'opus))
-               (list
-                (markup
-                 #:fill-line
-                 (#:bigger (get 'texttranslator) #:bigger (get 'opus))))
-               '())
-           (if (or (has 'meter) (has 'arranger))
-               (list
-                (markup #:fill-line
-                        (#:bigger (get 'meter) #:bigger (get 'arranger))))
-               '())
-           (if (has 'instrument)
-               (list
-                ""
-                (markup #:fill-line (#:large #:bigger (get 'instrument))))
-               '())
-;;; piece is done in the score-title
-;;;         (if (has 'piece)
-;;;             (list ""
-;;;                   (markup #:fill-line (#:large #:bigger #:caps (get 'piece) "")))
-;;;             '())
-           ))))))))))
-
-
-(define-public (default-user-title layout markup)
-  "Generate book title from header markup."
-  (if (markup? markup)
-      (let ((props (page-properties layout))
-           (baseline-skip (chain-assoc-get 'baseline-skip props 2)) )
-       (stack-lines DOWN 0 BASELINE-SKIP
-                    (list (interpret-markup layout props markup))))))
-
-(define-public (default-score-title layout scopes)
-  "Generate score title from header strings."
-
-  (define (get sym)
-    (let ((x (ly:modules-lookup scopes sym)))
-      (if (markup? x) x "")))
-
-  (define (has sym)
-    (markup? (ly:modules-lookup scopes sym)))
-
-  (let ((props (page-properties layout)))
-    (interpret-markup
-     layout props
-     (make-override-markup
-      '(baseline-skip . 4)
-      (make-column-markup
-       (append
-       (if (has 'opus)
-           ;; opus, again?
-           '()
-
-           ;; todo: figure out if and what should be here? 
-           ;;(list (markup #:fill-line ("" (get 'opus))))
-           '())
-       (if (has 'piece)
-           (list
-            (markup #:fill-line (#:large #:bigger (get 'piece) "")))
-           '())))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 7ad48eaf1bb17544993a001029db6ee291390a36..27704d492a8514bc91eb4aab616fc70d497e552c 100644 (file)
@@ -2271,6 +2271,16 @@ conversions.append (((2, 5, 0),
                     ''))
 
 
+def conv (str):
+       str = re.sub (r'ly:import-module',
+                     r'ly:module-copy', str) 
+       return str
+
+conversions.append (((2, 5, 1),
+                    conv,
+                    'ly:import-module -> ly:module-copy'))
+
+
 
 ################################
 #      END OF CONVERSIONS