]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/topdocs/NEWS.tely (Top): simplify NEWS entry, add
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 30 Jan 2006 00:39:04 +0000 (00:39 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 30 Jan 2006 00:39:04 +0000 (00:39 +0000)
Nicolas.

* scm/define-markup-commands.scm (epsfile): add scaling to \epsfile.

* ps/lilyponddefs.ps: remove start-system, stop-system,
start-page fluff. This saves putting { } code on the stack, fixing
stack overflows when including EPS files.

ChangeLog
Documentation/topdocs/NEWS.tely
input/regression/completion-heads.ly
input/regression/grob-tweak.ly
lily/slur-scoring.cc
ps/lilyponddefs.ps
scm/define-markup-commands.scm
scm/framework-ps.scm
scm/output-ps.scm

index 8620b8b7d322e841c191cdb3ba5bed8edf058d16..2c11907350425e005275c40721d72992087b22b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-01-30  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * Documentation/topdocs/NEWS.tely (Top): simplify NEWS entry, add
+       Nicolas.
+
+       * scm/define-markup-commands.scm (epsfile): add scaling to \epsfile.
+
+       * ps/lilyponddefs.ps: remove start-system, stop-system,
+       start-page fluff. This saves putting { } code on the stack, fixing
+       stack overflows when including EPS files.
+
 2006-01-29  Graham Percival  <gpermus@gmail.com>
 
        * Documentation/user/putting.itely: minor fixes (comments on -devel).
@@ -16,6 +27,8 @@
 
 2006-01-28  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * input/regression/completion-heads.ly (texidoc): fix.
+
        * lily/staff-symbol-referencer.cc (on_staff_line): idem.
 
        * lily/tie-formatting-problem.cc
index cfc81ec6291e834bc517601764af393ae596634c..5e3fd267ff955ed8a9cb5c8a148ab2443435801a 100644 (file)
@@ -47,29 +47,30 @@ the @uref{../,LilyPond Documentation}
 
 @itemize @bullet
 
-@item Parallel editing is possible using the \parallelMusic function:  
+@item
+Music may for multiple parts can be interleaved, similar to MUP input.
+This is done with the \parallelMusic function,
+  
 @lilypond[verbatim,raggedright]
-\parallelMusic #'(voiceA voiceB voiceC) {
+\parallelMusic #'(voiceA voiceB) {
   %% first bar group
   r8     g'16[ c''] e''[ g' c'' e''] r8     g'16[ c''] e''[ g' c'' e''] |
-  r16 e'8. ~        e'4              r16 e'8. ~        e'4              |
   c'2                                c'2                                |
-  %% second bar group
   r8     a'16[ d''] f''[ a' d'' f''] r8     a'16[ d''] f''[ a' d'' f''] |
-  r16 d'8. ~        d'4              r16 d'8. ~        d'4              |
   c'2                                c'2                                |
 }
 \new StaffGroup <<
   \context Staff = "up" <<
-    \new Voice { \voiceOne \voiceA }
-    \new Voice { \voiceTwo \voiceB }
+    \new Voice \voiceA 
   >>
   \context Staff = "down" <<
-    \new Voice { \clef bass \voiceC }
+    \new Voice \voiceC 
   >>
 >> 
 @end lilypond
 
+This feature was contributed by Nicolas Sceaux.
+
 @item Alignments of staves may be tuned per system.   
 @lilypond[]
 #(set-global-staff-size 13)
index 509ca914dad5ce20abc0a1b3aed7a15e00fbffbf..831c6d86cf8702b34e5558ae21d5cc91d8818ddb 100644 (file)
@@ -11,16 +11,11 @@ If the @code{Note_heads_engraver} is replaced by the @code{Completion_heads_engr
 \layout { raggedright= ##t }
 
 
-
-\relative c'{
+\new Voice \with {
+    \remove "Note_heads_engraver"
+    \consists "Completion_heads_engraver"
+} \relative c'{
   \time 2/4
 
   c2. c8 d4 e f g a b c2.. b8 a g16 f4 e d c8. c2 
 }
-\layout{
-  \context{
-    \Voice
-    \remove "Note_heads_engraver"
-    \consists "Completion_heads_engraver"
-  }
-}
index baf6ef1d6ad471d13b88e9cdb6ed93cb7c697145..1ade70ea2294f955ac672e95436c2c3c3e52b85a 100644 (file)
@@ -1,7 +1,7 @@
 \header
 {
 
-  texidoc = "With the @code{\tweak} function, individual grobs that
+  texidoc = "With the @code{\\tweak} function, individual grobs that
   are directly caused by events may be tuned directly."
 
 }
index 769f84f6338e581a3818d5cb96ec275b09f9d0c4..88d528e34f10bc25242dbd96a88c818b54d70d0a 100644 (file)
@@ -538,6 +538,7 @@ Slur_score_state::get_base_attachments () const
              && !Stem::is_invisible (stem)
              && extremes_[d].stem_dir_ == dir_
              && Stem::get_beaming (stem, -d)
+             && Stem::get_beam (stem)
              && (!spanner_less (slur_, Stem::get_beam (stem))
                  || has_same_beam_))
            y = extremes_[d].stem_extent_[Y_AXIS][dir_];
index 536e7c36f4b60bec810658da486a2142424f7ea5..9672572c99e6b4e59a6486225efe5c24bef8fde5 100644 (file)
        grestore
 } bind def
 
-
-/place-box {
-       /object exch def
-       gsave
-       % exch translate
-       translate
-       0 0 moveto
-       object
-       grestore
-} bind def
-
-
-% start-system
-/start-system {
-    gsave
-} bind def
-
-/start-page {
-    gsave
-    0
-    vsize translate
-} bind def
-
-
-/stop-system {
-       /the-line exch def
-       the-line stroke grestore
-} bind def
-
-
-/end-lilypond-output {
-%      showpage
-} bind def
-
-
 /init-lilypond-parameters {
        staff-line-thickness setlinewidth
        staff-height init-paper
index a914e69888281ed608775125313be7355bd1078e..6d9d03cf16a2532e53692cb807246854963b032f 100644 (file)
@@ -190,43 +190,43 @@ normally inserted before elements on a line.
             
        #f)))
 
-(def-markup-command (epsfile layout props file-name) (string?)
-  "Inline an EPS image. The image is scaled such that 10 PS units is
-one staff-space."
+(def-markup-command (epsfile layout props axis size file-name) (number? number? string?)
+  "Inline an EPS image. The image is scaled along @var{axis} to
+@var{size}."
 
   (if (ly:get-option 'safe)
       (interpret-markup layout props "not allowed in safe") 
       (let*
          ((contents (ly:gulp-file file-name))
           (bbox (get-postscript-bbox contents))
+          (bbox-size (if (= axis X)
+                         (- (list-ref bbox 2) (list-ref bbox 0))
+                         (- (list-ref bbox 3) (list-ref bbox 1))
+                         ))
+          (factor (exact->inexact (/ size bbox-size)))
           (scaled-bbox
-           (if bbox
-               (map (lambda (x) (/ x 10)) bbox)
-               (begin
-                 (ly:warning (_ "can't find bounding box of `~a'")
-                          file-name)
-                 '()))))
-       
+           (map (lambda (x) (* factor x)) bbox)))
 
        (if bbox
-           
            (ly:make-stencil
             (list
              'embedded-ps
-             (string-append
-
-              ; adobe 5002.
-              "BeginEPSF "
-              "0.1 0.1 scale "
-              (format "\n%%BeginDocument: ~a\n" file-name)
-              contents
-              "%%EndDocument\n"
-              "EndEPSF\n"
-              ))
+             (format
+
+              "BeginEPSF
+~a ~a scale
+%%BeginDocument: ~a
+~a
+%%EndDocument
+EndEPSF"
+              factor factor
+              file-name
+              contents))
             (cons (list-ref scaled-bbox 0) (list-ref scaled-bbox 2))
             (cons (list-ref scaled-bbox 1) (list-ref scaled-bbox 3)))
            
-           (ly:make-stencil "" '(0 . 0) '(0 . 0))))))  
+           (ly:make-stencil "" '(0 . 0) '(0 . 0)))
+       )))
 
 
 (def-markup-command (postscript layout props str) (string?)
index 6ec77e7ad4676a12d1aaeb33105119d5673e05f5..2961be4727305877323bc341cdb9b350b97c31c8 100644 (file)
        "")
     "%%EndPageSetup\n"
 
-    "start-page { "
+    "gsave 0 vsize translate "
     "set-ps-scale-to-lily-scale "
     "\n"))
   (ly:outputter-dump-stencil outputter page)
-  (ly:outputter-dump-string outputter "} stop-system \nshowpage\n"))
+  (ly:outputter-dump-string outputter "stroke grestore \nshowpage\n"))
 
 (define (supplies-or-needs paper load-fonts?)
   (define (extract-names font)
 
     (display header port)
     (write-preamble paper load-fonts? port)
-    (display "start-system { set-ps-scale-to-lily-scale \n" port)
+    (display "gsave set-ps-scale-to-lily-scale \n" port)
     (ly:outputter-dump-stencil outputter dump-me)
-    (display "} stop-system\n%%Trailer\n%%EOF\n" port)
+    (display "stroke grestore\n%%Trailer\n%%EOF\n" port)
     (ly:outputter-close outputter)))
 
 (define-public (output-preview-framework basename book scopes fields)
index 03d6e29ebd9f9992ec0c117fa7be7a333ec4c214..04de883e6a78d75a65e7b1afa6718e78cba9b1a0 100644 (file)
          (if (and (< 0 (interval-length x-ext))
                   (< 0 (interval-length y-ext)))
              (format "~a ~a ~a ~a (textedit://~a:~a:~a:~a) mark_URI\n"
-                     (+ (car offset) (car x-ext))
-                     (+ (cdr offset) (car y-ext))
-                     (+ (car offset) (cdr x-ext))
-                     (+ (cdr offset) (cdr y-ext))
+                     (ly:number->string (+ (car offset) (car x-ext)))
+                     (ly:number->string (+ (cdr offset) (car y-ext)))
+                     (ly:number->string (+ (car offset) (cdr x-ext)))
+                     (ly:number->string (+ (cdr offset) (cdr y-ext)))
 
                      ;; TODO
                      ;; full escaping.
   "")
 
 (define (placebox x y s) 
-  (string-append 
-   (ly:number->string x) " " (ly:number->string y) " { " s " } place-box\n"))
+  (format
+   "gsave ~a ~a translate
+0 0 moveto
+~a
+grestore\n"
+
+   (ly:number->string x)
+   (ly:number->string y)
+   s))
 
 (define (polygon points blotdiameter filled?)
   (string-append