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-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).
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
@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)
\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"
- }
-}
\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."
}
&& !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_];
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
#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?)
"")
"%%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)
(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